From owner-svn-src-stable-8@FreeBSD.ORG Sun Nov 22 14:32:33 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5290F1065676; Sun, 22 Nov 2009 14:32:33 +0000 (UTC) (envelope-from kuriyama@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 36E4C8FC12; Sun, 22 Nov 2009 14:32:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAMEWXc3020713; Sun, 22 Nov 2009 14:32:33 GMT (envelope-from kuriyama@svn.freebsd.org) Received: (from kuriyama@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAMEWXsV020708; Sun, 22 Nov 2009 14:32:33 GMT (envelope-from kuriyama@svn.freebsd.org) Message-Id: <200911221432.nAMEWXsV020708@svn.freebsd.org> From: Jun Kuriyama Date: Sun, 22 Nov 2009 14:32:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199648 - in stable/8/sys: amd64/amd64 amd64/include i386/i386 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2009 14:32:33 -0000 Author: kuriyama Date: Sun Nov 22 14:32:32 2009 New Revision: 199648 URL: http://svn.freebsd.org/changeset/base/199648 Log: - MFC r199067,199215,199253 - Add hw.clflush_disable loader tunable to avoid panic (trap 9) at map_invalidate_cache_range() even if CPU is not Intel. - This tunable can be set to -1 (default), 0 and 1. -1 is same as current behavior, which automatically disable CLFLUSH on Intel CPUs without CPUID_SS (should be occured on Xen only). You can specify 1 when this panic happened on non-Intel CPUs (such as AMD's). Because disabling CLFLUSH may reduce performance, you can try with setting 0 on Intel CPUs without SS to use CLFLUSH feature. - Amd64 init_secondary() calls initializecpu() while curthread is still not properly set up. r199067 added the call to TUNABLE_INT_FETCH() to initializecpu() that results in hang because AP are started when kernel environment is already dynamic and thus needs to acquire mutex, that is too early in AP start sequence to work. Extract the code that should be executed only once, because it sets up global variables, from initializecpu() to initializecpucache(), and call the later only from hammer_time() executed on BSP. Now, TUNABLE_INT_FETCH() is done only once at BSP at the early boot stage. Modified: stable/8/sys/amd64/amd64/initcpu.c stable/8/sys/amd64/amd64/machdep.c stable/8/sys/amd64/include/md_var.h stable/8/sys/i386/i386/initcpu.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/amd64/initcpu.c ============================================================================== --- stable/8/sys/amd64/amd64/initcpu.c Sun Nov 22 14:04:20 2009 (r199647) +++ stable/8/sys/amd64/amd64/initcpu.c Sun Nov 22 14:32:32 2009 (r199648) @@ -47,6 +47,12 @@ __FBSDID("$FreeBSD$"); static int hw_instruction_sse; SYSCTL_INT(_hw, OID_AUTO, instruction_sse, CTLFLAG_RD, &hw_instruction_sse, 0, "SIMD/MMX2 instructions available in CPU"); +/* + * -1: automatic (default) + * 0: keep enable CLFLUSH + * 1: force disable CLFLUSH + */ +static int hw_clflush_disable = -1; int cpu; /* Are we 386, 386sx, 486, etc? */ u_int cpu_feature; /* Feature flags */ @@ -157,6 +163,11 @@ initializecpu(void) CPUID_TO_FAMILY(cpu_id) == 0x6 && CPUID_TO_MODEL(cpu_id) >= 0xf) init_via(); +} + +void +initializecpucache() +{ /* * CPUID with %eax = 1, %ebx returns @@ -169,6 +180,15 @@ initializecpu(void) * XXXKIB: (temporary) hack to work around traps generated when * CLFLUSHing APIC registers window. */ - if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS)) + TUNABLE_INT_FETCH("hw.clflush_disable", &hw_clflush_disable); + if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS) && + hw_clflush_disable == -1) + cpu_feature &= ~CPUID_CLFSH; + /* + * Allow to disable CLFLUSH feature manually by + * hw.clflush_disable tunable. This may help Xen guest on some AMD + * CPUs. + */ + if (hw_clflush_disable == 1) cpu_feature &= ~CPUID_CLFSH; } Modified: stable/8/sys/amd64/amd64/machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/machdep.c Sun Nov 22 14:04:20 2009 (r199647) +++ stable/8/sys/amd64/amd64/machdep.c Sun Nov 22 14:32:32 2009 (r199648) @@ -1667,6 +1667,7 @@ hammer_time(u_int64_t modulep, u_int64_t identify_cpu(); /* Final stage of CPU initialization */ initializecpu(); /* Initialize CPU registers */ + initializecpucache(); /* make an initial tss so cpu can get interrupt stack on syscall! */ common_tss[0].tss_rsp0 = thread0.td_kstack + \ Modified: stable/8/sys/amd64/include/md_var.h ============================================================================== --- stable/8/sys/amd64/include/md_var.h Sun Nov 22 14:04:20 2009 (r199647) +++ stable/8/sys/amd64/include/md_var.h Sun Nov 22 14:32:32 2009 (r199648) @@ -89,6 +89,7 @@ void gs_load_fault(void) __asm(__STRING( void dump_add_page(vm_paddr_t); void dump_drop_page(vm_paddr_t); void initializecpu(void); +void initializecpucache(void); void fillw(int /*u_short*/ pat, void *base, size_t cnt); void fpstate_drop(struct thread *td); int is_physical_memory(vm_paddr_t addr); Modified: stable/8/sys/i386/i386/initcpu.c ============================================================================== --- stable/8/sys/i386/i386/initcpu.c Sun Nov 22 14:04:20 2009 (r199647) +++ stable/8/sys/i386/i386/initcpu.c Sun Nov 22 14:32:32 2009 (r199648) @@ -75,6 +75,12 @@ static void init_mendocino(void); static int hw_instruction_sse; SYSCTL_INT(_hw, OID_AUTO, instruction_sse, CTLFLAG_RD, &hw_instruction_sse, 0, "SIMD/MMX2 instructions available in CPU"); +/* + * -1: automatic (default) + * 0: keep enable CLFLUSH + * 1: force disable CLFLUSH + */ +static int hw_clflush_disable = -1; /* Must *NOT* be BSS or locore will bzero these after setting them */ int cpu = 0; /* Are we 386, 386sx, 486, etc? */ @@ -721,7 +727,16 @@ initializecpu(void) * XXXKIB: (temporary) hack to work around traps generated when * CLFLUSHing APIC registers window. */ - if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS)) + TUNABLE_INT_FETCH("hw.clflush_disable", &hw_clflush_disable); + if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS) && + hw_clflush_disable == -1) + cpu_feature &= ~CPUID_CLFSH; + /* + * Allow to disable CLFLUSH feature manually by + * hw.clflush_disable tunable. This may help Xen guest on some AMD + * CPUs. + */ + if (hw_clflush_disable == 1) cpu_feature &= ~CPUID_CLFSH; #if defined(PC98) && !defined(CPU_UPGRADE_HW_CACHE) From owner-svn-src-stable-8@FreeBSD.ORG Sun Nov 22 15:53:41 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64D64106566B; Sun, 22 Nov 2009 15:53:41 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52F928FC14; Sun, 22 Nov 2009 15:53:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAMFrdum022398; Sun, 22 Nov 2009 15:53:39 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAMFrd8K022397; Sun, 22 Nov 2009 15:53:39 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200911221553.nAMFrd8K022397@svn.freebsd.org> From: Attilio Rao Date: Sun, 22 Nov 2009 15:53:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199649 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2009 15:53:41 -0000 Author: attilio Date: Sun Nov 22 15:53:39 2009 New Revision: 199649 URL: http://svn.freebsd.org/changeset/base/199649 Log: MFC r199209: Fix a potential buffer boundaries overflow in devclass_add_device() by using all available int lenghts digits for storing the information. Sponsored by: Sandvine Incorporated Modified: stable/8/sys/kern/subr_bus.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/subr_bus.c ============================================================================== --- stable/8/sys/kern/subr_bus.c Sun Nov 22 14:32:32 2009 (r199648) +++ stable/8/sys/kern/subr_bus.c Sun Nov 22 15:53:39 2009 (r199649) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1584,7 +1585,7 @@ devclass_add_device(devclass_t dc, devic PDEBUG(("%s in devclass %s", DEVICENAME(dev), DEVCLANAME(dc))); - buflen = snprintf(NULL, 0, "%s%d$", dc->name, dev->unit); + buflen = snprintf(NULL, 0, "%s%d$", dc->name, INT_MAX); if (buflen < 0) return (ENOMEM); dev->nameunit = malloc(buflen, M_BUS, M_NOWAIT|M_ZERO); From owner-svn-src-stable-8@FreeBSD.ORG Sun Nov 22 15:57:08 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B414106568D; Sun, 22 Nov 2009 15:57:08 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F3C38FC0A; Sun, 22 Nov 2009 15:57:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAMFv8R2022536; Sun, 22 Nov 2009 15:57:08 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAMFv8Mg022533; Sun, 22 Nov 2009 15:57:08 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200911221557.nAMFv8Mg022533@svn.freebsd.org> From: Attilio Rao Date: Sun, 22 Nov 2009 15:57:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199650 - stable/8/sys/boot/common X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2009 15:57:08 -0000 Author: attilio Date: Sun Nov 22 15:57:08 2009 New Revision: 199650 URL: http://svn.freebsd.org/changeset/base/199650 Log: MFC r199210: Introduce the new loader compile-time option BOOT_PROMPT_123 which allows to enter the loader prompt just after entering the sequence "123". Sponsored by: Sandvine Incorporated Modified: stable/8/sys/boot/common/Makefile.inc stable/8/sys/boot/common/boot.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/boot/common/Makefile.inc ============================================================================== --- stable/8/sys/boot/common/Makefile.inc Sun Nov 22 15:53:39 2009 (r199649) +++ stable/8/sys/boot/common/Makefile.inc Sun Nov 22 15:57:08 2009 (r199650) @@ -38,4 +38,8 @@ MAN+= ../forth/loader.conf.5 MAN+= ../forth/loader.4th.8 .endif +.if defined(BOOT_PROMPT_123) +CFLAGS+= -DBOOT_PROMPT_123 +.endif + MAN+= loader.8 Modified: stable/8/sys/boot/common/boot.c ============================================================================== --- stable/8/sys/boot/common/boot.c Sun Nov 22 15:53:39 2009 (r199649) +++ stable/8/sys/boot/common/boot.c Sun Nov 22 15:57:08 2009 (r199650) @@ -162,6 +162,9 @@ autoboot(int timeout, char *prompt) int c, yes; char *argv[2], *cp, *ep; char *kernelname; +#ifdef BOOT_PROMPT_123 + const char *seq = "123", *p = seq; +#endif autoboot_tried = 1; @@ -192,14 +195,29 @@ autoboot(int timeout, char *prompt) yes = 0; +#ifdef BOOT_PROMPT_123 + printf("%s\n", (prompt == NULL) ? "Hit [Enter] to boot immediately, or " + "1 2 3 sequence for command prompt." : prompt); +#else printf("%s\n", (prompt == NULL) ? "Hit [Enter] to boot immediately, or any other key for command prompt." : prompt); +#endif for (;;) { if (ischar()) { c = getchar(); +#ifdef BOOT_PROMPT_123 + if ((c == '\r') || (c == '\n')) { + yes = 1; + break; + } else if (c != *p++) + p = seq; + if (*p == 0) + break; +#else if ((c == '\r') || (c == '\n')) yes = 1; break; +#endif } ntime = time(NULL); if (ntime >= when) { From owner-svn-src-stable-8@FreeBSD.ORG Sun Nov 22 16:04:49 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B98C1065676; Sun, 22 Nov 2009 16:04:49 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6794A8FC14; Sun, 22 Nov 2009 16:04:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAMG4nM2022760; Sun, 22 Nov 2009 16:04:49 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAMG4nBE022754; Sun, 22 Nov 2009 16:04:49 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200911221604.nAMG4nBE022754@svn.freebsd.org> From: Attilio Rao Date: Sun, 22 Nov 2009 16:04:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199651 - in stable/8/sys: conf contrib/rdma/krping libkern netinet netinet/libalias X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2009 16:04:49 -0000 Author: attilio Date: Sun Nov 22 16:04:49 2009 New Revision: 199651 URL: http://svn.freebsd.org/changeset/base/199651 Log: MFC r199208, r199223: Move inet_aton() (specular to inet_ntoa(), already present in libkern) into libkern in order to made it usable by other modules than alias_proxy. Sponsored by: Sandvine Incorporated Added: stable/8/sys/libkern/inet_aton.c - copied unchanged from r199208, head/sys/libkern/inet_aton.c Modified: stable/8/sys/conf/files stable/8/sys/contrib/rdma/krping/krping.c stable/8/sys/netinet/in.h stable/8/sys/netinet/libalias/alias_proxy.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Sun Nov 22 15:57:08 2009 (r199650) +++ stable/8/sys/conf/files Sun Nov 22 16:04:49 2009 (r199651) @@ -2162,6 +2162,7 @@ libkern/iconv_converter_if.m optional li libkern/iconv_xlat.c optional libiconv libkern/iconv_xlat16.c optional libiconv libkern/index.c standard +libkern/inet_aton.c standard libkern/inet_ntoa.c standard libkern/mcount.c optional profiling-routine libkern/memcmp.c standard Modified: stable/8/sys/contrib/rdma/krping/krping.c ============================================================================== --- stable/8/sys/contrib/rdma/krping/krping.c Sun Nov 22 15:57:08 2009 (r199650) +++ stable/8/sys/contrib/rdma/krping/krping.c Sun Nov 22 16:04:49 2009 (r199651) @@ -112,109 +112,6 @@ struct krping_cb_list krping_cbs; #define RPING_BUFSIZE 128*1024 #define RPING_SQ_DEPTH 32 - -/* lifted from netinet/libalias/alias_proxy.c */ -static int inet_aton(const char *cp, struct in_addr *addr); -static int -inet_aton(cp, addr) - const char *cp; - struct in_addr *addr; -{ - u_long parts[4]; - in_addr_t val; - const char *c; - char *endptr; - int gotend, n; - - c = (const char *)cp; - n = 0; - /* - * Run through the string, grabbing numbers until - * the end of the string, or some error - */ - gotend = 0; - while (!gotend) { - unsigned long l; - - l = strtoul(c, &endptr, 0); - - if (l == ULONG_MAX || (l == 0 && endptr == c)) - return (0); - - val = (in_addr_t)l; - /* - * If the whole string is invalid, endptr will equal - * c.. this way we can make sure someone hasn't - * gone '.12' or something which would get past - * the next check. - */ - if (endptr == c) - return (0); - parts[n] = val; - c = endptr; - - /* Check the next character past the previous number's end */ - switch (*c) { - case '.' : - /* Make sure we only do 3 dots .. */ - if (n == 3) /* Whoops. Quit. */ - return (0); - n++; - c++; - break; - - case '\0': - gotend = 1; - break; - - default: - if (isspace((unsigned char)*c)) { - gotend = 1; - break; - } else - return (0); /* Invalid character, so fail */ - } - - } - - /* - * Concoct the address according to - * the number of parts specified. - */ - - switch (n) { - case 0: /* a -- 32 bits */ - /* - * Nothing is necessary here. Overflow checking was - * already done in strtoul(). - */ - break; - case 1: /* a.b -- 8.24 bits */ - if (val > 0xffffff || parts[0] > 0xff) - return (0); - val |= parts[0] << 24; - break; - - case 2: /* a.b.c -- 8.8.16 bits */ - if (val > 0xffff || parts[0] > 0xff || parts[1] > 0xff) - return (0); - val |= (parts[0] << 24) | (parts[1] << 16); - break; - - case 3: /* a.b.c.d -- 8.8.8.8 bits */ - if (val > 0xff || parts[0] > 0xff || parts[1] > 0xff || - parts[2] > 0xff) - return (0); - val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); - break; - } - - if (addr != NULL) - addr->s_addr = htonl(val); - return (1); -} - - static void krping_wait(struct krping_cb *cb, int state) { int rc; Copied: stable/8/sys/libkern/inet_aton.c (from r199208, head/sys/libkern/inet_aton.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/libkern/inet_aton.c Sun Nov 22 16:04:49 2009 (r199651, copy of r199208, head/sys/libkern/inet_aton.c) @@ -0,0 +1,136 @@ +/*- + * Copyright (c) 2001 Charles Mott + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include + +int +inet_aton(const char *cp, struct in_addr *addr) +{ + u_long parts[4]; + in_addr_t val; + const char *c; + char *endptr; + int gotend, n; + + c = (const char *)cp; + n = 0; + + /* + * Run through the string, grabbing numbers until + * the end of the string, or some error + */ + gotend = 0; + while (!gotend) { + unsigned long l; + + l = strtoul(c, &endptr, 0); + + if (l == ULONG_MAX || (l == 0 && endptr == c)) + return (0); + + val = (in_addr_t)l; + + /* + * If the whole string is invalid, endptr will equal + * c.. this way we can make sure someone hasn't + * gone '.12' or something which would get past + * the next check. + */ + if (endptr == c) + return (0); + parts[n] = val; + c = endptr; + + /* Check the next character past the previous number's end */ + switch (*c) { + case '.' : + + /* Make sure we only do 3 dots .. */ + if (n == 3) /* Whoops. Quit. */ + return (0); + n++; + c++; + break; + + case '\0': + gotend = 1; + break; + + default: + if (isspace((unsigned char)*c)) { + gotend = 1; + break; + } else { + + /* Invalid character, then fail. */ + return (0); + } + } + + } + + /* Concoct the address according to the number of parts specified. */ + switch (n) { + case 0: /* a -- 32 bits */ + + /* + * Nothing is necessary here. Overflow checking was + * already done in strtoul(). + */ + break; + case 1: /* a.b -- 8.24 bits */ + if (val > 0xffffff || parts[0] > 0xff) + return (0); + val |= parts[0] << 24; + break; + + case 2: /* a.b.c -- 8.8.16 bits */ + if (val > 0xffff || parts[0] > 0xff || parts[1] > 0xff) + return (0); + val |= (parts[0] << 24) | (parts[1] << 16); + break; + + case 3: /* a.b.c.d -- 8.8.8.8 bits */ + if (val > 0xff || parts[0] > 0xff || parts[1] > 0xff || + parts[2] > 0xff) + return (0); + val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); + break; + } + + if (addr != NULL) + addr->s_addr = htonl(val); + return (1); +} + Modified: stable/8/sys/netinet/in.h ============================================================================== --- stable/8/sys/netinet/in.h Sun Nov 22 15:57:08 2009 (r199650) +++ stable/8/sys/netinet/in.h Sun Nov 22 16:04:49 2009 (r199651) @@ -733,6 +733,7 @@ int in_broadcast(struct in_addr, struct int in_canforward(struct in_addr); int in_localaddr(struct in_addr); int in_localip(struct in_addr); +int inet_aton(const char *, struct in_addr *); /* in libkern */ char *inet_ntoa(struct in_addr); /* in libkern */ char *inet_ntoa_r(struct in_addr ina, char *buf); /* in libkern */ void in_ifdetach(struct ifnet *); Modified: stable/8/sys/netinet/libalias/alias_proxy.c ============================================================================== --- stable/8/sys/netinet/libalias/alias_proxy.c Sun Nov 22 15:57:08 2009 (r199650) +++ stable/8/sys/netinet/libalias/alias_proxy.c Sun Nov 22 16:04:49 2009 (r199651) @@ -137,9 +137,6 @@ struct proxy_entry { destination of a proxied IP packet */ -#ifdef _KERNEL /* XXX: can it be moved to libkern? */ -static int inet_aton(const char *cp, struct in_addr *addr); -#endif static int IpMask(int, struct in_addr *); static int IpAddr(char *, struct in_addr *); static int IpPort(char *, int, int *); @@ -149,107 +146,6 @@ static int RuleNumberDelete(struct libal static void ProxyEncodeTcpStream(struct alias_link *, struct ip *, int); static void ProxyEncodeIpHeader(struct ip *, int); -#ifdef _KERNEL -static int -inet_aton(cp, addr) - const char *cp; - struct in_addr *addr; -{ - u_long parts[4]; - in_addr_t val; - const char *c; - char *endptr; - int gotend, n; - - c = (const char *)cp; - n = 0; - /* - * Run through the string, grabbing numbers until - * the end of the string, or some error - */ - gotend = 0; - while (!gotend) { - unsigned long l; - - l = strtoul(c, &endptr, 0); - - if (l == ULONG_MAX || (l == 0 && endptr == c)) - return (0); - - val = (in_addr_t)l; - /* - * If the whole string is invalid, endptr will equal - * c.. this way we can make sure someone hasn't - * gone '.12' or something which would get past - * the next check. - */ - if (endptr == c) - return (0); - parts[n] = val; - c = endptr; - - /* Check the next character past the previous number's end */ - switch (*c) { - case '.' : - /* Make sure we only do 3 dots .. */ - if (n == 3) /* Whoops. Quit. */ - return (0); - n++; - c++; - break; - - case '\0': - gotend = 1; - break; - - default: - if (isspace((unsigned char)*c)) { - gotend = 1; - break; - } else - return (0); /* Invalid character, so fail */ - } - - } - - /* - * Concoct the address according to - * the number of parts specified. - */ - - switch (n) { - case 0: /* a -- 32 bits */ - /* - * Nothing is necessary here. Overflow checking was - * already done in strtoul(). - */ - break; - case 1: /* a.b -- 8.24 bits */ - if (val > 0xffffff || parts[0] > 0xff) - return (0); - val |= parts[0] << 24; - break; - - case 2: /* a.b.c -- 8.8.16 bits */ - if (val > 0xffff || parts[0] > 0xff || parts[1] > 0xff) - return (0); - val |= (parts[0] << 24) | (parts[1] << 16); - break; - - case 3: /* a.b.c.d -- 8.8.8.8 bits */ - if (val > 0xff || parts[0] > 0xff || parts[1] > 0xff || - parts[2] > 0xff) - return (0); - val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); - break; - } - - if (addr != NULL) - addr->s_addr = htonl(val); - return (1); -} -#endif - static int IpMask(int nbits, struct in_addr *mask) { From owner-svn-src-stable-8@FreeBSD.ORG Sun Nov 22 16:09:28 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 490131065670; Sun, 22 Nov 2009 16:09:28 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DE3B8FC12; Sun, 22 Nov 2009 16:09:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAMG9RNe022882; Sun, 22 Nov 2009 16:09:27 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAMG9REa022880; Sun, 22 Nov 2009 16:09:27 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200911221609.nAMG9REa022880@svn.freebsd.org> From: Attilio Rao Date: Sun, 22 Nov 2009 16:09:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199652 - stable/8/sys/fs/fifofs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2009 16:09:28 -0000 Author: attilio Date: Sun Nov 22 16:09:27 2009 New Revision: 199652 URL: http://svn.freebsd.org/changeset/base/199652 Log: MFC r199007: Fix a memory leak. Modified: stable/8/sys/fs/fifofs/fifo_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/fifofs/fifo_vnops.c ============================================================================== --- stable/8/sys/fs/fifofs/fifo_vnops.c Sun Nov 22 16:04:49 2009 (r199651) +++ stable/8/sys/fs/fifofs/fifo_vnops.c Sun Nov 22 16:09:27 2009 (r199652) @@ -78,6 +78,10 @@ struct fileops fifo_ops_f = { /* * This structure is associated with the FIFO vnode and stores * the state associated with the FIFO. + * Notes about locking: + * - fi_readsock and fi_writesock are invariant since init time. + * - fi_readers and fi_writers are vnode lock protected. + * - fi_wgen is fif_mtx lock protected. */ struct fifoinfo { struct socket *fi_readsock; @@ -215,14 +219,9 @@ fail1: } /* - * General access to fi_readers and fi_writers is protected using - * the vnode lock. - * - * Protect the increment of fi_readers and fi_writers and the - * associated calls to wakeup() with the fifo mutex in addition - * to the vnode lock. This allows the vnode lock to be dropped - * for the msleep() calls below, and using the fifo mutex with - * msleep() prevents the wakeup from being missed. + * Use the fifo_mtx lock here, in addition to the vnode lock, + * in order to allow vnode lock dropping before msleep() calls + * and still avoiding missed wakeups. */ mtx_lock(&fifo_mtx); if (ap->a_mode & FREAD) { @@ -241,6 +240,8 @@ fail1: if (ap->a_mode & FWRITE) { if ((ap->a_mode & O_NONBLOCK) && fip->fi_readers == 0) { mtx_unlock(&fifo_mtx); + if (fip->fi_writers == 0) + fifo_cleanup(vp); return (ENXIO); } fip->fi_writers++; From owner-svn-src-stable-8@FreeBSD.ORG Sun Nov 22 16:11:20 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBF2B106566C; Sun, 22 Nov 2009 16:11:20 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA6BF8FC1B; Sun, 22 Nov 2009 16:11:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAMGBKsp022982; Sun, 22 Nov 2009 16:11:20 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAMGBKpO022980; Sun, 22 Nov 2009 16:11:20 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200911221611.nAMGBKpO022980@svn.freebsd.org> From: Attilio Rao Date: Sun, 22 Nov 2009 16:11:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199653 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2009 16:11:21 -0000 Author: attilio Date: Sun Nov 22 16:11:20 2009 New Revision: 199653 URL: http://svn.freebsd.org/changeset/base/199653 Log: MFC r199008: Track lockmgr_disown() in the stack. Modified: stable/8/sys/kern/kern_lock.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/kern_lock.c ============================================================================== --- stable/8/sys/kern/kern_lock.c Sun Nov 22 16:09:27 2009 (r199652) +++ stable/8/sys/kern/kern_lock.c Sun Nov 22 16:11:20 2009 (r199653) @@ -1083,6 +1083,7 @@ _lockmgr_disown(struct lock *lk, const c LOCK_LOG_LOCK("XDISOWN", &lk->lock_object, 0, 0, file, line); WITNESS_UNLOCK(&lk->lock_object, LOP_EXCLUSIVE, file, line); TD_LOCKS_DEC(curthread); + STACK_SAVE(lk); /* * In order to preserve waiters flags, just spin. From owner-svn-src-stable-8@FreeBSD.ORG Sun Nov 22 16:13:16 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B661D106566B; Sun, 22 Nov 2009 16:13:16 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A497F8FC08; Sun, 22 Nov 2009 16:13:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAMGDGkk023060; Sun, 22 Nov 2009 16:13:16 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAMGDGtb023058; Sun, 22 Nov 2009 16:13:16 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200911221613.nAMGDGtb023058@svn.freebsd.org> From: Attilio Rao Date: Sun, 22 Nov 2009 16:13:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199654 - stable/8/usr.bin/kdump X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2009 16:13:16 -0000 Author: attilio Date: Sun Nov 22 16:13:16 2009 New Revision: 199654 URL: http://svn.freebsd.org/changeset/base/199654 Log: MFC r199024: Use a safety belt for cases where corrupted narg can be passed to the ktrsyscall(). Modified: stable/8/usr.bin/kdump/kdump.c Directory Properties: stable/8/usr.bin/kdump/ (props changed) Modified: stable/8/usr.bin/kdump/kdump.c ============================================================================== --- stable/8/usr.bin/kdump/kdump.c Sun Nov 22 16:11:20 2009 (r199653) +++ stable/8/usr.bin/kdump/kdump.c Sun Nov 22 16:13:16 2009 (r199654) @@ -799,7 +799,7 @@ ktrsyscall(struct ktr_syscall *ktr) narg--; } } - while (narg) { + while (narg > 0) { print_number(ip,narg,c); } (void)putchar(')'); From owner-svn-src-stable-8@FreeBSD.ORG Sun Nov 22 17:05:46 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A20941065672; Sun, 22 Nov 2009 17:05:46 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 902588FC13; Sun, 22 Nov 2009 17:05:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAMH5khn024225; Sun, 22 Nov 2009 17:05:46 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAMH5kP4024222; Sun, 22 Nov 2009 17:05:46 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <200911221705.nAMH5kP4024222@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 22 Nov 2009 17:05:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199656 - in stable/8/lib/libc: net nls X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2009 17:05:46 -0000 Author: ume Date: Sun Nov 22 17:05:46 2009 New Revision: 199656 URL: http://svn.freebsd.org/changeset/base/199656 Log: MFC r199083: Add NLS catalogs support to gai_strerror(3). Controlled by NLS define. Modified: stable/8/lib/libc/net/gai_strerror.c stable/8/lib/libc/nls/C.msg Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/net/gai_strerror.c ============================================================================== --- stable/8/lib/libc/net/gai_strerror.c Sun Nov 22 16:51:44 2009 (r199655) +++ stable/8/lib/libc/net/gai_strerror.c Sun Nov 22 17:05:46 2009 (r199656) @@ -30,7 +30,17 @@ #include __FBSDID("$FreeBSD$"); +#include "namespace.h" #include +#if defined(NLS) +#include +#include +#include +#include +#include +#include "reentrant.h" +#endif +#include "un-namespace.h" /* Entries EAI_ADDRFAMILY (1) and EAI_NODATA (7) are obsoleted, but left */ /* for backward compatibility with userland code prior to 2553bis-02 */ @@ -52,9 +62,57 @@ static const char *ai_errlist[] = { "Argument buffer overflow" /* EAI_OVERFLOW */ }; +#if defined(NLS) +static char gai_buf[NL_TEXTMAX]; +static once_t gai_init_once = ONCE_INITIALIZER; +static thread_key_t gai_key; +static int gai_keycreated = 0; + +static void +gai_keycreate(void) +{ + gai_keycreated = (thr_keycreate(&gai_key, free) == 0); +} +#endif + const char * gai_strerror(int ecode) { +#if defined(NLS) + nl_catd catd; + char *buf; + + if (thr_main() != 0) + buf = gai_buf; + else { + if (thr_once(&gai_init_once, gai_keycreate) != 0 || + !gai_keycreated) + goto thr_err; + if ((buf = thr_getspecific(gai_key)) == NULL) { + if ((buf = malloc(sizeof(gai_buf))) == NULL) + goto thr_err; + if (thr_setspecific(gai_key, buf) != 0) { + free(buf); + goto thr_err; + } + } + } + + catd = catopen("libc", NL_CAT_LOCALE); + if (ecode > 0 && ecode < EAI_MAX) + strlcpy(buf, catgets(catd, 3, ecode, ai_errlist[ecode]), + sizeof(gai_buf)); + else if (ecode == 0) + strlcpy(buf, catgets(catd, 3, NL_MSGMAX - 1, "Success"), + sizeof(gai_buf)); + else + strlcpy(buf, catgets(catd, 3, NL_MSGMAX, "Unknown error"), + sizeof(gai_buf)); + catclose(catd); + return buf; + +thr_err: +#endif if (ecode >= 0 && ecode < EAI_MAX) return ai_errlist[ecode]; return "Unknown error"; Modified: stable/8/lib/libc/nls/C.msg ============================================================================== --- stable/8/lib/libc/nls/C.msg Sun Nov 22 16:51:44 2009 (r199655) +++ stable/8/lib/libc/nls/C.msg Sun Nov 22 17:05:46 2009 (r199656) @@ -247,3 +247,39 @@ $ SIGUSR1 30 User defined signal 1 $ SIGUSR2 31 User defined signal 2 +$ +$ gai_strerror() support catalog +$ +$set 3 +$ 1 (obsolete) +1 Address family for hostname not supported +$ EAI_AGAIN +2 Temporary failure in name resolution +$ EAI_BADFLAGS +3 Invalid value for ai_flags +$ EAI_FAIL +4 Non-recoverable failure in name resolution +$ EAI_FAMILY +5 ai_family not supported +$ EAI_MEMORY +6 Memory allocation failure +$ 7 (obsolete) +7 No address associated with hostname +$ EAI_NONAME +8 hostname nor servname provided, or not known +$ EAI_SERVICE +9 servname not supported for ai_socktype +$ EAI_SOCKTYPE +10 ai_socktype not supported +$ EAI_SYSTEM +11 System error returned in errno +$ EAI_BADHINTS +12 Invalid value for hints +$ EAI_PROTOCOL +13 Resolved protocol is unknown +$ EAI_OVERFLOW +14 Argument buffer overflow +$ 0 +32766 Success +$ NL_MSGMAX +32767 Unknown error From owner-svn-src-stable-8@FreeBSD.ORG Sun Nov 22 17:08:53 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15D781065670; Sun, 22 Nov 2009 17:08:53 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DEBD98FC1D; Sun, 22 Nov 2009 17:08:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAMH8qv1024319; Sun, 22 Nov 2009 17:08:52 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAMH8qQu024316; Sun, 22 Nov 2009 17:08:52 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <200911221708.nAMH8qQu024316@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 22 Nov 2009 17:08:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199657 - stable/8/lib/libc/nls X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2009 17:08:53 -0000 Author: ume Date: Sun Nov 22 17:08:52 2009 New Revision: 199657 URL: http://svn.freebsd.org/changeset/base/199657 Log: MFC r199092: Add gai_strerror() catalog for ja_JP.UTF-8 and ja_JP.eucJP. Modified: stable/8/lib/libc/nls/ja_JP.UTF-8.msg stable/8/lib/libc/nls/ja_JP.eucJP.msg Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/nls/ja_JP.UTF-8.msg ============================================================================== --- stable/8/lib/libc/nls/ja_JP.UTF-8.msg Sun Nov 22 17:05:46 2009 (r199656) +++ stable/8/lib/libc/nls/ja_JP.UTF-8.msg Sun Nov 22 17:08:52 2009 (r199657) @@ -247,3 +247,39 @@ $ SIGUSR1 30 ユーザ定義シグナル 1 $ SIGUSR2 31 ユーザ定義シグナル 2 +$ +$ gai_strerror() support catalog +$ +$set 3 +$ 1 (obsolete) +1 ホスト名のアドレスファミリーはサポートされません +$ EAI_AGAIN +2 名前解決での一時的な失敗 +$ EAI_BADFLAGS +3 ai_flags の値が無効 +$ EAI_FAIL +4 名前解決での回復不能な失敗 +$ EAI_FAMILY +5 ai_family はサポートされません +$ EAI_MEMORY +6 メモリ割り当て失敗 +$ 7 (obsolete) +7 ホスト名に対応するアドレスはありません +$ EAI_NONAME +8 ホスト名かサービス名が指定されない、または不明 +$ EAI_SERVICE +9 サービス名は ai_socktype に対してサポートされません +$ EAI_SOCKTYPE +10 ai_socktype はサポートされません +$ EAI_SYSTEM +11 システムエラー、errno 参照 +$ EAI_BADHINTS +12 hints の値が無効 +$ EAI_PROTOCOL +13 解決されたプロトコルは不明です +$ EAI_OVERFLOW +14 引数バッファオーバフロー +$ 0 +32766 成功 +$ NL_MSGMAX +32767 不明なエラー Modified: stable/8/lib/libc/nls/ja_JP.eucJP.msg ============================================================================== --- stable/8/lib/libc/nls/ja_JP.eucJP.msg Sun Nov 22 17:05:46 2009 (r199656) +++ stable/8/lib/libc/nls/ja_JP.eucJP.msg Sun Nov 22 17:08:52 2009 (r199657) @@ -247,3 +247,39 @@ $ SIGUSR1 30 桼ʥ 1 $ SIGUSR2 31 桼ʥ 2 +$ +$ gai_strerror() support catalog +$ +$set 3 +$ 1 (obsolete) +1 ۥ̾Υɥ쥹եߥ꡼ϥݡȤޤ +$ EAI_AGAIN +2 ̾ǤΰŪʼ +$ EAI_BADFLAGS +3 ai_flags ̵ͤ +$ EAI_FAIL +4 ̾Ǥβǽʼ +$ EAI_FAMILY +5 ai_family ϥݡȤޤ +$ EAI_MEMORY +6 Ƽ +$ 7 (obsolete) +7 ۥ̾б륢ɥ쥹Ϥޤ +$ EAI_NONAME +8 ۥ̾ӥ̾ꤵʤޤ +$ EAI_SERVICE +9 ӥ̾ ai_socktype ФƥݡȤޤ +$ EAI_SOCKTYPE +10 ai_socktype ϥݡȤޤ +$ EAI_SYSTEM +11 ƥ२顼errno +$ EAI_BADHINTS +12 hints ̵ͤ +$ EAI_PROTOCOL +13 褵줿ץȥǤ +$ EAI_OVERFLOW +14 ХåեХե +$ 0 +32766 +$ NL_MSGMAX +32767 ʥ顼 From owner-svn-src-stable-8@FreeBSD.ORG Sun Nov 22 17:16:38 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 209AC1065670; Sun, 22 Nov 2009 17:16:38 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F69C8FC08; Sun, 22 Nov 2009 17:16:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAMHGb4q024535; Sun, 22 Nov 2009 17:16:37 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAMHGbKK024532; Sun, 22 Nov 2009 17:16:37 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <200911221716.nAMHGbKK024532@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 22 Nov 2009 17:16:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199658 - stable/8/usr.bin/systat X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2009 17:16:38 -0000 Author: ume Date: Sun Nov 22 17:16:37 2009 New Revision: 199658 URL: http://svn.freebsd.org/changeset/base/199658 Log: MFC r199242: Use ncursesw to output the date field of vmstat display with multi-byte string, correctly. Modified: stable/8/usr.bin/systat/Makefile stable/8/usr.bin/systat/main.c Directory Properties: stable/8/usr.bin/systat/ (props changed) Modified: stable/8/usr.bin/systat/Makefile ============================================================================== --- stable/8/usr.bin/systat/Makefile Sun Nov 22 17:08:52 2009 (r199657) +++ stable/8/usr.bin/systat/Makefile Sun Nov 22 17:16:37 2009 (r199658) @@ -15,6 +15,6 @@ CFLAGS+= -DINET6 .endif DPADD= ${LIBCURSES} ${LIBM} ${LIBDEVSTAT} ${LIBKVM} -LDADD= -lcurses -lm -ldevstat -lkvm +LDADD= -lcursesw -lm -ldevstat -lkvm .include Modified: stable/8/usr.bin/systat/main.c ============================================================================== --- stable/8/usr.bin/systat/main.c Sun Nov 22 17:08:52 2009 (r199657) +++ stable/8/usr.bin/systat/main.c Sun Nov 22 17:16:37 2009 (r199658) @@ -87,7 +87,7 @@ main(int argc, char **argv) char errbuf[_POSIX2_LINE_MAX], dummy; size_t size; - (void) setlocale(LC_TIME, ""); + (void) setlocale(LC_ALL, ""); argc--, argv++; while (argc > 0) { From owner-svn-src-stable-8@FreeBSD.ORG Sun Nov 22 17:25:11 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 987BC106566C; Sun, 22 Nov 2009 17:25:11 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D2798FC13; Sun, 22 Nov 2009 17:25:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAMHPBd3024767; Sun, 22 Nov 2009 17:25:11 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAMHPBaf024763; Sun, 22 Nov 2009 17:25:11 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <200911221725.nAMHPBaf024763@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 22 Nov 2009 17:25:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199659 - stable/8/share/timedef X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2009 17:25:11 -0000 Author: ume Date: Sun Nov 22 17:25:11 2009 New Revision: 199659 URL: http://svn.freebsd.org/changeset/base/199659 Log: MFC r199179, r199271: - Add unit to the short month names for Japanese locales. Without unit, the output of the application like ls(1) is complicated. - Since %b contains unit, %b is not suitable for c_fmt, now. Use %_m instead. Modified: stable/8/share/timedef/ja_JP.SJIS.src stable/8/share/timedef/ja_JP.UTF-8.src stable/8/share/timedef/ja_JP.eucJP.src Directory Properties: stable/8/share/timedef/ (props changed) Modified: stable/8/share/timedef/ja_JP.SJIS.src ============================================================================== --- stable/8/share/timedef/ja_JP.SJIS.src Sun Nov 22 17:16:37 2009 (r199658) +++ stable/8/share/timedef/ja_JP.SJIS.src Sun Nov 22 17:25:11 2009 (r199659) @@ -5,18 +5,18 @@ # # Short month names # - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +10 +11 +12 # # Long month names (as in a date) # @@ -65,7 +65,7 @@ # # just following tradition... # %a %b %e %H:%M:%S %Y -%a %b/%e %T %Y +%a %_m/%e %T %Y # # am # Modified: stable/8/share/timedef/ja_JP.UTF-8.src ============================================================================== --- stable/8/share/timedef/ja_JP.UTF-8.src Sun Nov 22 17:16:37 2009 (r199658) +++ stable/8/share/timedef/ja_JP.UTF-8.src Sun Nov 22 17:25:11 2009 (r199659) @@ -4,18 +4,18 @@ # WARNING: empty lines are essential too # # Short month names - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 + 1月 + 2月 + 3月 + 4月 + 5月 + 6月 + 7月 + 8月 + 9月 +10月 +11月 +12月 # # Long month names (as in a date) # @@ -64,7 +64,7 @@ # # just following tradition... # %a %b %e %H:%M:%S %Y -%a %b/%e %T %Y +%a %_m/%e %T %Y # # am # Modified: stable/8/share/timedef/ja_JP.eucJP.src ============================================================================== --- stable/8/share/timedef/ja_JP.eucJP.src Sun Nov 22 17:16:37 2009 (r199658) +++ stable/8/share/timedef/ja_JP.eucJP.src Sun Nov 22 17:25:11 2009 (r199659) @@ -4,18 +4,18 @@ # WARNING: empty lines are essential too # # Short month names - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +10 +11 +12 # # Long month names (as in a date) # @@ -64,7 +64,7 @@ # # just following tradition... # %a %b %e %H:%M:%S %Y -%a %b/%e %T %Y +%a %_m/%e %T %Y # # am # From owner-svn-src-stable-8@FreeBSD.ORG Sun Nov 22 22:07:54 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C266106566B; Sun, 22 Nov 2009 22:07:54 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id 4FD4E8FC19; Sun, 22 Nov 2009 22:07:52 +0000 (UTC) Received: by bwz5 with SMTP id 5so4912264bwz.3 for ; Sun, 22 Nov 2009 14:07:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=hGp8b+hi9cNVy+tQxZjXd4BdQQDp039kPgtr3fum1Hg=; b=kaFJg6e6YUvwTOK9jwWgt8zSj7vyRltVHgpUpaBdSXSOTN1EuiPyAkdeeV5HyJb25h /NswNNQEvm4W6VrE1eNQePCfueMwaX1U5J3RdnUNx9GYnb346yD1ISNKCW2daMq3mfsy ixSbZRC8ft+o119Oo0fPdYsmkXKuDOzKQfZpA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=lO5Wo8oCk1lnhDHnj6/j28nHXIQhlNnqEaeXINJeHgWFreryoH26C2SR/6biaw/JL/ BRdICAe7iPIK6ljoHWunZztP3GIMP8aSoKBtnlZ9YUbxP+JMq2w+3pGSKYe3mupOT1Dm RGrGSKphjy21iM0UgC6iGFD6lxJAjgpVag/Gk= MIME-Version: 1.0 Received: by 10.204.154.216 with SMTP id p24mr4005862bkw.16.1258927672003; Sun, 22 Nov 2009 14:07:52 -0800 (PST) In-Reply-To: <200911221609.nAMG9REa022880@svn.freebsd.org> References: <200911221609.nAMG9REa022880@svn.freebsd.org> Date: Sun, 22 Nov 2009 22:07:51 +0000 Message-ID: <6101e8c40911221407w54fbac5bn590b8c21c37ced11@mail.gmail.com> From: Oliver Pinter To: Attilio Rao Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r199652 - stable/8/sys/fs/fifofs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2009 22:07:54 -0000 this for 7-STABLE? On 11/22/09, Attilio Rao wrote: > Author: attilio > Date: Sun Nov 22 16:09:27 2009 > New Revision: 199652 > URL: http://svn.freebsd.org/changeset/base/199652 > > Log: > MFC r199007: > Fix a memory leak. > > Modified: > stable/8/sys/fs/fifofs/fifo_vnops.c > Directory Properties: > stable/8/sys/ (props changed) > stable/8/sys/amd64/include/xen/ (props changed) > stable/8/sys/cddl/contrib/opensolaris/ (props changed) > stable/8/sys/contrib/dev/acpica/ (props changed) > stable/8/sys/contrib/pf/ (props changed) > stable/8/sys/dev/xen/xenpci/ (props changed) > > Modified: stable/8/sys/fs/fifofs/fifo_vnops.c > ============================================================================== > --- stable/8/sys/fs/fifofs/fifo_vnops.c Sun Nov 22 16:04:49 2009 (r199651) > +++ stable/8/sys/fs/fifofs/fifo_vnops.c Sun Nov 22 16:09:27 2009 (r199652) > @@ -78,6 +78,10 @@ struct fileops fifo_ops_f = { > /* > * This structure is associated with the FIFO vnode and stores > * the state associated with the FIFO. > + * Notes about locking: > + * - fi_readsock and fi_writesock are invariant since init time. > + * - fi_readers and fi_writers are vnode lock protected. > + * - fi_wgen is fif_mtx lock protected. > */ > struct fifoinfo { > struct socket *fi_readsock; > @@ -215,14 +219,9 @@ fail1: > } > > /* > - * General access to fi_readers and fi_writers is protected using > - * the vnode lock. > - * > - * Protect the increment of fi_readers and fi_writers and the > - * associated calls to wakeup() with the fifo mutex in addition > - * to the vnode lock. This allows the vnode lock to be dropped > - * for the msleep() calls below, and using the fifo mutex with > - * msleep() prevents the wakeup from being missed. > + * Use the fifo_mtx lock here, in addition to the vnode lock, > + * in order to allow vnode lock dropping before msleep() calls > + * and still avoiding missed wakeups. > */ > mtx_lock(&fifo_mtx); > if (ap->a_mode & FREAD) { > @@ -241,6 +240,8 @@ fail1: > if (ap->a_mode & FWRITE) { > if ((ap->a_mode & O_NONBLOCK) && fip->fi_readers == 0) { > mtx_unlock(&fifo_mtx); > + if (fip->fi_writers == 0) > + fifo_cleanup(vp); > return (ENXIO); > } > fip->fi_writers++; > _______________________________________________ > svn-src-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-stable > To unsubscribe, send any mail to "svn-src-stable-unsubscribe@freebsd.org" > From owner-svn-src-stable-8@FreeBSD.ORG Sun Nov 22 22:09:52 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9567E106566B; Sun, 22 Nov 2009 22:09:52 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id 73F228FC16; Sun, 22 Nov 2009 22:09:51 +0000 (UTC) Received: by bwz5 with SMTP id 5so4912971bwz.3 for ; Sun, 22 Nov 2009 14:09:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=wFnoUz9INiv/W6/pPvaX3xvXLsB7/GVlcav9p8RHeFU=; b=x8+NbD3hQNAzsXP5ojURZehjY3zbEp/kor0H+dQabIkK0txTq/ZjEIjvJOavSbx5/B vUEkoTxNEcdZ8bSrBu7ybC7NpnaLi36ioyI0zTIXRzCCYCM7cbVap1hkn47WBar3z8XJ MofTfbefxFjNGQNZ3tIDFWcIfGqBwXpQwP9Uw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=uHnnEti4MAA1UALTioLqtpjP/Xfl1GPgqUvibpmP06jxIQyl7viDgMW9rql/QoqzBa ZoQhFQI5yMtKqqf/BKXrUeT91yhPzCGb7zNTfsjCG0mEY3wBECQqc37UVhEwD+G8q+pB owg30pqXIV+Q0sXobJNKe3b0NqS9NsTLkwxio= MIME-Version: 1.0 Received: by 10.204.7.87 with SMTP id c23mr3892574bkc.97.1258927790587; Sun, 22 Nov 2009 14:09:50 -0800 (PST) In-Reply-To: <200911221553.nAMFrd8K022397@svn.freebsd.org> References: <200911221553.nAMFrd8K022397@svn.freebsd.org> Date: Sun, 22 Nov 2009 22:09:50 +0000 Message-ID: <6101e8c40911221409j2a5af5e1ja6de3f0712c07f8d@mail.gmail.com> From: Oliver Pinter To: Attilio Rao Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r199649 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2009 22:09:52 -0000 and this too for 7-STABLE On 11/22/09, Attilio Rao wrote: > Author: attilio > Date: Sun Nov 22 15:53:39 2009 > New Revision: 199649 > URL: http://svn.freebsd.org/changeset/base/199649 > > Log: > MFC r199209: > Fix a potential buffer boundaries overflow in devclass_add_device() by > using all available int lenghts digits for storing the information. > > Sponsored by: Sandvine Incorporated > > Modified: > stable/8/sys/kern/subr_bus.c > Directory Properties: > stable/8/sys/ (props changed) > stable/8/sys/amd64/include/xen/ (props changed) > stable/8/sys/cddl/contrib/opensolaris/ (props changed) > stable/8/sys/contrib/dev/acpica/ (props changed) > stable/8/sys/contrib/pf/ (props changed) > stable/8/sys/dev/xen/xenpci/ (props changed) > > Modified: stable/8/sys/kern/subr_bus.c > ============================================================================== > --- stable/8/sys/kern/subr_bus.c Sun Nov 22 14:32:32 2009 (r199648) > +++ stable/8/sys/kern/subr_bus.c Sun Nov 22 15:53:39 2009 (r199649) > @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -1584,7 +1585,7 @@ devclass_add_device(devclass_t dc, devic > > PDEBUG(("%s in devclass %s", DEVICENAME(dev), DEVCLANAME(dc))); > > - buflen = snprintf(NULL, 0, "%s%d$", dc->name, dev->unit); > + buflen = snprintf(NULL, 0, "%s%d$", dc->name, INT_MAX); > if (buflen < 0) > return (ENOMEM); > dev->nameunit = malloc(buflen, M_BUS, M_NOWAIT|M_ZERO); > _______________________________________________ > svn-src-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-stable > To unsubscribe, send any mail to "svn-src-stable-unsubscribe@freebsd.org" > From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 23 08:45:17 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8F071065694; Mon, 23 Nov 2009 08:45:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9588E8FC0A; Mon, 23 Nov 2009 08:45:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAN8jHXG046278; Mon, 23 Nov 2009 08:45:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAN8jHag046263; Mon, 23 Nov 2009 08:45:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911230845.nAN8jHag046263@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Nov 2009 08:45:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199696 - in stable/8/sys: arm/mv dev/ata dev/ata/chipsets X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2009 08:45:17 -0000 Author: mav Date: Mon Nov 23 08:45:17 2009 New Revision: 199696 URL: http://svn.freebsd.org/changeset/base/199696 Log: MFC r198717: - Remove most of direct relations between ATA(4) peripherial and controller levels. It makes logic more transparent and is a mandatory step to wrap ATA(4) controller level into ATA-native CAM SIM. - Tune AHCI and SATA2 SiI drivers memory allocation a bit to allow bigger I/O transaction sizes without additional cost. Modified: stable/8/sys/arm/mv/mv_sata.c stable/8/sys/dev/ata/ata-all.c stable/8/sys/dev/ata/ata-all.h stable/8/sys/dev/ata/ata-dma.c stable/8/sys/dev/ata/ata-lowlevel.c stable/8/sys/dev/ata/ata-pci.c stable/8/sys/dev/ata/ata-queue.c stable/8/sys/dev/ata/ata-sata.c stable/8/sys/dev/ata/chipsets/ata-ahci.c stable/8/sys/dev/ata/chipsets/ata-intel.c stable/8/sys/dev/ata/chipsets/ata-marvell.c stable/8/sys/dev/ata/chipsets/ata-promise.c stable/8/sys/dev/ata/chipsets/ata-serverworks.c stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/arm/mv/mv_sata.c ============================================================================== --- stable/8/sys/arm/mv/mv_sata.c Mon Nov 23 07:49:50 2009 (r199695) +++ stable/8/sys/arm/mv/mv_sata.c Mon Nov 23 08:45:17 2009 (r199696) @@ -548,14 +548,16 @@ sata_channel_begin_transaction(struct at uint32_t req_in; int error, slot; - sc = device_get_softc(GRANDPARENT(request->dev)); + sc = device_get_softc(device_get_parent(request->parent)); ch = device_get_softc(request->parent); mtx_assert(&ch->state_mtx, MA_OWNED); /* Only DMA R/W goes through the EDMA machine. */ if (request->u.ata.command != ATA_READ_DMA && - request->u.ata.command != ATA_WRITE_DMA) { + request->u.ata.command != ATA_WRITE_DMA && + request->u.ata.command != ATA_READ_DMA48 && + request->u.ata.command != ATA_WRITE_DMA48) { /* Disable EDMA before accessing legacy registers */ if (sata_edma_is_running(request->parent)) { @@ -569,12 +571,9 @@ sata_channel_begin_transaction(struct at return (ata_begin_transaction(request)); } - /* Check for 48 bit access and convert if needed */ - ata_modify_if_48bit(request); - /* Prepare data for DMA */ if ((error = ch->dma.load(request, NULL, NULL))) { - device_printf(request->dev, "setting up DMA failed!\n"); + device_printf(request->parent, "setting up DMA failed!\n"); request->result = error; return ATA_OP_FINISHED; } @@ -633,7 +632,7 @@ sata_channel_end_transaction(struct ata_ uint32_t res_in, res_out, icr; int slot; - sc = device_get_softc(GRANDPARENT(request->dev)); + sc = device_get_softc(device_get_parent(request->parent)); ch = device_get_softc(request->parent); mtx_assert(&ch->state_mtx, MA_OWNED); Modified: stable/8/sys/dev/ata/ata-all.c ============================================================================== --- stable/8/sys/dev/ata/ata-all.c Mon Nov 23 07:49:50 2009 (r199695) +++ stable/8/sys/dev/ata/ata-all.c Mon Nov 23 08:45:17 2009 (r199696) @@ -798,10 +798,10 @@ ata_default_registers(device_t dev) void ata_modify_if_48bit(struct ata_request *request) { - struct ata_channel *ch = device_get_softc(device_get_parent(request->dev)); + struct ata_channel *ch = device_get_softc(request->parent); struct ata_device *atadev = device_get_softc(request->dev); - atadev->flags &= ~ATA_D_48BIT_ACTIVE; + request->flags &= ~ATA_R_48BIT; if (((request->u.ata.lba + request->u.ata.count) >= ATA_MAX_28BIT_LBA || request->u.ata.count > 256) && @@ -875,7 +875,7 @@ ata_modify_if_48bit(struct ata_request * default: return; } - atadev->flags |= ATA_D_48BIT_ACTIVE; + request->flags |= ATA_R_48BIT; } else if (atadev->param.support.command2 & ATA_SUPPORT_ADDRESS48) { @@ -893,7 +893,7 @@ ata_modify_if_48bit(struct ata_request * default: return; } - atadev->flags |= ATA_D_48BIT_ACTIVE; + request->flags |= ATA_R_48BIT; } } Modified: stable/8/sys/dev/ata/ata-all.h ============================================================================== --- stable/8/sys/dev/ata/ata-all.h Mon Nov 23 07:49:50 2009 (r199695) +++ stable/8/sys/dev/ata/ata-all.h Mon Nov 23 08:45:17 2009 (r199696) @@ -255,7 +255,7 @@ #define ATA_AHCI_CL_OFFSET 0 #define ATA_AHCI_FB_OFFSET (ATA_AHCI_CL_SIZE * 32) #define ATA_AHCI_CT_OFFSET (ATA_AHCI_FB_OFFSET + 4096) -#define ATA_AHCI_CT_SIZE (1024 + 128) +#define ATA_AHCI_CT_SIZE (2176 + 128) struct ata_ahci_dma_prd { u_int64_t dba; @@ -269,7 +269,7 @@ struct ata_ahci_cmd_tab { u_int8_t cfis[64]; u_int8_t acmd[32]; u_int8_t reserved[32]; -#define ATA_AHCI_DMA_ENTRIES 64 +#define ATA_AHCI_DMA_ENTRIES 129 struct ata_ahci_dma_prd prd_tab[ATA_AHCI_DMA_ENTRIES]; } __packed; @@ -368,6 +368,7 @@ struct ata_composite { struct ata_request { device_t dev; /* device handle */ device_t parent; /* channel handle */ + int unit; /* physical unit */ union { struct { u_int8_t command; /* command reg */ @@ -393,6 +394,7 @@ struct ata_request { #define ATA_R_DMA 0x00000010 #define ATA_R_QUIET 0x00000020 #define ATA_R_TIMEOUT 0x00000040 +#define ATA_R_48BIT 0x00000080 #define ATA_R_ORDERED 0x00000100 #define ATA_R_AT_HEAD 0x00000200 @@ -400,6 +402,9 @@ struct ata_request { #define ATA_R_THREAD 0x00000800 #define ATA_R_DIRECT 0x00001000 +#define ATA_R_ATAPI16 0x00010000 +#define ATA_R_ATAPI_INTR 0x00020000 + #define ATA_R_DEBUG 0x10000000 #define ATA_R_DANGER1 0x20000000 #define ATA_R_DANGER2 0x40000000 @@ -427,7 +432,7 @@ struct ata_request { #define ATA_DEBUG_RQ(request, string) \ { \ if (request->flags & ATA_R_DEBUG) \ - device_printf(request->dev, "req=%p %s " string "\n", \ + device_printf(request->parent, "req=%p %s " string "\n", \ request, ata_cmd2str(request)); \ } #else @@ -453,7 +458,6 @@ struct ata_device { #define ATA_D_USE_CHS 0x0001 #define ATA_D_MEDIA_CHANGED 0x0002 #define ATA_D_ENC_PRESENT 0x0004 -#define ATA_D_48BIT_ACTIVE 0x0008 }; /* structure for holding DMA Physical Region Descriptors (PRD) entries */ @@ -487,7 +491,7 @@ struct ata_dma { u_int8_t *work; /* workspace */ bus_addr_t work_bus; /* bus address of dmatab */ -#define ATA_DMA_SLOTS 32 +#define ATA_DMA_SLOTS 1 int dma_slots; /* DMA slots allocated */ struct ata_dmaslot slot[ATA_DMA_SLOTS]; u_int32_t alignment; /* DMA SG list alignment */ Modified: stable/8/sys/dev/ata/ata-dma.c ============================================================================== --- stable/8/sys/dev/ata/ata-dma.c Mon Nov 23 07:49:50 2009 (r199695) +++ stable/8/sys/dev/ata/ata-dma.c Mon Nov 23 08:45:17 2009 (r199696) @@ -78,7 +78,7 @@ ata_dmainit(device_t dev) ch->dma.segsize = 65536; ch->dma.max_iosize = 128 * DEV_BSIZE; ch->dma.max_address = BUS_SPACE_MAXADDR_32BIT; - ch->dma.dma_slots = 6; + ch->dma.dma_slots = 1; if (bus_dma_tag_create(bus_get_dma_tag(dev), ch->dma.alignment, 0, ch->dma.max_address, BUS_SPACE_MAXADDR, @@ -256,37 +256,36 @@ static int ata_dmaload(struct ata_request *request, void *addr, int *entries) { struct ata_channel *ch = device_get_softc(request->parent); - struct ata_device *atadev = device_get_softc(request->dev); struct ata_dmasetprd_args dspa; int error; ATA_DEBUG_RQ(request, "dmaload"); if (request->dma) { - device_printf(request->dev, + device_printf(request->parent, "FAILURE - already active DMA on this device\n"); return EIO; } if (!request->bytecount) { - device_printf(request->dev, + device_printf(request->parent, "FAILURE - zero length DMA transfer attempted\n"); return EIO; } if (request->bytecount & (ch->dma.alignment - 1)) { - device_printf(request->dev, + device_printf(request->parent, "FAILURE - odd-sized DMA transfer attempt %d %% %d\n", request->bytecount, ch->dma.alignment); return EIO; } if (request->bytecount > ch->dma.max_iosize) { - device_printf(request->dev, + device_printf(request->parent, "FAILURE - oversized DMA transfer attempt %d > %d\n", request->bytecount, ch->dma.max_iosize); return EIO; } - /* set our slot, unit for simplicity XXX SOS NCQ will change that */ - request->dma = &ch->dma.slot[atadev->unit]; + /* set our slot. XXX SOS NCQ will change that */ + request->dma = &ch->dma.slot[0]; if (addr) dspa.dmatab = addr; @@ -297,7 +296,7 @@ ata_dmaload(struct ata_request *request, request->data, request->bytecount, ch->dma.setprd, &dspa, BUS_DMA_NOWAIT)) || (error = dspa.error)) { - device_printf(request->dev, "FAILURE - load data\n"); + device_printf(request->parent, "FAILURE - load data\n"); goto error; } Modified: stable/8/sys/dev/ata/ata-lowlevel.c ============================================================================== --- stable/8/sys/dev/ata/ata-lowlevel.c Mon Nov 23 07:49:50 2009 (r199695) +++ stable/8/sys/dev/ata/ata-lowlevel.c Mon Nov 23 08:45:17 2009 (r199696) @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); /* prototypes */ static int ata_generic_status(device_t dev); -static int ata_wait(struct ata_channel *ch, struct ata_device *, u_int8_t); +static int ata_wait(struct ata_channel *ch, int unit, u_int8_t); static void ata_pio_read(struct ata_request *, int); static void ata_pio_write(struct ata_request *, int); static void ata_tf_read(struct ata_request *); @@ -77,7 +77,6 @@ int ata_begin_transaction(struct ata_request *request) { struct ata_channel *ch = device_get_softc(request->parent); - struct ata_device *atadev = device_get_softc(request->dev); int dummy, error; ATA_DEBUG_RQ(request, "begin transaction"); @@ -88,9 +87,6 @@ ata_begin_transaction(struct ata_request (ATA_R_ATAPI | ATA_R_DMA | ATA_R_WRITE))) request->flags &= ~ATA_R_DMA; - /* check for 48 bit access and convert if needed */ - ata_modify_if_48bit(request); - switch (request->flags & (ATA_R_ATAPI | ATA_R_DMA)) { /* ATA PIO data transfer and control commands */ @@ -101,7 +97,7 @@ ata_begin_transaction(struct ata_request /* issue command */ if (ch->hw.command(request)) { - device_printf(request->dev, "error issuing %s command\n", + device_printf(request->parent, "error issuing %s command\n", ata_cmd2str(request)); request->result = EIO; goto begin_finished; @@ -122,8 +118,8 @@ ata_begin_transaction(struct ata_request /* if write command output the data */ if (write) { - if (ata_wait(ch, atadev, (ATA_S_READY | ATA_S_DRQ)) < 0) { - device_printf(request->dev, + if (ata_wait(ch, request->unit, (ATA_S_READY | ATA_S_DRQ)) < 0) { + device_printf(request->parent, "timeout waiting for write DRQ\n"); request->result = EIO; goto begin_finished; @@ -137,14 +133,14 @@ ata_begin_transaction(struct ata_request case ATA_R_DMA: /* check sanity, setup SG list and DMA engine */ if ((error = ch->dma.load(request, NULL, &dummy))) { - device_printf(request->dev, "setting up DMA failed\n"); + device_printf(request->parent, "setting up DMA failed\n"); request->result = error; goto begin_finished; } /* issue command */ if (ch->hw.command(request)) { - device_printf(request->dev, "error issuing %s command\n", + device_printf(request->parent, "error issuing %s command\n", ata_cmd2str(request)); request->result = EIO; goto begin_finished; @@ -152,7 +148,7 @@ ata_begin_transaction(struct ata_request /* start DMA engine */ if (ch->dma.start && ch->dma.start(request)) { - device_printf(request->dev, "error starting DMA\n"); + device_printf(request->parent, "error starting DMA\n"); request->result = EIO; goto begin_finished; } @@ -162,7 +158,7 @@ ata_begin_transaction(struct ata_request case ATA_R_ATAPI: /* is this just a POLL DSC command ? */ if (request->u.atapi.ccb[0] == ATAPI_POLL_DSC) { - ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_DEV(atadev->unit)); + ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_DEV(request->unit)); DELAY(10); if (!(ATA_IDX_INB(ch, ATA_ALTSTAT) & ATA_S_DSC)) request->result = EBUSY; @@ -171,7 +167,7 @@ ata_begin_transaction(struct ata_request /* start ATAPI operation */ if (ch->hw.command(request)) { - device_printf(request->dev, "error issuing ATA PACKET command\n"); + device_printf(request->parent, "error issuing ATA PACKET command\n"); request->result = EIO; goto begin_finished; } @@ -181,7 +177,7 @@ ata_begin_transaction(struct ata_request case ATA_R_ATAPI|ATA_R_DMA: /* is this just a POLL DSC command ? */ if (request->u.atapi.ccb[0] == ATAPI_POLL_DSC) { - ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_DEV(atadev->unit)); + ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_DEV(request->unit)); DELAY(10); if (!(ATA_IDX_INB(ch, ATA_ALTSTAT) & ATA_S_DSC)) request->result = EBUSY; @@ -190,14 +186,14 @@ ata_begin_transaction(struct ata_request /* check sanity, setup SG list and DMA engine */ if ((error = ch->dma.load(request, NULL, &dummy))) { - device_printf(request->dev, "setting up DMA failed\n"); + device_printf(request->parent, "setting up DMA failed\n"); request->result = error; goto begin_finished; } /* start ATAPI operation */ if (ch->hw.command(request)) { - device_printf(request->dev, "error issuing ATA PACKET command\n"); + device_printf(request->parent, "error issuing ATA PACKET command\n"); request->result = EIO; goto begin_finished; } @@ -229,7 +225,6 @@ int ata_end_transaction(struct ata_request *request) { struct ata_channel *ch = device_get_softc(request->parent); - struct ata_device *atadev = device_get_softc(request->dev); int length; ATA_DEBUG_RQ(request, "end transaction"); @@ -266,8 +261,8 @@ ata_end_transaction(struct ata_request * if (request->u.ata.command != ATA_ATAPI_IDENTIFY) flags |= ATA_S_READY; - if (ata_wait(ch, atadev, flags) < 0) { - device_printf(request->dev, + if (ata_wait(ch, request->unit, flags) < 0) { + device_printf(request->parent, "timeout waiting for read DRQ\n"); request->result = EIO; goto end_finished; @@ -290,8 +285,8 @@ ata_end_transaction(struct ata_request * if (request->flags & ATA_R_WRITE) { /* if we get an error here we are done with the HW */ - if (ata_wait(ch, atadev, (ATA_S_READY | ATA_S_DRQ)) < 0) { - device_printf(request->dev, + if (ata_wait(ch, request->unit, (ATA_S_READY | ATA_S_DRQ)) < 0) { + device_printf(request->parent, "timeout waiting for write DRQ\n"); request->status = ATA_IDX_INB(ch, ATA_STATUS); goto end_finished; @@ -347,20 +342,19 @@ ata_end_transaction(struct ata_request * DELAY(10); if (!(request->status & ATA_S_DRQ)) { - device_printf(request->dev, "command interrupt without DRQ\n"); + device_printf(request->parent, "command interrupt without DRQ\n"); request->status = ATA_S_ERROR; goto end_finished; } ATA_IDX_OUTSW_STRM(ch, ATA_DATA, (int16_t *)request->u.atapi.ccb, - (atadev->param.config & - ATA_PROTO_MASK)== ATA_PROTO_ATAPI_12 ? 6 : 8); + (request->flags & ATA_R_ATAPI16) ? 8 : 6); /* return wait for interrupt */ goto end_continue; case ATAPI_P_WRITE: if (request->flags & ATA_R_READ) { request->status = ATA_S_ERROR; - device_printf(request->dev, + device_printf(request->parent, "%s trying to write on read buffer\n", ata_cmd2str(request)); goto end_finished; @@ -378,7 +372,7 @@ ata_end_transaction(struct ata_request * case ATAPI_P_READ: if (request->flags & ATA_R_WRITE) { request->status = ATA_S_ERROR; - device_printf(request->dev, + device_printf(request->parent, "%s trying to read on write buffer\n", ata_cmd2str(request)); goto end_finished; @@ -393,7 +387,7 @@ ata_end_transaction(struct ata_request * goto end_continue; case ATAPI_P_DONEDRQ: - device_printf(request->dev, + device_printf(request->parent, "WARNING - %s DONEDRQ non conformant device\n", ata_cmd2str(request)); if (request->flags & ATA_R_READ) { @@ -415,7 +409,7 @@ ata_end_transaction(struct ata_request * goto end_finished; default: - device_printf(request->dev, "unknown transfer phase\n"); + device_printf(request->parent, "unknown transfer phase\n"); request->status = ATA_S_ERROR; } @@ -603,7 +597,7 @@ ata_generic_status(device_t dev) } static int -ata_wait(struct ata_channel *ch, struct ata_device *atadev, u_int8_t mask) +ata_wait(struct ata_channel *ch, int unit, u_int8_t mask) { u_int8_t status; int timeout = 0; @@ -616,7 +610,7 @@ ata_wait(struct ata_channel *ch, struct /* if drive fails status, reselect the drive and try again */ if (status == 0xff) { - ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_DEV(atadev->unit)); + ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_DEV(unit)); timeout += 1000; DELAY(1000); continue; @@ -657,14 +651,13 @@ int ata_generic_command(struct ata_request *request) { struct ata_channel *ch = device_get_softc(request->parent); - struct ata_device *atadev = device_get_softc(request->dev); /* select device */ - ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_D_LBA | ATA_DEV(atadev->unit)); + ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_D_LBA | ATA_DEV(request->unit)); /* ready to issue command ? */ - if (ata_wait(ch, atadev, 0) < 0) { - device_printf(request->dev, "timeout waiting to issue command\n"); + if (ata_wait(ch, request->unit, 0) < 0) { + device_printf(request->parent, "timeout waiting to issue command\n"); return -1; } @@ -673,6 +666,7 @@ ata_generic_command(struct ata_request * if (request->flags & ATA_R_ATAPI) { int timeout = 5000; + int res; /* issue packet command to controller */ if (request->flags & ATA_R_DMA) { @@ -688,9 +682,16 @@ ata_generic_command(struct ata_request * ATA_IDX_OUTB(ch, ATA_COMMAND, ATA_PACKET_CMD); /* command interrupt device ? just return and wait for interrupt */ - if ((atadev->param.config & ATA_DRQ_MASK) == ATA_DRQ_INTR) + if (request->flags & ATA_R_ATAPI_INTR) return 0; + /* command processed ? */ + res = ata_wait(ch, request->unit, 0); + if (res != 0) { + if (res < 0) + device_printf(request->parent, "timeout waiting for PACKET command\n"); + return (-1); + } /* wait for ready to write ATAPI command block */ while (timeout--) { int reason = ATA_IDX_INB(ch, ATA_IREASON); @@ -702,7 +703,7 @@ ata_generic_command(struct ata_request * DELAY(20); } if (timeout <= 0) { - device_printf(request->dev, "timeout waiting for ATAPI ready\n"); + device_printf(request->parent, "timeout waiting for ATAPI ready\n"); request->result = EIO; return -1; } @@ -712,8 +713,7 @@ ata_generic_command(struct ata_request * /* output command block */ ATA_IDX_OUTSW_STRM(ch, ATA_DATA, (int16_t *)request->u.atapi.ccb, - (atadev->param.config & ATA_PROTO_MASK) == - ATA_PROTO_ATAPI_12 ? 6 : 8); + (request->flags & ATA_R_ATAPI16) ? 8 : 6); } else { ch->hw.tf_write(request); @@ -728,9 +728,8 @@ static void ata_tf_read(struct ata_request *request) { struct ata_channel *ch = device_get_softc(request->parent); - struct ata_device *atadev = device_get_softc(request->dev); - if (atadev->flags & ATA_D_48BIT_ACTIVE) { + if (request->flags & ATA_R_48BIT) { ATA_IDX_OUTB(ch, ATA_CONTROL, ATA_A_4BIT | ATA_A_HOB); request->u.ata.count = (ATA_IDX_INB(ch, ATA_COUNT) << 8); request->u.ata.lba = @@ -760,7 +759,7 @@ ata_tf_write(struct ata_request *request struct ata_channel *ch = device_get_softc(request->parent); struct ata_device *atadev = device_get_softc(request->dev); - if (atadev->flags & ATA_D_48BIT_ACTIVE) { + if (request->flags & ATA_R_48BIT) { ATA_IDX_OUTB(ch, ATA_FEATURE, request->u.ata.feature >> 8); ATA_IDX_OUTB(ch, ATA_FEATURE, request->u.ata.feature); ATA_IDX_OUTB(ch, ATA_COUNT, request->u.ata.count >> 8); @@ -771,7 +770,7 @@ ata_tf_write(struct ata_request *request ATA_IDX_OUTB(ch, ATA_CYL_LSB, request->u.ata.lba >> 8); ATA_IDX_OUTB(ch, ATA_CYL_MSB, request->u.ata.lba >> 40); ATA_IDX_OUTB(ch, ATA_CYL_MSB, request->u.ata.lba >> 16); - ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_LBA | ATA_DEV(atadev->unit)); + ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_LBA | ATA_DEV(request->unit)); } else { ATA_IDX_OUTB(ch, ATA_FEATURE, request->u.ata.feature); @@ -793,7 +792,7 @@ ata_tf_write(struct ata_request *request (request->u.ata.lba / (sectors * heads))); ATA_IDX_OUTB(ch, ATA_CYL_MSB, (request->u.ata.lba / (sectors * heads)) >> 8); - ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_DEV(atadev->unit) | + ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_DEV(request->unit) | (((request->u.ata.lba% (sectors * heads)) / sectors) & 0xf)); } @@ -802,7 +801,7 @@ ata_tf_write(struct ata_request *request ATA_IDX_OUTB(ch, ATA_CYL_LSB, request->u.ata.lba >> 8); ATA_IDX_OUTB(ch, ATA_CYL_MSB, request->u.ata.lba >> 16); ATA_IDX_OUTB(ch, ATA_DRIVE, - ATA_D_IBM | ATA_D_LBA | ATA_DEV(atadev->unit) | + ATA_D_IBM | ATA_D_LBA | ATA_DEV(request->unit) | ((request->u.ata.lba >> 24) & 0x0f)); } } @@ -825,7 +824,7 @@ ata_pio_read(struct ata_request *request size / sizeof(int32_t)); if (request->transfersize < length) { - device_printf(request->dev, "WARNING - %s read data overrun %d>%d\n", + device_printf(request->parent, "WARNING - %s read data overrun %d>%d\n", ata_cmd2str(request), length, request->transfersize); for (resid = request->transfersize; resid < length; resid += sizeof(int16_t)) @@ -850,7 +849,7 @@ ata_pio_write(struct ata_request *reques size / sizeof(int32_t)); if (request->transfersize < length) { - device_printf(request->dev, "WARNING - %s write data underrun %d>%d\n", + device_printf(request->parent, "WARNING - %s write data underrun %d>%d\n", ata_cmd2str(request), length, request->transfersize); for (resid = request->transfersize; resid < length; resid += sizeof(int16_t)) Modified: stable/8/sys/dev/ata/ata-pci.c ============================================================================== --- stable/8/sys/dev/ata/ata-pci.c Mon Nov 23 07:49:50 2009 (r199695) +++ stable/8/sys/dev/ata/ata-pci.c Mon Nov 23 08:45:17 2009 (r199696) @@ -477,7 +477,7 @@ ata_pci_dmareset(device_t dev) ch->dma.flags &= ~ATA_DMA_ACTIVE; ATA_IDX_OUTB(ch, ATA_BMSTAT_PORT, ATA_BMSTAT_INTERRUPT | ATA_BMSTAT_ERROR); if ((request = ch->running)) { - device_printf(request->dev, "DMA reset calling unload\n"); + device_printf(dev, "DMA reset calling unload\n"); ch->dma.unload(request); } } Modified: stable/8/sys/dev/ata/ata-queue.c ============================================================================== --- stable/8/sys/dev/ata/ata-queue.c Mon Nov 23 07:49:50 2009 (r199695) +++ stable/8/sys/dev/ata/ata-queue.c Mon Nov 23 08:45:17 2009 (r199696) @@ -52,17 +52,25 @@ void ata_queue_request(struct ata_request *request) { struct ata_channel *ch; + struct ata_device *atadev = device_get_softc(request->dev); /* treat request as virgin (this might be an ATA_R_REQUEUE) */ request->result = request->status = request->error = 0; - /* check that the device is still valid */ + /* Prepare paramers required by low-level code. */ + request->unit = atadev->unit; if (!(request->parent = device_get_parent(request->dev))) { request->result = ENXIO; if (request->callback) (request->callback)(request); return; } + if ((atadev->param.config & ATA_PROTO_MASK) == ATA_PROTO_ATAPI_16) + request->flags |= ATA_R_ATAPI16; + if ((atadev->param.config & ATA_DRQ_MASK) == ATA_DRQ_INTR) + request->flags |= ATA_R_ATAPI_INTR; + if ((request->flags & ATA_R_ATAPI) == 0) + ata_modify_if_48bit(request); ch = device_get_softc(request->parent); callout_init_mtx(&request->callout, &ch->state_mtx, CALLOUT_RETURNUNLOCKED); if (!request->callback && !(request->flags & ATA_R_REQUEUE)) Modified: stable/8/sys/dev/ata/ata-sata.c ============================================================================== --- stable/8/sys/dev/ata/ata-sata.c Mon Nov 23 07:49:50 2009 (r199695) +++ stable/8/sys/dev/ata/ata-sata.c Mon Nov 23 08:45:17 2009 (r199696) @@ -246,11 +246,10 @@ ata_sata_setmode(device_t dev, int mode) int ata_request2fis_h2d(struct ata_request *request, u_int8_t *fis) { - struct ata_device *atadev = device_get_softc(request->dev); if (request->flags & ATA_R_ATAPI) { fis[0] = 0x27; /* host to device */ - fis[1] = 0x80 | (atadev->unit & 0x0f); + fis[1] = 0x80 | (request->unit & 0x0f); fis[2] = ATA_PACKET_CMD; if (request->flags & (ATA_R_READ | ATA_R_WRITE)) fis[3] = ATA_F_DMA; @@ -263,16 +262,15 @@ ata_request2fis_h2d(struct ata_request * return 20; } else { - ata_modify_if_48bit(request); fis[0] = 0x27; /* host to device */ - fis[1] = 0x80 | (atadev->unit & 0x0f); + fis[1] = 0x80 | (request->unit & 0x0f); fis[2] = request->u.ata.command; fis[3] = request->u.ata.feature; fis[4] = request->u.ata.lba; fis[5] = request->u.ata.lba >> 8; fis[6] = request->u.ata.lba >> 16; fis[7] = ATA_D_LBA; - if (!(atadev->flags & ATA_D_48BIT_ACTIVE)) + if (!(request->flags & ATA_R_48BIT)) fis[7] |= (ATA_D_IBM | (request->u.ata.lba >> 24 & 0x0f)); fis[8] = request->u.ata.lba >> 24; fis[9] = request->u.ata.lba >> 32; @@ -339,9 +337,6 @@ ata_pm_identify(device_t dev) pm_chipid, pm_revision, pm_ports); } - /* realloc space for needed DMA slots */ - ch->dma.dma_slots = pm_ports; - /* reset all ports and register if anything connected */ for (port=0; port < pm_ports; port++) { u_int32_t signature; Modified: stable/8/sys/dev/ata/chipsets/ata-ahci.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-ahci.c Mon Nov 23 07:49:50 2009 (r199695) +++ stable/8/sys/dev/ata/chipsets/ata-ahci.c Mon Nov 23 08:45:17 2009 (r199696) @@ -385,23 +385,22 @@ ata_ahci_status(device_t dev) static int ata_ahci_begin_transaction(struct ata_request *request) { - struct ata_pci_controller *ctlr=device_get_softc(GRANDPARENT(request->dev)); + struct ata_pci_controller *ctlr=device_get_softc(device_get_parent(request->parent)); struct ata_channel *ch = device_get_softc(request->parent); - struct ata_device *atadev = device_get_softc(request->dev); struct ata_ahci_cmd_tab *ctp; struct ata_ahci_cmd_list *clp; int offset = ch->unit << 7; - int port = atadev->unit & 0x0f; + int port = request->unit & 0x0f; int entries = 0; int fis_size; /* get a piece of the workspace for this request */ ctp = (struct ata_ahci_cmd_tab *) - (ch->dma.work + ATA_AHCI_CT_OFFSET + (ATA_AHCI_CT_SIZE*request->tag)); + (ch->dma.work + ATA_AHCI_CT_OFFSET); /* setup the FIS for this request */ if (!(fis_size = ata_ahci_setup_fis(ctp, request))) { - device_printf(request->dev, "setting up SATA FIS failed\n"); + device_printf(request->parent, "setting up SATA FIS failed\n"); request->result = EIO; return ATA_OP_FINISHED; } @@ -409,7 +408,7 @@ ata_ahci_begin_transaction(struct ata_re /* if request moves data setup and load SG list */ if (request->flags & (ATA_R_READ | ATA_R_WRITE)) { if (ch->dma.load(request, ctp->prd_tab, &entries)) { - device_printf(request->dev, "setting up DMA failed\n"); + device_printf(request->parent, "setting up DMA failed\n"); request->result = EIO; return ATA_OP_FINISHED; } @@ -417,7 +416,7 @@ ata_ahci_begin_transaction(struct ata_re /* setup the command list entry */ clp = (struct ata_ahci_cmd_list *) - (ch->dma.work + ATA_AHCI_CL_OFFSET + (ATA_AHCI_CL_SIZE*request->tag)); + (ch->dma.work + ATA_AHCI_CL_OFFSET); clp->prd_length = entries; clp->cmd_flags = (request->flags & ATA_R_WRITE ? ATA_AHCI_CMD_WRITE : 0) | @@ -426,12 +425,7 @@ ata_ahci_begin_transaction(struct ata_re (fis_size / sizeof(u_int32_t)) | (port << 12); clp->bytecount = 0; - clp->cmd_table_phys = htole64(ch->dma.work_bus + ATA_AHCI_CT_OFFSET + - (ATA_AHCI_CT_SIZE * request->tag)); - - /* clear eventual ACTIVE bit */ - ATA_IDX_OUTL(ch, ATA_SACTIVE, - ATA_IDX_INL(ch, ATA_SACTIVE) & (1 << request->tag)); + clp->cmd_table_phys = htole64(ch->dma.work_bus + ATA_AHCI_CT_OFFSET); /* set command type bit */ if (request->flags & ATA_R_ATAPI) @@ -444,7 +438,7 @@ ata_ahci_begin_transaction(struct ata_re ~ATA_AHCI_P_CMD_ATAPI); /* issue command to controller */ - ATA_OUTL(ctlr->r_res2, ATA_AHCI_P_CI + offset, (1 << request->tag)); + ATA_OUTL(ctlr->r_res2, ATA_AHCI_P_CI + offset, 1); if (!(request->flags & ATA_R_ATAPI)) { /* device reset doesn't interrupt */ @@ -476,7 +470,7 @@ ata_ahci_begin_transaction(struct ata_re static int ata_ahci_end_transaction(struct ata_request *request) { - struct ata_pci_controller *ctlr=device_get_softc(GRANDPARENT(request->dev)); + struct ata_pci_controller *ctlr=device_get_softc(device_get_parent(request->parent)); struct ata_channel *ch = device_get_softc(request->parent); struct ata_ahci_cmd_list *clp; u_int32_t tf_data; @@ -495,13 +489,12 @@ ata_ahci_end_transaction(struct ata_requ /* on control commands read back registers to the request struct */ if (request->flags & ATA_R_CONTROL) { - struct ata_device *atadev = device_get_softc(request->dev); u_int8_t *fis = ch->dma.work + ATA_AHCI_FB_OFFSET + 0x40; request->u.ata.count = fis[12] | ((u_int16_t)fis[13] << 8); request->u.ata.lba = fis[4] | ((u_int64_t)fis[5] << 8) | ((u_int64_t)fis[6] << 16); - if (atadev->flags & ATA_D_48BIT_ACTIVE) + if (request->flags & ATA_R_48BIT) request->u.ata.lba |= ((u_int64_t)fis[8] << 24) | ((u_int64_t)fis[9] << 32) | ((u_int64_t)fis[10] << 40); @@ -511,7 +504,7 @@ ata_ahci_end_transaction(struct ata_requ /* record how much data we actually moved */ clp = (struct ata_ahci_cmd_list *) - (ch->dma.work + ATA_AHCI_CL_OFFSET + (ATA_AHCI_CL_SIZE*request->tag)); + (ch->dma.work + ATA_AHCI_CL_OFFSET); request->donecount = clp->bytecount; /* release SG list etc */ Modified: stable/8/sys/dev/ata/chipsets/ata-intel.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-intel.c Mon Nov 23 07:49:50 2009 (r199695) +++ stable/8/sys/dev/ata/chipsets/ata-intel.c Mon Nov 23 08:45:17 2009 (r199696) @@ -470,10 +470,10 @@ ata_intel_31244_status(device_t dev) static void ata_intel_31244_tf_write(struct ata_request *request) { - struct ata_channel *ch = device_get_softc(device_get_parent(request->dev)); + struct ata_channel *ch = device_get_softc(request->parent); struct ata_device *atadev = device_get_softc(request->dev); - if (atadev->flags & ATA_D_48BIT_ACTIVE) { + if (request->flags & ATA_R_48BIT) { ATA_IDX_OUTW(ch, ATA_FEATURE, request->u.ata.feature); ATA_IDX_OUTW(ch, ATA_COUNT, request->u.ata.count); ATA_IDX_OUTW(ch, ATA_SECTOR, ((request->u.ata.lba >> 16) & 0xff00) | @@ -482,7 +482,7 @@ ata_intel_31244_tf_write(struct ata_requ ((request->u.ata.lba >> 8) & 0x00ff)); ATA_IDX_OUTW(ch, ATA_CYL_MSB, ((request->u.ata.lba >> 32) & 0xff00) | ((request->u.ata.lba >> 16) & 0x00ff)); - ATA_IDX_OUTW(ch, ATA_DRIVE, ATA_D_LBA | ATA_DEV(atadev->unit)); + ATA_IDX_OUTW(ch, ATA_DRIVE, ATA_D_LBA | ATA_DEV(request->unit)); } else { ATA_IDX_OUTB(ch, ATA_FEATURE, request->u.ata.feature); @@ -503,7 +503,7 @@ ata_intel_31244_tf_write(struct ata_requ (request->u.ata.lba / (sectors * heads))); ATA_IDX_OUTB(ch, ATA_CYL_MSB, (request->u.ata.lba / (sectors * heads)) >> 8); - ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_DEV(atadev->unit) | + ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_DEV(request->unit) | (((request->u.ata.lba% (sectors * heads)) / sectors) & 0xf)); } @@ -512,7 +512,7 @@ ata_intel_31244_tf_write(struct ata_requ ATA_IDX_OUTB(ch, ATA_CYL_LSB, request->u.ata.lba >> 8); ATA_IDX_OUTB(ch, ATA_CYL_MSB, request->u.ata.lba >> 16); ATA_IDX_OUTB(ch, ATA_DRIVE, - ATA_D_IBM | ATA_D_LBA | ATA_DEV(atadev->unit) | + ATA_D_IBM | ATA_D_LBA | ATA_DEV(request->unit) | ((request->u.ata.lba >> 24) & 0x0f)); } } Modified: stable/8/sys/dev/ata/chipsets/ata-marvell.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-marvell.c Mon Nov 23 07:49:50 2009 (r199695) +++ stable/8/sys/dev/ata/chipsets/ata-marvell.c Mon Nov 23 08:45:17 2009 (r199696) @@ -354,7 +354,7 @@ ata_marvell_edma_status(device_t dev) static int ata_marvell_edma_begin_transaction(struct ata_request *request) { - struct ata_pci_controller *ctlr=device_get_softc(GRANDPARENT(request->dev)); + struct ata_pci_controller *ctlr=device_get_softc(device_get_parent(request->parent)); struct ata_channel *ch = device_get_softc(request->parent); u_int32_t req_in; u_int8_t *bytep; @@ -363,7 +363,9 @@ ata_marvell_edma_begin_transaction(struc /* only DMA R/W goes through the EMDA machine */ if (request->u.ata.command != ATA_READ_DMA && - request->u.ata.command != ATA_WRITE_DMA) { + request->u.ata.command != ATA_WRITE_DMA && + request->u.ata.command != ATA_READ_DMA48 && + request->u.ata.command != ATA_WRITE_DMA48) { /* disable the EDMA machinery */ if (ATA_INL(ctlr->r_res1, 0x02028 + ATA_MV_EDMA_BASE(ch)) & 0x00000001) @@ -371,12 +373,9 @@ ata_marvell_edma_begin_transaction(struc return ata_begin_transaction(request); } - /* check for 48 bit access and convert if needed */ - ata_modify_if_48bit(request); - /* check sanity, setup SG list and DMA engine */ if ((error = ch->dma.load(request, NULL, NULL))) { - device_printf(request->dev, "setting up DMA failed\n"); + device_printf(request->parent, "setting up DMA failed\n"); request->result = error; return ATA_OP_FINISHED; } @@ -472,7 +471,7 @@ ata_marvell_edma_begin_transaction(struc static int ata_marvell_edma_end_transaction(struct ata_request *request) { - struct ata_pci_controller *ctlr=device_get_softc(GRANDPARENT(request->dev)); + struct ata_pci_controller *ctlr=device_get_softc(device_get_parent(request->parent)); struct ata_channel *ch = device_get_softc(request->parent); int offset = (ch->unit > 3 ? 0x30014 : 0x20014); u_int32_t icr = ATA_INL(ctlr->r_res1, offset); Modified: stable/8/sys/dev/ata/chipsets/ata-promise.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-promise.c Mon Nov 23 07:49:50 2009 (r199695) +++ stable/8/sys/dev/ata/chipsets/ata-promise.c Mon Nov 23 08:45:17 2009 (r199696) @@ -387,11 +387,10 @@ ata_promise_status(device_t dev) static int ata_promise_dmastart(struct ata_request *request) { - struct ata_pci_controller *ctlr=device_get_softc(GRANDPARENT(request->dev)); + struct ata_pci_controller *ctlr=device_get_softc(device_get_parent(request->parent)); struct ata_channel *ch = device_get_softc(request->parent); - struct ata_device *atadev = device_get_softc(request->dev); - if (atadev->flags & ATA_D_48BIT_ACTIVE) { + if (request->flags & ATA_R_48BIT) { ATA_OUTB(ctlr->r_res1, 0x11, ATA_INB(ctlr->r_res1, 0x11) | (ch->unit ? 0x08 : 0x02)); ATA_OUTL(ctlr->r_res1, ch->unit ? 0x24 : 0x20, @@ -411,12 +410,11 @@ ata_promise_dmastart(struct ata_request static int ata_promise_dmastop(struct ata_request *request) { - struct ata_pci_controller *ctlr=device_get_softc(GRANDPARENT(request->dev)); + struct ata_pci_controller *ctlr=device_get_softc(device_get_parent(request->parent)); struct ata_channel *ch = device_get_softc(request->parent); - struct ata_device *atadev = device_get_softc(request->dev); int error; - if (atadev->flags & ATA_D_48BIT_ACTIVE) { + if (request->flags & ATA_R_48BIT) { ATA_OUTB(ctlr->r_res1, 0x11, ATA_INB(ctlr->r_res1, 0x11) & ~(ch->unit ? 0x08 : 0x02)); ATA_OUTL(ctlr->r_res1, ch->unit ? 0x24 : 0x20, 0); @@ -682,9 +680,8 @@ ata_promise_mio_status(device_t dev) static int ata_promise_mio_command(struct ata_request *request) { - struct ata_pci_controller *ctlr=device_get_softc(GRANDPARENT(request->dev)); + struct ata_pci_controller *ctlr=device_get_softc(device_get_parent(request->parent)); struct ata_channel *ch = device_get_softc(request->parent); - struct ata_device *atadev = device_get_softc(request->dev); u_int32_t *wordp = (u_int32_t *)ch->dma.work; @@ -693,7 +690,7 @@ ata_promise_mio_command(struct ata_reque if ((ctlr->chip->cfg2 == PR_SATA2) || ((ctlr->chip->cfg2 == PR_CMBO2) && (ch->unit < 2))) { /* set portmultiplier port */ - ATA_OUTB(ctlr->r_res2, 0x4e8 + (ch->unit << 8), atadev->unit & 0x0f); + ATA_OUTB(ctlr->r_res2, 0x4e8 + (ch->unit << 8), request->unit & 0x0f); } /* XXX SOS add ATAPI commands support later */ @@ -1051,7 +1048,7 @@ ata_promise_sx4_intr(void *data) static int ata_promise_sx4_command(struct ata_request *request) { - device_t gparent = GRANDPARENT(request->dev); + device_t gparent = device_get_parent(request->parent); struct ata_pci_controller *ctlr = device_get_softc(gparent); struct ata_channel *ch = device_get_softc(request->parent); struct ata_dma_prdentry *prd; @@ -1158,15 +1155,14 @@ ata_promise_sx4_command(struct ata_reque static int ata_promise_apkt(u_int8_t *bytep, struct ata_request *request) { - struct ata_device *atadev = device_get_softc(request->dev); int i = 12; bytep[i++] = ATA_PDC_1B | ATA_PDC_WRITE_REG | ATA_PDC_WAIT_NBUSY|ATA_DRIVE; - bytep[i++] = ATA_D_IBM | ATA_D_LBA | ATA_DEV(atadev->unit); + bytep[i++] = ATA_D_IBM | ATA_D_LBA | ATA_DEV(request->unit); bytep[i++] = ATA_PDC_1B | ATA_PDC_WRITE_CTL; bytep[i++] = ATA_A_4BIT; - if (atadev->flags & ATA_D_48BIT_ACTIVE) { + if (request->flags & ATA_R_48BIT) { bytep[i++] = ATA_PDC_2B | ATA_PDC_WRITE_REG | ATA_FEATURE; bytep[i++] = request->u.ata.feature >> 8; bytep[i++] = request->u.ata.feature; @@ -1183,7 +1179,7 @@ ata_promise_apkt(u_int8_t *bytep, struct bytep[i++] = request->u.ata.lba >> 40; bytep[i++] = request->u.ata.lba >> 16; bytep[i++] = ATA_PDC_1B | ATA_PDC_WRITE_REG | ATA_DRIVE; - bytep[i++] = ATA_D_LBA | ATA_DEV(atadev->unit); + bytep[i++] = ATA_D_LBA | ATA_DEV(request->unit); } else { bytep[i++] = ATA_PDC_1B | ATA_PDC_WRITE_REG | ATA_FEATURE; @@ -1197,8 +1193,7 @@ ata_promise_apkt(u_int8_t *bytep, struct bytep[i++] = ATA_PDC_1B | ATA_PDC_WRITE_REG | ATA_CYL_MSB; bytep[i++] = request->u.ata.lba >> 16; bytep[i++] = ATA_PDC_1B | ATA_PDC_WRITE_REG | ATA_DRIVE; - bytep[i++] = (atadev->flags & ATA_D_USE_CHS ? 0 : ATA_D_LBA) | - ATA_D_IBM | ATA_DEV(atadev->unit) | + bytep[i++] = ATA_D_LBA | ATA_D_IBM | ATA_DEV(request->unit) | ((request->u.ata.lba >> 24)&0xf); } bytep[i++] = ATA_PDC_1B | ATA_PDC_WRITE_END | ATA_COMMAND; Modified: stable/8/sys/dev/ata/chipsets/ata-serverworks.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-serverworks.c Mon Nov 23 07:49:50 2009 (r199695) +++ stable/8/sys/dev/ata/chipsets/ata-serverworks.c Mon Nov 23 08:45:17 2009 (r199696) @@ -259,9 +259,8 @@ static void ata_serverworks_tf_read(struct ata_request *request) { struct ata_channel *ch = device_get_softc(request->parent); - struct ata_device *atadev = device_get_softc(request->dev); - if (atadev->flags & ATA_D_48BIT_ACTIVE) { + if (request->flags & ATA_R_48BIT) { u_int16_t temp; request->u.ata.count = ATA_IDX_INW(ch, ATA_COUNT); @@ -290,7 +289,7 @@ ata_serverworks_tf_write(struct ata_requ struct ata_channel *ch = device_get_softc(request->parent); struct ata_device *atadev = device_get_softc(request->dev); - if (atadev->flags & ATA_D_48BIT_ACTIVE) { + if (request->flags & ATA_R_48BIT) { ATA_IDX_OUTW(ch, ATA_FEATURE, request->u.ata.feature); ATA_IDX_OUTW(ch, ATA_COUNT, request->u.ata.count); ATA_IDX_OUTW(ch, ATA_SECTOR, ((request->u.ata.lba >> 16) & 0xff00) | @@ -299,7 +298,7 @@ ata_serverworks_tf_write(struct ata_requ ((request->u.ata.lba >> 8) & 0x00ff)); ATA_IDX_OUTW(ch, ATA_CYL_MSB, ((request->u.ata.lba >> 32) & 0xff00) | ((request->u.ata.lba >> 16) & 0x00ff)); - ATA_IDX_OUTW(ch, ATA_DRIVE, ATA_D_LBA | ATA_DEV(atadev->unit)); + ATA_IDX_OUTW(ch, ATA_DRIVE, ATA_D_LBA | ATA_DEV(request->unit)); } else { ATA_IDX_OUTW(ch, ATA_FEATURE, request->u.ata.feature); @@ -320,7 +319,7 @@ ata_serverworks_tf_write(struct ata_requ (request->u.ata.lba / (sectors * heads))); ATA_IDX_OUTW(ch, ATA_CYL_MSB, (request->u.ata.lba / (sectors * heads)) >> 8); - ATA_IDX_OUTW(ch, ATA_DRIVE, ATA_D_IBM | ATA_DEV(atadev->unit) | + ATA_IDX_OUTW(ch, ATA_DRIVE, ATA_D_IBM | ATA_DEV(request->unit) | (((request->u.ata.lba% (sectors * heads)) / sectors) & 0xf)); } @@ -329,7 +328,7 @@ ata_serverworks_tf_write(struct ata_requ ATA_IDX_OUTW(ch, ATA_CYL_LSB, request->u.ata.lba >> 8); ATA_IDX_OUTW(ch, ATA_CYL_MSB, request->u.ata.lba >> 16); ATA_IDX_OUTW(ch, ATA_DRIVE, - ATA_D_IBM | ATA_D_LBA | ATA_DEV(atadev->unit) | + ATA_D_IBM | ATA_D_LBA | ATA_DEV(request->unit) | ((request->u.ata.lba >> 24) & 0x0f)); } } Modified: stable/8/sys/dev/ata/chipsets/ata-siliconimage.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Mon Nov 23 07:49:50 2009 (r199695) +++ stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Mon Nov 23 08:45:17 2009 (r199696) @@ -457,7 +457,7 @@ struct ata_siiprb_dma_prdentry { u_int32_t control; } __packed; -#define ATA_SIIPRB_DMA_ENTRIES 125 +#define ATA_SIIPRB_DMA_ENTRIES 129 struct ata_siiprb_ata_command { struct ata_siiprb_dma_prdentry prd[ATA_SIIPRB_DMA_ENTRIES]; } __packed; @@ -542,7 +542,7 @@ ata_siiprb_status(device_t dev) static int ata_siiprb_begin_transaction(struct ata_request *request) { - struct ata_pci_controller *ctlr=device_get_softc(GRANDPARENT(request->dev)); + struct ata_pci_controller *ctlr=device_get_softc(device_get_parent(request->parent)); struct ata_channel *ch = device_get_softc(request->parent); struct ata_siiprb_command *prb; struct ata_siiprb_dma_prdentry *prd; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 23 08:46:27 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DE32106566C; Mon, 23 Nov 2009 08:46:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F06FF8FC17; Mon, 23 Nov 2009 08:46:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAN8kQFi046346; Mon, 23 Nov 2009 08:46:26 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAN8kQW0046344; Mon, 23 Nov 2009 08:46:26 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911230846.nAN8kQW0046344@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Nov 2009 08:46:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199697 - stable/8/sys/dev/ata/chipsets X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2009 08:46:27 -0000 Author: mav Date: Mon Nov 23 08:46:26 2009 New Revision: 199697 URL: http://svn.freebsd.org/changeset/base/199697 Log: MFC r198752: Allow SATA1 SiI chips to do full-sized DMA. Specification tells that we may release DMA constrants even more, but it require some additional handling. Modified: stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-siliconimage.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Mon Nov 23 08:45:17 2009 (r199696) +++ stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Mon Nov 23 08:46:26 2009 (r199697) @@ -340,6 +340,7 @@ ata_sii_ch_attach(device_t dev) ATA_OUTL(ctlr->r_res2, 0x148 + (unit01 << 7) + (unit10 << 8),(1 << 16)); } + ch->dma.max_iosize = (ATA_DMA_ENTRIES - 1) * PAGE_SIZE; if (ctlr->chip->cfg2 & SII_BUG) { /* work around errata in early chips */ ch->dma.boundary = 8192; From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 23 08:56:19 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B679106566C; Mon, 23 Nov 2009 08:56:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37A358FC16; Mon, 23 Nov 2009 08:56:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAN8uHI5046588; Mon, 23 Nov 2009 08:56:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAN8uHxm046580; Mon, 23 Nov 2009 08:56:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911230856.nAN8uHxm046580@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Nov 2009 08:56:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199698 - in stable/8/sys/dev: ahci ata ata/chipsets X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2009 08:56:19 -0000 Author: mav Date: Mon Nov 23 08:56:17 2009 New Revision: 199698 URL: http://svn.freebsd.org/changeset/base/199698 Log: MFC r199259, r199262, r199322: Change the way in which AHCI+PATA combined controllers, such as JMicron are handled. Instead of trying to attach two different drivers to single device, wrapping each call, make one of them (atajmicron) attach do device solely, but create child device for AHCI driver, passing it all required resources. It is quite easy, as none of resources are shared, except IRQ. Add support for AHCI SATA parts of alike SATA+PATA MArvell controllers. Add IDs of Marvell 88SX6102, 88SX6111. 88SX6141 controllers. As result, it: - makes drivers operation more independent and straitforward, - allows to use new ahci(4) driver with such devices, adding support for new features, such as PMP and NCQ, same time keeping legacy PATA support, - will allow to just drop old ataahci driver, when it's time come. Modified: stable/8/sys/dev/ahci/ahci.c stable/8/sys/dev/ahci/ahci.h stable/8/sys/dev/ata/ata-pci.c stable/8/sys/dev/ata/ata-pci.h stable/8/sys/dev/ata/chipsets/ata-ahci.c stable/8/sys/dev/ata/chipsets/ata-jmicron.c stable/8/sys/dev/ata/chipsets/ata-marvell.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Mon Nov 23 08:46:26 2009 (r199697) +++ stable/8/sys/dev/ahci/ahci.c Mon Nov 23 08:56:17 2009 (r199698) @@ -99,7 +99,14 @@ MALLOC_DEFINE(M_AHCI, "AHCI driver", "AH static struct { uint32_t id; const char *name; - int flags; + int quirks; +#define AHCI_Q_NOFORCE 1 +#define AHCI_Q_NOPMP 2 +#define AHCI_Q_NONCQ 4 +#define AHCI_Q_1CH 8 +#define AHCI_Q_2CH 16 +#define AHCI_Q_4CH 32 +#define AHCI_Q_EDGEIS 64 } ahci_ids[] = { {0x43801002, "ATI IXP600", 0}, {0x43901002, "ATI IXP700", 0}, @@ -145,6 +152,15 @@ static struct { {0x3b2b8086, "Intel PCH", 0}, {0x3b2c8086, "Intel PCH", 0}, {0x3b2f8086, "Intel PCH", 0}, + {0x2361197b, "JMicron JMB361", AHCI_Q_NOFORCE}, + {0x2363197b, "JMicron JMB363", AHCI_Q_NOFORCE}, + {0x2365197b, "JMicron JMB365", AHCI_Q_NOFORCE}, + {0x2366197b, "JMicron JMB366", AHCI_Q_NOFORCE}, + {0x2368197b, "JMicron JMB368", AHCI_Q_NOFORCE}, + {0x611111ab, "Marvell 88SX6111", AHCI_Q_NOFORCE|AHCI_Q_1CH|AHCI_Q_EDGEIS}, + {0x612111ab, "Marvell 88SX6121", AHCI_Q_NOFORCE|AHCI_Q_2CH|AHCI_Q_EDGEIS}, + {0x614111ab, "Marvell 88SX6141", AHCI_Q_NOFORCE|AHCI_Q_4CH|AHCI_Q_EDGEIS}, + {0x614511ab, "Marvell 88SX6145", AHCI_Q_NOFORCE|AHCI_Q_4CH|AHCI_Q_EDGEIS}, {0x044c10de, "NVIDIA MCP65", 0}, {0x044d10de, "NVIDIA MCP65", 0}, {0x044e10de, "NVIDIA MCP65", 0}, @@ -226,9 +242,39 @@ static int ahci_probe(device_t dev) { char buf[64]; + int i, valid = 0; + uint32_t devid = pci_get_devid(dev); + + /* Is this a possible AHCI candidate? */ + if (pci_get_class(dev) == PCIC_STORAGE && + pci_get_subclass(dev) == PCIS_STORAGE_SATA && + pci_get_progif(dev) == PCIP_STORAGE_SATA_AHCI_1_0) + valid = 1; + /* Is this a known AHCI chip? */ + for (i = 0; ahci_ids[i].id != 0; i++) { + if (ahci_ids[i].id == devid && + (valid || !(ahci_ids[i].quirks & AHCI_Q_NOFORCE))) { + snprintf(buf, sizeof(buf), "%s AHCI SATA controller", + ahci_ids[i].name); + device_set_desc_copy(dev, buf); + return (BUS_PROBE_VENDOR); + } + } + if (!valid) + return (ENXIO); + device_set_desc_copy(dev, "AHCI SATA controller"); + return (BUS_PROBE_VENDOR); +} + +static int +ahci_ata_probe(device_t dev) +{ + char buf[64]; int i; uint32_t devid = pci_get_devid(dev); + if ((intptr_t)device_get_ivars(dev) >= 0) + return (ENXIO); /* Is this a known AHCI chip? */ for (i = 0; ahci_ids[i].id != 0; i++) { if (ahci_ids[i].id == devid) { @@ -238,11 +284,6 @@ ahci_probe(device_t dev) return (BUS_PROBE_VENDOR); } } - /* Is this a possible AHCI candidate? */ - if (pci_get_class(dev) != PCIC_STORAGE || - pci_get_subclass(dev) != PCIS_STORAGE_SATA || - pci_get_progif(dev) != PCIP_STORAGE_SATA_AHCI_1_0) - return (ENXIO); device_set_desc_copy(dev, "AHCI SATA controller"); return (BUS_PROBE_VENDOR); } @@ -252,10 +293,15 @@ ahci_attach(device_t dev) { struct ahci_controller *ctlr = device_get_softc(dev); device_t child; - int error, unit, speed; + int error, unit, speed, i; + uint32_t devid = pci_get_devid(dev); u_int32_t version; ctlr->dev = dev; + i = 0; + while (ahci_ids[i].id != 0 && ahci_ids[i].id != devid) + i++; + ctlr->quirks = ahci_ids[i].quirks; resource_int_value(device_get_name(dev), device_get_unit(dev), "ccc", &ctlr->ccc); /* if we have a memory BAR(5) we are likely on an AHCI part */ @@ -282,10 +328,32 @@ ahci_attach(device_t dev) rman_fini(&ctlr->sc_iomem); return (error); }; - /* Get the number of HW channels */ + /* Get the HW capabilities */ + version = ATA_INL(ctlr->r_mem, AHCI_VS); + ctlr->caps = ATA_INL(ctlr->r_mem, AHCI_CAP); + if (version >= 0x00010020) + ctlr->caps2 = ATA_INL(ctlr->r_mem, AHCI_CAP2); ctlr->ichannels = ATA_INL(ctlr->r_mem, AHCI_PI); + if (ctlr->quirks & AHCI_Q_1CH) { + ctlr->caps &= ~AHCI_CAP_NPMASK; + ctlr->ichannels &= 0x01; + } + if (ctlr->quirks & AHCI_Q_2CH) { + ctlr->caps &= ~AHCI_CAP_NPMASK; + ctlr->caps |= 1; + ctlr->ichannels &= 0x03; + } + if (ctlr->quirks & AHCI_Q_4CH) { + ctlr->caps &= ~AHCI_CAP_NPMASK; + ctlr->caps |= 3; + ctlr->ichannels &= 0x0f; + } ctlr->channels = MAX(flsl(ctlr->ichannels), - (ATA_INL(ctlr->r_mem, AHCI_CAP) & AHCI_CAP_NPMASK) + 1); + (ctlr->caps & AHCI_CAP_NPMASK) + 1); + if (ctlr->quirks & AHCI_Q_NOPMP) + ctlr->caps &= ~AHCI_CAP_SPM; + if (ctlr->quirks & AHCI_Q_NONCQ) + ctlr->caps &= ~AHCI_CAP_SNCQ; /* Setup interrupts. */ if (ahci_setup_interrupt(dev)) { bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, ctlr->r_mem); @@ -293,10 +361,6 @@ ahci_attach(device_t dev) return ENXIO; } /* Announce HW capabilities. */ - version = ATA_INL(ctlr->r_mem, AHCI_VS); - ctlr->caps = ATA_INL(ctlr->r_mem, AHCI_CAP); - if (version >= 0x00010020) - ctlr->caps2 = ATA_INL(ctlr->r_mem, AHCI_CAP2); speed = (ctlr->caps & AHCI_CAP_ISS) >> AHCI_CAP_ISS_SHIFT; device_printf(dev, "AHCI v%x.%02x with %d %sGbps ports, Port Multiplier %s\n", @@ -531,8 +595,15 @@ ahci_intr(void *data) for (; unit < ctlr->channels; unit++) { if ((is & (1 << unit)) != 0 && (arg = ctlr->interrupt[unit].argument)) { - ctlr->interrupt[unit].function(arg); - ATA_OUTL(ctlr->r_mem, AHCI_IS, 1 << unit); + if (ctlr->quirks & AHCI_Q_EDGEIS) { + /* Some controller have edge triggered IS. */ + ATA_OUTL(ctlr->r_mem, AHCI_IS, 1 << unit); + ctlr->interrupt[unit].function(arg); + } else { + /* but AHCI declares level triggered IS. */ + ctlr->interrupt[unit].function(arg); + ATA_OUTL(ctlr->r_mem, AHCI_IS, 1 << unit); + } } } } @@ -665,6 +736,25 @@ static driver_t ahci_driver = { sizeof(struct ahci_controller) }; DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, 0, 0); +static device_method_t ahci_ata_methods[] = { + DEVMETHOD(device_probe, ahci_ata_probe), + DEVMETHOD(device_attach, ahci_attach), + DEVMETHOD(device_detach, ahci_detach), + DEVMETHOD(device_suspend, ahci_suspend), + DEVMETHOD(device_resume, ahci_resume), + DEVMETHOD(bus_print_child, ahci_print_child), + DEVMETHOD(bus_alloc_resource, ahci_alloc_resource), + DEVMETHOD(bus_release_resource, ahci_release_resource), + DEVMETHOD(bus_setup_intr, ahci_setup_intr), + DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), + { 0, 0 } +}; +static driver_t ahci_ata_driver = { + "ahci", + ahci_ata_methods, + sizeof(struct ahci_controller) +}; +DRIVER_MODULE(ahci, atapci, ahci_ata_driver, ahci_devclass, 0, 0); MODULE_VERSION(ahci, 1); MODULE_DEPEND(ahci, cam, 1, 1, 1); @@ -688,6 +778,7 @@ ahci_ch_attach(device_t dev) ch->unit = (intptr_t)device_get_ivars(dev); ch->caps = ctlr->caps; ch->caps2 = ctlr->caps2; + ch->quirks = ctlr->quirks; ch->numslots = ((ch->caps & AHCI_CAP_NCS) >> AHCI_CAP_NCS_SHIFT) + 1, mtx_init(&ch->mtx, "AHCI channel lock", NULL, MTX_DEF); resource_int_value(device_get_name(dev), @@ -858,7 +949,7 @@ static driver_t ahcich_driver = { ahcich_methods, sizeof(struct ahci_channel) }; -DRIVER_MODULE(ahcich, ahci, ahcich_driver, ahci_devclass, 0, 0); +DRIVER_MODULE(ahcich, ahci, ahcich_driver, ahcich_devclass, 0, 0); struct ahci_dc_cb_args { bus_addr_t maddr; Modified: stable/8/sys/dev/ahci/ahci.h ============================================================================== --- stable/8/sys/dev/ahci/ahci.h Mon Nov 23 08:46:26 2009 (r199697) +++ stable/8/sys/dev/ahci/ahci.h Mon Nov 23 08:56:17 2009 (r199698) @@ -352,6 +352,7 @@ struct ahci_channel { struct cam_path *path; uint32_t caps; /* Controller capabilities */ uint32_t caps2; /* Controller capabilities */ + int quirks; int numslots; /* Number of present slots */ int pm_level; /* power management level */ int sata_rev; /* Maximum allowed SATA generation */ @@ -391,6 +392,7 @@ struct ahci_controller { } irqs[16]; uint32_t caps; /* Controller capabilities */ uint32_t caps2; /* Controller capabilities */ + int quirks; int numirqs; int channels; int ichannels; Modified: stable/8/sys/dev/ata/ata-pci.c ============================================================================== --- stable/8/sys/dev/ata/ata-pci.c Mon Nov 23 08:46:26 2009 (r199697) +++ stable/8/sys/dev/ata/ata-pci.c Mon Nov 23 08:56:17 2009 (r199698) @@ -189,91 +189,138 @@ ata_pci_resume(device_t dev) return error; } +int +ata_pci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) +{ + + return (BUS_READ_IVAR(device_get_parent(dev), dev, which, result)); +} + +int +ata_pci_write_ivar(device_t dev, device_t child, int which, uintptr_t value) +{ + + return (BUS_WRITE_IVAR(device_get_parent(dev), dev, which, value)); +} + +uint32_t +ata_pci_read_config(device_t dev, device_t child, int reg, int width) +{ + + return (pci_read_config(dev, reg, width)); +} + +void +ata_pci_write_config(device_t dev, device_t child, int reg, + uint32_t val, int width) +{ + + pci_write_config(dev, reg, val, width); +} + struct resource * ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { - struct ata_pci_controller *controller = device_get_softc(dev); - int unit = ((struct ata_channel *)device_get_softc(child))->unit; - struct resource *res = NULL; - int myrid; - - if (type == SYS_RES_IOPORT) { - switch (*rid) { - case ATA_IOADDR_RID: - if (controller->legacy) { - start = (unit ? ATA_SECONDARY : ATA_PRIMARY); - count = ATA_IOSIZE; - end = start + count - 1; - } - myrid = PCIR_BAR(0) + (unit << 3); - res = BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, - SYS_RES_IOPORT, &myrid, - start, end, count, flags); - break; - - case ATA_CTLADDR_RID: - if (controller->legacy) { - start = (unit ? ATA_SECONDARY : ATA_PRIMARY) + ATA_CTLOFFSET; - count = ATA_CTLIOSIZE; - end = start + count - 1; - } - myrid = PCIR_BAR(1) + (unit << 3); - res = BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, - SYS_RES_IOPORT, &myrid, - start, end, count, flags); - break; - } - } - if (type == SYS_RES_IRQ && *rid == ATA_IRQ_RID) { - if (controller->legacy) { - int irq = (unit == 0 ? 14 : 15); + struct ata_pci_controller *controller = device_get_softc(dev); + struct resource *res = NULL; + + if (device_get_devclass(child) == ata_devclass) { + int unit = ((struct ata_channel *)device_get_softc(child))->unit; + int myrid; + + if (type == SYS_RES_IOPORT) { + switch (*rid) { + case ATA_IOADDR_RID: + if (controller->legacy) { + start = (unit ? ATA_SECONDARY : ATA_PRIMARY); + count = ATA_IOSIZE; + end = start + count - 1; + } + myrid = PCIR_BAR(0) + (unit << 3); + res = BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, + SYS_RES_IOPORT, &myrid, + start, end, count, flags); + break; + case ATA_CTLADDR_RID: + if (controller->legacy) { + start = (unit ? ATA_SECONDARY : ATA_PRIMARY) + + ATA_CTLOFFSET; + count = ATA_CTLIOSIZE; + end = start + count - 1; + } + myrid = PCIR_BAR(1) + (unit << 3); + res = BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, + SYS_RES_IOPORT, &myrid, + start, end, count, flags); + break; + } + } + if (type == SYS_RES_IRQ && *rid == ATA_IRQ_RID) { + if (controller->legacy) { + int irq = (unit == 0 ? 14 : 15); - res = BUS_ALLOC_RESOURCE(device_get_parent(dev), child, - SYS_RES_IRQ, rid, irq, irq, 1, flags); + res = BUS_ALLOC_RESOURCE(device_get_parent(dev), child, + SYS_RES_IRQ, rid, irq, irq, 1, flags); + } else + res = controller->r_irq; + } + } else { + if (type == SYS_RES_IRQ) { + if (*rid != ATA_IRQ_RID) + return (NULL); + res = controller->r_irq; + } else { + res = BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, + type, rid, start, end, count, flags); + } } - else - res = controller->r_irq; - } - return res; + return (res); } int ata_pci_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r) { - struct ata_pci_controller *controller = device_get_softc(dev); - int unit = ((struct ata_channel *)device_get_softc(child))->unit; - - if (type == SYS_RES_IOPORT) { - switch (rid) { - case ATA_IOADDR_RID: - return BUS_RELEASE_RESOURCE(device_get_parent(dev), dev, - SYS_RES_IOPORT, - PCIR_BAR(0) + (unit << 3), r); - break; - - case ATA_CTLADDR_RID: - return BUS_RELEASE_RESOURCE(device_get_parent(dev), dev, - SYS_RES_IOPORT, - PCIR_BAR(1) + (unit << 3), r); - break; - default: - return ENOENT; - } - } - if (type == SYS_RES_IRQ) { - if (rid != ATA_IRQ_RID) - return ENOENT; - if (controller->legacy) { - return BUS_RELEASE_RESOURCE(device_get_parent(dev), child, - SYS_RES_IRQ, rid, r); + if (device_get_devclass(child) == ata_devclass) { + struct ata_pci_controller *controller = device_get_softc(dev); + int unit = ((struct ata_channel *)device_get_softc(child))->unit; + + if (type == SYS_RES_IOPORT) { + switch (rid) { + case ATA_IOADDR_RID: + return BUS_RELEASE_RESOURCE(device_get_parent(dev), dev, + SYS_RES_IOPORT, + PCIR_BAR(0) + (unit << 3), r); + case ATA_CTLADDR_RID: + return BUS_RELEASE_RESOURCE(device_get_parent(dev), dev, + SYS_RES_IOPORT, + PCIR_BAR(1) + (unit << 3), r); + default: + return ENOENT; + } + } + if (type == SYS_RES_IRQ) { + if (rid != ATA_IRQ_RID) + return ENOENT; + if (controller->legacy) { + return BUS_RELEASE_RESOURCE(device_get_parent(dev), child, + SYS_RES_IRQ, rid, r); + } else + return 0; + } + } else { + if (type == SYS_RES_IRQ) { + if (rid != ATA_IRQ_RID) + return (ENOENT); + return (0); + } else { + return (BUS_RELEASE_RESOURCE(device_get_parent(dev), child, + type, rid, r)); + } } - else - return 0; - } - return EINVAL; + return (EINVAL); } int @@ -281,44 +328,50 @@ ata_pci_setup_intr(device_t dev, device_ int flags, driver_filter_t *filter, driver_intr_t *function, void *argument, void **cookiep) { - struct ata_pci_controller *controller = device_get_softc(dev); + struct ata_pci_controller *controller = device_get_softc(dev); - if (controller->legacy) { - return BUS_SETUP_INTR(device_get_parent(dev), child, irq, + if (controller->legacy) { + return BUS_SETUP_INTR(device_get_parent(dev), child, irq, flags, filter, function, argument, cookiep); - } - else { - struct ata_pci_controller *controller = device_get_softc(dev); - int unit = ((struct ata_channel *)device_get_softc(child))->unit; + } else { + struct ata_pci_controller *controller = device_get_softc(dev); + int unit; - if (filter != NULL) { - printf("ata-pci.c: we cannot use a filter here\n"); - return (EINVAL); + if (filter != NULL) { + printf("ata-pci.c: we cannot use a filter here\n"); + return (EINVAL); + } + if (device_get_devclass(child) == ata_devclass) + unit = ((struct ata_channel *)device_get_softc(child))->unit; + else + unit = ATA_PCI_MAX_CH - 1; + controller->interrupt[unit].function = function; + controller->interrupt[unit].argument = argument; + *cookiep = controller; + return 0; } - controller->interrupt[unit].function = function; - controller->interrupt[unit].argument = argument; - *cookiep = controller; - return 0; - } } int ata_pci_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie) { - struct ata_pci_controller *controller = device_get_softc(dev); - - if (controller->legacy) { - return BUS_TEARDOWN_INTR(device_get_parent(dev), child, irq, cookie); - } - else { struct ata_pci_controller *controller = device_get_softc(dev); - int unit = ((struct ata_channel *)device_get_softc(child))->unit; - controller->interrupt[unit].function = NULL; - controller->interrupt[unit].argument = NULL; - return 0; - } + if (controller->legacy) { + return BUS_TEARDOWN_INTR(device_get_parent(dev), child, irq, cookie); + } else { + struct ata_pci_controller *controller = device_get_softc(dev); + int unit; + + if (device_get_devclass(child) == ata_devclass) + unit = ((struct ata_channel *)device_get_softc(child))->unit; + else + unit = ATA_PCI_MAX_CH - 1; + controller->interrupt[unit].function = NULL; + controller->interrupt[unit].argument = NULL; + return 0; + } } static void @@ -510,12 +563,16 @@ static device_method_t ata_pci_methods[] DEVMETHOD(device_shutdown, bus_generic_shutdown), /* bus methods */ + DEVMETHOD(bus_read_ivar, ata_pci_read_ivar), + DEVMETHOD(bus_write_ivar, ata_pci_write_ivar), DEVMETHOD(bus_alloc_resource, ata_pci_alloc_resource), DEVMETHOD(bus_release_resource, ata_pci_release_resource), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_setup_intr, ata_pci_setup_intr), DEVMETHOD(bus_teardown_intr, ata_pci_teardown_intr), + DEVMETHOD(pci_read_config, ata_pci_read_config), + DEVMETHOD(pci_write_config, ata_pci_write_config), { 0, 0 } }; @@ -537,6 +594,8 @@ ata_pcichannel_probe(device_t dev) { char buffer[32]; + if ((intptr_t)device_get_ivars(dev) < 0) + return (ENXIO); sprintf(buffer, "ATA channel %d", (int)(intptr_t)device_get_ivars(dev)); device_set_desc_copy(dev, buffer); @@ -711,7 +770,7 @@ ata_generic_intr(void *data) struct ata_channel *ch; int unit; - for (unit = 0; unit < ctlr->channels; unit++) { + for (unit = 0; unit < ATA_PCI_MAX_CH; unit++) { if ((ch = ctlr->interrupt[unit].argument)) ctlr->interrupt[unit].function(ch); } Modified: stable/8/sys/dev/ata/ata-pci.h ============================================================================== --- stable/8/sys/dev/ata/ata-pci.h Mon Nov 23 08:46:26 2009 (r199697) +++ stable/8/sys/dev/ata/ata-pci.h Mon Nov 23 08:56:17 2009 (r199698) @@ -36,6 +36,8 @@ struct ata_chip_id { char *text; }; +#define ATA_PCI_MAX_CH 8 + /* structure describing a PCI ATA controller */ struct ata_pci_controller { device_t dev; @@ -65,7 +67,7 @@ struct ata_pci_controller { struct { void (*function)(void *); void *argument; - } interrupt[8]; /* XXX SOS max ch# for now */ + } interrupt[ATA_PCI_MAX_CH]; void *chipset_data; }; @@ -225,7 +227,10 @@ struct ata_pci_controller { #define ATA_M88SX6081 0x608111ab #define ATA_M88SX7042 0x704211ab #define ATA_M88SX6101 0x610111ab +#define ATA_M88SX6102 0x610211ab +#define ATA_M88SX6111 0x611111ab #define ATA_M88SX6121 0x612111ab +#define ATA_M88SX6141 0x614111ab #define ATA_M88SX6145 0x614511ab #define ATA_MICRON_ID 0x1042 @@ -483,6 +488,11 @@ int ata_pci_attach(device_t dev); int ata_pci_detach(device_t dev); int ata_pci_suspend(device_t dev); int ata_pci_resume(device_t dev); +int ata_pci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result); +int ata_pci_write_ivar(device_t dev, device_t child, int which, uintptr_t value); +uint32_t ata_pci_read_config(device_t dev, device_t child, int reg, int width); +void ata_pci_write_config(device_t dev, device_t child, int reg, + uint32_t val, int width); struct resource * ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags); int ata_pci_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r); int ata_pci_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filter, driver_intr_t *function, void *argument, void **cookiep); @@ -506,12 +516,6 @@ int ata_mode2idx(int mode); /* global prototypes from chipsets/ata-*.c */ int ata_ahci_chipinit(device_t); -int ata_ahci_ch_attach(device_t dev); -int ata_ahci_ch_detach(device_t dev); -int ata_ahci_ch_suspend(device_t dev); -int ata_ahci_ch_resume(device_t dev); -int ata_ahci_ctlr_reset(device_t dev); -void ata_ahci_reset(device_t dev); int ata_marvell_edma_chipinit(device_t); int ata_sii_chipinit(device_t); @@ -527,12 +531,16 @@ static device_method_t __CONCAT(dname,_m DEVMETHOD(device_suspend, ata_pci_suspend), \ DEVMETHOD(device_resume, ata_pci_resume), \ DEVMETHOD(device_shutdown, bus_generic_shutdown), \ + DEVMETHOD(bus_read_ivar, ata_pci_read_ivar), \ + DEVMETHOD(bus_write_ivar, ata_pci_write_ivar), \ DEVMETHOD(bus_alloc_resource, ata_pci_alloc_resource), \ DEVMETHOD(bus_release_resource, ata_pci_release_resource), \ DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), \ DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), \ DEVMETHOD(bus_setup_intr, ata_pci_setup_intr), \ DEVMETHOD(bus_teardown_intr, ata_pci_teardown_intr), \ + DEVMETHOD(pci_read_config, ata_pci_read_config), \ + DEVMETHOD(pci_write_config, ata_pci_write_config), \ { 0, 0 } \ }; \ static driver_t __CONCAT(dname,_driver) = { \ Modified: stable/8/sys/dev/ata/chipsets/ata-ahci.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-ahci.c Mon Nov 23 08:46:26 2009 (r199697) +++ stable/8/sys/dev/ata/chipsets/ata-ahci.c Mon Nov 23 08:56:17 2009 (r199698) @@ -52,6 +52,12 @@ __FBSDID("$FreeBSD$"); #include /* local prototypes */ +static int ata_ahci_ch_attach(device_t dev); +static int ata_ahci_ch_detach(device_t dev); +static int ata_ahci_ch_suspend(device_t dev); +static int ata_ahci_ch_resume(device_t dev); +static int ata_ahci_ctlr_reset(device_t dev); +static void ata_ahci_reset(device_t dev); static int ata_ahci_suspend(device_t dev); static int ata_ahci_status(device_t dev); static int ata_ahci_begin_transaction(struct ata_request *request); @@ -97,6 +103,49 @@ ata_ahci_probe(device_t dev) return (BUS_PROBE_GENERIC); } +static int +ata_ahci_ata_probe(device_t dev) +{ + struct ata_pci_controller *ctlr = device_get_softc(dev); + + if ((intptr_t)device_get_ivars(dev) >= 0) + return (ENXIO); + device_set_desc_copy(dev, "AHCI SATA controller"); + ctlr->chipinit = ata_ahci_chipinit; + return (BUS_PROBE_GENERIC); +} + +static int +ata_ahci_ata_attach(device_t dev) +{ + struct ata_pci_controller *ctlr = device_get_softc(dev); + device_t child; + int unit; + + /* do chipset specific setups only needed once */ + ctlr->legacy = 0; + ctlr->ichannels = -1; + ctlr->ch_attach = ata_pci_ch_attach; + ctlr->ch_detach = ata_pci_ch_detach; + ctlr->dev = dev; + if (ctlr->chipinit(dev)) + return ENXIO; + /* attach all channels on this controller */ + for (unit = 0; unit < ctlr->channels; unit++) { + if ((ctlr->ichannels & (1 << unit)) == 0) + continue; + child = device_add_child(dev, "ata", + ((unit == 0 || unit == 1) && ctlr->legacy) ? + unit : devclass_find_free_unit(ata_devclass, 2)); + if (child == NULL) + device_printf(dev, "failed to add ata child device\n"); + else + device_set_ivars(child, (void *)(intptr_t)unit); + } + bus_generic_attach(dev); + return 0; +} + int ata_ahci_chipinit(device_t dev) { @@ -129,9 +178,15 @@ ata_ahci_chipinit(device_t dev) /* get the number of HW channels */ ctlr->ichannels = ATA_INL(ctlr->r_res2, ATA_AHCI_PI); - ctlr->channels = - MAX(flsl(ctlr->ichannels), + ctlr->channels = MAX(flsl(ctlr->ichannels), (ATA_INL(ctlr->r_res2, ATA_AHCI_CAP) & ATA_AHCI_CAP_NPMASK) + 1); + if (pci_get_devid(dev) == ATA_M88SX6111) + ctlr->channels = 1; + else if (pci_get_devid(dev) == ATA_M88SX6121) + ctlr->channels = 2; + else if (pci_get_devid(dev) == ATA_M88SX6141 || + pci_get_devid(dev) == ATA_M88SX6145) + ctlr->channels = 4; ctlr->reset = ata_ahci_reset; ctlr->ch_attach = ata_ahci_ch_attach; @@ -183,7 +238,7 @@ ata_ahci_chipinit(device_t dev) return 0; } -int +static int ata_ahci_ctlr_reset(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); @@ -228,7 +283,7 @@ ata_ahci_suspend(device_t dev) return 0; } -int +static int ata_ahci_ch_attach(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); @@ -259,7 +314,7 @@ ata_ahci_ch_attach(device_t dev) return 0; } -int +static int ata_ahci_ch_detach(device_t dev) { @@ -268,7 +323,7 @@ ata_ahci_ch_detach(device_t dev) return (0); } -int +static int ata_ahci_ch_suspend(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); @@ -293,7 +348,7 @@ ata_ahci_ch_suspend(device_t dev) return (0); } -int +static int ata_ahci_ch_resume(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); @@ -813,7 +868,7 @@ ata_ahci_softreset(device_t dev, int por return ATA_INL(ctlr->r_res2, ATA_AHCI_P_SIG + offset); } -void +static void ata_ahci_reset(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); @@ -845,9 +900,12 @@ ata_ahci_reset(device_t dev) ((ch->pm_level == 0) ? ATA_AHCI_P_IX_PRC | ATA_AHCI_P_IX_PC : 0) | ATA_AHCI_P_IX_DP | ATA_AHCI_P_IX_UF | ATA_AHCI_P_IX_SDB | ATA_AHCI_P_IX_DS | ATA_AHCI_P_IX_PS | ATA_AHCI_P_IX_DHR)); - - /* only probe for PortMultiplier if HW has support */ - if (ATA_INL(ctlr->r_res2, ATA_AHCI_CAP) & ATA_AHCI_CAP_SPM) { + /* + * Only probe for PortMultiplier if HW has support. + * Ignore Marvell, which is not working, + */ + if ((ATA_INL(ctlr->r_res2, ATA_AHCI_CAP) & ATA_AHCI_CAP_SPM) && + pci_get_vendor(ctlr->dev) != 0x11ab) { signature = ata_ahci_softreset(dev, ATA_PM); /* Workaround for some ATI chips, failing to soft-reset * when port multiplicator supported, but absent. @@ -924,3 +982,26 @@ ata_ahci_setup_fis(struct ata_ahci_cmd_t } ATA_DECLARE_DRIVER(ata_ahci); +static device_method_t ata_ahci_ata_methods[] = { + DEVMETHOD(device_probe, ata_ahci_ata_probe), + DEVMETHOD(device_attach, ata_ahci_ata_attach), + DEVMETHOD(device_detach, ata_pci_detach), + DEVMETHOD(device_suspend, ata_pci_suspend), + DEVMETHOD(device_resume, ata_pci_resume), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(bus_read_ivar, ata_pci_read_ivar), + DEVMETHOD(bus_write_ivar, ata_pci_write_ivar), + DEVMETHOD(bus_alloc_resource, ata_pci_alloc_resource), + DEVMETHOD(bus_release_resource, ata_pci_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_setup_intr, ata_pci_setup_intr), + DEVMETHOD(bus_teardown_intr, ata_pci_teardown_intr), + { 0, 0 } +}; +static driver_t ata_ahci_ata_driver = { + "atapci", + ata_ahci_ata_methods, + sizeof(struct ata_pci_controller) +}; +DRIVER_MODULE(ata_ahci_ata, atapci, ata_ahci_ata_driver, ata_pci_devclass, 0, 0); Modified: stable/8/sys/dev/ata/chipsets/ata-jmicron.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-jmicron.c Mon Nov 23 08:46:26 2009 (r199697) +++ stable/8/sys/dev/ata/chipsets/ata-jmicron.c Mon Nov 23 08:56:17 2009 (r199698) @@ -53,11 +53,6 @@ __FBSDID("$FreeBSD$"); /* local prototypes */ static int ata_jmicron_chipinit(device_t dev); -static int ata_jmicron_ch_attach(device_t dev); -static int ata_jmicron_ch_detach(device_t dev); -static int ata_jmicron_ch_suspend(device_t dev); -static int ata_jmicron_ch_resume(device_t dev); -static void ata_jmicron_reset(device_t dev); static void ata_jmicron_setmode(device_t dev, int mode); /* @@ -70,10 +65,10 @@ ata_jmicron_probe(device_t dev) struct ata_chip_id *idx; static struct ata_chip_id ids[] = {{ ATA_JMB360, 0, 1, 0, ATA_SA300, "JMB360" }, - { ATA_JMB361, 0, 1, 1, ATA_SA300, "JMB361" }, - { ATA_JMB363, 0, 2, 1, ATA_SA300, "JMB363" }, - { ATA_JMB365, 0, 1, 2, ATA_SA300, "JMB365" }, - { ATA_JMB366, 0, 2, 2, ATA_SA300, "JMB366" }, + { ATA_JMB361, 0, 1, 1, ATA_UDMA6, "JMB361" }, + { ATA_JMB363, 0, 2, 1, ATA_UDMA6, "JMB363" }, + { ATA_JMB365, 0, 1, 2, ATA_UDMA6, "JMB365" }, + { ATA_JMB366, 0, 2, 2, ATA_UDMA6, "JMB366" }, { ATA_JMB368, 0, 0, 1, ATA_UDMA6, "JMB368" }, { 0, 0, 0, 0, 0, 0}}; char buffer[64]; @@ -101,7 +96,7 @@ static int ata_jmicron_chipinit(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); - int error; + device_t child; if (ata_setup_interrupt(dev, ata_generic_intr)) return ENXIO; @@ -123,116 +118,35 @@ ata_jmicron_chipinit(device_t dev) /* set controller configuration to a combined setup we support */ pci_write_config(dev, 0x40, 0x80c0a131, 4); pci_write_config(dev, 0x80, 0x01200000, 4); - - if (ctlr->chip->cfg1 && (error = ata_ahci_chipinit(dev))) - return error; - - ctlr->ch_attach = ata_jmicron_ch_attach; - ctlr->ch_detach = ata_jmicron_ch_detach; - ctlr->ch_suspend = ata_jmicron_ch_suspend; - ctlr->ch_resume = ata_jmicron_ch_resume; - ctlr->reset = ata_jmicron_reset; + /* Create AHCI subdevice if AHCI part present. */ + if (ctlr->chip->cfg1) { + child = device_add_child(dev, NULL, -1); + if (child != NULL) { + device_set_ivars(child, (void *)(intptr_t)-1); + bus_generic_attach(dev); + } + } + ctlr->ch_attach = ata_pci_ch_attach; + ctlr->ch_detach = ata_pci_ch_detach; + ctlr->reset = ata_generic_reset; ctlr->setmode = ata_jmicron_setmode; - - /* set the number of HW channels */ - ctlr->channels = ctlr->chip->cfg1 + ctlr->chip->cfg2; - ctlr->ichannels |= ((0xffffffffU >> (32 - ctlr->chip->cfg2)) - << ctlr->chip->cfg1); + ctlr->channels = ctlr->chip->cfg2; } return 0; } -static int -ata_jmicron_ch_attach(device_t dev) -{ - struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); - struct ata_channel *ch = device_get_softc(dev); - int error; - - if (ch->unit >= ctlr->chip->cfg1) { - ch->unit -= ctlr->chip->cfg1; - error = ata_pci_ch_attach(dev); - ch->unit += ctlr->chip->cfg1; - } - else - error = ata_ahci_ch_attach(dev); - return error; -} - -static int -ata_jmicron_ch_detach(device_t dev) -{ - struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); - struct ata_channel *ch = device_get_softc(dev); - int error; - - if (ch->unit >= ctlr->chip->cfg1) { - ch->unit -= ctlr->chip->cfg1; - error = ata_pci_ch_detach(dev); - ch->unit += ctlr->chip->cfg1; - } - else - error = ata_ahci_ch_detach(dev); - - return (error); -} - -static int -ata_jmicron_ch_suspend(device_t dev) -{ - struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); - struct ata_channel *ch = device_get_softc(dev); - int error = 0; - - if (ch->unit < ctlr->chip->cfg1) - error = ata_ahci_ch_suspend(dev); - return error; -} - -static int -ata_jmicron_ch_resume(device_t dev) -{ - struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); - struct ata_channel *ch = device_get_softc(dev); - int error = 0; - - if (ch->unit < ctlr->chip->cfg1) - error = ata_ahci_ch_resume(dev); - return (error); -} - -static void -ata_jmicron_reset(device_t dev) -{ - struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); - struct ata_channel *ch = device_get_softc(dev); - - if (ch->unit >= ctlr->chip->cfg1) - ata_generic_reset(dev); - else - ata_ahci_reset(dev); -} - static void ata_jmicron_setmode(device_t dev, int mode) { - struct ata_pci_controller *ctlr = device_get_softc(GRANDPARENT(dev)); - struct ata_channel *ch = device_get_softc(device_get_parent(dev)); - - if (pci_read_config(dev, 0xdf, 1) & 0x40 || ch->unit >= ctlr->chip->cfg1) { struct ata_device *atadev = device_get_softc(dev); /* check for 80pin cable present */ if (pci_read_config(dev, 0x40, 1) & 0x08) - mode = ata_limit_mode(dev, mode, ATA_UDMA2); + mode = ata_limit_mode(dev, mode, ATA_UDMA2); else - mode = ata_limit_mode(dev, mode, ATA_UDMA6); - + mode = ata_limit_mode(dev, mode, ATA_UDMA6); if (!ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_SETXFER, 0, mode)) - atadev->mode = mode; - } - else - ata_sata_setmode(dev, mode); + atadev->mode = mode; } ATA_DECLARE_DRIVER(ata_jmicron); Modified: stable/8/sys/dev/ata/chipsets/ata-marvell.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-marvell.c Mon Nov 23 08:46:26 2009 (r199697) +++ stable/8/sys/dev/ata/chipsets/ata-marvell.c Mon Nov 23 08:56:17 2009 (r199698) @@ -52,9 +52,9 @@ __FBSDID("$FreeBSD$"); #include /* local prototypes */ -static int ata_marvell_pata_chipinit(device_t dev); -static int ata_marvell_pata_ch_attach(device_t dev); -static void ata_marvell_pata_setmode(device_t dev, int mode); +static int ata_marvell_chipinit(device_t dev); +static int ata_marvell_ch_attach(device_t dev); +static void ata_marvell_setmode(device_t dev, int mode); static int ata_marvell_edma_ch_attach(device_t dev); static int ata_marvell_edma_ch_detach(device_t dev); static int ata_marvell_edma_status(device_t dev); @@ -107,9 +107,12 @@ ata_marvell_probe(device_t dev) { ATA_M88SX6042, 0, 4, MV_6042, ATA_SA300, "88SX6042" }, { ATA_M88SX6081, 0, 8, MV_60XX, ATA_SA300, "88SX6081" }, { ATA_M88SX7042, 0, 4, MV_7042, ATA_SA300, "88SX7042" }, - { ATA_M88SX6101, 0, 1, MV_61XX, ATA_UDMA6, "88SX6101" }, - { ATA_M88SX6121, 0, 1, MV_61XX, ATA_UDMA6, "88SX6121" }, - { ATA_M88SX6145, 0, 2, MV_61XX, ATA_UDMA6, "88SX6145" }, + { ATA_M88SX6101, 0, 0, MV_61XX, ATA_UDMA6, "88SX6101" }, + { ATA_M88SX6102, 0, 0, MV_61XX, ATA_UDMA6, "88SX6102" }, + { ATA_M88SX6111, 0, 1, MV_61XX, ATA_UDMA6, "88SX6111" }, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 23 09:10:08 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FCA8106566C; Mon, 23 Nov 2009 09:10:08 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D8458FC0C; Mon, 23 Nov 2009 09:10:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAN9A8bp046990; Mon, 23 Nov 2009 09:10:08 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAN9A8TE046988; Mon, 23 Nov 2009 09:10:08 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200911230910.nAN9A8TE046988@svn.freebsd.org> From: Christian Brueffer Date: Mon, 23 Nov 2009 09:10:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199700 - stable/8/lib/libc/posix1e X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2009 09:10:08 -0000 Author: brueffer Date: Mon Nov 23 09:10:08 2009 New Revision: 199700 URL: http://svn.freebsd.org/changeset/base/199700 Log: MFC: r199317 Fix a memory leak in acl_from_text() in case the conversion succeeded. Modified: stable/8/lib/libc/posix1e/acl_from_text.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/posix1e/acl_from_text.c ============================================================================== --- stable/8/lib/libc/posix1e/acl_from_text.c Mon Nov 23 09:02:08 2009 (r199699) +++ stable/8/lib/libc/posix1e/acl_from_text.c Mon Nov 23 09:10:08 2009 (r199700) @@ -257,6 +257,7 @@ acl_from_text(const char *buf_p) } #endif + free(mybuf_p); return(acl); error_label: From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 23 09:13:32 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E30C1065672; Mon, 23 Nov 2009 09:13:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C3878FC1C; Mon, 23 Nov 2009 09:13:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAN9DWK3047115; Mon, 23 Nov 2009 09:13:32 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAN9DWNN047113; Mon, 23 Nov 2009 09:13:32 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911230913.nAN9DWNN047113@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Nov 2009 09:13:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199701 - stable/8/share/man/man4 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2009 09:13:32 -0000 Author: mav Date: Mon Nov 23 09:13:32 2009 New Revision: 199701 URL: http://svn.freebsd.org/changeset/base/199701 Log: MFC 199699: Refer more recently added Marvell chips. Modified: stable/8/share/man/man4/ata.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/ata.4 ============================================================================== --- stable/8/share/man/man4/ata.4 Mon Nov 23 09:10:08 2009 (r199700) +++ stable/8/share/man/man4/ata.4 Mon Nov 23 09:13:32 2009 (r199701) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 6, 2009 +.Dd November 23, 2009 .Dt ATA 4 .Os .Sh NAME @@ -146,7 +146,7 @@ IT8211F, IT8212F, IT8213F. JMB360, JMB361, JMB363, JMB365, JMB366, JMB368. .It Marvell 88SX5040, 88SX5041, 88SX5080, 88SX5081, 88SX6041, 88SX6042, 88SX6081, 88SX6101, -88SX6141, 88SX7042. +88SX6102, 88SX6111, 88SX6121, 88SX6141, 88SX6145, 88SX7042. .It National: SC1100. .It NetCell: From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 23 09:20:33 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9F951065672; Mon, 23 Nov 2009 09:20:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE6D88FC1A; Mon, 23 Nov 2009 09:20:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAN9KX0W047492; Mon, 23 Nov 2009 09:20:33 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAN9KXNa047488; Mon, 23 Nov 2009 09:20:33 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911230920.nAN9KXNa047488@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Nov 2009 09:20:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199704 - stable/8/sys/dev/sound/pci/hda X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2009 09:20:34 -0000 Author: mav Date: Mon Nov 23 09:20:33 2009 New Revision: 199704 URL: http://svn.freebsd.org/changeset/base/199704 Log: MFC r196762: Improve HDA controller capabilities logging. Modified: stable/8/sys/dev/sound/pci/hda/hdac.c stable/8/sys/dev/sound/pci/hda/hdac_private.h stable/8/sys/dev/sound/pci/hda/hdac_reg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/8/sys/dev/sound/pci/hda/hdac.c Mon Nov 23 09:16:39 2009 (r199703) +++ stable/8/sys/dev/sound/pci/hda/hdac.c Mon Nov 23 09:20:33 2009 (r199704) @@ -1520,7 +1520,7 @@ hdac_get_capabilities(struct hdac_softc sc->num_iss = HDAC_GCAP_ISS(gcap); sc->num_oss = HDAC_GCAP_OSS(gcap); sc->num_bss = HDAC_GCAP_BSS(gcap); - + sc->num_sdo = HDAC_GCAP_NSDO(gcap); sc->support_64bit = HDA_FLAG_MATCH(gcap, HDAC_GCAP_64OK); corbsize = HDAC_READ_1(&sc->mem, HDAC_CORBSIZE); @@ -1555,11 +1555,12 @@ hdac_get_capabilities(struct hdac_softc return (ENXIO); } - HDA_BOOTHVERBOSE( - device_printf(sc->dev, " CORB size: %d\n", sc->corb_size); - device_printf(sc->dev, " RIRB size: %d\n", sc->rirb_size); - device_printf(sc->dev, " Streams: ISS=%d OSS=%d BSS=%d\n", - sc->num_iss, sc->num_oss, sc->num_bss); + HDA_BOOTVERBOSE( + device_printf(sc->dev, "Caps: OSS %d, ISS %d, BSS %d, " + "NSDO %d%s, CORB %d, RIRB %d\n", + sc->num_oss, sc->num_iss, sc->num_bss, 1 << sc->num_sdo, + sc->support_64bit ? ", 64bit" : "", + sc->corb_size, sc->rirb_size); ); return (0); Modified: stable/8/sys/dev/sound/pci/hda/hdac_private.h ============================================================================== --- stable/8/sys/dev/sound/pci/hda/hdac_private.h Mon Nov 23 09:16:39 2009 (r199703) +++ stable/8/sys/dev/sound/pci/hda/hdac_private.h Mon Nov 23 09:20:33 2009 (r199704) @@ -339,6 +339,7 @@ struct hdac_softc { int num_iss; int num_oss; int num_bss; + int num_sdo; int support_64bit; int streamcnt; Modified: stable/8/sys/dev/sound/pci/hda/hdac_reg.h ============================================================================== --- stable/8/sys/dev/sound/pci/hda/hdac_reg.h Mon Nov 23 09:16:39 2009 (r199703) +++ stable/8/sys/dev/sound/pci/hda/hdac_reg.h Mon Nov 23 09:20:33 2009 (r199704) @@ -136,6 +136,8 @@ (((gcap) & HDAC_GCAP_ISS_MASK) >> HDAC_GCAP_ISS_SHIFT) #define HDAC_GCAP_OSS(gcap) \ (((gcap) & HDAC_GCAP_OSS_MASK) >> HDAC_GCAP_OSS_SHIFT) +#define HDAC_GCAP_NSDO(gcap) \ + (((gcap) & HDAC_GCAP_NSDO_MASK) >> HDAC_GCAP_NSDO_SHIFT) /* GCTL - Global Control */ #define HDAC_GCTL_CRST 0x00000001 From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 23 09:21:35 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB0E5106566B; Mon, 23 Nov 2009 09:21:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B92798FC0A; Mon, 23 Nov 2009 09:21:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAN9LZPj047562; Mon, 23 Nov 2009 09:21:35 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAN9LZbw047560; Mon, 23 Nov 2009 09:21:35 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911230921.nAN9LZbw047560@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Nov 2009 09:21:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199705 - stable/8/sys/dev/sound/pci/hda X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2009 09:21:35 -0000 Author: mav Date: Mon Nov 23 09:21:35 2009 New Revision: 199705 URL: http://svn.freebsd.org/changeset/base/199705 Log: MFC r197017: Add Intel 82801JD (one more ICH10) HDA controller ID. Modified: stable/8/sys/dev/sound/pci/hda/hdac.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/8/sys/dev/sound/pci/hda/hdac.c Mon Nov 23 09:20:33 2009 (r199704) +++ stable/8/sys/dev/sound/pci/hda/hdac.c Mon Nov 23 09:21:35 2009 (r199705) @@ -146,7 +146,8 @@ SND_DECLARE_FILE("$FreeBSD$"); #define HDA_INTEL_82801G HDA_MODEL_CONSTRUCT(INTEL, 0x27d8) #define HDA_INTEL_82801H HDA_MODEL_CONSTRUCT(INTEL, 0x284b) #define HDA_INTEL_82801I HDA_MODEL_CONSTRUCT(INTEL, 0x293e) -#define HDA_INTEL_82801J HDA_MODEL_CONSTRUCT(INTEL, 0x3a3e) +#define HDA_INTEL_82801JI HDA_MODEL_CONSTRUCT(INTEL, 0x3a3e) +#define HDA_INTEL_82801JD HDA_MODEL_CONSTRUCT(INTEL, 0x3a6e) #define HDA_INTEL_PCH HDA_MODEL_CONSTRUCT(INTEL, 0x3b56) #define HDA_INTEL_SCH HDA_MODEL_CONSTRUCT(INTEL, 0x811b) #define HDA_INTEL_ALL HDA_MODEL_CONSTRUCT(INTEL, 0xffff) @@ -486,7 +487,8 @@ static const struct { { HDA_INTEL_82801G, "Intel 82801G", 0 }, { HDA_INTEL_82801H, "Intel 82801H", 0 }, { HDA_INTEL_82801I, "Intel 82801I", 0 }, - { HDA_INTEL_82801J, "Intel 82801J", 0 }, + { HDA_INTEL_82801JI, "Intel 82801JI", 0 }, + { HDA_INTEL_82801JD, "Intel 82801JD", 0 }, { HDA_INTEL_PCH, "Intel PCH", 0 }, { HDA_INTEL_SCH, "Intel SCH", 0 }, { HDA_NVIDIA_MCP51, "NVidia MCP51", HDAC_NO_MSI }, From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 23 09:22:38 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93334106568F; Mon, 23 Nov 2009 09:22:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 65F938FC23; Mon, 23 Nov 2009 09:22:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAN9McUt047644; Mon, 23 Nov 2009 09:22:38 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAN9McBk047642; Mon, 23 Nov 2009 09:22:38 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911230922.nAN9McBk047642@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Nov 2009 09:22:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199706 - stable/8/sys/dev/sound/pci/hda X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2009 09:22:38 -0000 Author: mav Date: Mon Nov 23 09:22:38 2009 New Revision: 199706 URL: http://svn.freebsd.org/changeset/base/199706 Log: MFC r197018: Add NVidia MCP89 HDA controller IDs. Modified: stable/8/sys/dev/sound/pci/hda/hdac.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/8/sys/dev/sound/pci/hda/hdac.c Mon Nov 23 09:21:35 2009 (r199705) +++ stable/8/sys/dev/sound/pci/hda/hdac.c Mon Nov 23 09:22:38 2009 (r199706) @@ -172,6 +172,10 @@ SND_DECLARE_FILE("$FreeBSD$"); #define HDA_NVIDIA_MCP79_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac1) #define HDA_NVIDIA_MCP79_3 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac2) #define HDA_NVIDIA_MCP79_4 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac3) +#define HDA_NVIDIA_MCP89_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d94) +#define HDA_NVIDIA_MCP89_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d95) +#define HDA_NVIDIA_MCP89_3 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d96) +#define HDA_NVIDIA_MCP89_4 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d97) #define HDA_NVIDIA_ALL HDA_MODEL_CONSTRUCT(NVIDIA, 0xffff) /* ATI */ @@ -509,6 +513,10 @@ static const struct { { HDA_NVIDIA_MCP79_2, "NVidia MCP79", 0 }, { HDA_NVIDIA_MCP79_3, "NVidia MCP79", 0 }, { HDA_NVIDIA_MCP79_4, "NVidia MCP79", 0 }, + { HDA_NVIDIA_MCP89_1, "NVidia MCP89", 0 }, + { HDA_NVIDIA_MCP89_2, "NVidia MCP89", 0 }, + { HDA_NVIDIA_MCP89_3, "NVidia MCP89", 0 }, + { HDA_NVIDIA_MCP89_4, "NVidia MCP89", 0 }, { HDA_ATI_SB450, "ATI SB450", 0 }, { HDA_ATI_SB600, "ATI SB600", 0 }, { HDA_ATI_RS600, "ATI RS600", 0 }, From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 23 09:26:31 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 404921065670; Mon, 23 Nov 2009 09:26:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D4408FC08; Mon, 23 Nov 2009 09:26:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAN9QVB9047773; Mon, 23 Nov 2009 09:26:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAN9QVUw047770; Mon, 23 Nov 2009 09:26:31 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911230926.nAN9QVUw047770@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Nov 2009 09:26:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199707 - stable/8/sys/dev/sound/pci/hda X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2009 09:26:31 -0000 Author: mav Date: Mon Nov 23 09:26:30 2009 New Revision: 199707 URL: http://svn.freebsd.org/changeset/base/199707 Log: MFC r197611, r197640: - Add some bits of HDMI/DisplayPort support from later specification updates. It may be not enough to make them work, but at least should give some information about these beasts. - Add Realtek ALC887 codec ID. Modified: stable/8/sys/dev/sound/pci/hda/hda_reg.h stable/8/sys/dev/sound/pci/hda/hdac.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/sound/pci/hda/hda_reg.h ============================================================================== --- stable/8/sys/dev/sound/pci/hda/hda_reg.h Mon Nov 23 09:22:38 2009 (r199706) +++ stable/8/sys/dev/sound/pci/hda/hda_reg.h Mon Nov 23 09:26:30 2009 (r199707) @@ -660,13 +660,49 @@ #define HDA_CMD_VERB_GET_STRIPE_CONTROL 0xf24 #define HDA_CMD_VERB_SET_STRIPE_CONTROL 0x724 -#define HDA_CMD_SET_STRIPE_CONTROL(cad, nid) \ +#define HDA_CMD_GET_STRIPE_CONTROL(cad, nid) \ (HDA_CMD_12BIT((cad), (nid), \ HDA_CMD_VERB_GET_STRIPE_CONTROL, 0x0)) -#define HDA_CMD_GET_STRIPE_CONTROL(cad, nid, payload) \ +#define HDA_CMD_SET_STRIPE_CONTROL(cad, nid, payload) \ (HDA_CMD_12BIT((cad), (nid), \ HDA_CMD_VERB_SET_STRIPE_CONTROL, (payload))) +/* Channel Count Control */ +#define HDA_CMD_VERB_GET_CONV_CHAN_COUNT 0xf2d +#define HDA_CMD_VERB_SET_CONV_CHAN_COUNT 0x72d + +#define HDA_CMD_GET_CONV_CHAN_COUNT(cad, nid) \ + (HDA_CMD_12BIT((cad), (nid), \ + HDA_CMD_VERB_GET_CONV_CHAN_COUNT, 0x0)) +#define HDA_CMD_SET_CONV_CHAN_COUNT(cad, nid, payload) \ + (HDA_CMD_12BIT((cad), (nid), \ + HDA_CMD_VERB_SET_CONV_CHAN_COUNT, (payload))) + +#define HDA_CMD_VERB_GET_HDMI_DIP_SIZE 0xf2e +#define HDA_CMD_VERB_GET_HDMI_ELDD 0xf2f + +#define HDA_CMD_VERB_GET_HDMI_DIP_INDEX 0xf30 +#define HDA_CMD_VERB_SET_HDMI_DIP_INDEX 0x730 + +#define HDA_CMD_VERB_GET_HDMI_DIP_DATA 0xf31 +#define HDA_CMD_VERB_SET_HDMI_DIP_DATA 0x731 + +#define HDA_CMD_VERB_GET_HDMI_DIP_XMIT 0xf32 +#define HDA_CMD_VERB_SET_HDMI_DIP_XMIT 0x732 + +#define HDA_CMD_VERB_GET_HDMI_CP_CTRL 0xf33 +#define HDA_CMD_VERB_SET_HDMI_CP_CTRL 0x733 + +#define HDA_CMD_VERB_GET_HDMI_CHAN_SLOT 0xf34 +#define HDA_CMD_VERB_SET_HDMI_CHAN_SLOT 0x734 + +#define HDA_CMD_GET_HDMI_CHAN_SLOT(cad, nid) \ + (HDA_CMD_12BIT((cad), (nid), \ + HDA_CMD_VERB_GET_HDMI_CHAN_SLOT, 0x0)) +#define HDA_CMD_SET_HDMI_CHAN_SLOT(cad, nid, payload) \ + (HDA_CMD_12BIT((cad), (nid), \ + HDA_CMD_VERB_SET_HDMI_CHAN_SLOT, (payload))) + /* Function Reset */ #define HDA_CMD_VERB_FUNCTION_RESET 0x7ff @@ -779,6 +815,10 @@ #define HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_SHIFT 20 #define HDA_PARAM_AUDIO_WIDGET_CAP_DELAY_MASK 0x000f0000 #define HDA_PARAM_AUDIO_WIDGET_CAP_DELAY_SHIFT 16 +#define HDA_PARAM_AUDIO_WIDGET_CAP_CC_EXT_MASK 0x0000e000 +#define HDA_PARAM_AUDIO_WIDGET_CAP_CC_EXT_SHIFT 13 +#define HDA_PARAM_AUDIO_WIDGET_CAP_CP_MASK 0x00001000 +#define HDA_PARAM_AUDIO_WIDGET_CAP_CP_SHIFT 12 #define HDA_PARAM_AUDIO_WIDGET_CAP_LR_SWAP_MASK 0x00000800 #define HDA_PARAM_AUDIO_WIDGET_CAP_LR_SWAP_SHIFT 11 #define HDA_PARAM_AUDIO_WIDGET_CAP_POWER_CTRL_MASK 0x00000400 @@ -810,6 +850,14 @@ #define HDA_PARAM_AUDIO_WIDGET_CAP_DELAY(param) \ (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_DELAY_MASK) >> \ HDA_PARAM_AUDIO_WIDGET_CAP_DELAY_SHIFT) +#define HDA_PARAM_AUDIO_WIDGET_CAP_CC(param) \ + ((((param) & HDA_PARAM_AUDIO_WIDGET_CAP_CC_EXT_MASK) >> \ + (HDA_PARAM_AUDIO_WIDGET_CAP_CC_EXT_SHIFT - 1)) | \ + (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_STEREO_MASK) >> \ + HDA_PARAM_AUDIO_WIDGET_CAP_STEREO_SHIFT)) +#define HDA_PARAM_AUDIO_WIDGET_CAP_CP(param) \ + (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_CP_MASK) >> \ + HDA_PARAM_AUDIO_WIDGET_CAP_CP_SHIFT) #define HDA_PARAM_AUDIO_WIDGET_CAP_LR_SWAP(param) \ (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_LR_SWAP_MASK) >> \ HDA_PARAM_AUDIO_WIDGET_CAP_LR_SWAP_SHIFT) @@ -971,6 +1019,10 @@ /* Pin Capabilities */ #define HDA_PARAM_PIN_CAP 0x0c +#define HDA_PARAM_PIN_CAP_HBR_MASK 0x08000000 +#define HDA_PARAM_PIN_CAP_HBR_SHIFT 27 +#define HDA_PARAM_PIN_CAP_DP_MASK 0x01000000 +#define HDA_PARAM_PIN_CAP_DP_SHIFT 24 #define HDA_PARAM_PIN_CAP_EAPD_CAP_MASK 0x00010000 #define HDA_PARAM_PIN_CAP_EAPD_CAP_SHIFT 16 #define HDA_PARAM_PIN_CAP_VREF_CTRL_MASK 0x0000ff00 @@ -985,6 +1037,8 @@ #define HDA_PARAM_PIN_CAP_VREF_CTRL_50_SHIFT 9 #define HDA_PARAM_PIN_CAP_VREF_CTRL_HIZ_MASK 0x00000100 #define HDA_PARAM_PIN_CAP_VREF_CTRL_HIZ_SHIFT 8 +#define HDA_PARAM_PIN_CAP_HDMI_MASK 0x00000080 +#define HDA_PARAM_PIN_CAP_HDMI_SHIFT 7 #define HDA_PARAM_PIN_CAP_BALANCED_IO_PINS_MASK 0x00000040 #define HDA_PARAM_PIN_CAP_BALANCED_IO_PINS_SHIFT 6 #define HDA_PARAM_PIN_CAP_INPUT_CAP_MASK 0x00000020 @@ -1000,6 +1054,12 @@ #define HDA_PARAM_PIN_CAP_IMP_SENSE_CAP_MASK 0x00000001 #define HDA_PARAM_PIN_CAP_IMP_SENSE_CAP_SHIFT 0 +#define HDA_PARAM_PIN_CAP_HBR(param) \ + (((param) & HDA_PARAM_PIN_CAP_HBR_MASK) >> \ + HDA_PARAM_PIN_CAP_HBR_SHIFT) +#define HDA_PARAM_PIN_CAP_DP(param) \ + (((param) & HDA_PARAM_PIN_CAP_DP_MASK) >> \ + HDA_PARAM_PIN_CAP_DP_SHIFT) #define HDA_PARAM_PIN_CAP_EAPD_CAP(param) \ (((param) & HDA_PARAM_PIN_CAP_EAPD_CAP_MASK) >> \ HDA_PARAM_PIN_CAP_EAPD_CAP_SHIFT) @@ -1021,6 +1081,9 @@ #define HDA_PARAM_PIN_CAP_VREF_CTRL_HIZ(param) \ (((param) & HDA_PARAM_PIN_CAP_VREF_CTRL_HIZ_MASK) >> \ HDA_PARAM_PIN_CAP_VREF_CTRL_HIZ_SHIFT) +#define HDA_PARAM_PIN_CAP_HDMI(param) \ + (((param) & HDA_PARAM_PIN_CAP_HDMI_MASK) >> \ + HDA_PARAM_PIN_CAP_HDMI_SHIFT) #define HDA_PARAM_PIN_CAP_BALANCED_IO_PINS(param) \ (((param) & HDA_PARAM_PIN_CAP_BALANCED_IO_PINS_MASK) >> \ HDA_PARAM_PIN_CAP_BALANCED_IO_PINS_SHIFT) Modified: stable/8/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/8/sys/dev/sound/pci/hda/hdac.c Mon Nov 23 09:22:38 2009 (r199706) +++ stable/8/sys/dev/sound/pci/hda/hdac.c Mon Nov 23 09:26:30 2009 (r199707) @@ -38,7 +38,6 @@ * 2) HDA Codecs support, which may include * - HDA * - Modem - * - HDMI * 3) Widget parser - the real magic of why this driver works on so * many hardwares with minimal vendor specific quirk. The original * parser was written using Ruby and can be found at @@ -87,7 +86,7 @@ #include "mixer_if.h" -#define HDA_DRV_TEST_REV "20090624_0136" +#define HDA_DRV_TEST_REV "20090929_0137" SND_DECLARE_FILE("$FreeBSD$"); @@ -623,6 +622,7 @@ static const struct { #define HDA_CODEC_ALC882 HDA_CODEC_CONSTRUCT(REALTEK, 0x0882) #define HDA_CODEC_ALC883 HDA_CODEC_CONSTRUCT(REALTEK, 0x0883) #define HDA_CODEC_ALC885 HDA_CODEC_CONSTRUCT(REALTEK, 0x0885) +#define HDA_CODEC_ALC887 HDA_CODEC_CONSTRUCT(REALTEK, 0x0887) #define HDA_CODEC_ALC888 HDA_CODEC_CONSTRUCT(REALTEK, 0x0888) #define HDA_CODEC_ALC889 HDA_CODEC_CONSTRUCT(REALTEK, 0x0889) #define HDA_CODEC_ALCXXXX HDA_CODEC_CONSTRUCT(REALTEK, 0xffff) @@ -808,6 +808,7 @@ static const struct { { HDA_CODEC_ALC882, "Realtek ALC882" }, { HDA_CODEC_ALC883, "Realtek ALC883" }, { HDA_CODEC_ALC885, "Realtek ALC885" }, + { HDA_CODEC_ALC887, "Realtek ALC887" }, { HDA_CODEC_ALC888, "Realtek ALC888" }, { HDA_CODEC_ALC889, "Realtek ALC889" }, { HDA_CODEC_AD1882, "Analog Devices AD1882" }, @@ -3485,6 +3486,14 @@ hdac_stream_setup(struct hdac_chan *ch) } hdac_command(sc, HDA_CMD_SET_CONV_STREAM_CHAN(cad, ch->io[i], c), cad); +#if 0 + hdac_command(sc, + HDA_CMD_SET_CONV_CHAN_COUNT(cad, ch->io[i], 1), cad); + hdac_command(sc, + HDA_CMD_SET_HDMI_CHAN_SLOT(cad, ch->io[i], 0x00), cad); + hdac_command(sc, + HDA_CMD_SET_HDMI_CHAN_SLOT(cad, ch->io[i], 0x11), cad); +#endif chn += HDA_PARAM_AUDIO_WIDGET_CAP_STEREO(w->param.widget_cap) ? 2 : 1; @@ -4492,7 +4501,7 @@ hdac_audio_as_parse(struct hdac_devinfo for (i = 0; i < max; i++) { as[i].hpredir = -1; as[i].chan = -1; - as[i].digital = 1; + as[i].digital = 0; } /* Scan associations skipping as=0. */ @@ -4547,8 +4556,14 @@ hdac_audio_as_parse(struct hdac_devinfo __func__, w->nid, j); as[cnt].enable = 0; } - if (!HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap)) - as[cnt].digital = 0; + if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap)) { + if (HDA_PARAM_PIN_CAP_DP(w->wclass.pin.cap)) + as[cnt].digital = 3; + else if (HDA_PARAM_PIN_CAP_HDMI(w->wclass.pin.cap)) + as[cnt].digital = 2; + else + as[cnt].digital = 1; + } /* Headphones with seq=15 may mean redirection. */ if (type == HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT && seq == 15) @@ -6548,15 +6563,15 @@ hdac_create_pcms(struct hdac_devinfo *de devinfo->function.audio.devs[i].devinfo = devinfo; devinfo->function.audio.devs[i].play = -1; devinfo->function.audio.devs[i].rec = -1; - devinfo->function.audio.devs[i].digital = 2; + devinfo->function.audio.devs[i].digital = 255; } for (i = 0; i < devinfo->function.audio.ascnt; i++) { if (as[i].enable == 0) continue; for (j = 0; j < devinfo->function.audio.num_devs; j++) { - if (devinfo->function.audio.devs[j].digital != 2 && - devinfo->function.audio.devs[j].digital != - as[i].digital) + if (devinfo->function.audio.devs[j].digital != 255 && + (!devinfo->function.audio.devs[j].digital) != + (!as[i].digital)) continue; if (as[i].dir == HDA_CTL_IN) { if (devinfo->function.audio.devs[j].rec >= 0) @@ -6732,6 +6747,8 @@ hdac_dump_pin(struct hdac_softc *sc, str printf(" IN"); if (HDA_PARAM_PIN_CAP_BALANCED_IO_PINS(pincap)) printf(" BAL"); + if (HDA_PARAM_PIN_CAP_HDMI(pincap)) + printf(" HDMI"); if (HDA_PARAM_PIN_CAP_VREF_CTRL(pincap)) { printf(" VREF["); if (HDA_PARAM_PIN_CAP_VREF_CTRL_50(pincap)) @@ -6748,6 +6765,10 @@ hdac_dump_pin(struct hdac_softc *sc, str } if (HDA_PARAM_PIN_CAP_EAPD_CAP(pincap)) printf(" EAPD"); + if (HDA_PARAM_PIN_CAP_DP(pincap)) + printf(" DP"); + if (HDA_PARAM_PIN_CAP_HBR(pincap)) + printf(" HBR"); printf("\n"); device_printf(sc->dev, " Pin config: 0x%08x\n", w->wclass.pin.config); @@ -6855,8 +6876,11 @@ hdac_dump_nodes(struct hdac_devinfo *dev printf(" PROC"); if (HDA_PARAM_AUDIO_WIDGET_CAP_STRIPE(w->param.widget_cap)) printf(" STRIPE"); - if (HDA_PARAM_AUDIO_WIDGET_CAP_STEREO(w->param.widget_cap)) + j = HDA_PARAM_AUDIO_WIDGET_CAP_CC(w->param.widget_cap); + if (j == 1) printf(" STEREO"); + else if (j > 1) + printf(" %dCH", j + 1); printf("\n"); } if (w->bindas != -1) { @@ -7957,7 +7981,9 @@ hdac_pcm_probe(device_t dev) snprintf(buf, sizeof(buf), "HDA %s PCM #%d %s", hdac_codec_name(pdevinfo->devinfo->codec), pdevinfo->index, - pdevinfo->digital?"Digital":"Analog"); + (pdevinfo->digital == 3)?"DisplayPort": + ((pdevinfo->digital == 2)?"HDMI": + ((pdevinfo->digital)?"Digital":"Analog"))); device_set_desc_copy(dev, buf); return (0); } From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 23 09:28:18 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 834511065670; Mon, 23 Nov 2009 09:28:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3298F8FC1C; Mon, 23 Nov 2009 09:28:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAN9SGM8047859; Mon, 23 Nov 2009 09:28:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAN9SGb9047857; Mon, 23 Nov 2009 09:28:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911230928.nAN9SGb9047857@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Nov 2009 09:28:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199708 - stable/8/sys/dev/sound/pci/hda X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2009 09:28:18 -0000 Author: mav Date: Mon Nov 23 09:28:16 2009 New Revision: 199708 URL: http://svn.freebsd.org/changeset/base/199708 Log: MFC r199258: Add more codec IDs. Modified: stable/8/sys/dev/sound/pci/hda/hdac.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/8/sys/dev/sound/pci/hda/hdac.c Mon Nov 23 09:26:30 2009 (r199707) +++ stable/8/sys/dev/sound/pci/hda/hdac.c Mon Nov 23 09:28:16 2009 (r199708) @@ -86,7 +86,7 @@ #include "mixer_if.h" -#define HDA_DRV_TEST_REV "20090929_0137" +#define HDA_DRV_TEST_REV "20091113_0138" SND_DECLARE_FILE("$FreeBSD$"); @@ -764,6 +764,16 @@ static const struct { #define HDA_CODEC_VT1702_5 HDA_CODEC_CONSTRUCT(VIA, 0x5398) #define HDA_CODEC_VT1702_6 HDA_CODEC_CONSTRUCT(VIA, 0x6398) #define HDA_CODEC_VT1702_7 HDA_CODEC_CONSTRUCT(VIA, 0x7398) +#define HDA_CODEC_VT1716S_0 HDA_CODEC_CONSTRUCT(VIA, 0x0433) +#define HDA_CODEC_VT1716S_1 HDA_CODEC_CONSTRUCT(VIA, 0xa721) +#define HDA_CODEC_VT1718S_0 HDA_CODEC_CONSTRUCT(VIA, 0x0428) +#define HDA_CODEC_VT1718S_1 HDA_CODEC_CONSTRUCT(VIA, 0x4428) +#define HDA_CODEC_VT1812 HDA_CODEC_CONSTRUCT(VIA, 0x0448) +#define HDA_CODEC_VT1818S HDA_CODEC_CONSTRUCT(VIA, 0x0440) +#define HDA_CODEC_VT1828S HDA_CODEC_CONSTRUCT(VIA, 0x4441) +#define HDA_CODEC_VT2002P_0 HDA_CODEC_CONSTRUCT(VIA, 0x0438) +#define HDA_CODEC_VT2002P_1 HDA_CODEC_CONSTRUCT(VIA, 0x4438) +#define HDA_CODEC_VT2020 HDA_CODEC_CONSTRUCT(VIA, 0x0441) #define HDA_CODEC_VTXXXX HDA_CODEC_CONSTRUCT(VIA, 0xffff) /* ATI */ @@ -786,6 +796,7 @@ static const struct { #define HDA_CODEC_INTELG45_2 HDA_CODEC_CONSTRUCT(INTEL, 0x2802) #define HDA_CODEC_INTELG45_3 HDA_CODEC_CONSTRUCT(INTEL, 0x2803) #define HDA_CODEC_INTELG45_4 HDA_CODEC_CONSTRUCT(INTEL, 0x29fb) +#define HDA_CODEC_INTELQ57 HDA_CODEC_CONSTRUCT(INTEL, 0x0054) #define HDA_CODEC_INTELXXXX HDA_CODEC_CONSTRUCT(INTEL, 0xffff) /* Codecs */ @@ -917,6 +928,16 @@ static const struct { { HDA_CODEC_VT1702_5, "VIA VT1702_5" }, { HDA_CODEC_VT1702_6, "VIA VT1702_6" }, { HDA_CODEC_VT1702_7, "VIA VT1702_7" }, + { HDA_CODEC_VT1716S_0, "VIA VT1716S_0" }, + { HDA_CODEC_VT1716S_1, "VIA VT1716S_1" }, + { HDA_CODEC_VT1718S_0, "VIA VT1718S_0" }, + { HDA_CODEC_VT1718S_1, "VIA VT1718S_1" }, + { HDA_CODEC_VT1812, "VIA VT1812" }, + { HDA_CODEC_VT1818S, "VIA VT1818S" }, + { HDA_CODEC_VT1828S, "VIA VT1828S" }, + { HDA_CODEC_VT2002P_0, "VIA VT2002P_0" }, + { HDA_CODEC_VT2002P_1, "VIA VT2002P_1" }, + { HDA_CODEC_VT2020, "VIA VT2020" }, { HDA_CODEC_ATIRS600_1,"ATI RS600 HDMI" }, { HDA_CODEC_ATIRS600_2,"ATI RS600 HDMI" }, { HDA_CODEC_ATIRS690, "ATI RS690/780 HDMI" }, @@ -930,6 +951,7 @@ static const struct { { HDA_CODEC_INTELG45_2, "Intel G45 HDMI" }, { HDA_CODEC_INTELG45_3, "Intel G45 HDMI" }, { HDA_CODEC_INTELG45_4, "Intel G45 HDMI" }, + { HDA_CODEC_INTELQ57, "Intel Q57 HDMI" }, { HDA_CODEC_SII1390, "Silicon Image SiI1390 HDMI" }, { HDA_CODEC_SII1392, "Silicon Image SiI1392 HDMI" }, /* Unknown codec */ From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 23 09:44:09 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB53D106566C; Mon, 23 Nov 2009 09:44:09 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 635798FC15; Mon, 23 Nov 2009 09:44:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAN9i9UJ048331; Mon, 23 Nov 2009 09:44:09 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAN9i9v8048329; Mon, 23 Nov 2009 09:44:09 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200911230944.nAN9i9v8048329@svn.freebsd.org> From: Christian Brueffer Date: Mon, 23 Nov 2009 09:44:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199709 - stable/8/lib/libc/locale X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2009 09:44:09 -0000 Author: brueffer Date: Mon Nov 23 09:44:08 2009 New Revision: 199709 URL: http://svn.freebsd.org/changeset/base/199709 Log: MFC: r199320 Fix grammar. Modified: stable/8/lib/libc/locale/nl_langinfo.3 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/locale/nl_langinfo.3 ============================================================================== --- stable/8/lib/libc/locale/nl_langinfo.3 Mon Nov 23 09:28:16 2009 (r199708) +++ stable/8/lib/libc/locale/nl_langinfo.3 Mon Nov 23 09:44:08 2009 (r199709) @@ -53,7 +53,7 @@ with a category corresponding to the cat or to the category .Dv LC_ALL , -may overwrite buffer pointed by the return value. +may overwrite the buffer pointed to by the return value. .Sh RETURN VALUES In a locale where langinfo data is not defined, .Fn nl_langinfo From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 23 17:54:57 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF4AA106566B; Mon, 23 Nov 2009 17:54:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE15F8FC21; Mon, 23 Nov 2009 17:54:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nANHsvbI064107; Mon, 23 Nov 2009 17:54:57 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nANHsvsA064105; Mon, 23 Nov 2009 17:54:57 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911231754.nANHsvsA064105@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Nov 2009 17:54:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199716 - stable/8/sys/cam/ata X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2009 17:54:57 -0000 Author: mav Date: Mon Nov 23 17:54:57 2009 New Revision: 199716 URL: http://svn.freebsd.org/changeset/base/199716 Log: MFC r199321: Disable PortMultiplier Async Notifications for time of ports reset. They are useless at that time, but confuse Marvell AHCI. Add quirk for SiI57XX Port Multipliers, to hide extra port. Modified: stable/8/sys/cam/ata/ata_pmp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cam/ata/ata_pmp.c ============================================================================== --- stable/8/sys/cam/ata/ata_pmp.c Mon Nov 23 16:08:15 2009 (r199715) +++ stable/8/sys/cam/ata/ata_pmp.c Mon Nov 23 17:54:57 2009 (r199716) @@ -63,11 +63,12 @@ __FBSDID("$FreeBSD$"); typedef enum { PMP_STATE_NORMAL, PMP_STATE_PORTS, - PMP_STATE_CONFIG, + PMP_STATE_PRECONFIG, PMP_STATE_RESET, PMP_STATE_CONNECT, PMP_STATE_CHECK, PMP_STATE_CLEAR, + PMP_STATE_CONFIG, PMP_STATE_SCAN } pmp_state; @@ -436,7 +437,7 @@ pmpstart(struct cam_periph *periph, unio pmp_default_timeout * 1000); ata_pm_read_cmd(ataio, 2, 15); break; - case PMP_STATE_CONFIG: + case PMP_STATE_PRECONFIG: cam_fill_ataio(ataio, pmp_retry_count, pmpdone, @@ -445,7 +446,7 @@ pmpstart(struct cam_periph *periph, unio /*data_ptr*/NULL, /*dxfer_len*/0, pmp_default_timeout * 1000); - ata_pm_write_cmd(ataio, 0x60, 15, 0xf); + ata_pm_write_cmd(ataio, 0x60, 15, 0x0); break; case PMP_STATE_RESET: cam_fill_ataio(ataio, @@ -495,6 +496,17 @@ printf("PM RESET %d%s\n", softc->pm_step pmp_default_timeout * 1000); ata_pm_write_cmd(ataio, 1, softc->pm_step, 0xFFFFFFFF); break; + case PMP_STATE_CONFIG: + cam_fill_ataio(ataio, + pmp_retry_count, + pmpdone, + /*flags*/CAM_DIR_NONE, + 0, + /*data_ptr*/NULL, + /*dxfer_len*/0, + pmp_default_timeout * 1000); + ata_pm_write_cmd(ataio, 0x60, 15, 0xf); + break; default: break; } @@ -554,24 +566,29 @@ pmpdone(struct cam_periph *periph, union (done_ccb->ataio.res.lba_mid << 16) + (done_ccb->ataio.res.lba_low << 8) + done_ccb->ataio.res.sector_count; - /* This PM declares 6 ports, while only 5 of them are real. + /* This PMP declares 6 ports, while only 5 of them are real. * Port 5 is enclosure management bridge port, which has implementation * problems, causing probe faults. Hide it for now. */ if (softc->pm_pid == 0x37261095 && softc->pm_ports == 6) softc->pm_ports = 5; - /* This PM declares 7 ports, while only 5 of them are real. + /* This PMP declares 7 ports, while only 5 of them are real. * Port 5 is some fake "Config Disk" with 640 sectors size, * port 6 is enclosure management bridge port. * Both fake ports has implementation problems, causing * probe faults. Hide them for now. */ if (softc->pm_pid == 0x47261095 && softc->pm_ports == 7) softc->pm_ports = 5; + /* These PMPs declare one more port then actually have, + * for configuration purposes. Hide it for now. */ + if (softc->pm_pid == 0x57231095 || softc->pm_pid == 0x57331095 || + softc->pm_pid == 0x57341095 || softc->pm_pid == 0x57441095) + softc->pm_ports--; printf("PM ports: %d\n", softc->pm_ports); - softc->state = PMP_STATE_CONFIG; + softc->state = PMP_STATE_PRECONFIG; xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); return; - case PMP_STATE_CONFIG: + case PMP_STATE_PRECONFIG: softc->pm_step = 0; softc->state = PMP_STATE_RESET; softc->reset |= ~softc->found; @@ -658,11 +675,15 @@ pmpdone(struct cam_periph *periph, union return; case PMP_STATE_CLEAR: softc->pm_step++; - if (softc->pm_step < softc->pm_ports) { - xpt_release_ccb(done_ccb); - xpt_schedule(periph, priority); - return; - } else if (softc->found) { + if (softc->pm_step >= softc->pm_ports) { + softc->state = PMP_STATE_CONFIG; + softc->pm_step = 0; + } + xpt_release_ccb(done_ccb); + xpt_schedule(periph, priority); + return; + case PMP_STATE_CONFIG: + if (softc->found) { softc->pm_step = 0; softc->state = PMP_STATE_SCAN; work_ccb = xpt_alloc_ccb_nowait(); From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 24 03:17:00 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 934231065672; Tue, 24 Nov 2009 03:17:00 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7257D8FC08; Tue, 24 Nov 2009 03:17:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAO3H0Zr003554; Tue, 24 Nov 2009 03:17:00 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAO3H0P6003552; Tue, 24 Nov 2009 03:17:00 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200911240317.nAO3H0P6003552@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 24 Nov 2009 03:17:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199729 - stable/8/sys/ia64/include X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 03:17:00 -0000 Author: marcel Date: Tue Nov 24 03:17:00 2009 New Revision: 199729 URL: http://svn.freebsd.org/changeset/base/199729 Log: MFC r198338: o Align function on a 32-byte boundary so that the core's front-end can deliver 2 bundles per cycle to the back-end. o Mark syscall stubs with a special unwind ABI tag so that unwind libraries know how to unwind. Modified: stable/8/sys/ia64/include/asm.h Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/ia64/include/asm.h ============================================================================== --- stable/8/sys/ia64/include/asm.h Tue Nov 24 01:44:11 2009 (r199728) +++ stable/8/sys/ia64/include/asm.h Tue Nov 24 03:17:00 2009 (r199729) @@ -61,7 +61,7 @@ */ #define ENTRY(_name_, _n_args_) \ .global _name_; \ - .align 16; \ + .align 32; \ .proc _name_; \ _name_:; \ .regstk _n_args_, 0, 0, 0; \ @@ -69,7 +69,7 @@ _name_:; \ #define ENTRY_NOPROFILE(_name_, _n_args_) \ .global _name_; \ - .align 16; \ + .align 32; \ .proc _name_; \ _name_:; \ .regstk _n_args_, 0, 0, 0 @@ -79,7 +79,7 @@ _name_:; \ * Declare a local leaf function. */ #define STATIC_ENTRY(_name_, _n_args_) \ - .align 16; \ + .align 32; \ .proc _name_; \ _name_:; \ .regstk _n_args_, 0, 0, 0 \ @@ -161,6 +161,10 @@ label: ASCIZ msg; \ #define SYSCALLNUM(name) SYS_ ## name #define CALLSYS_NOERROR(name) \ + .prologue ; \ + .unwabi @svr4, 'S' ; \ + .save rp, r0 ; \ + .body ; \ { .mmi ; \ alloc r9 = ar.pfs, 0, 0, 8, 0 ; \ mov r31 = ar.k5 ; \ From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 24 03:23:41 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F359106566B; Tue, 24 Nov 2009 03:23:41 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2DFD78FC1A; Tue, 24 Nov 2009 03:23:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAO3NeP1003821; Tue, 24 Nov 2009 03:23:41 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAO3NesL003820; Tue, 24 Nov 2009 03:23:40 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200911240323.nAO3NesL003820@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 24 Nov 2009 03:23:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199730 - in stable/8/lib/libthr/arch/ia64: . ia64 include X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 03:23:41 -0000 Author: marcel Date: Tue Nov 24 03:23:40 2009 New Revision: 199730 URL: http://svn.freebsd.org/changeset/base/199730 Log: MFC r198450: Implement _umtx_op_err() for ia64. Added: stable/8/lib/libthr/arch/ia64/ia64/_umtx_op_err.S - copied unchanged from r198450, head/lib/libthr/arch/ia64/ia64/_umtx_op_err.S Modified: stable/8/lib/libthr/arch/ia64/Makefile.inc stable/8/lib/libthr/arch/ia64/include/pthread_md.h Directory Properties: stable/8/lib/libthr/ (props changed) Modified: stable/8/lib/libthr/arch/ia64/Makefile.inc ============================================================================== --- stable/8/lib/libthr/arch/ia64/Makefile.inc Tue Nov 24 03:17:00 2009 (r199729) +++ stable/8/lib/libthr/arch/ia64/Makefile.inc Tue Nov 24 03:23:40 2009 (r199730) @@ -2,4 +2,4 @@ .PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} -SRCS+= pthread_md.c +SRCS+= _umtx_op_err.S pthread_md.c Copied: stable/8/lib/libthr/arch/ia64/ia64/_umtx_op_err.S (from r198450, head/lib/libthr/arch/ia64/ia64/_umtx_op_err.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/lib/libthr/arch/ia64/ia64/_umtx_op_err.S Tue Nov 24 03:23:40 2009 (r199730, copy of r198450, head/lib/libthr/arch/ia64/ia64/_umtx_op_err.S) @@ -0,0 +1,35 @@ +/*- + * Copyright (c) 2009 Marcel Moolenaar + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +ENTRY(_umtx_op_err, 5) + CALLSYS_NOERROR(_umtx_op) + br.ret.sptk.few rp +END(_umtx_op_err) Modified: stable/8/lib/libthr/arch/ia64/include/pthread_md.h ============================================================================== --- stable/8/lib/libthr/arch/ia64/include/pthread_md.h Tue Nov 24 03:17:00 2009 (r199729) +++ stable/8/lib/libthr/arch/ia64/include/pthread_md.h Tue Nov 24 03:23:40 2009 (r199730) @@ -33,6 +33,8 @@ #define CPU_SPINWAIT +#define HAS__UMTX_OP_ERR 1 + #define DTV_OFFSET offsetof(struct tcb, tcb_dtv) /* From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 24 03:28:36 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10B98106566B; Tue, 24 Nov 2009 03:28:36 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F2B858FC08; Tue, 24 Nov 2009 03:28:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAO3SZqa003984; Tue, 24 Nov 2009 03:28:35 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAO3SZZ2003982; Tue, 24 Nov 2009 03:28:35 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200911240328.nAO3SZZ2003982@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 24 Nov 2009 03:28:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199731 - stable/8/sys/ia64/conf X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 03:28:36 -0000 Author: marcel Date: Tue Nov 24 03:28:35 2009 New Revision: 199731 URL: http://svn.freebsd.org/changeset/base/199731 Log: MFC r198452: Add PRINTF_BUFR_SIZE=128, since we have SMP by default. While here, fix tabulation. Modified: stable/8/sys/ia64/conf/GENERIC Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/ia64/conf/GENERIC ============================================================================== --- stable/8/sys/ia64/conf/GENERIC Tue Nov 24 03:23:40 2009 (r199730) +++ stable/8/sys/ia64/conf/GENERIC Tue Nov 24 03:28:35 2009 (r199731) @@ -37,13 +37,14 @@ options INET6 # IPv6 communications pr options INVARIANTS # Enable calls of extra sanity checking options INVARIANT_SUPPORT # required by INVARIANTS options KTRACE # ktrace(1) syscall trace support -options MAC # TrustedBSD MAC Framework +options MAC # TrustedBSD MAC Framework options MD_ROOT # MD usable as root device options MSDOSFS # MSDOS Filesystem options NFSCLIENT # Network Filesystem Client options NFSSERVER # Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as root device +options PRINTF_BUFR_SIZE=128 # Printf buffering to limit interspersion options PROCFS # Process filesystem (/proc) options PSEUDOFS # Pseudo-filesystem framework options SCHED_ULE # ULE scheduler @@ -60,7 +61,7 @@ options UFS_ACL # Support for access c options UFS_DIRHASH # Hash-based directory lookup scheme options UFS_GJOURNAL # Enable gjournal-based UFS journaling options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B RT extensions -options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) +options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) # Various "busses" device firewire # FireWire bus code From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 24 03:32:42 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 700AD1065670; Tue, 24 Nov 2009 03:32:42 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E44B8FC12; Tue, 24 Nov 2009 03:32:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAO3WgMH004133; Tue, 24 Nov 2009 03:32:42 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAO3WgnK004124; Tue, 24 Nov 2009 03:32:42 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200911240332.nAO3WgnK004124@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 24 Nov 2009 03:32:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199732 - in stable/8/sys: conf ia64/ia64 ia64/include X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 03:32:42 -0000 Author: marcel Date: Tue Nov 24 03:32:42 2009 New Revision: 199732 URL: http://svn.freebsd.org/changeset/base/199732 Log: MFC r198733: Reimplement the lazy FP context switching... ...This change fixes the high FP inconsistency panics. Added: stable/8/sys/ia64/ia64/highfp.c - copied unchanged from r198733, head/sys/ia64/ia64/highfp.c Modified: stable/8/sys/conf/files.ia64 stable/8/sys/ia64/ia64/interrupt.c stable/8/sys/ia64/ia64/machdep.c stable/8/sys/ia64/ia64/trap.c stable/8/sys/ia64/ia64/vm_machdep.c stable/8/sys/ia64/include/md_var.h stable/8/sys/ia64/include/proc.h Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/conf/files.ia64 ============================================================================== --- stable/8/sys/conf/files.ia64 Tue Nov 24 03:28:35 2009 (r199731) +++ stable/8/sys/conf/files.ia64 Tue Nov 24 03:32:42 2009 (r199732) @@ -85,6 +85,7 @@ ia64/ia64/elf_machdep.c standard ia64/ia64/emulate.c standard ia64/ia64/exception.S standard ia64/ia64/gdb_machdep.c optional gdb +ia64/ia64/highfp.c standard ia64/ia64/in_cksum.c optional inet ia64/ia64/interrupt.c standard ia64/ia64/locore.S standard no-obj Copied: stable/8/sys/ia64/ia64/highfp.c (from r198733, head/sys/ia64/ia64/highfp.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/ia64/ia64/highfp.c Tue Nov 24 03:32:42 2009 (r199732, copy of r198733, head/sys/ia64/ia64/highfp.c) @@ -0,0 +1,181 @@ +/*- + * Copyright (c) 2009 Marcel Moolenaar + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +static struct mtx ia64_highfp_mtx; + +static void +ia64_highfp_init(void *_) +{ + mtx_init(&ia64_highfp_mtx, "High FP lock", NULL, MTX_SPIN); +} +SYSINIT(ia64_highfp_init, SI_SUB_LOCK, SI_ORDER_ANY, ia64_highfp_init, NULL); + +#ifdef SMP +static int +ia64_highfp_ipi(struct pcpu *cpu) +{ + int error; + + ipi_send(cpu, IPI_HIGH_FP); + error = msleep_spin(&cpu->pc_fpcurthread, &ia64_highfp_mtx, + "High FP", 0); + return (error); +} +#endif + +int +ia64_highfp_drop(struct thread *td) +{ + struct pcb *pcb; + struct pcpu *cpu; + + pcb = td->td_pcb; + + mtx_lock_spin(&ia64_highfp_mtx); + cpu = pcb->pcb_fpcpu; + if (cpu != NULL) { + KASSERT(cpu->pc_fpcurthread == td, + ("cpu->pc_fpcurthread != td")); + td->td_frame->tf_special.psr |= IA64_PSR_DFH; + pcb->pcb_fpcpu = NULL; + cpu->pc_fpcurthread = NULL; + } + mtx_unlock_spin(&ia64_highfp_mtx); + + return ((cpu != NULL) ? 1 : 0); +} + +int +ia64_highfp_enable(struct thread *td, struct trapframe *tf) +{ + struct pcb *pcb; + struct pcpu *cpu; + struct thread *td1; + + pcb = td->td_pcb; + + mtx_lock_spin(&ia64_highfp_mtx); + KASSERT((tf->tf_special.psr & IA64_PSR_DFH) != 0, + ("(tf->tf_special.psr & IA64_PSR_DFH) == 0")); + cpu = pcb->pcb_fpcpu; +#ifdef SMP + if (cpu != NULL && cpu != pcpup) { + KASSERT(cpu->pc_fpcurthread == td, + ("cpu->pc_fpcurthread != td")); + ia64_highfp_ipi(cpu); + } +#endif + td1 = PCPU_GET(fpcurthread); + if (td1 != NULL && td1 != td) { + KASSERT(td1->td_pcb->pcb_fpcpu == pcpup, + ("td1->td_pcb->pcb_fpcpu != pcpup")); + save_high_fp(&td1->td_pcb->pcb_high_fp); + td1->td_frame->tf_special.psr |= IA64_PSR_DFH; + td1->td_pcb->pcb_fpcpu = NULL; + PCPU_SET(fpcurthread, NULL); + td1 = NULL; + } + if (td1 == NULL) { + KASSERT(pcb->pcb_fpcpu == NULL, ("pcb->pcb_fpcpu != NULL")); + KASSERT(PCPU_GET(fpcurthread) == NULL, + ("PCPU_GET(fpcurthread) != NULL")); + restore_high_fp(&pcb->pcb_high_fp); + PCPU_SET(fpcurthread, td); + pcb->pcb_fpcpu = pcpup; + tf->tf_special.psr &= ~IA64_PSR_MFH; + } + tf->tf_special.psr &= ~IA64_PSR_DFH; + mtx_unlock_spin(&ia64_highfp_mtx); + + return ((td1 != NULL) ? 1 : 0); +} + +int +ia64_highfp_save(struct thread *td) +{ + struct pcb *pcb; + struct pcpu *cpu; + + pcb = td->td_pcb; + + mtx_lock_spin(&ia64_highfp_mtx); + cpu = pcb->pcb_fpcpu; +#ifdef SMP + if (cpu != NULL && cpu != pcpup) { + KASSERT(cpu->pc_fpcurthread == td, + ("cpu->pc_fpcurthread != td")); + ia64_highfp_ipi(cpu); + } else +#endif + if (cpu != NULL) { + KASSERT(cpu->pc_fpcurthread == td, + ("cpu->pc_fpcurthread != td")); + save_high_fp(&pcb->pcb_high_fp); + td->td_frame->tf_special.psr |= IA64_PSR_DFH; + pcb->pcb_fpcpu = NULL; + cpu->pc_fpcurthread = NULL; + } + mtx_unlock_spin(&ia64_highfp_mtx); + + return ((cpu != NULL) ? 1 : 0); +} + +#ifdef SMP +int +ia64_highfp_save_ipi(void) +{ + struct thread *td; + + mtx_lock_spin(&ia64_highfp_mtx); + td = PCPU_GET(fpcurthread); + if (td != NULL) { + KASSERT(td->td_pcb->pcb_fpcpu == pcpup, + ("td->td_pcb->pcb_fpcpu != pcpup")); + save_high_fp(&td->td_pcb->pcb_high_fp); + td->td_frame->tf_special.psr |= IA64_PSR_DFH; + td->td_pcb->pcb_fpcpu = NULL; + PCPU_SET(fpcurthread, NULL); + } + mtx_unlock_spin(&ia64_highfp_mtx); + wakeup(&PCPU_GET(fpcurthread)); + + return ((td != NULL) ? 1 : 0); +} +#endif Modified: stable/8/sys/ia64/ia64/interrupt.c ============================================================================== --- stable/8/sys/ia64/ia64/interrupt.c Tue Nov 24 03:28:35 2009 (r199731) +++ stable/8/sys/ia64/ia64/interrupt.c Tue Nov 24 03:32:42 2009 (r199732) @@ -216,14 +216,7 @@ interrupt(struct trapframe *tf) asts[PCPU_GET(cpuid)]++; CTR1(KTR_SMP, "IPI_AST, cpuid=%d", PCPU_GET(cpuid)); } else if (vector == ipi_vector[IPI_HIGH_FP]) { - struct thread *thr = PCPU_GET(fpcurthread); - if (thr != NULL) { - mtx_lock_spin(&thr->td_md.md_highfp_mtx); - save_high_fp(&thr->td_pcb->pcb_high_fp); - thr->td_pcb->pcb_fpcpu = NULL; - PCPU_SET(fpcurthread, NULL); - mtx_unlock_spin(&thr->td_md.md_highfp_mtx); - } + ia64_highfp_save_ipi(); } else if (vector == ipi_vector[IPI_RENDEZVOUS]) { rdvs[PCPU_GET(cpuid)]++; CTR1(KTR_SMP, "IPI_RENDEZVOUS, cpuid=%d", PCPU_GET(cpuid)); Modified: stable/8/sys/ia64/ia64/machdep.c ============================================================================== --- stable/8/sys/ia64/ia64/machdep.c Tue Nov 24 03:28:35 2009 (r199731) +++ stable/8/sys/ia64/ia64/machdep.c Tue Nov 24 03:32:42 2009 (r199732) @@ -1467,81 +1467,6 @@ set_fpregs(struct thread *td, struct fpr return (0); } -/* - * High FP register functions. - */ - -int -ia64_highfp_drop(struct thread *td) -{ - struct pcb *pcb; - struct pcpu *cpu; - struct thread *thr; - - mtx_lock_spin(&td->td_md.md_highfp_mtx); - pcb = td->td_pcb; - cpu = pcb->pcb_fpcpu; - if (cpu == NULL) { - mtx_unlock_spin(&td->td_md.md_highfp_mtx); - return (0); - } - pcb->pcb_fpcpu = NULL; - thr = cpu->pc_fpcurthread; - cpu->pc_fpcurthread = NULL; - mtx_unlock_spin(&td->td_md.md_highfp_mtx); - - /* Post-mortem sanity checking. */ - KASSERT(thr == td, ("Inconsistent high FP state")); - return (1); -} - -int -ia64_highfp_save(struct thread *td) -{ - struct pcb *pcb; - struct pcpu *cpu; - struct thread *thr; - - /* Don't save if the high FP registers weren't modified. */ - if ((td->td_frame->tf_special.psr & IA64_PSR_MFH) == 0) - return (ia64_highfp_drop(td)); - - mtx_lock_spin(&td->td_md.md_highfp_mtx); - pcb = td->td_pcb; - cpu = pcb->pcb_fpcpu; - if (cpu == NULL) { - mtx_unlock_spin(&td->td_md.md_highfp_mtx); - return (0); - } -#ifdef SMP - if (td == curthread) - sched_pin(); - if (cpu != pcpup) { - mtx_unlock_spin(&td->td_md.md_highfp_mtx); - ipi_send(cpu, IPI_HIGH_FP); - if (td == curthread) - sched_unpin(); - while (pcb->pcb_fpcpu == cpu) - DELAY(100); - return (1); - } else { - save_high_fp(&pcb->pcb_high_fp); - if (td == curthread) - sched_unpin(); - } -#else - save_high_fp(&pcb->pcb_high_fp); -#endif - pcb->pcb_fpcpu = NULL; - thr = cpu->pc_fpcurthread; - cpu->pc_fpcurthread = NULL; - mtx_unlock_spin(&td->td_md.md_highfp_mtx); - - /* Post-mortem sanity cxhecking. */ - KASSERT(thr == td, ("Inconsistent high FP state")); - return (1); -} - void ia64_sync_icache(vm_offset_t va, vm_offset_t sz) { Modified: stable/8/sys/ia64/ia64/trap.c ============================================================================== --- stable/8/sys/ia64/ia64/trap.c Tue Nov 24 03:28:35 2009 (r199731) +++ stable/8/sys/ia64/ia64/trap.c Tue Nov 24 03:32:42 2009 (r199732) @@ -652,66 +652,10 @@ trap(int vector, struct trapframe *tf) break; case IA64_VEC_DISABLED_FP: { - struct pcpu *pcpu; - struct pcb *pcb; - struct thread *thr; - - /* Always fatal in kernel. Should never happen. */ - if (!user) + if (user) + ia64_highfp_enable(td, tf); + else trap_panic(vector, tf); - - sched_pin(); - thr = PCPU_GET(fpcurthread); - if (thr == td) { - /* - * Short-circuit handling the trap when this CPU - * already holds the high FP registers for this - * thread. We really shouldn't get the trap in the - * first place, but since it's only a performance - * issue and not a correctness issue, we emit a - * message for now, enable the high FP registers and - * return. - */ - printf("XXX: bogusly disabled high FP regs\n"); - tf->tf_special.psr &= ~IA64_PSR_DFH; - sched_unpin(); - goto out; - } else if (thr != NULL) { - mtx_lock_spin(&thr->td_md.md_highfp_mtx); - pcb = thr->td_pcb; - save_high_fp(&pcb->pcb_high_fp); - pcb->pcb_fpcpu = NULL; - PCPU_SET(fpcurthread, NULL); - mtx_unlock_spin(&thr->td_md.md_highfp_mtx); - thr = NULL; - } - - mtx_lock_spin(&td->td_md.md_highfp_mtx); - pcb = td->td_pcb; - pcpu = pcb->pcb_fpcpu; - -#ifdef SMP - if (pcpu != NULL) { - mtx_unlock_spin(&td->td_md.md_highfp_mtx); - ipi_send(pcpu, IPI_HIGH_FP); - while (pcb->pcb_fpcpu == pcpu) - DELAY(100); - mtx_lock_spin(&td->td_md.md_highfp_mtx); - pcpu = pcb->pcb_fpcpu; - thr = PCPU_GET(fpcurthread); - } -#endif - - if (thr == NULL && pcpu == NULL) { - restore_high_fp(&pcb->pcb_high_fp); - PCPU_SET(fpcurthread, td); - pcb->pcb_fpcpu = pcpup; - tf->tf_special.psr &= ~IA64_PSR_MFH; - tf->tf_special.psr &= ~IA64_PSR_DFH; - } - - mtx_unlock_spin(&td->td_md.md_highfp_mtx); - sched_unpin(); goto out; } Modified: stable/8/sys/ia64/ia64/vm_machdep.c ============================================================================== --- stable/8/sys/ia64/ia64/vm_machdep.c Tue Nov 24 03:28:35 2009 (r199731) +++ stable/8/sys/ia64/ia64/vm_machdep.c Tue Nov 24 03:32:42 2009 (r199732) @@ -120,14 +120,11 @@ cpu_thread_alloc(struct thread *td) sp -= sizeof(struct trapframe); td->td_frame = (struct trapframe *)sp; td->td_frame->tf_length = sizeof(struct trapframe); - mtx_init(&td->td_md.md_highfp_mtx, "High FP lock", NULL, MTX_SPIN); } void cpu_thread_free(struct thread *td) { - - mtx_destroy(&td->td_md.md_highfp_mtx); } void @@ -148,6 +145,8 @@ cpu_set_upcall(struct thread *td, struct struct pcb *pcb; struct trapframe *tf; + ia64_highfp_save(td0); + tf = td->td_frame; KASSERT(tf != NULL, ("foo")); bcopy(td0->td_frame, tf, sizeof(*tf)); Modified: stable/8/sys/ia64/include/md_var.h ============================================================================== --- stable/8/sys/ia64/include/md_var.h Tue Nov 24 03:28:35 2009 (r199731) +++ stable/8/sys/ia64/include/md_var.h Tue Nov 24 03:32:42 2009 (r199732) @@ -86,7 +86,9 @@ int ia64_emulate(struct trapframe *, str int ia64_flush_dirty(struct thread *, struct _special *); uint64_t ia64_get_hcdp(void); int ia64_highfp_drop(struct thread *); +int ia64_highfp_enable(struct thread *, struct trapframe *); int ia64_highfp_save(struct thread *); +int ia64_highfp_save_ipi(void); struct ia64_init_return ia64_init(void); void ia64_probe_sapics(void); void ia64_sync_icache(vm_offset_t, vm_size_t); Modified: stable/8/sys/ia64/include/proc.h ============================================================================== --- stable/8/sys/ia64/include/proc.h Tue Nov 24 03:28:35 2009 (r199731) +++ stable/8/sys/ia64/include/proc.h Tue Nov 24 03:32:42 2009 (r199732) @@ -30,7 +30,6 @@ #define _MACHINE_PROC_H_ struct mdthread { - struct mtx md_highfp_mtx; int md_spinlock_count; /* (k) */ int md_saved_intr; /* (k) */ }; From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 24 03:38:42 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A111106566C; Tue, 24 Nov 2009 03:38:42 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89D008FC08; Tue, 24 Nov 2009 03:38:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAO3cgok004369; Tue, 24 Nov 2009 03:38:42 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAO3cgM9004367; Tue, 24 Nov 2009 03:38:42 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200911240338.nAO3cgM9004367@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 24 Nov 2009 03:38:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199733 - stable/8/sys/nfsserver X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 03:38:42 -0000 Author: marcel Date: Tue Nov 24 03:38:42 2009 New Revision: 199733 URL: http://svn.freebsd.org/changeset/base/199733 Log: MFC r199274, r199284: Fix an obvious panic by not casting from a pointer that is 4-bytes alignment to a type that needs 8-byte alignment, and thus causing misaligned memory references. Modified: stable/8/sys/nfsserver/nfs_fha.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/nfsserver/nfs_fha.c ============================================================================== --- stable/8/sys/nfsserver/nfs_fha.c Tue Nov 24 03:32:42 2009 (r199732) +++ stable/8/sys/nfsserver/nfs_fha.c Tue Nov 24 03:38:42 2009 (r199733) @@ -206,7 +206,7 @@ fha_extract_info(struct svc_req *req, st if (error) goto out; - i->fh = *(const u_int64_t *)(fh.fh_generic.fh_fid.fid_data); + bcopy(fh.fh_generic.fh_fid.fid_data, &i->fh, sizeof(i->fh)); /* Content ourselves with zero offset for all but reads. */ if (procnum != NFSPROC_READ) From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 24 04:04:31 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6092A106568B for ; Tue, 24 Nov 2009 04:04:31 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.9]) by mx1.freebsd.org (Postfix) with ESMTP id E9D658FC18 for ; Tue, 24 Nov 2009 04:04:30 +0000 (UTC) Received: from vampire.homelinux.org (dslb-088-064-190-074.pools.arcor-ip.net [88.64.190.74]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0LsOqW-1OAGtF2CBU-012XyI; Tue, 24 Nov 2009 04:51:56 +0100 Received: (qmail 65458 invoked from network); 24 Nov 2009 03:51:47 -0000 Received: from kvm.laiers.local (HELO kvm.localnet) (192.168.4.188) by laiers.local with SMTP; 24 Nov 2009 03:51:47 -0000 From: Max Laier Organization: FreeBSD To: Marcel Moolenaar Date: Tue, 24 Nov 2009 04:51:45 +0100 User-Agent: KMail/1.12.3 (Linux/2.6.31-ARCH; KDE/4.3.3; x86_64; ; ) References: <200911240317.nAO3H0P6003552@svn.freebsd.org> In-Reply-To: <200911240317.nAO3H0P6003552@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <200911240451.46875.max@love2party.net> X-Provags-ID: V01U2FsdGVkX1/lCzUsyo/JOyLiwOSpZWeoZphLz71n6H9I5AX iY0J9KhtGtJKfgAz8VRRu6V7ZtNXNTCaR2ZZD8prhkSow7XUo3 0mXOdOKebl7Edxdao05aw== Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r199729 - stable/8/sys/ia64/include X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 04:04:31 -0000 On Tuesday 24 November 2009 04:17:00 Marcel Moolenaar wrote: > Author: marcel > Date: Tue Nov 24 03:17:00 2009 > New Revision: 199729 > URL: http://svn.freebsd.org/changeset/base/199729 > > Log: > MFC r198338: > o Align function on a 32-byte boundary so that the core's front-end > can deliver 2 bundles per cycle to the back-end. > o Mark syscall stubs with a special unwind ABI tag so that unwind > libraries know how to unwind. > > Modified: > stable/8/sys/ia64/include/asm.h > Directory Properties: > stable/8/sys/ (props changed) These MFCs seem to be missing mergeinfo for the contrib directories. -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 24 04:17:34 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C4CF106566B; Tue, 24 Nov 2009 04:17:34 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout027.mac.com (asmtpout027.mac.com [17.148.16.102]) by mx1.freebsd.org (Postfix) with ESMTP id 0284E8FC1E; Tue, 24 Nov 2009 04:17:33 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from macbook-pro.lan.xcllnt.net (mail.xcllnt.net [75.101.29.67]) by asmtp027.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KTL001NFIKCBM30@asmtp027.mac.com>; Mon, 23 Nov 2009 20:17:02 -0800 (PST) From: Marcel Moolenaar In-reply-to: <200911240451.46875.max@love2party.net> Date: Mon, 23 Nov 2009 20:17:00 -0800 Message-id: <85603446-C587-4AD5-91B0-653D106117BF@mac.com> References: <200911240317.nAO3H0P6003552@svn.freebsd.org> <200911240451.46875.max@love2party.net> To: Max Laier X-Mailer: Apple Mail (2.1077) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r199729 - stable/8/sys/ia64/include X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 04:17:34 -0000 On Nov 23, 2009, at 7:51 PM, Max Laier wrote: >> Modified: >> stable/8/sys/ia64/include/asm.h >> Directory Properties: >> stable/8/sys/ (props changed) > > These MFCs seem to be missing mergeinfo for the contrib directories. I pruned them. We don't seem to get rid of merge into in the wrong directories even even people try to clean it up... -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 24 09:10:43 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFA15106566B; Tue, 24 Nov 2009 09:10:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9DAC58FC12; Tue, 24 Nov 2009 09:10:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAO9Ah4M011633; Tue, 24 Nov 2009 09:10:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAO9Ah0p011631; Tue, 24 Nov 2009 09:10:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911240910.nAO9Ah0p011631@svn.freebsd.org> From: Alexander Motin Date: Tue, 24 Nov 2009 09:10:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199743 - stable/8/sys/conf X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 09:10:43 -0000 Author: mav Date: Tue Nov 24 09:10:43 2009 New Revision: 199743 URL: http://svn.freebsd.org/changeset/base/199743 Log: MFC r199535: Tune CAM ATA kernel options a bit. Move PMP support from da to scbus and add ada device option, according to man page. Modified: stable/8/sys/conf/files Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Tue Nov 24 08:35:11 2009 (r199742) +++ stable/8/sys/conf/files Tue Nov 24 09:10:43 2009 (r199743) @@ -112,12 +112,12 @@ cam/cam_sim.c optional scbus cam/cam_xpt.c optional scbus cam/ata/ata_all.c optional scbus cam/ata/ata_xpt.c optional scbus +cam/ata/ata_pmp.c optional scbus cam/scsi/scsi_xpt.c optional scbus cam/scsi/scsi_all.c optional scbus cam/scsi/scsi_cd.c optional cd cam/scsi/scsi_ch.c optional ch -cam/ata/ata_da.c optional da -cam/ata/ata_pmp.c optional da +cam/ata/ata_da.c optional ada | da cam/scsi/scsi_da.c optional da cam/scsi/scsi_low.c optional ct | ncv | nsp | stg cam/scsi/scsi_low_pisa.c optional ct | ncv | nsp | stg From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 24 09:13:16 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57ED8106566C; Tue, 24 Nov 2009 09:13:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B37E8FC14; Tue, 24 Nov 2009 09:13:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAO9DGZO011749; Tue, 24 Nov 2009 09:13:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAO9DGAU011746; Tue, 24 Nov 2009 09:13:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911240913.nAO9DGAU011746@svn.freebsd.org> From: Alexander Motin Date: Tue, 24 Nov 2009 09:13:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199744 - stable/8/share/man/man4 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 09:13:16 -0000 Author: mav Date: Tue Nov 24 09:13:15 2009 New Revision: 199744 URL: http://svn.freebsd.org/changeset/base/199744 Log: MFC r199532: Add ada(4) man page. Added: stable/8/share/man/man4/ada.4 - copied unchanged from r199532, head/share/man/man4/ada.4 Modified: stable/8/share/man/man4/Makefile Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/Makefile ============================================================================== --- stable/8/share/man/man4/Makefile Tue Nov 24 09:10:43 2009 (r199743) +++ stable/8/share/man/man4/Makefile Tue Nov 24 09:13:15 2009 (r199744) @@ -15,6 +15,7 @@ MAN= aac.4 \ ${_acpi_toshiba.4} \ acpi_video.4 \ ${_acpi_wmi.4} \ + ada.4 \ adv.4 \ adw.4 \ ae.4 \ Copied: stable/8/share/man/man4/ada.4 (from r199532, head/share/man/man4/ada.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man4/ada.4 Tue Nov 24 09:13:15 2009 (r199744, copy of r199532, head/share/man/man4/ada.4) @@ -0,0 +1,138 @@ +.\" Copyright (c) 2009 Alexander Motin +.\" 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 November 19, 2009 +.Dt ADA 4 +.Os +.Sh NAME +.Nm ada +.Nd ATA Direct Access device driver +.Sh SYNOPSIS +.Cd device ada +.Sh DESCRIPTION +The +.Nm +driver provides support for direct access devices, implementing +.Tn ATA +command protocol, that are attached to the system through a host adapter +supported by CAM subsystem. +.Pp +Host adapter must also be separately configured into the system before a +.Tn ATA +direct access device can be configured. +.Sh COMMAND QUEUING +Command queueing allows the device to process multiple transactions +concurrently, often re-ordering them to reduce the number and length of +seeks. +.Tn ATA +defines two types of queueing: +.Tn TCQ (Tagged Command Queueing, PATA legacy) +and +.Tn NCQ (Native Command Queueing, SATA). +The +.Nm +device driver takes full advantage of the NCQ, when supported. +To ensure that transactions to distant portions of the media, +which may be deferred indefinitely by servicing requests nearer the current +head position, are completed in a timely fashion, an ordered +transaction is sent every 7 seconds during continuous device operation. +.Sh CACHE EFFECTS +Many direct access devices are equipped with read and/or write caches. +Parameters affecting the device's cache are reported in device IDENTIFY data +and can be examined and modified via the +.Xr camcontrol 8 +utility. +.Pp +The read cache is used to store data from device-initiated read ahead +operations as well as frequently used data. +The read cache is transparent +to the user and can be enabled without any adverse effect. +Most devices +with a read cache come from the factory with it enabled. +.Pp +The write cache can greatly decrease the latency of write operations +and allows the device to reorganize writes to increase efficiency and +performance. +This performance gain comes at a price. +Should the device +lose power while its cache contains uncommitted write operations, these +writes will be lost. +The effect of a loss of write transactions on +a file system is non-deterministic and can cause corruption. +Most +devices age write transactions to limit vulnerability to a few transactions +recently reported as complete, but it is none-the-less recommended that +systems with write cache enabled devices reside on an Uninterruptible +Power Supply (UPS). +The +.Nm +device driver ensures that the cache and media are synchronized upon +final close of the device or an unexpected shutdown (panic) event. +This ensures that it is safe to disconnect power once the operating system +has reported that it has halted. +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width 12 +.It kern.cam.ada.retry_count +.Pp +This variable determines how many times the +.Nm +driver will retry a READ or WRITE command. +This does not affect the number of retries used during probe time or for +the +.Nm +driver dump routine. +This value currently defaults to 4. +.It kern.cam.ada.default_timeout +.Pp +This variable determines how long the +.Nm +driver will wait before timing out an outstanding command. +The units for this value are seconds, and the default is currently 30 +seconds. +.El +.Sh FILES +.Bl -tag -width ".Pa /dev/ada*" -compact +.It Pa /dev/ada* +ATA device nodes +.El +.Sh SEE ALSO +.Xr ahci 4 , +.Xr siis 4 , +.Xr ad 4 +.Xr da 4 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 8.0 . +.Sh AUTHORS +.An Alexander Motin Aq mav@FreeBSD.org . From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 24 09:16:47 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71FDA10656A3; Tue, 24 Nov 2009 09:16:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 600DB8FC14; Tue, 24 Nov 2009 09:16:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAO9GlbZ011903; Tue, 24 Nov 2009 09:16:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAO9GlHc011901; Tue, 24 Nov 2009 09:16:47 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911240916.nAO9GlHc011901@svn.freebsd.org> From: Alexander Motin Date: Tue, 24 Nov 2009 09:16:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199745 - stable/8/share/man/man4 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 09:16:47 -0000 Author: mav Date: Tue Nov 24 09:16:47 2009 New Revision: 199745 URL: http://svn.freebsd.org/changeset/base/199745 Log: MFC r199247: Remove part that HDMI is not implemented. It had different meaning and confuse users. Extend BUGS section. Add some supported chipsets. Modified: stable/8/share/man/man4/snd_hda.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/snd_hda.4 ============================================================================== --- stable/8/share/man/man4/snd_hda.4 Tue Nov 24 09:13:15 2009 (r199744) +++ stable/8/share/man/man4/snd_hda.4 Tue Nov 24 09:16:47 2009 (r199745) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 7, 2009 +.Dd November 13, 2009 .Dt SND_HDA 4 .Os .Sh NAME @@ -59,7 +59,7 @@ driver that allows the generic audio dri to be used with this hardware. Only audio functions are supported by .Nm . -Modem, HDMI and other possible functions are not implemented. +Modem and other possible functions are not implemented. .Pp The .Nm @@ -500,6 +500,14 @@ nVidia MCP68 .It nVidia MCP69 .It +nVidia MCP73 +.It +nVidia MCP78 +.It +nVidia MCP79 +.It +nVidia MCP89 +.It SiS 966 .It VIA VT8251/8237A @@ -626,5 +634,11 @@ trying to fix problem that way, make sur and the PCM audio device you are using really corresponds to expected audio connector. .Pp +Some vendors use non-standardized General Purpose I/O (GPIO) pins of codec +to control external amplifiers. In some cases setting proper combination of +GPIO bits may be needed to make sound work on specific device. +.Pp +HDMI and DisplayPort audio may also require support from video driver. +.Pp Due to OSS limitation multichannel (not multidevice) playback is not supported. From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 24 10:46:17 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F597106566B; Tue, 24 Nov 2009 10:46:17 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D76F8FC18; Tue, 24 Nov 2009 10:46:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAOAkH8R015026; Tue, 24 Nov 2009 10:46:17 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAOAkHcK015024; Tue, 24 Nov 2009 10:46:17 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <200911241046.nAOAkHcK015024@svn.freebsd.org> From: Alexander Leidinger Date: Tue, 24 Nov 2009 10:46:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199746 - stable/8/bin/ps X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 10:46:17 -0000 Author: netchild Date: Tue Nov 24 10:46:17 2009 New Revision: 199746 URL: http://svn.freebsd.org/changeset/base/199746 Log: MFC r199351: Fix small resource leak (memory). Reviewed by: gad Modified: stable/8/bin/ps/keyword.c Directory Properties: stable/8/bin/ps/ (props changed) Modified: stable/8/bin/ps/keyword.c ============================================================================== --- stable/8/bin/ps/keyword.c Tue Nov 24 09:16:47 2009 (r199745) +++ stable/8/bin/ps/keyword.c Tue Nov 24 10:46:17 2009 (r199746) @@ -330,6 +330,7 @@ findvar(char *p, int user, char **header errx(1, "malloc failed"); snprintf(realfmt, rflen, "%s=%s", v->alias, hp); parsefmt(realfmt, user); + free(realfmt); } return ((VAR *)NULL); } From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 24 18:18:23 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1222106568F; Tue, 24 Nov 2009 18:18:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6EEC48FC1E; Tue, 24 Nov 2009 18:18:23 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 1FBEC46B1A; Tue, 24 Nov 2009 13:18:23 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 6A2088A01B; Tue, 24 Nov 2009 13:18:22 -0500 (EST) From: John Baldwin To: Marcel Moolenaar Date: Tue, 24 Nov 2009 11:24:46 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091103; KDE/4.3.1; amd64; ; ) References: <200911240317.nAO3H0P6003552@svn.freebsd.org> <200911240451.46875.max@love2party.net> <85603446-C587-4AD5-91B0-653D106117BF@mac.com> In-Reply-To: <85603446-C587-4AD5-91B0-653D106117BF@mac.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200911241124.46293.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 24 Nov 2009 13:18:22 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Marcel Moolenaar , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org, Max Laier Subject: Re: svn commit: r199729 - stable/8/sys/ia64/include X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 18:18:23 -0000 On Monday 23 November 2009 11:17:00 pm Marcel Moolenaar wrote: > On Nov 23, 2009, at 7:51 PM, Max Laier wrote: > > >> Modified: > >> stable/8/sys/ia64/include/asm.h > >> Directory Properties: > >> stable/8/sys/ (props changed) > > > > These MFCs seem to be missing mergeinfo for the contrib directories. > > I pruned them. We don't seem to get rid of merge into in the > wrong directories even even people try to clean it up... That was the wrong thing to do. The mergeinfo on the contrib directories is actually quite valid b/c they have metadata from multiple locations. These were not the results of merges into the wrong directories, but the results of merges from vendor trees into HEAD. -- John Baldwin From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 24 19:01:02 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 428D11065676; Tue, 24 Nov 2009 19:01:02 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout026.mac.com (asmtpout026.mac.com [17.148.16.101]) by mx1.freebsd.org (Postfix) with ESMTP id 274BA8FC1B; Tue, 24 Nov 2009 19:01:02 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from [172.24.107.154] (natint3.juniper.net [66.129.224.36]) by asmtp026.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KTM00ITRNHH9R70@asmtp026.mac.com>; Tue, 24 Nov 2009 11:00:55 -0800 (PST) From: Marcel Moolenaar In-reply-to: <200911241124.46293.jhb@freebsd.org> Date: Tue, 24 Nov 2009 11:00:54 -0800 Message-id: References: <200911240317.nAO3H0P6003552@svn.freebsd.org> <200911240451.46875.max@love2party.net> <85603446-C587-4AD5-91B0-653D106117BF@mac.com> <200911241124.46293.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1077) Cc: Marcel Moolenaar , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org, Max Laier Subject: Re: svn commit: r199729 - stable/8/sys/ia64/include X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 19:01:02 -0000 On Nov 24, 2009, at 8:24 AM, John Baldwin wrote: > On Monday 23 November 2009 11:17:00 pm Marcel Moolenaar wrote: >> On Nov 23, 2009, at 7:51 PM, Max Laier wrote: >> >>>> Modified: >>>> stable/8/sys/ia64/include/asm.h >>>> Directory Properties: >>>> stable/8/sys/ (props changed) >>> >>> These MFCs seem to be missing mergeinfo for the contrib directories. >> >> I pruned them. We don't seem to get rid of merge into in the >> wrong directories even even people try to clean it up... > > That was the wrong thing to do. *sigh* I can't keep up with this... -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 24 19:32:59 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB7881065676; Tue, 24 Nov 2009 19:32:59 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id AAFB18FC17; Tue, 24 Nov 2009 19:32:59 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 46A9346B2A; Tue, 24 Nov 2009 14:32:59 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 915428A01B; Tue, 24 Nov 2009 14:32:58 -0500 (EST) From: John Baldwin To: Marcel Moolenaar Date: Tue, 24 Nov 2009 14:32:50 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091103; KDE/4.3.1; amd64; ; ) References: <200911240317.nAO3H0P6003552@svn.freebsd.org> <200911241124.46293.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200911241432.50925.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 24 Nov 2009 14:32:58 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Marcel Moolenaar , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org, Max Laier Subject: Re: svn commit: r199729 - stable/8/sys/ia64/include X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 19:33:00 -0000 On Tuesday 24 November 2009 2:00:54 pm Marcel Moolenaar wrote: > > On Nov 24, 2009, at 8:24 AM, John Baldwin wrote: > > > On Monday 23 November 2009 11:17:00 pm Marcel Moolenaar wrote: > >> On Nov 23, 2009, at 7:51 PM, Max Laier wrote: > >> > >>>> Modified: > >>>> stable/8/sys/ia64/include/asm.h > >>>> Directory Properties: > >>>> stable/8/sys/ (props changed) > >>> > >>> These MFCs seem to be missing mergeinfo for the contrib directories. > >> > >> I pruned them. We don't seem to get rid of merge into in the > >> wrong directories even even people try to clean it up... > > > > That was the wrong thing to do. > > *sigh* > > I can't keep up with this... Generally you can just commit whatever svn merge gives you. Having a few extra properties in the kernel tree is "normal" for stable/[678]. (I think stable/6 only has one extra: contrib/pf). I do try to clean up merges into the wrong directories, but in the case of vendor merges there isn't anything to clean unless we reorganize the vendor-sys trees so that they always merge to sys. -- John Baldwin From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 24 19:56:13 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDE14106566B; Tue, 24 Nov 2009 19:56:13 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout029.mac.com (asmtpout029.mac.com [17.148.16.104]) by mx1.freebsd.org (Postfix) with ESMTP id D27998FC0A; Tue, 24 Nov 2009 19:56:13 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp029.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KTM00J08Q15L4A0@asmtp029.mac.com>; Tue, 24 Nov 2009 11:55:55 -0800 (PST) From: Marcel Moolenaar In-reply-to: <200911241432.50925.jhb@freebsd.org> Date: Tue, 24 Nov 2009 11:55:53 -0800 Message-id: References: <200911240317.nAO3H0P6003552@svn.freebsd.org> <200911241124.46293.jhb@freebsd.org> <200911241432.50925.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1077) Cc: Marcel Moolenaar , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org, Max Laier Subject: Re: svn commit: r199729 - stable/8/sys/ia64/include X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 19:56:14 -0000 *snip* >>>>> These MFCs seem to be missing mergeinfo for the contrib directories. >>>> >>>> I pruned them. We don't seem to get rid of merge into in the >>>> wrong directories even even people try to clean it up... >>> >>> That was the wrong thing to do. >> >> *sigh* >> >> I can't keep up with this... > > Generally you can just commit whatever svn merge gives you. Having a few > extra properties in the kernel tree is "normal" for stable/[678]. (I think > stable/6 only has one extra: contrib/pf). I do try to clean up merges into > the wrong directories, but in the case of vendor merges there isn't anything > to clean unless we reorganize the vendor-sys trees so that they always merge > to sys. Do you want me to --record-only what I pruned or can we leave it as is with the note not to prune? -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 24 20:04:32 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26694106566B; Tue, 24 Nov 2009 20:04:32 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1493D8FC0A; Tue, 24 Nov 2009 20:04:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAOK4V36028291; Tue, 24 Nov 2009 20:04:31 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAOK4VOS028289; Tue, 24 Nov 2009 20:04:31 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200911242004.nAOK4VOS028289@svn.freebsd.org> From: Marius Strobl Date: Tue, 24 Nov 2009 20:04:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199765 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 20:04:32 -0000 Author: marius Date: Tue Nov 24 20:04:31 2009 New Revision: 199765 URL: http://svn.freebsd.org/changeset/base/199765 Log: MFC: r199442 Unroll copying of the registers in {g,s}et_mcontext() and limit it to the set actually restored by tl0_ret() instead of using the whole trapframe. Additionally skip %g7 as that register is used as the userland TLS pointer. PR: 140523 Modified: stable/8/sys/sparc64/sparc64/machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/sparc64/machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/machdep.c Tue Nov 24 19:57:41 2009 (r199764) +++ stable/8/sys/sparc64/sparc64/machdep.c Tue Nov 24 20:04:31 2009 (r199765) @@ -696,12 +696,39 @@ get_mcontext(struct thread *td, mcontext tf = td->td_frame; pcb = td->td_pcb; - bcopy(tf, mc, sizeof(*tf)); + /* + * Copy the registers which will be restored by tl0_ret() from the + * trapframe. + * Note that we skip %g7 which is used as the userland TLS register + * and %wstate. + */ + mc->mc_flags = _MC_VERSION; + mc->mc_global[1] = tf->tf_global[1]; + mc->mc_global[2] = tf->tf_global[2]; + mc->mc_global[3] = tf->tf_global[3]; + mc->mc_global[4] = tf->tf_global[4]; + mc->mc_global[5] = tf->tf_global[5]; + mc->mc_global[6] = tf->tf_global[6]; if (flags & GET_MC_CLEAR_RET) { mc->mc_out[0] = 0; mc->mc_out[1] = 0; + } else { + mc->mc_out[0] = tf->tf_out[0]; + mc->mc_out[1] = tf->tf_out[1]; } - mc->mc_flags = _MC_VERSION; + mc->mc_out[2] = tf->tf_out[2]; + mc->mc_out[3] = tf->tf_out[3]; + mc->mc_out[4] = tf->tf_out[4]; + mc->mc_out[5] = tf->tf_out[5]; + mc->mc_out[6] = tf->tf_out[6]; + mc->mc_out[7] = tf->tf_out[7]; + mc->mc_fprs = tf->tf_fprs; + mc->mc_fsr = tf->tf_fsr; + mc->mc_gsr = tf->tf_gsr; + mc->mc_tnpc = tf->tf_tnpc; + mc->mc_tpc = tf->tf_tpc; + mc->mc_tstate = tf->tf_tstate; + mc->mc_y = tf->tf_y; critical_enter(); if ((tf->tf_fprs & FPRS_FEF) != 0) { savefpctx(pcb->pcb_ufp); @@ -721,7 +748,6 @@ set_mcontext(struct thread *td, const mc { struct trapframe *tf; struct pcb *pcb; - uint64_t wstate; if (!TSTATE_SECURE(mc->mc_tstate) || (mc->mc_flags & ((1L << _MC_VERSION_BITS) - 1)) != _MC_VERSION) @@ -730,9 +756,33 @@ set_mcontext(struct thread *td, const mc pcb = td->td_pcb; /* Make sure the windows are spilled first. */ flushw(); - wstate = tf->tf_wstate; - bcopy(mc, tf, sizeof(*tf)); - tf->tf_wstate = wstate; + /* + * Copy the registers which will be restored by tl0_ret() to the + * trapframe. + * Note that we skip %g7 which is used as the userland TLS register + * and %wstate. + */ + tf->tf_global[1] = mc->mc_global[1]; + tf->tf_global[2] = mc->mc_global[2]; + tf->tf_global[3] = mc->mc_global[3]; + tf->tf_global[4] = mc->mc_global[4]; + tf->tf_global[5] = mc->mc_global[5]; + tf->tf_global[6] = mc->mc_global[6]; + tf->tf_out[0] = mc->mc_out[0]; + tf->tf_out[1] = mc->mc_out[1]; + tf->tf_out[2] = mc->mc_out[2]; + tf->tf_out[3] = mc->mc_out[3]; + tf->tf_out[4] = mc->mc_out[4]; + tf->tf_out[5] = mc->mc_out[5]; + tf->tf_out[6] = mc->mc_out[6]; + tf->tf_out[7] = mc->mc_out[7]; + tf->tf_fprs = mc->mc_fprs; + tf->tf_fsr = mc->mc_fsr; + tf->tf_gsr = mc->mc_gsr; + tf->tf_tnpc = mc->mc_tnpc; + tf->tf_tpc = mc->mc_tpc; + tf->tf_tstate = mc->mc_tstate; + tf->tf_y = mc->mc_y; if ((mc->mc_fprs & FPRS_FEF) != 0) { tf->tf_fprs = 0; bcopy(mc->mc_fp, pcb->pcb_ufp, sizeof(pcb->pcb_ufp)); From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 24 20:11:03 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A64B41065676; Tue, 24 Nov 2009 20:11:03 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 7475F8FC28; Tue, 24 Nov 2009 20:11:03 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 2B34246B1A; Tue, 24 Nov 2009 15:11:03 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 67DE98A01B; Tue, 24 Nov 2009 15:11:02 -0500 (EST) From: John Baldwin To: Marcel Moolenaar Date: Tue, 24 Nov 2009 15:10:57 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091103; KDE/4.3.1; amd64; ; ) References: <200911240317.nAO3H0P6003552@svn.freebsd.org> <200911241432.50925.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200911241510.57232.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 24 Nov 2009 15:11:02 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Marcel Moolenaar , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org, Max Laier Subject: Re: svn commit: r199729 - stable/8/sys/ia64/include X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 20:11:04 -0000 On Tuesday 24 November 2009 2:55:53 pm Marcel Moolenaar wrote: > *snip* > > >>>>> These MFCs seem to be missing mergeinfo for the contrib directories. > >>>> > >>>> I pruned them. We don't seem to get rid of merge into in the > >>>> wrong directories even even people try to clean it up... > >>> > >>> That was the wrong thing to do. > >> > >> *sigh* > >> > >> I can't keep up with this... > > > > Generally you can just commit whatever svn merge gives you. Having a few > > extra properties in the kernel tree is "normal" for stable/[678]. (I think > > stable/6 only has one extra: contrib/pf). I do try to clean up merges into > > the wrong directories, but in the case of vendor merges there isn't anything > > to clean unless we reorganize the vendor-sys trees so that they always merge > > to sys. > > Do you want me to --record-only what I pruned or can we leave it > as is with the note not to prune? You can just leave it as it is in this case I think. In the cases when I do find mergeinfo that I can prune I will generally find missing info like this and fix it up when doing the prune. -- John Baldwin From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 24 20:31:44 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3E791065670; Tue, 24 Nov 2009 20:31:44 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout028.mac.com (asmtpout028.mac.com [17.148.16.103]) by mx1.freebsd.org (Postfix) with ESMTP id 881248FC0A; Tue, 24 Nov 2009 20:31:44 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp028.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KTM00LO1ROSWJ20@asmtp028.mac.com>; Tue, 24 Nov 2009 12:31:44 -0800 (PST) From: Marcel Moolenaar In-reply-to: <200911241510.57232.jhb@freebsd.org> Date: Tue, 24 Nov 2009 12:31:40 -0800 Message-id: <39B700FA-6C21-4A7C-9375-E67AC9EC16EF@mac.com> References: <200911240317.nAO3H0P6003552@svn.freebsd.org> <200911241432.50925.jhb@freebsd.org> <200911241510.57232.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1077) Cc: Marcel Moolenaar , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org, Max Laier Subject: Re: svn commit: r199729 - stable/8/sys/ia64/include X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 20:31:44 -0000 On Nov 24, 2009, at 12:10 PM, John Baldwin wrote: > On Tuesday 24 November 2009 2:55:53 pm Marcel Moolenaar wrote: >> *snip* >> >>>>>>> These MFCs seem to be missing mergeinfo for the contrib directories. >>>>>> >>>>>> I pruned them. We don't seem to get rid of merge into in the >>>>>> wrong directories even even people try to clean it up... >>>>> >>>>> That was the wrong thing to do. >>>> >>>> *sigh* >>>> >>>> I can't keep up with this... >>> >>> Generally you can just commit whatever svn merge gives you. Having a few >>> extra properties in the kernel tree is "normal" for stable/[678]. (I think >>> stable/6 only has one extra: contrib/pf). I do try to clean up merges into >>> the wrong directories, but in the case of vendor merges there isn't anything >>> to clean unless we reorganize the vendor-sys trees so that they always merge >>> to sys. >> >> Do you want me to --record-only what I pruned or can we leave it >> as is with the note not to prune? > > You can just leave it as it is in this case I think. In the cases when I do find > mergeinfo that I can prune I will generally find missing info like this and fix it up > when doing the prune. Thanks, I appreciate it! -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-stable-8@FreeBSD.ORG Wed Nov 25 01:50:18 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2509A1065672; Wed, 25 Nov 2009 01:50:18 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 133838FC19; Wed, 25 Nov 2009 01:50:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAP1oH8w035463; Wed, 25 Nov 2009 01:50:17 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAP1oHvL035461; Wed, 25 Nov 2009 01:50:17 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200911250150.nAP1oHvL035461@svn.freebsd.org> From: Kip Macy Date: Wed, 25 Nov 2009 01:50:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199771 - stable/8/sys/dev/xen/blkfront X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2009 01:50:18 -0000 Author: kmacy Date: Wed Nov 25 01:50:17 2009 New Revision: 199771 URL: http://svn.freebsd.org/changeset/base/199771 Log: MFC core dump support Modified: stable/8/sys/dev/xen/blkfront/blkfront.c Modified: stable/8/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- stable/8/sys/dev/xen/blkfront/blkfront.c Wed Nov 25 00:00:57 2009 (r199770) +++ stable/8/sys/dev/xen/blkfront/blkfront.c Wed Nov 25 01:50:17 2009 (r199771) @@ -16,7 +16,9 @@ */ /* - * XenoBSD block device driver + * XenBSD block device driver + * + * Copyright (c) 2009 Frank Suchomel, Citrix */ #include @@ -122,6 +124,10 @@ static int blkif_ioctl(struct disk *dp, static int blkif_queue_request(struct bio *bp); static void xb_strategy(struct bio *bp); +// In order to quiesce the device during kernel dumps, outstanding requests to +// DOM0 for disk reads/writes need to be accounted for. +static int blkif_queued_requests; +static int xb_dump(void *, void *, vm_offset_t, off_t, size_t); /* XXX move to xb_vbd.c when VBD update support is added */ @@ -231,6 +237,7 @@ xlvbd_add(device_t dev, blkif_sector_t c sc->xb_disk->d_close = blkif_close; sc->xb_disk->d_ioctl = blkif_ioctl; sc->xb_disk->d_strategy = xb_strategy; + sc->xb_disk->d_dump = xb_dump; sc->xb_disk->d_name = name; sc->xb_disk->d_drv1 = sc; sc->xb_disk->d_sectorsize = sector_size; @@ -286,9 +293,10 @@ xb_strategy(struct bio *bp) * Place it in the queue of disk activities for this disk */ mtx_lock(&blkif_io_lock); - bioq_disksort(&sc->xb_bioq, bp); + bioq_disksort(&sc->xb_bioq, bp); xb_startio(sc); + mtx_unlock(&blkif_io_lock); return; @@ -301,6 +309,81 @@ xb_strategy(struct bio *bp) return; } +static void xb_quiesce(struct blkfront_info *info); +// Quiesce the disk writes for a dump file before allowing the next buffer. +static void +xb_quiesce(struct blkfront_info *info) +{ + int mtd; + + // While there are outstanding requests + while (blkif_queued_requests) { + RING_FINAL_CHECK_FOR_RESPONSES(&info->ring, mtd); + if (mtd) { + // Recieved request completions, update queue. + blkif_int(info); + } + if (blkif_queued_requests) { + // Still pending requests, wait for the disk i/o to complete + HYPERVISOR_yield(); + } + } +} + +// Some bio structures for dumping core +#define DUMP_BIO_NO 16 // 16 * 4KB = 64KB dump block +static struct bio xb_dump_bp[DUMP_BIO_NO]; + +// Kernel dump function for a paravirtualized disk device +static int +xb_dump(void *arg, void *virtual, vm_offset_t physical, off_t offset, + size_t length) +{ + int sbp; + int mbp; + size_t chunk; + struct disk *dp = arg; + struct xb_softc *sc = (struct xb_softc *) dp->d_drv1; + int rc = 0; + + xb_quiesce(sc->xb_info); // All quiet on the western front. + if (length > 0) { + // If this lock is held, then this module is failing, and a successful + // kernel dump is highly unlikely anyway. + mtx_lock(&blkif_io_lock); + // Split the 64KB block into 16 4KB blocks + for (sbp=0; length>0 && sbp PAGE_SIZE ? PAGE_SIZE : length; + xb_dump_bp[sbp].bio_disk = dp; + xb_dump_bp[sbp].bio_pblkno = offset / dp->d_sectorsize; + xb_dump_bp[sbp].bio_bcount = chunk; + xb_dump_bp[sbp].bio_resid = chunk; + xb_dump_bp[sbp].bio_data = virtual; + xb_dump_bp[sbp].bio_cmd = BIO_WRITE; + xb_dump_bp[sbp].bio_done = NULL; + + bioq_disksort(&sc->xb_bioq, &xb_dump_bp[sbp]); + + length -= chunk; + offset += chunk; + virtual = (char *) virtual + chunk; + } + // Tell DOM0 to do the I/O + xb_startio(sc); + mtx_unlock(&blkif_io_lock); + + // Must wait for the completion: the dump routine reuses the same + // 16 x 4KB buffer space. + xb_quiesce(sc->xb_info); // All quite on the eastern front + // If there were any errors, bail out... + for (mbp=0; mbp RING_SIZE", nfree)); info->shadow_free = info->shadow[nfree].req.id; info->shadow[nfree].req.id = 0x0fffffee; /* debug */ + atomic_add_int(&blkif_queued_requests, 1); return nfree; } @@ -655,6 +739,7 @@ ADD_ID_TO_FREELIST(struct blkfront_info info->shadow[id].req.id = info->shadow_free; info->shadow[id].request = 0; info->shadow_free = id; + atomic_subtract_int(&blkif_queued_requests, 1); } static inline void From owner-svn-src-stable-8@FreeBSD.ORG Wed Nov 25 01:51:08 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 581AA106568F; Wed, 25 Nov 2009 01:51:08 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 46F318FC14; Wed, 25 Nov 2009 01:51:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAP1p8mC035514; Wed, 25 Nov 2009 01:51:08 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAP1p88j035512; Wed, 25 Nov 2009 01:51:08 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200911250151.nAP1p88j035512@svn.freebsd.org> From: Kip Macy Date: Wed, 25 Nov 2009 01:51:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199772 - stable/8/sys/dev/xen/console X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2009 01:51:08 -0000 Author: kmacy Date: Wed Nov 25 01:51:07 2009 New Revision: 199772 URL: http://svn.freebsd.org/changeset/base/199772 Log: remove gratuitous comment Modified: stable/8/sys/dev/xen/console/console.c Modified: stable/8/sys/dev/xen/console/console.c ============================================================================== --- stable/8/sys/dev/xen/console/console.c Wed Nov 25 01:50:17 2009 (r199771) +++ stable/8/sys/dev/xen/console/console.c Wed Nov 25 01:51:07 2009 (r199772) @@ -152,7 +152,6 @@ xccncheckc(struct consdev *dev) CN_LOCK(cn_mtx); if ((rp - rc)) { - /* if (kdb_active) printf("%s:%d\n", __func__, __LINE__); */ /* we need to return only one char */ ret = (int)rbuf[RBUF_MASK(rc)]; rc++; From owner-svn-src-stable-8@FreeBSD.ORG Wed Nov 25 01:52:36 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E8C5106566C; Wed, 25 Nov 2009 01:52:36 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C0508FC14; Wed, 25 Nov 2009 01:52:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAP1qal6035579; Wed, 25 Nov 2009 01:52:36 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAP1qaet035574; Wed, 25 Nov 2009 01:52:36 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200911250152.nAP1qaet035574@svn.freebsd.org> From: Kip Macy Date: Wed, 25 Nov 2009 01:52:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199773 - in stable/8/sys/i386: i386 include xen X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2009 01:52:36 -0000 Author: kmacy Date: Wed Nov 25 01:52:36 2009 New Revision: 199773 URL: http://svn.freebsd.org/changeset/base/199773 Log: MFC xen pmap updates and eflags fixes Modified: stable/8/sys/i386/i386/vm_machdep.c stable/8/sys/i386/include/cpufunc.h stable/8/sys/i386/xen/pmap.c stable/8/sys/i386/xen/xen_machdep.c Modified: stable/8/sys/i386/i386/vm_machdep.c ============================================================================== --- stable/8/sys/i386/i386/vm_machdep.c Wed Nov 25 01:51:07 2009 (r199772) +++ stable/8/sys/i386/i386/vm_machdep.c Wed Nov 25 01:52:36 2009 (r199773) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -270,11 +271,7 @@ cpu_fork(td1, p2, td2, flags) /* * XXX XEN need to check on PSL_USER is handled */ -#ifdef XEN - td2->td_md.md_saved_flags = 0; -#else td2->td_md.md_saved_flags = PSL_KERNEL | PSL_I; -#endif /* * Now, cpu_switch() can schedule the new process. * pcb_esp is loaded pointing to the cpu_switch() stack frame @@ -446,11 +443,7 @@ cpu_set_upcall(struct thread *td, struct /* Setup to release spin count in fork_exit(). */ td->td_md.md_spinlock_count = 1; -#ifdef XEN - td->td_md.md_saved_flags = 0; -#else td->td_md.md_saved_flags = PSL_KERNEL | PSL_I; -#endif } /* Modified: stable/8/sys/i386/include/cpufunc.h ============================================================================== --- stable/8/sys/i386/include/cpufunc.h Wed Nov 25 01:51:07 2009 (r199772) +++ stable/8/sys/i386/include/cpufunc.h Wed Nov 25 01:52:36 2009 (r199773) @@ -49,8 +49,8 @@ extern u_int xen_rcr2(void); extern void xen_load_cr3(u_int data); extern void xen_tlb_flush(void); extern void xen_invlpg(u_int addr); -extern int xen_save_and_cli(void); -extern void xen_restore_flags(u_int eflags); +extern void write_eflags(u_int eflags); +extern u_int read_eflags(void); #endif struct region_descriptor; @@ -293,7 +293,11 @@ ia32_pause(void) } static __inline u_int +#ifdef XEN +_read_eflags(void) +#else read_eflags(void) +#endif { u_int ef; @@ -335,7 +339,11 @@ wbinvd(void) } static __inline void +#ifdef XEN +_write_eflags(u_int ef) +#else write_eflags(u_int ef) +#endif { __asm __volatile("pushl %0; popfl" : : "r" (ef)); } @@ -653,23 +661,15 @@ intr_disable(void) { register_t eflags; -#ifdef XEN - eflags = xen_save_and_cli(); -#else eflags = read_eflags(); disable_intr(); -#endif return (eflags); } static __inline void intr_restore(register_t eflags) { -#ifdef XEN - xen_restore_flags(eflags); -#else write_eflags(eflags); -#endif } #else /* !(__GNUCLIKE_ASM && __CC_SUPPORTS___INLINE) */ Modified: stable/8/sys/i386/xen/pmap.c ============================================================================== --- stable/8/sys/i386/xen/pmap.c Wed Nov 25 01:51:07 2009 (r199772) +++ stable/8/sys/i386/xen/pmap.c Wed Nov 25 01:52:36 2009 (r199773) @@ -223,6 +223,8 @@ static uma_zone_t pdptzone; #endif #endif +static int pat_works; /* Is page attribute table sane? */ + /* * Data for the pv entry allocation mechanism */ @@ -277,7 +279,7 @@ static struct mtx PMAP2mutex; SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters"); static int pg_ps_enabled; -SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_enabled, CTLFLAG_RD, &pg_ps_enabled, 0, +SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_enabled, CTLFLAG_RDTUN, &pg_ps_enabled, 0, "Are large page mappings enabled?"); SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_max, CTLFLAG_RD, &pv_entry_max, 0, @@ -311,6 +313,7 @@ static vm_offset_t pmap_kmem_choose(vm_o static boolean_t pmap_is_prefaultable_locked(pmap_t pmap, vm_offset_t addr); static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); +static __inline void pagezero(void *page); #if defined(PAE) && !defined(XEN) static void *pmap_pdpt_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait); @@ -328,22 +331,6 @@ CTASSERT(KERNBASE % (1 << 24) == 0); -static __inline void -pagezero(void *page) -{ -#if defined(I686_CPU) - if (cpu_class == CPUCLASS_686) { -#if defined(CPU_ENABLE_SSE) - if (cpu_feature & CPUID_SSE2) - sse2_pagezero(page); - else -#endif - i686_pagezero(page); - } else -#endif - bzero(page, PAGE_SIZE); -} - void pd_set(struct pmap *pmap, int ptepindex, vm_paddr_t val, int type) { @@ -529,33 +516,36 @@ pmap_init_pat(void) if (!(cpu_feature & CPUID_PAT)) return; -#ifdef PAT_WORKS - /* - * Leave the indices 0-3 at the default of WB, WT, UC, and UC-. - * Program 4 and 5 as WP and WC. - * Leave 6 and 7 as UC and UC-. - */ - pat_msr = rdmsr(MSR_PAT); - pat_msr &= ~(PAT_MASK(4) | PAT_MASK(5)); - pat_msr |= PAT_VALUE(4, PAT_WRITE_PROTECTED) | - PAT_VALUE(5, PAT_WRITE_COMBINING); -#else - /* - * Due to some Intel errata, we can only safely use the lower 4 - * PAT entries. Thus, just replace PAT Index 2 with WC instead - * of UC-. - * - * Intel Pentium III Processor Specification Update - * Errata E.27 (Upper Four PAT Entries Not Usable With Mode B - * or Mode C Paging) - * - * Intel Pentium IV Processor Specification Update - * Errata N46 (PAT Index MSB May Be Calculated Incorrectly) - */ - pat_msr = rdmsr(MSR_PAT); - pat_msr &= ~PAT_MASK(2); - pat_msr |= PAT_VALUE(2, PAT_WRITE_COMBINING); -#endif + if (cpu_vendor_id != CPU_VENDOR_INTEL || + (CPUID_TO_FAMILY(cpu_id) == 6 && CPUID_TO_MODEL(cpu_id) >= 0xe)) { + /* + * Leave the indices 0-3 at the default of WB, WT, UC, and UC-. + * Program 4 and 5 as WP and WC. + * Leave 6 and 7 as UC and UC-. + */ + pat_msr = rdmsr(MSR_PAT); + pat_msr &= ~(PAT_MASK(4) | PAT_MASK(5)); + pat_msr |= PAT_VALUE(4, PAT_WRITE_PROTECTED) | + PAT_VALUE(5, PAT_WRITE_COMBINING); + pat_works = 1; + } else { + /* + * Due to some Intel errata, we can only safely use the lower 4 + * PAT entries. Thus, just replace PAT Index 2 with WC instead + * of UC-. + * + * Intel Pentium III Processor Specification Update + * Errata E.27 (Upper Four PAT Entries Not Usable With Mode B + * or Mode C Paging) + * + * Intel Pentium IV Processor Specification Update + * Errata N46 (PAT Index MSB May Be Calculated Incorrectly) + */ + pat_msr = rdmsr(MSR_PAT); + pat_msr &= ~PAT_MASK(2); + pat_msr |= PAT_VALUE(2, PAT_WRITE_COMBINING); + pat_works = 0; + } wrmsr(MSR_PAT, pat_msr); } @@ -784,44 +774,48 @@ pmap_cache_bits(int mode, boolean_t is_p } /* Map the caching mode to a PAT index. */ - switch (mode) { -#ifdef PAT_WORKS - case PAT_UNCACHEABLE: - pat_index = 3; - break; - case PAT_WRITE_THROUGH: - pat_index = 1; - break; - case PAT_WRITE_BACK: - pat_index = 0; - break; - case PAT_UNCACHED: - pat_index = 2; - break; - case PAT_WRITE_COMBINING: - pat_index = 5; - break; - case PAT_WRITE_PROTECTED: - pat_index = 4; - break; -#else - case PAT_UNCACHED: - case PAT_UNCACHEABLE: - case PAT_WRITE_PROTECTED: - pat_index = 3; - break; - case PAT_WRITE_THROUGH: - pat_index = 1; - break; - case PAT_WRITE_BACK: - pat_index = 0; - break; - case PAT_WRITE_COMBINING: - pat_index = 2; - break; -#endif - default: - panic("Unknown caching mode %d\n", mode); + if (pat_works) { + switch (mode) { + case PAT_UNCACHEABLE: + pat_index = 3; + break; + case PAT_WRITE_THROUGH: + pat_index = 1; + break; + case PAT_WRITE_BACK: + pat_index = 0; + break; + case PAT_UNCACHED: + pat_index = 2; + break; + case PAT_WRITE_COMBINING: + pat_index = 5; + break; + case PAT_WRITE_PROTECTED: + pat_index = 4; + break; + default: + panic("Unknown caching mode %d\n", mode); + } + } else { + switch (mode) { + case PAT_UNCACHED: + case PAT_UNCACHEABLE: + case PAT_WRITE_PROTECTED: + pat_index = 3; + break; + case PAT_WRITE_THROUGH: + pat_index = 1; + break; + case PAT_WRITE_BACK: + pat_index = 0; + break; + case PAT_WRITE_COMBINING: + pat_index = 2; + break; + default: + panic("Unknown caching mode %d\n", mode); + } } /* Map the 3-bit index value into the PAT, PCD, and PWT bits. */ @@ -1735,7 +1729,7 @@ retry: * Deal with a SMP shootdown of other users of the pmap that we are * trying to dispose of. This can be a bit hairy. */ -static u_int *lazymask; +static cpumask_t *lazymask; static u_int lazyptd; static volatile u_int lazywait; @@ -1744,7 +1738,7 @@ void pmap_lazyfix_action(void); void pmap_lazyfix_action(void) { - u_int mymask = PCPU_GET(cpumask); + cpumask_t mymask = PCPU_GET(cpumask); #ifdef COUNT_IPIS (*ipi_lazypmap_counts[PCPU_GET(cpuid)])++; @@ -1756,7 +1750,7 @@ pmap_lazyfix_action(void) } static void -pmap_lazyfix_self(u_int mymask) +pmap_lazyfix_self(cpumask_t mymask) { if (rcr3() == lazyptd) @@ -1768,8 +1762,7 @@ pmap_lazyfix_self(u_int mymask) static void pmap_lazyfix(pmap_t pmap) { - u_int mymask; - u_int mask; + cpumask_t mymask, mask; u_int spins; while ((mask = pmap->pm_active) != 0) { @@ -3110,7 +3103,7 @@ pmap_kenter_temporary(vm_paddr_t pa, int vm_offset_t va; va = (vm_offset_t)crashdumpmap + (i * PAGE_SIZE); - pmap_kenter(va, pa); + PT_SET_MA(va, (pa & ~PAGE_MASK) | PG_V | pgeflag); invlpg(va); return ((void *)crashdumpmap); } @@ -3343,6 +3336,22 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm PMAP_UNLOCK(dst_pmap); } +static __inline void +pagezero(void *page) +{ +#if defined(I686_CPU) + if (cpu_class == CPUCLASS_686) { +#if defined(CPU_ENABLE_SSE) + if (cpu_feature & CPUID_SSE2) + sse2_pagezero(page); + else +#endif + i686_pagezero(page); + } else +#endif + bzero(page, PAGE_SIZE); +} + /* * pmap_zero_page zeros the specified hardware page by mapping * the page into KVM and using bzero to clear its contents. @@ -4162,7 +4171,6 @@ pmap_activate(struct thread *td) td->td_pcb->pcb_cr3 = cr3; PT_UPDATES_FLUSH(); load_cr3(cr3); - PCPU_SET(curpmap, pmap); critical_exit(); } Modified: stable/8/sys/i386/xen/xen_machdep.c ============================================================================== --- stable/8/sys/i386/xen/xen_machdep.c Wed Nov 25 01:51:07 2009 (r199772) +++ stable/8/sys/i386/xen/xen_machdep.c Wed Nov 25 01:52:36 2009 (r199773) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -101,6 +102,7 @@ void ni_sti(void); void ni_cli(void) { + CTR0(KTR_SPARE2, "ni_cli disabling interrupts"); __asm__("pushl %edx;" "pushl %eax;" ); @@ -345,33 +347,53 @@ xen_load_cr3(u_int val) PANIC_IF(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0); } -void -xen_restore_flags(u_int eflags) +#ifdef KTR +static __inline u_int +rebp(void) { - if (eflags > 1) - eflags = ((eflags & PSL_I) == 0); + u_int data; - __restore_flags(eflags); + __asm __volatile("movl 4(%%ebp),%0" : "=r" (data)); + return (data); } +#endif -int -xen_save_and_cli(void) +u_int +read_eflags(void) { - int eflags; - - __save_and_cli(eflags); + vcpu_info_t *_vcpu; + u_int eflags; + + eflags = _read_eflags(); + _vcpu = &HYPERVISOR_shared_info->vcpu_info[smp_processor_id()]; + if (_vcpu->evtchn_upcall_mask) + eflags &= ~PSL_I; + return (eflags); } void +write_eflags(u_int eflags) +{ + u_int intr; + + CTR2(KTR_SPARE2, "%x xen_restore_flags eflags %x", rebp(), eflags); + intr = ((eflags & PSL_I) == 0); + __restore_flags(intr); + _write_eflags(eflags); +} + +void xen_cli(void) { + CTR1(KTR_SPARE2, "%x xen_cli disabling interrupts", rebp()); __cli(); } void xen_sti(void) { + CTR1(KTR_SPARE2, "%x xen_sti enabling interrupts", rebp()); __sti(); } From owner-svn-src-stable-8@FreeBSD.ORG Wed Nov 25 01:55:35 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BD2F1065670; Wed, 25 Nov 2009 01:55:35 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A47E8FC17; Wed, 25 Nov 2009 01:55:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAP1tZiM035740; Wed, 25 Nov 2009 01:55:35 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAP1tYW0035737; Wed, 25 Nov 2009 01:55:34 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200911250155.nAP1tYW0035737@svn.freebsd.org> From: Kip Macy Date: Wed, 25 Nov 2009 01:55:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199774 - in stable/8/sys/i386: include/xen xen X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2009 01:55:35 -0000 Author: kmacy Date: Wed Nov 25 01:55:34 2009 New Revision: 199774 URL: http://svn.freebsd.org/changeset/base/199774 Log: fix UP compilation Modified: stable/8/sys/i386/include/xen/xen-os.h stable/8/sys/i386/xen/locore.s Modified: stable/8/sys/i386/include/xen/xen-os.h ============================================================================== --- stable/8/sys/i386/include/xen/xen-os.h Wed Nov 25 01:52:36 2009 (r199773) +++ stable/8/sys/i386/include/xen/xen-os.h Wed Nov 25 01:55:34 2009 (r199774) @@ -34,10 +34,10 @@ void force_evtchn_callback(void); #include #endif +extern int gdtset; #ifdef SMP #include /* XXX for pcpu.h */ #include /* XXX for PCPU_GET */ -extern int gdtset; static inline int smp_processor_id(void) { Modified: stable/8/sys/i386/xen/locore.s ============================================================================== --- stable/8/sys/i386/xen/locore.s Wed Nov 25 01:52:36 2009 (r199773) +++ stable/8/sys/i386/xen/locore.s Wed Nov 25 01:55:34 2009 (r199774) @@ -148,9 +148,7 @@ IdlePDPT: .long 0 /* phys addr of kerne .globl KPTphys #endif KPTphys: .long 0 /* phys addr of kernel page tables */ -#ifdef SMP .globl gdtset -#endif gdtset: .long 0 /* GDT is valid */ .globl proc0kstack From owner-svn-src-stable-8@FreeBSD.ORG Wed Nov 25 10:52:07 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB44D106566B; Wed, 25 Nov 2009 10:52:07 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B9A598FC12; Wed, 25 Nov 2009 10:52:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAPAq764046708; Wed, 25 Nov 2009 10:52:07 GMT (envelope-from roam@svn.freebsd.org) Received: (from roam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAPAq7VD046706; Wed, 25 Nov 2009 10:52:07 GMT (envelope-from roam@svn.freebsd.org) Message-Id: <200911251052.nAPAq7VD046706@svn.freebsd.org> From: Peter Pentchev Date: Wed, 25 Nov 2009 10:52:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199791 - stable/8/lib/libc/locale X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2009 10:52:07 -0000 Author: roam (doc,ports committer) Date: Wed Nov 25 10:52:07 2009 New Revision: 199791 URL: http://svn.freebsd.org/changeset/base/199791 Log: Merge rev. 199180 to 8.x-STABLE, the change to isblank(3): Fix the grammar as in the PR, and then some. PR: 140454 Submitted by: Jeremy Huddleston Modified: stable/8/lib/libc/locale/isblank.3 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/locale/isblank.3 ============================================================================== --- stable/8/lib/libc/locale/isblank.3 Wed Nov 25 10:43:03 2009 (r199790) +++ stable/8/lib/libc/locale/isblank.3 Wed Nov 25 10:52:07 2009 (r199791) @@ -50,9 +50,9 @@ For any locale, this includes the follow .It "\&``\et''\t`` ''" .El .Pp -In the "C" locale +In the "C" locale, a successful .Fn isblank -successful test is limited to this characters only. +test is limited to these characters only. The value of the argument must be representable as an .Vt "unsigned char" or the value of From owner-svn-src-stable-8@FreeBSD.ORG Wed Nov 25 11:23:45 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74992106566B; Wed, 25 Nov 2009 11:23:45 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 630E18FC1D; Wed, 25 Nov 2009 11:23:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAPBNjKP049278; Wed, 25 Nov 2009 11:23:45 GMT (envelope-from roam@svn.freebsd.org) Received: (from roam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAPBNjqI049276; Wed, 25 Nov 2009 11:23:45 GMT (envelope-from roam@svn.freebsd.org) Message-Id: <200911251123.nAPBNjqI049276@svn.freebsd.org> From: Peter Pentchev Date: Wed, 25 Nov 2009 11:23:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199796 - stable/8/share/misc X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2009 11:23:45 -0000 Author: roam (doc,ports committer) Date: Wed Nov 25 11:23:44 2009 New Revision: 199796 URL: http://svn.freebsd.org/changeset/base/199796 Log: Merge rev. 199181 to 8.x-STABLE: Correct the information about the doceng@ team members - Murray Stokely stepped down some time ago, about the same time as Giorgos Keramidas joined the team. PR: 140465 Submitted by: Denny Lin Modified: stable/8/share/misc/organization.dot Directory Properties: stable/8/share/misc/ (props changed) Modified: stable/8/share/misc/organization.dot ============================================================================== --- stable/8/share/misc/organization.dot Wed Nov 25 11:17:28 2009 (r199795) +++ stable/8/share/misc/organization.dot Wed Nov 25 11:23:44 2009 (r199796) @@ -28,7 +28,7 @@ _misc [label="Miscellaneous Hats"] core [label="Core Team\ncore@FreeBSD.org\nwilko, brooks, keramida, imp,\ngnn, wes, hrs, murray,\nrwatson"] coresecretary [label="Core Team Secretary\ncore-secretary@FreeBSD.org\njoel"] doccommitters [label="Doc/www Committers\ndoc-committers@FreeBSD.org"] -doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\nnik, blackend, hrs,\nmurray"] +doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\nnik, blackend, hrs,\nkeramida"] portscommitters [label="Ports Committers\nports-committers@FreeBSD.org"] portmgr [label="Port Management Team\nportmgr@FreeBSD.org\nmarcus, kris, erwin,\nlinimon, pav, krion"] portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\nerwin"] From owner-svn-src-stable-8@FreeBSD.ORG Wed Nov 25 14:54:58 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9502106566C; Wed, 25 Nov 2009 14:54:58 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD9B88FC0A; Wed, 25 Nov 2009 14:54:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAPEswig053582; Wed, 25 Nov 2009 14:54:58 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAPEswc6053580; Wed, 25 Nov 2009 14:54:58 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200911251454.nAPEswc6053580@svn.freebsd.org> From: Rui Paulo Date: Wed, 25 Nov 2009 14:54:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199800 - stable/8/sys/dev/ath/ath_hal X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2009 14:54:59 -0000 Author: rpaulo Date: Wed Nov 25 14:54:58 2009 New Revision: 199800 URL: http://svn.freebsd.org/changeset/base/199800 Log: MFC r199491: Add WorldB SKU. Modified: stable/8/sys/dev/ath/ath_hal/ah_regdomain.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ath/ath_hal/ah_regdomain.c ============================================================================== --- stable/8/sys/dev/ath/ath_hal/ah_regdomain.c Wed Nov 25 14:24:14 2009 (r199799) +++ stable/8/sys/dev/ath/ath_hal/ah_regdomain.c Wed Nov 25 14:54:58 2009 (r199800) @@ -170,6 +170,7 @@ enum { WOR9_WORLD = 0x69, /* World9 (WO9 SKU) */ WORA_WORLD = 0x6A, /* WorldA (WOA SKU) */ + WORB_WORLD = 0x6B, /* WorldB (WOB SKU) */ MKK3_MKKB = 0x80, /* Japan UNI-1 even + MKKB */ MKK3_MKKA2 = 0x81, /* Japan UNI-1 even + MKKA2 */ @@ -432,6 +433,7 @@ static REG_DMN_PAIR_MAPPING regDomainPai {EU1_WORLD, EU1_WORLD, EU1_WORLD, NO_REQ, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT }, {WOR9_WORLD, WOR9_WORLD, WOR9_WORLD, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT }, {WORA_WORLD, WORA_WORLD, WORA_WORLD, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT }, + {WORB_WORLD, WORB_WORLD, WORB_WORLD, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT }, }; /* @@ -1681,6 +1683,31 @@ static REG_DOMAIN regDomains[] = { WG1_2467_2467), .chan11g_turbo = BM1(T3_2437_2437)}, + {.regDmnEnum = WORB_WORLD, + .conformanceTestLimit = NO_CTL, + .dfsMask = DFS_FCC3 | DFS_ETSI, + .pscan = PSCAN_WWR, + .flags = DISALLOW_ADHOC_11A, + .chan11a = BM4(W1_5260_5320, + W1_5180_5240, + W1_5745_5825, + W1_5500_5700), + .chan11b = BM7(W1_2412_2412, + W1_2437_2442, + W1_2462_2462, + W1_2472_2472, + W1_2417_2432, + W1_2447_2457, + W1_2467_2467), + .chan11g = BM7(WG1_2412_2412, + WG1_2437_2442, + WG1_2462_2462, + WG1_2472_2472, + WG1_2417_2432, + WG1_2447_2457, + WG1_2467_2467), + .chan11g_turbo = BM1(T3_2437_2437)}, + {.regDmnEnum = NULL1, .conformanceTestLimit = NO_CTL, } From owner-svn-src-stable-8@FreeBSD.ORG Wed Nov 25 18:31:34 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FC35106566B; Wed, 25 Nov 2009 18:31:34 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E6678FC20; Wed, 25 Nov 2009 18:31:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAPIVYJv058265; Wed, 25 Nov 2009 18:31:34 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAPIVYtg058263; Wed, 25 Nov 2009 18:31:34 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200911251831.nAPIVYtg058263@svn.freebsd.org> From: Marius Strobl Date: Wed, 25 Nov 2009 18:31:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199809 - stable/8/sys/sparc64/include X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2009 18:31:34 -0000 Author: marius Date: Wed Nov 25 18:31:34 2009 New Revision: 199809 URL: http://svn.freebsd.org/changeset/base/199809 Log: MFC: r198502 Sync with the other archs and wrap the prototype of in_cksum_skip(9) in #ifdef _KERNEL. Submitted by: Ulrich Spoerlein Modified: stable/8/sys/sparc64/include/in_cksum.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/include/in_cksum.h ============================================================================== --- stable/8/sys/sparc64/include/in_cksum.h Wed Nov 25 17:51:14 2009 (r199808) +++ stable/8/sys/sparc64/include/in_cksum.h Wed Nov 25 18:31:34 2009 (r199809) @@ -164,6 +164,8 @@ in_cksum_hdr(struct ip *ip) return (__ret); } +#ifdef _KERNEL u_short in_cksum_skip(struct mbuf *m, int len, int skip); +#endif #endif /* _MACHINE_IN_CKSUM_H_ */ From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 26 08:29:03 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2B60106566C; Thu, 26 Nov 2009 08:29:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E07788FC0C; Thu, 26 Nov 2009 08:29:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAQ8T2Eg075397; Thu, 26 Nov 2009 08:29:02 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAQ8T275075395; Thu, 26 Nov 2009 08:29:02 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911260829.nAQ8T275075395@svn.freebsd.org> From: Alexander Motin Date: Thu, 26 Nov 2009 08:29:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199820 - stable/8/sys/dev/ahci X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2009 08:29:03 -0000 Author: mav Date: Thu Nov 26 08:29:02 2009 New Revision: 199820 URL: http://svn.freebsd.org/changeset/base/199820 Log: MFC r199717: Do not attach JMicrons with single PCI function. They are not working as AHCI for some reason, even when declaring so. Let atajmicron configure them for us and provide PATA support. Modified: stable/8/sys/dev/ahci/ahci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Thu Nov 26 05:16:07 2009 (r199819) +++ stable/8/sys/dev/ahci/ahci.c Thu Nov 26 08:29:02 2009 (r199820) @@ -254,6 +254,10 @@ ahci_probe(device_t dev) for (i = 0; ahci_ids[i].id != 0; i++) { if (ahci_ids[i].id == devid && (valid || !(ahci_ids[i].quirks & AHCI_Q_NOFORCE))) { + /* Do not attach JMicrons with single PCI function. */ + if (pci_get_vendor(dev) == 0x197b && + (pci_read_config(dev, 0xdf, 1) & 0x40) == 0) + return (ENXIO); snprintf(buf, sizeof(buf), "%s AHCI SATA controller", ahci_ids[i].name); device_set_desc_copy(dev, buf); From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 26 14:50:01 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7ECC10656A4; Thu, 26 Nov 2009 14:50:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C6C008FC15; Thu, 26 Nov 2009 14:50:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAQEo1F0084958; Thu, 26 Nov 2009 14:50:01 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAQEo15R084956; Thu, 26 Nov 2009 14:50:01 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911261450.nAQEo15R084956@svn.freebsd.org> From: Alexander Motin Date: Thu, 26 Nov 2009 14:50:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199831 - stable/8/sys/dev/ata X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2009 14:50:02 -0000 Author: mav Date: Thu Nov 26 14:50:01 2009 New Revision: 199831 URL: http://svn.freebsd.org/changeset/base/199831 Log: MFC r199749: Use only lower byte of sectors_intr IDENTIFY word as sector count. This fixes SET_MULTI error during boot on devices supporting less then 16 sectors per interrupt. Modified: stable/8/sys/dev/ata/ata-disk.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-disk.c ============================================================================== --- stable/8/sys/dev/ata/ata-disk.c Thu Nov 26 14:01:14 2009 (r199830) +++ stable/8/sys/dev/ata/ata-disk.c Thu Nov 26 14:50:01 2009 (r199831) @@ -397,7 +397,7 @@ ad_init(device_t dev) /* use multiple sectors/interrupt if device supports it */ if (ad_version(atadev->param.version_major)) { - int secsperint = max(1, min(atadev->param.sectors_intr, 16)); + int secsperint = max(1, min(atadev->param.sectors_intr & 0xff, 16)); if (!ata_controlcmd(dev, ATA_SET_MULTI, 0, 0, secsperint)) atadev->max_iosize = secsperint * DEV_BSIZE; From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 26 14:56:59 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A7171065696; Thu, 26 Nov 2009 14:56:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E1DF8FC1C; Thu, 26 Nov 2009 14:56:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAQEuxfB085180; Thu, 26 Nov 2009 14:56:59 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAQEuxA5085178; Thu, 26 Nov 2009 14:56:59 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911261456.nAQEuxA5085178@svn.freebsd.org> From: Alexander Motin Date: Thu, 26 Nov 2009 14:56:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199833 - stable/8/sys/dev/ata/chipsets X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2009 14:56:59 -0000 Author: mav Date: Thu Nov 26 14:56:58 2009 New Revision: 199833 URL: http://svn.freebsd.org/changeset/base/199833 Log: MFC r199645, r199646: Fix Intel PATA UDMA timings setting, affecting write performance. Binary divider value 10 specified in datasheet is not a hex 0x10. UDMA2 should be 33/2 instead of 66/4, which is documented as reverved, UDMA4 should be 66/2 instead of 66/4, which is definitely wrong. Release over-agressive WDMA0 mode timings as close to spec as chip can. Modified: stable/8/sys/dev/ata/chipsets/ata-intel.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-intel.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-intel.c Thu Nov 26 14:52:14 2009 (r199832) +++ stable/8/sys/dev/ata/chipsets/ata-intel.c Thu Nov 26 14:56:58 2009 (r199833) @@ -301,7 +301,7 @@ ata_intel_new_setmode(device_t dev, int u_int32_t mask40 = 0, new40 = 0; u_int8_t mask44 = 0, new44 = 0; int error; - u_int8_t timings[] = { 0x00, 0x00, 0x10, 0x21, 0x23, 0x10, 0x21, 0x23, + u_int8_t timings[] = { 0x00, 0x00, 0x10, 0x21, 0x23, 0x00, 0x21, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23 }; mode = ata_limit_mode(dev, mode, ctlr->chip->max_dma); @@ -319,7 +319,7 @@ ata_intel_new_setmode(device_t dev, int ata_mode2str(mode), ctlr->chip->text); if (!error) { if (mode >= ATA_UDMA0) { - u_int8_t utimings[] = { 0x00, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10 }; + u_int8_t utimings[] = { 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02 }; pci_write_config(gparent, 0x48, reg48 | (0x0001 << devno), 2); pci_write_config(gparent, 0x4a, @@ -331,7 +331,7 @@ ata_intel_new_setmode(device_t dev, int pci_write_config(gparent, 0x4a, (reg4a & ~(0x3 << (devno << 2))),2); } reg54 |= 0x0400; - if (mode >= ATA_UDMA2) + if (mode >= ATA_UDMA3) reg54 |= (0x1 << devno); else reg54 &= ~(0x1 << devno); From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 26 15:11:19 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A22F8106568D; Thu, 26 Nov 2009 15:11:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 779038FC18; Thu, 26 Nov 2009 15:11:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAQFBJLH085659; Thu, 26 Nov 2009 15:11:19 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAQFBJeY085657; Thu, 26 Nov 2009 15:11:19 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911261511.nAQFBJeY085657@svn.freebsd.org> From: Alexander Motin Date: Thu, 26 Nov 2009 15:11:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199834 - stable/8/sys/i386/cpufreq X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2009 15:11:19 -0000 Author: mav Date: Thu Nov 26 15:11:19 2009 New Revision: 199834 URL: http://svn.freebsd.org/changeset/base/199834 Log: MFC r199268, r199269, r199273: Core2Duo/Core2Quad CPUs are unable to control frequency of single CPU core, only pair of them. As result, both cores are running on highest one of requested frequencies, and that is reported by status register. Such behavior confuses frequency validation logic, as it runs on only one core, as SMP is not yet launched, making EIST completely unusable. Disable frequency validation by default, for systems with more then one CPU, until we can implement it properly. It looks like making more harm now then benefits. Add 'hw.est.strict' loader tunable to control it. PR: amd64/140506 Modified: stable/8/sys/i386/cpufreq/est.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/i386/cpufreq/est.c ============================================================================== --- stable/8/sys/i386/cpufreq/est.c Thu Nov 26 14:56:58 2009 (r199833) +++ stable/8/sys/i386/cpufreq/est.c Thu Nov 26 15:11:19 2009 (r199834) @@ -96,6 +96,8 @@ struct est_softc { static int msr_info_enabled = 0; TUNABLE_INT("hw.est.msr_info", &msr_info_enabled); +static int strict = -1; +TUNABLE_INT("hw.est.strict", &strict); /* Default bus clock value for Centrino processors. */ #define INTEL_BUS_CLK 100 @@ -1025,6 +1027,9 @@ est_attach(device_t dev) sc = device_get_softc(dev); sc->dev = dev; + /* On SMP system we can't guarantie independent freq setting. */ + if (strict == -1 && mp_ncpus > 1) + strict = 0; /* Check CPU for supported settings. */ if (est_get_info(dev)) return (ENXIO); @@ -1119,17 +1124,21 @@ est_acpi_info(device_t dev, freq_info ** */ if (sets[i].freq > 0) { error = est_set_id16(dev, sets[i].spec[0], 1); - if (error != 0) { + if (error != 0 && strict) { if (bootverbose) device_printf(dev, "Invalid freq %u, " "ignored.\n", sets[i].freq); - } else { - table[j].freq = sets[i].freq; - table[j].volts = sets[i].volts; - table[j].id16 = sets[i].spec[0]; - table[j].power = sets[i].power; - ++j; + continue; + } else if (error != 0 && bootverbose) { + device_printf(dev, "Can't check freq %u, " + "it may be invalid\n", + sets[i].freq); } + table[j].freq = sets[i].freq; + table[j].volts = sets[i].volts; + table[j].id16 = sets[i].spec[0]; + table[j].power = sets[i].power; + ++j; } } /* restore saved setting */ From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 26 15:16:03 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADB2B1065694; Thu, 26 Nov 2009 15:16:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C3118FC1B; Thu, 26 Nov 2009 15:16:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAQFG3JY085807; Thu, 26 Nov 2009 15:16:03 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAQFG3Gk085805; Thu, 26 Nov 2009 15:16:03 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911261516.nAQFG3Gk085805@svn.freebsd.org> From: Alexander Motin Date: Thu, 26 Nov 2009 15:16:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199835 - stable/8/sys/dev/hptrr X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2009 15:16:03 -0000 Author: mav Date: Thu Nov 26 15:16:03 2009 New Revision: 199835 URL: http://svn.freebsd.org/changeset/base/199835 Log: MFC r199043: Introduce hw.hptrr.attach_generic loader tunable to deny hptrr driver attach chips with generic Marvell (non-HighPoint) PCI identification. These chips are also supported by ata(4). Some vendors, like Supermicro, are using same chips without providing HPT RAID BIOS. PR: kern/120842, kern/136750 Modified: stable/8/sys/dev/hptrr/hptrr_osm_bsd.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/hptrr/hptrr_osm_bsd.c ============================================================================== --- stable/8/sys/dev/hptrr/hptrr_osm_bsd.c Thu Nov 26 15:11:19 2009 (r199834) +++ stable/8/sys/dev/hptrr/hptrr_osm_bsd.c Thu Nov 26 15:16:03 2009 (r199835) @@ -34,6 +34,9 @@ #include #include +static int attach_generic = 1; +TUNABLE_INT("hw.hptrr.attach_generic", &attach_generic); + static int hpt_probe(device_t dev) { PCI_ID pci_id; @@ -41,6 +44,9 @@ static int hpt_probe(device_t dev) int i; PHBA hba; + /* Some of supported chips are used not only by HPT. */ + if (pci_get_vendor(dev) != 0x1103 && !attach_generic) + return (ENXIO); for (him = him_list; him; him = him->next) { for (i=0; him->get_supported_device_id(i, &pci_id); i++) { if ((pci_get_vendor(dev) == pci_id.vid) && From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 26 15:22:43 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55B341065670; Thu, 26 Nov 2009 15:22:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 443DF8FC15; Thu, 26 Nov 2009 15:22:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAQFMhR7086054; Thu, 26 Nov 2009 15:22:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAQFMhRP086052; Thu, 26 Nov 2009 15:22:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911261522.nAQFMhRP086052@svn.freebsd.org> From: Alexander Motin Date: Thu, 26 Nov 2009 15:22:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199837 - stable/8/share/man/man4 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2009 15:22:43 -0000 Author: mav Date: Thu Nov 26 15:22:42 2009 New Revision: 199837 URL: http://svn.freebsd.org/changeset/base/199837 Log: MFC r199043: Introduce hw.hptrr.attach_generic loader tunable to deny hptrr driver attach chips with generic Marvell (non-HighPoint) PCI identification. These chips are also supported by ata(4). Some vendors, like Supermicro, are using same chips without providing HPT RAID BIOS. PR: kern/120842, kern/136750 Modified: stable/8/share/man/man4/hptrr.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/hptrr.4 ============================================================================== --- stable/8/share/man/man4/hptrr.4 Thu Nov 26 15:18:05 2009 (r199836) +++ stable/8/share/man/man4/hptrr.4 Thu Nov 26 15:22:42 2009 (r199837) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 14, 2007 +.Dd November 8, 2009 .Dt HPTRR 4 .Os .Sh NAME @@ -46,6 +46,14 @@ module at boot time, place the following .Bd -literal -offset indent hptrr_load="YES" .Ed +.Pp +The following tunables are settable from the loader: +.Bl -ohang +.It Va hw.hptrr.attach_generic +set to 0 to deny driver attach to chips with generic Marvell (non-HighPoint) +PCI identification. These chips are also supported by ata(4). +Some vendors are using same chips, but without providing RAID BIOS. +.El .Sh DESCRIPTION The .Nm @@ -101,6 +109,7 @@ manual page for details on support. .Pp This driver supersedes the older rr232x driver. .Sh SEE ALSO +.Xr ata 4 , .Xr cam 4 , .Xr hptmv 4 , .Xr loader 8 From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 26 18:14:03 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1C431065672; Thu, 26 Nov 2009 18:14:03 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EE3F8FC0A; Thu, 26 Nov 2009 18:14:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAQIE3GM089432; Thu, 26 Nov 2009 18:14:03 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAQIE3Z2089430; Thu, 26 Nov 2009 18:14:03 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <200911261814.nAQIE3Z2089430@svn.freebsd.org> From: Jaakko Heinonen Date: Thu, 26 Nov 2009 18:14:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199840 - stable/8/sbin/mount_nfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2009 18:14:03 -0000 Author: jh Date: Thu Nov 26 18:14:03 2009 New Revision: 199840 URL: http://svn.freebsd.org/changeset/base/199840 Log: MFC r198491: Fix parsing of mount options specified with -o in case an option with value is preceded by an option without value (for example -o option1,option2=value). Options must be separated before searching for '='. Also compare pnextopt explicitly against NULL. PR: bin/134069 Approved by: trasz (mentor) Modified: stable/8/sbin/mount_nfs/mount_nfs.c Directory Properties: stable/8/sbin/mount_nfs/ (props changed) Modified: stable/8/sbin/mount_nfs/mount_nfs.c ============================================================================== --- stable/8/sbin/mount_nfs/mount_nfs.c Thu Nov 26 15:50:52 2009 (r199839) +++ stable/8/sbin/mount_nfs/mount_nfs.c Thu Nov 26 18:14:03 2009 (r199840) @@ -232,16 +232,16 @@ main(int argc, char *argv[]) char *pnextopt = NULL; char *val = ""; pass_flag_to_nmount = 1; - pval = strchr(opt, '='); pnextopt = strchr(opt, ','); + if (pnextopt != NULL) { + *pnextopt = '\0'; + pnextopt++; + } + pval = strchr(opt, '='); if (pval != NULL) { *pval = '\0'; val = pval + 1; } - if (pnextopt) { - *pnextopt = '\0'; - pnextopt++; - } if (strcmp(opt, "bg") == 0) { opflags |= BGRND; pass_flag_to_nmount=0; From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 26 20:55:45 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4346C106566B; Thu, 26 Nov 2009 20:55:45 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E4088FC15; Thu, 26 Nov 2009 20:55:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAQKtjK6092888; Thu, 26 Nov 2009 20:55:45 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAQKtijU092885; Thu, 26 Nov 2009 20:55:44 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200911262055.nAQKtijU092885@svn.freebsd.org> From: Hiroki Sato Date: Thu, 26 Nov 2009 20:55:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199847 - in stable/8/release/doc: en_US.ISO8859-1/relnotes en_US.ISO8859-1/share/sgml share/sgml X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2009 20:55:45 -0000 Author: hrs Date: Thu Nov 26 20:55:44 2009 New Revision: 199847 URL: http://svn.freebsd.org/changeset/base/199847 Log: Add entries of Release Notes for 8.0R temporarily. Reviewed by: thompsa, linimon, and brd. Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml stable/8/release/doc/en_US.ISO8859-1/share/sgml/release.dsl stable/8/release/doc/share/sgml/release.dsl stable/8/release/doc/share/sgml/release.ent Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Nov 26 20:25:57 2009 (r199846) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Nov 26 20:55:44 2009 (r199847) @@ -4,11 +4,6 @@ %release; - - - - - ]>
@@ -57,7 +52,7 @@ Introduction This document contains the release notes for &os; - &release.current;. It + &release.current;. It describes recently added, changed, or deleted features of &os;. It also provides some notes on upgrading from previous versions of &os;. @@ -66,7 +61,7 @@ The &release.type; distribution to which these release notes apply represents the latest point along the &release.branch; development - branch since &release.branch; was created. Information regarding pre-built, binary + branch since &release.branch; was created. Information regarding pre-built, binary &release.type; distributions along this branch can be found at . @@ -87,7 +82,7 @@ This distribution of &os; &release.current; is a &release.type; distribution. It can be found at or any of its mirrors. More + url="&release.url;"> or any of its mirrors. More information on obtaining this (or other) &release.type; distributions of &os; can be found in the Obtaining @@ -100,455 +95,2340 @@ All users are encouraged to consult the release errata before installing &os;. The errata document is updated with late-breaking information discovered late in the - release cycle or after the release. Typically, it contains + release cycle or after the release. Typically, it contains information on known bugs, security advisories, and corrections to documentation. An up-to-date copy of the errata for &os; &release.current; can be found on the &os; Web site. - - What's New - - This section describes - the most user-visible new or changed features in &os; - since &release.prev;. - In general, changes described here are unique to the &release.branch; - branch unless specifically marked as &merged; features. - - - Typical release note items - document recent security advisories issued after - &release.prev;, - new drivers or hardware support, new commands or options, - major bug fixes, or contributed software upgrades. They may also - list changes to major ports/packages or release engineering - practices. Clearly the release notes cannot list every single - change made to &os; between releases; this document focuses - primarily on security advisories, user-visible changes, and major - architectural improvements. - - - Security Advisories - - - - - - - Kernel Changes - - A new &man.cpuset.2; API has been added - for thread to CPU binding and CPU resource grouping and - assignment. The &man.cpuset.1; userland utility has been added - to allow manipulation of processor sets. - - The &man.ddb.4; kernel debugger now has an output capture - facility. Input and output from &man.ddb.4; can now be captured - to a memory buffer for later inspection using &man.sysctl.8; or - a textdump. The new capture command controls - this feature. - - The &man.ddb.4; debugger now supports a simple scripting - facility, which supports a set of named scripts consisting of a - set of &man.ddb.4; commands. These commands can be managed from - within &man.ddb.4; or with the use of the new &man.ddb.8; - utility. More details can be found in the &man.ddb.4; manual - page. - - The kernel now supports a new textdump format of kernel - dumps. A textdump provides higher-level information via - mechanically generated/extracted debugging output, rather than a - simple memory dump. This facility can be used to generate brief - kernel bug reports that are rich in debugging information, but - are not dependent on kernel symbol tables or precisely - synchronized source code. More information can be found in the - &man.textdump.4; manual page. - - Kernel support for M:N threading has been removed. While - the KSE (Kernel Scheduled Entities) project was quite successful - in bringing threading to FreeBSD, the M:N approach taken by the - KSE library was never developed to its full potential. - Backwards compatibility for applications using KSE threading - will be provided via &man.libmap.conf.5; for dynamically linked - binaries. The &os; Project greatly appreciates the work of - &a.julian;, &a.deischen;, and &a.davidxu; on KSE support. - - The &os; kernel now exports information about certain kernel - features via the kern.features sysctl tree. - The &man.feature.present.3; library call provides a convenient - interface for user applications to test the presence of - features. - - The &os; kernel now has support for large - memory page mappings (superpages). - - The ULE - scheduler is now the default process scheduler - in GENERIC kernels. - - - Boot Loader Changes - - The BTX kernel used by the boot - loader has been changed to invoke BIOS routines from real - mode. This change makes it possible to boot &os; from USB - devices. - - A new gptboot boot loader has - been added to support booting from a GPT labeled disk. A - new boot command has been added to - &man.gpt.8;, which makes a GPT disk bootable by writing the - required bits of the boot loader, creating a new boot - partition if required. - - - - - Hardware Support - - The &man.cmx.4; driver, a driver for Omnikey CardMan 4040 - PCMCIA smartcard readers, has been added. - - The &man.syscons.4; driver now supports Colemak keyboard layout. - - The &man.uslcom.4; driver, a driver for Silicon - Laboratories CP2101/CP2102-based USB serial adapters, has been - imported from OpenBSD. - - - Multimedia Support - - - - - - - Network Interface Support - - The &man.ale.4; driver has been added to provide support - for Atheros AR8121/AR8113/AR8114 Gigabit/Fast Ethernet controllers. - - The &man.em.4; driver has been split into two drivers - with some common parts. The &man.em.4; driver will continue - to support adapters up to the 82575, as well as new - client/desktop adapters. A new &man.igb.4; driver - will support new server adapters. - - The &man.jme.4; driver has been added to provide support - for PCIe network adapters based on JMicron JMC250 Gigabit - Ethernet and JMC260 Fast Ethernet controllers. - - The &man.malo.4; driver has been added to provide - support for Marvell Libertas 88W8335 based PCI network - adapters. - - The firmware for the &man.mxge.4; driver has been - updated from 1.4.25 to 1.4.29. - - The &man.sf.4; driver has been overhauled to improve its - performance and to add support for checksum offloading. It - should also work on all architectures. - - The &man.re.4; driver has been overhauled to fix a - number of issues. This driver now has Wake On LAN (WOL) - support. - - The &man.vr.4; driver has been overhauled to fix a - number of outstanding issues. It also now works on all - architectures. - - The &man.wpi.4; driver has - been updated to include a number of stability fixes. - - - - - - Network Protocols - - The &man.bpf.4; packet filter and capture facility now - supports a zero-copy mode of operation, in which buffers are - loaned from a user process to the kernel. This feature can - be enabled by setting - the net.bpf.zerocopy_enable sysctl - variable to 1. - - ISDN4BSD(I4B), netatm, and all - related subsystems have been removed due to lack of - multi-processor support. - - A bug in TCP options padding, where the wrong padding - bytes were used, has been fixed. - - - - - Disks and Storage - - The &man.aac.4; driver now supports volumes larger than - 2TB in size. - - The &man.ata.4; driver now supports a spindown command for - disks; after a configurable amount of time, if no requests - have been received for a disk, the disk will be spun down - until the next request. The &man.atacontrol.8; utility now - supports a spindown command to configure - this feature. - - The &man.hptrr.4; driver has been updated to version 1.2 - from Highpoint. - - - - - File Systems - - A problem with using &man.mmap.2; on ZFS filesystems has - been fixed. - - A new kernel-mode NFS lock manager has been added, - improving performance and behavior of NFS locking. A new - &man.clear.locks.8; command has been added to clear locks held - on behalf of an NFS client. - - - - - - Userland Changes - - The &man.adduser.8; utility now supports - a option to set the mode of a new user's - home directory. - - BSD-licensed versions of &man.ar.1; and &man.ranlib.1;, - based on libarchive, have replaced the GNU - Binutils versions of these utilities. - - &man.chflags.1; now supports a flag for - verbose output and a flag to ignore errors - with the same semantics as (for example) - &man.chmod.1;. - - For compatiblity with other implementations, &man.cp.1; now - supports a flag, which is equivalent to - specifying the flags. - - BSD-licensed version of &man.cpio.1; based on - libarchive, has replaced the GNU cpio. - Note that the GNU cpio is still installed as - gcpio. - - The &man.env.1; program now supports - which will completely unset the given variable - name by removing it from the environment, - instead of just setting it to a null value. - - The &man.fdopendir.3; library function has been added. - - The &man.fetch.3; library now support HTTP 1.1 - If-Modified-Since behavior. The &man.fetch.1; program now - supports - which will only download the specified HTTP URL if the content - is newer than filename. - - &man.find.1; has been enhanced by the addition of a number - of primaries that were present in GNU find but not &os; - &man.find.1;. - - &man.jexec.8; now supports option to specify the - jail where the command will be executed. - - &man.kgdb.1; now supports a new add-kld - command to make it easier to debug crash dumps with kernel - modules. - - The &man.ls.1; program now supports a - option to specify a date format string to be used with the long - format () output. - - &man.nc.1; now supports a switch to - disable the use of TCP options. - - The &man.ping6.8; utility now returns 2 - when the packet transmission was successful but no responses - were received (this is the same behavior as &man.ping.8;). - It returned a non-zero value before this change. - - The &man.procstat.1; utility has been added to display - detailed information about processes. - - The &man.realpath.1; utility now supports - a flag to suppress warnings; it now also - accepts multiple paths on its command line. - - The &man.split.1; utility now supports a - flag to split a file into a certain number of chunks. - - The &man.tar.1; utility now supports a - flag to enable &man.compress.1;-style - compression/decompression. - - The &man.tar.1; utility now supports a - flag to ignore user/group names - on create and extract. - - The &man.tar.1; utility now supports an - flag to sparsify files on extraction. - - The &man.tar.1; utility now supports a - flag to substitute filenames based on the specified regular - expression. - - The &man.tcgetsid.3; library function has been added to - return the process group ID for the session leader for the - controlling terminal. It is defined in IEEE Std 1003.1-2001 - (POSIX). - - &man.top.1; now supports a flag to - provide per-CPU usage statistics. - - &man.zdump.8; is now working properly on 64 bit architectures. - - - &man.traceroute.8; now has the ability to print the AS - number for each hop with the new switch; a - new option allows selecting a particular - WHOIS server. - - &man.traceroute6.8; now supports a flag - to send probe packets with no upper-layer protocol, rather than - the usual UDP probe packets. - - - <filename>/etc/rc.d</filename> Scripts - - - - - - - - Contributed Software - - AMD has been updated from 6.0.10 - to 6.1.5. - - awk has been updated from 1 May - 2007 release to the 23 October 2007 release. - - bzip2 has been updated from 1.0.4 - to 1.0.5. - - CVS has been updated from 1.11.17 - to a post-1.11.22 snapshot from 10 March 2008. - - FILE has been updated from 4.23 - to 5.03. - - hostapd has been - updated from 0.5.8 to 0.5.10. - - IPFilter has been updated from - 4.1.23 to 4.1.28. - - less has been updated from - v408 to v429. - - ncurses has been updated from - 5.6-20061217 to 5.6-20080503. - - OpenSSH has been updated - from 4.5p1 to 5.1p1. - - OpenPAM has been updated from the - Figwort release to the Hydrangea release. - - sendmail has been updated from - 8.14.1 to 8.14.3. - - The timezone database has been updated from - the tzdata2008h release to - the tzdata2009j release. - - The stdtime part of libc, &man.zdump.8 and &man.zic.8 - have been updated from the tzcode2004a - release to the tzcode2009h release. - If you have upgraded from source or via the &man.freebsd-update.8, - then please run &man.tzsetup.8 to install a new /etc/localtime. - - - WPA Supplicant has been - updated from 0.5.8 to 0.5.10. - - - - - Ports/Packages Collection Infrastructure - - The &man.pkg.create.1; utility now supports - . When this option is specified and a - package tarball exists, it will not be overwritten. This is - useful when multiple packages are saved with several consecutive - runs of &man.pkg.create.1; with the - options. - - The pkg_sign and pkg_check utilities for cryptographically - signing &os; packages have been removed. They were only useful - for packages compressed using &man.gzip.1;; however - &man.bzip2.1; compression has been the norm for some time - now. - - - - - Release Engineering and Integration - - The supported version of - the GNOME desktop environment - (x11/gnome2) has been - updated from 2.20.1 to 2.22. - - - - - Documentation - - - - - - - - Upgrading from previous releases of &os; + + What's New - Beginning with &os; 6.2-RELEASE, - binary upgrades between RELEASE versions (and snapshots of the - various security branches) are supported using the - &man.freebsd-update.8; utility. The binary upgrade procedure will - update unmodified userland utilities, as well as unmodified GENERIC or - SMP kernels distributed as a part of an official &os; release. - The &man.freebsd-update.8; utility requires that the host being - upgraded have Internet connectivity. - - An older form of binary upgrade is supported through the - Upgrade option from the main &man.sysinstall.8; - menu on CDROM distribution media. This type of binary upgrade - may be useful on non-&arch.i386;, non-&arch.amd64; machines - or on systems with no Internet connectivity. - - Source-based upgrades (those based on recompiling the &os; - base system from source code) from previous versions are - supported, according to the instructions in - /usr/src/UPDATING. - - - Upgrading &os; should, of course, only be attempted after - backing up all data and configuration - files. - - + This section describes the most user-visible new or changed + features in &os; since &release.prev;, and changes shown in + Release Notes for the previous releases are marked as + [7.1R] and [7.2R]. + + Typical release note items document recent security + advisories issued after &release.prev;, new drivers or hardware + support, new commands or options, major bug fixes, or + contributed software upgrades. They may also list changes to + major ports/packages or release engineering practices. Clearly + the release notes cannot list every single change made to &os; + between releases; this document focuses primarily on security + advisories, user-visible changes, and major architectural + improvements. + + + Security Advisories + + Problems described in the following security advisories have + been fixed. For more information, consult the individual + advisories available from + . + + + + + + + + + Advisory + Date + Topic + + + + + + SA-08:05.openssh + 17 April 2008 + OpenSSH X11-forwarding privilege escalation + + + + SA-08:06.bind + 13 July 2008 + DNS cache poisoning + + + + SA-08:07.amd64 + 3 September 2008 + amd64 swapgs local privilege escalation + + + + SA-08:08.nmount + 3 September 2008 + &man.nmount.2; local arbitrary code execution + + + + SA-08:09.icmp6 + 3 September 2008 + Remote kernel panics on IPv6 connections + + + + SA-08:10.nd6 + 1 October 2008 + IPv6 Neighbor Discovery Protocol routing vulnerability + + + + SA-08:11.arc4random + 24 November 2008 + &man.arc4random.9; predictable sequence vulnerability + + + + SA-08:12.ftpd + 23 December 2008 + Cross-site request forgery in &man.ftpd.8; + + + + SA-08:13.protosw + 23 December 2008 + netgraph / bluetooth privilege escalation + + + + SA-09:01.lukemftpd + 07 January 2009 + Cross-site request forgery in + &man.lukemftpd.8; + + + + SA-09:02.openssl + 07 January 2009 + OpenSSL incorrectly checks for malformed + signatures + + + + SA-09:03.ntpd + 13 January 2009 + ntpd cryptographic signature + bypass + + + + SA-09:04.bind + 13 January 2009 + BIND DNSSEC incorrect checks for + malformed signatures + + + + SA-09:05.telnetd + 16 February 2009 + telnetd code execution + vulnerability + + + + SA-09:06.ktimer + 23 March 2009 + Local privilege escalation + + + + SA-09:07.libc + 04 April 2009 + Information leak in &man.db.3; + + + + SA-09:08.openssl + 22 April 2009 + Remotely exploitable crash in + OpenSSL + + + + SA-09:09.pipe + 10 June 2009 + Local information disclosure via direct pipe writes + + + + SA-09:10.ipv6 + 10 June 2009 + Missing permission check on SIOCSIFINFO_IN6 ioctl + + + + SA-09:11.ntpd + 10 June 2009 + ntpd stack-based buffer-overflow vulnerability + + + + SA-09:12.bind + 29 July 2009 + BIND &man.named.8; dynamic update message remote DoS + + + SA-09:14.devfs + 2 Oct 2009 + Devfs / VFS NULL pointer race condition + + + + + + + + Kernel Changes + + The &os; GENERIC kernel now + includes Trusted BSD MAC (Mandatory Access Control) support. + No MAC policy module is loaded by default. + + A loader + tunable hw.clflush_disable has been added + to avoid panic (trap 9) + at map_invalidate_cache_range() even if + Intel CPU is used. This tunable can be set + to -1 (default), 0 and + 1. The -1 is same as + the current behavior, which automatically + disables CLFLUSH on Intel CPUs without + CPUID_SS (this should occurr on Xen + only). You can specify 1 when this panic + happens on non-Intel CPUs (such as AMD's). Because disabling + CLFLUSH can reduce performance, you can try + with setting 0 on Intel CPUs + without SS to + use CLFLUSH feature. + + The &os; newbus subsystem is now MPSAFE. + + The &man.jail.8; subsystem has been updated. Changes include: + + + + A new virtualization container + named vimage has been implemented. This is + not enabled by default. To enable this, add the following + kernel options to your kernel configuration file and + rebuild the kernel: + + options VIMAGE + + Note that options SCTP in the + GENERIC kernel is not compatible with + options VIMAGE. This limitation will + be fixed in the next release. + + The vimage is a jail with a virtualized instance of + the &os; network stack. It can be created by using + &man.jail.8; command like this: + + &prompt.root; jail -c vnet name=vnet1 host.hostname=vnet1.example.net path=/ persist + + The vimage has own loopback interface and a separated + network stack including the L3 routing tables. Network + interfaces on the system can be moved by using + &man.ifconfig.8; option between the + different vimage jails and outside of them. + + Furthermore, the &man.epair.4; pseudo-interface driver + has been added to help communication between vimage jails. + It emulates a pair of back-to-back connected Ethernet + interfaces. For example, the following commands create an + interface pair of &man.epair.4;: + + &prompt.root; ifconfig epair0 create +epair0a +&prompt.root; ifconfig epair0a +epair0a: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 + ether 02:c0:64:00:07:0a +&prompt.root; ifconfig epair0b +epair0b: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 + ether 02:c0:64:00:08:0b + + The &man.epair.4; pseudo-interfaces and any physical + interfaces on the system can be moved between vimage jails + by using &man.ifconfig.8; option as + described above. Even after half of an &man.epair.4; pair + is moved, the back-to-back connection still valid and can + be used for inter-jail communication. + + Note that vimage is still considered as an + experimental feature. + + + + A jail can now have arbitrary named parameters similar + to environmental variables and the fixed jail parameters + in the previous releases have been replaced with them. + The jail name can now be used for identifying the jail in + &man.jexec.8; and &man.killall.1;. + + + + Multiple IPv4 and/or IPv6 addresses per jail are now + supported. It is even possible to have jails without + an IP address at all, which basically gives one a chrooted + environment with restricted process view and no + networking. + + + + SCTP (&man.sctp.4;) with IPv6 in jails has been + implemented. + + + + Specific CPU binding by using &man.cpuset.1; has been + implemented. Note that the current implementation allows + the superuser inside of the jail to change the CPU + bindings specified. + + + + A &man.jail.8; can start with a specific route + FIB now. + + + + The &man.ddb.8; kernel debugger now supports a + show jails subcommand. + + + + Compatibility support which permits 32-bit jail + binaries to be used on 64-bit systems to manage jails has + been added. + + + + Note that both version numbers of + jail and prison in + the &man.jail.8; have been updated for the new + features. + + + + The &man.ksyms.4;, kernel symbol table + interface driver has been added. It creates a character + device /dev/ksyms and provides + read-only access to a snapshot of the kernel symbol + table. + + The &os; Linux emulation + layer has been updated to version 2.6.16 and the default Linux + infrastructure port is + emulators/linux_base-f10 (Fedora + 10). + + The &os; virtual memory + subsystem now supports fully transparent use of + superpages for application memory; + application memory pages are dynamically promoted to or + demoted from superpages without any modification to + application code. This change offers the benefit of large + page sizes such as improved virtual memory efficiency and + reduced TLB (translation lookaside buffer) misses without + downsides like application changes and virtual memory + inflexibility. This can be enabled by setting a loader tunable + vm.pmap.pg_ps_enabled to + 1 and is enabled by default on + &arch.amd64;. + + The &man.ddb.8; kernel debugger now supports a + show mount subcommand. + + The &os; DTrace subsystem now supports a probe for + process execution. + + The &os; kernel virtual address + space has been increased to 6GB. This allows subsystems to use + larger virtual memory space than before. For example, the + &man.zfs.8; adaptive replacement cache (ARC) requires large + kernel memory space to cache file system data, so it benefits + from the increased address space. Note that the ceiling on + the kernel map size is now 60% of the size of physical memory + rather than an absolute quantity. + + The &man.kld.4; now supports installing 32-bit + system calls to the &os; syscall translation layer from kernel + modules. + + The &man.ktr.4; now supports a new KTR tracepoint in the + KTR_CALLOUT class to note when a callout + routine finishes executing. + + Types of variables used to track the amount of allocated + System V shared memory have been changed from + int to size_t. This + makes it possible to use more than 2 GB of memory for shared + memory segments on 64-bit architectures. Please note the new + BUGS section in &man.shmctl.2; and + /usr/src/UPDATING for limitations of this + temporary solution. + + The &man.sysctl.3; leaf nodes have a flag to tag + themselves as MPSAFE now. + + The &os; 32-bit system call translation layer now + supports installing 32-bit system calls for + VFS_AIO. + + The &man.clock.gettime.2; and the related system calls now + support a clock ID CLOCK_THREAD_CPUTIME_ID, + as defined in POSIX. + + The &man.cpuset.2; system call has been added. This is an + API for thread to CPU binding and CPU resource grouping and + assignment. + + The DTrace, a comprehensive dynamic tracing framework and + &man.dtrace.1; userland utility have been imported from + OpenSolaris. DTrace provides a powerful infrastructure to + permit administrators, developers, and service personnel to + concisely answer arbitrary questions about the behavior of the + operating system and user programs. + + The &man.ddb.4; kernel debugger now has an output capture + facility. Input and output from &man.ddb.4; can now be captured + to a memory buffer for later inspection using &man.sysctl.8; or + a textdump. The new capture command controls + this feature. + + The &man.ddb.4; debugger now supports a simple scripting + facility, which supports a set of named scripts consisting of a + set of &man.ddb.4; commands. These commands can be managed from + within &man.ddb.4; or with the use of the new &man.ddb.8; + utility. More details can be found in the &man.ddb.4; manual + page. + + The &man.ddb.4; ex command now supports + an mode which interprets and prints the + value at the requested address as a symbol. For example, + ex /S aio_swake + prints the name of the function currently registered in + via aio_swake hook. + + The &man.ddb.4; show conifhk command has + been added. This lists hooks currently waiting for completion + in run_interrupt_driven_config_hooks(). + + The &man.fcntl.2; system call now supports + F_DUP2FD command. This is equivalent to + &man.dup.2;, and compatible with the Sun Solaris and the IBM + AIX. + + The &os;'s &man.linux.4; ABI support now implements + sched_setaffinity() and + sched_getaffinity() using real CPU affinity + setting primitives. + + The &man.procstat.1; utility has been added. This is a + process inspection utility which provides some of the missing + functionality from &man.procfs.5; and new functionality for monitoring + and debugging specific processes. + + The client side functionality of &man.rpc.lockd.8; has been + implemented in the &os; kernel. This implementation provides the + correct semantics for &man.flock.2; style locks which are used + by the &man.lockf.1; command line tool and the &man.pidfile.3; + library. It also implements recovery from server restarts and + ensures that dirty cache blocks are written to the server before + obtaining locks (allowing multiple clients to use file locking + to safely share data). Also, a new kernel option + options NFSLOCKD has been added and enabled + by default. If the kernel support is enabled, &man.rpc.lockd.8; + automatically detects and uses the functionality. + + The &os; kernel now supports a new textdump format of kernel + dumps. A textdump provides higher-level information via + mechanically generated/extracted debugging output, rather than a + simple memory dump. This facility can be used to generate brief + kernel bug reports that are rich in debugging information, but + are not dependent on kernel symbol tables or precisely + synchronized source code. More information can be found in the + &man.textdump.4; manual page. + + The &man.wait4.2; system call now supports + flag to keep the process whose status + is returned in a waitable state and + which is equivalent to . + + The &os; kernel now has + initial support of binding interrupts to CPUs. + + The &man.sched.ule.4; scheduler is now the default + process scheduler in GENERIC + kernels. + + The sysctl + variables kern.features.compat_freebsd[456] + have been added. These are corresponding to the kernel options + COMPAT_FREEBSD[456]. + + + Boot Loader Changes + + The boot0 boot + loader now preserves volume ID at offset + 0x1b8 used in other operating systems + + The &man.boot0cfg.8; utility now supports a + new option to set the volume ID. + + The &man.boot.8; now supports 4-byte volume ID that *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 26 21:14:11 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66C651065676; Thu, 26 Nov 2009 21:14:11 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5496F8FC1C; Thu, 26 Nov 2009 21:14:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAQLE9RP093312; Thu, 26 Nov 2009 21:14:09 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAQLE9BO093310; Thu, 26 Nov 2009 21:14:09 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200911262114.nAQLE9BO093310@svn.freebsd.org> From: Hiroki Sato Date: Thu, 26 Nov 2009 21:14:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199848 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2009 21:14:11 -0000 Author: hrs Date: Thu Nov 26 21:14:09 2009 New Revision: 199848 URL: http://svn.freebsd.org/changeset/base/199848 Log: Remove newbus MPSAFE entry; it was reverted. Spotted by: attilio Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Nov 26 20:55:44 2009 (r199847) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Nov 26 21:14:09 2009 (r199848) @@ -329,8 +329,6 @@ without SS to use CLFLUSH feature. - The &os; newbus subsystem is now MPSAFE. - The &man.jail.8; subsystem has been updated. Changes include: From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 26 21:29:03 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B1A01065676; Thu, 26 Nov 2009 21:29:03 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id 0A6608FC18; Thu, 26 Nov 2009 21:29:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.3/8.14.3) with ESMTP id nAQLT1RG091690; Fri, 27 Nov 2009 00:29:01 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Fri, 27 Nov 2009 00:29:01 +0300 (MSK) From: Dmitry Morozovsky To: Hiroki Sato In-Reply-To: <200911262055.nAQKtijU092885@svn.freebsd.org> Message-ID: References: <200911262055.nAQKtijU092885@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (woozle.rinet.ru [0.0.0.0]); Fri, 27 Nov 2009 00:29:01 +0300 (MSK) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r199847 - in stable/8/release/doc: en_US.ISO8859-1/relnotes en_US.ISO8859-1/share/sgml share/sgml X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2009 21:29:03 -0000 Hiroki-san, On Thu, 26 Nov 2009, Hiroki Sato wrote: HS> Author: hrs HS> Date: Thu Nov 26 20:55:44 2009 HS> New Revision: 199847 HS> URL: http://svn.freebsd.org/changeset/base/199847 HS> HS> Log: HS> Add entries of Release Notes for 8.0R temporarily. Was two-spaces-after-centense changes intentional? HS> - branch since &release.branch; was created. Information regarding pre-built, binary HS> + branch since &release.branch; was created. Information regarding pre-built, binary [snip] -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 26 21:38:04 2009 Return-Path: Delivered-To: svn-src-stable-8@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9CB1106566B; Thu, 26 Nov 2009 21:38:04 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper-int.allbsd.org [IPv6:2001:2f0:104:e002::2]) by mx1.freebsd.org (Postfix) with ESMTP id 6843A8FC23; Thu, 26 Nov 2009 21:38:04 +0000 (UTC) Received: from delta.allbsd.org (p3177-ipbf416funabasi.chiba.ocn.ne.jp [123.225.92.177]) (authenticated bits=128) by mail.allbsd.org (8.14.3/8.14.3) with ESMTP id nAQLbdZh046215; Fri, 27 Nov 2009 06:37:50 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (alph.allbsd.org [192.168.0.10]) (authenticated bits=0) by delta.allbsd.org (8.13.4/8.13.4) with ESMTP id nAQLbZXm047330; Fri, 27 Nov 2009 06:37:38 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Fri, 27 Nov 2009 06:36:12 +0900 (JST) Message-Id: <20091127.063612.93935806.hrs@allbsd.org> To: marck@rinet.ru From: Hiroki Sato In-Reply-To: References: <200911262055.nAQKtijU092885@svn.freebsd.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.3rc1 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Fri_Nov_27_06_36_12_2009_542)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.95.3 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.3 (mail.allbsd.org [133.31.130.32]); Fri, 27 Nov 2009 06:37:56 +0900 (JST) X-Spam-Status: No, score=-4.8 required=13.0 tests=AWL,BAYES_00, CONTENT_TYPE_PRESENT, SPF_SOFTFAIL, X_MAILER_PRESENT autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gatekeeper.allbsd.org Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r199847 - in stable/8/release/doc: en_US.ISO8859-1/relnotes en_US.ISO8859-1/share/sgml share/sgml X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2009 21:38:05 -0000 ----Security_Multipart(Fri_Nov_27_06_36_12_2009_542)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Dmitry Morozovsky wrote in : ma> Hiroki-san, ma> ma> On Thu, 26 Nov 2009, Hiroki Sato wrote: ma> ma> HS> Author: hrs ma> HS> Date: Thu Nov 26 20:55:44 2009 ma> HS> New Revision: 199847 ma> HS> URL: http://svn.freebsd.org/changeset/base/199847 ma> HS> ma> HS> Log: ma> HS> Add entries of Release Notes for 8.0R temporarily. ma> ma> Was two-spaces-after-centense changes intentional? ma> ma> ma> HS> - branch since &release.branch; was created. Information regarding pre-built, binary ma> HS> + branch since &release.branch; was created. Information regarding pre-built, binary Gr, I just noticed malformed white-space changes by tabification were accidentally added, too :( I will fix them when I trim the items after 8.0R. Thanks for pointing out. -- Hiroki ----Security_Multipart(Fri_Nov_27_06_36_12_2009_542)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEABECAAYFAksO9MwACgkQTyzT2CeTzy0lhgCeP/W1dFBMyNWv1DABC0/aA9z6 FvgAmgMcT4mXniB5/2k8mLB9DvFHHoZ3 =E3bh -----END PGP SIGNATURE----- ----Security_Multipart(Fri_Nov_27_06_36_12_2009_542)---- From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 26 21:39:05 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 933191065696; Thu, 26 Nov 2009 21:39:05 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id 0EEA98FC12; Thu, 26 Nov 2009 21:39:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.3/8.14.3) with ESMTP id nAQLd2xg091867; Fri, 27 Nov 2009 00:39:02 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Fri, 27 Nov 2009 00:39:02 +0300 (MSK) From: Dmitry Morozovsky To: Gabor Kovesdan In-Reply-To: <4B0EF3C2.3020605@FreeBSD.org> Message-ID: References: <200911262055.nAQKtijU092885@svn.freebsd.org> <4B0EF3C2.3020605@FreeBSD.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (woozle.rinet.ru [0.0.0.0]); Fri, 27 Nov 2009 00:39:03 +0300 (MSK) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Hiroki Sato , src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r199847 - in stable/8/release/doc: en_US.ISO8859-1/relnotes en_US.ISO8859-1/share/sgml share/sgml X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2009 21:39:05 -0000 On Thu, 26 Nov 2009, Gabor Kovesdan wrote: GK> > HS> Date: Thu Nov 26 20:55:44 2009 GK> > HS> New Revision: 199847 GK> > HS> URL: http://svn.freebsd.org/changeset/base/199847 GK> > HS> HS> Log: GK> > HS> Add entries of Release Notes for 8.0R temporarily. GK> > GK> > Was two-spaces-after-centense changes intentional? GK> > GK> This is the convention suggested by fdp-primer, so I think it was. Hmm, http://www.freebsd.org/doc/en/books/fdp-primer/writing-style.html seems to disagree: Always use two spaces at the end of sentences, as this improves readability, and eases use of tools such as Emacs. -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 26 21:42:03 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6ACCE106566B; Thu, 26 Nov 2009 21:42:03 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id 199E38FC12; Thu, 26 Nov 2009 21:42:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 2DDBC14D9D4C; Thu, 26 Nov 2009 22:42:02 +0100 (CET) X-Virus-Scanned: amavisd-new at example.com Received: from server.mypc.hu ([127.0.0.1]) by localhost (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id WHLuFJz98KTq; Thu, 26 Nov 2009 22:41:59 +0100 (CET) Received: from [192.168.1.105] (catv-89-132-179-104.catv.broadband.hu [89.132.179.104]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id B226614D9D49; Thu, 26 Nov 2009 22:41:59 +0100 (CET) Message-ID: <4B0EF624.3090106@FreeBSD.org> Date: Thu, 26 Nov 2009 22:41:56 +0100 From: Gabor Kovesdan User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Dmitry Morozovsky References: <200911262055.nAQKtijU092885@svn.freebsd.org> <4B0EF3C2.3020605@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Hiroki Sato , src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r199847 - in stable/8/release/doc: en_US.ISO8859-1/relnotes en_US.ISO8859-1/share/sgml share/sgml X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2009 21:42:03 -0000 Dmitry Morozovsky escribi: > On Thu, 26 Nov 2009, Gabor Kovesdan wrote: > > GK> > HS> Date: Thu Nov 26 20:55:44 2009 > GK> > HS> New Revision: 199847 > GK> > HS> URL: http://svn.freebsd.org/changeset/base/199847 > GK> > HS> HS> Log: > GK> > HS> Add entries of Release Notes for 8.0R temporarily. > GK> > > GK> > Was two-spaces-after-centense changes intentional? > GK> > > GK> This is the convention suggested by fdp-primer, so I think it was. > > Hmm, http://www.freebsd.org/doc/en/books/fdp-primer/writing-style.html seems to > disagree: > > Always use two spaces at the end of sentences, as this improves readability, > and eases use of tools such as Emacs. > Sorry, from your comment I thought he fixed the whitespaces to respect this rule but now I see it wasn't that. -- Gabor Kovesdan FreeBSD Volunteer EMAIL: gabor@FreeBSD.org .:|:. gabor@kovesdan.org WEB: http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 26 21:47:12 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 004BF1065672; Thu, 26 Nov 2009 21:47:11 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id A632F8FC1B; Thu, 26 Nov 2009 21:47:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 1484B14D9D48; Thu, 26 Nov 2009 22:31:53 +0100 (CET) X-Virus-Scanned: amavisd-new at example.com Received: from server.mypc.hu ([127.0.0.1]) by localhost (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id u58KBu--P4uM; Thu, 26 Nov 2009 22:31:50 +0100 (CET) Received: from [192.168.1.105] (catv-89-132-179-104.catv.broadband.hu [89.132.179.104]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id 839D714D9C7A; Thu, 26 Nov 2009 22:31:50 +0100 (CET) Message-ID: <4B0EF3C2.3020605@FreeBSD.org> Date: Thu, 26 Nov 2009 22:31:46 +0100 From: Gabor Kovesdan User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Dmitry Morozovsky References: <200911262055.nAQKtijU092885@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Hiroki Sato , src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r199847 - in stable/8/release/doc: en_US.ISO8859-1/relnotes en_US.ISO8859-1/share/sgml share/sgml X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2009 21:47:12 -0000 Dmitry Morozovsky escribi: > Hiroki-san, > > On Thu, 26 Nov 2009, Hiroki Sato wrote: > > HS> Author: hrs > HS> Date: Thu Nov 26 20:55:44 2009 > HS> New Revision: 199847 > HS> URL: http://svn.freebsd.org/changeset/base/199847 > HS> > HS> Log: > HS> Add entries of Release Notes for 8.0R temporarily. > > Was two-spaces-after-centense changes intentional? > This is the convention suggested by fdp-primer, so I think it was. -- Gabor Kovesdan FreeBSD Volunteer EMAIL: gabor@FreeBSD.org .:|:. gabor@kovesdan.org WEB: http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 26 22:09:37 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA2BF106566B; Thu, 26 Nov 2009 22:09:37 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7C008FC0A; Thu, 26 Nov 2009 22:09:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAQM9b5L094356; Thu, 26 Nov 2009 22:09:37 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAQM9bGA094354; Thu, 26 Nov 2009 22:09:37 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200911262209.nAQM9bGA094354@svn.freebsd.org> From: Hiroki Sato Date: Thu, 26 Nov 2009 22:09:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199849 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2009 22:09:37 -0000 Author: hrs Date: Thu Nov 26 22:09:37 2009 New Revision: 199849 URL: http://svn.freebsd.org/changeset/base/199849 Log: More items: - U-Boot support library for loader(8) (ARM, PowerPC) - multiprocessor (SMP) (PowerPC) - E500 (Book-E) embedded CPU support (PowerPC) - Freescale PowerQUICCIII MPC85xx system-on-chip support (single- and dual-core) (PowerPC) - Feroceon, Sheeva embedded CPU support - Marvell Orion (88F5281), Kirkwood (88F6281) and Discovery Innovation (MV-78100) systems-on-chip support (ARM) - DS133x and DS1553 RTC support - tsec(4) Gigabit Ethernet driver - mge(4) Gigabit Ethernet driver - kernel core dump support (PowerPC) - mini dump support (ARM) - gdbserver(1) support for (ARM, PowerPC) Submitted by: raj Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Nov 26 21:14:09 2009 (r199848) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Nov 26 22:09:37 2009 (r199849) @@ -448,6 +448,12 @@ epair0b: flags=8842<BROADCAST,RUNNING emulators/linux_base-f10 (Fedora 10). + The &os;/&arch.arm; now + supports mini dump. + + The &os;/&arch.powerpc; now + supports kernel core dump. + The &os; virtual memory subsystem now supports fully transparent use of superpages for application memory; @@ -603,6 +609,9 @@ epair0b: flags=8842<BROADCAST,RUNNING The &man.boot0cfg.8; utility now supports a new option to set the volume ID. + The &man.loader.8; now + supports U-Boot support library. + The &man.boot.8; now supports 4-byte volume ID that certain versions of &windows; put into the MBR and invoking PXE by pressing the F6 key on some supported BIOSes. @@ -638,6 +647,23 @@ epair0b: flags=8842<BROADCAST,RUNNING The &os; now includes experimental support for &arch.mips; platform. + Support for RTC on Dallas Semiconductor chips + has been improved. The DS133x and DS1553 are now + supported. + + The &os;/&arch.arm; now supports + Feroceon and Sheeva embedded CPU, Marvell Orion (88F5281), + Kirkwood (88F6281), Discovery Innovation (MV-78100) + systems-on-chip CPU. + + The &os;/&arch.powerpc; now + supports SMP machines + + The &os;/&arch.powerpc; now + supports E500 (Book-E) embedded CPU and Freescale + PowerQUICCIII MPC85xx system-on-chip (including single and + dual-core). + The &man.acpi.4; subsystem now supports the System Resource Affinity Table (SRAT) used to describe affinity relationships between CPUs and memory, ACPI 3.0 fields in @@ -885,6 +911,12 @@ epair0b: flags=8842<BROADCAST,RUNNING + The mge(4) driver has + been added to provide support for Marvell Gigabit Ethernet + controllers found on ARM-based SOCs (Orion, Kirkwood, + Discovery), as well as on system controllers for PowerPC + processors (MV64430, MV6446x). + The &man.miibus.4; driver now supports the Marvell 88E3016. @@ -903,6 +935,11 @@ epair0b: flags=8842<BROADCAST,RUNNING The &man.nge.4; driver has been improved and now works on all platforms. + The tsec(4) driver has been added to + provide support for Freescale integrated Three-Speed + Ethernet Controller (TSEC). This driver also works with + the enhanced version of the controller (eTSEC). + The &man.uath.4; driver for USB wireless LAN adapter based on Atheros AR5005UG and AR5005UX chipsets has been added. The &man.uathload.8; utility, a firmware @@ -1736,6 +1773,9 @@ options NFSD # for NFS server + The &man.gdbserver.1; now supports &arch.arm; + and &arch.powerpc; platforms. + The &man.gpt.8; program has been removed in favor of &man.gpart.8;. From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 26 22:35:27 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF842106566C; Thu, 26 Nov 2009 22:35:27 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ADE108FC22; Thu, 26 Nov 2009 22:35:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAQMZRYn094890; Thu, 26 Nov 2009 22:35:27 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAQMZRrC094888; Thu, 26 Nov 2009 22:35:27 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200911262235.nAQMZRrC094888@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 26 Nov 2009 22:35:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199850 - stable/8/sys/boot/uboot/common X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2009 22:35:27 -0000 Author: raj Date: Thu Nov 26 22:35:26 2009 New Revision: 199850 URL: http://svn.freebsd.org/changeset/base/199850 Log: MFC r199534: Provide an effective (relocated) address when building modules metadata. This lets modules loaded dynamically in loader(8) work for U-Boot-based platforms. Modified: stable/8/sys/boot/uboot/common/metadata.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/boot/uboot/common/metadata.c ============================================================================== --- stable/8/sys/boot/uboot/common/metadata.c Thu Nov 26 22:09:37 2009 (r199849) +++ stable/8/sys/boot/uboot/common/metadata.c Thu Nov 26 22:35:26 2009 (r199850) @@ -231,6 +231,7 @@ md_copymodules(vm_offset_t addr) struct preloaded_file *fp; struct file_metadata *md; int c; + vm_offset_t a; c = addr != 0; /* start with the first module on the list, should be the kernel */ @@ -240,7 +241,8 @@ md_copymodules(vm_offset_t addr) MOD_TYPE(addr, fp->f_type, c); if (fp->f_args) MOD_ARGS(addr, fp->f_args, c); - MOD_ADDR(addr, fp->f_addr, c); + a = fp->f_addr - __elfN(relocation_offset); + MOD_ADDR(addr, a, c); MOD_SIZE(addr, fp->f_size, c); for (md = fp->f_metadata; md != NULL; md = md->md_next) { if (!(md->md_type & MODINFOMD_NOCOPY)) From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 27 00:21:17 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9F161065676; Fri, 27 Nov 2009 00:21:17 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D91C48FC12; Fri, 27 Nov 2009 00:21:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAR0LHcf096843; Fri, 27 Nov 2009 00:21:17 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAR0LHWJ096841; Fri, 27 Nov 2009 00:21:17 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200911270021.nAR0LHWJ096841@svn.freebsd.org> From: Ken Smith Date: Fri, 27 Nov 2009 00:21:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199851 - stable/8/sys/conf X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2009 00:21:18 -0000 Author: kensmith Date: Fri Nov 27 00:21:17 2009 New Revision: 199851 URL: http://svn.freebsd.org/changeset/base/199851 Log: 8.0-RELEASE is done, shift stable/8 to -STABLE designation. Modified: stable/8/sys/conf/newvers.sh Modified: stable/8/sys/conf/newvers.sh ============================================================================== --- stable/8/sys/conf/newvers.sh Thu Nov 26 22:35:26 2009 (r199850) +++ stable/8/sys/conf/newvers.sh Fri Nov 27 00:21:17 2009 (r199851) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="8.0" -BRANCH="PRERELEASE" +BRANCH="STABLE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 27 00:57:39 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76808106568D; Fri, 27 Nov 2009 00:57:39 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-ew0-f226.google.com (mail-ew0-f226.google.com [209.85.219.226]) by mx1.freebsd.org (Postfix) with ESMTP id 61E3F8FC15; Fri, 27 Nov 2009 00:57:37 +0000 (UTC) Received: by ewy26 with SMTP id 26so1344941ewy.3 for ; Thu, 26 Nov 2009 16:57:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=d4OifiW0aQ3VMuW9k9zrtTTGK3Gkgd4Nc+Ovh8UPX2M=; b=uAY5crOVkQquiLd7uhF+mj4wdHY3362UBu2563kDiCf7MQr9VB0DSbPeDdYkbyk3L6 Dgz7n4ZR06oU9/0mGjzG4ZfkN2H3RfoZ6+Ojuo0MDUMfNiLOVjXRMNO7w1mUGAZ/wm23 Yhe9O01/4PoMn6VJB0vsNwIdJR7/onicNN0r4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=J5fzVGx0VBwwyKrNT62I2S6YYPQlKK67YryTsb01jC8DS5noG7UZ7zcDgqNXjiswE2 Y7gJ3d1rDbYH/Yhv2752dAPlEjNVeYlhiO56P+DhnBb5TN0MZE2GDp/HLiUbb2UUL7w3 XtEog4+kW/mMht4Bu3w6osRMVo/kM8OElDzMM= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.216.89.85 with SMTP id b63mr119320wef.175.1259283457156; Thu, 26 Nov 2009 16:57:37 -0800 (PST) In-Reply-To: <200911270021.nAR0LHWJ096841@svn.freebsd.org> References: <200911270021.nAR0LHWJ096841@svn.freebsd.org> From: Ivan Voras Date: Fri, 27 Nov 2009 01:57:17 +0100 X-Google-Sender-Auth: d2a03ea8059ccd12 Message-ID: <9bbcef730911261657pdd8c245pee43128a0f200eb3@mail.gmail.com> To: Ken Smith Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r199851 - stable/8/sys/conf X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2009 00:57:39 -0000 2009/11/27 Ken Smith : > Author: kensmith > Date: Fri Nov 27 00:21:17 2009 > New Revision: 199851 > URL: http://svn.freebsd.org/changeset/base/199851 > > Log: > =C2=A08.0-RELEASE is done, shift stable/8 to -STABLE designation. Thank you and congratulations! From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 27 02:45:51 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E9E91065731; Fri, 27 Nov 2009 02:45:51 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 049458FC13; Fri, 27 Nov 2009 02:45:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAR2jow6099630; Fri, 27 Nov 2009 02:45:50 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAR2jof9099628; Fri, 27 Nov 2009 02:45:50 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200911270245.nAR2jof9099628@svn.freebsd.org> From: Attilio Rao Date: Fri, 27 Nov 2009 02:45:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199853 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2009 02:45:51 -0000 Author: attilio Date: Fri Nov 27 02:45:50 2009 New Revision: 199853 URL: http://svn.freebsd.org/changeset/base/199853 Log: MFC r199227: Add the possibility for vfs.root.mountfrom tunable to accept a list of items rather than a single one. While there fix also a nit in a comment. Sponsored by: Sandvine Incorporated Modified: stable/8/sys/kern/vfs_mount.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/vfs_mount.c ============================================================================== --- stable/8/sys/kern/vfs_mount.c Fri Nov 27 01:02:17 2009 (r199852) +++ stable/8/sys/kern/vfs_mount.c Fri Nov 27 02:45:50 2009 (r199853) @@ -104,13 +104,17 @@ struct vnode *rootvnode; * The root filesystem is detailed in the kernel environment variable * vfs.root.mountfrom, which is expected to be in the general format * - * :[] + * :[][ :[] ...] * vfsname := the name of a VFS known to the kernel and capable * of being mounted as root * path := disk device name or other data used by the filesystem * to locate its physical store * - * The environment variable vfs.root.mountfrom options is a comma delimited + * If the environment variable vfs.root.mountfrom is a space separated list, + * each list element is tried in turn and the root filesystem will be mounted + * from the first one that suceeds. + * + * The environment variable vfs.root.mountfrom.options is a comma delimited * set of string mount options. These mount options must be parseable * by nmount() in the kernel. */ @@ -1643,7 +1647,7 @@ vfs_opterror(struct vfsoptlist *opts, co void vfs_mountroot(void) { - char *cp, *options; + char *cp, *cpt, *options, *tmpdev; int error, i, asked = 0; options = NULL; @@ -1695,10 +1699,15 @@ vfs_mountroot(void) */ cp = getenv("vfs.root.mountfrom"); if (cp != NULL) { - error = vfs_mountroot_try(cp, options); + cpt = cp; + while ((tmpdev = strsep(&cpt, " \t")) != NULL) { + error = vfs_mountroot_try(tmpdev, options); + if (error == 0) { + freeenv(cp); + goto mounted; + } + } freeenv(cp); - if (!error) - goto mounted; } /* From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 27 02:47:50 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07E6E1065692; Fri, 27 Nov 2009 02:47:50 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA5D58FC15; Fri, 27 Nov 2009 02:47:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAR2lnSp099720; Fri, 27 Nov 2009 02:47:49 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAR2lnKi099714; Fri, 27 Nov 2009 02:47:49 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200911270247.nAR2lnKi099714@svn.freebsd.org> From: Attilio Rao Date: Fri, 27 Nov 2009 02:47:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199854 - stable/8/sys/dev/aic7xxx X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2009 02:47:50 -0000 Author: attilio Date: Fri Nov 27 02:47:49 2009 New Revision: 199854 URL: http://svn.freebsd.org/changeset/base/199854 Log: MFC r199260: Add sysctls in ahd(4) in order to keep track of different classes of errors. So far 3 different classes are present (correctable, uncorrectable and fatal) but more can be added easilly. Sponsored by: Sandvine Incorporated Modified: stable/8/sys/dev/aic7xxx/ahd_pci.c stable/8/sys/dev/aic7xxx/aic79xx.c stable/8/sys/dev/aic7xxx/aic79xx.h stable/8/sys/dev/aic7xxx/aic79xx_osm.c stable/8/sys/dev/aic7xxx/aic79xx_osm.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/aic7xxx/ahd_pci.c ============================================================================== --- stable/8/sys/dev/aic7xxx/ahd_pci.c Fri Nov 27 02:45:50 2009 (r199853) +++ stable/8/sys/dev/aic7xxx/ahd_pci.c Fri Nov 27 02:47:49 2009 (r199854) @@ -134,6 +134,7 @@ ahd_pci_attach(device_t dev) return (error); } + ahd_sysctl(ahd); ahd_attach(ahd); return (0); } @@ -198,6 +199,7 @@ ahd_pci_map_registers(struct ahd_softc * bus_release_resource(ahd->dev_softc, regs_type, regs_id, regs); regs = NULL; + AHD_CORRECTABLE_ERROR(ahd); } else { command &= ~PCIM_CMD_PORTEN; aic_pci_write_config(ahd->dev_softc, @@ -214,6 +216,7 @@ ahd_pci_map_registers(struct ahd_softc * if (regs == NULL) { device_printf(ahd->dev_softc, "can't allocate register resources\n"); + AHD_UNCORRECTABLE_ERROR(ahd); return (ENOMEM); } ahd->tags[0] = rman_get_bustag(regs); @@ -226,6 +229,7 @@ ahd_pci_map_registers(struct ahd_softc * if (regs2 == NULL) { device_printf(ahd->dev_softc, "can't allocate register resources\n"); + AHD_UNCORRECTABLE_ERROR(ahd); return (ENOMEM); } ahd->tags[1] = rman_get_bustag(regs2); Modified: stable/8/sys/dev/aic7xxx/aic79xx.c ============================================================================== --- stable/8/sys/dev/aic7xxx/aic79xx.c Fri Nov 27 02:45:50 2009 (r199853) +++ stable/8/sys/dev/aic7xxx/aic79xx.c Fri Nov 27 02:47:49 2009 (r199854) @@ -401,6 +401,7 @@ ahd_flush_qoutfifo(struct ahd_softc *ahd if (scb == NULL) { printf("%s: Warning - GSFIFO SCB %d invalid\n", ahd_name(ahd), scbid); + AHD_CORRECTABLE_ERROR(ahd); continue; } /* @@ -525,6 +526,7 @@ rescan_fifos: if (scb == NULL) { printf("%s: Warning - DMA-up and complete " "SCB %d invalid\n", ahd_name(ahd), scbid); + AHD_CORRECTABLE_ERROR(ahd); continue; } hscb_ptr = (uint8_t *)scb->hscb; @@ -546,6 +548,7 @@ rescan_fifos: if (scb == NULL) { printf("%s: Warning - Complete Qfrz SCB %d invalid\n", ahd_name(ahd), scbid); + AHD_CORRECTABLE_ERROR(ahd); continue; } @@ -563,6 +566,7 @@ rescan_fifos: if (scb == NULL) { printf("%s: Warning - Complete SCB %d invalid\n", ahd_name(ahd), scbid); + AHD_CORRECTABLE_ERROR(ahd); continue; } @@ -870,6 +874,7 @@ ahd_run_qoutfifo(struct ahd_softc *ahd) "(cmdcmplt)\nQOUTPOS = %d\n", ahd_name(ahd), scb_index, ahd->qoutfifonext); + AHD_CORRECTABLE_ERROR(ahd); ahd_dump_card_state(ahd); } else if ((completion->sg_status & SG_STATUS_VALID) != 0) { ahd_handle_scb_status(ahd, scb); @@ -897,9 +902,11 @@ ahd_handle_hwerrint(struct ahd_softc *ah error = ahd_inb(ahd, ERROR); for (i = 0; i < num_errors; i++) { - if ((error & ahd_hard_errors[i].errno) != 0) + if ((error & ahd_hard_errors[i].errno) != 0) { printf("%s: hwerrint, %s\n", ahd_name(ahd), ahd_hard_errors[i].errmesg); + AHD_UNCORRECTABLE_ERROR(ahd); + } } ahd_dump_card_state(ahd); @@ -990,6 +997,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, ahd_name(ahd)); ahd_dump_card_state(ahd); ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE); + AHD_UNCORRECTABLE_ERROR(ahd); break; case STATUS_OVERRUN: { @@ -1005,6 +1013,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, printf("SCB %d Packetized Status Overrun", scbid); ahd_dump_card_state(ahd); ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE); + AHD_UNCORRECTABLE_ERROR(ahd); break; } case CFG4ISTAT_INTR: @@ -1017,6 +1026,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, if (scb == NULL) { ahd_dump_card_state(ahd); printf("CFG4ISTAT: Free SCB %d referenced", scbid); + AHD_FATAL_ERROR(ahd); panic("For safety"); } ahd_outq(ahd, HADDR, scb->sense_busaddr); @@ -1044,6 +1054,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, case P_MESGIN: ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE); printf("%s: Issued Bus Reset.\n", ahd_name(ahd)); + AHD_UNCORRECTABLE_ERROR(ahd); break; case P_COMMAND: { @@ -1068,6 +1079,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, scbid = ahd_get_scbptr(ahd); scb = ahd_lookup_scb(ahd, scbid); if (scb == NULL) { + AHD_CORRECTABLE_ERROR(ahd); printf("Invalid phase with no valid SCB. " "Resetting bus.\n"); ahd_reset_channel(ahd, 'A', @@ -1127,6 +1139,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_RECOVERY) != 0) { ahd_print_path(ahd, scb); + AHD_CORRECTABLE_ERROR(ahd); printf("Unexpected command phase from " "packetized target\n"); } @@ -1214,6 +1227,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, && bus_phase != P_MESGOUT) { printf("ahd_intr: HOST_MSG_LOOP bad " "phase 0x%x\n", bus_phase); + AHD_CORRECTABLE_ERROR(ahd); /* * Probably transitioned to bus free before * we got here. Just punt the message. @@ -1316,6 +1330,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, ahd_name(ahd), 'A', SCSIID_TARGET(ahd, ahd_inb(ahd, SAVED_SCSIID)), lastphase, ahd_inb(ahd, SCSISIGI)); + AHD_CORRECTABLE_ERROR(ahd); break; } case MISSED_BUSFREE: @@ -1328,6 +1343,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, ahd_name(ahd), 'A', SCSIID_TARGET(ahd, ahd_inb(ahd, SAVED_SCSIID)), lastphase, ahd_inb(ahd, SCSISIGI)); + AHD_CORRECTABLE_ERROR(ahd); ahd_restart(ahd); return; } @@ -1387,6 +1403,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, devinfo.lun); scbid = ahd_get_scbptr(ahd); scb = ahd_lookup_scb(ahd, scbid); + AHD_CORRECTABLE_ERROR(ahd); if (scb != NULL && (scb->flags & SCB_RECOVERY_SCB) != 0) /* @@ -1570,11 +1587,13 @@ ahd_handle_scsiint(struct ahd_softc *ahd printf("%s: SCSI offset overrun detected. Resetting bus.\n", ahd_name(ahd)); + AHD_CORRECTABLE_ERROR(ahd); ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE); } else if ((status & SCSIRSTI) != 0) { printf("%s: Someone reset channel A\n", ahd_name(ahd)); ahd_reset_channel(ahd, 'A', /*Initiate Reset*/FALSE); + AHD_UNCORRECTABLE_ERROR(ahd); } else if ((status & SCSIPERR) != 0) { /* Make sure the sequencer is in a safe location. */ @@ -1619,6 +1638,7 @@ ahd_handle_scsiint(struct ahd_softc *ahd "valid during SELTO scb(0x%x)\n", ahd_name(ahd), scbid); ahd_dump_card_state(ahd); + AHD_UNCORRECTABLE_ERROR(ahd); } else { struct ahd_devinfo devinfo; #ifdef AHD_DEBUG @@ -1654,6 +1674,7 @@ ahd_handle_scsiint(struct ahd_softc *ahd } else if (status3 != 0) { printf("%s: SCSI Cell parity error SSTAT3 == 0x%x\n", ahd_name(ahd), status3); + AHD_CORRECTABLE_ERROR(ahd); ahd_outb(ahd, CLRSINT3, status3); } else if ((lqistat1 & (LQIPHASE_LQ|LQIPHASE_NLQ)) != 0) { @@ -1712,6 +1733,7 @@ ahd_handle_scsiint(struct ahd_softc *ahd "during unexpected busfree\n", ahd_name(ahd), scbid, mode); packetized = 0; + AHD_CORRECTABLE_ERROR(ahd); } else packetized = (scb->flags & SCB_PACKETIZED) != 0; clear_fifo = 1; @@ -1856,6 +1878,7 @@ ahd_handle_transmission_error(struct ahd ahd_scsisigi_print(curphase, &cur_col, 50); ahd_perrdiag_print(perrdiag, &cur_col, 50); printf("\n"); + AHD_CORRECTABLE_ERROR(ahd); ahd_dump_card_state(ahd); } @@ -1864,6 +1887,7 @@ ahd_handle_transmission_error(struct ahd printf("%s: Gross protocol error during incoming " "packet. lqistat1 == 0x%x. Resetting bus.\n", ahd_name(ahd), lqistat1); + AHD_UNCORRECTABLE_ERROR(ahd); } ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE); return; @@ -1891,6 +1915,7 @@ ahd_handle_transmission_error(struct ahd */ ahd_outb(ahd, LQCTL2, LQIRETRY); printf("LQIRetry for LQICRCI_LQ to release ACK\n"); + AHD_CORRECTABLE_ERROR(ahd); } else if ((lqistat1 & LQICRCI_NLQ) != 0) { /* * We detected a CRC error in a NON-LQ packet. @@ -1942,6 +1967,7 @@ ahd_handle_transmission_error(struct ahd if (scb == NULL) { printf("%s: No SCB valid for LQICRC_NLQ. " "Resetting bus\n", ahd_name(ahd)); + AHD_UNCORRECTABLE_ERROR(ahd); ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE); return; } @@ -1999,9 +2025,11 @@ ahd_handle_lqiphase_error(struct ahd_sof && (ahd_inb(ahd, MDFFSTAT) & DLZERO) != 0) { if ((lqistat1 & LQIPHASE_LQ) != 0) { printf("LQIRETRY for LQIPHASE_LQ\n"); + AHD_CORRECTABLE_ERROR(ahd); ahd_outb(ahd, LQCTL2, LQIRETRY); } else if ((lqistat1 & LQIPHASE_NLQ) != 0) { printf("LQIRETRY for LQIPHASE_NLQ\n"); + AHD_CORRECTABLE_ERROR(ahd); ahd_outb(ahd, LQCTL2, LQIRETRY); } else panic("ahd_handle_lqiphase_error: No phase errors\n"); @@ -2010,6 +2038,7 @@ ahd_handle_lqiphase_error(struct ahd_sof ahd_unpause(ahd); } else { printf("Reseting Channel for LQI Phase error\n"); + AHD_CORRECTABLE_ERROR(ahd); ahd_dump_card_state(ahd); ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE); } @@ -2099,6 +2128,7 @@ ahd_handle_pkt_busfree(struct ahd_softc ahd_print_path(ahd, scb); printf("Probable outgoing LQ CRC error. " "Retrying command\n"); + AHD_CORRECTABLE_ERROR(ahd); } scb->crc_retry_count++; } else { @@ -2134,6 +2164,7 @@ ahd_handle_pkt_busfree(struct ahd_softc scb = ahd_lookup_scb(ahd, scbid); ahd_print_path(ahd, scb); printf("Unexpected PKT busfree condition\n"); + AHD_UNCORRECTABLE_ERROR(ahd); ahd_dump_card_state(ahd); ahd_abort_scbs(ahd, SCB_GET_TARGET(ahd, scb), 'A', SCB_GET_LUN(scb), SCB_GET_TAG(scb), @@ -2143,6 +2174,7 @@ ahd_handle_pkt_busfree(struct ahd_softc return (1); } printf("%s: Unexpected PKT busfree condition\n", ahd_name(ahd)); + AHD_UNCORRECTABLE_ERROR(ahd); ahd_dump_card_state(ahd); /* Restart the sequencer. */ return (1); @@ -2421,6 +2453,7 @@ ahd_handle_nonpkt_busfree(struct ahd_sof ahd_lookup_phase_entry(lastphase)->phasemsg, aborted, ahd_inw(ahd, PRGMCNT)); + AHD_UNCORRECTABLE_ERROR(ahd); ahd_dump_card_state(ahd); if (lastphase != P_BUSFREE) ahd_force_renegotiation(ahd, &devinfo); @@ -2456,6 +2489,7 @@ ahd_handle_proto_violation(struct ahd_so ahd_print_devinfo(ahd, &devinfo); printf("Target did not send an IDENTIFY message. " "LASTPHASE = 0x%x.\n", lastphase); + AHD_UNCORRECTABLE_ERROR(ahd); scb = NULL; } else if (scb == NULL) { /* @@ -2464,12 +2498,14 @@ ahd_handle_proto_violation(struct ahd_so */ ahd_print_devinfo(ahd, &devinfo); printf("No SCB found during protocol violation\n"); + AHD_UNCORRECTABLE_ERROR(ahd); goto proto_violation_reset; } else { aic_set_transaction_status(scb, CAM_SEQUENCE_FAIL); if ((seq_flags & NO_CDB_SENT) != 0) { ahd_print_path(ahd, scb); printf("No or incomplete CDB sent to device.\n"); + AHD_UNCORRECTABLE_ERROR(ahd); } else if ((ahd_inb_scbram(ahd, SCB_CONTROL) & STATUS_RCVD) == 0) { /* @@ -2484,6 +2520,7 @@ ahd_handle_proto_violation(struct ahd_so } else { ahd_print_path(ahd, scb); printf("Unknown protocol violation.\n"); + AHD_UNCORRECTABLE_ERROR(ahd); ahd_dump_card_state(ahd); } } @@ -2499,6 +2536,7 @@ proto_violation_reset: found = ahd_reset_channel(ahd, 'A', TRUE); printf("%s: Issued Channel %c Bus Reset. " "%d SCBs aborted\n", ahd_name(ahd), 'A', found); + AHD_UNCORRECTABLE_ERROR(ahd); } else { /* * Leave the selection hardware off in case @@ -2521,6 +2559,7 @@ proto_violation_reset: } printf("Protocol violation %s. Attempting to abort.\n", ahd_lookup_phase_entry(curphase)->phasemsg); + AHD_UNCORRECTABLE_ERROR(ahd); } } @@ -2602,6 +2641,7 @@ ahd_clear_critical_section(struct ahd_so "%s: First Instruction 0x%x now 0x%x\n", ahd_name(ahd), ahd_name(ahd), first_instr, seqaddr); + AHD_FATAL_ERROR(ahd); ahd_dump_card_state(ahd); panic("critical section loop"); } @@ -3566,6 +3606,7 @@ ahd_setup_initiator_msgout(struct ahd_so } else if (scb == NULL) { printf("%s: WARNING. No pending message for " "I_T msgin. Issuing NO-OP\n", ahd_name(ahd)); + AHD_CORRECTABLE_ERROR(ahd); ahd->msgout_buf[ahd->msgout_index++] = MSG_NOOP; ahd->msgout_len++; ahd->msg_type = MSG_TYPE_INITIATOR_MSGOUT; @@ -3596,6 +3637,7 @@ ahd_setup_initiator_msgout(struct ahd_so ahd->msgout_len++; ahd_print_path(ahd, scb); printf("Bus Device Reset Message Sent\n"); + AHD_CORRECTABLE_ERROR(ahd); /* * Clear our selection hardware in advance of * the busfree. We may have an entry in the waiting @@ -3615,6 +3657,7 @@ ahd_setup_initiator_msgout(struct ahd_so ahd_print_path(ahd, scb); printf("Abort%s Message Sent\n", (scb->hscb->control & TAG_ENB) != 0 ? " Tag" : ""); + AHD_CORRECTABLE_ERROR(ahd); /* * Clear our selection hardware in advance of * the busfree. We may have an entry in the waiting @@ -3638,6 +3681,7 @@ ahd_setup_initiator_msgout(struct ahd_so "does not have a waiting message\n"); printf("SCSIID = %x, target_mask = %x\n", scb->hscb->scsiid, devinfo->target_mask); + AHD_FATAL_ERROR(ahd); panic("SCB = %d, SCB Control = %x:%x, MSG_OUT = %x " "SCB flags = %x", SCB_GET_TAG(scb), scb->hscb->control, ahd_inb_scbram(ahd, SCB_CONTROL), ahd_inb(ahd, MSG_OUT), @@ -5129,9 +5173,11 @@ ahd_handle_devreset(struct ahd_softc *ah lun, AC_SENT_BDR, NULL); if (message != NULL - && (verbose_level <= bootverbose)) + && (verbose_level <= bootverbose)) { + AHD_CORRECTABLE_ERROR(ahd); printf("%s: %s on %c:%d. %d SCBs aborted\n", ahd_name(ahd), message, devinfo->channel, devinfo->target, found); + } } #ifdef AHD_TARGET_MODE @@ -5509,6 +5555,7 @@ ahd_reset(struct ahd_softc *ahd, int rei if (wait == 0) { printf("%s: WARNING - Failed chip reset! " "Trying to initialize anyway.\n", ahd_name(ahd)); + AHD_FATAL_ERROR(ahd); } ahd_outb(ahd, HCNTRL, ahd->pause); @@ -5630,6 +5677,7 @@ ahd_init_scbdata(struct ahd_softc *ahd) scb_data->maxhscbs = ahd_probe_scbs(ahd); if (scb_data->maxhscbs == 0) { printf("%s: No SCB space found\n", ahd_name(ahd)); + AHD_FATAL_ERROR(ahd); return (ENXIO); } @@ -6474,6 +6522,7 @@ ahd_init(struct ahd_softc *ahd) printf("%s: WARNING. Termination is not configured correctly.\n" "%s: WARNING. SCSI bus operations may FAIL.\n", ahd_name(ahd), ahd_name(ahd)); + AHD_CORRECTABLE_ERROR(ahd); } init_done: ahd_restart(ahd); @@ -6830,6 +6879,7 @@ ahd_default_config(struct ahd_softc *ahd if (ahd_alloc_tstate(ahd, ahd->our_id, 'A') == NULL) { printf("%s: unable to allocate ahd_tmode_tstate. " "Failing attach\n", ahd_name(ahd)); + AHD_FATAL_ERROR(ahd); return (ENOMEM); } @@ -6909,6 +6959,7 @@ ahd_parse_cfgdata(struct ahd_softc *ahd, if (ahd_alloc_tstate(ahd, ahd->our_id, 'A') == NULL) { printf("%s: unable to allocate ahd_tmode_tstate. " "Failing attach\n", ahd_name(ahd)); + AHD_FATAL_ERROR(ahd); return (ENOMEM); } @@ -7135,6 +7186,7 @@ ahd_pause_and_flushwork(struct ahd_softc if (maxloops == 0) { printf("Infinite interrupt loop, INTSTAT = %x", ahd_inb(ahd, INTSTAT)); + AHD_FATAL_ERROR(ahd); } ahd->qfreeze_cnt++; ahd_outw(ahd, KERNEL_QFREEZE_COUNT, ahd->qfreeze_cnt); @@ -7440,6 +7492,7 @@ ahd_search_qinfifo(struct ahd_softc *ahd if (scb == NULL) { printf("qinpos = %d, SCB index = %d\n", qinpos, ahd->qinfifo[qinpos]); + AHD_FATAL_ERROR(ahd); panic("Loop 1\n"); } @@ -8195,20 +8248,26 @@ ahd_handle_scsi_status(struct ahd_softc switch (SIU_PKTFAIL_CODE(siu)) { case SIU_PFC_NONE: printf("No packet failure found\n"); + AHD_UNCORRECTABLE_ERROR(ahd); break; case SIU_PFC_CIU_FIELDS_INVALID: printf("Invalid Command IU Field\n"); + AHD_UNCORRECTABLE_ERROR(ahd); break; case SIU_PFC_TMF_NOT_SUPPORTED: printf("TMF not supportd\n"); + AHD_UNCORRECTABLE_ERROR(ahd); break; case SIU_PFC_TMF_FAILED: printf("TMF failed\n"); + AHD_UNCORRECTABLE_ERROR(ahd); break; case SIU_PFC_INVALID_TYPE_CODE: printf("Invalid L_Q Type code\n"); + AHD_UNCORRECTABLE_ERROR(ahd); break; case SIU_PFC_ILLEGAL_REQUEST: + AHD_UNCORRECTABLE_ERROR(ahd); printf("Illegal request\n"); default: break; @@ -9281,6 +9340,7 @@ ahd_recover_commands(struct ahd_softc *a printf("%s: Recovery Initiated - Card was %spaused\n", ahd_name(ahd), was_paused ? "" : "not "); + AHD_CORRECTABLE_ERROR(ahd); ahd_dump_card_state(ahd); ahd_pause_and_flushwork(ahd); @@ -9507,6 +9567,7 @@ ahd_other_scb_timeout(struct ahd_softc * (scb->flags & SCB_OTHERTCL_TIMEOUT) != 0 ? " again\n" : "\n"); + AHD_UNCORRECTABLE_ERROR(ahd); newtimeout = aic_get_timeout(scb); scb->flags |= SCB_OTHERTCL_TIMEOUT; found = 0; @@ -9929,6 +9990,7 @@ ahd_handle_en_lun(struct ahd_softc *ahd, if (lstate != NULL) { xpt_print_path(ccb->ccb_h.path); printf("Lun already enabled\n"); + AHD_CORRECTABLE_ERROR(ahd); ccb->ccb_h.status = CAM_LUN_ALRDY_ENA; return; } Modified: stable/8/sys/dev/aic7xxx/aic79xx.h ============================================================================== --- stable/8/sys/dev/aic7xxx/aic79xx.h Fri Nov 27 02:45:50 2009 (r199853) +++ stable/8/sys/dev/aic7xxx/aic79xx.h Fri Nov 27 02:47:49 2009 (r199854) @@ -1061,6 +1061,27 @@ typedef enum { #define AHD_MODE_UNKNOWN_MSK AHD_MK_MSK(AHD_MODE_UNKNOWN) #define AHD_MODE_ANY_MSK (~0) +typedef enum { + AHD_SYSCTL_ROOT, + AHD_SYSCTL_SUMMARY, + AHD_SYSCTL_DEBUG, + AHD_SYSCTL_NUMBER +} ahd_sysctl_types_t; + +typedef enum { + AHD_ERRORS_CORRECTABLE, + AHD_ERRORS_UNCORRECTABLE, + AHD_ERRORS_FATAL, + AHD_ERRORS_NUMBER +} ahd_sysctl_errors_t; + +#define AHD_CORRECTABLE_ERROR(sc) \ + (((sc)->summerr[AHD_ERRORS_CORRECTABLE])++) +#define AHD_UNCORRECTABLE_ERROR(sc) \ + (((sc)->summerr[AHD_ERRORS_UNCORRECTABLE])++) +#define AHD_FATAL_ERROR(sc) \ + (((sc)->summerr[AHD_ERRORS_FATAL])++) + typedef uint8_t ahd_mode_state; typedef void ahd_callback_t (void *); @@ -1159,6 +1180,13 @@ struct ahd_softc { uint32_t cmdcmplt_total; /* + * Errors statistics and printouts. + */ + struct sysctl_ctx_list sysctl_ctx[AHD_SYSCTL_NUMBER]; + struct sysctl_oid *sysctl_tree[AHD_SYSCTL_NUMBER]; + u_int summerr[AHD_ERRORS_NUMBER]; + + /* * Card characteristics */ ahd_chip chip; Modified: stable/8/sys/dev/aic7xxx/aic79xx_osm.c ============================================================================== --- stable/8/sys/dev/aic7xxx/aic79xx_osm.c Fri Nov 27 02:45:50 2009 (r199853) +++ stable/8/sys/dev/aic7xxx/aic79xx_osm.c Fri Nov 27 02:47:49 2009 (r199854) @@ -77,6 +77,63 @@ static int ahd_create_path(struct ahd_so char channel, u_int target, u_int lun, struct cam_path **path); +static const char *ahd_sysctl_node_elements[] = { + "root", + "summary", + "debug" +}; + +static const char *ahd_sysctl_node_descriptions[] = { + "root error collection for aic79xx controllers", + "summary collection for aic79xx controllers", + "debug collection for aic79xx controllers" +}; + +static const char *ahd_sysctl_errors_elements[] = { + "Cerrors", + "Uerrors", + "Ferrors" +}; + +static const char *ahd_sysctl_errors_descriptions[] = { + "Correctable errors", + "Uncorrectable errors", + "Fatal errors" +}; + +static int +ahd_set_debugcounters(SYSCTL_HANDLER_ARGS) +{ + struct ahd_softc *sc; + int error, tmpv; + + tmpv = 0; + sc = arg1; + error = sysctl_handle_int(oidp, &tmpv, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (tmpv < 0 || tmpv >= AHD_ERRORS_NUMBER) + return (EINVAL); + sc->summerr[arg2] = tmpv; + return (0); +} + +static int +ahd_clear_allcounters(SYSCTL_HANDLER_ARGS) +{ + struct ahd_softc *sc; + int error, tmpv; + + tmpv = 0; + sc = arg1; + error = sysctl_handle_int(oidp, &tmpv, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (tmpv != 0) + bzero(sc->summerr, sizeof(sc->summerr)); + return (0); +} + static int ahd_create_path(struct ahd_softc *ahd, char channel, u_int target, u_int lun, struct cam_path **path) @@ -88,6 +145,48 @@ ahd_create_path(struct ahd_softc *ahd, c path_id, target, lun)); } +void +ahd_sysctl(struct ahd_softc *ahd) +{ + u_int i; + + for (i = 0; i < AHD_SYSCTL_NUMBER; i++) + sysctl_ctx_init(&ahd->sysctl_ctx[i]); + + ahd->sysctl_tree[AHD_SYSCTL_ROOT] = + SYSCTL_ADD_NODE(&ahd->sysctl_ctx[AHD_SYSCTL_ROOT], + SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, + device_get_nameunit(ahd->dev_softc), CTLFLAG_RD, 0, + ahd_sysctl_node_descriptions[AHD_SYSCTL_ROOT]); + SYSCTL_ADD_PROC(&ahd->sysctl_ctx[AHD_SYSCTL_ROOT], + SYSCTL_CHILDREN(ahd->sysctl_tree[AHD_SYSCTL_ROOT]), + OID_AUTO, "clear", CTLTYPE_UINT | CTLFLAG_RW, ahd, + 0, ahd_clear_allcounters, "IU", + "Clear all counters"); + + for (i = AHD_SYSCTL_SUMMARY; i < AHD_SYSCTL_NUMBER; i++) + ahd->sysctl_tree[i] = + SYSCTL_ADD_NODE(&ahd->sysctl_ctx[i], + SYSCTL_CHILDREN(ahd->sysctl_tree[AHD_SYSCTL_ROOT]), + OID_AUTO, ahd_sysctl_node_elements[i], + CTLFLAG_RD, 0, + ahd_sysctl_node_descriptions[i]); + + for (i = AHD_ERRORS_CORRECTABLE; i < AHD_ERRORS_NUMBER; i++) { + SYSCTL_ADD_UINT(&ahd->sysctl_ctx[AHD_SYSCTL_SUMMARY], + SYSCTL_CHILDREN(ahd->sysctl_tree[AHD_SYSCTL_SUMMARY]), + OID_AUTO, ahd_sysctl_errors_elements[i], + CTLFLAG_RD, &ahd->summerr[i], i, + ahd_sysctl_errors_descriptions[i]); + SYSCTL_ADD_PROC(&ahd->sysctl_ctx[AHD_SYSCTL_DEBUG], + SYSCTL_CHILDREN(ahd->sysctl_tree[AHD_SYSCTL_DEBUG]), + OID_AUTO, ahd_sysctl_errors_elements[i], + CTLFLAG_RW | CTLTYPE_UINT, ahd, i, + ahd_set_debugcounters, "IU", + ahd_sysctl_errors_descriptions[i]); + } +} + int ahd_map_int(struct ahd_softc *ahd) { Modified: stable/8/sys/dev/aic7xxx/aic79xx_osm.h ============================================================================== --- stable/8/sys/dev/aic7xxx/aic79xx_osm.h Fri Nov 27 02:45:50 2009 (r199853) +++ stable/8/sys/dev/aic7xxx/aic79xx_osm.h Fri Nov 27 02:47:49 2009 (r199854) @@ -51,6 +51,7 @@ #include #include #include +#include #define AIC_PCI_CONFIG 1 #include @@ -259,6 +260,7 @@ void ahd_platform_free(struct ahd_soft int ahd_map_int(struct ahd_softc *ahd); int ahd_attach(struct ahd_softc *); int ahd_softc_comp(struct ahd_softc *lahd, struct ahd_softc *rahd); +void ahd_sysctl(struct ahd_softc *ahd); int ahd_detach(device_t); #define ahd_platform_init(arg) From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 27 10:53:47 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B1A61065676; Fri, 27 Nov 2009 10:53:47 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A5DB8FC23; Fri, 27 Nov 2009 10:53:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nARArkEx017717; Fri, 27 Nov 2009 10:53:46 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nARArkRL017716; Fri, 27 Nov 2009 10:53:46 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <200911271053.nARArkRL017716@svn.freebsd.org> From: Alexander Leidinger Date: Fri, 27 Nov 2009 10:53:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199860 - stable/8/sbin/fsck X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2009 10:53:47 -0000 Author: netchild Date: Fri Nov 27 10:53:46 2009 New Revision: 199860 URL: http://svn.freebsd.org/changeset/base/199860 Log: MFC r199582: Fix minor resource leak in a function which was introduced by changing an err() to a return in r106254. Modified: stable/8/sbin/fsck/fsck.c Directory Properties: stable/8/sbin/fsck/ (props changed) Modified: stable/8/sbin/fsck/fsck.c ============================================================================== --- stable/8/sbin/fsck/fsck.c Fri Nov 27 07:55:39 2009 (r199859) +++ stable/8/sbin/fsck/fsck.c Fri Nov 27 10:53:46 2009 (r199860) @@ -543,8 +543,10 @@ getfslab(const char *str) if ((fd = open(str, O_RDONLY)) == -1) err(1, "cannot open `%s'", str); - if (ioctl(fd, DIOCGDINFO, &dl) == -1) + if (ioctl(fd, DIOCGDINFO, &dl) == -1) { + (void) close(fd); return(NULL); + } (void) close(fd); From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 27 10:55:28 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61F9B106566B; Fri, 27 Nov 2009 10:55:28 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 512D18FC13; Fri, 27 Nov 2009 10:55:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nARAtSBa017821; Fri, 27 Nov 2009 10:55:28 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nARAtSP9017819; Fri, 27 Nov 2009 10:55:28 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <200911271055.nARAtSP9017819@svn.freebsd.org> From: Alexander Leidinger Date: Fri, 27 Nov 2009 10:55:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199861 - stable/8/sbin/mount_cd9660 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2009 10:55:28 -0000 Author: netchild Date: Fri Nov 27 10:55:28 2009 New Revision: 199861 URL: http://svn.freebsd.org/changeset/base/199861 Log: MFC r199584: Fix minor memory leak in a function. Modified: stable/8/sbin/mount_cd9660/mount_cd9660.c Directory Properties: stable/8/sbin/mount_cd9660/ (props changed) Modified: stable/8/sbin/mount_cd9660/mount_cd9660.c ============================================================================== --- stable/8/sbin/mount_cd9660/mount_cd9660.c Fri Nov 27 10:53:46 2009 (r199860) +++ stable/8/sbin/mount_cd9660/mount_cd9660.c Fri Nov 27 10:55:28 2009 (r199861) @@ -251,8 +251,10 @@ set_charset(struct iovec **iov, int *iov if ((cs_disk = malloc(ICONV_CSNMAXLEN)) == NULL) return (-1); - if ((cs_local = malloc(ICONV_CSNMAXLEN)) == NULL) + if ((cs_local = malloc(ICONV_CSNMAXLEN)) == NULL) { + free(cs_disk); return (-1); + } strncpy(cs_disk, ENCODING_UNICODE, ICONV_CSNMAXLEN); strncpy(cs_local, kiconv_quirkcs(localcs, KICONV_VENDOR_MICSFT), ICONV_CSNMAXLEN); From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 27 13:39:00 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4030D106566B; Fri, 27 Nov 2009 13:39:00 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F9048FC1B; Fri, 27 Nov 2009 13:39:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nARDd0vV021174; Fri, 27 Nov 2009 13:39:00 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nARDd0hI021172; Fri, 27 Nov 2009 13:39:00 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200911271339.nARDd0hI021172@svn.freebsd.org> From: Rafal Jaworowski Date: Fri, 27 Nov 2009 13:39:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199865 - stable/8/sys/dev/tsec X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2009 13:39:00 -0000 Author: raj Date: Fri Nov 27 13:38:59 2009 New Revision: 199865 URL: http://svn.freebsd.org/changeset/base/199865 Log: MFC r199580: tsec: Use IFQ_DRV macros for managing interface packet queue. This lets tsec(4) work with ALTQ. Submitted by: Marcin Ligenza Modified: stable/8/sys/dev/tsec/if_tsec.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/tsec/if_tsec.c ============================================================================== --- stable/8/sys/dev/tsec/if_tsec.c Fri Nov 27 13:19:06 2009 (r199864) +++ stable/8/sys/dev/tsec/if_tsec.c Fri Nov 27 13:38:59 2009 (r199865) @@ -716,9 +716,9 @@ tsec_start_locked(struct ifnet *ifp) bus_dmamap_sync(sc->tsec_tx_dtag, sc->tsec_tx_dmap, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - for (;;) { + while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { /* Get packet from the queue */ - IF_DEQUEUE(&ifp->if_snd, m0); + IFQ_DRV_DEQUEUE(&ifp->if_snd, m0); if (m0 == NULL) break; @@ -755,7 +755,7 @@ tsec_start_locked(struct ifnet *ifp) m0 = mtmp; if (tsec_encap(sc, m0, fcb_inserted)) { - IF_PREPEND(&ifp->if_snd, m0); + IFQ_DRV_PREPEND(&ifp->if_snd, m0); ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 28 18:34:35 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF6D91065672; Sat, 28 Nov 2009 18:34:35 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD8E18FC14; Sat, 28 Nov 2009 18:34:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nASIYZGk063680; Sat, 28 Nov 2009 18:34:35 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nASIYZPq063677; Sat, 28 Nov 2009 18:34:35 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200911281834.nASIYZPq063677@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 28 Nov 2009 18:34:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199889 - stable/8/sys/powerpc/aim X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2009 18:34:36 -0000 Author: nwhitehorn Date: Sat Nov 28 18:34:35 2009 New Revision: 199889 URL: http://svn.freebsd.org/changeset/base/199889 Log: MFC r197961,197962: Fix two typos that caused DSISR and CR not to be preserved across context switches. Modified: stable/8/sys/powerpc/aim/swtch.S stable/8/sys/powerpc/aim/trap_subr.S Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/aim/swtch.S ============================================================================== --- stable/8/sys/powerpc/aim/swtch.S Sat Nov 28 17:48:25 2009 (r199888) +++ stable/8/sys/powerpc/aim/swtch.S Sat Nov 28 18:34:35 2009 (r199889) @@ -171,7 +171,7 @@ ENTRY(savectx) mr %r12,%r2 stmw %r12,PCB_CONTEXT(%r3) /* Save the non-volatile GP regs */ mfcr %r4 /* Save the condition register */ - stw %r4,PCB_CONTEXT(%r3) + stw %r4,PCB_CR(%r3) blr /* Modified: stable/8/sys/powerpc/aim/trap_subr.S ============================================================================== --- stable/8/sys/powerpc/aim/trap_subr.S Sat Nov 28 17:48:25 2009 (r199888) +++ stable/8/sys/powerpc/aim/trap_subr.S Sat Nov 28 18:34:35 2009 (r199889) @@ -451,7 +451,7 @@ disitrap: lwz %r30,(PC_TEMPSAVE+CPUSAVE_AIM_DAR)(%r1) /* get DAR */ stw %r30,(PC_DBSAVE +CPUSAVE_AIM_DAR)(%r1) /* save DAR */ lwz %r30,(PC_TEMPSAVE+CPUSAVE_AIM_DSISR)(%r1) /* get DSISR */ - lwz %r30,(PC_DBSAVE +CPUSAVE_AIM_DSISR)(%r1) /* save DSISR */ + stw %r30,(PC_DBSAVE +CPUSAVE_AIM_DSISR)(%r1) /* save DSISR */ lwz %r30,(PC_DISISAVE+CPUSAVE_R28)(%r1) /* get r28 */ stw %r30,(PC_DBSAVE +CPUSAVE_R28)(%r1) /* save r28 */ lwz %r31,(PC_DISISAVE+CPUSAVE_R29)(%r1) /* get r29 */ From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 28 18:36:58 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0C09106566C; Sat, 28 Nov 2009 18:36:58 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B498E8FC16; Sat, 28 Nov 2009 18:36:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nASIawIB063770; Sat, 28 Nov 2009 18:36:58 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nASIawIM063767; Sat, 28 Nov 2009 18:36:58 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200911281836.nASIawIM063767@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 28 Nov 2009 18:36:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199890 - stable/8/sys/powerpc/aim X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2009 18:36:59 -0000 Author: nwhitehorn Date: Sat Nov 28 18:36:58 2009 New Revision: 199890 URL: http://svn.freebsd.org/changeset/base/199890 Log: MFC r198400: Do not map the trap vectors into the kernel's address space. They are only used in real mode and keeping them mapped only serves to make NULL a valid address, which results in silent NULL pointer deferences. Suggested by: Patrick Kerharo Obtained from: projects/ppc64 Modified: stable/8/sys/powerpc/aim/mmu_oea64.c stable/8/sys/powerpc/aim/trap_subr.S Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea64.c Sat Nov 28 18:34:35 2009 (r199889) +++ stable/8/sys/powerpc/aim/mmu_oea64.c Sat Nov 28 18:36:58 2009 (r199890) @@ -869,15 +869,17 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o ENABLE_TRANS(msr); /* - * Map certain important things, like ourselves and the exception - * vectors + * Map certain important things, like ourselves. + * + * NOTE: We do not map the exception vector space. That code is + * used only in real mode, and leaving it unmapped allows us to + * catch NULL pointer deferences, instead of making NULL a valid + * address. */ DISABLE_TRANS(msr); for (pa = kernelstart & ~PAGE_MASK; pa < kernelend; pa += PAGE_SIZE) moea64_kenter(mmup, pa, pa); - for (pa = EXC_RSVD; pa < EXC_LAST; pa += PAGE_SIZE) - moea64_kenter(mmup, pa, pa); ENABLE_TRANS(msr); if (!ofw_real_mode) { Modified: stable/8/sys/powerpc/aim/trap_subr.S ============================================================================== --- stable/8/sys/powerpc/aim/trap_subr.S Sat Nov 28 18:34:35 2009 (r199889) +++ stable/8/sys/powerpc/aim/trap_subr.S Sat Nov 28 18:36:58 2009 (r199890) @@ -275,10 +275,16 @@ CNAME(restorebridgesize) = .-CNAME(resto /* * Processor reset exception handler. These are typically * the first instructions the processor executes after a - * software reset. + * software reset. We do this in two bits so that we are + * not still hanging around in the trap handling region + * once the MMU is turned on. */ .globl CNAME(rstcode), CNAME(rstsize) CNAME(rstcode): + ba cpu_reset +CNAME(rstsize) = . - CNAME(rstcode) + +cpu_reset: bl 1f .space 124 @@ -296,7 +302,6 @@ CNAME(rstcode): /* Should not be reached */ 9: b 9b -CNAME(rstsize) = . - CNAME(rstcode) #endif /* From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 28 19:37:58 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79D18106566B; Sat, 28 Nov 2009 19:37:58 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 668B58FC16; Sat, 28 Nov 2009 19:37:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nASJbwaw065137; Sat, 28 Nov 2009 19:37:58 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nASJbwbl065123; Sat, 28 Nov 2009 19:37:58 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200911281937.nASJbwbl065123@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 28 Nov 2009 19:37:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199891 - in stable/8/sys/powerpc: aim booke include powerpc X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2009 19:37:58 -0000 Author: nwhitehorn Date: Sat Nov 28 19:37:58 2009 New Revision: 199891 URL: http://svn.freebsd.org/changeset/base/199891 Log: MFC r198212,198378,198427,198428,198723,198724,198725,198731: SMP support for PowerPC G5 systems. r198724: Fix a race in casuword() exposed by csup. casuword() non-atomically read the current value of its argument before atomically replacing it, which could occasionally return the wrong value on an SMP system. This resulted in user mutex operations hanging when using threaded applications. r198723,198725,198731: Loop on blocked threads when using ULE scheduler, removing an XXX MP comment. r198427: Add some more paranoia to setting HID registers, and update the AIM clock routines to work better with SMP. r198378: Add SMP support on U3-based G5 systems. While here, correct the 64-bit tlbie function to set the CPU to 64-bit mode correctly. r198212: Don't assume that physical addresses are identity mapped. This allows the second processor on G5 systems to start. Modified: stable/8/sys/powerpc/aim/clock.c stable/8/sys/powerpc/aim/copyinout.c stable/8/sys/powerpc/aim/machdep.c stable/8/sys/powerpc/aim/mmu_oea64.c stable/8/sys/powerpc/aim/mp_cpudep.c stable/8/sys/powerpc/aim/platform_chrp.c stable/8/sys/powerpc/aim/swtch.S stable/8/sys/powerpc/booke/mp_cpudep.c stable/8/sys/powerpc/include/pcpu.h stable/8/sys/powerpc/include/smp.h stable/8/sys/powerpc/include/spr.h stable/8/sys/powerpc/powerpc/cpu.c stable/8/sys/powerpc/powerpc/mp_machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/aim/clock.c ============================================================================== --- stable/8/sys/powerpc/aim/clock.c Sat Nov 28 18:36:58 2009 (r199890) +++ stable/8/sys/powerpc/aim/clock.c Sat Nov 28 19:37:58 2009 (r199891) @@ -95,8 +95,7 @@ static struct timecounter decr_timecount void decr_intr(struct trapframe *frame) { - long tick; - int nticks; + int32_t tick, nticks; /* * Check whether we are initialized. @@ -113,12 +112,15 @@ decr_intr(struct trapframe *frame) tick += ticks_per_intr; mtdec(tick); - if (PCPU_GET(cpuid) == 0) { - while (nticks-- > 0) + while (nticks-- > 0) { + if (PCPU_GET(cpuid) == 0) hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); - } else { - while (nticks-- > 0) + else hardclock_cpu(TRAPF_USERMODE(frame)); + + statclock(TRAPF_USERMODE(frame)); + if (profprocs != 0) + profclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); } } @@ -145,6 +147,8 @@ decr_init(void) ticks_per_intr = ticks_per_sec / hz; mtdec(ticks_per_intr); + set_cputicker(mftb, ticks_per_sec, 0); + mtmsr(msr); } Modified: stable/8/sys/powerpc/aim/copyinout.c ============================================================================== --- stable/8/sys/powerpc/aim/copyinout.c Sat Nov 28 18:36:58 2009 (r199890) +++ stable/8/sys/powerpc/aim/copyinout.c Sat Nov 28 19:37:58 2009 (r199891) @@ -347,8 +347,19 @@ casuword(volatile u_long *addr, u_long o return (-1); } - val = *p; - (void) atomic_cmpset_32((volatile uint32_t *)p, old, new); + __asm __volatile ( + "1:\tlwarx %0, 0, %2\n\t" /* load old value */ + "cmplw %3, %0\n\t" /* compare */ + "bne 2f\n\t" /* exit if not equal */ + "stwcx. %4, 0, %2\n\t" /* attempt to store */ + "bne- 1b\n\t" /* spin if failed */ + "b 3f\n\t" /* we've succeeded */ + "2:\n\t" + "stwcx. %0, 0, %2\n\t" /* clear reservation (74xx) */ + "3:\n\t" + : "=&r" (val), "=m" (*p) + : "r" (p), "r" (old), "r" (new), "m" (*p) + : "cc", "memory"); td->td_pcb->pcb_onfault = NULL; Modified: stable/8/sys/powerpc/aim/machdep.c ============================================================================== --- stable/8/sys/powerpc/aim/machdep.c Sat Nov 28 18:36:58 2009 (r199890) +++ stable/8/sys/powerpc/aim/machdep.c Sat Nov 28 19:37:58 2009 (r199891) @@ -885,6 +885,8 @@ cpu_initclocks(void) { decr_tc_init(); + stathz = hz; + profhz = hz; } /* Modified: stable/8/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea64.c Sat Nov 28 18:36:58 2009 (r199890) +++ stable/8/sys/powerpc/aim/mmu_oea64.c Sat Nov 28 19:37:58 2009 (r199891) @@ -182,35 +182,28 @@ va_to_vsid(pmap_t pm, vm_offset_t va) * Just to add to the fun, exceptions must be off as well * so that we can't trap in 64-bit mode. What a pain. */ +struct mtx tlbie_mutex; static __inline void TLBIE(pmap_t pmap, vm_offset_t va) { - register_t msr; - register_t scratch; - uint64_t vpn; register_t vpn_hi, vpn_lo; - -#if 1 - /* - * CPU documentation says that tlbie takes the VPN, not the - * VA. I think the code below does this correctly. We will see. - */ + register_t msr; + register_t scratch; vpn = (uint64_t)(va & ADDR_PIDX); if (pmap != NULL) vpn |= (va_to_vsid(pmap,va) << 28); -#else - vpn = va; -#endif vpn_hi = (uint32_t)(vpn >> 32); vpn_lo = (uint32_t)vpn; + mtx_lock_spin(&tlbie_mutex); __asm __volatile("\ mfmsr %0; \ clrldi %1,%0,49; \ - insrdi %1,1,1,0; \ + mtmsr %1; \ + insrdi %1,%5,1,0; \ mtmsrd %1; \ ptesync; \ \ @@ -222,7 +215,8 @@ TLBIE(pmap_t pmap, vm_offset_t va) { eieio; \ tlbsync; \ ptesync;" - : "=r"(msr), "=r"(scratch) : "r"(vpn_hi), "r"(vpn_lo), "r"(32)); + : "=r"(msr), "=r"(scratch) : "r"(vpn_hi), "r"(vpn_lo), "r"(32), "r"(1)); + mtx_unlock_spin(&tlbie_mutex); } #define DISABLE_TRANS(msr) msr = mfmsr(); mtmsr(msr & ~PSL_DR); isync() @@ -352,7 +346,7 @@ static int moea64_pte_insert(u_int, str * PVO calls. */ static int moea64_pvo_enter(pmap_t, uma_zone_t, struct pvo_head *, - vm_offset_t, vm_offset_t, uint64_t, int, int); + vm_offset_t, vm_offset_t, uint64_t, int); static void moea64_pvo_remove(struct pvo_entry *, int); static struct pvo_entry *moea64_pvo_find_va(pmap_t, vm_offset_t, int *); static struct lpte *moea64_pvo_to_pte(const struct pvo_entry *, int); @@ -825,6 +819,11 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o MTX_RECURSE); /* + * Initialize the TLBIE lock. TLBIE can only be executed by one CPU. + */ + mtx_init(&tlbie_mutex, "tlbie mutex", NULL, MTX_SPIN); + + /* * Initialise the unmanaged pvo pool. */ moea64_bpvo_pool = (struct pvo_entry *)moea64_bootstrap_alloc( @@ -1259,7 +1258,7 @@ moea64_enter_locked(pmap_t pmap, vm_offs pvo_flags |= PVO_FAKE; error = moea64_pvo_enter(pmap, zone, pvo_head, va, VM_PAGE_TO_PHYS(m), - pte_lo, pvo_flags, 0); + pte_lo, pvo_flags); if (pmap == kernel_pmap) TLBIE(pmap, va); @@ -1432,16 +1431,15 @@ moea64_uma_page_alloc(uma_zone_t zone, i if (pvo_allocator_start >= pvo_allocator_end) panic("Ran out of PVO allocator buffer space!"); - /* Now call pvo_enter in recursive mode */ moea64_pvo_enter(kernel_pmap, moea64_upvo_zone, &moea64_pvo_kunmanaged, va, VM_PAGE_TO_PHYS(m), LPTE_M, - PVO_WIRED | PVO_BOOTSTRAP, 1); + PVO_WIRED | PVO_BOOTSTRAP); TLBIE(kernel_pmap, va); - + if (needed_lock) PMAP_UNLOCK(kernel_pmap); - + if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0) bzero((void *)va, PAGE_SIZE); @@ -1584,7 +1582,7 @@ moea64_kenter(mmu_t mmu, vm_offset_t va, PMAP_LOCK(kernel_pmap); error = moea64_pvo_enter(kernel_pmap, moea64_upvo_zone, &moea64_pvo_kunmanaged, va, pa, pte_lo, - PVO_WIRED | VM_PROT_EXECUTE, 0); + PVO_WIRED | VM_PROT_EXECUTE); TLBIE(kernel_pmap, va); @@ -1972,14 +1970,29 @@ static void tlbia(void) { vm_offset_t i; + register_t msr, scratch; - for (i = 0; i < 0xFF000; i += 0x00001000) - TLBIE(NULL,i); + for (i = 0; i < 0xFF000; i += 0x00001000) { + __asm __volatile("\ + mfmsr %0; \ + mr %1, %0; \ + insrdi %1,%3,1,0; \ + mtmsrd %1; \ + ptesync; \ + \ + tlbiel %2; \ + \ + mtmsrd %0; \ + eieio; \ + tlbsync; \ + ptesync;" + : "=r"(msr), "=r"(scratch) : "r"(i), "r"(1)); + } } static int moea64_pvo_enter(pmap_t pm, uma_zone_t zone, struct pvo_head *pvo_head, - vm_offset_t va, vm_offset_t pa, uint64_t pte_lo, int flags, int recurse) + vm_offset_t va, vm_offset_t pa, uint64_t pte_lo, int flags) { struct pvo_entry *pvo; uint64_t vsid; @@ -2015,16 +2028,14 @@ moea64_pvo_enter(pmap_t pm, uma_zone_t z * Remove any existing mapping for this page. Reuse the pvo entry if * there is a mapping. */ - if (!recurse) - LOCK_TABLE(); + LOCK_TABLE(); LIST_FOREACH(pvo, &moea64_pvo_table[ptegidx], pvo_olink) { if (pvo->pvo_pmap == pm && PVO_VADDR(pvo) == va) { if ((pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN) == pa && (pvo->pvo_pte.lpte.pte_lo & LPTE_PP) == (pte_lo & LPTE_PP)) { - if (!recurse) - UNLOCK_TABLE(); + UNLOCK_TABLE(); return (0); } moea64_pvo_remove(pvo, -1); @@ -2045,12 +2056,19 @@ moea64_pvo_enter(pmap_t pm, uma_zone_t z moea64_bpvo_pool_index++; bootstrap = 1; } else { + /* + * Note: drop the table around the UMA allocation in + * case the UMA allocator needs to manipulate the page + * table. The mapping we are working with is already + * protected by the PMAP lock. + */ + UNLOCK_TABLE(); pvo = uma_zalloc(zone, M_NOWAIT); + LOCK_TABLE(); } if (pvo == NULL) { - if (!recurse) - UNLOCK_TABLE(); + UNLOCK_TABLE(); return (ENOMEM); } @@ -2097,8 +2115,7 @@ moea64_pvo_enter(pmap_t pm, uma_zone_t z moea64_pte_overflow++; } - if (!recurse) - UNLOCK_TABLE(); + UNLOCK_TABLE(); return (first ? ENOENT : 0); } Modified: stable/8/sys/powerpc/aim/mp_cpudep.c ============================================================================== --- stable/8/sys/powerpc/aim/mp_cpudep.c Sat Nov 28 18:36:58 2009 (r199890) +++ stable/8/sys/powerpc/aim/mp_cpudep.c Sat Nov 28 19:37:58 2009 (r199891) @@ -48,14 +48,34 @@ __FBSDID("$FreeBSD$"); #include #include -extern void *rstcode; -extern register_t l2cr_config; -extern register_t l3cr_config; - void *ap_pcpu; +static register_t bsp_state[8] __aligned(8); + +static void cpudep_save_config(void *dummy); +SYSINIT(cpu_save_config, SI_SUB_CPU, SI_ORDER_ANY, cpudep_save_config, NULL); + +uintptr_t +cpudep_ap_bootstrap(void) +{ + register_t msr, sp; + + msr = PSL_KERNSET & ~PSL_EE; + mtmsr(msr); + isync(); + + __asm __volatile("mtsprg 0, %0" :: "r"(ap_pcpu)); + powerpc_sync(); + + pcpup->pc_curthread = pcpup->pc_idlethread; + pcpup->pc_curpcb = pcpup->pc_curthread->td_pcb; + sp = pcpup->pc_curpcb->pcb_sp; + + return (sp); +} + static register_t -l2_enable(void) +mpc745x_l2_enable(register_t l2cr_config) { register_t ccr; @@ -77,7 +97,7 @@ l2_enable(void) } static register_t -l3_enable(void) +mpc745x_l3_enable(register_t l3cr_config) { register_t ccr; @@ -109,7 +129,7 @@ l3_enable(void) } static register_t -l1d_enable(void) +mpc745x_l1d_enable(void) { register_t hid; @@ -127,7 +147,7 @@ l1d_enable(void) } static register_t -l1i_enable(void) +mpc745x_l1i_enable(void) { register_t hid; @@ -144,43 +164,118 @@ l1i_enable(void) return (hid); } -uint32_t -cpudep_ap_bootstrap(void) +static void +cpudep_save_config(void *dummy) { - uint32_t hid, msr, reg, sp; - - // reg = mfspr(SPR_MSSCR0); - // mtspr(SPR_MSSCR0, reg | 0x3); - - __asm __volatile("mtsprg 0, %0" :: "r"(ap_pcpu)); - powerpc_sync(); + uint16_t vers; - __asm __volatile("mtspr 1023,%0" :: "r"(PCPU_GET(cpuid))); - __asm __volatile("mfspr %0,1023" : "=r"(pcpup->pc_pir)); - - msr = PSL_FP | PSL_IR | PSL_DR | PSL_ME | PSL_RI; - powerpc_sync(); - isync(); - mtmsr(msr); - isync(); + vers = mfpvr() >> 16; - if (l3cr_config != 0) - reg = l3_enable(); - if (l2cr_config != 0) - reg = l2_enable(); - reg = l1d_enable(); - reg = l1i_enable(); - - hid = mfspr(SPR_HID0); - hid &= ~(HID0_DOZE | HID0_SLEEP); - hid |= HID0_NAP | HID0_DPM; - mtspr(SPR_HID0, hid); - isync(); - - pcpup->pc_curthread = pcpup->pc_idlethread; - pcpup->pc_curpcb = pcpup->pc_curthread->td_pcb; - sp = pcpup->pc_curpcb->pcb_sp; + switch(vers) { + case IBM970: + case IBM970FX: + case IBM970MP: + __asm __volatile ("mfspr %0,%2; mr %1,%0; srdi %0,%0,32" + : "=r" (bsp_state[0]),"=r" (bsp_state[1]) : "K" (SPR_HID0)); + __asm __volatile ("mfspr %0,%2; mr %1,%0; srdi %0,%0,32" + : "=r" (bsp_state[2]),"=r" (bsp_state[3]) : "K" (SPR_HID1)); + __asm __volatile ("mfspr %0,%2; mr %1,%0; srdi %0,%0,32" + : "=r" (bsp_state[4]),"=r" (bsp_state[5]) : "K" (SPR_HID4)); + __asm __volatile ("mfspr %0,%2; mr %1,%0; srdi %0,%0,32" + : "=r" (bsp_state[6]),"=r" (bsp_state[7]) : "K" (SPR_HID5)); + + powerpc_sync(); + + break; + case MPC7450: + case MPC7455: + case MPC7457: + /* Only MPC745x CPUs have an L3 cache. */ + bsp_state[3] = mfspr(SPR_L3CR); + + /* Fallthrough */ + case MPC7400: + case MPC7410: + case MPC7447A: + case MPC7448: + bsp_state[2] = mfspr(SPR_L2CR); + bsp_state[1] = mfspr(SPR_HID1); + bsp_state[0] = mfspr(SPR_HID0); + break; + } +} - return (sp); +void +cpudep_ap_setup() +{ + register_t reg; + uint16_t vers; + + vers = mfpvr() >> 16; + + switch(vers) { + case IBM970: + case IBM970FX: + case IBM970MP: + /* Set HIOR to 0 */ + __asm __volatile("mtspr 311,%0" :: "r"(0)); + powerpc_sync(); + + /* + * The 970 has strange rules about how to update HID registers. + * See Table 2-3, 970MP manual + */ + + __asm __volatile("mtasr %0; sync" :: "r"(0)); + __asm __volatile(" \ + ld %0,0(%2); \ + sync; isync; \ + mtspr %1, %0; \ + mfspr %0, %1; mfspr %0, %1; mfspr %0, %1; \ + mfspr %0, %1; mfspr %0, %1; mfspr %0, %1; \ + sync; isync" + : "=r"(reg) : "K"(SPR_HID0), "r"(bsp_state)); + __asm __volatile("ld %0, 8(%2); sync; isync; \ + mtspr %1, %0; mtspr %1, %0; sync; isync" + : "=r"(reg) : "K"(SPR_HID1), "r"(bsp_state)); + __asm __volatile("ld %0, 16(%2); sync; isync; \ + mtspr %1, %0; sync; isync;" + : "=r"(reg) : "K"(SPR_HID4), "r"(bsp_state)); + __asm __volatile("ld %0, 24(%2); sync; isync; \ + mtspr %1, %0; sync; isync;" + : "=r"(reg) : "K"(SPR_HID5), "r"(bsp_state)); + + powerpc_sync(); + break; + case MPC7450: + case MPC7455: + case MPC7457: + /* Only MPC745x CPUs have an L3 cache. */ + reg = mpc745x_l3_enable(bsp_state[3]); + + /* Fallthrough */ + case MPC7400: + case MPC7410: + case MPC7447A: + case MPC7448: + /* XXX: Program the CPU ID into PIR */ + __asm __volatile("mtspr 1023,%0" :: "r"(PCPU_GET(cpuid))); + + powerpc_sync(); + isync(); + + mtspr(SPR_HID0, bsp_state[0]); isync(); + mtspr(SPR_HID1, bsp_state[1]); isync(); + + reg = mpc745x_l2_enable(bsp_state[2]); + reg = mpc745x_l1d_enable(); + reg = mpc745x_l1i_enable(); + + break; + default: + printf("WARNING: Unknown CPU type. Cache performace may be " + "suboptimal.\n"); + break; + } } Modified: stable/8/sys/powerpc/aim/platform_chrp.c ============================================================================== --- stable/8/sys/powerpc/aim/platform_chrp.c Sat Nov 28 18:36:58 2009 (r199890) +++ stable/8/sys/powerpc/aim/platform_chrp.c Sat Nov 28 19:37:58 2009 (r199891) @@ -35,11 +35,14 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #include #include +#include #include #include @@ -220,6 +223,7 @@ chrp_smp_start_cpu(platform_t plat, stru #ifdef SMP phandle_t cpu; volatile uint8_t *rstvec; + static volatile uint8_t *rstvec_virtbase = NULL; int res, reset, timeout; cpu = pc->pc_hwref; @@ -229,15 +233,20 @@ chrp_smp_start_cpu(platform_t plat, stru ap_pcpu = pc; - rstvec = (uint8_t *)(0x80000000 + reset); + if (rstvec_virtbase == NULL) + rstvec_virtbase = pmap_mapdev(0x80000000, PAGE_SIZE); + + rstvec = rstvec_virtbase + reset; *rstvec = 4; + (void)(*rstvec); powerpc_sync(); DELAY(1); *rstvec = 0; + (void)(*rstvec); powerpc_sync(); - timeout = 1000; + timeout = 10000; while (!pc->pc_awake && timeout--) DELAY(100); Modified: stable/8/sys/powerpc/aim/swtch.S ============================================================================== --- stable/8/sys/powerpc/aim/swtch.S Sat Nov 28 18:36:58 2009 (r199890) +++ stable/8/sys/powerpc/aim/swtch.S Sat Nov 28 19:37:58 2009 (r199891) @@ -57,6 +57,7 @@ */ #include "assym.s" +#include "opt_sched.h" #include @@ -81,36 +82,36 @@ ENTRY(cpu_throw) * Switch to a new thread saving the current state in the old thread. */ ENTRY(cpu_switch) - stw %r5,TD_LOCK(%r3) /* ULE: update old thread's lock */ - /* XXX needs to change for MP */ - - lwz %r5,TD_PCB(%r3) /* Get the old thread's PCB ptr */ + lwz %r6,TD_PCB(%r3) /* Get the old thread's PCB ptr */ mr %r12,%r2 - stmw %r12,PCB_CONTEXT(%r5) /* Save the non-volatile GP regs. + stmw %r12,PCB_CONTEXT(%r6) /* Save the non-volatile GP regs. These can now be used for scratch */ mfcr %r16 /* Save the condition register */ - stw %r16,PCB_CR(%r5) + stw %r16,PCB_CR(%r6) mflr %r16 /* Save the link register */ - stw %r16,PCB_LR(%r5) + stw %r16,PCB_LR(%r6) mfsr %r16,USER_SR /* Save USER_SR for copyin/out */ isync - stw %r16,PCB_AIM_USR(%r5) - stw %r1,PCB_SP(%r5) /* Save the stack pointer */ + stw %r16,PCB_AIM_USR(%r6) + stw %r1,PCB_SP(%r6) /* Save the stack pointer */ mr %r14,%r3 /* Copy the old thread ptr... */ mr %r15,%r4 /* and the new thread ptr in scratch */ + mr %r16,%r5 /* and the new lock */ + mr %r17,%r6 /* and the PCB */ - lwz %r6,PCB_FLAGS(%r5) + lwz %r7,PCB_FLAGS(%r17) /* Save FPU context if needed */ - andi. %r6, %r6, PCB_FPU + andi. %r7, %r7, PCB_FPU beq .L1 bl save_fpu .L1: - lwz %r6,PCB_FLAGS(%r5) + mr %r3,%r14 /* restore old thread ptr */ + lwz %r7,PCB_FLAGS(%r17) /* Save Altivec context if needed */ - andi. %r6, %r6, PCB_VEC + andi. %r7, %r7, PCB_VEC beq .L2 bl save_vec @@ -118,7 +119,19 @@ ENTRY(cpu_switch) mr %r3,%r14 /* restore old thread ptr */ bl pmap_deactivate /* Deactivate the current pmap */ + stw %r16,TD_LOCK(%r14) /* ULE: update old thread's lock */ + cpu_switchin: +#if defined(SMP) && defined(SCHED_ULE) + /* Wait for the new thread to become unblocked */ + lis %r6,blocked_lock@ha + addi %r6,%r6,blocked_lock@l +blocked_loop: + lwz %r7,TD_LOCK(%r15) + cmpw %r6,%r7 + beq blocked_loop +#endif + mfsprg %r7,0 /* Get the pcpu pointer */ stw %r15,PC_CURTHREAD(%r7) /* Store new current thread */ lwz %r17,TD_PCB(%r15) /* Store new current PCB */ Modified: stable/8/sys/powerpc/booke/mp_cpudep.c ============================================================================== --- stable/8/sys/powerpc/booke/mp_cpudep.c Sat Nov 28 18:36:58 2009 (r199890) +++ stable/8/sys/powerpc/booke/mp_cpudep.c Sat Nov 28 19:37:58 2009 (r199891) @@ -47,7 +47,7 @@ extern void icache_inval(void); volatile void *ap_pcpu; -uint32_t +uintptr_t cpudep_ap_bootstrap() { uint32_t msr, sp, csr; @@ -78,3 +78,8 @@ cpudep_ap_bootstrap() return (sp); } + +void +cpudep_ap_setup() +{ +} Modified: stable/8/sys/powerpc/include/pcpu.h ============================================================================== --- stable/8/sys/powerpc/include/pcpu.h Sat Nov 28 18:36:58 2009 (r199890) +++ stable/8/sys/powerpc/include/pcpu.h Sat Nov 28 19:37:58 2009 (r199891) @@ -43,8 +43,8 @@ struct pmap; struct thread *pc_vecthread; /* current vec user */ \ uintptr_t pc_hwref; \ uint32_t pc_pir; \ - int pc_bsp:1; \ - int pc_awake:1; \ + int pc_bsp; \ + volatile int pc_awake; \ uint32_t pc_ipimask; \ register_t pc_tempsave[CPUSAVE_LEN]; \ register_t pc_disisave[CPUSAVE_LEN]; \ Modified: stable/8/sys/powerpc/include/smp.h ============================================================================== --- stable/8/sys/powerpc/include/smp.h Sat Nov 28 18:36:58 2009 (r199890) +++ stable/8/sys/powerpc/include/smp.h Sat Nov 28 19:37:58 2009 (r199891) @@ -48,7 +48,8 @@ struct cpuref { }; void pmap_cpu_bootstrap(int); -uint32_t cpudep_ap_bootstrap(void); +uintptr_t cpudep_ap_bootstrap(void); +void cpudep_ap_setup(void); void machdep_ap_bootstrap(void); #endif /* !LOCORE */ Modified: stable/8/sys/powerpc/include/spr.h ============================================================================== --- stable/8/sys/powerpc/include/spr.h Sat Nov 28 18:36:58 2009 (r199890) +++ stable/8/sys/powerpc/include/spr.h Sat Nov 28 19:37:58 2009 (r199891) @@ -50,7 +50,7 @@ #define mtspr64(reg,valhi,vallo,scratch) \ __asm __volatile(" \ mfmsr %0; \ - insrdi %0,1,1,0; \ + insrdi %0,%5,1,0; \ mtmsrd %0; \ isync; \ \ @@ -62,13 +62,13 @@ clrldi %0,%0,1; \ mtmsrd %0; \ isync;" \ - : "=r"(scratch), "=r"(valhi) : "r"(vallo), "K"(reg), "r"(32)) + : "=r"(scratch), "=r"(valhi) : "r"(vallo), "K"(reg), "r"(32), "r"(1)) #define mfspr64upper(reg,scratch) \ ( { register_t val; \ __asm __volatile(" \ mfmsr %0; \ - insrdi %0,1,1,0; \ + insrdi %0,%4,1,0; \ mtmsrd %0; \ isync; \ \ @@ -78,7 +78,7 @@ clrldi %0,%0,1; \ mtmsrd %0; \ isync;" \ - : "=r"(scratch), "=r"(val) : "K"(reg), "r"(32)); \ + : "=r"(scratch), "=r"(val) : "K"(reg), "r"(32), "r"(1)); \ val; } ) #endif /* _LOCORE */ Modified: stable/8/sys/powerpc/powerpc/cpu.c ============================================================================== --- stable/8/sys/powerpc/powerpc/cpu.c Sat Nov 28 18:36:58 2009 (r199890) +++ stable/8/sys/powerpc/powerpc/cpu.c Sat Nov 28 19:37:58 2009 (r199891) @@ -69,6 +69,7 @@ #include #include #include +#include #include int powerpc_pow_enabled; @@ -112,9 +113,6 @@ static const struct cputab models[] = { static char model[64]; SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, model, 0, ""); -register_t l2cr_config = 0; -register_t l3cr_config = 0; - static void cpu_print_speed(void); static void cpu_print_cacheinfo(u_int, uint16_t); @@ -258,11 +256,6 @@ cpu_setup(u_int cpuid) case MPC7450: case MPC7455: case MPC7457: - /* Only MPC745x CPUs have an L3 cache. */ - - l3cr_config = mfspr(SPR_L3CR); - - /* Fallthrough */ case MPC750: case IBM750FX: case MPC7400: @@ -272,8 +265,6 @@ cpu_setup(u_int cpuid) cpu_print_speed(); printf("\n"); - l2cr_config = mfspr(SPR_L2CR); - if (bootverbose) cpu_print_cacheinfo(cpuid, vers); break; @@ -366,15 +357,15 @@ cpu_print_cacheinfo(u_int cpuid, uint16_ printf("L1 D-cache %sabled\n", (hid & HID0_DCE) ? "en" : "dis"); printf("cpu%u: ", cpuid); - if (l2cr_config & L2CR_L2E) { + if (mfspr(SPR_L2CR) & L2CR_L2E) { switch (vers) { case MPC7450: case MPC7455: case MPC7457: printf("256KB L2 cache, "); - if (l3cr_config & L3CR_L3E) + if (mfspr(SPR_L3CR) & L3CR_L3E) printf("%cMB L3 backside cache", - l3cr_config & L3CR_L3SIZ ? '2' : '1'); + mfspr(SPR_L3CR) & L3CR_L3SIZ ? '2' : '1'); else printf("L3 cache disabled"); printf("\n"); @@ -383,7 +374,7 @@ cpu_print_cacheinfo(u_int cpuid, uint16_ printf("512KB L2 cache\n"); break; default: - switch (l2cr_config & L2CR_L2SIZ) { + switch (mfspr(SPR_L2CR) & L2CR_L2SIZ) { case L2SIZ_256K: printf("256KB "); break; @@ -394,9 +385,9 @@ cpu_print_cacheinfo(u_int cpuid, uint16_ printf("1MB "); break; } - printf("write-%s", (l2cr_config & L2CR_L2WT) + printf("write-%s", (mfspr(SPR_L2CR) & L2CR_L2WT) ? "through" : "back"); - if (l2cr_config & L2CR_L2PE) + if (mfspr(SPR_L2CR) & L2CR_L2PE) printf(", with parity"); printf(" backside cache\n"); break; Modified: stable/8/sys/powerpc/powerpc/mp_machdep.c ============================================================================== --- stable/8/sys/powerpc/powerpc/mp_machdep.c Sat Nov 28 18:36:58 2009 (r199890) +++ stable/8/sys/powerpc/powerpc/mp_machdep.c Sat Nov 28 19:37:58 2009 (r199891) @@ -64,7 +64,10 @@ static u_int ipi_msg_cnt[32]; void machdep_ap_bootstrap(void) { + /* Set up important bits on the CPU (HID registers, etc.) */ + cpudep_ap_setup(); + /* Set PIR */ PCPU_SET(pir, mfspr(SPR_PIR)); PCPU_SET(awake, 1); __asm __volatile("msync; isync"); @@ -78,7 +81,7 @@ machdep_ap_bootstrap(void) __asm __volatile("mtdec %0" :: "r"(ap_decr)); atomic_add_int(&ap_awake, 1); - CTR1(KTR_SMP, "SMP: AP CPU%d launched", PCPU_GET(cpuid)); + printf("SMP: AP CPU #%d launched\n", PCPU_GET(cpuid)); /* Initialize curthread */ PCPU_SET(curthread, PCPU_GET(idlethread)); @@ -86,6 +89,8 @@ machdep_ap_bootstrap(void) /* Let the DEC and external interrupts go */ mtmsr(mfmsr() | PSL_EE); + + /* Announce ourselves awake, and enter the scheduler */ sched_throw(NULL); } @@ -247,6 +252,9 @@ cpu_mp_unleash(void *dummy) mp_ncpus, cpus, smp_cpus); } + /* Let the APs get into the scheduler */ + DELAY(10000); + smp_active = 1; smp_started = 1; } From owner-svn-src-stable-8@FreeBSD.ORG Sat Nov 28 20:02:45 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0CA6106568D; Sat, 28 Nov 2009 20:02:45 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 859EB8FC08; Sat, 28 Nov 2009 20:02:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nASK2j09065635; Sat, 28 Nov 2009 20:02:45 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nASK2jcb065633; Sat, 28 Nov 2009 20:02:45 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200911282002.nASK2jcb065633@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 28 Nov 2009 20:02:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199892 - stable/8/sys/powerpc/aim X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2009 20:02:45 -0000 Author: nwhitehorn Date: Sat Nov 28 20:02:45 2009 New Revision: 199892 URL: http://svn.freebsd.org/changeset/base/199892 Log: MFC r199226: Provide a real fix to the too-many-translations problem when booting from CD on 64-bit hardware to replace existing band-aids. This occurred when the preloaded mdroot required too many mappings for the static buffer. Since we only use the translations buffer once, allocate a dynamic buffer on the stack. This early in the boot process, the call chain is quite short and we can be assured of having sufficient stack space. Modified: stable/8/sys/powerpc/aim/mmu_oea64.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea64.c Sat Nov 28 19:37:58 2009 (r199891) +++ stable/8/sys/powerpc/aim/mmu_oea64.c Sat Nov 28 20:02:45 2009 (r199892) @@ -264,7 +264,6 @@ static struct mem_region *pregions; extern u_int phys_avail_count; extern int regions_sz, pregions_sz; extern int ofw_real_mode; -static struct ofw_map translations[96]; extern struct pmap ofw_pmap; @@ -709,17 +708,73 @@ moea64_bridge_cpu_bootstrap(mmu_t mmup, } static void +moea64_add_ofw_mappings(mmu_t mmup, phandle_t mmu, size_t sz) +{ + struct ofw_map translations[sz/sizeof(struct ofw_map)]; + register_t msr; + vm_offset_t off; + int i, ofw_mappings; + + bzero(translations, sz); + if (OF_getprop(mmu, "translations", translations, sz) == -1) + panic("moea64_bootstrap: can't get ofw translations"); + + CTR0(KTR_PMAP, "moea64_add_ofw_mappings: translations"); + sz /= sizeof(*translations); + qsort(translations, sz, sizeof (*translations), om_cmp); + + for (i = 0, ofw_mappings = 0; i < sz; i++) { + CTR3(KTR_PMAP, "translation: pa=%#x va=%#x len=%#x", + (uint32_t)(translations[i].om_pa_lo), translations[i].om_va, + translations[i].om_len); + + if (translations[i].om_pa_lo % PAGE_SIZE) + panic("OFW translation not page-aligned!"); + + if (translations[i].om_pa_hi) + panic("OFW translations above 32-bit boundary!"); + + /* Now enter the pages for this mapping */ + + /* + * Lock the ofw pmap. pmap_kenter(), which we use for the + * pages the kernel also needs, does its own locking. + */ + PMAP_LOCK(&ofw_pmap); + DISABLE_TRANS(msr); + for (off = 0; off < translations[i].om_len; off += PAGE_SIZE) { + struct vm_page m; + + /* Map low memory mappings into the kernel pmap, too. + * These are typically mappings made by the loader, + * so we need them if we want to keep executing. */ + + if (translations[i].om_va + off < SEGMENT_LENGTH) + moea64_kenter(mmup, translations[i].om_va + off, + translations[i].om_va + off); + + m.phys_addr = translations[i].om_pa_lo + off; + moea64_enter_locked(&ofw_pmap, + translations[i].om_va + off, &m, VM_PROT_ALL, 1); + + ofw_mappings++; + } + ENABLE_TRANS(msr); + PMAP_UNLOCK(&ofw_pmap); + } +} + +static void moea64_bridge_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelend) { ihandle_t mmui; phandle_t chosen; phandle_t mmu; - int sz; + size_t sz; int i, j; - int ofw_mappings; vm_size_t size, physsz, hwphyssz; vm_offset_t pa, va, off; - uint32_t msr; + register_t msr; void *dpcpu; /* We don't have a direct map since there is no BAT */ @@ -865,7 +920,6 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o off = (vm_offset_t)(moea64_bpvo_pool); for (pa = off; pa < off + size; pa += PAGE_SIZE) moea64_kenter(mmup, pa, pa); - ENABLE_TRANS(msr); /* * Map certain important things, like ourselves. @@ -876,7 +930,6 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o * address. */ - DISABLE_TRANS(msr); for (pa = kernelstart & ~PAGE_MASK; pa < kernelend; pa += PAGE_SIZE) moea64_kenter(mmup, pa, pa); ENABLE_TRANS(msr); @@ -897,57 +950,10 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o panic("moea64_bootstrap: can't get mmu package"); if ((sz = OF_getproplen(mmu, "translations")) == -1) panic("moea64_bootstrap: can't get ofw translation count"); - if (sz > sizeof(translations)) - panic("moea64_bootstrap: too many ofw translations (%d)", - sz/sizeof(*translations)); - - bzero(translations, sz); - if (OF_getprop(mmu, "translations", translations, sz) == -1) - panic("moea64_bootstrap: can't get ofw translations"); - - CTR0(KTR_PMAP, "moea64_bootstrap: translations"); - sz /= sizeof(*translations); - qsort(translations, sz, sizeof (*translations), om_cmp); - - for (i = 0, ofw_mappings = 0; i < sz; i++) { - CTR3(KTR_PMAP, "translation: pa=%#x va=%#x len=%#x", - (uint32_t)(translations[i].om_pa_lo), translations[i].om_va, - translations[i].om_len); - - if (translations[i].om_pa_lo % PAGE_SIZE) - panic("OFW translation not page-aligned!"); - - if (translations[i].om_pa_hi) - panic("OFW translations above 32-bit boundary!"); - - /* Now enter the pages for this mapping */ - - /* - * Lock the ofw pmap. pmap_kenter(), which we use for the - * pages the kernel also needs, does its own locking. - */ - PMAP_LOCK(&ofw_pmap); - DISABLE_TRANS(msr); - for (off = 0; off < translations[i].om_len; off += PAGE_SIZE) { - struct vm_page m; - - /* Map low memory mappings into the kernel pmap, too. - * These are typically mappings made by the loader, - * so we need them if we want to keep executing. */ - - if (translations[i].om_va + off < SEGMENT_LENGTH) - moea64_kenter(mmup, translations[i].om_va + off, - translations[i].om_va + off); + if (sz > 6144 /* tmpstksz - 2 KB headroom */) + panic("moea64_bootstrap: too many ofw translations"); - m.phys_addr = translations[i].om_pa_lo + off; - moea64_enter_locked(&ofw_pmap, - translations[i].om_va + off, &m, VM_PROT_ALL, 1); - - ofw_mappings++; - } - ENABLE_TRANS(msr); - PMAP_UNLOCK(&ofw_pmap); - } + moea64_add_ofw_mappings(mmup, mmu, sz); } #ifdef SMP