From owner-svn-src-head@FreeBSD.ORG Sun Jul 8 00:51:39 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 675321065674; Sun, 8 Jul 2012 00:51:39 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 394CB8FC17; Sun, 8 Jul 2012 00:51:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q680pdF2005985; Sun, 8 Jul 2012 00:51:39 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q680pcYO005980; Sun, 8 Jul 2012 00:51:38 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201207080051.q680pcYO005980@svn.freebsd.org> From: Mateusz Guzik Date: Sun, 8 Jul 2012 00:51:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238220 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2012 00:51:39 -0000 Author: mjg Date: Sun Jul 8 00:51:38 2012 New Revision: 238220 URL: http://svn.freebsd.org/changeset/base/238220 Log: Unbreak handling of descriptors opened with O_EXEC by fexecve(2). While here return EBADF for descriptors opened for writing (previously it was ETXTBSY). Add fgetvp_exec function which performs appropriate checks. PR: kern/169651 In collaboration with: kib Approved by: trasz (mentor) MFC after: 1 week Modified: head/sys/kern/kern_descrip.c head/sys/kern/kern_exec.c head/sys/sys/file.h Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sat Jul 7 22:22:13 2012 (r238219) +++ head/sys/kern/kern_descrip.c Sun Jul 8 00:51:38 2012 (r238220) @@ -2340,11 +2340,11 @@ _fget(struct thread *td, int fd, struct /* * FREAD and FWRITE failure return EBADF as per POSIX. - * - * Only one flag, or 0, may be specified. */ if ((flags == FREAD && (fp->f_flag & FREAD) == 0) || - (flags == FWRITE && (fp->f_flag & FWRITE) == 0)) { + (flags == FWRITE && (fp->f_flag & FWRITE) == 0) || + (flags == (FREAD | FEXEC) && + (((fp->f_flag & flags) == 0) || ((fp->f_flag & FWRITE) != 0)))) { fdrop(fp, td); return (EBADF); } @@ -2444,6 +2444,13 @@ fgetvp_read(struct thread *td, int fd, c return (_fgetvp(td, fd, FREAD, rights, NULL, vpp)); } +int +fgetvp_exec(struct thread *td, int fd, cap_rights_t rights, struct vnode **vpp) +{ + + return (_fgetvp(td, fd, FREAD | FEXEC, rights, NULL, vpp)); +} + #ifdef notyet int fgetvp_write(struct thread *td, int fd, cap_rights_t rights, Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Sat Jul 7 22:22:13 2012 (r238219) +++ head/sys/kern/kern_exec.c Sun Jul 8 00:51:38 2012 (r238220) @@ -443,8 +443,10 @@ interpret: /* * Some might argue that CAP_READ and/or CAP_MMAP should also * be required here; such arguments will be entertained. + * + * Descriptors opened only with O_EXEC or O_RDONLY are allowed. */ - error = fgetvp_read(td, args->fd, CAP_FEXECVE, &binvp); + error = fgetvp_exec(td, args->fd, CAP_FEXECVE, &binvp); if (error) goto exec_fail; vfslocked = VFS_LOCK_GIANT(binvp->v_mount); Modified: head/sys/sys/file.h ============================================================================== --- head/sys/sys/file.h Sat Jul 7 22:22:13 2012 (r238219) +++ head/sys/sys/file.h Sun Jul 8 00:51:38 2012 (r238220) @@ -238,6 +238,8 @@ fo_chown_t invfo_chown; void finit(struct file *, u_int, short, void *, struct fileops *); int fgetvp(struct thread *td, int fd, cap_rights_t rights, struct vnode **vpp); +int fgetvp_exec(struct thread *td, int fd, cap_rights_t rights, + struct vnode **vpp); int fgetvp_rights(struct thread *td, int fd, cap_rights_t need, cap_rights_t *have, struct vnode **vpp); int fgetvp_read(struct thread *td, int fd, cap_rights_t rights, From owner-svn-src-head@FreeBSD.ORG Sun Jul 8 00:52:55 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45FD81065670; Sun, 8 Jul 2012 00:52:55 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 315958FC15; Sun, 8 Jul 2012 00:52:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q680qt5e006122; Sun, 8 Jul 2012 00:52:55 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q680qsQo006120; Sun, 8 Jul 2012 00:52:54 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201207080052.q680qsQo006120@svn.freebsd.org> From: Eitan Adler Date: Sun, 8 Jul 2012 00:52:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238221 - head/usr.sbin/ancontrol X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2012 00:52:55 -0000 Author: eadler Date: Sun Jul 8 00:52:54 2012 New Revision: 238221 URL: http://svn.freebsd.org/changeset/base/238221 Log: Fix always 0 tautologly revealed by gcc46 Approved by: cperciva MFC after: 1 week Modified: head/usr.sbin/ancontrol/ancontrol.c Modified: head/usr.sbin/ancontrol/ancontrol.c ============================================================================== --- head/usr.sbin/ancontrol/ancontrol.c Sun Jul 8 00:51:38 2012 (r238220) +++ head/usr.sbin/ancontrol/ancontrol.c Sun Jul 8 00:52:54 2012 (r238221) @@ -1443,7 +1443,7 @@ an_enable_leap_mode(const char *iface, c caps = (struct an_ltv_caps *)&areq; - if (!caps->an_softcaps & AN_AUTHTYPE_LEAP) { + if (!(caps->an_softcaps & AN_AUTHTYPE_LEAP)) { fprintf(stderr, "Firmware does not support LEAP\n"); exit(1); } From owner-svn-src-head@FreeBSD.ORG Sun Jul 8 08:49:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 437601065672; Sun, 8 Jul 2012 08:49:38 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2DEFE8FC18; Sun, 8 Jul 2012 08:49:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q688nckH039714; Sun, 8 Jul 2012 08:49:38 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q688nbdC039712; Sun, 8 Jul 2012 08:49:37 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201207080849.q688nbdC039712@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 8 Jul 2012 08:49:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238222 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2012 08:49:38 -0000 Author: bz Date: Sun Jul 8 08:49:37 2012 New Revision: 238222 URL: http://svn.freebsd.org/changeset/base/238222 Log: As mentioned in the commit message of r237571 (copied from a prototype patch of mine) also check if the 2nd in6_setscope() failed and return the error in that case. MFC after: 5 days Modified: head/sys/netinet6/in6.c Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Sun Jul 8 00:52:54 2012 (r238221) +++ head/sys/netinet6/in6.c Sun Jul 8 08:49:37 2012 (r238222) @@ -1367,7 +1367,9 @@ in6_purgeaddr_mc(struct ifnet *ifp, stru sin6.sin6_family = AF_INET6; memcpy(&sin6.sin6_addr, &satosin6(ifa0->ifa_addr)->sin6_addr, sizeof(sin6.sin6_addr)); - in6_setscope(&sin6.sin6_addr, ifa0->ifa_ifp, NULL); + error = in6_setscope(&sin6.sin6_addr, ifa0->ifa_ifp, NULL); + if (error != 0) + return (error); } rt = in6_rtalloc1((struct sockaddr *)&mltaddr, 0, 0UL, RT_DEFAULT_FIB); From owner-svn-src-head@FreeBSD.ORG Sun Jul 8 10:57:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 065DC106566C; Sun, 8 Jul 2012 10:57:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E52588FC08; Sun, 8 Jul 2012 10:57:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q68AvnFf046799; Sun, 8 Jul 2012 10:57:49 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q68Avn40046797; Sun, 8 Jul 2012 10:57:49 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201207081057.q68Avn40046797@svn.freebsd.org> From: Andriy Gapon Date: Sun, 8 Jul 2012 10:57:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238229 - head/sys/dev/acpica X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2012 10:57:50 -0000 Author: avg Date: Sun Jul 8 10:57:49 2012 New Revision: 238229 URL: http://svn.freebsd.org/changeset/base/238229 Log: acpi_cpu: we are able to handle _CST change notifications... so un-ifdef code that is supposed to tell ACPI platform about that Tested by: Taku YAMAMOTO MFC after: 2 weeks Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Sun Jul 8 10:46:55 2012 (r238228) +++ head/sys/dev/acpica/acpi_cpu.c Sun Jul 8 10:57:49 2012 (r238229) @@ -918,14 +918,12 @@ acpi_cpu_startup_cx(struct acpi_cpu_soft (void *)sc, 0, acpi_cpu_usage_sysctl, "A", "percent usage for each Cx state"); -#ifdef notyet /* Signal platform that we can handle _CST notification. */ if (!cpu_cx_generic && cpu_cst_cnt != 0) { ACPI_LOCK(acpi); AcpiOsWritePort(cpu_smi_cmd, cpu_cst_cnt, 8); ACPI_UNLOCK(acpi); } -#endif } /* From owner-svn-src-head@FreeBSD.ORG Sun Jul 8 15:30:25 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 27FCE106566B; Sun, 8 Jul 2012 15:30:25 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 131448FC08; Sun, 8 Jul 2012 15:30:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q68FUOqY059443; Sun, 8 Jul 2012 15:30:24 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q68FUOsd059441; Sun, 8 Jul 2012 15:30:24 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201207081530.q68FUOsd059441@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 8 Jul 2012 15:30:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238248 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2012 15:30:25 -0000 Author: bz Date: Sun Jul 8 15:30:24 2012 New Revision: 238248 URL: http://svn.freebsd.org/changeset/base/238248 Log: Implement handling of "atomic fragements" as outlined in draft-gont-6man-ipv6-atomic-fragments to mitigate one class of possible fragmentation-based attacks. MFC after: 5 days Modified: head/sys/netinet6/frag6.c Modified: head/sys/netinet6/frag6.c ============================================================================== --- head/sys/netinet6/frag6.c Sun Jul 8 14:21:36 2012 (r238247) +++ head/sys/netinet6/frag6.c Sun Jul 8 15:30:24 2012 (r238248) @@ -221,6 +221,19 @@ frag6_input(struct mbuf **mp, int *offp, /* offset now points to data portion */ offset += sizeof(struct ip6_frag); + /* + * XXX-BZ RFC XXXX (draft-gont-6man-ipv6-atomic-fragments) + * Handle "atomic" fragments (offset and m bit set to 0) upfront, + * unrelated to any reassembly. Just skip the fragment header. + */ + if ((ip6f->ip6f_offlg & ~IP6F_RESERVED_MASK) == 0) { + /* XXX-BZ we want dedicated counters for this. */ + V_ip6stat.ip6s_reassembled++; + in6_ifstat_inc(dstifp, ifs6_reass_ok); + *offp = offset; + return (ip6f->ip6f_nxt); + } + IP6Q_LOCK(); /* From owner-svn-src-head@FreeBSD.ORG Sun Jul 8 17:02:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97AA3106566B; Sun, 8 Jul 2012 17:02:15 +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 821FF8FC1E; Sun, 8 Jul 2012 17:02:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q68H2Few063553; Sun, 8 Jul 2012 17:02:15 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q68H2Flg063551; Sun, 8 Jul 2012 17:02:15 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201207081702.q68H2Flg063551@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 8 Jul 2012 17:02:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238255 - head/gnu/usr.bin/cc/cc_tools X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2012 17:02:15 -0000 Author: nwhitehorn Date: Sun Jul 8 17:02:14 2012 New Revision: 238255 URL: http://svn.freebsd.org/changeset/base/238255 Log: After the binutils 2.17.50 import, the assembler supports AS_REL16 relocations. Modified: head/gnu/usr.bin/cc/cc_tools/auto-host.h Modified: head/gnu/usr.bin/cc/cc_tools/auto-host.h ============================================================================== --- head/gnu/usr.bin/cc/cc_tools/auto-host.h Sun Jul 8 17:01:57 2012 (r238254) +++ head/gnu/usr.bin/cc/cc_tools/auto-host.h Sun Jul 8 17:02:14 2012 (r238255) @@ -261,7 +261,7 @@ /* Define if your assembler supports R_PPC_REL16 relocs. */ #ifndef USED_FOR_TARGET -/* #undef HAVE_AS_REL16 */ +#define HAVE_AS_REL16 #endif From owner-svn-src-head@FreeBSD.ORG Sun Jul 8 17:43:26 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 38E861065674; Sun, 8 Jul 2012 17:43:26 +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 245358FC14; Sun, 8 Jul 2012 17:43:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q68HhP2M065650; Sun, 8 Jul 2012 17:43:26 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q68HhPFN065648; Sun, 8 Jul 2012 17:43:25 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201207081743.q68HhPFN065648@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 8 Jul 2012 17:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238256 - head/sys/ia64/ia64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2012 17:43:26 -0000 Author: marcel Date: Sun Jul 8 17:43:25 2012 New Revision: 238256 URL: http://svn.freebsd.org/changeset/base/238256 Log: Unleash the APs at SI_SUB_KICK_SCHEDULER so that we have them all up and running to service interrupts. This is especially important when the firmware has bound interrupts to CPUs, like for the SGI Altix 350. We wake up APs at SI_SUB_CPU time and they sit and spin until we unleash them, so there's nothing fundamentally different from a MD perspective. Modified: head/sys/ia64/ia64/mp_machdep.c Modified: head/sys/ia64/ia64/mp_machdep.c ============================================================================== --- head/sys/ia64/ia64/mp_machdep.c Sun Jul 8 17:02:14 2012 (r238255) +++ head/sys/ia64/ia64/mp_machdep.c Sun Jul 8 17:43:25 2012 (r238256) @@ -466,6 +466,7 @@ cpu_mp_unleash(void *dummy) */ ia64_bind_intr(); } +SYSINIT(start_aps, SI_SUB_KICK_SCHEDULER, SI_ORDER_ANY, cpu_mp_unleash, NULL); /* * send an IPI to a set of cpus. @@ -522,5 +523,3 @@ ipi_send(struct pcpu *cpu, int xiv) ia64_mf_a(); CTR3(KTR_SMP, "ipi_send(%p, %d): cpuid=%d", cpu, xiv, PCPU_GET(cpuid)); } - -SYSINIT(start_aps, SI_SUB_SMP, SI_ORDER_FIRST, cpu_mp_unleash, NULL); From owner-svn-src-head@FreeBSD.ORG Sun Jul 8 18:00:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EB9E106564A; Sun, 8 Jul 2012 18:00:23 +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 10D0E8FC0A; Sun, 8 Jul 2012 18:00:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q68I0Mf1066413; Sun, 8 Jul 2012 18:00:22 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q68I0Mq8066409; Sun, 8 Jul 2012 18:00:22 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201207081800.q68I0Mq8066409@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 8 Jul 2012 18:00:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238257 - in head/sys/ia64: ia64 include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2012 18:00:23 -0000 Author: marcel Date: Sun Jul 8 18:00:22 2012 New Revision: 238257 URL: http://svn.freebsd.org/changeset/base/238257 Log: Move PCPU initialization to a new function called cpu_pcpu_setup(). This makes it easier to add additional CPU or platform information to the per-CPU structure without duplicated code. Modified: head/sys/ia64/ia64/machdep.c head/sys/ia64/ia64/mp_machdep.c head/sys/ia64/include/md_var.h Modified: head/sys/ia64/ia64/machdep.c ============================================================================== --- head/sys/ia64/ia64/machdep.c Sun Jul 8 17:43:25 2012 (r238256) +++ head/sys/ia64/ia64/machdep.c Sun Jul 8 18:00:22 2012 (r238257) @@ -506,6 +506,14 @@ cpu_pcpu_init(struct pcpu *pcpu, int cpu } void +cpu_pcpu_setup(struct pcpu *pc, u_int acpi_id, u_int sapic_id) +{ + + pc->pc_acpi_id = acpi_id; + pc->pc_md.lid = IA64_LID_SET_SAPIC_ID(sapic_id); +} + +void spinlock_enter(void) { struct thread *td; @@ -791,7 +799,7 @@ ia64_init(void) ia64_set_k4((u_int64_t)pcpup); pcpu_init(pcpup, 0, sizeof(pcpu0)); dpcpu_init(ia64_physmem_alloc(DPCPU_SIZE, PAGE_SIZE), 0); - PCPU_SET(md.lid, ia64_get_lid()); + cpu_pcpu_setup(pcpup, ~0U, ia64_get_lid()); PCPU_SET(curthread, &thread0); /* Modified: head/sys/ia64/ia64/mp_machdep.c ============================================================================== --- head/sys/ia64/ia64/mp_machdep.c Sun Jul 8 17:43:25 2012 (r238256) +++ head/sys/ia64/ia64/mp_machdep.c Sun Jul 8 18:00:22 2012 (r238257) @@ -309,9 +309,8 @@ cpu_mp_add(u_int acpi_id, u_int id, u_in } else pc = pcpup; - pc->pc_acpi_id = acpi_id; - pc->pc_md.lid = IA64_LID_SET_SAPIC_ID(sapic_id); - + cpu_pcpu_setup(pc, acpi_id, sapic_id); + CPU_SET(pc->pc_cpuid, &all_cpus); } Modified: head/sys/ia64/include/md_var.h ============================================================================== --- head/sys/ia64/include/md_var.h Sun Jul 8 17:43:25 2012 (r238256) +++ head/sys/ia64/include/md_var.h Sun Jul 8 18:00:22 2012 (r238257) @@ -61,6 +61,7 @@ ia64_bsp_adjust(uint64_t bsp, int nslots #ifdef _KERNEL struct _special; +struct pcpu; struct thread; struct trapframe; @@ -80,6 +81,7 @@ void *acpi_find_table(const char *sig); void busdma_swi(void); int copyout_regstack(struct thread *, uint64_t *, uint64_t *); void cpu_mp_add(u_int, u_int, u_int); +void cpu_pcpu_setup(struct pcpu *, u_int, u_int); int do_ast(struct trapframe *); void ia32_trap(int, struct trapframe *); int ia64_count_cpus(void); From owner-svn-src-head@FreeBSD.ORG Sun Jul 8 18:04:27 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 543711065678; Sun, 8 Jul 2012 18:04:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F7B58FC17; Sun, 8 Jul 2012 18:04:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q68I4QgW066625; Sun, 8 Jul 2012 18:04:26 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q68I4QFO066623; Sun, 8 Jul 2012 18:04:26 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207081804.q68I4QFO066623@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 8 Jul 2012 18:04:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238258 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2012 18:04:27 -0000 Author: kib Date: Sun Jul 8 18:04:26 2012 New Revision: 238258 URL: http://svn.freebsd.org/changeset/base/238258 Log: Avoid vm page queues lock leak after r238212. Reported and tested by: Michael Butler Reviewed by: alc Pointy hat to: kib MFC after: 20 days Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sun Jul 8 18:00:22 2012 (r238257) +++ head/sys/vm/vm_pageout.c Sun Jul 8 18:04:26 2012 (r238258) @@ -1030,7 +1030,6 @@ rescan0: ++pageout_lock_miss; if (object->flags & OBJ_MIGHTBEDIRTY) vnodes_skipped++; - vm_page_lock_queues(); goto unlock_and_continue; } KASSERT(mp != NULL, @@ -1041,7 +1040,6 @@ rescan0: if (vget(vp, LK_EXCLUSIVE | LK_TIMELOCK, curthread)) { VM_OBJECT_LOCK(object); - vm_page_lock_queues(); ++pageout_lock_miss; if (object->flags & OBJ_MIGHTBEDIRTY) vnodes_skipped++; @@ -1083,14 +1081,14 @@ rescan0: * be undergoing I/O, so skip it */ if (m->hold_count) { - vm_page_lock_queues(); - queues_locked = TRUE; vm_page_unlock(m); vm_page_requeue(m); if (object->flags & OBJ_MIGHTBEDIRTY) vnodes_skipped++; goto unlock_and_continue; } + vm_page_unlock_queues(); + queues_locked = FALSE; } /* From owner-svn-src-head@FreeBSD.ORG Sun Jul 8 21:13:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D73411065686; Sun, 8 Jul 2012 21:13:04 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C21D58FC08; Sun, 8 Jul 2012 21:13:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q68LD4No074824; Sun, 8 Jul 2012 21:13:04 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q68LD4c1074821; Sun, 8 Jul 2012 21:13:04 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201207082113.q68LD4c1074821@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Sun, 8 Jul 2012 21:13:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238265 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2012 21:13:04 -0000 Author: melifaro Date: Sun Jul 8 21:13:04 2012 New Revision: 238265 URL: http://svn.freebsd.org/changeset/base/238265 Log: Finally fix lookup (account remaining '\0') and deletion (provide valid key length for radix lookup). Submitted by: Ihor Kaharlichenko (prev version) Approved by: kib(mentor) MFC after: 3 days Sponsored by: Shtorm ISP Modified: head/sys/netinet/ipfw/ip_fw_table.c Modified: head/sys/netinet/ipfw/ip_fw_table.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_table.c Sun Jul 8 20:41:54 2012 (r238264) +++ head/sys/netinet/ipfw/ip_fw_table.c Sun Jul 8 21:13:04 2012 (r238265) @@ -344,9 +344,12 @@ ipfw_del_table_entry(struct ip_fw_chain struct xaddr_iface ifname, ifmask; memset(&ifname, 0, sizeof(ifname)); + /* Include last \0 into comparison */ + mlen++; + /* Set 'total' structure length */ - KEY_LEN(ifname) = mlen; - KEY_LEN(ifmask) = mlen; + KEY_LEN(ifname) = KEY_LEN_IFACE + mlen; + KEY_LEN(ifmask) = KEY_LEN_IFACE + mlen; /* Assume direct match */ /* FIXME: Add interface pattern matching */ #if 0 @@ -569,7 +572,7 @@ ipfw_lookup_table_extended(struct ip_fw_ case IPFW_TABLE_INTERFACE: KEY_LEN(iface) = KEY_LEN_IFACE + - strlcpy(iface.ifname, (char *)paddr, IF_NAMESIZE); + strlcpy(iface.ifname, (char *)paddr, IF_NAMESIZE) + 1; /* Assume direct match */ /* FIXME: Add interface pattern matching */ xent = (struct table_xentry *)(rnh->rnh_lookup(&iface, NULL, rnh)); From owner-svn-src-head@FreeBSD.ORG Sun Jul 8 21:41:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D8FF1065675; Sun, 8 Jul 2012 21:41:14 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 011D78FC24; Sun, 8 Jul 2012 21:41:13 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 65F7B86E; Sun, 8 Jul 2012 23:41:05 +0200 (CEST) Date: Sun, 8 Jul 2012 23:38:46 +0200 From: Pawel Jakub Dawidek To: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= Message-ID: <20120708213846.GF1437@garage.freebsd.pl> References: <201207072013.q67KDfHN082943@svn.freebsd.org> <20120707215424.GE1437@garage.freebsd.pl> <280C8AEE-F7E8-4AAE-87BF-E59D0249B74F@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tmoQ0UElFV5VgXgH" Content-Disposition: inline In-Reply-To: <280C8AEE-F7E8-4AAE-87BF-E59D0249B74F@FreeBSD.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238213 - head/sys/geom X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2012 21:41:14 -0000 --tmoQ0UElFV5VgXgH Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 08, 2012 at 12:53:37AM +0200, Edward Tomasz Napiera=C5=82a wrot= e: > Wiadomo=C5=9B=C4=87 napisana przez Pawel Jakub Dawidek w dniu 7 lip 2012,= o godz. 23:54: > > You will also notice that one of those fields were left for more > > universal method to handle various provider's property changes (ie. > > provider's name, apart from its mediasize). The initial patch was even > > published a year ago: > >=20 > > http://people.freebsd.org/~pjd/patches/geom_property_change.patch > >=20 > > Even if it was somehow totally not reusable it would at least give you a > > hint that mediasize is not the only thing that can change and if we are > > making that change it should be done right. >=20 > I was not aware of that patch. [...] I'm afraid that's a lie. From IRC logs: rwatson: http://people.freebsd.org/~pjd/patches/geom_property_change.= patch rwatson: Not tested. pjd: shouldn't there also be a flag for geom to veto resizing? pjd: for classes that can't handle their consumers changing size? [the discussion was pretty long] > [...] What I've considered was to use attributes > instead, but that would complicate notifying consumers about resizing > and would require some special-casing in the attribute code. What attributes? The ones handled by BIO_GETATTR? They are about something totally different. > >> + G_VALID_PROVIDER(pp); > >=20 > > Is this your protection from a provider going away? >=20 > Can you suggest a way to do it in a safe way that doesn't involve > rewriting most of GEOM? I can only suggest not to rewrite GEOM because you didn't take the time to understand it. > > Why is this safe to call the orphan method directly and not use > > g_orphan_provider()? I don't know if using g_orphan_provider() is safe > > to use here either, but I'm under impression that you assume no orphan > > method will ever drop the topology lock? We have tools to assert that, > > no need to introduce such weak assumptions. >=20 > It's not that using g_orphan_provider() would be safer here - it simply > wouldn't work. The way it works is by adding providers to a queue > (g_doorstep). _Providers_, and we need to orphan individual consumers. > So, this would involve rewriting the orphanisation mechanism. Also, > most of the classes were fixed by mav@ to handle this correctly, IIRC. By introducing such hacks you make the code unpredictable. The way g_orphan_provider() works is more than just calling geom's orphan method. Also, until now, when orphan method was called it meant that provider is going away, which is not true anymore. I'd like to believe that you carefully analysed what you changed here is safe, but based on your understanding of GEOM, I doubt that. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --tmoQ0UElFV5VgXgH Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/5/eUACgkQForvXbEpPzT2gACePu160ufHCMEiKK4LZhCEzXxn yeUAoJew55E5dRqOuPa0bhnBDVIteXPz =zkP9 -----END PGP SIGNATURE----- --tmoQ0UElFV5VgXgH-- From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 05:23:03 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A2D81065679; Mon, 9 Jul 2012 05:23:03 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 655588FC1A; Mon, 9 Jul 2012 05:23:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q695N3W5096986; Mon, 9 Jul 2012 05:23:03 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q695N3Lq096984; Mon, 9 Jul 2012 05:23:03 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207090523.q695N3Lq096984@svn.freebsd.org> From: Adrian Chadd Date: Mon, 9 Jul 2012 05:23:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238271 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 05:23:03 -0000 Author: adrian Date: Mon Jul 9 05:23:02 2012 New Revision: 238271 URL: http://svn.freebsd.org/changeset/base/238271 Log: Add a debug category for RX EDMA. Modified: head/sys/dev/ath/if_ath_debug.h Modified: head/sys/dev/ath/if_ath_debug.h ============================================================================== --- head/sys/dev/ath/if_ath_debug.h Mon Jul 9 04:00:25 2012 (r238270) +++ head/sys/dev/ath/if_ath_debug.h Mon Jul 9 05:23:02 2012 (r238271) @@ -64,6 +64,8 @@ enum { ATH_DEBUG_SW_TX_RETRIES = 0x040000000ULL, /* software TX retries */ ATH_DEBUG_FATAL = 0x080000000ULL, /* fatal errors */ ATH_DEBUG_SW_TX_BAR = 0x100000000ULL, /* BAR TX */ + ATH_DEBUG_EDMA_RX = 0x200000000ULL, /* RX EDMA state */ + ATH_DEBUG_ANY = 0xffffffffffffffffULL }; From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 05:39:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 09844106566B; Mon, 9 Jul 2012 05:39:32 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF3AD8FC08; Mon, 9 Jul 2012 05:39:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q695dVEl097680; Mon, 9 Jul 2012 05:39:31 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q695dV3I097678; Mon, 9 Jul 2012 05:39:31 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201207090539.q695dV3I097678@svn.freebsd.org> From: Mateusz Guzik Date: Mon, 9 Jul 2012 05:39:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238272 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 05:39:32 -0000 Author: mjg Date: Mon Jul 9 05:39:31 2012 New Revision: 238272 URL: http://svn.freebsd.org/changeset/base/238272 Log: Follow-up commit to r238220: Pass only FEXEC (instead of FREAD|FEXEC) in fgetvp_exec. _fget has to check for !FWRITE anyway and may as well know about FREAD. Make _fget code a bit more readable by converting permission checking from if() to switch(). Assert that correct permission flags are passed. In collaboration with: kib Approved by: trasz (mentor) MFC after: 6 days X-MFC: with r238220 Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Mon Jul 9 05:23:02 2012 (r238271) +++ head/sys/kern/kern_descrip.c Mon Jul 9 05:39:31 2012 (r238272) @@ -2275,8 +2275,8 @@ _fget(struct thread *td, int fd, struct struct file *fp; #ifdef CAPABILITIES struct file *fp_fromcap; - int error; #endif + int error; *fpp = NULL; if (td == NULL || (fdp = td->td_proc->p_fd) == NULL) @@ -2315,7 +2315,7 @@ _fget(struct thread *td, int fd, struct else error = cap_funwrap_mmap(fp, needrights, maxprotp, &fp_fromcap); - if (error) { + if (error != 0) { fdrop(fp, td); return (error); } @@ -2341,13 +2341,29 @@ _fget(struct thread *td, int fd, struct /* * FREAD and FWRITE failure return EBADF as per POSIX. */ - if ((flags == FREAD && (fp->f_flag & FREAD) == 0) || - (flags == FWRITE && (fp->f_flag & FWRITE) == 0) || - (flags == (FREAD | FEXEC) && - (((fp->f_flag & flags) == 0) || ((fp->f_flag & FWRITE) != 0)))) { + error = 0; + switch (flags) { + case FREAD: + case FWRITE: + if ((fp->f_flag & flags) == 0) + error = EBADF; + break; + case FEXEC: + if ((fp->f_flag & (FREAD | FEXEC)) == 0 || + ((fp->f_flag & FWRITE) != 0)) + error = EBADF; + break; + case 0: + break; + default: + KASSERT(0, ("wrong flags")); + } + + if (error != 0) { fdrop(fp, td); - return (EBADF); + return (error); } + *fpp = fp; return (0); } @@ -2448,7 +2464,7 @@ int fgetvp_exec(struct thread *td, int fd, cap_rights_t rights, struct vnode **vpp) { - return (_fgetvp(td, fd, FREAD | FEXEC, rights, NULL, vpp)); + return (_fgetvp(td, fd, FEXEC, rights, NULL, vpp)); } #ifdef notyet From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 06:21:47 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 16609106566B; Mon, 9 Jul 2012 06:21:47 +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 00C6C8FC12; Mon, 9 Jul 2012 06:21:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q696LkuS099494; Mon, 9 Jul 2012 06:21:46 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q696Lksj099488; Mon, 9 Jul 2012 06:21:46 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201207090621.q696Lksj099488@svn.freebsd.org> From: Hiroki Sato Date: Mon, 9 Jul 2012 06:21:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238273 - in head: sbin/ifconfig sys/netinet6 usr.sbin/ndp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 06:21:47 -0000 Author: hrs Date: Mon Jul 9 06:21:46 2012 New Revision: 238273 URL: http://svn.freebsd.org/changeset/base/238273 Log: Remove "prefer_source" address selection option. FreeBSD has had an implementation of RFC 3484 for this purpose for a long time and "prefer_source" was never implemented actually. ND6_IFF_PREFER_SOURCE macro is left intact. Modified: head/sbin/ifconfig/af_inet6.c head/sbin/ifconfig/ifconfig.8 head/sys/netinet6/nd6.h head/usr.sbin/ndp/ndp.8 head/usr.sbin/ndp/ndp.c Modified: head/sbin/ifconfig/af_inet6.c ============================================================================== --- head/sbin/ifconfig/af_inet6.c Mon Jul 9 05:39:31 2012 (r238272) +++ head/sbin/ifconfig/af_inet6.c Mon Jul 9 06:21:46 2012 (r238273) @@ -509,8 +509,6 @@ static struct cmd inet6_cmds[] = { DEF_CMD("-ifdisabled", -ND6_IFF_IFDISABLED, setnd6flags), DEF_CMD("nud", ND6_IFF_PERFORMNUD, setnd6flags), DEF_CMD("-nud", -ND6_IFF_PERFORMNUD, setnd6flags), - DEF_CMD("prefer_source",ND6_IFF_PREFER_SOURCE, setnd6flags), - DEF_CMD("-prefer_source",-ND6_IFF_PREFER_SOURCE,setnd6flags), DEF_CMD("auto_linklocal",ND6_IFF_AUTO_LINKLOCAL,setnd6flags), DEF_CMD("-auto_linklocal",-ND6_IFF_AUTO_LINKLOCAL,setnd6flags), DEF_CMD_ARG("pltime", setip6pltime), Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Mon Jul 9 05:39:31 2012 (r238272) +++ head/sbin/ifconfig/ifconfig.8 Mon Jul 9 06:21:46 2012 (r238273) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd May 27, 2012 +.Dd July 9, 2012 .Dt IFCONFIG 8 .Os .Sh NAME @@ -716,12 +716,6 @@ Set a flag to enable Neighbor Unreachabi .It Cm -nud Clear a flag .Cm nud . -.It Cm prefer_source -Set a flag to prefer addresses on the interface as candidates of the -source address for outgoing packets. -.It Cm -prefer_source -Clear a flag -.Cm prefer_source . .El .Pp The following parameters are specific to cloning Modified: head/sys/netinet6/nd6.h ============================================================================== --- head/sys/netinet6/nd6.h Mon Jul 9 05:39:31 2012 (r238272) +++ head/sys/netinet6/nd6.h Mon Jul 9 06:21:46 2012 (r238273) @@ -79,7 +79,7 @@ struct nd_ifinfo { #define ND6_IFF_PERFORMNUD 0x1 #define ND6_IFF_ACCEPT_RTADV 0x2 -#define ND6_IFF_PREFER_SOURCE 0x4 /* XXX: not related to ND. */ +#define ND6_IFF_PREFER_SOURCE 0x4 /* Not used in FreeBSD. */ #define ND6_IFF_IFDISABLED 0x8 /* IPv6 operation is disabled due to * DAD failure. (XXX: not ND-specific) */ Modified: head/usr.sbin/ndp/ndp.8 ============================================================================== --- head/usr.sbin/ndp/ndp.8 Mon Jul 9 05:39:31 2012 (r238272) +++ head/usr.sbin/ndp/ndp.8 Mon Jul 9 06:21:46 2012 (r238273) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 2, 2009 +.Dd July 9, 2012 .Dt NDP 8 .Os .\" @@ -192,15 +192,6 @@ on This flag is set by .Va net.inet6.ip6.auto_linklocal sysctl variable. -.It Ic prefer_source -Prefer addresses on the -.Ar interface -as candidates of the source address for outgoing packets. -The default value of this flag is off. -For more details about the entire algorithm of source address -selection, see the -.Pa IMPLEMENTATION -file supplied with the KAME kit. .It Ic disabled Disable IPv6 operation on the interface. When disabled, the interface discards any IPv6 packets Modified: head/usr.sbin/ndp/ndp.c ============================================================================== --- head/usr.sbin/ndp/ndp.c Mon Jul 9 05:39:31 2012 (r238272) +++ head/usr.sbin/ndp/ndp.c Mon Jul 9 06:21:46 2012 (r238273) @@ -1008,9 +1008,6 @@ ifinfo(ifname, argc, argv) #ifdef ND6_IFF_AUTO_LINKLOCAL SETFLAG("auto_linklocal", ND6_IFF_AUTO_LINKLOCAL); #endif -#ifdef ND6_IFF_PREFER_SOURCE - SETFLAG("prefer_source", ND6_IFF_PREFER_SOURCE); -#endif SETVALUE("basereachable", ND.basereachable); SETVALUE("retrans", ND.retrans); SETVALUE("curhlim", ND.chlim); @@ -1084,10 +1081,6 @@ ifinfo(ifname, argc, argv) if ((ND.flags & ND6_IFF_AUTO_LINKLOCAL)) printf("auto_linklocal "); #endif -#ifdef ND6_IFF_PREFER_SOURCE - if ((ND.flags & ND6_IFF_PREFER_SOURCE)) - printf("prefer_source "); -#endif } putc('\n', stdout); #undef ND From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 06:34:16 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32BB71065678; Mon, 9 Jul 2012 06:34:16 +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 1CFB08FC17; Mon, 9 Jul 2012 06:34:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q696YFsB000140; Mon, 9 Jul 2012 06:34:15 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q696YFNG000136; Mon, 9 Jul 2012 06:34:15 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201207090634.q696YFNG000136@svn.freebsd.org> From: Hiroki Sato Date: Mon, 9 Jul 2012 06:34:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238274 - in head: share/man/man4 sys/dev/usb sys/dev/usb/wlan X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 06:34:16 -0000 Author: hrs Date: Mon Jul 9 06:34:15 2012 New Revision: 238274 URL: http://svn.freebsd.org/changeset/base/238274 Log: - Add support of the following USB devices to run(4): * Logitec LAN-W150N/U2 * Buffalo WLI-UC-GNM2 - Add device id of Planex GW-USValue-EZ. Modified: head/share/man/man4/run.4 head/sys/dev/usb/usbdevs head/sys/dev/usb/wlan/if_run.c Modified: head/share/man/man4/run.4 ============================================================================== --- head/share/man/man4/run.4 Mon Jul 9 06:21:46 2012 (r238273) +++ head/share/man/man4/run.4 Mon Jul 9 06:34:15 2012 (r238274) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 7, 2012 +.Dd July 9, 2012 .Dt RUN 4 .Os .Sh NAME @@ -122,6 +122,8 @@ driver supports the following wireless a .It Buffalo WLI-UC-G300N .It Buffalo WLI-UC-G301N .It Buffalo WLI-UC-GN +.It Buffalo WLI-UC-GNM +.It Buffalo WLI-UC-GNM2 .It Corega CG-WLUSB2GNL .It Corega CG-WLUSB2GNR .It Corega CG-WLUSB300AGN @@ -142,6 +144,7 @@ driver supports the following wireless a .It Hercules HWNU-300 .It Linksys WUSB54GC v3 .It Linksys WUSB600N +.It Logitec LAN-W150N/U2 .It Mvix Nubbin MS-811N .It Planex GW-USMicroN .It Planex GW-US300MiniS Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Mon Jul 9 06:21:46 2012 (r238273) +++ head/sys/dev/usb/usbdevs Mon Jul 9 06:34:15 2012 (r238274) @@ -2140,6 +2140,7 @@ product LOGITEC RT2870_1 0x0162 RT2870 product LOGITEC RT2870_2 0x0163 RT2870 product LOGITEC RT2870_3 0x0164 RT2870 product LOGITEC LANW300NU2 0x0166 LAN-W300N/U2 +product LOGITEC LANW150NU2 0x0168 LAN-W150N/U2 /* Longcheer Holdings, Ltd. products */ product LONGCHEER WM66 0x6061 Longcheer WM66 HSDPA @@ -2204,7 +2205,8 @@ product MELCO RT2870_1 0x0148 RT2870 product MELCO RT2870_2 0x0150 RT2870 product MELCO WLIUCGN 0x015d WLI-UC-GN product MELCO WLIUCG301N 0x016f WLI-UC-G301N -product MELCO WLIUCGNM 0x01a2 WLI-UC-GNM +product MELCO WLIUCGNM 0x01a2 WLI-UC-GNM +product MELCO WLIUCGNM2 0x01ee WLI-UC-GNM2 /* Merlin products */ product MERLIN V620 0x1110 Merlin V620 @@ -2618,6 +2620,7 @@ product PLANEX2 GWUS54GD 0xed01 GW-US54G product PLANEX2 GWUSMM 0xed02 GW-USMM product PLANEX2 RT2870 0xed06 RT2870 product PLANEX2 GWUSMICRON 0xed14 GW-USMicroN +product PLANEX2 GWUSVALUEEZ 0xed17 GW-USValue-EZ product PLANEX3 GWUS54GZ 0xab10 GW-US54GZ product PLANEX3 GU1000T 0xab11 GU-1000T product PLANEX3 GWUS54MINI 0xab13 GW-US54Mini Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Mon Jul 9 06:21:46 2012 (r238273) +++ head/sys/dev/usb/wlan/if_run.c Mon Jul 9 06:34:15 2012 (r238274) @@ -209,6 +209,7 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(LOGITEC, RT2870_2), RUN_DEV(LOGITEC, RT2870_3), RUN_DEV(LOGITEC, LANW300NU2), + RUN_DEV(LOGITEC, LANW150NU2), RUN_DEV(MELCO, RT2870_1), RUN_DEV(MELCO, RT2870_2), RUN_DEV(MELCO, WLIUCAG300N), @@ -216,6 +217,7 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(MELCO, WLIUCG301N), RUN_DEV(MELCO, WLIUCGN), RUN_DEV(MELCO, WLIUCGNM), + RUN_DEV(MELCO, WLIUCGNM2), RUN_DEV(MOTOROLA4, RT2770), RUN_DEV(MOTOROLA4, RT3070), RUN_DEV(MSI, RT3070_1), From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 06:39:47 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0D062106564A; Mon, 9 Jul 2012 06:39:47 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECB968FC0C; Mon, 9 Jul 2012 06:39:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q696dk3i000382; Mon, 9 Jul 2012 06:39:46 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q696dk20000380; Mon, 9 Jul 2012 06:39:46 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207090639.q696dk20000380@svn.freebsd.org> From: Adrian Chadd Date: Mon, 9 Jul 2012 06:39:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238275 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 06:39:47 -0000 Author: adrian Date: Mon Jul 9 06:39:46 2012 New Revision: 238275 URL: http://svn.freebsd.org/changeset/base/238275 Log: Extend the RX descriptor completion debugging to log the larger AR93xx receive descriptors. This isn't entirely complete - the AR93xx and later descriptors don't have a link/buffer pointer; the descriptor contents just start. Modified: head/sys/dev/ath/if_ath_debug.c Modified: head/sys/dev/ath/if_ath_debug.c ============================================================================== --- head/sys/dev/ath/if_ath_debug.c Mon Jul 9 06:34:15 2012 (r238274) +++ head/sys/dev/ath/if_ath_debug.c Mon Jul 9 06:39:46 2012 (r238275) @@ -118,6 +118,16 @@ ath_printrxbuf(struct ath_softc *sc, con ds->ds_hw[2], ds->ds_hw[3], ds->ds_hw[4], ds->ds_hw[5], ds->ds_hw[6], ds->ds_hw[7], ds->ds_hw[8]); + } else if (ah->ah_magic == 0x19741014) { + printf(" %08x %08x %08x %08x %08x %08x %08x\n", + ds->ds_hw[2], ds->ds_hw[3], ds->ds_hw[4], + ds->ds_hw[5], ds->ds_hw[6], ds->ds_hw[7], + ds->ds_hw[8]); + + printf(" %08x %08x %08x %08x %08x %08x %08x\n", + ds->ds_hw[9], ds->ds_hw[10], ds->ds_hw[11], + ds->ds_hw[12], ds->ds_hw[13], ds->ds_hw[14], + ds->ds_hw[15]); } } } From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 06:41:21 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 37B08106566B; Mon, 9 Jul 2012 06:41:19 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 225698FC08; Mon, 9 Jul 2012 06:41:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q696fIwg000493; Mon, 9 Jul 2012 06:41:18 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q696fIvh000491; Mon, 9 Jul 2012 06:41:18 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207090641.q696fIvh000491@svn.freebsd.org> From: Adrian Chadd Date: Mon, 9 Jul 2012 06:41:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238276 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 06:41:21 -0000 Author: adrian Date: Mon Jul 9 06:41:18 2012 New Revision: 238276 URL: http://svn.freebsd.org/changeset/base/238276 Log: Extend the debugging flags to include some AR9300 HAL related options. Obtained from: Qualcomm Atheros Modified: head/sys/dev/ath/ath_hal/ah_debug.h Modified: head/sys/dev/ath/ath_hal/ah_debug.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_debug.h Mon Jul 9 06:39:46 2012 (r238275) +++ head/sys/dev/ath/ath_hal/ah_debug.h Mon Jul 9 06:41:18 2012 (r238276) @@ -47,6 +47,11 @@ enum { HAL_DEBUG_DIVERSITY = 0x00100000, /* diversity debugging */ HAL_DEBUG_DFS = 0x00200000, /* DFS debugging */ HAL_DEBUG_HANG = 0x00400000, /* BB/MAC hang debugging */ + HAL_DEBUG_CALIBRATE = 0x00800000, /* setup calibration */ + HAL_DEBUG_POWER_MGMT = 0x01000000, /* power calibration */ + HAL_DEBUG_CHANNEL = 0x02000000, + HAL_DEBUG_QUEUE = 0x04000000, + HAL_DEBUG_PRINT_REG = 0x08000000, HAL_DEBUG_UNMASKABLE = 0x80000000, /* always printed */ HAL_DEBUG_ANY = 0xffffffff From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 07:16:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 408321065670; Mon, 9 Jul 2012 07:16:20 +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 29E5F8FC17; Mon, 9 Jul 2012 07:16:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q697GKWb001979; Mon, 9 Jul 2012 07:16:20 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q697GJ7A001973; Mon, 9 Jul 2012 07:16:19 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201207090716.q697GJ7A001973@svn.freebsd.org> From: Hiroki Sato Date: Mon, 9 Jul 2012 07:16:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238277 - in head: etc/defaults etc/rc.d sbin/ipfw share/man/man5 sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 07:16:20 -0000 Author: hrs Date: Mon Jul 9 07:16:19 2012 New Revision: 238277 URL: http://svn.freebsd.org/changeset/base/238277 Log: Make ipfw0 logging pseudo-interface clonable. It can be created automatically by $firewall_logif rc.conf(5) variable at boot time or manually by ifconfig(8) after a boot. Discussed on: freebsd-ipfw@ Modified: head/etc/defaults/rc.conf head/etc/rc.d/ipfw head/sbin/ipfw/ipfw.8 head/share/man/man5/rc.conf.5 head/sys/netinet/ipfw/ip_fw_log.c Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Mon Jul 9 06:41:18 2012 (r238276) +++ head/etc/defaults/rc.conf Mon Jul 9 07:16:19 2012 (r238277) @@ -123,6 +123,7 @@ firewall_script="/etc/rc.firewall" # Whi firewall_type="UNKNOWN" # Firewall type (see /etc/rc.firewall) firewall_quiet="NO" # Set to YES to suppress rule display firewall_logging="NO" # Set to YES to enable events logging +firewall_logif="NO" # Set to YES to create logging-pseudo interface firewall_flags="" # Flags passed to ipfw when type is a file firewall_coscripts="" # List of executables/scripts to run after # firewall starts/stops Modified: head/etc/rc.d/ipfw ============================================================================== --- head/etc/rc.d/ipfw Mon Jul 9 06:41:18 2012 (r238276) +++ head/etc/rc.d/ipfw Mon Jul 9 07:16:19 2012 (r238277) @@ -57,6 +57,10 @@ ipfw_start() echo 'Firewall logging enabled.' sysctl net.inet.ip.fw.verbose=1 >/dev/null fi + if checkyesno firewall_logif; then + ifconfig ipfw0 create + echo 'Firewall logging pseudo-interface (ipfw0) created.' + fi } ipfw_poststart() Modified: head/sbin/ipfw/ipfw.8 ============================================================================== --- head/sbin/ipfw/ipfw.8 Mon Jul 9 06:41:18 2012 (r238276) +++ head/sbin/ipfw/ipfw.8 Mon Jul 9 07:16:19 2012 (r238277) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 3, 2012 +.Dd July 9, 2012 .Dt IPFW 8 .Os .Sh NAME @@ -560,7 +560,22 @@ is set to 0 (default), one can use .Xr bpf 4 attached to the .Li ipfw0 -pseudo interface. There is no overhead if no +pseudo interface. +This pseudo interface can be created after a boot +manually by using the following command: +.Bd -literal -offset indent +# ifconfig ipfw0 create +.Ed +.Pp +Or, automatically at boot time by adding the following +line to the +.Xr rc.conf 5 +file: +.Bd -literal -offset indent +firewall_logif="YES" +.Ed +.Pp +There is no overhead if no .Xr bpf 4 is attached to the pseudo interface. .Pp Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Mon Jul 9 06:41:18 2012 (r238276) +++ head/share/man/man5/rc.conf.5 Mon Jul 9 07:16:19 2012 (r238277) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 6, 2012 +.Dd July 9, 2012 .Dt RC.CONF 5 .Os .Sh NAME @@ -501,6 +501,16 @@ to enable firewall event logging. This is equivalent to the .Dv IPFIREWALL_VERBOSE kernel option. +.It Va firewall_logif +.Pq Vt bool +Set to +.Dq Li YES +to create pseudo interface +.Li ipfw0 +for logging. +For more details, see +.Xr ipfw 8 +manual page. .It Va firewall_flags .Pq Vt str Flags passed to Modified: head/sys/netinet/ipfw/ip_fw_log.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_log.c Mon Jul 9 06:41:18 2012 (r238276) +++ head/sys/netinet/ipfw/ip_fw_log.c Mon Jul 9 07:16:19 2012 (r238277) @@ -44,8 +44,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include /* for ETHERTYPE_IP */ #include +#include #include #include /* for IFT_ETHER */ #include /* for BPF */ @@ -90,6 +93,15 @@ ipfw_log_bpf(int onoff) } #else /* !WITHOUT_BPF */ static struct ifnet *log_if; /* hook to attach to bpf */ +static struct rwlock log_if_lock; +#define LOGIF_LOCK_INIT(x) rw_init(&log_if_lock, "ipfw log_if lock") +#define LOGIF_LOCK_DESTROY(x) rw_destroy(&log_if_lock) +#define LOGIF_RLOCK(x) rw_rlock(&log_if_lock) +#define LOGIF_RUNLOCK(x) rw_runlock(&log_if_lock) +#define LOGIF_WLOCK(x) rw_wlock(&log_if_lock) +#define LOGIF_WUNLOCK(x) rw_wunlock(&log_if_lock) + +#define IPFWNAME "ipfw" /* we use this dummy function for all ifnet callbacks */ static int @@ -116,37 +128,105 @@ ipfw_log_start(struct ifnet* ifp) static const u_char ipfwbroadcastaddr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; +static int +ipfw_log_clone_match(struct if_clone *ifc, const char *name) +{ + + return (strncmp(name, IPFWNAME, sizeof(IPFWNAME) - 1) == 0); +} + +static int +ipfw_log_clone_create(struct if_clone *ifc, char *name, size_t len, + caddr_t params) +{ + int error; + int unit; + struct ifnet *ifp; + + error = ifc_name2unit(name, &unit); + if (error) + return (error); + + error = ifc_alloc_unit(ifc, &unit); + if (error) + return (error); + + ifp = if_alloc(IFT_ETHER); + if (ifp == NULL) { + ifc_free_unit(ifc, unit); + return (ENOSPC); + } + ifp->if_dname = IPFWNAME; + ifp->if_dunit = unit; + snprintf(ifp->if_xname, IFNAMSIZ, "%s%d", IPFWNAME, unit); + strlcpy(name, ifp->if_xname, len); + ifp->if_mtu = 65536; + ifp->if_flags = IFF_UP | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_init = (void *)log_dummy; + ifp->if_ioctl = log_dummy; + ifp->if_start = ipfw_log_start; + ifp->if_output = ipfw_log_output; + ifp->if_addrlen = 6; + ifp->if_hdrlen = 14; + ifp->if_broadcastaddr = ipfwbroadcastaddr; + ifp->if_baudrate = IF_Mbps(10); + + LOGIF_WLOCK(); + if (log_if == NULL) + log_if = ifp; + else { + LOGIF_WUNLOCK(); + if_free(ifp); + ifc_free_unit(ifc, unit); + return (EEXIST); + } + LOGIF_WUNLOCK(); + if_attach(ifp); + bpfattach(ifp, DLT_EN10MB, 14); + + return (0); +} + +static int +ipfw_log_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) +{ + int unit; + + if (ifp == NULL) + return (0); + + LOGIF_WLOCK(); + if (log_if != NULL && ifp == log_if) + log_if = NULL; + else { + LOGIF_WUNLOCK(); + return (EINVAL); + } + LOGIF_WUNLOCK(); + + unit = ifp->if_dunit; + bpfdetach(ifp); + if_detach(ifp); + if_free(ifp); + ifc_free_unit(ifc, unit); + + return (0); +} + +static struct if_clone ipfw_log_cloner = IFC_CLONE_INITIALIZER( + IPFWNAME, NULL, IF_MAXUNIT, + NULL, ipfw_log_clone_match, ipfw_log_clone_create, ipfw_log_clone_destroy); + void ipfw_log_bpf(int onoff) { - struct ifnet *ifp; if (onoff) { - if (log_if) - return; - ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) - return; - if_initname(ifp, "ipfw", 0); - ifp->if_mtu = 65536; - ifp->if_flags = IFF_UP | IFF_SIMPLEX | IFF_MULTICAST; - ifp->if_init = (void *)log_dummy; - ifp->if_ioctl = log_dummy; - ifp->if_start = ipfw_log_start; - ifp->if_output = ipfw_log_output; - ifp->if_addrlen = 6; - ifp->if_hdrlen = 14; - if_attach(ifp); - ifp->if_broadcastaddr = ipfwbroadcastaddr; - ifp->if_baudrate = IF_Mbps(10); - bpfattach(ifp, DLT_EN10MB, 14); - log_if = ifp; + LOGIF_LOCK_INIT(); + if_clone_attach(&ipfw_log_cloner); } else { - if (log_if) { - ether_ifdetach(log_if); - if_free(log_if); - } - log_if = NULL; + if_clone_detach(&ipfw_log_cloner); + LOGIF_LOCK_DESTROY(); } } #endif /* !WITHOUT_BPF */ @@ -166,9 +246,11 @@ ipfw_log(struct ip_fw *f, u_int hlen, st if (V_fw_verbose == 0) { #ifndef WITHOUT_BPF - - if (log_if == NULL || log_if->if_bpf == NULL) + LOGIF_RLOCK(); + if (log_if == NULL || log_if->if_bpf == NULL) { + LOGIF_RUNLOCK(); return; + } if (args->eh) /* layer2, use orig hdr */ BPF_MTAP2(log_if, args->eh, ETHER_HDR_LEN, m); @@ -177,6 +259,7 @@ ipfw_log(struct ip_fw *f, u_int hlen, st * more info in the header. */ BPF_MTAP2(log_if, "DDDDDDSSSSSS\x08\x00", ETHER_HDR_LEN, m); + LOGIF_RUNLOCK(); #endif /* !WITHOUT_BPF */ return; } From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 07:19:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2FF911065673; Mon, 9 Jul 2012 07:19:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19A7F8FC14; Mon, 9 Jul 2012 07:19:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q697JBiS002136; Mon, 9 Jul 2012 07:19:11 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q697JBn0002126; Mon, 9 Jul 2012 07:19:11 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207090719.q697JBn0002126@svn.freebsd.org> From: Adrian Chadd Date: Mon, 9 Jul 2012 07:19:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238278 - in head/sys/dev/ath: . ath_hal ath_hal/ar5210 ath_hal/ar5211 ath_hal/ar5212 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 07:19:12 -0000 Author: adrian Date: Mon Jul 9 07:19:11 2012 New Revision: 238278 URL: http://svn.freebsd.org/changeset/base/238278 Log: Extend the RX HAL API to include the RX queue identifier. The AR93xx and later chips support two RX FIFO queues - a high and low priority queue. For legacy chips, just assume the queues are high priority. This is inspired by the reference driver but is a reimplementation of the API and code. Modified: head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ar5210/ar5210.h head/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c head/sys/dev/ath/ath_hal/ar5211/ar5211.h head/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c head/sys/dev/ath/ath_hal/ar5212/ar5212.h head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c head/sys/dev/ath/if_ath_rx.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Mon Jul 9 07:16:19 2012 (r238277) +++ head/sys/dev/ath/ath_hal/ah.h Mon Jul 9 07:19:11 2012 (r238278) @@ -1078,8 +1078,8 @@ struct ath_hal { const struct ath_desc *ds, int *rates, int *tries); /* Receive Functions */ - uint32_t __ahdecl(*ah_getRxDP)(struct ath_hal*); - void __ahdecl(*ah_setRxDP)(struct ath_hal*, uint32_t rxdp); + uint32_t __ahdecl(*ah_getRxDP)(struct ath_hal*, HAL_RX_QUEUE); + void __ahdecl(*ah_setRxDP)(struct ath_hal*, uint32_t rxdp, HAL_RX_QUEUE); void __ahdecl(*ah_enableReceive)(struct ath_hal*); HAL_BOOL __ahdecl(*ah_stopDmaReceive)(struct ath_hal*); void __ahdecl(*ah_startPcuReceive)(struct ath_hal*); Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210.h Mon Jul 9 07:16:19 2012 (r238277) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210.h Mon Jul 9 07:19:11 2012 (r238278) @@ -180,8 +180,8 @@ extern void ar5210IntrReqTxDesc(struct extern HAL_BOOL ar5210GetTxCompletionRates(struct ath_hal *ah, const struct ath_desc *, int *rates, int *tries); -extern uint32_t ar5210GetRxDP(struct ath_hal *); -extern void ar5210SetRxDP(struct ath_hal *, uint32_t rxdp); +extern uint32_t ar5210GetRxDP(struct ath_hal *, HAL_RX_QUEUE); +extern void ar5210SetRxDP(struct ath_hal *, uint32_t rxdp, HAL_RX_QUEUE); extern void ar5210EnableReceive(struct ath_hal *); extern HAL_BOOL ar5210StopDmaReceive(struct ath_hal *); extern void ar5210StartPcuReceive(struct ath_hal *); Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c Mon Jul 9 07:16:19 2012 (r238277) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c Mon Jul 9 07:19:11 2012 (r238278) @@ -30,8 +30,10 @@ * Get the RXDP. */ uint32_t -ar5210GetRxDP(struct ath_hal *ah) +ar5210GetRxDP(struct ath_hal *ah, HAL_RX_QUEUE qtype) { + + HALASSERT(qtype == HAL_RX_QUEUE_HP); return OS_REG_READ(ah, AR_RXDP); } @@ -39,8 +41,10 @@ ar5210GetRxDP(struct ath_hal *ah) * Set the RxDP. */ void -ar5210SetRxDP(struct ath_hal *ah, uint32_t rxdp) +ar5210SetRxDP(struct ath_hal *ah, uint32_t rxdp, HAL_RX_QUEUE qtype) { + + HALASSERT(qtype == HAL_RX_QUEUE_HP); OS_REG_WRITE(ah, AR_RXDP, rxdp); } Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211.h Mon Jul 9 07:16:19 2012 (r238277) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211.h Mon Jul 9 07:19:11 2012 (r238278) @@ -205,8 +205,8 @@ extern void ar5211IntrReqTxDesc(struct extern HAL_BOOL ar5211GetTxCompletionRates(struct ath_hal *ah, const struct ath_desc *ds0, int *rates, int *tries); -extern uint32_t ar5211GetRxDP(struct ath_hal *); -extern void ar5211SetRxDP(struct ath_hal *, uint32_t rxdp); +extern uint32_t ar5211GetRxDP(struct ath_hal *, HAL_RX_QUEUE); +extern void ar5211SetRxDP(struct ath_hal *, uint32_t rxdp, HAL_RX_QUEUE); extern void ar5211EnableReceive(struct ath_hal *); extern HAL_BOOL ar5211StopDmaReceive(struct ath_hal *); extern void ar5211StartPcuReceive(struct ath_hal *); Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c Mon Jul 9 07:16:19 2012 (r238277) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c Mon Jul 9 07:19:11 2012 (r238278) @@ -30,8 +30,10 @@ * Get the RXDP. */ uint32_t -ar5211GetRxDP(struct ath_hal *ah) +ar5211GetRxDP(struct ath_hal *ah, HAL_RX_QUEUE qtype) { + + HALASSERT(qtype == HAL_RX_QUEUE_HP); return OS_REG_READ(ah, AR_RXDP); } @@ -39,8 +41,10 @@ ar5211GetRxDP(struct ath_hal *ah) * Set the RxDP. */ void -ar5211SetRxDP(struct ath_hal *ah, uint32_t rxdp) +ar5211SetRxDP(struct ath_hal *ah, uint32_t rxdp, HAL_RX_QUEUE qtype) { + + HALASSERT(qtype == HAL_RX_QUEUE_HP); OS_REG_WRITE(ah, AR_RXDP, rxdp); HALASSERT(OS_REG_READ(ah, AR_RXDP) == rxdp); } Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212.h Mon Jul 9 07:16:19 2012 (r238277) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212.h Mon Jul 9 07:19:11 2012 (r238278) @@ -519,8 +519,8 @@ extern HAL_BOOL ar5212SetPowerMode(struc extern HAL_POWER_MODE ar5212GetPowerMode(struct ath_hal *ah); extern HAL_BOOL ar5212GetPowerStatus(struct ath_hal *ah); -extern uint32_t ar5212GetRxDP(struct ath_hal *ath); -extern void ar5212SetRxDP(struct ath_hal *ah, uint32_t rxdp); +extern uint32_t ar5212GetRxDP(struct ath_hal *ath, HAL_RX_QUEUE); +extern void ar5212SetRxDP(struct ath_hal *ah, uint32_t rxdp, HAL_RX_QUEUE); extern void ar5212EnableReceive(struct ath_hal *ah); extern HAL_BOOL ar5212StopDmaReceive(struct ath_hal *ah); extern void ar5212StartPcuReceive(struct ath_hal *ah); Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Mon Jul 9 07:16:19 2012 (r238277) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Mon Jul 9 07:19:11 2012 (r238278) @@ -29,8 +29,10 @@ * Get the RXDP. */ uint32_t -ar5212GetRxDP(struct ath_hal *ath) +ar5212GetRxDP(struct ath_hal *ath, HAL_RX_QUEUE qtype) { + + HALASSERT(qtype == HAL_RX_QUEUE_HP); return OS_REG_READ(ath, AR_RXDP); } @@ -38,8 +40,10 @@ ar5212GetRxDP(struct ath_hal *ath) * Set the RxDP. */ void -ar5212SetRxDP(struct ath_hal *ah, uint32_t rxdp) +ar5212SetRxDP(struct ath_hal *ah, uint32_t rxdp, HAL_RX_QUEUE qtype) { + + HALASSERT(qtype == HAL_RX_QUEUE_HP); OS_REG_WRITE(ah, AR_RXDP, rxdp); HALASSERT(OS_REG_READ(ah, AR_RXDP) == rxdp); } Modified: head/sys/dev/ath/if_ath_rx.c ============================================================================== --- head/sys/dev/ath/if_ath_rx.c Mon Jul 9 07:16:19 2012 (r238277) +++ head/sys/dev/ath/if_ath_rx.c Mon Jul 9 07:19:11 2012 (r238278) @@ -916,7 +916,7 @@ rx_proc_next: * Are there any net80211 buffer calls involved? */ bf = TAILQ_FIRST(&sc->sc_rxbuf); - ath_hal_putrxbuf(ah, bf->bf_daddr); + ath_hal_putrxbuf(ah, bf->bf_daddr, HAL_RX_QUEUE_HP); ath_hal_rxena(ah); /* enable recv descriptors */ ath_mode_init(sc); /* set filters, etc. */ ath_hal_startpcurecv(ah); /* re-enable PCU/DMA engine */ @@ -1002,7 +1002,7 @@ ath_legacy_stoprecv(struct ath_softc *sc device_printf(sc->sc_dev, "%s: rx queue %p, link %p\n", __func__, - (caddr_t)(uintptr_t) ath_hal_getrxbuf(ah), + (caddr_t)(uintptr_t) ath_hal_getrxbuf(ah, HAL_RX_QUEUE_HP), sc->sc_rxlink); ix = 0; TAILQ_FOREACH(bf, &sc->sc_rxbuf, bf_list) { @@ -1046,7 +1046,7 @@ ath_legacy_startrecv(struct ath_softc *s } bf = TAILQ_FIRST(&sc->sc_rxbuf); - ath_hal_putrxbuf(ah, bf->bf_daddr); + ath_hal_putrxbuf(ah, bf->bf_daddr, HAL_RX_QUEUE_HP); ath_hal_rxena(ah); /* enable recv descriptors */ ath_mode_init(sc); /* set filters, etc. */ ath_hal_startpcurecv(ah); /* re-enable PCU/DMA engine */ Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Mon Jul 9 07:16:19 2012 (r238277) +++ head/sys/dev/ath/if_athvar.h Mon Jul 9 07:19:11 2012 (r238278) @@ -745,8 +745,8 @@ void ath_intr(void *); ((*(_ah)->ah_setMulticastFilter)((_ah), (_mfilt0), (_mfilt1))) #define ath_hal_waitforbeacon(_ah, _bf) \ ((*(_ah)->ah_waitForBeaconDone)((_ah), (_bf)->bf_daddr)) -#define ath_hal_putrxbuf(_ah, _bufaddr) \ - ((*(_ah)->ah_setRxDP)((_ah), (_bufaddr))) +#define ath_hal_putrxbuf(_ah, _bufaddr, _rxq) \ + ((*(_ah)->ah_setRxDP)((_ah), (_bufaddr), (_rxq))) /* NB: common across all chips */ #define AR_TSF_L32 0x804c /* MAC local clock lower 32 bits */ #define ath_hal_gettsf32(_ah) \ @@ -763,8 +763,8 @@ void ath_intr(void *); ((*(_ah)->ah_getTxDP)((_ah), (_q))) #define ath_hal_numtxpending(_ah, _q) \ ((*(_ah)->ah_numTxPending)((_ah), (_q))) -#define ath_hal_getrxbuf(_ah) \ - ((*(_ah)->ah_getRxDP)((_ah))) +#define ath_hal_getrxbuf(_ah, _rxq) \ + ((*(_ah)->ah_getRxDP)((_ah), (_rxq))) #define ath_hal_txstart(_ah, _q) \ ((*(_ah)->ah_startTxDma)((_ah), (_q))) #define ath_hal_setchannel(_ah, _chan) \ From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 07:23:55 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8920106564A; Mon, 9 Jul 2012 07:23:55 +0000 (UTC) (envelope-from etnapierala@googlemail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id C6DB88FC19; Mon, 9 Jul 2012 07:23:54 +0000 (UTC) Received: by eabm6 with SMTP id m6so4375689eab.13 for ; Mon, 09 Jul 2012 00:23:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=pSoSM/RnlWUSHZRFb261v9rB5GbUVUc4z4DAmfag3Pk=; b=zEDgAMeZ9OIzchn5aNX3eAM0NzxYsTpCwMYMFZjozxDWOaNlIyqNpZnKd0cczrWjAT 4k3I8a489CkxtrIWEy1obtJZz1O//VXeLh8NUEHvYcDMUftVyl25ZadGc4N2AwRQTnJ1 +fTkYzq7mLWHfa3ivKVlrCLnpIEz9AZYpZqe0S9cRr6ZOvFuIT/nvEAxc5XkOCYstWi+ /iUC7CzVu5hfFc+tfRrrbR87A6RiZwUIvdSRRB2Lo0bAOO0Dy6sJJzS/G9iNnpom3twc wT7rflCCv/J2m6Rhsz2iVm09Q3r6exYnqwE2hdJmtNJP5GYSgKOF4eMch5itTXcNO4WQ lRaw== Received: by 10.14.188.4 with SMTP id z4mr9403275eem.228.1341818628197; Mon, 09 Jul 2012 00:23:48 -0700 (PDT) Received: from apn-77-113-49-165.dynamic.gprs.plus.pl (apn-77-113-49-165.dynamic.gprs.plus.pl. [77.113.49.165]) by mx.google.com with ESMTPS id e48sm91189803eea.12.2012.07.09.00.23.33 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 09 Jul 2012 00:23:47 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=iso-8859-2 From: =?iso-8859-2?Q?Edward_Tomasz_Napiera=B3a?= In-Reply-To: <20120708213846.GF1437@garage.freebsd.pl> Date: Mon, 9 Jul 2012 09:19:29 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <739062A0-4339-46A3-AF8E-193BC57758BA@FreeBSD.org> References: <201207072013.q67KDfHN082943@svn.freebsd.org> <20120707215424.GE1437@garage.freebsd.pl> <280C8AEE-F7E8-4AAE-87BF-E59D0249B74F@FreeBSD.org> <20120708213846.GF1437@garage.freebsd.pl> To: Pawel Jakub Dawidek X-Mailer: Apple Mail (2.1278) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238213 - head/sys/geom X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 07:23:55 -0000 Wiadomo=B6=E6 napisana przez Pawel Jakub Dawidek w dniu 8 lip 2012, o = godz. 23:38: > On Sun, Jul 08, 2012 at 12:53:37AM +0200, Edward Tomasz Napiera=B3a = wrote: >> Wiadomo=B6=E6 napisana przez Pawel Jakub Dawidek w dniu 7 lip 2012, o = godz. 23:54: >>> You will also notice that one of those fields were left for more >>> universal method to handle various provider's property changes (ie. >>> provider's name, apart from its mediasize). The initial patch was = even >>> published a year ago: >>>=20 >>> = http://people.freebsd.org/~pjd/patches/geom_property_change.patch >>>=20 >>> Even if it was somehow totally not reusable it would at least give = you a >>> hint that mediasize is not the only thing that can change and if we = are >>> making that change it should be done right. >>=20 >> I was not aware of that patch. [...] >=20 > I'm afraid that's a lie. =46rom IRC logs: >=20 > rwatson: = http://people.freebsd.org/~pjd/patches/geom_property_change.patch > rwatson: Not tested. > pjd: shouldn't there also be a flag for geom to veto resizing? > pjd: for classes that can't handle their consumers changing = size? > [the discussion was pretty long] And when exactly was that? A year ago? >> [...] What I've considered was to use attributes >> instead, but that would complicate notifying consumers about resizing >> and would require some special-casing in the attribute code. >=20 > What attributes? The ones handled by BIO_GETATTR? They are about > something totally different. Yes, but they could be used to notify about mediasize change. Now, I'm not sure if I like your approach. You're trying to generalize from a single case. And even for that single case your approach would require a special case to retaste the provider after updating mediasize, and perhaps do the orphanisation stuff before. Also, why would we want this generalisation? Resize handling is = completely different from e.g. rename handling; why should we have a single method to do both? It's not that geom structures are like mbufs or vnodes, = where every byte counts. >>>> + G_VALID_PROVIDER(pp); >>>=20 >>> Is this your protection from a provider going away? >>=20 >> Can you suggest a way to do it in a safe way that doesn't involve >> rewriting most of GEOM? >=20 > I can only suggest not to rewrite GEOM because you didn't take the = time > to understand it. Let me quote a comment from the top of geom_event.c: /* * XXX: How do we in general know that objects referenced in events * have not been destroyed before we get around to handle the event ? */ So, can you suggest a way to do it in a safe way that doesn't involve rewriting most of GEOM? >>> Why is this safe to call the orphan method directly and not use >>> g_orphan_provider()? I don't know if using g_orphan_provider() is = safe >>> to use here either, but I'm under impression that you assume no = orphan >>> method will ever drop the topology lock? We have tools to assert = that, >>> no need to introduce such weak assumptions. >>=20 >> It's not that using g_orphan_provider() would be safer here - it = simply >> wouldn't work. The way it works is by adding providers to a queue >> (g_doorstep). _Providers_, and we need to orphan individual = consumers. >> So, this would involve rewriting the orphanisation mechanism. Also, >> most of the classes were fixed by mav@ to handle this correctly, = IIRC. >=20 > By introducing such hacks you make the code unpredictable. The way > g_orphan_provider() works is more than just calling geom's orphan > method. Also, until now, when orphan method was called it meant that > provider is going away, which is not true anymore. I'd like to believe > that you carefully analysed what you changed here is safe, but based = on > your understanding of GEOM, I doubt that. Look, I really appreciate you're looking at this just six months after explicitly refusing to talk to me about the design, but it would be = great if it was a _technical_ discussion. Now, the only reason for the orphaning during resizing is backward compatibility with classes that don't know anything about the resize() method, to make sure the provider doesn't get shrunk without them = knowing.=20 Your patch didn't do that, and perhaps we could just get rid of it. I think the current approach is safer, though. --=20 If you cut off my head, what would I say? Me and my head, or me and my = body? From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 07:25:10 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24D461065674; Mon, 9 Jul 2012 07:25:10 +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 0E8698FC12; Mon, 9 Jul 2012 07:25:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q697P9lD002536; Mon, 9 Jul 2012 07:25:09 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q697P9uQ002533; Mon, 9 Jul 2012 07:25:09 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201207090725.q697P9uQ002533@svn.freebsd.org> From: Hiroki Sato Date: Mon, 9 Jul 2012 07:25:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238279 - in head: sys/dev/usb usr.sbin/usbdump X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 07:25:10 -0000 Author: hrs Date: Mon Jul 9 07:25:09 2012 New Revision: 238279 URL: http://svn.freebsd.org/changeset/base/238279 Log: Make usbusN logging pseudo-interface used by usbdump(8) clonable. One is now created/destroyed automatically by usbdump(8). Note that "hw.usb.no_pf" loader tunable is now obsolete. Reviewed by: hselasky Modified: head/sys/dev/usb/usb_pf.c head/usr.sbin/usbdump/usbdump.c Modified: head/sys/dev/usb/usb_pf.c ============================================================================== --- head/sys/dev/usb/usb_pf.c Mon Jul 9 07:19:11 2012 (r238278) +++ head/sys/dev/usb/usb_pf.c Mon Jul 9 07:25:09 2012 (r238279) @@ -44,8 +44,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include #include #include @@ -58,35 +60,144 @@ __FBSDID("$FreeBSD$"); #include #include -static int usb_no_pf; +#define USBUSNAME "usbus" -SYSCTL_INT(_hw_usb, OID_AUTO, no_pf, CTLFLAG_RW, - &usb_no_pf, 0, "Set to disable USB packet filtering"); +static void usbpf_init(void); +static void usbpf_uninit(void); +static int usbpf_ioctl(struct ifnet *, u_long, caddr_t); +static int usbpf_clone_match(struct if_clone *, const char *); +static int usbpf_clone_create(struct if_clone *, char *, size_t, caddr_t); +static int usbpf_clone_destroy(struct if_clone *, struct ifnet *); +static struct usb_bus *usbpf_ifname2ubus(const char *); +static uint32_t usbpf_aggregate_xferflags(struct usb_xfer_flags *); +static uint32_t usbpf_aggregate_status(struct usb_xfer_flags_int *); +static int usbpf_xfer_frame_is_read(struct usb_xfer *, uint32_t); +static uint32_t usbpf_xfer_precompute_size(struct usb_xfer *, int); + +static struct if_clone usbpf_cloner = IFC_CLONE_INITIALIZER( + USBUSNAME, NULL, IF_MAXUNIT, + NULL, usbpf_clone_match, usbpf_clone_create, usbpf_clone_destroy); -TUNABLE_INT("hw.usb.no_pf", &usb_no_pf); +SYSINIT(usbpf_init, SI_SUB_PSEUDO, SI_ORDER_MIDDLE, usbpf_init, NULL); +SYSUNINIT(usbpf_uninit, SI_SUB_PSEUDO, SI_ORDER_MIDDLE, usbpf_uninit, NULL); -void -usbpf_attach(struct usb_bus *ubus) +static void +usbpf_init(void) { - struct ifnet *ifp; - if (usb_no_pf != 0) { - ubus->ifp = NULL; + if_clone_attach(&usbpf_cloner); +} + +static void +usbpf_uninit(void) +{ + int devlcnt; + device_t *devlp; + devclass_t dc; + struct usb_bus *ubus; + int error; + int i; + + if_clone_detach(&usbpf_cloner); + + dc = devclass_find(USBUSNAME); + if (dc == NULL) return; + error = devclass_get_devices(dc, &devlp, &devlcnt); + if (error) + return; + for (i = 0; i < devlcnt; i++) { + ubus = device_get_softc(devlp[i]); + if (ubus != NULL && ubus->ifp != NULL) + usbpf_clone_destroy(&usbpf_cloner, ubus->ifp); } +} + +static int +usbpf_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +{ + + /* No configuration allowed. */ + return (EINVAL); +} + +static struct usb_bus * +usbpf_ifname2ubus(const char *ifname) +{ + device_t dev; + devclass_t dc; + int unit; + int error; + + if (strncmp(ifname, USBUSNAME, sizeof(USBUSNAME)) <= 0) + return (NULL); + error = ifc_name2unit(ifname, &unit); + if (error || unit < 0) + return (NULL); + dc = devclass_find(USBUSNAME); + if (dc == NULL) + return (NULL); + dev = devclass_get_device(dc, unit); + if (dev == NULL) + return (NULL); + + return (device_get_softc(dev)); +} + +static int +usbpf_clone_match(struct if_clone *ifc, const char *name) +{ + struct usb_bus *ubus; + + ubus = usbpf_ifname2ubus(name); + if (ubus == NULL) + return (0); + if (ubus->ifp != NULL) + return (0); + + return (1); +} + +static int +usbpf_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) +{ + int error; + int unit; + struct ifnet *ifp; + struct usb_bus *ubus; + error = ifc_name2unit(name, &unit); + if (error || unit < 0) + return (error); + + ubus = usbpf_ifname2ubus(name); + if (ubus == NULL) + return (1); + if (ubus->ifp != NULL) + return (1); + + error = ifc_alloc_unit(ifc, &unit); + if (error) { + ifc_free_unit(ifc, unit); + device_printf(ubus->parent, "usbpf: Could not allocate " + "instance\n"); + return (error); + } ifp = ubus->ifp = if_alloc(IFT_USB); if (ifp == NULL) { + ifc_free_unit(ifc, unit); device_printf(ubus->parent, "usbpf: Could not allocate " "instance\n"); - return; + return (ENOSPC); } - - if_initname(ifp, "usbus", device_get_unit(ubus->bdev)); - ifp->if_flags = IFF_CANTCONFIG; + strlcpy(ifp->if_xname, name, sizeof(ifp->if_xname)); + ifp->if_softc = ubus; + ifp->if_dname = ifc->ifc_name; + ifp->if_dunit = unit; + ifp->if_ioctl = usbpf_ioctl; if_attach(ifp); - if_up(ifp); - + ifp->if_flags |= IFF_UP; + rt_ifmsg(ifp); /* * XXX According to the specification of DLT_USB, it indicates * packets beginning with USB setup header. But not sure all @@ -94,6 +205,31 @@ usbpf_attach(struct usb_bus *ubus) */ bpfattach(ifp, DLT_USB, USBPF_HDR_LEN); + return (0); +} + +static int +usbpf_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) +{ + struct usb_bus *ubus; + int unit; + + ubus = ifp->if_softc; + unit = ifp->if_dunit; + + ubus->ifp = NULL; + bpfdetach(ifp); + if_detach(ifp); + if_free(ifp); + ifc_free_unit(ifc, unit); + + return (0); +} + +void +usbpf_attach(struct usb_bus *ubus) +{ + if (bootverbose) device_printf(ubus->parent, "usbpf: Attached\n"); } @@ -101,15 +237,11 @@ usbpf_attach(struct usb_bus *ubus) void usbpf_detach(struct usb_bus *ubus) { - struct ifnet *ifp = ubus->ifp; - if (ifp != NULL) { - bpfdetach(ifp); - if_down(ifp); - if_detach(ifp); - if_free(ifp); - } - ubus->ifp = NULL; + if (ubus->ifp != NULL) + usbpf_clone_destroy(&usbpf_cloner, ubus->ifp); + if (bootverbose) + device_printf(ubus->parent, "usbpf: Detached\n"); } static uint32_t @@ -259,8 +391,6 @@ usbpf_xfertap(struct usb_xfer *xfer, int bus = xfer->xroot->bus; /* sanity checks */ - if (usb_no_pf != 0) - return; if (bus->ifp == NULL) return; if (!bpf_peers_present(bus->ifp->if_bpf)) Modified: head/usr.sbin/usbdump/usbdump.c ============================================================================== --- head/usr.sbin/usbdump/usbdump.c Mon Jul 9 07:19:11 2012 (r238278) +++ head/usr.sbin/usbdump/usbdump.c Mon Jul 9 07:25:09 2012 (r238279) @@ -795,6 +795,8 @@ main(int argc, char *argv[]) int o; int filt_unit; int filt_ep; + int s; + int ifindex; const char *optstring; char *pp; @@ -887,9 +889,20 @@ main(int argc, char *argv[]) /* clear ifr structure */ memset(&ifr, 0, sizeof(ifr)); + /* Try to create usbusN interface if it is not available. */ + s = socket(AF_LOCAL, SOCK_DGRAM, 0); + if (s < 0) + errx(EXIT_FAILURE, "Could not open a socket"); + ifindex = if_nametoindex(i_arg); + if (ifindex == 0) { + (void)strlcpy(ifr.ifr_name, i_arg, sizeof(ifr.ifr_name)); + if (ioctl(s, SIOCIFCREATE2, &ifr) < 0) + errx(EXIT_FAILURE, "Invalid bus interface: %s", i_arg); + } + for ( ; v >= USBPF_HDR_LEN; v >>= 1) { (void)ioctl(fd, BIOCSBLEN, (caddr_t)&v); - (void)strncpy(ifr.ifr_name, i_arg, sizeof(ifr.ifr_name)); + (void)strlcpy(ifr.ifr_name, i_arg, sizeof(ifr.ifr_name)); if (ioctl(fd, BIOCSETIF, (caddr_t)&ifr) >= 0) break; } @@ -930,6 +943,17 @@ main(int argc, char *argv[]) printf("%d packets received by filter\n", us.bs_recv); printf("%d packets dropped by kernel\n", us.bs_drop); + /* + * Destroy the usbusN interface only if it was created by + * usbdump(8). Ignore when it was already destroyed. + */ + if (ifindex == 0 && if_nametoindex(i_arg) > 0) { + (void)strlcpy(ifr.ifr_name, i_arg, sizeof(ifr.ifr_name)); + if (ioctl(s, SIOCIFDESTROY, &ifr) < 0) + warn("SIOCIFDESTROY ioctl failed"); + } + close(s); + if (p->fd > 0) close(p->fd); if (p->rfd > 0) From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 07:31:27 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 73C20106566B; Mon, 9 Jul 2012 07:31:27 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 54AC28FC16; Mon, 9 Jul 2012 07:31:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q697VRNa002840; Mon, 9 Jul 2012 07:31:27 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q697VRQ6002836; Mon, 9 Jul 2012 07:31:27 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207090731.q697VRQ6002836@svn.freebsd.org> From: Adrian Chadd Date: Mon, 9 Jul 2012 07:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238280 - in head/sys/dev/ath: . ath_hal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 07:31:27 -0000 Author: adrian Date: Mon Jul 9 07:31:26 2012 New Revision: 238280 URL: http://svn.freebsd.org/changeset/base/238280 Log: Introduce the EDMA related HAL capabilities. Whilst here, fix a typo in a previous commit. Obtained from: Qualcomm Atheros Modified: head/sys/dev/ath/ath_hal/ah.c head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Mon Jul 9 07:25:09 2012 (r238279) +++ head/sys/dev/ath/ath_hal/ah.c Mon Jul 9 07:31:26 2012 (r238280) @@ -619,6 +619,33 @@ ath_hal_getcapability(struct ath_hal *ah return pCap->hal4AddrAggrSupport ? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_EXT_CHAN_DFS: return pCap->halExtChanDfsSupport ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_NUM_TXMAPS: + *result = pCap->halNumTxMaps; + return HAL_OK; + case HAL_CAP_TXDESCLEN: + *result = pCap->halTxDescLen; + return HAL_OK; + case HAL_CAP_TXSTATUSLEN: + *result = pCap->halTxStatusLen; + return HAL_OK; + case HAL_CAP_RXSTATUSLEN: + *result = pCap->halRxStatusLen; + return HAL_OK; + case HAL_CAP_RXFIFODEPTH: + switch (capability) { + case HAL_RX_QUEUE_HP: + *result = pCap->halRxHpFifoDepth; + return HAL_OK; + case HAL_RX_QUEUE_LP: + *result = pCap->halRxLpFifoDepth; + return HAL_OK; + default: + return HAL_ENOTSUPP; + } + case HAL_CAP_RXBUFSIZE: + case HAL_CAP_NUM_MR_RETRIES: + return HAL_EINVAL; /* XXX not yet */ + case HAL_CAP_COMBINED_RADAR_RSSI: return pCap->halUseCombinedRadarRssi ? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_AUTO_SLEEP: @@ -667,6 +694,8 @@ ath_hal_getcapability(struct ath_hal *ah return pCap->halHasBBReadWar? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_SERIALISE_WAR: /* PCI register serialisation */ return pCap->halSerialiseRegWar ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_ENHANCED_DMA_SUPPORT: + return pCap->halEnhancedDmaSupport ? HAL_OK : HAL_ENOTSUPP; default: return HAL_EINVAL; } Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Mon Jul 9 07:25:09 2012 (r238279) +++ head/sys/dev/ath/ath_hal/ah.h Mon Jul 9 07:31:26 2012 (r238280) @@ -149,9 +149,14 @@ typedef enum { HAL_CAP_TS = 72, /* 3 stream */ HAL_CAP_ENHANCED_DMA_SUPPORT = 75, /* DMA FIFO support */ + HAL_CAP_NUM_TXMAPS = 76, /* Number of buffers in a transmit descriptor */ + HAL_CAP_TXDESCLEN = 77, /* Length of transmit descriptor */ + HAL_CAP_TXSTATUSLEN = 78, /* Length of transmit status descriptor */ + HAL_CAP_RXSTATUSLEN = 79, /* Length of transmit status descriptor */ + HAL_CAP_RXFIFODEPTH = 80, /* Receive hardware FIFO depth */ + HAL_CAP_RXBUFSIZE = 81, /* Receive Buffer Length */ + HAL_CAP_NUM_MR_RETRIES = 82, /* limit on multirate retries */ - HAL_CAP_RXBUFSIZE = 81, - HAL_CAP_NUM_MR_RETRIES = 82, HAL_CAP_OL_PWRCTRL = 84, /* Open loop TX power control */ HAL_CAP_BB_PANIC_WATCHDOG = 92, @@ -210,7 +215,7 @@ typedef enum { typedef enum { HAL_RX_QUEUE_HP = 0, /* high priority recv queue */ - HAL_RX_QUEUE_LP = 0, /* low priority recv queue */ + HAL_RX_QUEUE_LP = 1, /* low priority recv queue */ } HAL_RX_QUEUE; #define HAL_NUM_RX_QUEUES 2 /* max possible # of queues */ Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Mon Jul 9 07:25:09 2012 (r238279) +++ head/sys/dev/ath/if_athvar.h Mon Jul 9 07:31:26 2012 (r238280) @@ -953,11 +953,34 @@ void ath_intr(void *); #define ath_hal_setintmit(_ah, _v) \ ath_hal_setcapability(_ah, HAL_CAP_INTMIT, \ HAL_CAP_INTMIT_ENABLE, _v, NULL) + +/* EDMA definitions */ #define ath_hal_hasedma(_ah) \ (ath_hal_getcapability(_ah, HAL_CAP_ENHANCED_DMA_SUPPORT, \ 0, NULL) == HAL_OK) +#define ath_hal_getrxfifodepth(_ah, _qtype, _req) \ + (ath_hal_getcapability(_ah, HAL_CAP_RXFIFODEPTH, _qtype, _req) \ + == HAL_OK) +#define ath_hal_getntxmaps(_ah, _req) \ + (ath_hal_getcapability(_ah, HAL_CAP_NUM_TXMAPS, 0, _req) \ + == HAL_OK) +#define ath_hal_gettxdesclen(_ah, _req) \ + (ath_hal_getcapability(_ah, HAL_CAP_TXDESCLEN, 0, _req) \ + == HAL_OK) +#define ath_hal_gettxstatuslen(_ah, _req) \ + (ath_hal_getcapability(_ah, HAL_CAP_TXSTATUSLEN, 0, _req) \ + == HAL_OK) +#define ath_hal_getrxstatuslen(_ah, _req) \ + (ath_hal_getcapability(_ah, HAL_CAP_RXSTATUSLEN, 0, _req) \ + == HAL_OK) +#define ath_hal_setrxbufsize(_ah, _req) \ + (ath_hal_setcapability(_ah, HAL_CAP_RXBUFSIZE, 0, _req, NULL) \ + == HAL_OK) + #define ath_hal_getchannoise(_ah, _c) \ ((*(_ah)->ah_getChanNoise)((_ah), (_c))) + +/* 802.11n HAL methods */ #define ath_hal_getrxchainmask(_ah, _prxchainmask) \ (ath_hal_getcapability(_ah, HAL_CAP_RX_CHAINMASK, 0, _prxchainmask)) #define ath_hal_gettxchainmask(_ah, _ptxchainmask) \ From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 07:33:39 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8E44E106564A; Mon, 9 Jul 2012 07:33:39 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mail.ipfw.ru (unknown [IPv6:2a01:4f8:120:6141::2]) by mx1.freebsd.org (Postfix) with ESMTP id 2482B8FC12; Mon, 9 Jul 2012 07:33:39 +0000 (UTC) Received: from v6.mpls.in ([2a02:978:2::5] helo=ws.su29.net) by mail.ipfw.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1So8W8-0007cb-NK; Mon, 09 Jul 2012 11:36:24 +0400 Message-ID: <4FFA894D.9050104@FreeBSD.org> Date: Mon, 09 Jul 2012 11:33:33 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120121 Thunderbird/9.0 MIME-Version: 1.0 To: Hiroki Sato References: <201207090716.q697GJ7A001973@svn.freebsd.org> In-Reply-To: <201207090716.q697GJ7A001973@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238277 - in head: etc/defaults etc/rc.d sbin/ipfw share/man/man5 sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 07:33:39 -0000 On 09.07.2012 11:16, Hiroki Sato wrote: > Author: hrs > Date: Mon Jul 9 07:16:19 2012 > New Revision: 238277 > URL: http://svn.freebsd.org/changeset/base/238277 > > Log: > Make ipfw0 logging pseudo-interface clonable. It can be created automatically > by $firewall_logif rc.conf(5) variable at boot time or manually by ifconfig(8) > after a boot. > > Discussed on: freebsd-ipfw@ Em, well, I thought "discussed" means some kind of consensus? There was an alternative implementation proposed in -ipfw with no comments from you side. Additionally, there can be other (still not discussed) solutions like making this interface as loadable module (like pf do). > From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 07:37:10 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EFE6106566B; Mon, 9 Jul 2012 07:37:10 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A4F88FC1C; Mon, 9 Jul 2012 07:37:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q697bAjw003122; Mon, 9 Jul 2012 07:37:10 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q697bA1d003120; Mon, 9 Jul 2012 07:37:10 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201207090737.q697bA1d003120@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 9 Jul 2012 07:37:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238281 - head/usr.sbin/newsyslog X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 07:37:10 -0000 Author: ae Date: Mon Jul 9 07:37:10 2012 New Revision: 238281 URL: http://svn.freebsd.org/changeset/base/238281 Log: We don't need to check the result of sending signal when -R option is specified. Submitted by: Ilya A. Arkhipov MFC after: 1 week Modified: head/usr.sbin/newsyslog/newsyslog.c Modified: head/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.c Mon Jul 9 07:31:26 2012 (r238280) +++ head/usr.sbin/newsyslog/newsyslog.c Mon Jul 9 07:37:10 2012 (r238281) @@ -1972,7 +1972,8 @@ do_zipwork(struct zipwork_entry *zwork) else pgm_name++; - if (zwork->zw_swork != NULL && zwork->zw_swork->sw_pidok <= 0) { + if (zwork->zw_swork != NULL && zwork->zw_swork->run_cmd == 0 && + zwork->zw_swork->sw_pidok <= 0) { warnx( "log %s not compressed because daemon(s) not notified", zwork->zw_fname); From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 08:09:49 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06B261065670; Mon, 9 Jul 2012 08:09:49 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) by mx1.freebsd.org (Postfix) with ESMTP id 9F9038FC12; Mon, 9 Jul 2012 08:09:46 +0000 (UTC) Received: from alph.allbsd.org (p2214-ipbf2707funabasi.chiba.ocn.ne.jp [123.225.119.214]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id q6989Lfn035646 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 9 Jul 2012 17:09:35 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) (authenticated bits=0) by alph.allbsd.org (8.14.5/8.14.5) with ESMTP id q6989J8u070102; Mon, 9 Jul 2012 17:09:20 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Mon, 09 Jul 2012 17:08:13 +0900 (JST) Message-Id: <20120709.170813.339720376082380726.hrs@allbsd.org> To: melifaro@FreeBSD.org From: Hiroki Sato In-Reply-To: <4FFA894D.9050104@FreeBSD.org> References: <201207090716.q697GJ7A001973@svn.freebsd.org> <4FFA894D.9050104@FreeBSD.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 23.4 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Mon_Jul__9_17_08_13_2012_866)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Mon, 09 Jul 2012 17:09:36 +0900 (JST) X-Spam-Status: No, score=-96.8 required=13.0 tests=CONTENT_TYPE_PRESENT, ONLY1HOPDIRECT, RCVD_IN_RP_RNBL, SAMEHELOBY2HOP, USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r238277 - in head: etc/defaults etc/rc.d sbin/ipfw share/man/man5 sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 08:09:49 -0000 ----Security_Multipart(Mon_Jul__9_17_08_13_2012_866)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit "Alexander V. Chernikov" wrote in <4FFA894D.9050104@FreeBSD.org>: me> On 09.07.2012 11:16, Hiroki Sato wrote: me> > Author: hrs me> > Date: Mon Jul 9 07:16:19 2012 me> > New Revision: 238277 me> > URL: http://svn.freebsd.org/changeset/base/238277 me> > me> > Log: me> > Make ipfw0 logging pseudo-interface clonable. It can be created me> > automatically me> > by $firewall_logif rc.conf(5) variable at boot time or manually by me> > ifconfig(8) me> > after a boot. me> > me> > Discussed on: freebsd-ipfw@ me> Em, well, I thought "discussed" means some kind of consensus? me> There was an alternative implementation proposed in -ipfw with no me> comments from you side. Additionally, there can be other (still not me> discussed) solutions like making this interface as loadable module me> (like pf do). I meant there was no strong objection. I am sorry for not commenting your implementation, but at least for ipfw0 it is difficult to decouple ifnet and bpf because the primary consumer is tcpdump(8), which depends on NET_RT_IFLIST to find the target. Probably your solution can be used for usbdump(8). The reason why I committed the patch now is there are reports that these pseudo interfaces made some applications confused and/or caused some performance degradation on 9.0R, and wanted to fix it in some way. I am still open for more sophisticated implementation and have no objection to replace mine with it. Do you have an idea about converting it with a loadable module? -- Hiroki ----Security_Multipart(Mon_Jul__9_17_08_13_2012_866)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEABECAAYFAk/6kW0ACgkQTyzT2CeTzy2FygCgkA6HqiidVRcLOgXBA+Aipi3H Vp4AoNE4Tfbhmi4xE3n/IzPe1+K9jr65 =Qzyy -----END PGP SIGNATURE----- ----Security_Multipart(Mon_Jul__9_17_08_13_2012_866)---- From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 08:11:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8F0F11065672; Mon, 9 Jul 2012 08:11:17 +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 78AD68FC08; Mon, 9 Jul 2012 08:11:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q698BHFP004557; Mon, 9 Jul 2012 08:11:17 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q698BHEt004552; Mon, 9 Jul 2012 08:11:17 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201207090811.q698BHEt004552@svn.freebsd.org> From: Hiroki Sato Date: Mon, 9 Jul 2012 08:11:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238282 - in head: etc/rc.d usr.sbin/rarpd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 08:11:17 -0000 Author: hrs Date: Mon Jul 9 08:11:16 2012 New Revision: 238282 URL: http://svn.freebsd.org/changeset/base/238282 Log: - Add IFT_L2VLAN (vlan(4)) support. - Add -P option to support PID file. When -a is specified /var/run/rarpd.pid is used, and when an interface is specified /var/run/rarpd..pid is used by default. Modified: head/etc/rc.d/rarpd head/usr.sbin/rarpd/Makefile head/usr.sbin/rarpd/rarpd.8 head/usr.sbin/rarpd/rarpd.c Modified: head/etc/rc.d/rarpd ============================================================================== --- head/etc/rc.d/rarpd Mon Jul 9 07:37:10 2012 (r238281) +++ head/etc/rc.d/rarpd Mon Jul 9 08:11:16 2012 (r238282) @@ -13,8 +13,9 @@ name="rarpd" rcvar="rarpd_enable" command="/usr/sbin/${name}" -pidfile="/var/run/${name}.pid" required_files="/etc/ethers" load_rc_config $name +pidfile="${rarpd_pidfile:-/var/run/${name}.pid}" + run_rc_command "$1" Modified: head/usr.sbin/rarpd/Makefile ============================================================================== --- head/usr.sbin/rarpd/Makefile Mon Jul 9 07:37:10 2012 (r238281) +++ head/usr.sbin/rarpd/Makefile Mon Jul 9 08:11:16 2012 (r238282) @@ -4,6 +4,9 @@ PROG= rarpd MAN= rarpd.8 +DPADD= ${LIBUTIL} +LDADD= -lutil + WARNS?= 3 # This breaks with format strings returned by expand_syslog_m().. argh! #FORMAT_AUDIT?= 1 Modified: head/usr.sbin/rarpd/rarpd.8 ============================================================================== --- head/usr.sbin/rarpd/rarpd.8 Mon Jul 9 07:37:10 2012 (r238281) +++ head/usr.sbin/rarpd/rarpd.8 Mon Jul 9 08:11:16 2012 (r238282) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 16, 2001 +.Dd July 9, 2012 .Dt RARPD 8 .Os .Sh NAME @@ -27,9 +27,11 @@ .Fl a .Op Fl dfsv .Op Fl t Ar directory +.Op Fl P Ar pidfile .Nm .Op Fl dfsv .Op Fl t Ar directory +.Op Fl P Ar pidfile .Ar interface .Sh DESCRIPTION The @@ -92,6 +94,15 @@ instead of via .Xr syslog 3 . .It Fl f Run in the foreground. +.It Fl P +Specify the pathname of the PID file. +If not specified, +.Pa /var/run/rarpd.pid +or +.Pa /var/run/rarpd.ifname.pid +will be used depending on the +.Fl a +flag or the specified interface name. .It Fl s Supply a response to any RARP request for which an ethernet to IP address mapping exists; do not depend on the existence of @@ -115,6 +126,7 @@ Enable verbose syslogging. .It Pa /etc/ethers .It Pa /etc/hosts .It Pa /tftpboot +.It Pa /var/run/rarpd.pid .El .Sh SEE ALSO .Xr bpf 4 Modified: head/usr.sbin/rarpd/rarpd.c ============================================================================== --- head/usr.sbin/rarpd/rarpd.c Mon Jul 9 07:37:10 2012 (r238281) +++ head/usr.sbin/rarpd/rarpd.c Mon Jul 9 08:11:16 2012 (r238282) @@ -27,8 +27,8 @@ __FBSDID("$FreeBSD$"); /* * rarpd - Reverse ARP Daemon * - * Usage: rarpd -a [-dfsv] [-t directory] [hostname] - * rarpd [-dfsv] [-t directory] interface [hostname] + * Usage: rarpd -a [-dfsv] [-t directory] [-P pidfile] [hostname] + * rarpd [-dfsv] [-t directory] [-P pidfile] interface [hostname] * * 'hostname' is optional solely for backwards compatibility with Sun's rarpd. * Currently, the argument is ignored. @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include /* Cast a struct sockaddr to a struct sockaddr_in */ #define SATOSIN(sa) ((struct sockaddr_in *)(sa)) @@ -99,6 +100,11 @@ int sflag; /* ignore /tftpboot */ static u_char zero[6]; +static char pidfile_buf[PATH_MAX]; +static char *pidfile; +#define RARPD_PIDFILE "/var/run/rarpd.%s.pid" +static struct pidfh *pidfile_fh; + static int bpf_open(void); static in_addr_t choose_ipaddr(in_addr_t **, in_addr_t, in_addr_t); static char *eatoa(u_char *); @@ -140,7 +146,7 @@ main(int argc, char *argv[]) openlog(name, LOG_PID | LOG_CONS, LOG_DAEMON); opterr = 0; - while ((op = getopt(argc, argv, "adfst:v")) != -1) + while ((op = getopt(argc, argv, "adfsP:t:v")) != -1) switch (op) { case 'a': ++aflag; @@ -158,6 +164,12 @@ main(int argc, char *argv[]) ++sflag; break; + case 'P': + strncpy(pidfile_buf, optarg, sizeof(pidfile_buf) - 1); + pidfile_buf[sizeof(pidfile_buf) - 1] = '\0'; + pidfile = pidfile_buf; + break; + case 't': tftp_dir = optarg; break; @@ -181,10 +193,23 @@ main(int argc, char *argv[]) init(ifname); if (!fflag) { + if (pidfile == NULL && ifname != NULL && aflag == 0) { + snprintf(pidfile_buf, sizeof(pidfile_buf) - 1, + RARPD_PIDFILE, ifname); + pidfile_buf[sizeof(pidfile_buf) - 1] = '\0'; + pidfile = pidfile_buf; + } + /* If pidfile == NULL, /var/run/.pid will be used. */ + pidfile_fh = pidfile_open(pidfile, 0600, NULL); + if (pidfile_fh == NULL) + logmsg(LOG_ERR, "Cannot open or create pidfile: %s", + (pidfile == NULL) ? "/var/run/rarpd.pid" : pidfile); if (daemon(0,0)) { logmsg(LOG_ERR, "cannot fork"); + pidfile_remove(pidfile_fh); exit(1); } + pidfile_write(pidfile_fh); } rarp_loop(); return(0); @@ -234,6 +259,7 @@ init_one(struct ifaddrs *ifa, char *targ ii = (struct if_info *)malloc(sizeof(*ii)); if (ii == NULL) { logmsg(LOG_ERR, "malloc: %m"); + pidfile_remove(pidfile_fh); exit(1); } bzero(ii, sizeof(*ii)); @@ -251,6 +277,7 @@ init_one(struct ifaddrs *ifa, char *targ ii2 = (struct if_info *)malloc(sizeof(*ii2)); if (ii2 == NULL) { logmsg(LOG_ERR, "malloc: %m"); + pidfile_remove(pidfile_fh); exit(1); } memcpy(ii2, ii, sizeof(*ii2)); @@ -273,8 +300,11 @@ init_one(struct ifaddrs *ifa, char *targ case AF_LINK: ll = (struct sockaddr_dl *)ifa->ifa_addr; - if (ll->sdl_type == IFT_ETHER) + switch (ll->sdl_type) { + case IFT_ETHER: + case IFT_L2VLAN: bcopy(LLADDR(ll), ii->ii_eaddr, 6); + } break; } } @@ -293,6 +323,7 @@ init(char *target) error = getifaddrs(&ifhead); if (error) { logmsg(LOG_ERR, "getifaddrs: %m"); + pidfile_remove(pidfile_fh); exit(1); } /* @@ -339,8 +370,8 @@ static void usage(void) { (void)fprintf(stderr, "%s\n%s\n", - "usage: rarpd -a [-dfsv] [-t directory]", - " rarpd [-dfsv] [-t directory] interface"); + "usage: rarpd -a [-dfsv] [-t directory] [-P pidfile]", + " rarpd [-dfsv] [-t directory] [-P pidfile] interface"); exit(1); } @@ -361,6 +392,7 @@ bpf_open(void) if (fd == -1) { logmsg(LOG_ERR, "%s: %m", device); + pidfile_remove(pidfile_fh); exit(1); } return fd; @@ -399,12 +431,12 @@ rarp_open(char *device) immediate = 1; if (ioctl(fd, BIOCIMMEDIATE, &immediate) == -1) { logmsg(LOG_ERR, "BIOCIMMEDIATE: %m"); - exit(1); + goto rarp_open_err; } strlcpy(ifr.ifr_name, device, sizeof(ifr.ifr_name)); if (ioctl(fd, BIOCSETIF, (caddr_t)&ifr) == -1) { logmsg(LOG_ERR, "BIOCSETIF: %m"); - exit(1); + goto rarp_open_err; } /* * Check that the data link layer is an Ethernet; this code won't @@ -412,20 +444,24 @@ rarp_open(char *device) */ if (ioctl(fd, BIOCGDLT, (caddr_t)&dlt) == -1) { logmsg(LOG_ERR, "BIOCGDLT: %m"); - exit(1); + goto rarp_open_err; } if (dlt != DLT_EN10MB) { logmsg(LOG_ERR, "%s is not an ethernet", device); - exit(1); + goto rarp_open_err; } /* * Set filter program. */ if (ioctl(fd, BIOCSETF, (caddr_t)&filter) == -1) { logmsg(LOG_ERR, "BIOCSETF: %m"); - exit(1); + goto rarp_open_err; } return fd; + +rarp_open_err: + pidfile_remove(pidfile_fh); + exit(1); } /* @@ -480,16 +516,16 @@ rarp_loop(void) if (iflist == NULL) { logmsg(LOG_ERR, "no interfaces"); - exit(1); + goto rarpd_loop_err; } if (ioctl(iflist->ii_fd, BIOCGBLEN, (caddr_t)&bufsize) == -1) { logmsg(LOG_ERR, "BIOCGBLEN: %m"); - exit(1); + goto rarpd_loop_err; } buf = malloc(bufsize); if (buf == NULL) { logmsg(LOG_ERR, "malloc: %m"); - exit(1); + goto rarpd_loop_err; } while (1) { @@ -509,7 +545,7 @@ rarp_loop(void) if (errno == EINTR) continue; logmsg(LOG_ERR, "select: %m"); - exit(1); + goto rarpd_loop_err; } for (ii = iflist; ii != NULL; ii = ii->ii_next) { fd = ii->ii_fd; @@ -537,6 +573,11 @@ rarp_loop(void) } } #undef bhp + return; + +rarpd_loop_err: + pidfile_remove(pidfile_fh); + exit(1); } /* @@ -562,12 +603,12 @@ rarp_bootable(in_addr_t addr) else { if (chdir(tftp_dir) == -1) { logmsg(LOG_ERR, "chdir: %s: %m", tftp_dir); - exit(1); + goto rarp_bootable_err; } d = opendir("."); if (d == NULL) { logmsg(LOG_ERR, "opendir: %m"); - exit(1); + goto rarp_bootable_err; } dd = d; } @@ -575,6 +616,10 @@ rarp_bootable(in_addr_t addr) if (strncmp(dent->d_name, ipname, 8) == 0) return 1; return 0; + +rarp_bootable_err: + pidfile_remove(pidfile_fh); + exit(1); } /* @@ -678,6 +723,7 @@ update_arptab(u_char *ep, in_addr_t ipad r = socket(PF_ROUTE, SOCK_RAW, 0); if (r == -1) { logmsg(LOG_ERR, "raw route socket: %m"); + pidfile_remove(pidfile_fh); exit(1); } pid = getpid(); From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 08:32:41 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00B64106566B; Mon, 9 Jul 2012 08:32:41 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mail.ipfw.ru (unknown [IPv6:2a01:4f8:120:6141::2]) by mx1.freebsd.org (Postfix) with ESMTP id B240B8FC12; Mon, 9 Jul 2012 08:32:40 +0000 (UTC) Received: from v6.mpls.in ([2a02:978:2::5] helo=ws.su29.net) by mail.ipfw.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1So9RG-00080m-FK; Mon, 09 Jul 2012 12:35:26 +0400 Message-ID: <4FFA9723.5000301@FreeBSD.org> Date: Mon, 09 Jul 2012 12:32:35 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120121 Thunderbird/9.0 MIME-Version: 1.0 To: Hiroki Sato References: <201207090716.q697GJ7A001973@svn.freebsd.org> <4FFA894D.9050104@FreeBSD.org> <20120709.170813.339720376082380726.hrs@allbsd.org> In-Reply-To: <20120709.170813.339720376082380726.hrs@allbsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r238277 - in head: etc/defaults etc/rc.d sbin/ipfw share/man/man5 sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 08:32:41 -0000 On 09.07.2012 12:08, Hiroki Sato wrote: > "Alexander V. Chernikov" wrote > in<4FFA894D.9050104@FreeBSD.org>: > > I meant there was no strong objection. I am sorry for not commenting > your implementation, but at least for ipfw0 it is difficult to > decouple ifnet and bpf because the primary consumer is tcpdump(8), > which depends on NET_RT_IFLIST to find the target. Probably your tcpdump -i still works with interface name supplied. > solution can be used for usbdump(8). The reason why I committed the > patch now is there are reports that these pseudo interfaces made some > applications confused and/or caused some performance degradation on > 9.0R, and wanted to fix it in some way. Do you plan to take this to 9.1 ? > > I am still open for more sophisticated implementation and have no > objection to replace mine with it. Do you have an idea about > converting it with a loadable module? Personally I think that the right way is to add user<>kernel interface for requesting interface list since this is the most major stopper for doing BPF-only providers. However this should be discussed with rpaulo@ and delphij@ (so most probably this skips 9.1). And, as fallback solution we can probably add separate ipfwlog module which is quite easy but much less clean. > > -- Hiroki From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 08:38:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8F35106566C; Mon, 9 Jul 2012 08:37:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C368F8FC12; Mon, 9 Jul 2012 08:37:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q698bxCm005769; Mon, 9 Jul 2012 08:37:59 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q698bxRY005763; Mon, 9 Jul 2012 08:37:59 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207090837.q698bxRY005763@svn.freebsd.org> From: Adrian Chadd Date: Mon, 9 Jul 2012 08:37:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238284 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 08:38:00 -0000 Author: adrian Date: Mon Jul 9 08:37:59 2012 New Revision: 238284 URL: http://svn.freebsd.org/changeset/base/238284 Log: Further preparations for the RX EDMA support. Break out the DMA descriptor setup/teardown code into a method. The EDMA RX code doesn't allocate descriptors, just ath_buf entries. Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_misc.h head/sys/dev/ath/if_ath_rx.c head/sys/dev/ath/if_ath_rx.h head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Jul 9 08:27:04 2012 (r238283) +++ head/sys/dev/ath/if_ath.c Mon Jul 9 08:37:59 2012 (r238284) @@ -157,8 +157,6 @@ static void ath_update_promisc(struct if static void ath_updateslot(struct ifnet *); static void ath_bstuck_proc(void *, int); static void ath_reset_proc(void *, int); -static void ath_descdma_cleanup(struct ath_softc *sc, - struct ath_descdma *, ath_bufhead *); static int ath_desc_alloc(struct ath_softc *); static void ath_desc_free(struct ath_softc *); static struct ieee80211_node *ath_node_alloc(struct ieee80211vap *, @@ -239,15 +237,15 @@ static int ath_anicalinterval = 100; /* SYSCTL_INT(_hw_ath, OID_AUTO, anical, CTLFLAG_RW, &ath_anicalinterval, 0, "ANI calibration (msecs)"); -static int ath_rxbuf = ATH_RXBUF; /* # rx buffers to allocate */ +int ath_rxbuf = ATH_RXBUF; /* # rx buffers to allocate */ SYSCTL_INT(_hw_ath, OID_AUTO, rxbuf, CTLFLAG_RW, &ath_rxbuf, 0, "rx buffers allocated"); TUNABLE_INT("hw.ath.rxbuf", &ath_rxbuf); -static int ath_txbuf = ATH_TXBUF; /* # tx buffers to allocate */ +int ath_txbuf = ATH_TXBUF; /* # tx buffers to allocate */ SYSCTL_INT(_hw_ath, OID_AUTO, txbuf, CTLFLAG_RW, &ath_txbuf, 0, "tx buffers allocated"); TUNABLE_INT("hw.ath.txbuf", &ath_txbuf); -static int ath_txbuf_mgmt = ATH_MGMT_TXBUF; /* # mgmt tx buffers to allocate */ +int ath_txbuf_mgmt = ATH_MGMT_TXBUF; /* # mgmt tx buffers to allocate */ SYSCTL_INT(_hw_ath, OID_AUTO, txbuf_mgmt, CTLFLAG_RW, &ath_txbuf_mgmt, 0, "tx (mgmt) buffers allocated"); TUNABLE_INT("hw.ath.txbuf_mgmt", &ath_txbuf_mgmt); @@ -308,9 +306,10 @@ ath_attach(u_int16_t devid, struct ath_s * * This is required before the descriptors are allocated. */ - if (ath_hal_hasedma(sc->sc_ah)) + if (ath_hal_hasedma(sc->sc_ah)) { + sc->sc_isedma = 1; ath_recv_setup_edma(sc); - else + } else ath_recv_setup_legacy(sc); /* @@ -378,6 +377,14 @@ ath_attach(u_int16_t devid, struct ath_s if_printf(ifp, "failed to allocate descriptors: %d\n", error); goto bad; } + + error = ath_rxdma_setup(sc); + if (error != 0) { + if_printf(ifp, "failed to allocate RX descriptors: %d\n", + error); + goto bad; + } + callout_init_mtx(&sc->sc_cal_ch, &sc->sc_mtx, 0); callout_init_mtx(&sc->sc_wd_ch, &sc->sc_mtx, 0); @@ -854,6 +861,7 @@ ath_attach(u_int16_t devid, struct ath_s bad2: ath_tx_cleanup(sc); ath_desc_free(sc); + ath_rxdma_teardown(sc); bad: if (ah) ath_hal_detach(ah); @@ -896,6 +904,7 @@ ath_detach(struct ath_softc *sc) ath_dfs_detach(sc); ath_desc_free(sc); + ath_rxdma_teardown(sc); ath_tx_cleanup(sc); ath_hal_detach(sc->sc_ah); /* NB: sets chip in full sleep */ if_free(ifp); @@ -2594,6 +2603,13 @@ ath_mode_init(struct ath_softc *sc) /* configure operational mode */ ath_hal_setopmode(ah); + DPRINTF(sc, ATH_DEBUG_STATE | ATH_DEBUG_MODE, + "%s: ah=%p, ifp=%p, if_addr=%p\n", + __func__, + ah, + ifp, + (ifp == NULL) ? NULL : ifp->if_addr); + /* handle any link-level address change */ ath_hal_setmac(ah, IF_LLADDR(ifp)); @@ -2724,7 +2740,7 @@ ath_load_cb(void *arg, bus_dma_segment_t *paddr = segs->ds_addr; } -static int +int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd, ath_bufhead *head, const char *name, int nbuf, int ndesc) @@ -2863,7 +2879,7 @@ fail0: #undef ATH_DESC_4KB_BOUND_CHECK } -static void +void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd, ath_bufhead *head) { @@ -2904,15 +2920,9 @@ ath_desc_alloc(struct ath_softc *sc) { int error; - error = ath_descdma_setup(sc, &sc->sc_rxdma, &sc->sc_rxbuf, - "rx", ath_rxbuf, 1); - if (error != 0) - return error; - error = ath_descdma_setup(sc, &sc->sc_txdma, &sc->sc_txbuf, "tx", ath_txbuf, ATH_TXDESC); if (error != 0) { - ath_descdma_cleanup(sc, &sc->sc_rxdma, &sc->sc_rxbuf); return error; } sc->sc_txbuf_cnt = ath_txbuf; @@ -2920,7 +2930,6 @@ ath_desc_alloc(struct ath_softc *sc) error = ath_descdma_setup(sc, &sc->sc_txdma_mgmt, &sc->sc_txbuf_mgmt, "tx_mgmt", ath_txbuf_mgmt, ATH_TXDESC); if (error != 0) { - ath_descdma_cleanup(sc, &sc->sc_rxdma, &sc->sc_rxbuf); ath_descdma_cleanup(sc, &sc->sc_txdma, &sc->sc_txbuf); return error; } @@ -2933,7 +2942,6 @@ ath_desc_alloc(struct ath_softc *sc) error = ath_descdma_setup(sc, &sc->sc_bdma, &sc->sc_bbuf, "beacon", ATH_BCBUF, 1); if (error != 0) { - ath_descdma_cleanup(sc, &sc->sc_rxdma, &sc->sc_rxbuf); ath_descdma_cleanup(sc, &sc->sc_txdma, &sc->sc_txbuf); ath_descdma_cleanup(sc, &sc->sc_txdma_mgmt, &sc->sc_txbuf_mgmt); @@ -2950,8 +2958,6 @@ ath_desc_free(struct ath_softc *sc) ath_descdma_cleanup(sc, &sc->sc_bdma, &sc->sc_bbuf); if (sc->sc_txdma.dd_desc_len != 0) ath_descdma_cleanup(sc, &sc->sc_txdma, &sc->sc_txbuf); - if (sc->sc_rxdma.dd_desc_len != 0) - ath_descdma_cleanup(sc, &sc->sc_rxdma, &sc->sc_rxbuf); if (sc->sc_txdma_mgmt.dd_desc_len != 0) ath_descdma_cleanup(sc, &sc->sc_txdma_mgmt, &sc->sc_txbuf_mgmt); Modified: head/sys/dev/ath/if_ath_misc.h ============================================================================== --- head/sys/dev/ath/if_ath_misc.h Mon Jul 9 08:27:04 2012 (r238283) +++ head/sys/dev/ath/if_ath_misc.h Mon Jul 9 08:37:59 2012 (r238284) @@ -48,6 +48,10 @@ ((((u_int8_t *)(p))[0] ) | (((u_int8_t *)(p))[1] << 8) | \ (((u_int8_t *)(p))[2] << 16) | (((u_int8_t *)(p))[3] << 24))) +extern int ath_rxbuf; +extern int ath_txbuf; +extern int ath_txbuf_mgmt; + extern int ath_tx_findrix(const struct ath_softc *sc, uint8_t rate); extern struct ath_buf * ath_getbuf(struct ath_softc *sc, @@ -80,6 +84,11 @@ extern void ath_setdefantenna(struct ath extern void ath_setslottime(struct ath_softc *sc); +extern int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd, + ath_bufhead *head, const char *name, int nbuf, int ndesc); +extern void ath_descdma_cleanup(struct ath_softc *sc, + struct ath_descdma *dd, ath_bufhead *head); + /* * This is only here so that the RX proc function can call it. * It's very likely that the "start TX after RX" call should be Modified: head/sys/dev/ath/if_ath_rx.c ============================================================================== --- head/sys/dev/ath/if_ath_rx.c Mon Jul 9 08:27:04 2012 (r238283) +++ head/sys/dev/ath/if_ath_rx.c Mon Jul 9 08:37:59 2012 (r238284) @@ -1053,6 +1053,31 @@ ath_legacy_startrecv(struct ath_softc *s return 0; } +static int +ath_legacy_dma_rxsetup(struct ath_softc *sc) +{ + int error; + + device_printf(sc->sc_dev, "%s: called\n", __func__); + + error = ath_descdma_setup(sc, &sc->sc_rxdma, &sc->sc_rxbuf, + "rx", ath_rxbuf, 1); + if (error != 0) + return (error); + + return (0); +} + +static int +ath_legacy_dma_rxteardown(struct ath_softc *sc) +{ + + device_printf(sc->sc_dev, "%s: called\n", __func__); + + if (sc->sc_rxdma.dd_desc_len != 0) + ath_descdma_cleanup(sc, &sc->sc_rxdma, &sc->sc_rxbuf); + return (0); +} void ath_recv_setup_legacy(struct ath_softc *sc) @@ -1065,4 +1090,7 @@ ath_recv_setup_legacy(struct ath_softc * sc->sc_rx.recv_flush = ath_legacy_flushrecv; sc->sc_rx.recv_tasklet = ath_legacy_rx_tasklet; sc->sc_rx.recv_rxbuf_init = ath_legacy_rxbuf_init; + + sc->sc_rx.recv_setup = ath_legacy_dma_rxsetup; + sc->sc_rx.recv_teardown = ath_legacy_dma_rxteardown; } Modified: head/sys/dev/ath/if_ath_rx.h ============================================================================== --- head/sys/dev/ath/if_ath_rx.h Mon Jul 9 08:27:04 2012 (r238283) +++ head/sys/dev/ath/if_ath_rx.h Mon Jul 9 08:37:59 2012 (r238284) @@ -43,6 +43,10 @@ extern void ath_recv_mgmt(struct ieee802 (_sc)->sc_rx.recv_flush((_sc)) #define ath_rxbuf_init(_sc, _bf) \ (_sc)->sc_rx.recv_rxbuf_init((_sc), (_bf)) +#define ath_rxdma_setup(_sc) \ + (_sc)->sc_rx.recv_setup(_sc) +#define ath_rxdma_teardown(_sc) \ + (_sc)->sc_rx.recv_teardown(_sc) #if 0 extern int ath_rxbuf_init(struct ath_softc *sc, struct ath_buf *bf); Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Mon Jul 9 08:27:04 2012 (r238283) +++ head/sys/dev/ath/if_athvar.h Mon Jul 9 08:37:59 2012 (r238284) @@ -379,6 +379,20 @@ struct ath_rx_methods { void (*recv_tasklet)(void *arg, int npending); int (*recv_rxbuf_init)(struct ath_softc *sc, struct ath_buf *bf); + int (*recv_setup)(struct ath_softc *sc); + int (*recv_teardown)(struct ath_softc *sc); +}; + +/* + * Represent the current state of the RX FIFO. + */ +struct ath_rx_edma { + struct ath_buf **m_fifo; + int m_fifolen; + int m_fifo_head; + int m_fifo_tail; + int m_fifo_depth; + struct mbuf *m_rxpending; }; struct ath_softc { @@ -395,6 +409,12 @@ struct ath_softc { uint32_t sc_bssidmask; /* bssid mask */ struct ath_rx_methods sc_rx; + struct ath_rx_edma sc_rxedma[2]; /* HP/LP queues */ + int sc_rx_statuslen; + int sc_tx_desclen; + int sc_tx_statuslen; + int sc_tx_nmaps; /* Number of TX maps */ + int sc_edma_bufsize; void (*sc_node_cleanup)(struct ieee80211_node *); void (*sc_node_free)(struct ieee80211_node *); @@ -439,7 +459,8 @@ struct ath_softc { sc_setcca : 1,/* set/clr CCA with TDMA */ sc_resetcal : 1,/* reset cal state next trip */ sc_rxslink : 1,/* do self-linked final descriptor */ - sc_rxtsf32 : 1;/* RX dec TSF is 32 bits */ + sc_rxtsf32 : 1,/* RX dec TSF is 32 bits */ + sc_isedma : 1;/* supports EDMA */ uint32_t sc_eerd; /* regdomain from EEPROM */ uint32_t sc_eecc; /* country code from EEPROM */ /* rate tables */ From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 08:57:36 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0546D106566C; Mon, 9 Jul 2012 08:57:36 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 5B0868FC08; Mon, 9 Jul 2012 08:57:35 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q698vYMh085328; Mon, 9 Jul 2012 12:57:34 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q698vYgO085327; Mon, 9 Jul 2012 12:57:34 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 9 Jul 2012 12:57:34 +0400 From: Gleb Smirnoff To: "Bjoern A. Zeeb" Message-ID: <20120709085734.GM21957@FreeBSD.org> References: <201207040737.q647br5k096035@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r238092 - in head/sys: net netinet netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 08:57:36 -0000 On Sat, Jul 07, 2012 at 09:36:11PM +0000, Bjoern A. Zeeb wrote: B> > Author: glebius B> > Date: Wed Jul 4 07:37:53 2012 B> > New Revision: 238092 B> > URL: http://svn.freebsd.org/changeset/base/238092 B> > B> > Log: B> > When ip_output()/ip6_output() is supplied a struct route *ro argument, B> > it skips FLOWTABLE lookup. However, the non-NULL ro has dual meaning B> > here: it may be supplied to provide route, and it may be supplied to B> > store and return to caller the route that ip_output()/ip6_output() B> > finds. In the latter case skipping FLOWTABLE lookup is pessimisation. B> > B> > The difference between struct route filled by FLOWTABLE and filled B> > by rtalloc() family is that the former doesn't hold a reference on B> > its rtentry. Reference is hold by flow entry, and it is about to B> > be released in future. Thus, route filled by FLOWTABLE shouldn't B> > be passed to RTFREE() macro. B> > B> > - Introduce new flag for struct route/route_in6, that marks route B> > not holding a reference on rtentry. B> > - Introduce new macro RO_RTFREE() that cleans up a struct route B> > depending on its kind. B> > - All callers to ip_output()/ip6_output() that do supply non-NULL B> > but empty route should use RO_RTFREE() to free results of B> > lookup. B> > - ip_output()/ip6_output() now do FLOWTABLE lookup always when B> > ro->ro_rt == NULL. B> B> B> Just read the description but you realize that the proper fix is to B> make flowtable code a bit slower and do proper reference counting? B> B> Currently a cache flowtable entry might still be releases while a packet B> in being processed using it, right? I think we should connect Kip to the discussion. Flowtable is designed to be fast and lockless, and not refcounting rtentries per packet. Yes, it is theoretically racy. But my patch didn't bring in anything new to this pecularity of flowtable. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 09:24:46 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D32AF106564A; Mon, 9 Jul 2012 09:24:46 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDCFB8FC15; Mon, 9 Jul 2012 09:24:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q699OktK007791; Mon, 9 Jul 2012 09:24:46 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q699OkB0007789; Mon, 9 Jul 2012 09:24:46 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201207090924.q699OkB0007789@svn.freebsd.org> From: David Xu Date: Mon, 9 Jul 2012 09:24:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238287 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 09:24:47 -0000 Author: davidxu Date: Mon Jul 9 09:24:46 2012 New Revision: 238287 URL: http://svn.freebsd.org/changeset/base/238287 Log: If you have pressed CTRL+Z and a process is suspended, then you use gdb to attach to the process, it is surprising that the process is resumed without inputting any gdb commands, however ptrace manual said: The tracing process will see the newly-traced process stop and may then control it as if it had been traced all along. But the current code does not work in this way, unless traced process received a signal later, it will continue to run as a background task. To fix this problem, just send signal SIGSTOP to the traced process after we resumed it, this works like that you are attaching to a running process, it is not perfect but better than nothing. Modified: head/sys/kern/sys_process.c Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Mon Jul 9 09:11:07 2012 (r238286) +++ head/sys/kern/sys_process.c Mon Jul 9 09:24:46 2012 (r238287) @@ -635,7 +635,7 @@ kern_ptrace(struct thread *td, int req, struct iovec iov; struct uio uio; struct proc *curp, *p, *pp; - struct thread *td2 = NULL; + struct thread *td2 = NULL, *td3; struct ptrace_io_desc *piod = NULL; struct ptrace_lwpinfo *pl; int error, write, tmp, num; @@ -953,10 +953,8 @@ kern_ptrace(struct thread *td, int req, td2->td_xsig = data; if (req == PT_DETACH) { - struct thread *td3; - FOREACH_THREAD_IN_PROC(p, td3) { + FOREACH_THREAD_IN_PROC(p, td3) td3->td_dbgflags &= ~TDB_SUSPEND; - } } /* * unsuspend all threads, to not let a thread run, @@ -967,6 +965,8 @@ kern_ptrace(struct thread *td, int req, p->p_flag &= ~(P_STOPPED_TRACE|P_STOPPED_SIG|P_WAITED); thread_unsuspend(p); PROC_SUNLOCK(p); + if (req == PT_ATTACH) + kern_psignal(p, data); } else { if (data) kern_psignal(p, data); From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 09:38:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D6C31065672; Mon, 9 Jul 2012 09:38:54 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECC578FC08; Mon, 9 Jul 2012 09:38:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q699crC5008393; Mon, 9 Jul 2012 09:38:53 GMT (envelope-from takawata@svn.freebsd.org) Received: (from takawata@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q699cra0008391; Mon, 9 Jul 2012 09:38:53 GMT (envelope-from takawata@svn.freebsd.org) Message-Id: <201207090938.q699cra0008391@svn.freebsd.org> From: Takanori Watanabe Date: Mon, 9 Jul 2012 09:38:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238288 - head/usr.sbin/acpi/acpidump X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 09:38:54 -0000 Author: takawata Date: Mon Jul 9 09:38:53 2012 New Revision: 238288 URL: http://svn.freebsd.org/changeset/base/238288 Log: Add range and table revision checking to avoid abend. PR:bin/169707 Submitted by:Dan Lukes MFC after:3 days. Modified: head/usr.sbin/acpi/acpidump/acpi.c Modified: head/usr.sbin/acpi/acpidump/acpi.c ============================================================================== --- head/usr.sbin/acpi/acpidump/acpi.c Mon Jul 9 09:24:46 2012 (r238287) +++ head/usr.sbin/acpi/acpidump/acpi.c Mon Jul 9 09:38:53 2012 (r238288) @@ -654,16 +654,24 @@ acpi_handle_tcpa(ACPI_TABLE_HEADER *sdp) printf(END_COMMENT); return; } + if(sdp->Revision == 1){ + printf("\tOLD TCPA spec log found. Dumping not supported.\n"); + printf(END_COMMENT); + return; + } vaddr = (unsigned char *)acpi_map_physical(paddr, len); vend = vaddr + len; while (vaddr != NULL) { - if (vaddr + sizeof(struct TCPAevent) >= vend) + if ((vaddr + sizeof(struct TCPAevent) >= vend)|| + (vaddr + sizeof(struct TCPAevent) < vaddr)) break; event = (struct TCPAevent *)(void *)vaddr; if (vaddr + event->event_size >= vend) break; + if (vaddr + event->event_size < vaddr) + break; if (event->event_type == 0 && event->event_size == 0) break; #if 0 From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 10:17:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 32EBD106566C; Mon, 9 Jul 2012 10:17:07 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D99B8FC1A; Mon, 9 Jul 2012 10:17:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q69AH6lH010032; Mon, 9 Jul 2012 10:17:06 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q69AH61P010030; Mon, 9 Jul 2012 10:17:06 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201207091017.q69AH61P010030@svn.freebsd.org> From: "Jayachandran C." Date: Mon, 9 Jul 2012 10:17:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238289 - head/sys/mips/nlm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 10:17:07 -0000 Author: jchandra Date: Mon Jul 9 10:17:06 2012 New Revision: 238289 URL: http://svn.freebsd.org/changeset/base/238289 Log: Fix PCIe hardware swap configuration for Netlogic XLP The last 12 bits of the limit registers have to be set to 1. These bits are not significant in bridge BARs and are 0 on read, but the bits are valid in the swap limit register and needs to be set. Modified: head/sys/mips/nlm/xlp_pci.c Modified: head/sys/mips/nlm/xlp_pci.c ============================================================================== --- head/sys/mips/nlm/xlp_pci.c Mon Jul 9 09:38:53 2012 (r238288) +++ head/sys/mips/nlm/xlp_pci.c Mon Jul 9 10:17:06 2012 (r238289) @@ -507,13 +507,13 @@ xlp_pcib_hardware_swap_enable(int node, nlm_write_pci_reg(linkpcibase, PCIE_BYTE_SWAP_MEM_BASE, bar); bar = nlm_read_bridge_reg(bbase, BRIDGE_PCIEMEM_LIMIT0 + link); - nlm_write_pci_reg(linkpcibase, PCIE_BYTE_SWAP_MEM_LIM, bar); + nlm_write_pci_reg(linkpcibase, PCIE_BYTE_SWAP_MEM_LIM, bar | 0xFFF); bar = nlm_read_bridge_reg(bbase, BRIDGE_PCIEIO_BASE0 + link); nlm_write_pci_reg(linkpcibase, PCIE_BYTE_SWAP_IO_BASE, bar); bar = nlm_read_bridge_reg(bbase, BRIDGE_PCIEIO_LIMIT0 + link); - nlm_write_pci_reg(linkpcibase, PCIE_BYTE_SWAP_IO_LIM, bar); + nlm_write_pci_reg(linkpcibase, PCIE_BYTE_SWAP_IO_LIM, bar | 0xFFF); } static int From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 10:24:46 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F1732106564A; Mon, 9 Jul 2012 10:24:45 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C35358FC14; Mon, 9 Jul 2012 10:24:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q69AOjl8010384; Mon, 9 Jul 2012 10:24:45 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q69AOjmc010381; Mon, 9 Jul 2012 10:24:45 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201207091024.q69AOjmc010381@svn.freebsd.org> From: "Jayachandran C." Date: Mon, 9 Jul 2012 10:24:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238290 - head/sys/mips/nlm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 10:24:46 -0000 Author: jchandra Date: Mon Jul 9 10:24:45 2012 New Revision: 238290 URL: http://svn.freebsd.org/changeset/base/238290 Log: Identify Netlogic XLP 8xx B1 chip revisions Add functions to check for 8xx B0 and 3xx Ax revisions which will be used in network block initialization. Modified: head/sys/mips/nlm/board.c head/sys/mips/nlm/xlp.h Modified: head/sys/mips/nlm/board.c ============================================================================== --- head/sys/mips/nlm/board.c Mon Jul 9 10:17:06 2012 (r238289) +++ head/sys/mips/nlm/board.c Mon Jul 9 10:24:45 2012 (r238290) @@ -362,6 +362,8 @@ nlm_print_processor_info(void) revstr = "A2"; break; case 3: revstr = "B0"; break; + case 4: + revstr = "B1"; break; default: revstr = "??"; break; } Modified: head/sys/mips/nlm/xlp.h ============================================================================== --- head/sys/mips/nlm/xlp.h Mon Jul 9 10:17:06 2012 (r238289) +++ head/sys/mips/nlm/xlp.h Mon Jul 9 10:24:45 2012 (r238290) @@ -57,6 +57,7 @@ #define XLP_REVISION_A1 0x01 #define XLP_REVISION_A2 0x02 #define XLP_REVISION_B0 0x03 +#define XLP_REVISION_B1 0x04 #ifndef LOCORE /* @@ -87,6 +88,16 @@ static __inline int nlm_is_xlp3xx(void) return (nlm_processor_id() == CHIP_PROCESSOR_ID_XLP_3XX); } +static __inline int nlm_is_xlp3xx_ax(void) +{ + uint32_t procid = mips_rd_prid(); + int prid = (procid >> 8) & 0xff; + int rev = procid & 0xff; + + return (prid == CHIP_PROCESSOR_ID_XLP_3XX && + rev < XLP_REVISION_B0); +} + static __inline int nlm_is_xlp4xx(void) { int prid = nlm_processor_id(); @@ -116,5 +127,17 @@ static __inline int nlm_is_xlp8xx_ax(voi (rev < XLP_REVISION_B0)); } +static __inline int nlm_is_xlp8xx_b0(void) +{ + uint32_t procid = mips_rd_prid(); + int prid = (procid >> 8) & 0xff; + int rev = procid & 0xff; + + return ((prid == CHIP_PROCESSOR_ID_XLP_8XX || + prid == CHIP_PROCESSOR_ID_XLP_432 || + prid == CHIP_PROCESSOR_ID_XLP_416) && + rev == XLP_REVISION_B0); +} + #endif /* LOCORE */ #endif /* __NLM_XLP_H__ */ From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 10:39:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D046710657FF; Mon, 9 Jul 2012 10:39:57 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B0A888FC16; Mon, 9 Jul 2012 10:39:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q69Advef011523; Mon, 9 Jul 2012 10:39:57 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q69AdvJn011520; Mon, 9 Jul 2012 10:39:57 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201207091039.q69AdvJn011520@svn.freebsd.org> From: "Jayachandran C." Date: Mon, 9 Jul 2012 10:39:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238293 - in head/sys/mips/nlm: dev/net hal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 10:39:57 -0000 Author: jchandra Date: Mon Jul 9 10:39:57 2012 New Revision: 238293 URL: http://svn.freebsd.org/changeset/base/238293 Log: Support Netlogic XLP 8xx B1 revisions in xlpge. Updates to the MDIO access code for the new revision of the XLP chip. Modified: head/sys/mips/nlm/dev/net/mdio.c head/sys/mips/nlm/hal/mdio.h Modified: head/sys/mips/nlm/dev/net/mdio.c ============================================================================== --- head/sys/mips/nlm/dev/net/mdio.c Mon Jul 9 10:36:43 2012 (r238292) +++ head/sys/mips/nlm/dev/net/mdio.c Mon Jul 9 10:39:57 2012 (r238293) @@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + /* Internal MDIO READ/WRITE Routines */ int nlm_int_gmac_mdio_read(uint64_t nae_base, int bus, int block, @@ -176,12 +178,7 @@ nlm_gmac_mdio_read(uint64_t nae_base, in int intf_type, int phyaddr, int regidx) { uint32_t mdio_ld_cmd; - uint32_t val; - - val = EXT_G_MDIO_CMD_SP | - (phyaddr << EXT_G_MDIO_PHYADDR_POS) | - (regidx << EXT_G_MDIO_REGADDR_POS) | - EXT_G_MDIO_DIV; + uint32_t ctrlval; mdio_ld_cmd = nlm_read_nae_reg(nae_base, NAE_REG(block, intf_type, (EXT_G0_MDIO_CTRL + bus * 4))); @@ -195,14 +192,22 @@ nlm_gmac_mdio_read(uint64_t nae_base, in EXT_G_MDIO_STAT_MBSY); } - nlm_write_nae_reg(nae_base, + ctrlval = EXT_G_MDIO_CMD_SP | + (phyaddr << EXT_G_MDIO_PHYADDR_POS) | + (regidx << EXT_G_MDIO_REGADDR_POS); + if (nlm_is_xlp8xx_ax() || nlm_is_xlp8xx_b0() || nlm_is_xlp3xx_ax()) + ctrlval |= EXT_G_MDIO_DIV; + else + ctrlval |= EXT_G_MDIO_DIV_WITH_HW_DIV64; + + nlm_write_nae_reg(nae_base, NAE_REG(block, intf_type, (EXT_G0_MDIO_CTRL+bus*4)), - val); + ctrlval); nlm_write_nae_reg(nae_base, NAE_REG(block, intf_type, (EXT_G0_MDIO_CTRL+bus*4)), - val | (1<<18)); - + ctrlval | (1<<18)); + DELAY(1000); /* poll master busy bit until it is not busy */ while(nlm_read_nae_reg(nae_base, NAE_REG(block, intf_type, (EXT_G0_MDIO_RD_STAT + bus * 4))) & @@ -210,7 +215,7 @@ nlm_gmac_mdio_read(uint64_t nae_base, in nlm_write_nae_reg(nae_base, NAE_REG(block, intf_type, (EXT_G0_MDIO_CTRL+bus*4)), - val); + ctrlval); /* Read the data back */ return nlm_read_nae_reg(nae_base, @@ -236,11 +241,6 @@ nlm_gmac_mdio_write(uint64_t nae_base, i uint32_t mdio_ld_cmd; uint32_t ctrlval; - ctrlval = EXT_G_MDIO_CMD_SP | - (phyaddr << EXT_G_MDIO_PHYADDR_POS) | - (regidx << EXT_G_MDIO_REGADDR_POS) | - EXT_G_MDIO_DIV; - mdio_ld_cmd = nlm_read_nae_reg(nae_base, NAE_REG(block, intf_type, (EXT_G0_MDIO_CTRL + bus * 4))); if (mdio_ld_cmd & EXT_G_MDIO_CMD_LCD) { @@ -258,6 +258,14 @@ nlm_gmac_mdio_write(uint64_t nae_base, i NAE_REG(block, intf_type, (EXT_G0_MDIO_CTRL_DATA+bus*4)), val); + ctrlval = EXT_G_MDIO_CMD_SP | + (phyaddr << EXT_G_MDIO_PHYADDR_POS) | + (regidx << EXT_G_MDIO_REGADDR_POS); + if (nlm_is_xlp8xx_ax() || nlm_is_xlp8xx_b0() || nlm_is_xlp3xx_ax()) + ctrlval |= EXT_G_MDIO_DIV; + else + ctrlval |= EXT_G_MDIO_DIV_WITH_HW_DIV64; + nlm_write_nae_reg(nae_base, NAE_REG(block, intf_type, (EXT_G0_MDIO_CTRL+bus*4)), ctrlval); @@ -265,6 +273,7 @@ nlm_gmac_mdio_write(uint64_t nae_base, i nlm_write_nae_reg(nae_base, NAE_REG(block, intf_type, (EXT_G0_MDIO_CTRL+bus*4)), ctrlval | EXT_G_MDIO_CMD_LCD); + DELAY(1000); /* poll master busy bit until it is not busy */ while(nlm_read_nae_reg(nae_base, @@ -291,11 +300,17 @@ int nlm_gmac_mdio_reset(uint64_t nae_base, int bus, int block, int intf_type) { + uint32_t ctrlval; + + if (nlm_is_xlp8xx_ax() || nlm_is_xlp8xx_b0() || nlm_is_xlp3xx_ax()) + ctrlval = EXT_G_MDIO_DIV; + else + ctrlval = EXT_G_MDIO_DIV_WITH_HW_DIV64; + nlm_write_nae_reg(nae_base, - NAE_REG(block, intf_type, (EXT_G0_MDIO_CTRL+bus*4)), - EXT_G_MDIO_MMRST | EXT_G_MDIO_DIV); + NAE_REG(block, intf_type, (EXT_G0_MDIO_CTRL + bus * 4)), + EXT_G_MDIO_MMRST | ctrlval); nlm_write_nae_reg(nae_base, - NAE_REG(block, intf_type, (EXT_G0_MDIO_CTRL+bus*4)), - EXT_G_MDIO_DIV); + NAE_REG(block, intf_type, (EXT_G0_MDIO_CTRL + bus * 4)), ctrlval); return (0); } Modified: head/sys/mips/nlm/hal/mdio.h ============================================================================== --- head/sys/mips/nlm/hal/mdio.h Mon Jul 9 10:36:43 2012 (r238292) +++ head/sys/mips/nlm/hal/mdio.h Mon Jul 9 10:39:57 2012 (r238293) @@ -81,6 +81,7 @@ #define EXT_G_MDIO_CMD_SC 0x00080000 #define EXT_G_MDIO_MMRST 0x00100000 #define EXT_G_MDIO_DIV 0x0000001E +#define EXT_G_MDIO_DIV_WITH_HW_DIV64 0x00000010 #define EXT_G_MDIO_RD_STAT_MASK 0x0000FFFF #define EXT_G_MDIO_STAT_LFV 0x00010000 From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 10:59:40 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85C85106564A; Mon, 9 Jul 2012 10:59:40 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 718848FC24; Mon, 9 Jul 2012 10:59:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q69AxeVJ013985; Mon, 9 Jul 2012 10:59:40 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q69AxeX2013983; Mon, 9 Jul 2012 10:59:40 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207091059.q69AxeX2013983@svn.freebsd.org> From: Michael Tuexen Date: Mon, 9 Jul 2012 10:59:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238294 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 10:59:40 -0000 Author: tuexen Date: Mon Jul 9 10:59:39 2012 New Revision: 238294 URL: http://svn.freebsd.org/changeset/base/238294 Log: Fix a bug introduced in r237715. MFC after:i 3 days. Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Mon Jul 9 10:39:57 2012 (r238293) +++ head/sys/netinet/sctp_output.c Mon Jul 9 10:59:39 2012 (r238294) @@ -5520,6 +5520,7 @@ do_a_abort: case AF_INET6: { stc.addr_type = SCTP_IPV6_ADDRESS; + memcpy(&stc.address, &src6->sin6_addr, sizeof(struct in6_addr)); stc.scope_id = in6_getscope(&src6->sin6_addr); if (sctp_is_address_on_local_host(src, vrf_id)) { stc.loopback_scope = 1; From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 14:16:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5600C1065673; Mon, 9 Jul 2012 14:16:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4255F8FC1D; Mon, 9 Jul 2012 14:16:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q69EGoP7022710; Mon, 9 Jul 2012 14:16:50 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q69EGopt022708; Mon, 9 Jul 2012 14:16:50 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201207091416.q69EGopt022708@svn.freebsd.org> From: Ed Maste Date: Mon, 9 Jul 2012 14:16:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238298 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 14:16:50 -0000 Author: emaste Date: Mon Jul 9 14:16:49 2012 New Revision: 238298 URL: http://svn.freebsd.org/changeset/base/238298 Log: Restore error handling lost in r191603 This was missed in the change from IFQ_ENQUEUE to if_transmit. Sponsored by: ADARA Networks Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Mon Jul 9 13:56:59 2012 (r238297) +++ head/sys/net/if_bridge.c Mon Jul 9 14:16:49 2012 (r238298) @@ -1812,7 +1812,7 @@ bridge_enqueue(struct bridge_softc *sc, } if (err == 0) - dst_ifp->if_transmit(dst_ifp, m); + err = dst_ifp->if_transmit(dst_ifp, m); } if (err == 0) { From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 15:06:18 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A28E0106566C; Mon, 9 Jul 2012 15:06:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 740438FC0C; Mon, 9 Jul 2012 15:06:18 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id C9CC2B9AC; Mon, 9 Jul 2012 11:06:17 -0400 (EDT) From: John Baldwin To: Marcel Moolenaar Date: Mon, 9 Jul 2012 09:45:52 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201207061557.q66Fv45N069464@svn.freebsd.org> <20120707083535.GR2338@deviant.kiev.zoral.com.ua> <2B1DDEF4-A048-45BD-9A7A-8CB148282475@xcllnt.net> In-Reply-To: <2B1DDEF4-A048-45BD-9A7A-8CB148282475@xcllnt.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201207090945.52985.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 09 Jul 2012 11:06:17 -0400 (EDT) Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org Subject: Re: svn commit: r238172 - head/sys/dev/agp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 15:06:18 -0000 On Saturday, July 07, 2012 10:44:14 am Marcel Moolenaar wrote: > The commit log states the motivation: developers tend to copy-n-paste without > truly understanding the subtle differences and may use the Maxmem use in > agp_i810.c as the wrong precedence. Secondly, also mentioned in the commit > log, is the use of realmem in agp.c and then Maxmem in agp_i810.c which is > likely to be confusing. So the change from Maxmem to realmem in agp_i810.c > prioritizes the avoidance of confusion over pedantic correctness, which we > all know isn't achievable anyway. Since agp_i810.c is only for amd64, i386 > and pc98, also stated in the commit log, and all of those have dense phys. > memory, the discrepancy is still within the margin of error. 1GB is a rather large margin IMO. If agp_i810.c actually cares about the maximum PA and not the size of RAM, then it should use the correct variable for this purpose. The copy-n-paste thing works both ways. You don't want someone to use realmem instead of Maxmem elsewhere because they copy-n-paste the wrong thing from agp_i810.c. I think the solution is to fix things to use what the actually need. In the case of agp_i810.c it sounds like that is Maxmem. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 15:44:35 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC787106566C; Mon, 9 Jul 2012 15:44:35 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9797C8FC18; Mon, 9 Jul 2012 15:44:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q69FiZ9h026396; Mon, 9 Jul 2012 15:44:35 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q69FiZMY026394; Mon, 9 Jul 2012 15:44:35 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201207091544.q69FiZMY026394@svn.freebsd.org> From: Joel Dahl Date: Mon, 9 Jul 2012 15:44:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238300 - head/usr.sbin/rarpd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 15:44:35 -0000 Author: joel (doc committer) Date: Mon Jul 9 15:44:35 2012 New Revision: 238300 URL: http://svn.freebsd.org/changeset/base/238300 Log: Remove end of line whitespace. Modified: head/usr.sbin/rarpd/rarpd.8 Modified: head/usr.sbin/rarpd/rarpd.8 ============================================================================== --- head/usr.sbin/rarpd/rarpd.8 Mon Jul 9 15:31:05 2012 (r238299) +++ head/usr.sbin/rarpd/rarpd.8 Mon Jul 9 15:44:35 2012 (r238300) @@ -96,7 +96,7 @@ instead of via Run in the foreground. .It Fl P Specify the pathname of the PID file. -If not specified, +If not specified, .Pa /var/run/rarpd.pid or .Pa /var/run/rarpd.ifname.pid From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 16:24:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0C40C106564A; Mon, 9 Jul 2012 16:24: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 EB8458FC08; Mon, 9 Jul 2012 16:23:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q69GNxh5028129; Mon, 9 Jul 2012 16:23:59 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q69GNxhf028127; Mon, 9 Jul 2012 16:23:59 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201207091623.q69GNxhf028127@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 9 Jul 2012 16:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238301 - head/sys/dev/agp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 16:24:00 -0000 Author: marcel Date: Mon Jul 9 16:23:59 2012 New Revision: 238301 URL: http://svn.freebsd.org/changeset/base/238301 Log: Revert revision 238172 of agp_i810.c. Correctness is considered more important than avoiding confusion. Feedback from: kib, jhb Modified: head/sys/dev/agp/agp_i810.c Modified: head/sys/dev/agp/agp_i810.c ============================================================================== --- head/sys/dev/agp/agp_i810.c Mon Jul 9 15:44:35 2012 (r238300) +++ head/sys/dev/agp/agp_i810.c Mon Jul 9 16:23:59 2012 (r238301) @@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include MALLOC_DECLARE(M_AGP); @@ -1438,7 +1439,7 @@ agp_i810_attach(device_t dev) if (error) return (error); - if (ptoa((vm_paddr_t)realmem) > + if (ptoa((vm_paddr_t)Maxmem) > (1ULL << sc->match->driver->busdma_addr_mask_sz) - 1) { device_printf(dev, "agp_i810 does not support physical " "memory above %ju.\n", (uintmax_t)(1ULL << From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 19:50:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9C509106566B; Mon, 9 Jul 2012 19:50:58 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 4A3328FC0A; Mon, 9 Jul 2012 19:50:58 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id C4368DCC; Mon, 9 Jul 2012 21:50:55 +0200 (CEST) Date: Mon, 9 Jul 2012 21:48:45 +0200 From: Pawel Jakub Dawidek To: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= Message-ID: <20120709194844.GD4003@garage.freebsd.pl> References: <201207072013.q67KDfHN082943@svn.freebsd.org> <20120707215424.GE1437@garage.freebsd.pl> <280C8AEE-F7E8-4AAE-87BF-E59D0249B74F@FreeBSD.org> <20120708213846.GF1437@garage.freebsd.pl> <739062A0-4339-46A3-AF8E-193BC57758BA@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="llIrKcgUOe3dCx0c" Content-Disposition: inline In-Reply-To: <739062A0-4339-46A3-AF8E-193BC57758BA@FreeBSD.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238213 - head/sys/geom X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 19:50:58 -0000 --llIrKcgUOe3dCx0c Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 09, 2012 at 09:19:29AM +0200, Edward Tomasz Napiera=C5=82a wrot= e: > Look, I really appreciate you're looking at this just six months after > explicitly refusing to talk to me about the design, but it would be great > if it was a _technical_ discussion. As you know I'm not going to be neither nice nor helpful to you. Just wanted to point out your changes are wrong. That's all I can do. This is my last e-mail on the subject. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --llIrKcgUOe3dCx0c Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/7NZwACgkQForvXbEpPzRfcwCg6w/hqPlck/nXkFOun8LrznQg EO8AoKt1M/uV25KdY/CNhN0Lx1flXnY4 =zGvQ -----END PGP SIGNATURE----- --llIrKcgUOe3dCx0c-- From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 20:11:33 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F0EB1065673; Mon, 9 Jul 2012 20:11:32 +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 B4CE58FC18; Mon, 9 Jul 2012 20:11:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q69KBWjA037685; Mon, 9 Jul 2012 20:11:32 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q69KBW5d037683; Mon, 9 Jul 2012 20:11:32 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201207092011.q69KBW5d037683@svn.freebsd.org> From: Hiroki Sato Date: Mon, 9 Jul 2012 20:11:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238308 - head/etc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 20:11:33 -0000 Author: hrs Date: Mon Jul 9 20:11:32 2012 New Revision: 238308 URL: http://svn.freebsd.org/changeset/base/238308 Log: Fix a missing ";". Modified: head/etc/devd.conf Modified: head/etc/devd.conf ============================================================================== --- head/etc/devd.conf Mon Jul 9 19:27:48 2012 (r238307) +++ head/etc/devd.conf Mon Jul 9 20:11:32 2012 (r238308) @@ -320,7 +320,7 @@ notify 10 { notify 0 { match "system" "RCTL"; match "rule" "user:70:swap:.*"; - action "/usr/local/etc/rc.d/postgresql restart" + action "/usr/local/etc/rc.d/postgresql restart"; }; */ From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 20:30:31 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00982106566B; Mon, 9 Jul 2012 20:30:31 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) by mx1.freebsd.org (Postfix) with ESMTP id 4926E8FC08; Mon, 9 Jul 2012 20:30:30 +0000 (UTC) Received: from alph.allbsd.org (p2214-ipbf2707funabasi.chiba.ocn.ne.jp [123.225.119.214]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id q69KUBMe014546 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 10 Jul 2012 05:30:21 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) (authenticated bits=0) by alph.allbsd.org (8.14.5/8.14.5) with ESMTP id q69KUAf4075857; Tue, 10 Jul 2012 05:30:11 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Tue, 10 Jul 2012 05:30:02 +0900 (JST) Message-Id: <20120710.053002.914215153752773154.hrs@allbsd.org> To: melifaro@FreeBSD.org, net@FreeBSD.org From: Hiroki Sato In-Reply-To: <4FFA9723.5000301@FreeBSD.org> References: <4FFA894D.9050104@FreeBSD.org> <20120709.170813.339720376082380726.hrs@allbsd.org> <4FFA9723.5000301@FreeBSD.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 23.4 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Tue_Jul_10_05_30_02_2012_869)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Tue, 10 Jul 2012 05:30:22 +0900 (JST) X-Spam-Status: No, score=-96.8 required=13.0 tests=CONTENT_TYPE_PRESENT, ONLY1HOPDIRECT, RCVD_IN_RP_RNBL, SAMEHELOBY2HOP, USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r238277 - in head: etc/defaults etc/rc.d sbin/ipfw share/man/man5 sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: net@FreeBSD.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 20:30:31 -0000 ----Security_Multipart(Tue_Jul_10_05_30_02_2012_869)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit "Alexander V. Chernikov" wrote in <4FFA9723.5000301@FreeBSD.org>: me> On 09.07.2012 12:08, Hiroki Sato wrote: me> > "Alexander V. Chernikov" wrote me> > in<4FFA894D.9050104@FreeBSD.org>: me> > me> > I meant there was no strong objection. I am sorry for not commenting me> > your implementation, but at least for ipfw0 it is difficult to me> > decouple ifnet and bpf because the primary consumer is tcpdump(8), me> > which depends on NET_RT_IFLIST to find the target. Probably your me> tcpdump -i still works with interface name supplied. me> > solution can be used for usbdump(8). The reason why I committed the me> > patch now is there are reports that these pseudo interfaces made some me> > applications confused and/or caused some performance degradation on me> > 9.0R, and wanted to fix it in some way. me> Do you plan to take this to 9.1 ? Originally I thought of it but I think it was too late. It should be polished in -CURRENT for a while also in terms of how to hide the interfaces. me> > I am still open for more sophisticated implementation and have no me> > objection to replace mine with it. Do you have an idea about me> > converting it with a loadable module? me> Personally I think that the right way is to add user<>kernel interface me> for requesting interface list since this is the most major stopper for me> doing BPF-only providers. However this should be discussed with me> rpaulo@ and delphij@ (so most probably this skips 9.1). Adding a sysctl to list all of the struct bpf_if including ones with a fake ifp? Hm, my goal was just to hide usbusN and ipfw0 *by default* but there was no problem with having ipfw0 with an ifnet. I thought having ifnet was tolerable if its consumer was tcpdump-like one because there are a lot of packet dump utilities which obtain interface names from the system's network interface list. Hiding the interface is rather confusing from user's perspective. I do not stick to the committed code and have no objection about adding a new API if it is useful. Well, please let me check if I understand your idea correctly. Given that we add a new API to enumerate the interfaces including bpf-only providers with fake ifnets, which providers/utilities should be converted to use it? IMO usbusN would be a reasonable target but others still need a real ifnet. In my understanding, the advantage of using a fake ifnet is just to prevent it from appearing as an interface. Is it correct? me> And, as fallback solution we can probably add separate ipfwlog module me> which is quite easy but much less clean. I think whether having it as a kernel module or not is orthogonal to hiding the interface. If we support multiple instances of the pseudo interface (typical in a system with vnet), cloning capability is needed in any way. -- Hiroki ----Security_Multipart(Tue_Jul_10_05_30_02_2012_869)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEABECAAYFAk/7P0oACgkQTyzT2CeTzy3nFgCgi4rHRHX7M2iRk+1Fex+xjvuY uzQAnRZ5OgQKnlB+CkF2fnZOYae/SuVF =oK8F -----END PGP SIGNATURE----- ----Security_Multipart(Tue_Jul_10_05_30_02_2012_869)---- From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 20:38:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 330B8106564A; Mon, 9 Jul 2012 20:38:19 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04B7F8FC0A; Mon, 9 Jul 2012 20:38:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q69KcINp038789; Mon, 9 Jul 2012 20:38:18 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q69KcIi1038787; Mon, 9 Jul 2012 20:38:18 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201207092038.q69KcIi1038787@svn.freebsd.org> From: Mikolaj Golub Date: Mon, 9 Jul 2012 20:38:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238309 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 20:38:19 -0000 Author: trociny Date: Mon Jul 9 20:38:18 2012 New Revision: 238309 URL: http://svn.freebsd.org/changeset/base/238309 Log: In epair_clone_destroy(), when destroying the second half, we have to switch to its vnet before calling ether_ifdetach(). Otherwise if the second half resides in a different vnet, if_detach() silently fails leaving a stale pointer in V_ifnet list, and the system crashes trying to access this pointer later. Another solution could be not to allow to destroy epair unless both ends are in the home vnet. Discussed with: bz Tested by: delphij Modified: head/sys/net/if_epair.c Modified: head/sys/net/if_epair.c ============================================================================== --- head/sys/net/if_epair.c Mon Jul 9 20:11:32 2012 (r238308) +++ head/sys/net/if_epair.c Mon Jul 9 20:38:18 2012 (r238309) @@ -904,39 +904,41 @@ epair_clone_destroy(struct if_clone *ifc if_link_state_change(oifp, LINK_STATE_DOWN); ifp->if_drv_flags &= ~IFF_DRV_RUNNING; oifp->if_drv_flags &= ~IFF_DRV_RUNNING; + + /* + * Get rid of our second half. As the other of the two + * interfaces may reside in a different vnet, we need to + * switch before freeing them. + */ + CURVNET_SET_QUIET(oifp->if_vnet); ether_ifdetach(oifp); - ether_ifdetach(ifp); /* * Wait for all packets to be dispatched to if_input. - * The numbers can only go down as the interfaces are + * The numbers can only go down as the interface is * detached so there is no need to use atomics. */ - DPRINTF("sca refcnt=%u scb refcnt=%u\n", sca->refcount, scb->refcount); - EPAIR_REFCOUNT_ASSERT(sca->refcount == 1 && scb->refcount == 1, - ("%s: ifp=%p sca->refcount!=1: %d || ifp=%p scb->refcount!=1: %d", - __func__, ifp, sca->refcount, oifp, scb->refcount)); - - /* - * Get rid of our second half. - */ + DPRINTF("scb refcnt=%u\n", scb->refcount); + EPAIR_REFCOUNT_ASSERT(scb->refcount == 1, + ("%s: ifp=%p scb->refcount!=1: %d", __func__, oifp, scb->refcount)); oifp->if_softc = NULL; error = if_clone_destroyif(ifc, oifp); if (error) panic("%s: if_clone_destroyif() for our 2nd iface failed: %d", __func__, error); + if_free(oifp); + ifmedia_removeall(&scb->media); + free(scb, M_EPAIR); + CURVNET_RESTORE(); + ether_ifdetach(ifp); /* - * Finish cleaning up. Free them and release the unit. - * As the other of the two interfaces my reside in a different vnet, - * we need to switch before freeing them. + * Wait for all packets to be dispatched to if_input. */ - CURVNET_SET_QUIET(oifp->if_vnet); - if_free(oifp); - CURVNET_RESTORE(); + DPRINTF("sca refcnt=%u\n", sca->refcount); + EPAIR_REFCOUNT_ASSERT(sca->refcount == 1, + ("%s: ifp=%p sca->refcount!=1: %d", __func__, ifp, sca->refcount)); if_free(ifp); ifmedia_removeall(&sca->media); - ifmedia_removeall(&scb->media); - free(scb, M_EPAIR); free(sca, M_EPAIR); ifc_free_unit(ifc, unit); From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 20:42:09 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CFB2106564A; Mon, 9 Jul 2012 20:42:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F3B58FC16; Mon, 9 Jul 2012 20:42:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q69Kg9JM039043; Mon, 9 Jul 2012 20:42:09 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q69Kg9uA039037; Mon, 9 Jul 2012 20:42:09 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201207092042.q69Kg9uA039037@svn.freebsd.org> From: John Baldwin Date: Mon, 9 Jul 2012 20:42:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238310 - in head/sys: amd64/amd64 i386/i386 pc98/pc98 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 20:42:09 -0000 Author: jhb Date: Mon Jul 9 20:42:08 2012 New Revision: 238310 URL: http://svn.freebsd.org/changeset/base/238310 Log: Partially revert r217515 so that the mem_range_softc variable is always present on x86 kernels. This fixes the build of kernels that include 'device acpi' but do not include 'device mem'. MFC after: 1 month Modified: head/sys/amd64/amd64/machdep.c head/sys/amd64/amd64/mem.c head/sys/i386/i386/machdep.c head/sys/i386/i386/mem.c head/sys/pc98/pc98/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Mon Jul 9 20:38:18 2012 (r238309) +++ head/sys/amd64/amd64/machdep.c Mon Jul 9 20:42:08 2012 (r238310) @@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -206,6 +207,8 @@ struct pcpu __pcpu[MAXCPU]; struct mtx icu_lock; +struct mem_range_softc mem_range_softc; + struct mtx dt_lock; /* lock for GDT and LDT */ static void Modified: head/sys/amd64/amd64/mem.c ============================================================================== --- head/sys/amd64/amd64/mem.c Mon Jul 9 20:38:18 2012 (r238309) +++ head/sys/amd64/amd64/mem.c Mon Jul 9 20:42:08 2012 (r238310) @@ -72,8 +72,6 @@ __FBSDID("$FreeBSD$"); */ MALLOC_DEFINE(M_MEMDESC, "memdesc", "memory range descriptors"); -struct mem_range_softc mem_range_softc; - /* ARGSUSED */ int memrw(struct cdev *dev, struct uio *uio, int flags) Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Mon Jul 9 20:38:18 2012 (r238309) +++ head/sys/i386/i386/machdep.c Mon Jul 9 20:42:08 2012 (r238310) @@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -247,6 +248,8 @@ struct pcpu __pcpu[MAXCPU]; struct mtx icu_lock; +struct mem_range_softc mem_range_softc; + static void cpu_startup(dummy) void *dummy; Modified: head/sys/i386/i386/mem.c ============================================================================== --- head/sys/i386/i386/mem.c Mon Jul 9 20:38:18 2012 (r238309) +++ head/sys/i386/i386/mem.c Mon Jul 9 20:42:08 2012 (r238310) @@ -72,8 +72,6 @@ __FBSDID("$FreeBSD$"); */ MALLOC_DEFINE(M_MEMDESC, "memdesc", "memory range descriptors"); -struct mem_range_softc mem_range_softc; - static struct sx memsxlock; SX_SYSINIT(memsxlockinit, &memsxlock, "/dev/mem lock"); Modified: head/sys/pc98/pc98/machdep.c ============================================================================== --- head/sys/pc98/pc98/machdep.c Mon Jul 9 20:38:18 2012 (r238309) +++ head/sys/pc98/pc98/machdep.c Mon Jul 9 20:42:08 2012 (r238310) @@ -73,6 +73,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -216,6 +217,8 @@ struct pcpu __pcpu[MAXCPU]; struct mtx icu_lock; +struct mem_range_softc mem_range_softc; + static void cpu_startup(dummy) void *dummy; From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 20:49:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42DE21065670; Mon, 9 Jul 2012 20:49:23 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) by mx1.freebsd.org (Postfix) with ESMTP id 254A48FC17; Mon, 9 Jul 2012 20:49:23 +0000 (UTC) Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 7069511CBF; Mon, 9 Jul 2012 13:49:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1341866957; bh=zvtrKkjbYaJVTkq8RHhu1OT8zJM6ZtHItH9s2OBjBBk=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=1F21nhUHNbOCILw1hRtOFtc+ZAkuq/rwU8+6YhtIfVBw/P+l9XQc+OFetK2eB4yM/ Ut984cyV/XjhK3Vby/leIc2Va81swqxMTa7JhzliLCd0QaSKQ/s3O9CSsitGc9VJAt X1l6NMZiVDMazkJr6YjWsPiWIqUrhMydTcJEEafo= Message-ID: <4FFB43CD.4070802@delphij.net> Date: Mon, 09 Jul 2012 13:49:17 -0700 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: Mikolaj Golub References: <201207092038.q69KcIi1038787@svn.freebsd.org> In-Reply-To: <201207092038.q69KcIi1038787@svn.freebsd.org> X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, d@delphij.net Subject: Re: svn commit: r238309 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 20:49:23 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 07/09/12 13:38, Mikolaj Golub wrote: > Author: trociny Date: Mon Jul 9 20:38:18 2012 New Revision: > 238309 URL: http://svn.freebsd.org/changeset/base/238309 > > Log: In epair_clone_destroy(), when destroying the second half, we > have to switch to its vnet before calling ether_ifdetach(). > Otherwise if the second half resides in a different vnet, > if_detach() silently fails leaving a stale pointer in V_ifnet list, > and the system crashes trying to access this pointer later. > > Another solution could be not to allow to destroy epair unless > both ends are in the home vnet. > > Discussed with: bz Tested by: delphij Thanks! Since this affects RELENG_9 and RELENG_8, could you please also MFC after a settle period? Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBCAAGBQJP+0PMAAoJEG80Jeu8UPuz/ugH/2RmmdfCapeP9eQkIPkaImpm D5ghJ0fS6dOM87i5QY6c0rJU2TrcLZHkZGnuYv+BSMqCz5de8dw9s7UMM6sHLL92 i4tgpDE2DQxM4b5skR7yCBRES6IAiY6kDIgVskaS95PxA9wuJA4ohqS8pQ5Tp6h4 lM2urad7+FpYGLZRTWY2yOzgS/g2JZNEGSX6tPIAhg8xX1hryP869zjjHJGd4932 X6pPyRtNdTHB69t00UiVMbJPzcSLtue4ECTms0xCPKC7t0+VZXgiYWOJlNnPQYzy lUkcYy8ZIyUUTD0duOdyun4oQ7xNEdZgZxcRI0Ids68AQs2xUoddL0IyX1ZMe9w= =kSZl -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 20:55:39 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CAE9F106564A; Mon, 9 Jul 2012 20:55:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC5418FC0C; Mon, 9 Jul 2012 20:55:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q69KtdV8039638; Mon, 9 Jul 2012 20:55:39 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q69KtdvE039633; Mon, 9 Jul 2012 20:55:39 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201207092055.q69KtdvE039633@svn.freebsd.org> From: John Baldwin Date: Mon, 9 Jul 2012 20:55:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238311 - in head/sys: amd64/amd64 amd64/include i386/include i386/isa X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 20:55:39 -0000 Author: jhb Date: Mon Jul 9 20:55:39 2012 New Revision: 238311 URL: http://svn.freebsd.org/changeset/base/238311 Log: Add a clts() wrapper around the 'clts' instruction to on x86 and use that to implement stop_emulating() in the fpu/npx code. Reimplement start_emulating() in the non-XEN case by using load_cr0() and rcr0() instead of the 'lmsw' and 'smsw' instructions. Intel explicitly discourages the use of 'lmsw' and 'smsw' on 80386 and later processors in the description of these instructions in Volume 2 of the ADM. Reviewed by: kib MFC after: 1 month Modified: head/sys/amd64/amd64/fpu.c head/sys/amd64/include/cpufunc.h head/sys/i386/include/cpufunc.h head/sys/i386/isa/npx.c Modified: head/sys/amd64/amd64/fpu.c ============================================================================== --- head/sys/amd64/amd64/fpu.c Mon Jul 9 20:42:08 2012 (r238310) +++ head/sys/amd64/amd64/fpu.c Mon Jul 9 20:55:39 2012 (r238311) @@ -73,10 +73,6 @@ __FBSDID("$FreeBSD$"); #define fxrstor(addr) __asm __volatile("fxrstor %0" : : "m" (*(addr))) #define fxsave(addr) __asm __volatile("fxsave %0" : "=m" (*(addr))) #define ldmxcsr(csr) __asm __volatile("ldmxcsr %0" : : "m" (csr)) -#define start_emulating() __asm __volatile( \ - "smsw %%ax; orb %0,%%al; lmsw %%ax" \ - : : "n" (CR0_TS) : "ax") -#define stop_emulating() __asm __volatile("clts") static __inline void xrstor(char *addr, uint64_t mask) @@ -109,13 +105,14 @@ void fnstsw(caddr_t addr); void fxsave(caddr_t addr); void fxrstor(caddr_t addr); void ldmxcsr(u_int csr); -void start_emulating(void); -void stop_emulating(void); void xrstor(char *addr, uint64_t mask); void xsave(char *addr, uint64_t mask); #endif /* __GNUCLIKE_ASM && !lint */ +#define start_emulating() load_cr0(rcr0() | CR0_TS) +#define stop_emulating() clts() + #define GET_FPU_CW(thread) ((thread)->td_pcb->pcb_save->sv_env.en_cw) #define GET_FPU_SW(thread) ((thread)->td_pcb->pcb_save->sv_env.en_sw) Modified: head/sys/amd64/include/cpufunc.h ============================================================================== --- head/sys/amd64/include/cpufunc.h Mon Jul 9 20:42:08 2012 (r238310) +++ head/sys/amd64/include/cpufunc.h Mon Jul 9 20:55:39 2012 (r238311) @@ -107,6 +107,13 @@ clflush(u_long addr) } static __inline void +clts(void) +{ + + __asm __volatile("clts"); +} + +static __inline void disable_intr(void) { __asm __volatile("cli" : : : "memory"); @@ -702,6 +709,9 @@ intr_restore(register_t rflags) int breakpoint(void); u_int bsfl(u_int mask); u_int bsrl(u_int mask); +void clflush(u_long addr); +void clts(void); +void cpuid_count(u_int ax, u_int cx, u_int *p); void disable_intr(void); void do_cpuid(u_int ax, u_int *p); void enable_intr(void); Modified: head/sys/i386/include/cpufunc.h ============================================================================== --- head/sys/i386/include/cpufunc.h Mon Jul 9 20:42:08 2012 (r238310) +++ head/sys/i386/include/cpufunc.h Mon Jul 9 20:55:39 2012 (r238311) @@ -97,6 +97,13 @@ clflush(u_long addr) } static __inline void +clts(void) +{ + + __asm __volatile("clts"); +} + +static __inline void disable_intr(void) { #ifdef XEN @@ -688,6 +695,9 @@ intr_restore(register_t eflags) int breakpoint(void); u_int bsfl(u_int mask); u_int bsrl(u_int mask); +void clflush(u_long addr); +void clts(void); +void cpuid_count(u_int ax, u_int cx, u_int *p); void disable_intr(void); void do_cpuid(u_int ax, u_int *p); void enable_intr(void); Modified: head/sys/i386/isa/npx.c ============================================================================== --- head/sys/i386/isa/npx.c Mon Jul 9 20:42:08 2012 (r238310) +++ head/sys/i386/isa/npx.c Mon Jul 9 20:55:39 2012 (r238311) @@ -100,15 +100,6 @@ __FBSDID("$FreeBSD$"); #define fxrstor(addr) __asm __volatile("fxrstor %0" : : "m" (*(addr))) #define fxsave(addr) __asm __volatile("fxsave %0" : "=m" (*(addr))) #endif -#ifdef XEN -#define start_emulating() (HYPERVISOR_fpu_taskswitch(1)) -#define stop_emulating() (HYPERVISOR_fpu_taskswitch(0)) -#else -#define start_emulating() __asm __volatile( \ - "smsw %%ax; orb %0,%%al; lmsw %%ax" \ - : : "n" (CR0_TS) : "ax") -#define stop_emulating() __asm __volatile("clts") -#endif #else /* !(__GNUCLIKE_ASM && !lint) */ void fldcw(u_short cw); @@ -123,11 +114,17 @@ void frstor(caddr_t addr); void fxsave(caddr_t addr); void fxrstor(caddr_t addr); #endif -void start_emulating(void); -void stop_emulating(void); #endif /* __GNUCLIKE_ASM && !lint */ +#ifdef XEN +#define start_emulating() (HYPERVISOR_fpu_taskswitch(1)) +#define stop_emulating() (HYPERVISOR_fpu_taskswitch(0)) +#else +#define start_emulating() load_cr0(rcr0() | CR0_TS) +#define stop_emulating() clts() +#endif + #ifdef CPU_ENABLE_SSE #define GET_FPU_CW(thread) \ (cpu_fxsr ? \ From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 21:15:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E422106566C; Mon, 9 Jul 2012 21:15:29 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 882CE8FC12; Mon, 9 Jul 2012 21:15:28 +0000 (UTC) Received: by weyx56 with SMTP id x56so495775wey.13 for ; Mon, 09 Jul 2012 14:15:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:x-comment-to:sender:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=f7HNDWpqw3RSN6G8pf5Tadwciu6Lw6ppvuNyUgZbjFw=; b=odZhgPuzmCCAGI2nibiM7XKoyBZdmVKKkceOhRja/bNix+wMGm/9oLKEjqp81EFwV4 rpbu0aktKlPJbanbGA2UQz6TCNRsfiBRKI5cru2UT+gTLGkX4mg88iYVJcV0WDXrxhkB xz5Wu+df9Biw8nHiehKjgDAjapgeBOSzLPGsKTrFZf2rT6/HOR4GR+so3n9AKN+VIMbV FpiVI/dwVKfrfFCLfkEJdwRDUtV7VplRzKZVrKkb+r/OQkbydZvBAuny+ffO1y8LPvOK Ij0b6oRxlp2/FN41VTB7ciV3jKBiah/9v4LxwUPrlfd4TP3N22drXfjTJVk0tIx4q6Tu 9KiQ== Received: by 10.180.84.104 with SMTP id x8mr32488764wiy.20.1341868527665; Mon, 09 Jul 2012 14:15:27 -0700 (PDT) Received: from localhost ([95.69.175.25]) by mx.google.com with ESMTPS id w7sm18839599wiz.0.2012.07.09.14.15.25 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 09 Jul 2012 14:15:26 -0700 (PDT) From: Mikolaj Golub To: d@delphij.net References: <201207092038.q69KcIi1038787@svn.freebsd.org> <4FFB43CD.4070802@delphij.net> X-Comment-To: Xin Li Sender: Mikolaj Golub Date: Tue, 10 Jul 2012 00:15:24 +0300 In-Reply-To: <4FFB43CD.4070802@delphij.net> (Xin Li's message of "Mon, 09 Jul 2012 13:49:17 -0700") Message-ID: <86sjd0vdoz.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238309 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 21:15:29 -0000 On Mon, 09 Jul 2012 13:49:17 -0700 Xin Li wrote: XL> On 07/09/12 13:38, Mikolaj Golub wrote: >> Author: trociny Date: Mon Jul 9 20:38:18 2012 New Revision: >> 238309 URL: http://svn.freebsd.org/changeset/base/238309 >> >> Log: In epair_clone_destroy(), when destroying the second half, we >> have to switch to its vnet before calling ether_ifdetach(). >> Otherwise if the second half resides in a different vnet, >> if_detach() silently fails leaving a stale pointer in V_ifnet list, >> and the system crashes trying to access this pointer later. >> >> Another solution could be not to allow to destroy epair unless >> both ends are in the home vnet. >> >> Discussed with: bz Tested by: delphij XL> Thanks! XL> Since this affects RELENG_9 and RELENG_8, could you please also MFC XL> after a settle period? Sure. Just forgot to add the 'MFC after' reminder. I am going to MFC it after stable/9 unfreeze unless someone really wants it in 9.1 and tests it a little. This does not look like a critical issue because of the existing workaround (which can be considered as a best practice): move both ends to the home vnet before destroying the epair. -- Mikolaj Golub From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 21:53:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1DB81065672; Mon, 9 Jul 2012 21:53:50 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D6EA8FC12; Mon, 9 Jul 2012 21:53:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q69LroYd042089; Mon, 9 Jul 2012 21:53:50 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q69LroMC042087; Mon, 9 Jul 2012 21:53:50 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201207092153.q69LroMC042087@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 9 Jul 2012 21:53:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238313 - head/sys/dev/cxgbe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 21:53:50 -0000 Author: np Date: Mon Jul 9 21:53:50 2012 New Revision: 238313 URL: http://svn.freebsd.org/changeset/base/238313 Log: Fix a bug in code that calculates the number of the first interrupt vector for a port. This affected the gigabit ports of T422 cards (the ones with 2x10G ports and 2x1G ports). MFC after: will check with re@ Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Mon Jul 9 21:46:07 2012 (r238312) +++ head/sys/dev/cxgbe/t4_sge.c Mon Jul 9 21:53:50 2012 (r238313) @@ -401,14 +401,16 @@ first_vector(struct port_info *pi) return (0); for_each_port(sc, i) { + struct port_info *p = sc->port[i]; + if (i == pi->port_id) break; #ifdef TCP_OFFLOAD if (sc->flags & INTR_DIRECT) - rc += pi->nrxq + pi->nofldrxq; + rc += p->nrxq + p->nofldrxq; else - rc += max(pi->nrxq, pi->nofldrxq); + rc += max(p->nrxq, p->nofldrxq); #else /* * Not compiled with offload support and intr_count > 1. Only @@ -419,7 +421,7 @@ first_vector(struct port_info *pi) ("%s: intr_count %d, !INTR_DIRECT", __func__, sc->intr_count)); - rc += pi->nrxq; + rc += p->nrxq; #endif } From owner-svn-src-head@FreeBSD.ORG Mon Jul 9 23:58:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A052A106566C; Mon, 9 Jul 2012 23:58:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 72BD18FC0A; Mon, 9 Jul 2012 23:58:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q69NwNTm047237; Mon, 9 Jul 2012 23:58:23 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q69NwNoi047235; Mon, 9 Jul 2012 23:58:23 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207092358.q69NwNoi047235@svn.freebsd.org> From: Adrian Chadd Date: Mon, 9 Jul 2012 23:58:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238314 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 23:58:23 -0000 Author: adrian Date: Mon Jul 9 23:58:22 2012 New Revision: 238314 URL: http://svn.freebsd.org/changeset/base/238314 Log: Add some AR9300 HAL descriptor definition changes. * Add a couple of RX errors; * Add the spectral scan PHY error code; * extend the RX flags to be a 16 bit field, rather than an 8 bit field; * Add a new RX flag. Obtained from: Qualcomm Atheros Modified: head/sys/dev/ath/ath_hal/ah_desc.h Modified: head/sys/dev/ath/ath_hal/ah_desc.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_desc.h Mon Jul 9 21:53:50 2012 (r238313) +++ head/sys/dev/ath/ath_hal/ah_desc.h Mon Jul 9 23:58:22 2012 (r238314) @@ -122,11 +122,12 @@ struct ath_rx_status { int8_t rs_rssi_ext[3]; /* rx frame RSSI [ext, chain 0-2] */ uint8_t rs_isaggr; /* is part of the aggregate */ uint8_t rs_moreaggr; /* more frames in aggr to follow */ + uint16_t rs_flags; /* misc flags */ uint8_t rs_num_delims; /* number of delims in aggr */ - uint8_t rs_flags; /* misc flags */ + uint8_t rs_spare0; /* padding */ uint32_t rs_evm0; /* evm bytes */ uint32_t rs_evm1; - uint32_t rs_evm2; + uint32_t rs_evm2; uint32_t rs_evm3; /* needed for ar9300 and later */ uint32_t rs_evm4; /* needed for ar9300 and later */ #endif /* AH_SUPPORT_AR5416 */ @@ -138,16 +139,19 @@ struct ath_rx_status { #define HAL_RXERR_FIFO 0x04 /* fifo overrun */ #define HAL_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */ #define HAL_RXERR_MIC 0x10 /* Michael MIC decrypt error */ +#define HAL_RXERR_INCOMP 0x20 /* Rx Desc processing is incomplete */ +#define HAL_RXERR_KEYMISS 0x40 /* Key not found in keycache */ /* bits found in rs_flags */ -#define HAL_RX_MORE 0x01 /* more descriptors follow */ -#define HAL_RX_MORE_AGGR 0x02 /* more frames in aggr */ -#define HAL_RX_GI 0x04 /* full gi */ -#define HAL_RX_2040 0x08 /* 40 Mhz */ -#define HAL_RX_DELIM_CRC_PRE 0x10 /* crc error in delimiter pre */ -#define HAL_RX_DELIM_CRC_POST 0x20 /* crc error in delim after */ -#define HAL_RX_DECRYPT_BUSY 0x40 /* decrypt was too slow */ -#define HAL_RX_HI_RX_CHAIN 0x80 /* SM power save: hi Rx chain control */ +#define HAL_RX_MORE 0x0001 /* more descriptors follow */ +#define HAL_RX_MORE_AGGR 0x0002 /* more frames in aggr */ +#define HAL_RX_GI 0x0004 /* full gi */ +#define HAL_RX_2040 0x0008 /* 40 Mhz */ +#define HAL_RX_DELIM_CRC_PRE 0x0010 /* crc error in delimiter pre */ +#define HAL_RX_DELIM_CRC_POST 0x0020 /* crc error in delim after */ +#define HAL_RX_DECRYPT_BUSY 0x0040 /* decrypt was too slow */ +#define HAL_RX_HI_RX_CHAIN 0x0080 /* SM power save: hi Rx chain control */ +#define HAL_RX_IS_APSD 0x0100 /* Is ASPD trigger frame */ enum { HAL_PHYERR_UNDERRUN = 0, /* Transmit underrun */ @@ -178,6 +182,8 @@ enum { HAL_PHYERR_HT_CRC_ERROR = 34, /* */ HAL_PHYERR_HT_LENGTH_ILLEGAL = 35, /* */ HAL_PHYERR_HT_RATE_ILLEGAL = 36, /* */ + + HAL_PHYERR_SPECTRAL = 38, }; /* value found in rs_keyix to mark invalid entries */ From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 00:01:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CF9E71065670; Tue, 10 Jul 2012 00:01:00 +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 B843E8FC08; Tue, 10 Jul 2012 00:01:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6A010Sm047403; Tue, 10 Jul 2012 00:01:00 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A010HT047396; Tue, 10 Jul 2012 00:01:00 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201207100001.q6A010HT047396@svn.freebsd.org> From: Attilio Rao Date: Tue, 10 Jul 2012 00:01:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238315 - head/sys/fs/ntfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 00:01:00 -0000 Author: attilio Date: Tue Jul 10 00:01:00 2012 New Revision: 238315 URL: http://svn.freebsd.org/changeset/base/238315 Log: - Remove the unused and not completed write support for NTFS. - Fix a bug where vfs_mountedfrom() is called also when the filesystem is not mounted successfully. Tested by: pho Modified: head/sys/fs/ntfs/ntfs_subr.c head/sys/fs/ntfs/ntfs_subr.h head/sys/fs/ntfs/ntfs_vfsops.c head/sys/fs/ntfs/ntfs_vnops.c Modified: head/sys/fs/ntfs/ntfs_subr.c ============================================================================== --- head/sys/fs/ntfs/ntfs_subr.c Mon Jul 9 23:58:22 2012 (r238314) +++ head/sys/fs/ntfs/ntfs_subr.c Tue Jul 10 00:01:00 2012 (r238315) @@ -1353,174 +1353,6 @@ ntfs_filesize( } /* - * This is one of write routine. - */ -int -ntfs_writeattr_plain( - struct ntfsmount * ntmp, - struct ntnode * ip, - u_int32_t attrnum, - char *attrname, - off_t roff, - size_t rsize, - void *rdata, - size_t * initp, - struct uio *uio) -{ - size_t init; - int error = 0; - off_t off = roff, left = rsize, towrite; - caddr_t data = rdata; - struct ntvattr *vap; - *initp = 0; - - while (left) { - error = ntfs_ntvattrget(ntmp, ip, attrnum, attrname, - ntfs_btocn(off), &vap); - if (error) - return (error); - towrite = MIN(left, ntfs_cntob(vap->va_vcnend + 1) - off); - ddprintf(("ntfs_writeattr_plain: o: %d, s: %d (%d - %d)\n", - (u_int32_t) off, (u_int32_t) towrite, - (u_int32_t) vap->va_vcnstart, - (u_int32_t) vap->va_vcnend)); - error = ntfs_writentvattr_plain(ntmp, ip, vap, - off - ntfs_cntob(vap->va_vcnstart), - towrite, data, &init, uio); - if (error) { - printf("ntfs_writeattr_plain: " \ - "ntfs_writentvattr_plain failed: o: %d, s: %d\n", - (u_int32_t) off, (u_int32_t) towrite); - printf("ntfs_writeattr_plain: attrib: %d - %d\n", - (u_int32_t) vap->va_vcnstart, - (u_int32_t) vap->va_vcnend); - ntfs_ntvattrrele(vap); - break; - } - ntfs_ntvattrrele(vap); - left -= towrite; - off += towrite; - data = data + towrite; - *initp += init; - } - - return (error); -} - -/* - * This is one of write routine. - * - * ntnode should be locked. - */ -int -ntfs_writentvattr_plain( - struct ntfsmount * ntmp, - struct ntnode * ip, - struct ntvattr * vap, - off_t roff, - size_t rsize, - void *rdata, - size_t * initp, - struct uio *uio) -{ - int error = 0; - off_t off; - int cnt; - cn_t ccn, ccl, cn, left, cl; - caddr_t data = rdata; - struct buf *bp; - size_t tocopy; - - *initp = 0; - - if ((vap->va_flag & NTFS_AF_INRUN) == 0) { - printf("ntfs_writevattr_plain: CAN'T WRITE RES. ATTRIBUTE\n"); - return ENOTTY; - } - - ddprintf(("ntfs_writentvattr_plain: data in run: %ld chains\n", - vap->va_vruncnt)); - - off = roff; - left = rsize; - ccl = 0; - ccn = 0; - cnt = 0; - for (; left && (cnt < vap->va_vruncnt); cnt++) { - ccn = vap->va_vruncn[cnt]; - ccl = vap->va_vruncl[cnt]; - - ddprintf(("ntfs_writentvattr_plain: " \ - "left %d, cn: 0x%x, cl: %d, off: %d\n", \ - (u_int32_t) left, (u_int32_t) ccn, \ - (u_int32_t) ccl, (u_int32_t) off)); - - if (ntfs_cntob(ccl) < off) { - off -= ntfs_cntob(ccl); - cnt++; - continue; - } - if (!ccn && ip->i_number != NTFS_BOOTINO) - continue; /* XXX */ - - ccl -= ntfs_btocn(off); - cn = ccn + ntfs_btocn(off); - off = ntfs_btocnoff(off); - - while (left && ccl) { - /* - * Always read and write single clusters at a time - - * we need to avoid requesting differently-sized - * blocks at the same disk offsets to avoid - * confusing the buffer cache. - */ - tocopy = MIN(left, ntfs_cntob(1) - off); - cl = ntfs_btocl(tocopy + off); - KASSERT(cl == 1 && tocopy <= ntfs_cntob(1), - ("single cluster limit mistake")); - ddprintf(("ntfs_writentvattr_plain: write: " \ - "cn: 0x%x cl: %d, off: %d len: %d, left: %d\n", - (u_int32_t) cn, (u_int32_t) cl, - (u_int32_t) off, (u_int32_t) tocopy, - (u_int32_t) left)); - if ((off == 0) && (tocopy == ntfs_cntob(cl))) - { - bp = getblk(ntmp->ntm_devvp, ntfs_cntobn(cn) - * ntmp->ntm_multiplier, - ntfs_cntob(cl), 0, 0, 0); - clrbuf(bp); - } else { - error = bread(ntmp->ntm_devvp, ntfs_cntobn(cn) - * ntmp->ntm_multiplier, - ntfs_cntob(cl), NOCRED, &bp); - if (error) { - brelse(bp); - return (error); - } - } - if (uio) - uiomove(bp->b_data + off, tocopy, uio); - else - memcpy(bp->b_data + off, data, tocopy); - bawrite(bp); - data = data + tocopy; - *initp += tocopy; - off = 0; - left -= tocopy; - cn += cl; - ccl -= cl; - } - } - - if (left) { - printf("ntfs_writentvattr_plain: POSSIBLE RUN ERROR\n"); - error = EINVAL; - } - - return (error); -} - -/* * This is one of read routines. * * ntnode should be locked. Modified: head/sys/fs/ntfs/ntfs_subr.h ============================================================================== --- head/sys/fs/ntfs/ntfs_subr.h Mon Jul 9 23:58:22 2012 (r238314) +++ head/sys/fs/ntfs/ntfs_subr.h Tue Jul 10 00:01:00 2012 (r238315) @@ -99,8 +99,6 @@ void ntfs_ntref(struct ntnode *); void ntfs_ntrele(struct ntnode *); void ntfs_ntput(struct ntnode *); int ntfs_loadntnode( struct ntfsmount *, struct ntnode * ); -int ntfs_writentvattr_plain(struct ntfsmount *, struct ntnode *, struct ntvattr *, off_t, size_t, void *, size_t *, struct uio *); -int ntfs_writeattr_plain(struct ntfsmount *, struct ntnode *, u_int32_t, char *, off_t, size_t, void *, size_t *, struct uio *); void ntfs_toupper_init(void); void ntfs_toupper_destroy(void); int ntfs_toupper_use(struct mount *, struct ntfsmount *); Modified: head/sys/fs/ntfs/ntfs_vfsops.c ============================================================================== --- head/sys/fs/ntfs/ntfs_vfsops.c Mon Jul 9 23:58:22 2012 (r238314) +++ head/sys/fs/ntfs/ntfs_vfsops.c Tue Jul 10 00:01:00 2012 (r238315) @@ -152,7 +152,6 @@ static int ntfs_mount(struct mount *mp) { int err = 0, error; - accmode_t accmode; struct vnode *devvp; struct nameidata ndp; struct thread *td; @@ -162,6 +161,11 @@ ntfs_mount(struct mount *mp) if (vfs_filteropt(mp->mnt_optnew, ntfs_opts)) return (EINVAL); + /* Force mount as read-only. */ + MNT_ILOCK(mp); + mp->mnt_flag |= MNT_RDONLY; + MNT_IUNLOCK(mp); + from = vfs_getopts(mp->mnt_optnew, "from", &error); if (error) return (error); @@ -173,11 +177,10 @@ ntfs_mount(struct mount *mp) if (mp->mnt_flag & MNT_UPDATE) { if (vfs_flagopt(mp->mnt_optnew, "export", NULL, 0)) { /* Process export requests in vfs_mount.c */ - goto success; + return (0); } else { printf("ntfs_mount(): MNT_UPDATE not supported\n"); - err = EINVAL; - goto error_1; + return (EINVAL); } } @@ -187,10 +190,8 @@ ntfs_mount(struct mount *mp) */ NDINIT(&ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, from, td); err = namei(&ndp); - if (err) { - /* can't get devvp!*/ - goto error_1; - } + if (err) + return (err); NDFREE(&ndp, NDF_ONLY_PNBUF); devvp = ndp.ni_vp; @@ -203,10 +204,7 @@ ntfs_mount(struct mount *mp) * If mount by non-root, then verify that user has necessary * permissions on the device. */ - accmode = VREAD; - if ((mp->mnt_flag & MNT_RDONLY) == 0) - accmode |= VWRITE; - err = VOP_ACCESS(devvp, accmode, td->td_ucred, td); + err = VOP_ACCESS(devvp, VREAD, td->td_ucred, td); if (err) err = priv_check(td, PRIV_VFS_MOUNT_PERM); if (err) { @@ -244,22 +242,16 @@ ntfs_mount(struct mount *mp) * don't have to do it here unless we want to set it * to something other than "path" for some rason. */ - /* Save "mounted from" info for mount point (NULL pad)*/ - vfs_mountedfrom(mp, from); err = ntfs_mountfs(devvp, mp, td); + if (err == 0) { + + /* Save "mounted from" info for mount point. */ + vfs_mountedfrom(mp, from); + } } - if (err) { + if (err) vrele(devvp); - return (err); - } - - goto success; - -error_1: /* no state to back out*/ - /* XXX: missing NDFREE(&ndp, ...) */ - -success: return (err); } @@ -275,13 +267,12 @@ ntfs_mountfs(devvp, mp, td) struct buf *bp; struct ntfsmount *ntmp; struct cdev *dev = devvp->v_rdev; - int error, ronly, i, v; + int error, i, v; struct vnode *vp; struct g_consumer *cp; struct g_provider *pp; char *cs_ntfs, *cs_local; - ronly = (mp->mnt_flag & MNT_RDONLY) != 0; DROP_GIANT(); g_topology_lock(); @@ -296,7 +287,7 @@ ntfs_mountfs(devvp, mp, td) if ((pp != NULL) && ((pp->acr | pp->acw | pp->ace ) != 0)) error = EPERM; else - error = g_vfs_open(devvp, &cp, "ntfs", ronly ? 0 : 1); + error = g_vfs_open(devvp, &cp, "ntfs", 0); g_topology_unlock(); PICKUP_GIANT(); Modified: head/sys/fs/ntfs/ntfs_vnops.c ============================================================================== --- head/sys/fs/ntfs/ntfs_vnops.c Mon Jul 9 23:58:22 2012 (r238314) +++ head/sys/fs/ntfs/ntfs_vnops.c Tue Jul 10 00:01:00 2012 (r238315) @@ -67,7 +67,6 @@ #include /* for pathconf(2) constants */ static vop_read_t ntfs_read; -static vop_write_t ntfs_write; static vop_getattr_t ntfs_getattr; static vop_inactive_t ntfs_inactive; static vop_reclaim_t ntfs_reclaim; @@ -78,7 +77,6 @@ static vop_open_t ntfs_open; static vop_close_t ntfs_close; static vop_readdir_t ntfs_readdir; static vop_cachedlookup_t ntfs_lookup; -static vop_fsync_t ntfs_fsync; static vop_pathconf_t ntfs_pathconf; static vop_vptofh_t ntfs_vptofh; @@ -272,6 +270,7 @@ ntfs_strategy(ap) register struct fnode *fp = VTOF(vp); register struct ntnode *ip = FTONT(fp); struct ntfsmount *ntmp = ip->i_mp; + u_int32_t toread; int error; dprintf(("ntfs_strategy: offset: %d, blkno: %d, lblkno: %d\n", @@ -281,99 +280,33 @@ ntfs_strategy(ap) dprintf(("strategy: bcount: %d flags: 0x%x\n", (u_int32_t)bp->b_bcount,bp->b_flags)); - if (bp->b_iocmd == BIO_READ) { - u_int32_t toread; + KASSERT(bp->b_iocmd == BIO_READ, ("Invalid buffer\n")); - if (ntfs_cntob(bp->b_blkno) >= fp->f_size) { - clrbuf(bp); - error = 0; - } else { - toread = MIN(bp->b_bcount, - fp->f_size-ntfs_cntob(bp->b_blkno)); - dprintf(("ntfs_strategy: toread: %d, fsize: %d\n", - toread,(u_int32_t)fp->f_size)); - - error = ntfs_readattr(ntmp, ip, fp->f_attrtype, - fp->f_attrname, ntfs_cntob(bp->b_blkno), - toread, bp->b_data, NULL); - - if (error) { - printf("ntfs_strategy: ntfs_readattr failed\n"); - bp->b_error = error; - bp->b_ioflags |= BIO_ERROR; - } - - bzero(bp->b_data + toread, bp->b_bcount - toread); - } + if (ntfs_cntob(bp->b_blkno) >= fp->f_size) { + clrbuf(bp); + error = 0; } else { - size_t tmp; - u_int32_t towrite; + toread = MIN(bp->b_bcount, + fp->f_size-ntfs_cntob(bp->b_blkno)); + dprintf(("ntfs_strategy: toread: %d, fsize: %d\n", + toread,(u_int32_t)fp->f_size)); + + error = ntfs_readattr(ntmp, ip, fp->f_attrtype, + fp->f_attrname, ntfs_cntob(bp->b_blkno), + toread, bp->b_data, NULL); - if (ntfs_cntob(bp->b_blkno) + bp->b_bcount >= fp->f_size) { - printf("ntfs_strategy: CAN'T EXTEND FILE\n"); - bp->b_error = error = EFBIG; + if (error) { + printf("ntfs_strategy: ntfs_readattr failed\n"); + bp->b_error = error; bp->b_ioflags |= BIO_ERROR; - } else { - towrite = MIN(bp->b_bcount, - fp->f_size-ntfs_cntob(bp->b_blkno)); - dprintf(("ntfs_strategy: towrite: %d, fsize: %d\n", - towrite,(u_int32_t)fp->f_size)); - - error = ntfs_writeattr_plain(ntmp, ip, fp->f_attrtype, - fp->f_attrname, ntfs_cntob(bp->b_blkno),towrite, - bp->b_data, &tmp, NULL); - - if (error) { - printf("ntfs_strategy: ntfs_writeattr fail\n"); - bp->b_error = error; - bp->b_ioflags |= BIO_ERROR; - } } + + bzero(bp->b_data + toread, bp->b_bcount - toread); } bufdone(bp); return (0); } -static int -ntfs_write(ap) - struct vop_write_args /* { - struct vnode *a_vp; - struct uio *a_uio; - int a_ioflag; - struct ucred *a_cred; - } */ *ap; -{ - register struct vnode *vp = ap->a_vp; - register struct fnode *fp = VTOF(vp); - register struct ntnode *ip = FTONT(fp); - struct uio *uio = ap->a_uio; - struct ntfsmount *ntmp = ip->i_mp; - u_int64_t towrite; - size_t written; - int error; - - dprintf(("ntfs_write: ino: %d, off: %d resid: %d, segflg: %d\n",ip->i_number,(u_int32_t)uio->uio_offset,uio->uio_resid,uio->uio_segflg)); - dprintf(("ntfs_write: filesize: %d",(u_int32_t)fp->f_size)); - - if (uio->uio_resid + uio->uio_offset > fp->f_size) { - printf("ntfs_write: CAN'T WRITE BEYOND END OF FILE\n"); - return (EFBIG); - } - - towrite = MIN(uio->uio_resid, fp->f_size - uio->uio_offset); - - dprintf((", towrite: %d\n",(u_int32_t)towrite)); - - error = ntfs_writeattr_plain(ntmp, ip, fp->f_attrtype, - fp->f_attrname, uio->uio_offset, towrite, NULL, &written, uio); -#ifdef NTFS_DEBUG - if (error) - printf("ntfs_write: ntfs_writeattr failed: %d\n", error); -#endif - - return (error); -} - int ntfs_access(ap) struct vop_access_args /* { @@ -390,7 +323,7 @@ ntfs_access(ap) dprintf(("ntfs_access: %d\n",ip->i_number)); /* - * Disallow write attempts on read-only filesystems; + * Disallow write attempts as we assume read-only filesystems; * unless the file is a socket, fifo, or a block or * character device resident on the filesystem. */ @@ -399,8 +332,8 @@ ntfs_access(ap) case VDIR: case VLNK: case VREG: - if (vp->v_mount->mnt_flag & MNT_RDONLY) - return (EROFS); + return (EROFS); + default: break; } } @@ -630,7 +563,6 @@ ntfs_lookup(ap) return (error); if ((cnp->cn_flags & ISLASTCN) && - (dvp->v_mount->mnt_flag & MNT_RDONLY) && (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) return (EROFS); @@ -679,24 +611,6 @@ ntfs_lookup(ap) } /* - * Flush the blocks of a file to disk. - * - * This function is worthless for vnodes that represent directories. Maybe we - * could just do a sync if they try an fsync on a directory file. - */ -static int -ntfs_fsync(ap) - struct vop_fsync_args /* { - struct vnode *a_vp; - struct ucred *a_cred; - int a_waitfor; - struct thread *a_td; - } */ *ap; -{ - return (0); -} - -/* * Return POSIX pathconf information applicable to NTFS filesystem */ int @@ -756,7 +670,6 @@ struct vop_vector ntfs_vnodeops = { .vop_bmap = ntfs_bmap, .vop_cachedlookup = ntfs_lookup, .vop_close = ntfs_close, - .vop_fsync = ntfs_fsync, .vop_getattr = ntfs_getattr, .vop_inactive = ntfs_inactive, .vop_lookup = vfs_cache_lookup, @@ -766,6 +679,5 @@ struct vop_vector ntfs_vnodeops = { .vop_readdir = ntfs_readdir, .vop_reclaim = ntfs_reclaim, .vop_strategy = ntfs_strategy, - .vop_write = ntfs_write, .vop_vptofh = ntfs_vptofh, }; From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 00:02:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C3DA31065672; Tue, 10 Jul 2012 00:02:19 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A59938FC1B; Tue, 10 Jul 2012 00:02:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6A02JUw047494; Tue, 10 Jul 2012 00:02:19 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A02JoB047490; Tue, 10 Jul 2012 00:02:19 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207100002.q6A02JoB047490@svn.freebsd.org> From: Adrian Chadd Date: Tue, 10 Jul 2012 00:02:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238316 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 00:02:19 -0000 Author: adrian Date: Tue Jul 10 00:02:19 2012 New Revision: 238316 URL: http://svn.freebsd.org/changeset/base/238316 Log: Convert sc_rxpending to a per-EDMA queue, and use that for the legacy code. Prepare ath_rx_pkt() to handle multiple RX queues, and default the legacy RX queue to use the HP queue. Modified: head/sys/dev/ath/if_ath_rx.c head/sys/dev/ath/if_ath_rx.h head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath_rx.c ============================================================================== --- head/sys/dev/ath/if_ath_rx.c Tue Jul 10 00:01:00 2012 (r238315) +++ head/sys/dev/ath/if_ath_rx.c Tue Jul 10 00:02:19 2012 (r238316) @@ -463,9 +463,9 @@ ath_handle_micerror(struct ieee80211com } } -static int +int ath_rx_pkt(struct ath_softc *sc, struct ath_rx_status *rs, HAL_STATUS status, - uint64_t tsf, int nf, struct ath_buf *bf) + uint64_t tsf, int nf, HAL_RX_QUEUE qtype, struct ath_buf *bf) { struct ath_hal *ah = sc->sc_ah; struct mbuf *m = bf->bf_m; @@ -475,6 +475,7 @@ ath_rx_pkt(struct ath_softc *sc, struct struct ieee80211com *ic = ifp->if_l2com; struct ieee80211_node *ni; int is_good = 0; + struct ath_rx_edma *re = &sc->sc_rxedma[qtype]; /* * Calculate the correct 64 bit TSF given @@ -559,9 +560,9 @@ rx_error: /* * Cleanup any pending partial frame. */ - if (sc->sc_rxpending != NULL) { - m_freem(sc->sc_rxpending); - sc->sc_rxpending = NULL; + if (re->m_rxpending != NULL) { + m_freem(re->m_rxpending); + re->m_rxpending = NULL; } /* * When a tap is present pass error frames @@ -608,25 +609,25 @@ rx_accept: * it for the next completed descriptor, it * will be used to construct a jumbogram. */ - if (sc->sc_rxpending != NULL) { + if (re->m_rxpending != NULL) { /* NB: max frame size is currently 2 clusters */ sc->sc_stats.ast_rx_toobig++; - m_freem(sc->sc_rxpending); + m_freem(re->m_rxpending); } m->m_pkthdr.rcvif = ifp; m->m_pkthdr.len = len; - sc->sc_rxpending = m; + re->m_rxpending = m; goto rx_next; - } else if (sc->sc_rxpending != NULL) { + } else if (re->m_rxpending != NULL) { /* * This is the second part of a jumbogram, * chain it to the first mbuf, adjust the * frame length, and clear the rxpending state. */ - sc->sc_rxpending->m_next = m; - sc->sc_rxpending->m_pkthdr.len += len; - m = sc->sc_rxpending; - sc->sc_rxpending = NULL; + re->m_rxpending->m_next = m; + re->m_rxpending->m_pkthdr.len += len; + m = re->m_rxpending; + re->m_rxpending = NULL; } else { /* * Normal single-descriptor receive; setup @@ -883,7 +884,7 @@ ath_rx_proc(struct ath_softc *sc, int re /* * Process a single frame. */ - if (ath_rx_pkt(sc, rs, status, tsf, nf, bf)) + if (ath_rx_pkt(sc, rs, status, tsf, nf, HAL_RX_QUEUE_HP, bf)) ngood++; rx_proc_next: TAILQ_INSERT_TAIL(&sc->sc_rxbuf, bf, bf_list); @@ -1016,9 +1017,16 @@ ath_legacy_stoprecv(struct ath_softc *sc } } #endif - if (sc->sc_rxpending != NULL) { - m_freem(sc->sc_rxpending); - sc->sc_rxpending = NULL; + /* + * Free both high/low RX pending, just in case. + */ + if (sc->sc_rxedma[HAL_RX_QUEUE_LP].m_rxpending != NULL) { + m_freem(sc->sc_rxedma[HAL_RX_QUEUE_LP].m_rxpending); + sc->sc_rxedma[HAL_RX_QUEUE_LP].m_rxpending = NULL; + } + if (sc->sc_rxedma[HAL_RX_QUEUE_HP].m_rxpending != NULL) { + m_freem(sc->sc_rxedma[HAL_RX_QUEUE_HP].m_rxpending); + sc->sc_rxedma[HAL_RX_QUEUE_HP].m_rxpending = NULL; } sc->sc_rxlink = NULL; /* just in case */ #undef PA2DESC @@ -1034,7 +1042,8 @@ ath_legacy_startrecv(struct ath_softc *s struct ath_buf *bf; sc->sc_rxlink = NULL; - sc->sc_rxpending = NULL; + sc->sc_rxedma[HAL_RX_QUEUE_LP].m_rxpending = NULL; + sc->sc_rxedma[HAL_RX_QUEUE_HP].m_rxpending = NULL; TAILQ_FOREACH(bf, &sc->sc_rxbuf, bf_list) { int error = ath_rxbuf_init(sc, bf); if (error != 0) { Modified: head/sys/dev/ath/if_ath_rx.h ============================================================================== --- head/sys/dev/ath/if_ath_rx.h Tue Jul 10 00:01:00 2012 (r238315) +++ head/sys/dev/ath/if_ath_rx.h Tue Jul 10 00:02:19 2012 (r238316) @@ -56,6 +56,10 @@ extern void ath_stoprecv(struct ath_soft extern int ath_startrecv(struct ath_softc *sc); #endif +extern int ath_rx_pkt(struct ath_softc *sc, struct ath_rx_status *rs, + HAL_STATUS status, uint64_t tsf, int nf, HAL_RX_QUEUE qtype, + struct ath_buf *bf); + extern void ath_recv_setup_legacy(struct ath_softc *sc); #endif Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Tue Jul 10 00:01:00 2012 (r238315) +++ head/sys/dev/ath/if_athvar.h Tue Jul 10 00:02:19 2012 (r238316) @@ -531,7 +531,6 @@ struct ath_softc { struct ath_descdma sc_rxdma; /* RX descriptors */ ath_bufhead sc_rxbuf; /* receive buffer */ - struct mbuf *sc_rxpending; /* pending receive data */ u_int32_t *sc_rxlink; /* link ptr in last RX desc */ struct task sc_rxtask; /* rx int processing */ u_int8_t sc_defant; /* current default antenna */ From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 00:08:40 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65C5A1065670; Tue, 10 Jul 2012 00:08:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4ED7B8FC0A; Tue, 10 Jul 2012 00:08:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6A08eP9047784; Tue, 10 Jul 2012 00:08:40 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A08eiq047782; Tue, 10 Jul 2012 00:08:40 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207100008.q6A08eiq047782@svn.freebsd.org> From: Adrian Chadd Date: Tue, 10 Jul 2012 00:08:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238317 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 00:08:40 -0000 Author: adrian Date: Tue Jul 10 00:08:39 2012 New Revision: 238317 URL: http://svn.freebsd.org/changeset/base/238317 Log: Implement EDMA RX for AR93xx and later chips. This is inspired by ath9k and the reference driver, but it's a new implementation of the RX FIFO handling. This has some issues - notably the FIFO needs to be reprogrammed when the chip is reset. Modified: head/sys/dev/ath/if_ath_rx_edma.c Modified: head/sys/dev/ath/if_ath_rx_edma.c ============================================================================== --- head/sys/dev/ath/if_ath_rx_edma.c Tue Jul 10 00:02:19 2012 (r238316) +++ head/sys/dev/ath/if_ath_rx_edma.c Tue Jul 10 00:08:39 2012 (r238317) @@ -117,6 +117,38 @@ __FBSDID("$FreeBSD$"); #include +/* + * some general macros + */ +#define INCR(_l, _sz) (_l) ++; (_l) &= ((_sz) - 1) +#define DECR(_l, _sz) (_l) --; (_l) &= ((_sz) - 1) + +MALLOC_DECLARE(M_ATHDEV); + +/* + * XXX TODO: + * + * + Add an RX lock, just to ensure we don't have things clash; + * + Make sure the FIFO is correctly flushed and reinitialised + * through a reset; + * + Handle the "kickpcu" state where the FIFO overflows. + * + Implement a "flush" routine, which doesn't push any + * new frames into the FIFO. + * + Verify multi-descriptor frames work! + * + There's a "memory use after free" which needs to be tracked down + * and fixed ASAP. I've seen this in the legacy path too, so it + * may be a generic RX path issue. + */ + +/* + * XXX shuffle the function orders so these pre-declarations aren't + * required! + */ +static int ath_edma_rxfifo_alloc(struct ath_softc *sc, HAL_RX_QUEUE qtype, + int nbufs); +static int ath_edma_rxfifo_flush(struct ath_softc *sc, HAL_RX_QUEUE qtype); +static void ath_edma_rxbuf_free(struct ath_softc *sc, struct ath_buf *bf); + static void ath_edma_stoprecv(struct ath_softc *sc, int dodelay) { @@ -128,25 +160,51 @@ ath_edma_stoprecv(struct ath_softc *sc, DELAY(3000); - if (sc->sc_rxpending != NULL) { - m_freem(sc->sc_rxpending); - sc->sc_rxpending = NULL; + /* Flush RX pending for each queue */ + /* XXX should generic-ify this */ + if (sc->sc_rxedma[HAL_RX_QUEUE_HP].m_rxpending) { + m_freem(sc->sc_rxedma[HAL_RX_QUEUE_HP].m_rxpending); + sc->sc_rxedma[HAL_RX_QUEUE_HP].m_rxpending = NULL; } - sc->sc_rxlink = NULL; + if (sc->sc_rxedma[HAL_RX_QUEUE_LP].m_rxpending) { + m_freem(sc->sc_rxedma[HAL_RX_QUEUE_LP].m_rxpending); + sc->sc_rxedma[HAL_RX_QUEUE_LP].m_rxpending = NULL; + } } +/* + * Start receive. + * + * XXX TODO: this needs to reallocate the FIFO entries when a reset + * occurs, in case the FIFO is filled up and no new descriptors get + * thrown into the FIFO. + */ static int ath_edma_startrecv(struct ath_softc *sc) { struct ath_hal *ah = sc->sc_ah; - sc->sc_rxlink = NULL; - sc->sc_rxpending = NULL; + /* Enable RX FIFO */ + ath_hal_rxena(ah); + + /* + * XXX write out a complete set of FIFO entries based on + * what's currently available. + */ + + /* Add up to m_fifolen entries in each queue */ + /* + * These must occur after the above write so the FIFO buffers + * are pushed/tracked in the same order as the hardware will + * process them. + */ + ath_edma_rxfifo_alloc(sc, HAL_RX_QUEUE_HP, + sc->sc_rxedma[HAL_RX_QUEUE_HP].m_fifolen); + + ath_edma_rxfifo_alloc(sc, HAL_RX_QUEUE_LP, + sc->sc_rxedma[HAL_RX_QUEUE_LP].m_fifolen); - /* XXX setup HP RX queue FIFO pointer */ - /* XXX setup LP RX queue FIFO pointer */ - /* XXX ath_hal_rxena() */ ath_mode_init(sc); ath_hal_startpcurecv(ah); return (0); @@ -157,6 +215,113 @@ ath_edma_recv_flush(struct ath_softc *sc { device_printf(sc->sc_dev, "%s: called\n", __func__); + + /* + * XXX for now, free all descriptors. Later on, complete + * what can be completed! + */ +#if 0 + ath_edma_rxfifo_flush(sc, HAL_RX_QUEUE_HP); + ath_edma_rxfifo_flush(sc, HAL_RX_QUEUE_LP); +#endif +} + +/* + * Process frames from the current queue. + * + * TODO: + * + * + Add a "dosched" flag, so we don't reschedule any FIFO frames + * to the hardware or re-kick the PCU after 'kickpcu' is set. + * + * + Perhaps split "check FIFO contents" and "handle frames", so + * we can run the "check FIFO contents" in ath_intr(), but + * "handle frames" in the RX tasklet. + */ +static int +ath_edma_recv_proc_queue(struct ath_softc *sc, HAL_RX_QUEUE qtype) +{ + struct ath_rx_edma *re = &sc->sc_rxedma[qtype]; + struct ath_rx_status *rs; + struct ath_desc *ds; + struct ath_buf *bf; + int n = 0; + struct mbuf *m; + HAL_STATUS status; + struct ath_hal *ah = sc->sc_ah; + uint64_t tsf; + int16_t nf; + + tsf = ath_hal_gettsf64(ah); + nf = ath_hal_getchannoise(ah, sc->sc_curchan); + sc->sc_stats.ast_rx_noise = nf; + + do { + bf = re->m_fifo[re->m_fifo_head]; + /* This shouldn't occur! */ + if (bf == NULL) { + device_printf(sc->sc_dev, "%s: Q%d: NULL bf?\n", + __func__, + qtype); + break; + } + m = bf->bf_m; + ds = bf->bf_desc; + + /* + * Sync descriptor memory - this also syncs the buffer for us. + * + * EDMA descriptors are in cached memory. + */ + bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, + BUS_DMASYNC_POSTREAD); + rs = &bf->bf_status.ds_rxstat; + status = ath_hal_rxprocdesc(ah, ds, bf->bf_daddr, NULL, rs); +#ifdef ATH_DEBUG + if (sc->sc_debug & ATH_DEBUG_RECV_DESC) + ath_printrxbuf(sc, bf, 0, status == HAL_OK); +#endif + if (status == HAL_EINPROGRESS) + break; + + /* + * Completed descriptor. + * + * In the future we'll call ath_rx_pkt(), but it first + * has to be taught about EDMA RX queues (so it can + * access sc_rxpending correctly.) + */ + DPRINTF(sc, ATH_DEBUG_EDMA_RX, + "%s: Q%d: completed!\n", __func__, qtype); + + /* + * Remove the FIFO entry! + */ + re->m_fifo[re->m_fifo_head] = NULL; + + /* + * Skip the RX descriptor status - start at the data offset + */ + m_adj(m, sc->sc_rx_statuslen); + + /* Handle the frame */ + (void) ath_rx_pkt(sc, rs, status, tsf, nf, qtype, bf); + + /* Free the buffer/mbuf */ + ath_edma_rxbuf_free(sc, bf); + + /* Bump the descriptor FIFO stats */ + INCR(re->m_fifo_head, re->m_fifolen); + re->m_fifo_depth--; + /* XXX check it doesn't fall below 0 */ + } while (re->m_fifo_depth > 0); + + /* Handle resched and kickpcu appropriately */ + + /* Append some more fresh frames to the FIFO */ + ath_edma_rxfifo_alloc(sc, qtype, re->m_fifolen); + + return (n); } static void @@ -164,18 +329,326 @@ ath_edma_recv_tasklet(void *arg, int npe { struct ath_softc *sc = (struct ath_softc *) arg; - device_printf(sc->sc_dev, "%s: called; npending=%d\n", + DPRINTF(sc, ATH_DEBUG_EDMA_RX, "%s: called; npending=%d\n", __func__, npending); - /* XXX TODO */ + + ath_edma_recv_proc_queue(sc, HAL_RX_QUEUE_HP); + ath_edma_recv_proc_queue(sc, HAL_RX_QUEUE_LP); } +/* + * Allocate an RX mbuf for the given ath_buf and initialise + * it for EDMA. + * + * + Allocate a 4KB mbuf; + * + Setup the DMA map for the given buffer; + * + Keep a pointer to the start of the mbuf - that's where the + * descriptor lies; + * + Take a pointer to the start of the RX buffer, set the + * mbuf "start" to be there; + * + Return that. + */ static int ath_edma_rxbuf_init(struct ath_softc *sc, struct ath_buf *bf) { - device_printf(sc->sc_dev, "%s: called; bf=%p\n", __func__, bf); - return (EIO); + struct mbuf *m; + int error; + int len; + +// device_printf(sc->sc_dev, "%s: called; bf=%p\n", __func__, bf); + + m = m_getm(NULL, sc->sc_edma_bufsize, M_DONTWAIT, MT_DATA); + if (! m) + return (ENOBUFS); /* XXX ?*/ + + /* XXX warn/enforce alignment */ + + len = m->m_ext.ext_size; +#if 0 + device_printf(sc->sc_dev, "%s: called: m=%p, size=%d, mtod=%p\n", + __func__, + m, + len, + mtod(m, char *)); +#endif + + m->m_pkthdr.len = m->m_len = m->m_ext.ext_size; + + /* + * Create DMA mapping. + */ + error = bus_dmamap_load_mbuf_sg(sc->sc_dmat, + bf->bf_dmamap, m, bf->bf_segs, &bf->bf_nseg, BUS_DMA_NOWAIT); + if (error != 0) { + device_printf(sc->sc_dev, "%s: failed; error=%d\n", + __func__, + error); + m_freem(m); + return (error); + } + + /* + * Populate ath_buf fields. + */ + + bf->bf_desc = mtod(m, struct ath_desc *); + bf->bf_daddr = bf->bf_segs[0].ds_addr; + bf->bf_lastds = bf->bf_desc; /* XXX only really for TX? */ + bf->bf_m = m; + + /* Zero the descriptor */ + memset(bf->bf_desc, '\0', sc->sc_rx_statuslen); + +#if 0 + /* + * Adjust mbuf header and length/size to compensate for the + * descriptor size. + */ + m_adj(m, sc->sc_rx_statuslen); +#endif + + /* Finish! */ + + return (0); +} + +static struct ath_buf * +ath_edma_rxbuf_alloc(struct ath_softc *sc) +{ + struct ath_buf *bf; + int error; + + /* Allocate buffer */ + bf = TAILQ_FIRST(&sc->sc_rxbuf); + /* XXX shouldn't happen upon startup? */ + if (bf == NULL) + return (NULL); + + /* Remove it from the free list */ + TAILQ_REMOVE(&sc->sc_rxbuf, bf, bf_list); + + /* Assign RX mbuf to it */ + error = ath_edma_rxbuf_init(sc, bf); + if (error != 0) { + device_printf(sc->sc_dev, + "%s: bf=%p, rxbuf alloc failed! error=%d\n", + __func__, + bf, + error); + TAILQ_INSERT_TAIL(&sc->sc_rxbuf, bf, bf_list); + return (NULL); + } + + return (bf); +} + +static void +ath_edma_rxbuf_free(struct ath_softc *sc, struct ath_buf *bf) +{ + + bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); + + if (bf->bf_m) { + m_freem(bf->bf_m); + bf->bf_m = NULL; + } + + /* XXX lock? */ + TAILQ_INSERT_TAIL(&sc->sc_rxbuf, bf, bf_list); +} + +/* + * Allocate up to 'n' entries and push them onto the hardware FIFO. + * + * Return how many entries were successfully pushed onto the + * FIFO. + */ +static int +ath_edma_rxfifo_alloc(struct ath_softc *sc, HAL_RX_QUEUE qtype, int nbufs) +{ + struct ath_rx_edma *re = &sc->sc_rxedma[qtype]; + struct ath_buf *bf; + int i; + + /* + * Allocate buffers until the FIFO is full or nbufs is reached. + */ + for (i = 0; i < nbufs && re->m_fifo_depth < re->m_fifolen; i++) { + /* Ensure the FIFO is already blank, complain loudly! */ + if (re->m_fifo[re->m_fifo_tail] != NULL) { + device_printf(sc->sc_dev, + "%s: Q%d: fifo[%d] != NULL (%p)\n", + __func__, + qtype, + re->m_fifo_tail, + re->m_fifo[re->m_fifo_tail]); + + /* Free the slot */ + ath_edma_rxbuf_free(sc, re->m_fifo[re->m_fifo_tail]); + re->m_fifo_depth--; + /* XXX check it's not < 0 */ + re->m_fifo[re->m_fifo_tail] = NULL; + } + + bf = ath_edma_rxbuf_alloc(sc); + /* XXX should ensure the FIFO is not NULL? */ + if (bf == NULL) { + device_printf(sc->sc_dev, "%s: Q%d: alloc failed?\n", + __func__, + qtype); + break; + } + + re->m_fifo[re->m_fifo_tail] = bf; + + /* + * Flush the descriptor contents before it's handed to the + * hardware. + */ + bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, + BUS_DMASYNC_PREREAD); + + /* Write to the RX FIFO */ + DPRINTF(sc, ATH_DEBUG_EDMA_RX, "%s: Q%d: putrxbuf=%p\n", + __func__, + qtype, + bf->bf_desc); + ath_hal_putrxbuf(sc->sc_ah, bf->bf_daddr, qtype); + + re->m_fifo_depth++; + INCR(re->m_fifo_tail, re->m_fifolen); + } + + /* + * Return how many were allocated. + */ + DPRINTF(sc, ATH_DEBUG_EDMA_RX, "%s: Q%d: nbufs=%d, nalloced=%d\n", + __func__, + qtype, + nbufs, + i); + return (i); +} + +static int +ath_edma_rxfifo_flush(struct ath_softc *sc, HAL_RX_QUEUE qtype) +{ + struct ath_rx_edma *re = &sc->sc_rxedma[qtype]; + int i; + + for (i = 0; i < re->m_fifolen; i++) { + if (re->m_fifo[i] != NULL) { + struct ath_buf *bf = re->m_fifo[i]; +#ifdef ATH_DEBUG + if (sc->sc_debug & ATH_DEBUG_RECV_DESC) + ath_printrxbuf(sc, bf, 0, HAL_OK); +#endif + ath_edma_rxbuf_free(sc, re->m_fifo[i]); + re->m_fifo[i] = NULL; + re->m_fifo_depth--; + } + } + + if (re->m_rxpending != NULL) { + m_freem(re->m_rxpending); + re->m_rxpending = NULL; + } + re->m_fifo_head = re->m_fifo_tail = re->m_fifo_depth = 0; + + return (0); +} + +/* + * Setup the initial RX FIFO structure. + */ +static int +ath_edma_setup_rxfifo(struct ath_softc *sc, HAL_RX_QUEUE qtype) +{ + struct ath_rx_edma *re = &sc->sc_rxedma[qtype]; + + if (! ath_hal_getrxfifodepth(sc->sc_ah, qtype, &re->m_fifolen)) { + device_printf(sc->sc_dev, "%s: qtype=%d, failed\n", + __func__, + qtype); + return (-EINVAL); + } + device_printf(sc->sc_dev, "%s: type=%d, FIFO depth = %d entries\n", + __func__, + qtype, + re->m_fifolen); + + /* Allocate ath_buf FIFO array, pre-zero'ed */ + re->m_fifo = malloc(sizeof(struct ath_buf *) * re->m_fifolen, + M_ATHDEV, + M_NOWAIT | M_ZERO); + if (re->m_fifo == NULL) { + device_printf(sc->sc_dev, "%s: malloc failed\n", + __func__); + return (-ENOMEM); + } + + /* + * Set initial "empty" state. + */ + re->m_rxpending = NULL; + re->m_fifo_head = re->m_fifo_tail = re->m_fifo_depth = 0; + + return (0); +} + +static int +ath_edma_rxfifo_free(struct ath_softc *sc, HAL_RX_QUEUE qtype) +{ + struct ath_rx_edma *re = &sc->sc_rxedma[qtype]; + + device_printf(sc->sc_dev, "%s: called; qtype=%d\n", + __func__, + qtype); + + free(re->m_fifo, M_ATHDEV); + + return (0); +} + +static int +ath_edma_dma_rxsetup(struct ath_softc *sc) +{ + int error; + + /* Create RX DMA tag */ + /* Create RX ath_buf array */ + + error = ath_descdma_setup(sc, &sc->sc_rxdma, &sc->sc_rxbuf, + "rx", ath_rxbuf, 1); + if (error != 0) + return error; + + (void) ath_edma_setup_rxfifo(sc, HAL_RX_QUEUE_HP); + (void) ath_edma_setup_rxfifo(sc, HAL_RX_QUEUE_LP); + + return (0); +} + +static int +ath_edma_dma_rxteardown(struct ath_softc *sc) +{ + + device_printf(sc->sc_dev, "%s: called\n", __func__); + + ath_edma_rxfifo_flush(sc, HAL_RX_QUEUE_HP); + ath_edma_rxfifo_free(sc, HAL_RX_QUEUE_HP); + + ath_edma_rxfifo_flush(sc, HAL_RX_QUEUE_LP); + ath_edma_rxfifo_free(sc, HAL_RX_QUEUE_LP); + + /* Free RX ath_buf */ + /* Free RX DMA tag */ + if (sc->sc_rxdma.dd_desc_len != 0) + ath_descdma_cleanup(sc, &sc->sc_rxdma, &sc->sc_rxbuf); + + return (0); } void @@ -184,9 +657,35 @@ ath_recv_setup_edma(struct ath_softc *sc device_printf(sc->sc_dev, "DMA setup: EDMA\n"); + /* Set buffer size to 4k */ + sc->sc_edma_bufsize = 4096; + + /* Configure the hardware with this */ + (void) ath_hal_setrxbufsize(sc->sc_ah, sc->sc_edma_bufsize); + + /* Fetch EDMA field and buffer sizes */ + (void) ath_hal_getrxstatuslen(sc->sc_ah, &sc->sc_rx_statuslen); + (void) ath_hal_gettxdesclen(sc->sc_ah, &sc->sc_tx_desclen); + (void) ath_hal_gettxstatuslen(sc->sc_ah, &sc->sc_tx_statuslen); + (void) ath_hal_getntxmaps(sc->sc_ah, &sc->sc_tx_nmaps); + + device_printf(sc->sc_dev, "RX status length: %d\n", + sc->sc_rx_statuslen); + device_printf(sc->sc_dev, "TX descriptor length: %d\n", + sc->sc_tx_desclen); + device_printf(sc->sc_dev, "TX status length: %d\n", + sc->sc_tx_statuslen); + device_printf(sc->sc_dev, "TX/RX buffer size: %d\n", + sc->sc_edma_bufsize); + device_printf(sc->sc_dev, "TX buffers per descriptor: %d\n", + sc->sc_tx_nmaps); + sc->sc_rx.recv_stop = ath_edma_stoprecv; sc->sc_rx.recv_start = ath_edma_startrecv; sc->sc_rx.recv_flush = ath_edma_recv_flush; sc->sc_rx.recv_tasklet = ath_edma_recv_tasklet; sc->sc_rx.recv_rxbuf_init = ath_edma_rxbuf_init; + + sc->sc_rx.recv_setup = ath_edma_dma_rxsetup; + sc->sc_rx.recv_teardown = ath_edma_dma_rxteardown; } From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 00:23:26 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 49336106566B; Tue, 10 Jul 2012 00:23:26 +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 1AC9C8FC08; Tue, 10 Jul 2012 00:23:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6A0NPw9048497; Tue, 10 Jul 2012 00:23:25 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A0NPbb048495; Tue, 10 Jul 2012 00:23:25 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201207100023.q6A0NPbb048495@svn.freebsd.org> From: Attilio Rao Date: Tue, 10 Jul 2012 00:23:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238320 - head/sys/fs/ntfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 00:23:26 -0000 Author: attilio Date: Tue Jul 10 00:23:25 2012 New Revision: 238320 URL: http://svn.freebsd.org/changeset/base/238320 Log: Remove a check on MNTK_UPDATE that is not really necessary as it is handled in a code snippet above. Modified: head/sys/fs/ntfs/ntfs_vfsops.c Modified: head/sys/fs/ntfs/ntfs_vfsops.c ============================================================================== --- head/sys/fs/ntfs/ntfs_vfsops.c Tue Jul 10 00:14:42 2012 (r238319) +++ head/sys/fs/ntfs/ntfs_vfsops.c Tue Jul 10 00:23:25 2012 (r238320) @@ -212,45 +212,22 @@ ntfs_mount(struct mount *mp) return (err); } - if (mp->mnt_flag & MNT_UPDATE) { -#if 0 - /* - ******************** - * UPDATE - ******************** - */ - - if (devvp != ntmp->um_devvp) - err = EINVAL; /* needs translation */ - vput(devvp); - if (err) - return (err); -#endif - } else { - /* - ******************** - * NEW MOUNT - ******************** - */ - - /* - * Since this is a new mount, we want the names for - * the device and the mount point copied in. If an - * error occurs, the mountpoint is discarded by the - * upper level code. Note that vfs_mount() handles - * copying the mountpoint f_mntonname for us, so we - * don't have to do it here unless we want to set it - * to something other than "path" for some rason. - */ - err = ntfs_mountfs(devvp, mp, td); - if (err == 0) { + /* + * Since this is a new mount, we want the names for the device and + * the mount point copied in. If an error occurs, the mountpoint is + * discarded by the upper level code. Note that vfs_mount() handles + * copying the mountpoint f_mntonname for us, so we don't have to do + * it here unless we want to set it to something other than "path" + * for some rason. + */ - /* Save "mounted from" info for mount point. */ - vfs_mountedfrom(mp, from); - } - } - if (err) + err = ntfs_mountfs(devvp, mp, td); + if (err == 0) { + + /* Save "mounted from" info for mount point. */ + vfs_mountedfrom(mp, from); + } else vrele(devvp); return (err); } From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 01:13:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E363C106567A; Tue, 10 Jul 2012 01:13:00 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF3708FC18; Tue, 10 Jul 2012 01:13:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6A1D0F6050796; Tue, 10 Jul 2012 01:13:00 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A1D0lN050794; Tue, 10 Jul 2012 01:13:00 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207100113.q6A1D0lN050794@svn.freebsd.org> From: Warner Losh Date: Tue, 10 Jul 2012 01:13:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238325 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 01:13:01 -0000 Author: imp Date: Tue Jul 10 01:13:00 2012 New Revision: 238325 URL: http://svn.freebsd.org/changeset/base/238325 Log: There's nothing AT91RM9200 specific about this file at all. Modified: head/sys/arm/at91/uart_bus_at91usart.c Modified: head/sys/arm/at91/uart_bus_at91usart.c ============================================================================== --- head/sys/arm/at91/uart_bus_at91usart.c Tue Jul 10 00:58:40 2012 (r238324) +++ head/sys/arm/at91/uart_bus_at91usart.c Tue Jul 10 01:13:00 2012 (r238325) @@ -42,33 +42,32 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include "uart_if.h" -static int usart_at91rm92_probe(device_t dev); +static int usart_at91_probe(device_t dev); extern struct uart_class at91_usart_class; -static device_method_t usart_at91rm92_methods[] = { +static device_method_t usart_at91_methods[] = { /* Device interface */ - DEVMETHOD(device_probe, usart_at91rm92_probe), + DEVMETHOD(device_probe, usart_at91_probe), DEVMETHOD(device_attach, uart_bus_attach), DEVMETHOD(device_detach, uart_bus_detach), { 0, 0 } }; -static driver_t usart_at91rm92_driver = { +static driver_t usart_at91_driver = { uart_driver_name, - usart_at91rm92_methods, + usart_at91_methods, sizeof(struct uart_softc), }; extern SLIST_HEAD(uart_devinfo_list, uart_devinfo) uart_sysdevs; static int -usart_at91rm92_probe(device_t dev) +usart_at91_probe(device_t dev) { struct uart_softc *sc; @@ -104,4 +103,4 @@ usart_at91rm92_probe(device_t dev) } -DRIVER_MODULE(uart, atmelarm, usart_at91rm92_driver, uart_devclass, 0, 0); +DRIVER_MODULE(uart, atmelarm, usart_at91_driver, uart_devclass, 0, 0); From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 01:32:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C4D41106566B; Tue, 10 Jul 2012 01:32:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 965998FC14; Tue, 10 Jul 2012 01:32:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6A1WqRD051720; Tue, 10 Jul 2012 01:32:52 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A1WqDX051718; Tue, 10 Jul 2012 01:32:52 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207100132.q6A1WqDX051718@svn.freebsd.org> From: Warner Losh Date: Tue, 10 Jul 2012 01:32:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238327 - head/sys/arm/xscale X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 01:32:52 -0000 Author: imp Date: Tue Jul 10 01:32:52 2012 New Revision: 238327 URL: http://svn.freebsd.org/changeset/base/238327 Log: Not quite ready for this yet, so comment it out. Modified: head/sys/arm/xscale/std.xscale Modified: head/sys/arm/xscale/std.xscale ============================================================================== --- head/sys/arm/xscale/std.xscale Tue Jul 10 01:25:25 2012 (r238326) +++ head/sys/arm/xscale/std.xscale Tue Jul 10 01:32:52 2012 (r238327) @@ -1,3 +1,3 @@ # $FreeBSD$ -machine arm armeb +# machine arm armeb options ARM_CACHE_LOCK_ENABLE From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 01:47:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 90C9F106566B; Tue, 10 Jul 2012 01:47:12 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7BDC98FC08; Tue, 10 Jul 2012 01:47:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6A1lCd2052339; Tue, 10 Jul 2012 01:47:12 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A1lCPE052337; Tue, 10 Jul 2012 01:47:12 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201207100147.q6A1lCPE052337@svn.freebsd.org> From: David Xu Date: Tue, 10 Jul 2012 01:47:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238328 - head/lib/libc/i386/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 01:47:12 -0000 Author: davidxu Date: Tue Jul 10 01:47:11 2012 New Revision: 238328 URL: http://svn.freebsd.org/changeset/base/238328 Log: Executing CPUID with EAX set to 1 to actually get feature flags. PR: 169730 Modified: head/lib/libc/i386/gen/getcontextx.c Modified: head/lib/libc/i386/gen/getcontextx.c ============================================================================== --- head/lib/libc/i386/gen/getcontextx.c Tue Jul 10 01:32:52 2012 (r238327) +++ head/lib/libc/i386/gen/getcontextx.c Tue Jul 10 01:47:11 2012 (r238328) @@ -68,7 +68,7 @@ __getcontextx_size(void) " movl %%ebx,%1\n" " popl %%ebx\n" : "=a" (p[0]), "=r" (p[1]), "=c" (p[2]), "=d" (p[3]) - : "0" (0x0)); + : "0" (0x1)); if ((p[2] & CPUID2_OSXSAVE) != 0) { __asm __volatile( " pushl %%ebx\n" From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 01:49:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D17F3106566B; Tue, 10 Jul 2012 01:49:50 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BAA268FC18; Tue, 10 Jul 2012 01:49:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6A1noAH052486; Tue, 10 Jul 2012 01:49:50 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A1no0Q052473; Tue, 10 Jul 2012 01:49:50 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207100149.q6A1no0Q052473@svn.freebsd.org> From: Warner Losh Date: Tue, 10 Jul 2012 01:49:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238329 - in head/sys/arm: at91 conf econa include mv s3c2xx0 sa11x0 xscale/i80321 xscale/i8134x xscale/ixp425 xscale/pxa X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 01:49:51 -0000 Author: imp Date: Tue Jul 10 01:49:50 2012 New Revision: 238329 URL: http://svn.freebsd.org/changeset/base/238329 Log: Remove some unused variables/externs that have been copied too many times... Modified: head/sys/arm/at91/at91_machdep.c head/sys/arm/conf/KB920X head/sys/arm/econa/econa_machdep.c head/sys/arm/include/atomic.h head/sys/arm/mv/mv_machdep.c head/sys/arm/s3c2xx0/s3c24x0_machdep.c head/sys/arm/sa11x0/assabet_machdep.c head/sys/arm/xscale/i80321/ep80219_machdep.c head/sys/arm/xscale/i80321/iq31244_machdep.c head/sys/arm/xscale/i8134x/crb_machdep.c head/sys/arm/xscale/ixp425/avila_machdep.c head/sys/arm/xscale/pxa/pxa_machdep.c Modified: head/sys/arm/at91/at91_machdep.c ============================================================================== --- head/sys/arm/at91/at91_machdep.c Tue Jul 10 01:47:11 2012 (r238328) +++ head/sys/arm/at91/at91_machdep.c Tue Jul 10 01:49:50 2012 (r238329) @@ -115,10 +115,6 @@ extern u_int undefined_handler_address; struct pv_addr kernel_pt_table[NUM_KERNEL_PTS]; -extern void *_end; - -extern int *end; - struct pcpu __pcpu; struct pcpu *pcpup = &__pcpu; @@ -126,7 +122,6 @@ struct pcpu *pcpup = &__pcpu; vm_paddr_t phys_avail[10]; vm_paddr_t dump_avail[4]; -vm_offset_t physical_pages; struct pv_addr systempage; struct pv_addr msgbufpv; Modified: head/sys/arm/conf/KB920X ============================================================================== --- head/sys/arm/conf/KB920X Tue Jul 10 01:47:11 2012 (r238328) +++ head/sys/arm/conf/KB920X Tue Jul 10 01:49:50 2012 (r238329) @@ -21,10 +21,16 @@ ident KB920X include "../at91/std.kb920x" +# bring in the sam specific timers and such +#include "../at91/std.at91sam9" +nodevice at91rm9200 +device at91sam9 +device at91sam9x25 # The AT91 platform doesn't use /boot/loader, so we have to statically wire # hints. hints "KB920X.hints" -#makeoptions MODULES_OVERRIDE="" +makeoptions MODULES_OVERRIDE="" +options LINUX_BOOT_ABI makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols options DDB @@ -81,7 +87,7 @@ device lxtphy #options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed device md -device at91_twi # TWI: Two Wire Interface +#device at91_twi # TWI: Two Wire Interface device at91_spi # SPI: device spibus # MMC/SD @@ -137,6 +143,8 @@ device wlan_wep # 802.11 WEP support device wlan_ccmp # 802.11 CCMP support device wlan_tkip # 802.11 TKIP support device wlan_amrr # AMRR transmit rate control algorithm + +#device cfi options IEEE80211_SUPPORT_MESH options AH_SUPPORT_AR5416 Modified: head/sys/arm/econa/econa_machdep.c ============================================================================== --- head/sys/arm/econa/econa_machdep.c Tue Jul 10 01:47:11 2012 (r238328) +++ head/sys/arm/econa/econa_machdep.c Tue Jul 10 01:49:50 2012 (r238329) @@ -103,10 +103,6 @@ extern u_int undefined_handler_address; struct pv_addr kernel_pt_table[NUM_KERNEL_PTS]; -extern void *_end; - -extern int *end; - struct pcpu __pcpu; struct pcpu *pcpup = &__pcpu; @@ -114,7 +110,6 @@ struct pcpu *pcpup = &__pcpu; vm_paddr_t phys_avail[10]; vm_paddr_t dump_avail[4]; -vm_offset_t physical_pages; struct pv_addr systempage; struct pv_addr msgbufpv; Modified: head/sys/arm/include/atomic.h ============================================================================== --- head/sys/arm/include/atomic.h Tue Jul 10 01:47:11 2012 (r238328) +++ head/sys/arm/include/atomic.h Tue Jul 10 01:49:50 2012 (r238329) @@ -347,7 +347,9 @@ atomic_readandclear_32(volatile u_int32_ #define atomic_cmpset_ptr(dst, old, new) \ atomic_cmpset_32((volatile u_int *)(dst), (u_int)(old), (u_int)(new)) #define atomic_cmpset_rel_ptr atomic_cmpset_ptr -#define atomic_cmpset_acq_ptr atomic_cmpset_ptr +#define atomic_cmpset_acq_ptr(dst, old, new) \ + atomic_cmpset_ptr((volatile uint32_t *)(dst), (volatile uint32_t)(old), \ + (volatile uint32_t)(new)) #define atomic_store_ptr atomic_store_32 #define atomic_store_rel_ptr atomic_store_ptr Modified: head/sys/arm/mv/mv_machdep.c ============================================================================== --- head/sys/arm/mv/mv_machdep.c Tue Jul 10 01:47:11 2012 (r238328) +++ head/sys/arm/mv/mv_machdep.c Tue Jul 10 01:49:50 2012 (r238329) @@ -115,16 +115,11 @@ extern unsigned char _edata[]; extern unsigned char __bss_start[]; extern unsigned char _end[]; -#ifdef DDB -extern vm_offset_t ksym_start, ksym_end; -#endif - extern u_int data_abort_handler_address; extern u_int prefetch_abort_handler_address; extern u_int undefined_handler_address; extern vm_offset_t pmap_bootstrap_lastaddr; -extern int *end; struct pv_addr kernel_pt_table[KERNEL_PT_MAX]; struct pcpu __pcpu; @@ -134,7 +129,6 @@ struct pcpu *pcpup = &__pcpu; vm_paddr_t phys_avail[10]; vm_paddr_t dump_avail[4]; -vm_offset_t physical_pages; vm_offset_t pmap_bootstrap_lastaddr; const struct pmap_devmap *pmap_devmap_bootstrap_table; Modified: head/sys/arm/s3c2xx0/s3c24x0_machdep.c ============================================================================== --- head/sys/arm/s3c2xx0/s3c24x0_machdep.c Tue Jul 10 01:47:11 2012 (r238328) +++ head/sys/arm/s3c2xx0/s3c24x0_machdep.c Tue Jul 10 01:49:50 2012 (r238329) @@ -118,10 +118,6 @@ extern u_int undefined_handler_address; struct pv_addr kernel_pt_table[NUM_KERNEL_PTS]; -extern void *_end; - -extern int *end; - struct pcpu __pcpu; struct pcpu *pcpup = &__pcpu; @@ -129,7 +125,6 @@ struct pcpu *pcpup = &__pcpu; vm_paddr_t phys_avail[10]; vm_paddr_t dump_avail[4]; -vm_offset_t physical_pages; struct pv_addr systempage; struct pv_addr msgbufpv; @@ -203,10 +198,6 @@ static const struct pmap_devmap s3c24x0_ #define ioreg_read32(a) (*(volatile uint32_t *)(a)) #define ioreg_write32(a,v) (*(volatile uint32_t *)(a)=(v)) -#ifdef DDB -extern vm_offset_t ksym_start, ksym_end; -#endif - struct arm32_dma_range s3c24x0_range = { .dr_sysbase = 0, .dr_busbase = 0, Modified: head/sys/arm/sa11x0/assabet_machdep.c ============================================================================== --- head/sys/arm/sa11x0/assabet_machdep.c Tue Jul 10 01:47:11 2012 (r238328) +++ head/sys/arm/sa11x0/assabet_machdep.c Tue Jul 10 01:49:50 2012 (r238329) @@ -119,14 +119,10 @@ extern u_int undefined_handler_address; struct pv_addr kernel_pt_table[NUM_KERNEL_PTS]; -extern void *_end; - extern vm_offset_t sa1110_uart_vaddr; extern vm_offset_t sa1_cache_clean_addr; -extern int *end; - struct pcpu __pcpu; struct pcpu *pcpup = &__pcpu; @@ -140,7 +136,6 @@ vm_paddr_t dump_avail[4]; vm_paddr_t physical_start; vm_paddr_t physical_end; vm_paddr_t physical_freestart; -vm_offset_t physical_pages; struct pv_addr systempage; struct pv_addr irqstack; Modified: head/sys/arm/xscale/i80321/ep80219_machdep.c ============================================================================== --- head/sys/arm/xscale/i80321/ep80219_machdep.c Tue Jul 10 01:47:11 2012 (r238328) +++ head/sys/arm/xscale/i80321/ep80219_machdep.c Tue Jul 10 01:49:50 2012 (r238329) @@ -115,10 +115,6 @@ extern u_int undefined_handler_address; struct pv_addr kernel_pt_table[NUM_KERNEL_PTS]; -extern void *_end; - -extern int *end; - struct pcpu __pcpu; struct pcpu *pcpup = &__pcpu; @@ -126,7 +122,6 @@ struct pcpu *pcpup = &__pcpu; vm_paddr_t phys_avail[10]; vm_paddr_t dump_avail[4]; -vm_offset_t physical_pages; struct pv_addr systempage; struct pv_addr msgbufpv; Modified: head/sys/arm/xscale/i80321/iq31244_machdep.c ============================================================================== --- head/sys/arm/xscale/i80321/iq31244_machdep.c Tue Jul 10 01:47:11 2012 (r238328) +++ head/sys/arm/xscale/i80321/iq31244_machdep.c Tue Jul 10 01:49:50 2012 (r238329) @@ -115,10 +115,6 @@ extern u_int undefined_handler_address; struct pv_addr kernel_pt_table[NUM_KERNEL_PTS]; -extern void *_end; - -extern int *end; - struct pcpu __pcpu; struct pcpu *pcpup = &__pcpu; @@ -126,7 +122,6 @@ struct pcpu *pcpup = &__pcpu; vm_paddr_t phys_avail[10]; vm_paddr_t dump_avail[4]; -vm_offset_t physical_pages; struct pv_addr systempage; struct pv_addr msgbufpv; Modified: head/sys/arm/xscale/i8134x/crb_machdep.c ============================================================================== --- head/sys/arm/xscale/i8134x/crb_machdep.c Tue Jul 10 01:47:11 2012 (r238328) +++ head/sys/arm/xscale/i8134x/crb_machdep.c Tue Jul 10 01:49:50 2012 (r238329) @@ -117,7 +117,6 @@ extern u_int prefetch_abort_handler_addr extern u_int undefined_handler_address; struct pv_addr kernel_pt_table[NUM_KERNEL_PTS]; -extern int *end; struct pcpu __pcpu; struct pcpu *pcpup = &__pcpu; @@ -126,7 +125,6 @@ struct pcpu *pcpup = &__pcpu; vm_paddr_t phys_avail[10]; vm_paddr_t dump_avail[4]; -vm_offset_t physical_pages; struct pv_addr systempage; struct pv_addr msgbufpv; Modified: head/sys/arm/xscale/ixp425/avila_machdep.c ============================================================================== --- head/sys/arm/xscale/ixp425/avila_machdep.c Tue Jul 10 01:47:11 2012 (r238328) +++ head/sys/arm/xscale/ixp425/avila_machdep.c Tue Jul 10 01:49:50 2012 (r238329) @@ -119,10 +119,6 @@ extern u_int undefined_handler_address; struct pv_addr kernel_pt_table[NUM_KERNEL_PTS]; -extern void *_end; - -extern int *end; - struct pcpu __pcpu; struct pcpu *pcpup = &__pcpu; @@ -130,7 +126,6 @@ struct pcpu *pcpup = &__pcpu; vm_paddr_t phys_avail[10]; vm_paddr_t dump_avail[4]; -vm_offset_t physical_pages; struct pv_addr systempage; struct pv_addr msgbufpv; Modified: head/sys/arm/xscale/pxa/pxa_machdep.c ============================================================================== --- head/sys/arm/xscale/pxa/pxa_machdep.c Tue Jul 10 01:47:11 2012 (r238328) +++ head/sys/arm/xscale/pxa/pxa_machdep.c Tue Jul 10 01:49:50 2012 (r238329) @@ -115,10 +115,6 @@ extern u_int undefined_handler_address; struct pv_addr kernel_pt_table[NUM_KERNEL_PTS]; -extern void *_end; - -extern int *end; - struct pcpu __pcpu; struct pcpu *pcpup = &__pcpu; @@ -126,7 +122,6 @@ struct pcpu *pcpup = &__pcpu; vm_paddr_t phys_avail[PXA2X0_SDRAM_BANKS * 2 + 4]; vm_paddr_t dump_avail[PXA2X0_SDRAM_BANKS * 2 + 4]; -vm_offset_t physical_pages; struct pv_addr systempage; struct pv_addr msgbufpv; From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 02:14:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2C0F7106564A; Tue, 10 Jul 2012 02:14:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BC638FC0C; Tue, 10 Jul 2012 02:14:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6A2Eo9O053730; Tue, 10 Jul 2012 02:14:50 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A2EoWF053721; Tue, 10 Jul 2012 02:14:50 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207100214.q6A2EoWF053721@svn.freebsd.org> From: Warner Losh Date: Tue, 10 Jul 2012 02:14:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238330 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 02:14:51 -0000 Author: imp Date: Tue Jul 10 02:14:50 2012 New Revision: 238330 URL: http://svn.freebsd.org/changeset/base/238330 Log: Eliminate the AT91XXXX_BASE for each SoC. AT91_BASE is the right way to spell this since we only have one AT91_BASE for all Atmel arm9 SoCs. Modified: head/sys/arm/at91/at91_reset.S head/sys/arm/at91/at91rm9200.c head/sys/arm/at91/at91rm92reg.h head/sys/arm/at91/at91sam9g20.c head/sys/arm/at91/at91sam9g20reg.h head/sys/arm/at91/at91sam9x25.c head/sys/arm/at91/at91sam9x25reg.h head/sys/arm/at91/uart_cpu_at91rm9200usart.c Modified: head/sys/arm/at91/at91_reset.S ============================================================================== --- head/sys/arm/at91/at91_reset.S Tue Jul 10 01:49:50 2012 (r238329) +++ head/sys/arm/at91/at91_reset.S Tue Jul 10 02:14:50 2012 (r238330) @@ -1,13 +1,14 @@ #include #include +#include #include __FBSDID("$FreeBSD$"); -#define SDRAM_TR (AT91SAM9G20_BASE + \ +#define SDRAM_TR (AT91_BASE + \ AT91SAM9G20_SDRAMC_BASE + AT91SAM9G20_SDRAMC_TR) -#define SDRAM_LPR (AT91SAM9G20_BASE + \ +#define SDRAM_LPR (AT91_BASE + \ AT91SAM9G20_SDRAMC_BASE + AT91SAM9G20_SDRAMC_LPR) -#define RSTC_RCR (AT91SAM9G20_BASE + \ +#define RSTC_RCR (AT91_BASE + \ AT91SAM9G20_RSTC_BASE + RST_CR) /* Modified: head/sys/arm/at91/at91rm9200.c ============================================================================== --- head/sys/arm/at91/at91rm9200.c Tue Jul 10 01:49:50 2012 (r238329) +++ head/sys/arm/at91/at91rm9200.c Tue Jul 10 02:14:50 2012 (r238330) @@ -164,8 +164,8 @@ at91_add_child(device_t dev, int prio, c bus_set_resource(kid, SYS_RES_IRQ, 1, irq1, 1); if (irq2 != 0) bus_set_resource(kid, SYS_RES_IRQ, 2, irq2, 1); - if (addr != 0 && addr < AT91RM92_BASE) - addr += AT91RM92_BASE; + if (addr != 0 && addr < AT91_BASE) + addr += AT91_BASE; if (addr != 0) bus_set_resource(kid, SYS_RES_MEMORY, 0, addr, size); } Modified: head/sys/arm/at91/at91rm92reg.h ============================================================================== --- head/sys/arm/at91/at91rm92reg.h Tue Jul 10 01:49:50 2012 (r238329) +++ head/sys/arm/at91/at91rm92reg.h Tue Jul 10 02:14:50 2012 (r238330) @@ -70,7 +70,6 @@ * 0xf0000000 - 0xfffffffff : Peripherals */ -#define AT91RM92_BASE 0xd0000000 /* Usart */ #define AT91RM92_USART_SIZE 0x4000 Modified: head/sys/arm/at91/at91sam9g20.c ============================================================================== --- head/sys/arm/at91/at91sam9g20.c Tue Jul 10 01:49:50 2012 (r238329) +++ head/sys/arm/at91/at91sam9g20.c Tue Jul 10 02:14:50 2012 (r238330) @@ -157,8 +157,8 @@ at91_add_child(device_t dev, int prio, c bus_set_resource(kid, SYS_RES_IRQ, 1, irq1, 1); if (irq2 != 0) bus_set_resource(kid, SYS_RES_IRQ, 2, irq2, 1); - if (addr != 0 && addr < AT91SAM9G20_BASE) - addr += AT91SAM9G20_BASE; + if (addr != 0 && addr < AT91_BASE) + addr += AT91_BASE; if (addr != 0) bus_set_resource(kid, SYS_RES_MEMORY, 0, addr, size); } Modified: head/sys/arm/at91/at91sam9g20reg.h ============================================================================== --- head/sys/arm/at91/at91sam9g20reg.h Tue Jul 10 01:49:50 2012 (r238329) +++ head/sys/arm/at91/at91sam9g20reg.h Tue Jul 10 02:14:50 2012 (r238330) @@ -73,8 +73,6 @@ #define AT91_CHIPSELECT_7 0x80000000 -#define AT91SAM9G20_BASE 0xd0000000 - #define AT91SAM9G20_EMAC_BASE 0xffc4000 #define AT91SAM9G20_EMAC_SIZE 0x4000 Modified: head/sys/arm/at91/at91sam9x25.c ============================================================================== --- head/sys/arm/at91/at91sam9x25.c Tue Jul 10 01:49:50 2012 (r238329) +++ head/sys/arm/at91/at91sam9x25.c Tue Jul 10 02:14:50 2012 (r238330) @@ -160,8 +160,8 @@ at91_add_child(device_t dev, int prio, c bus_set_resource(kid, SYS_RES_IRQ, 1, irq1, 1); if (irq2 != 0) bus_set_resource(kid, SYS_RES_IRQ, 2, irq2, 1); - if (addr != 0 && addr < AT91SAM9X25_BASE) - addr += AT91SAM9X25_BASE; + if (addr != 0 && addr < AT91_BASE) + addr += AT91_BASE; if (addr != 0) bus_set_resource(kid, SYS_RES_MEMORY, 0, addr, size); } Modified: head/sys/arm/at91/at91sam9x25reg.h ============================================================================== --- head/sys/arm/at91/at91sam9x25reg.h Tue Jul 10 01:49:50 2012 (r238329) +++ head/sys/arm/at91/at91sam9x25reg.h Tue Jul 10 02:14:50 2012 (r238330) @@ -73,8 +73,6 @@ #define AT91_CHIPSELECT_4 0x50000000 #define AT91_CHIPSELECT_5 0x60000000 -#define AT91SAM9X25_BASE 0xd0000000 - #define AT91SAM9X25_EMAC_SIZE 0x4000 #define AT91SAM9X25_EMAC0_BASE 0x802c000 #define AT91SAM9X25_EMAC0_SIZE AT91SAM9X25_EMAC_SIZE Modified: head/sys/arm/at91/uart_cpu_at91rm9200usart.c ============================================================================== --- head/sys/arm/at91/uart_cpu_at91rm9200usart.c Tue Jul 10 01:49:50 2012 (r238329) +++ head/sys/arm/at91/uart_cpu_at91rm9200usart.c Tue Jul 10 02:14:50 2012 (r238330) @@ -73,7 +73,7 @@ uart_cpu_getdev(int devtype, struct uart * XXX: Not pretty, but will work because we map the needed addresses * early. */ - di->bas.bsh = AT91RM92_BASE + AT91RM92_DBGU_BASE; + di->bas.bsh = AT91_BASE + AT91RM92_DBGU_BASE; di->baudrate = 115200; di->bas.regshft = 0; di->bas.rclk = 0; From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 02:39:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 77E701065670; Tue, 10 Jul 2012 02:39:04 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 587F98FC08; Tue, 10 Jul 2012 02:39:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6A2d4mj054715; Tue, 10 Jul 2012 02:39:04 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A2d4ee054709; Tue, 10 Jul 2012 02:39:04 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207100239.q6A2d4ee054709@svn.freebsd.org> From: Warner Losh Date: Tue, 10 Jul 2012 02:39:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238331 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 02:39:04 -0000 Author: imp Date: Tue Jul 10 02:39:03 2012 New Revision: 238331 URL: http://svn.freebsd.org/changeset/base/238331 Log: The system IRQ is always IRQ 1. Make it so. Modified: head/sys/arm/at91/at91reg.h head/sys/arm/at91/at91rm9200.c head/sys/arm/at91/at91sam9260.c head/sys/arm/at91/at91sam9g20.c head/sys/arm/at91/at91sam9x25.c Modified: head/sys/arm/at91/at91reg.h ============================================================================== --- head/sys/arm/at91/at91reg.h Tue Jul 10 02:14:50 2012 (r238330) +++ head/sys/arm/at91/at91reg.h Tue Jul 10 02:39:03 2012 (r238331) @@ -85,4 +85,6 @@ #define AT91_EXID_SAM9G25 0x00000003 #define AT91_EXID_SAM9X25 0x00000004 +#define AT91_IRQ_SYSTEM 1 + #endif /* _AT91REG_H_ */ Modified: head/sys/arm/at91/at91rm9200.c ============================================================================== --- head/sys/arm/at91/at91rm9200.c Tue Jul 10 02:14:50 2012 (r238330) +++ head/sys/arm/at91/at91rm9200.c Tue Jul 10 02:39:03 2012 (r238331) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -157,7 +158,7 @@ at91_add_child(device_t dev, int prio, c resource_list_init(&ivar->resources); if (irq0 != -1) { bus_set_resource(kid, SYS_RES_IRQ, 0, irq0, 1); - if (irq0 != AT91RM92_IRQ_SYSTEM) + if (irq0 != AT91_IRQ_SYSTEM) at91_pmc_clock_add(device_get_nameunit(kid), irq0, 0); } if (irq1 != 0) @@ -238,7 +239,7 @@ at91_attach(device_t dev) /* XXX Hack to tell atmelarm about the AIC */ at91sc->sc_aic_sh = sc->sc_aic_sh; - at91sc->sc_irq_system = AT91RM92_IRQ_SYSTEM; + at91sc->sc_irq_system = AT91_IRQ_SYSTEM; for (i = 0; i < 32; i++) { bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SVR + Modified: head/sys/arm/at91/at91sam9260.c ============================================================================== --- head/sys/arm/at91/at91sam9260.c Tue Jul 10 02:14:50 2012 (r238330) +++ head/sys/arm/at91/at91sam9260.c Tue Jul 10 02:39:03 2012 (r238331) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -150,7 +151,7 @@ at91_add_child(device_t dev, int prio, c resource_list_init(&ivar->resources); if (irq0 != -1) { bus_set_resource(kid, SYS_RES_IRQ, 0, irq0, 1); - if (irq0 != AT91SAM9260_IRQ_SYSTEM) + if (irq0 != AT91_IRQ_SYSTEM) at91_pmc_clock_add(device_get_nameunit(kid), irq0, 0); } if (irq1 != 0) @@ -238,7 +239,7 @@ at91_attach(device_t dev) /* XXX Hack to tell atmelarm about the AIC */ at91sc->sc_aic_sh = sc->sc_aic_sh; - at91sc->sc_irq_system = AT91SAM9260_IRQ_SYSTEM; + at91sc->sc_irq_system = AT91_IRQ_SYSTEM; for (i = 0; i < 32; i++) { bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SVR + Modified: head/sys/arm/at91/at91sam9g20.c ============================================================================== --- head/sys/arm/at91/at91sam9g20.c Tue Jul 10 02:14:50 2012 (r238330) +++ head/sys/arm/at91/at91sam9g20.c Tue Jul 10 02:39:03 2012 (r238331) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -150,7 +151,7 @@ at91_add_child(device_t dev, int prio, c resource_list_init(&ivar->resources); if (irq0 != -1) { bus_set_resource(kid, SYS_RES_IRQ, 0, irq0, 1); - if (irq0 != AT91SAM9G20_IRQ_SYSTEM) + if (irq0 != AT91_IRQ_SYSTEM) at91_pmc_clock_add(device_get_nameunit(kid), irq0, 0); } if (irq1 != 0) @@ -249,7 +250,7 @@ at91_attach(device_t dev) /* XXX Hack to tell atmelarm about the AIC */ at91sc->sc_aic_sh = sc->sc_aic_sh; - at91sc->sc_irq_system = AT91SAM9G20_IRQ_SYSTEM; + at91sc->sc_irq_system = AT91_IRQ_SYSTEM; for (i = 0; i < 32; i++) { bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SVR + Modified: head/sys/arm/at91/at91sam9x25.c ============================================================================== --- head/sys/arm/at91/at91sam9x25.c Tue Jul 10 02:14:50 2012 (r238330) +++ head/sys/arm/at91/at91sam9x25.c Tue Jul 10 02:39:03 2012 (r238331) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -153,7 +154,7 @@ at91_add_child(device_t dev, int prio, c resource_list_init(&ivar->resources); if (irq0 != -1) { bus_set_resource(kid, SYS_RES_IRQ, 0, irq0, 1); - if (irq0 != AT91SAM9X25_IRQ_SYSTEM) + if (irq0 != AT91_IRQ_SYSTEM) at91_pmc_clock_add(device_get_nameunit(kid), irq0, 0); } if (irq1 != 0) @@ -252,7 +253,7 @@ at91_attach(device_t dev) /* XXX Hack to tell atmelarm about the AIC */ at91sc->sc_aic_sh = sc->sc_aic_sh; - at91sc->sc_irq_system = AT91SAM9X25_IRQ_SYSTEM; + at91sc->sc_irq_system = AT91_IRQ_SYSTEM; for (i = 0; i < 32; i++) { bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SVR + From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 02:44:16 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6293A106566C; Tue, 10 Jul 2012 02:44:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D99B8FC14; Tue, 10 Jul 2012 02:44:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6A2iGrM054960; Tue, 10 Jul 2012 02:44:16 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A2iGXv054957; Tue, 10 Jul 2012 02:44:16 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207100244.q6A2iGXv054957@svn.freebsd.org> From: Warner Losh Date: Tue, 10 Jul 2012 02:44:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238332 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 02:44:16 -0000 Author: imp Date: Tue Jul 10 02:44:15 2012 New Revision: 238332 URL: http://svn.freebsd.org/changeset/base/238332 Log: Missed one of the special AT91SAM9xxx_BASE defines. This should be AT91_BASE. Modified: head/sys/arm/at91/at91sam9260.c head/sys/arm/at91/at91sam9260reg.h Modified: head/sys/arm/at91/at91sam9260.c ============================================================================== --- head/sys/arm/at91/at91sam9260.c Tue Jul 10 02:39:03 2012 (r238331) +++ head/sys/arm/at91/at91sam9260.c Tue Jul 10 02:44:15 2012 (r238332) @@ -158,8 +158,8 @@ at91_add_child(device_t dev, int prio, c bus_set_resource(kid, SYS_RES_IRQ, 1, irq1, 1); if (irq2 != 0) bus_set_resource(kid, SYS_RES_IRQ, 2, irq2, 1); - if (addr != 0 && addr < AT91SAM9260_BASE) - addr += AT91SAM9260_BASE; + if (addr != 0 && addr < AT91_BASE) + addr += AT91_BASE; if (addr != 0) bus_set_resource(kid, SYS_RES_MEMORY, 0, addr, size); } Modified: head/sys/arm/at91/at91sam9260reg.h ============================================================================== --- head/sys/arm/at91/at91sam9260reg.h Tue Jul 10 02:39:03 2012 (r238331) +++ head/sys/arm/at91/at91sam9260reg.h Tue Jul 10 02:44:15 2012 (r238332) @@ -72,8 +72,6 @@ #define AT91_CHIPSELECT_7 0x80000000 -#define AT91SAM9260_BASE 0xd0000000 - #define AT91SAM9260_EMAC_BASE 0xffc4000 #define AT91SAM9260_EMAC_SIZE 0x4000 From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 03:48:08 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 643FD106566B; Tue, 10 Jul 2012 03:48:08 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35F738FC17; Tue, 10 Jul 2012 03:48:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6A3m8GU057835; Tue, 10 Jul 2012 03:48:08 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A3m83a057833; Tue, 10 Jul 2012 03:48:08 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207100348.q6A3m83a057833@svn.freebsd.org> From: Adrian Chadd Date: Tue, 10 Jul 2012 03:48:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238333 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 03:48:08 -0000 Author: adrian Date: Tue Jul 10 03:48:07 2012 New Revision: 238333 URL: http://svn.freebsd.org/changeset/base/238333 Log: Reorder these so they match the capability enum order. Modified: head/sys/dev/ath/ath_hal/ah.c Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Tue Jul 10 02:44:15 2012 (r238332) +++ head/sys/dev/ath/ath_hal/ah.c Tue Jul 10 03:48:07 2012 (r238333) @@ -619,6 +619,19 @@ ath_hal_getcapability(struct ath_hal *ah return pCap->hal4AddrAggrSupport ? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_EXT_CHAN_DFS: return pCap->halExtChanDfsSupport ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_COMBINED_RADAR_RSSI: + return pCap->halUseCombinedRadarRssi ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_AUTO_SLEEP: + return pCap->halAutoSleepSupport ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_MBSSID_AGGR_SUPPORT: + return pCap->halMbssidAggrSupport ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_SPLIT_4KB_TRANS: /* hardware handles descriptors straddling 4k page boundary */ + return pCap->hal4kbSplitTransSupport ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_REG_FLAG: + *result = AH_PRIVATE(ah)->ah_currentRDext; + return HAL_OK; + case HAL_CAP_ENHANCED_DMA_SUPPORT: + return pCap->halEnhancedDmaSupport ? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_NUM_TXMAPS: *result = pCap->halNumTxMaps; return HAL_OK; @@ -645,18 +658,6 @@ ath_hal_getcapability(struct ath_hal *ah case HAL_CAP_RXBUFSIZE: case HAL_CAP_NUM_MR_RETRIES: return HAL_EINVAL; /* XXX not yet */ - - case HAL_CAP_COMBINED_RADAR_RSSI: - return pCap->halUseCombinedRadarRssi ? HAL_OK : HAL_ENOTSUPP; - case HAL_CAP_AUTO_SLEEP: - return pCap->halAutoSleepSupport ? HAL_OK : HAL_ENOTSUPP; - case HAL_CAP_MBSSID_AGGR_SUPPORT: - return pCap->halMbssidAggrSupport ? HAL_OK : HAL_ENOTSUPP; - case HAL_CAP_SPLIT_4KB_TRANS: /* hardware handles descriptors straddling 4k page boundary */ - return pCap->hal4kbSplitTransSupport ? HAL_OK : HAL_ENOTSUPP; - case HAL_CAP_REG_FLAG: - *result = AH_PRIVATE(ah)->ah_currentRDext; - return HAL_OK; case HAL_CAP_BT_COEX: return pCap->halBtCoexSupport ? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_HT20_SGI: @@ -694,8 +695,7 @@ ath_hal_getcapability(struct ath_hal *ah return pCap->halHasBBReadWar? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_SERIALISE_WAR: /* PCI register serialisation */ return pCap->halSerialiseRegWar ? HAL_OK : HAL_ENOTSUPP; - case HAL_CAP_ENHANCED_DMA_SUPPORT: - return pCap->halEnhancedDmaSupport ? HAL_OK : HAL_ENOTSUPP; + default: return HAL_EINVAL; } From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 04:17:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 148881065670; Tue, 10 Jul 2012 04:17:50 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F2EB78FC0A; Tue, 10 Jul 2012 04:17:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6A4HnLB059072; Tue, 10 Jul 2012 04:17:49 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A4HnV9059065; Tue, 10 Jul 2012 04:17:49 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207100417.q6A4HnV9059065@svn.freebsd.org> From: Warner Losh Date: Tue, 10 Jul 2012 04:17:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238334 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 04:17:50 -0000 Author: imp Date: Tue Jul 10 04:17:49 2012 New Revision: 238334 URL: http://svn.freebsd.org/changeset/base/238334 Log: Collapse all copies of at91_add_child into at91.c. They were logically identical before today, and actually identical after today's changes. Modified: head/sys/arm/at91/at91.c head/sys/arm/at91/at91rm9200.c head/sys/arm/at91/at91sam9260.c head/sys/arm/at91/at91sam9g20.c head/sys/arm/at91/at91sam9x25.c head/sys/arm/at91/at91var.h Modified: head/sys/arm/at91/at91.c ============================================================================== --- head/sys/arm/at91/at91.c Tue Jul 10 03:48:07 2012 (r238333) +++ head/sys/arm/at91/at91.c Tue Jul 10 04:17:49 2012 (r238334) @@ -270,10 +270,12 @@ at91_attach(device_t dev) } - /* Our device list will be added automatically by the cpu device + /* + * Our device list will be added automatically by the cpu device * e.g. at91rm9200.c when it is identified. To ensure that the * CPU and PMC are attached first any other "identified" devices - * call BUS_ADD_CHILD(9) with an "order" of at least 2. */ + * call BUS_ADD_CHILD(9) with an "order" of at least 2. + */ bus_generic_probe(dev); bus_generic_attach(dev); @@ -471,6 +473,41 @@ at91_eoi(void *unused) IC_EOICR, 0); } +void +at91_add_child(device_t dev, int prio, const char *name, int unit, + bus_addr_t addr, bus_size_t size, int irq0, int irq1, int irq2) +{ + device_t kid; + struct at91_ivar *ivar; + + kid = device_add_child_ordered(dev, prio, name, unit); + if (kid == NULL) { + printf("Can't add child %s%d ordered\n", name, unit); + return; + } + ivar = malloc(sizeof(*ivar), M_DEVBUF, M_NOWAIT | M_ZERO); + if (ivar == NULL) { + device_delete_child(dev, kid); + printf("Can't add alloc ivar\n"); + return; + } + device_set_ivars(kid, ivar); + resource_list_init(&ivar->resources); + if (irq0 != -1) { + bus_set_resource(kid, SYS_RES_IRQ, 0, irq0, 1); + if (irq0 != AT91_IRQ_SYSTEM) + at91_pmc_clock_add(device_get_nameunit(kid), irq0, 0); + } + if (irq1 != 0) + bus_set_resource(kid, SYS_RES_IRQ, 1, irq1, 1); + if (irq2 != 0) + bus_set_resource(kid, SYS_RES_IRQ, 2, irq2, 1); + if (addr != 0 && addr < AT91_BASE) + addr += AT91_BASE; + if (addr != 0) + bus_set_resource(kid, SYS_RES_MEMORY, 0, addr, size); +} + static device_method_t at91_methods[] = { DEVMETHOD(device_probe, at91_probe), DEVMETHOD(device_attach, at91_attach), Modified: head/sys/arm/at91/at91rm9200.c ============================================================================== --- head/sys/arm/at91/at91rm9200.c Tue Jul 10 03:48:07 2012 (r238333) +++ head/sys/arm/at91/at91rm9200.c Tue Jul 10 04:17:49 2012 (r238334) @@ -137,41 +137,6 @@ static const struct cpu_devs at91_devs[] }; static void -at91_add_child(device_t dev, int prio, const char *name, int unit, - bus_addr_t addr, bus_size_t size, int irq0, int irq1, int irq2) -{ - device_t kid; - struct at91_ivar *ivar; - - kid = device_add_child_ordered(dev, prio, name, unit); - if (kid == NULL) { - printf("Can't add child %s%d ordered\n", name, unit); - return; - } - ivar = malloc(sizeof(*ivar), M_DEVBUF, M_NOWAIT | M_ZERO); - if (ivar == NULL) { - device_delete_child(dev, kid); - printf("Can't add alloc ivar\n"); - return; - } - device_set_ivars(kid, ivar); - resource_list_init(&ivar->resources); - if (irq0 != -1) { - bus_set_resource(kid, SYS_RES_IRQ, 0, irq0, 1); - if (irq0 != AT91_IRQ_SYSTEM) - at91_pmc_clock_add(device_get_nameunit(kid), irq0, 0); - } - if (irq1 != 0) - bus_set_resource(kid, SYS_RES_IRQ, 1, irq1, 1); - if (irq2 != 0) - bus_set_resource(kid, SYS_RES_IRQ, 2, irq2, 1); - if (addr != 0 && addr < AT91_BASE) - addr += AT91_BASE; - if (addr != 0) - bus_set_resource(kid, SYS_RES_MEMORY, 0, addr, size); -} - -static void at91_cpu_add_builtin_children(device_t dev) { int i; Modified: head/sys/arm/at91/at91sam9260.c ============================================================================== --- head/sys/arm/at91/at91sam9260.c Tue Jul 10 03:48:07 2012 (r238333) +++ head/sys/arm/at91/at91sam9260.c Tue Jul 10 04:17:49 2012 (r238334) @@ -130,41 +130,6 @@ static const struct cpu_devs at91_devs[] }; static void -at91_add_child(device_t dev, int prio, const char *name, int unit, - bus_addr_t addr, bus_size_t size, int irq0, int irq1, int irq2) -{ - device_t kid; - struct at91_ivar *ivar; - - kid = device_add_child_ordered(dev, prio, name, unit); - if (kid == NULL) { - printf("Can't add child %s%d ordered\n", name, unit); - return; - } - ivar = malloc(sizeof(*ivar), M_DEVBUF, M_NOWAIT | M_ZERO); - if (ivar == NULL) { - device_delete_child(dev, kid); - printf("Can't add alloc ivar\n"); - return; - } - device_set_ivars(kid, ivar); - resource_list_init(&ivar->resources); - if (irq0 != -1) { - bus_set_resource(kid, SYS_RES_IRQ, 0, irq0, 1); - if (irq0 != AT91_IRQ_SYSTEM) - at91_pmc_clock_add(device_get_nameunit(kid), irq0, 0); - } - if (irq1 != 0) - bus_set_resource(kid, SYS_RES_IRQ, 1, irq1, 1); - if (irq2 != 0) - bus_set_resource(kid, SYS_RES_IRQ, 2, irq2, 1); - if (addr != 0 && addr < AT91_BASE) - addr += AT91_BASE; - if (addr != 0) - bus_set_resource(kid, SYS_RES_MEMORY, 0, addr, size); -} - -static void at91_cpu_add_builtin_children(device_t dev) { int i; Modified: head/sys/arm/at91/at91sam9g20.c ============================================================================== --- head/sys/arm/at91/at91sam9g20.c Tue Jul 10 03:48:07 2012 (r238333) +++ head/sys/arm/at91/at91sam9g20.c Tue Jul 10 04:17:49 2012 (r238334) @@ -130,41 +130,6 @@ static const struct cpu_devs at91_devs[] }; static void -at91_add_child(device_t dev, int prio, const char *name, int unit, - bus_addr_t addr, bus_size_t size, int irq0, int irq1, int irq2) -{ - device_t kid; - struct at91_ivar *ivar; - - kid = device_add_child_ordered(dev, prio, name, unit); - if (kid == NULL) { - printf("Can't add child %s%d ordered\n", name, unit); - return; - } - ivar = malloc(sizeof(*ivar), M_DEVBUF, M_NOWAIT | M_ZERO); - if (ivar == NULL) { - device_delete_child(dev, kid); - printf("Can't add alloc ivar\n"); - return; - } - device_set_ivars(kid, ivar); - resource_list_init(&ivar->resources); - if (irq0 != -1) { - bus_set_resource(kid, SYS_RES_IRQ, 0, irq0, 1); - if (irq0 != AT91_IRQ_SYSTEM) - at91_pmc_clock_add(device_get_nameunit(kid), irq0, 0); - } - if (irq1 != 0) - bus_set_resource(kid, SYS_RES_IRQ, 1, irq1, 1); - if (irq2 != 0) - bus_set_resource(kid, SYS_RES_IRQ, 2, irq2, 1); - if (addr != 0 && addr < AT91_BASE) - addr += AT91_BASE; - if (addr != 0) - bus_set_resource(kid, SYS_RES_MEMORY, 0, addr, size); -} - -static void at91_cpu_add_builtin_children(device_t dev) { int i; Modified: head/sys/arm/at91/at91sam9x25.c ============================================================================== --- head/sys/arm/at91/at91sam9x25.c Tue Jul 10 03:48:07 2012 (r238333) +++ head/sys/arm/at91/at91sam9x25.c Tue Jul 10 04:17:49 2012 (r238334) @@ -133,41 +133,6 @@ static const struct cpu_devs at91_devs[] }; static void -at91_add_child(device_t dev, int prio, const char *name, int unit, - bus_addr_t addr, bus_size_t size, int irq0, int irq1, int irq2) -{ - device_t kid; - struct at91_ivar *ivar; - - kid = device_add_child_ordered(dev, prio, name, unit); - if (kid == NULL) { - printf("Can't add child %s%d ordered\n", name, unit); - return; - } - ivar = malloc(sizeof(*ivar), M_DEVBUF, M_NOWAIT | M_ZERO); - if (ivar == NULL) { - device_delete_child(dev, kid); - printf("Can't add alloc ivar\n"); - return; - } - device_set_ivars(kid, ivar); - resource_list_init(&ivar->resources); - if (irq0 != -1) { - bus_set_resource(kid, SYS_RES_IRQ, 0, irq0, 1); - if (irq0 != AT91_IRQ_SYSTEM) - at91_pmc_clock_add(device_get_nameunit(kid), irq0, 0); - } - if (irq1 != 0) - bus_set_resource(kid, SYS_RES_IRQ, 1, irq1, 1); - if (irq2 != 0) - bus_set_resource(kid, SYS_RES_IRQ, 2, irq2, 1); - if (addr != 0 && addr < AT91_BASE) - addr += AT91_BASE; - if (addr != 0) - bus_set_resource(kid, SYS_RES_MEMORY, 0, addr, size); -} - -static void at91_cpu_add_builtin_children(device_t dev) { int i; Modified: head/sys/arm/at91/at91var.h ============================================================================== --- head/sys/arm/at91/at91var.h Tue Jul 10 03:48:07 2012 (r238333) +++ head/sys/arm/at91/at91var.h Tue Jul 10 04:17:49 2012 (r238334) @@ -151,6 +151,9 @@ at91_cpu_is(u_int cpu) return (soc_data.type == cpu); } +void at91_add_child(device_t dev, int prio, const char *name, int unit, + bus_addr_t addr, bus_size_t size, int irq0, int irq1, int irq2); + extern uint32_t at91_irq_system; extern uint32_t at91_master_clock; void at91_pmc_init_clock(void); From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 05:39:06 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C2C401065672; Tue, 10 Jul 2012 05:39:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF0658FC16; Tue, 10 Jul 2012 05:39:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6A5d6HQ062438; Tue, 10 Jul 2012 05:39:06 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A5d6I8062436; Tue, 10 Jul 2012 05:39:06 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207100539.q6A5d6I8062436@svn.freebsd.org> From: Warner Losh Date: Tue, 10 Jul 2012 05:39:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238335 - head/sys/arm/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 05:39:06 -0000 Author: imp Date: Tue Jul 10 05:39:06 2012 New Revision: 238335 URL: http://svn.freebsd.org/changeset/base/238335 Log: Revert last change. It was accidental. Modified: head/sys/arm/conf/KB920X Modified: head/sys/arm/conf/KB920X ============================================================================== --- head/sys/arm/conf/KB920X Tue Jul 10 04:17:49 2012 (r238334) +++ head/sys/arm/conf/KB920X Tue Jul 10 05:39:06 2012 (r238335) @@ -21,16 +21,10 @@ ident KB920X include "../at91/std.kb920x" -# bring in the sam specific timers and such -#include "../at91/std.at91sam9" -nodevice at91rm9200 -device at91sam9 -device at91sam9x25 # The AT91 platform doesn't use /boot/loader, so we have to statically wire # hints. hints "KB920X.hints" makeoptions MODULES_OVERRIDE="" -options LINUX_BOOT_ABI makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols options DDB @@ -87,7 +81,7 @@ device lxtphy #options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed device md -#device at91_twi # TWI: Two Wire Interface +device at91_twi # TWI: Two Wire Interface device at91_spi # SPI: device spibus # MMC/SD @@ -144,7 +138,6 @@ device wlan_ccmp # 802.11 CCMP support device wlan_tkip # 802.11 TKIP support device wlan_amrr # AMRR transmit rate control algorithm -#device cfi options IEEE80211_SUPPORT_MESH options AH_SUPPORT_AR5416 From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 05:45:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C964F106564A; Tue, 10 Jul 2012 05:45:13 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B46BA8FC08; Tue, 10 Jul 2012 05:45:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6A5jDw8062730; Tue, 10 Jul 2012 05:45:13 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A5jDV5062728; Tue, 10 Jul 2012 05:45:13 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201207100545.q6A5jDV5062728@svn.freebsd.org> From: David Xu Date: Tue, 10 Jul 2012 05:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238336 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 05:45:13 -0000 Author: davidxu Date: Tue Jul 10 05:45:13 2012 New Revision: 238336 URL: http://svn.freebsd.org/changeset/base/238336 Log: Always clear p_xthread if current thread no longer needs it, in theory, if debugger exited without calling ptrace(PT_DETACH), there is a time window that the p_xthread may be pointing to non-existing thread, in practical, this is not a problem because child process soon will be killed by parent process. Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Tue Jul 10 05:39:06 2012 (r238335) +++ head/sys/kern/kern_sig.c Tue Jul 10 05:45:13 2012 (r238336) @@ -2436,9 +2436,10 @@ ptracestop(struct thread *td, int sig) } stopme: thread_suspend_switch(td); - if (!(p->p_flag & P_TRACED)) { + if (p->p_xthread == td) + p->p_xthread = NULL; + if (!(p->p_flag & P_TRACED)) break; - } if (td->td_dbgflags & TDB_SUSPEND) { if (p->p_flag & P_SINGLE_EXIT) break; From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 06:05:43 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C299106566B; Tue, 10 Jul 2012 06:05:43 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1CB868FC12; Tue, 10 Jul 2012 06:05:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6A65g6L063599; Tue, 10 Jul 2012 06:05:42 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A65gWh063597; Tue, 10 Jul 2012 06:05:42 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207100605.q6A65gWh063597@svn.freebsd.org> From: Adrian Chadd Date: Tue, 10 Jul 2012 06:05:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238337 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 06:05:43 -0000 Author: adrian Date: Tue Jul 10 06:05:42 2012 New Revision: 238337 URL: http://svn.freebsd.org/changeset/base/238337 Log: Add/fix EDMA RX behaviour. * For now, kickpcu should hopefully just do nothing - the PCU doesn't need 'kicking' for Osprey and later NICs. The PCU will just restart once the next FIFO entry is pushed in. * Teach "proc" about "dosched", so it can be used to just flush the FIFO contents without adding new FIFO entries. * .. and now, implement the RX "flush" routine. * Re-initialise the FIFO contents if the FIFO is empty (the DP is NULL.) When PCU RX is disabled (ie, writing RX_D to the RX configuration register) then the FIFO will be completely emptied. If the software FIFO is full, then no further descriptors are pushed into the FIFO and things stall. This all requires much, much more thorough stress testing. Modified: head/sys/dev/ath/if_ath_rx_edma.c Modified: head/sys/dev/ath/if_ath_rx_edma.c ============================================================================== --- head/sys/dev/ath/if_ath_rx_edma.c Tue Jul 10 05:45:13 2012 (r238336) +++ head/sys/dev/ath/if_ath_rx_edma.c Tue Jul 10 06:05:42 2012 (r238337) @@ -148,6 +148,8 @@ static int ath_edma_rxfifo_alloc(struct int nbufs); static int ath_edma_rxfifo_flush(struct ath_softc *sc, HAL_RX_QUEUE qtype); static void ath_edma_rxbuf_free(struct ath_softc *sc, struct ath_buf *bf); +static int ath_edma_recv_proc_queue(struct ath_softc *sc, + HAL_RX_QUEUE qtype, int dosched); static void ath_edma_stoprecv(struct ath_softc *sc, int dodelay) @@ -174,6 +176,34 @@ ath_edma_stoprecv(struct ath_softc *sc, } /* + * Re-initialise the FIFO given the current buffer contents. + * Specifically, walk from head -> tail, pushing the FIFO contents + * back into the FIFO. + */ +static void +ath_edma_reinit_fifo(struct ath_softc *sc, HAL_RX_QUEUE qtype) +{ + struct ath_rx_edma *re = &sc->sc_rxedma[qtype]; + struct ath_buf *bf; + int i, j; + + i = re->m_fifo_head; + for (j = 0; j < re->m_fifo_depth; j++) { + bf = re->m_fifo[i]; + ath_hal_putrxbuf(sc->sc_ah, bf->bf_daddr, qtype); + INCR(i, re->m_fifolen); + } + + /* Ensure this worked out right */ + if (i != re->m_fifo_tail) { + device_printf(sc->sc_dev, "%s: i (%d) != tail! (%d)\n", + __func__, + i, + re->m_fifo_tail); + } +} + +/* * Start receive. * * XXX TODO: this needs to reallocate the FIFO entries when a reset @@ -189,9 +219,19 @@ ath_edma_startrecv(struct ath_softc *sc) ath_hal_rxena(ah); /* - * XXX write out a complete set of FIFO entries based on - * what's currently available. + * Entries should only be written out if the + * FIFO is empty. */ + if (ath_hal_getrxbuf(sc->sc_ah, HAL_RX_QUEUE_HP) == 0){ + DPRINTF(sc, ATH_DEBUG_EDMA_RX, + "%s: Re-initing HP FIFO\n", __func__); + ath_edma_reinit_fifo(sc, HAL_RX_QUEUE_HP); + } + if (ath_hal_getrxbuf(sc->sc_ah, HAL_RX_QUEUE_LP) == 0) { + DPRINTF(sc, ATH_DEBUG_EDMA_RX, + "%s: Re-initing LP FIFO\n", __func__); + ath_edma_reinit_fifo(sc, HAL_RX_QUEUE_LP); + } /* Add up to m_fifolen entries in each queue */ /* @@ -216,14 +256,8 @@ ath_edma_recv_flush(struct ath_softc *sc device_printf(sc->sc_dev, "%s: called\n", __func__); - /* - * XXX for now, free all descriptors. Later on, complete - * what can be completed! - */ -#if 0 - ath_edma_rxfifo_flush(sc, HAL_RX_QUEUE_HP); - ath_edma_rxfifo_flush(sc, HAL_RX_QUEUE_LP); -#endif + ath_edma_recv_proc_queue(sc, HAL_RX_QUEUE_HP, 0); + ath_edma_recv_proc_queue(sc, HAL_RX_QUEUE_LP, 0); } /* @@ -239,18 +273,19 @@ ath_edma_recv_flush(struct ath_softc *sc * "handle frames" in the RX tasklet. */ static int -ath_edma_recv_proc_queue(struct ath_softc *sc, HAL_RX_QUEUE qtype) +ath_edma_recv_proc_queue(struct ath_softc *sc, HAL_RX_QUEUE qtype, + int dosched) { struct ath_rx_edma *re = &sc->sc_rxedma[qtype]; struct ath_rx_status *rs; struct ath_desc *ds; struct ath_buf *bf; - int n = 0; struct mbuf *m; HAL_STATUS status; struct ath_hal *ah = sc->sc_ah; uint64_t tsf; int16_t nf; + int ngood = 0; tsf = ath_hal_gettsf64(ah); nf = ath_hal_getchannoise(ah, sc->sc_curchan); @@ -305,7 +340,8 @@ ath_edma_recv_proc_queue(struct ath_soft m_adj(m, sc->sc_rx_statuslen); /* Handle the frame */ - (void) ath_rx_pkt(sc, rs, status, tsf, nf, qtype, bf); + if (ath_rx_pkt(sc, rs, status, tsf, nf, qtype, bf)) + ngood++; /* Free the buffer/mbuf */ ath_edma_rxbuf_free(sc, bf); @@ -317,11 +353,25 @@ ath_edma_recv_proc_queue(struct ath_soft } while (re->m_fifo_depth > 0); /* Handle resched and kickpcu appropriately */ + ATH_PCU_LOCK(sc); + if (dosched && sc->sc_kickpcu) { + CTR0(ATH_KTR_ERR, "ath_edma_recv_proc_queue(): kickpcu"); + device_printf(sc->sc_dev, "%s: handled %d descriptors\n", + __func__, ngood); + + /* + * XXX TODO: what should occur here? Just re-poke and + * re-enable the RX FIFO? + */ + sc->sc_kickpcu = 0; + } + ATH_PCU_UNLOCK(sc); /* Append some more fresh frames to the FIFO */ - ath_edma_rxfifo_alloc(sc, qtype, re->m_fifolen); + if (dosched) + ath_edma_rxfifo_alloc(sc, qtype, re->m_fifolen); - return (n); + return (ngood); } static void @@ -333,8 +383,17 @@ ath_edma_recv_tasklet(void *arg, int npe __func__, npending); - ath_edma_recv_proc_queue(sc, HAL_RX_QUEUE_HP); - ath_edma_recv_proc_queue(sc, HAL_RX_QUEUE_LP); + ATH_PCU_LOCK(sc); + if (sc->sc_inreset_cnt > 0) { + device_printf(sc->sc_dev, "%s: sc_inreset_cnt > 0; skipping\n", + __func__); + ATH_PCU_UNLOCK(sc); + return; + } + ATH_PCU_UNLOCK(sc); + + ath_edma_recv_proc_queue(sc, HAL_RX_QUEUE_HP, 1); + ath_edma_recv_proc_queue(sc, HAL_RX_QUEUE_LP, 1); } /* From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 06:10:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EEA421065670; Tue, 10 Jul 2012 06:10:49 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA7FB8FC0A; Tue, 10 Jul 2012 06:10:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6A6AnfI063838; Tue, 10 Jul 2012 06:10:49 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A6AnLq063836; Tue, 10 Jul 2012 06:10:49 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207100610.q6A6AnLq063836@svn.freebsd.org> From: Adrian Chadd Date: Tue, 10 Jul 2012 06:10:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238338 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 06:10:50 -0000 Author: adrian Date: Tue Jul 10 06:10:49 2012 New Revision: 238338 URL: http://svn.freebsd.org/changeset/base/238338 Log: Print the TX buffer if this error condition is asserted. I need to figure out why this is occuring. Hopefully I can get enough descriptor dumps to figure it out. Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Tue Jul 10 06:05:42 2012 (r238337) +++ head/sys/dev/ath/if_ath_tx.c Tue Jul 10 06:10:49 2012 (r238338) @@ -3583,6 +3583,8 @@ ath_tx_aggr_comp_aggr(struct ath_softc * "seq_st=%d\n", __func__, hasba, tx_ok, isaggr, seq_st); /* XXX TODO: schedule an interface reset */ + ath_printtxbuf(sc, bf_first, + sc->sc_ac2q[atid->ac]->axq_qnum, 0, 0); } /* From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 06:11:40 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88EDD1065673; Tue, 10 Jul 2012 06:11:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 74A098FC19; Tue, 10 Jul 2012 06:11:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6A6Be3M063922; Tue, 10 Jul 2012 06:11:40 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A6BeOD063918; Tue, 10 Jul 2012 06:11:40 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207100611.q6A6BeOD063918@svn.freebsd.org> From: Adrian Chadd Date: Tue, 10 Jul 2012 06:11:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238339 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 06:11:40 -0000 Author: adrian Date: Tue Jul 10 06:11:39 2012 New Revision: 238339 URL: http://svn.freebsd.org/changeset/base/238339 Log: Migrate the ATH_KTR_* fields out to if_ath_debug.h . Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_debug.h head/sys/dev/ath/if_ath_rx.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Tue Jul 10 06:10:49 2012 (r238338) +++ head/sys/dev/ath/if_ath.c Tue Jul 10 06:11:39 2012 (r238339) @@ -116,9 +116,6 @@ __FBSDID("$FreeBSD$"); #include #endif -#define ATH_KTR_INTR KTR_SPARE4 -#define ATH_KTR_ERR KTR_SPARE3 - /* * ATH_BCBUF determines the number of vap's that can transmit * beacons and also (currently) the number of vap's that can Modified: head/sys/dev/ath/if_ath_debug.h ============================================================================== --- head/sys/dev/ath/if_ath_debug.h Tue Jul 10 06:10:49 2012 (r238338) +++ head/sys/dev/ath/if_ath_debug.h Tue Jul 10 06:11:39 2012 (r238339) @@ -69,6 +69,9 @@ enum { ATH_DEBUG_ANY = 0xffffffffffffffffULL }; +#define ATH_KTR_INTR KTR_SPARE4 +#define ATH_KTR_ERR KTR_SPARE3 + extern uint64_t ath_debug; #define IFF_DUMPPKTS(sc, m) \ Modified: head/sys/dev/ath/if_ath_rx.c ============================================================================== --- head/sys/dev/ath/if_ath_rx.c Tue Jul 10 06:10:49 2012 (r238338) +++ head/sys/dev/ath/if_ath_rx.c Tue Jul 10 06:11:39 2012 (r238339) @@ -115,9 +115,6 @@ __FBSDID("$FreeBSD$"); #include #endif -#define ATH_KTR_INTR KTR_SPARE4 -#define ATH_KTR_ERR KTR_SPARE3 - /* * Calculate the receive filter according to the * operating mode and state: From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 06:18:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFC1C106566C; Tue, 10 Jul 2012 06:18:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFA4E8FC0A; Tue, 10 Jul 2012 06:18:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6A6IrNL064243; Tue, 10 Jul 2012 06:18:53 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A6Ir3A064241; Tue, 10 Jul 2012 06:18:53 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207100618.q6A6Ir3A064241@svn.freebsd.org> From: Warner Losh Date: Tue, 10 Jul 2012 06:18:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238340 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 06:18:53 -0000 Author: imp Date: Tue Jul 10 06:18:53 2012 New Revision: 238340 URL: http://svn.freebsd.org/changeset/base/238340 Log: Minor rework to eliminate at91rm9200reg.h dependency and possibly set the stage for a detach routine (unlikely to be useful, but while I was here..) Modified: head/sys/arm/at91/at91_st.c Modified: head/sys/arm/at91/at91_st.c ============================================================================== --- head/sys/arm/at91/at91_st.c Tue Jul 10 06:11:39 2012 (r238339) +++ head/sys/arm/at91/at91_st.c Tue Jul 10 06:18:53 2012 (r238340) @@ -43,24 +43,32 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include static struct at91st_softc { - bus_space_tag_t sc_st; - bus_space_handle_t sc_sh; - device_t sc_dev; + struct resource * sc_irq_res; + struct resource * sc_mem_res; + void * sc_intrhand; eventhandler_tag sc_wet; /* watchdog event handler tag */ } *timer_softc; -#define RD4(off) \ - bus_space_read_4(timer_softc->sc_st, timer_softc->sc_sh, (off)) -#define WR4(off, val) \ - bus_space_write_4(timer_softc->sc_st, timer_softc->sc_sh, (off), (val)) +static inline uint32_t +RD4(bus_size_t off) +{ + + return (bus_read_4(timer_softc->sc_mem_res, off)); +} + +static inline void +WR4(bus_size_t off, uint32_t val) +{ + + bus_write_4(timer_softc->sc_mem_res, off, val); +} static void at91st_watchdog(void *, u_int, int *); -static void at91st_initclocks(struct at91st_softc *); +static void at91st_initclocks(device_t , struct at91st_softc *); static inline int st_crtr(void) @@ -84,6 +92,19 @@ static struct timecounter at91st_timecou 1000 /* quality */ }; +static int +clock_intr(void *arg) +{ + struct trapframe *fp = arg; + + /* The interrupt is shared, so we have to make sure it's for us. */ + if (RD4(ST_SR) & ST_SR_PITS) { + hardclock(TRAPF_USERMODE(fp), TRAPF_PC(fp)); + return (FILTER_HANDLED); + } + return (FILTER_STRAY); +} + static void at91st_delay(int n) { @@ -126,26 +147,68 @@ at91st_probe(device_t dev) return (0); } +static void +at91st_deactivate(device_t dev) +{ + struct at91st_softc *sc = timer_softc; + + if (sc->sc_intrhand) + bus_teardown_intr(dev, sc->sc_irq_res, sc->sc_intrhand); + sc->sc_intrhand = NULL; + + if (sc->sc_irq_res) + bus_release_resource(dev, SYS_RES_IRQ, + rman_get_rid(sc->sc_irq_res), sc->sc_irq_res); + sc->sc_irq_res = NULL; + + if (sc->sc_mem_res) + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(sc->sc_mem_res), sc->sc_mem_res); + sc->sc_mem_res = NULL; +} + +static int +at91st_activate(device_t dev) +{ + int rid; + int err; + struct at91st_softc *sc = timer_softc; + + rid = 0; + sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + err = ENOMEM; + if (sc->sc_mem_res == NULL) + goto out; + /* Disable all interrupts */ + WR4(ST_IDR, 0xffffffff); + + /* The system timer shares the system irq (1) */ + rid = 0; + sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_ACTIVE | RF_SHAREABLE); + if (sc->sc_irq_res == NULL) { + printf("Unable to allocate irq for the system timer"); + goto out; + } + err = bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_CLK, clock_intr, + NULL, NULL, &sc->sc_intrhand); +out: + if (err != 0) + at91st_deactivate(dev); + return (err); +} + static int at91st_attach(device_t dev) { - struct at91_softc *sc = device_get_softc(device_get_parent(dev)); + int err; timer_softc = device_get_softc(dev); - timer_softc->sc_st = sc->sc_st; - timer_softc->sc_dev = dev; - if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91RM92_ST_BASE, - AT91RM92_ST_SIZE, &timer_softc->sc_sh) != 0) - panic("couldn't subregion timer registers"); - /* - * Real time counter increments every clock cycle, need to set before - * initializing clocks so that DELAY works. - */ - WR4(ST_RTMR, 1); - /* Disable all interrupts */ - WR4(ST_IDR, 0xffffffff); - /* disable watchdog timer */ - WR4(ST_WDMR, 0); + err = at91st_activate(dev); + if (err) + return err; + soc_data.delay = at91st_delay; soc_data.reset = at91st_cpu_reset; // XXX kinda late to be setting this... @@ -155,7 +218,7 @@ at91st_attach(device_t dev) device_printf(dev, "watchdog registered, timeout intervall max. 64 sec\n"); - at91st_initclocks(timer_softc); + at91st_initclocks(dev, timer_softc); return (0); } @@ -210,47 +273,28 @@ at91st_watchdog(void *argp, u_int cmd, i WR4(ST_CR, ST_CR_WDRST); } -static int -clock_intr(void *arg) -{ - struct trapframe *fp = arg; - - /* The interrupt is shared, so we have to make sure it's for us. */ - if (RD4(ST_SR) & ST_SR_PITS) { - hardclock(TRAPF_USERMODE(fp), TRAPF_PC(fp)); - return (FILTER_HANDLED); - } - return (FILTER_STRAY); -} - static void -at91st_initclocks(struct at91st_softc *sc) +at91st_initclocks(device_t dev, struct at91st_softc *sc) { int rel_value; - struct resource *irq; - int rid = 0; - void *ih; - device_t dev = sc->sc_dev; + + /* + * Real time counter increments every clock cycle, need to set before + * initializing clocks so that DELAY works. + */ + WR4(ST_RTMR, 1); + /* disable watchdog timer */ + WR4(ST_WDMR, 0); rel_value = 32768 / hz; if (rel_value < 1) rel_value = 1; if (32768 % hz) { - printf("Cannot get %d Hz clock; using %dHz\n", hz, 32768 / rel_value); + device_printf(dev, "Cannot get %d Hz clock; using %dHz\n", hz, + 32768 / rel_value); hz = 32768 / rel_value; tick = 1000000 / hz; } - /* Disable all interrupts. */ - WR4(ST_IDR, 0xffffffff); - /* The system timer shares the system irq (1) */ - irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 1, 1, 1, - RF_ACTIVE | RF_SHAREABLE); - if (!irq) - panic("Unable to allocate irq for the system timer"); - else - bus_setup_intr(dev, irq, INTR_TYPE_CLK, - clock_intr, NULL, NULL, &ih); - WR4(ST_PIMR, rel_value); /* Enable PITS interrupts. */ From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 06:21:43 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2F9C1065670; Tue, 10 Jul 2012 06:21:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8284E8FC0C; Tue, 10 Jul 2012 06:21:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6A6Lh6R064392; Tue, 10 Jul 2012 06:21:43 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A6LhJM064390; Tue, 10 Jul 2012 06:21:43 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207100621.q6A6LhJM064390@svn.freebsd.org> From: Warner Losh Date: Tue, 10 Jul 2012 06:21:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238341 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 06:21:43 -0000 Author: imp Date: Tue Jul 10 06:21:42 2012 New Revision: 238341 URL: http://svn.freebsd.org/changeset/base/238341 Log: Pure style mischief. at91_$DEV_ rather than at91$DEV_ to match others. Modified: head/sys/arm/at91/at91_st.c Modified: head/sys/arm/at91/at91_st.c ============================================================================== --- head/sys/arm/at91/at91_st.c Tue Jul 10 06:18:53 2012 (r238340) +++ head/sys/arm/at91/at91_st.c Tue Jul 10 06:21:42 2012 (r238341) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include -static struct at91st_softc { +static struct at91_st_softc { struct resource * sc_irq_res; struct resource * sc_mem_res; void * sc_intrhand; @@ -67,8 +67,8 @@ WR4(bus_size_t off, uint32_t val) bus_write_4(timer_softc->sc_mem_res, off, val); } -static void at91st_watchdog(void *, u_int, int *); -static void at91st_initclocks(device_t , struct at91st_softc *); +static void at91_st_watchdog(void *, u_int, int *); +static void at91_st_initclocks(device_t , struct at91_st_softc *); static inline int st_crtr(void) @@ -81,10 +81,10 @@ st_crtr(void) return (cur1); } -static unsigned at91st_get_timecount(struct timecounter *tc); +static unsigned at91_st_get_timecount(struct timecounter *tc); -static struct timecounter at91st_timecounter = { - at91st_get_timecount, /* get_timecount */ +static struct timecounter at91_st_timecounter = { + at91_st_get_timecount, /* get_timecount */ NULL, /* no poll_pps */ 0xfffffu, /* counter_mask */ 32768, /* frequency */ @@ -106,7 +106,7 @@ clock_intr(void *arg) } static void -at91st_delay(int n) +at91_st_delay(int n) { uint32_t start, end, cur; @@ -126,7 +126,7 @@ at91st_delay(int n) } static void -at91st_cpu_reset(void) +at91_st_cpu_reset(void) { /* * Reset the CPU by programmig the watchdog timer to reset the @@ -140,7 +140,7 @@ at91st_cpu_reset(void) } static int -at91st_probe(device_t dev) +at91_st_probe(device_t dev) { device_set_desc(dev, "ST"); @@ -148,9 +148,9 @@ at91st_probe(device_t dev) } static void -at91st_deactivate(device_t dev) +at91_st_deactivate(device_t dev) { - struct at91st_softc *sc = timer_softc; + struct at91_st_softc *sc = timer_softc; if (sc->sc_intrhand) bus_teardown_intr(dev, sc->sc_irq_res, sc->sc_intrhand); @@ -168,11 +168,11 @@ at91st_deactivate(device_t dev) } static int -at91st_activate(device_t dev) +at91_st_activate(device_t dev) { int rid; int err; - struct at91st_softc *sc = timer_softc; + struct at91_st_softc *sc = timer_softc; rid = 0; sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, @@ -195,50 +195,50 @@ at91st_activate(device_t dev) NULL, NULL, &sc->sc_intrhand); out: if (err != 0) - at91st_deactivate(dev); + at91_st_deactivate(dev); return (err); } static int -at91st_attach(device_t dev) +at91_st_attach(device_t dev) { int err; timer_softc = device_get_softc(dev); - err = at91st_activate(dev); + err = at91_st_activate(dev); if (err) return err; - soc_data.delay = at91st_delay; - soc_data.reset = at91st_cpu_reset; // XXX kinda late to be setting this... + soc_data.delay = at91_st_delay; + soc_data.reset = at91_st_cpu_reset; // XXX kinda late to be setting this... timer_softc->sc_wet = EVENTHANDLER_REGISTER(watchdog_list, - at91st_watchdog, dev, 0); + at91_st_watchdog, dev, 0); device_printf(dev, "watchdog registered, timeout intervall max. 64 sec\n"); - at91st_initclocks(dev, timer_softc); + at91_st_initclocks(dev, timer_softc); return (0); } -static device_method_t at91st_methods[] = { - DEVMETHOD(device_probe, at91st_probe), - DEVMETHOD(device_attach, at91st_attach), +static device_method_t at91_st_methods[] = { + DEVMETHOD(device_probe, at91_st_probe), + DEVMETHOD(device_attach, at91_st_attach), {0, 0}, }; -static driver_t at91st_driver = { +static driver_t at91_st_driver = { "at91_st", - at91st_methods, - sizeof(struct at91st_softc), + at91_st_methods, + sizeof(struct at91_st_softc), }; -static devclass_t at91st_devclass; +static devclass_t at91_st_devclass; -DRIVER_MODULE(at91_st, atmelarm, at91st_driver, at91st_devclass, 0, 0); +DRIVER_MODULE(at91_st, atmelarm, at91_st_driver, at91_st_devclass, 0, 0); static unsigned -at91st_get_timecount(struct timecounter *tc) +at91_st_get_timecount(struct timecounter *tc) { return (st_crtr()); } @@ -257,7 +257,7 @@ at91st_get_timecount(struct timecounter * interval, I think this is the best solution. */ static void -at91st_watchdog(void *argp, u_int cmd, int *error) +at91_st_watchdog(void *argp, u_int cmd, int *error) { uint32_t wdog; int t; @@ -274,7 +274,7 @@ at91st_watchdog(void *argp, u_int cmd, i } static void -at91st_initclocks(device_t dev, struct at91st_softc *sc) +at91_st_initclocks(device_t dev, struct at91_st_softc *sc) { int rel_value; @@ -299,5 +299,5 @@ at91st_initclocks(device_t dev, struct a /* Enable PITS interrupts. */ WR4(ST_IER, ST_SR_PITS); - tc_init(&at91st_timecounter); + tc_init(&at91_st_timecounter); } From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 07:43:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8350C106564A; Tue, 10 Jul 2012 07:43:32 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EA848FC14; Tue, 10 Jul 2012 07:43:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6A7hWrA067814; Tue, 10 Jul 2012 07:43:32 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A7hWBI067812; Tue, 10 Jul 2012 07:43:32 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207100743.q6A7hWBI067812@svn.freebsd.org> From: Adrian Chadd Date: Tue, 10 Jul 2012 07:43:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238343 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 07:43:32 -0000 Author: adrian Date: Tue Jul 10 07:43:31 2012 New Revision: 238343 URL: http://svn.freebsd.org/changeset/base/238343 Log: Flip on EDMA RX of both HP and LP queue frames. Yes, this is in the legacy interrupt path. The NIC does support MSI but I haven't yet sat down and written that code. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Tue Jul 10 06:50:19 2012 (r238342) +++ head/sys/dev/ath/if_ath.c Tue Jul 10 07:43:31 2012 (r238343) @@ -1621,7 +1621,11 @@ ath_intr(void *arg) /* bump tx trigger level */ ath_hal_updatetxtriglevel(ah, AH_TRUE); } - if (status & HAL_INT_RX) { + /* + * Handle both the legacy and RX EDMA interrupt bits. + * Note that HAL_INT_RXLP is also HAL_INT_RXDESC. + */ + if (status & (HAL_INT_RX | HAL_INT_RXHP | HAL_INT_RXLP)) { sc->sc_stats.ast_rx_intr++; taskqueue_enqueue(sc->sc_tq, &sc->sc_rxtask); } @@ -1867,6 +1871,14 @@ ath_init(void *arg) sc->sc_imask = HAL_INT_RX | HAL_INT_TX | HAL_INT_RXEOL | HAL_INT_RXORN | HAL_INT_FATAL | HAL_INT_GLOBAL; + + /* + * Enable RX EDMA bits. Note these overlap with + * HAL_INT_RX and HAL_INT_RXDESC respectively. + */ + if (sc->sc_isedma) + sc->sc_imask |= (HAL_INT_RXHP | HAL_INT_RXLP); + /* * Enable MIB interrupts when there are hardware phy counters. * Note we only do this (at the moment) for station mode. From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 07:43:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1B3DA1065781; Tue, 10 Jul 2012 07:43:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 89AD88FC14; Tue, 10 Jul 2012 07:43:53 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q6A7hwV8086666; Tue, 10 Jul 2012 10:43:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q6A7hjZv082299; Tue, 10 Jul 2012 10:43:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q6A7hjdH082298; Tue, 10 Jul 2012 10:43:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 10 Jul 2012 10:43:45 +0300 From: Konstantin Belousov To: David Xu Message-ID: <20120710074345.GX2338@deviant.kiev.zoral.com.ua> References: <201207100147.q6A1lCPE052337@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Z1EIi0fvCUyWUKja" Content-Disposition: inline In-Reply-To: <201207100147.q6A1lCPE052337@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238328 - head/lib/libc/i386/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 07:43:54 -0000 --Z1EIi0fvCUyWUKja Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 10, 2012 at 01:47:12AM +0000, David Xu wrote: > Author: davidxu > Date: Tue Jul 10 01:47:11 2012 > New Revision: 238328 > URL: http://svn.freebsd.org/changeset/base/238328 >=20 > Log: > Executing CPUID with EAX set to 1 to actually get feature flags. > PR: 169730 >=20 > Modified: > head/lib/libc/i386/gen/getcontextx.c Please, merge this before next 9.1 RC is out. --Z1EIi0fvCUyWUKja Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/73TEACgkQC3+MBN1Mb4iM3ACg3lwDi0n22h/izF54q45pLfEs y1kAoPAG+DQ2ltkmTupALYfQvHiowYjY =nBsu -----END PGP SIGNATURE----- --Z1EIi0fvCUyWUKja-- From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 07:45:47 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E5998106564A; Tue, 10 Jul 2012 07:45:47 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B77A28FC1A; Tue, 10 Jul 2012 07:45:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6A7jlL7067960; Tue, 10 Jul 2012 07:45:47 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A7jla7067958; Tue, 10 Jul 2012 07:45:47 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207100745.q6A7jla7067958@svn.freebsd.org> From: Adrian Chadd Date: Tue, 10 Jul 2012 07:45:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238344 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 07:45:48 -0000 Author: adrian Date: Tue Jul 10 07:45:47 2012 New Revision: 238344 URL: http://svn.freebsd.org/changeset/base/238344 Log: Add some debugging and comments about what's going on when reinitialising the FIFO. I still see some corner cases where no RX occurs when it should be occuring. It's quite possible that there's a subtle race condition somewhere; or maybe I'm not programming the RX queues right. There's also no locking here yet, so any reset/configuration path state change (ie, enabling/disabling receive from the ioctl, net80211 taskqueue, etc) could quite possibly confuse things. Modified: head/sys/dev/ath/if_ath_rx_edma.c Modified: head/sys/dev/ath/if_ath_rx_edma.c ============================================================================== --- head/sys/dev/ath/if_ath_rx_edma.c Tue Jul 10 07:43:31 2012 (r238343) +++ head/sys/dev/ath/if_ath_rx_edma.c Tue Jul 10 07:45:47 2012 (r238344) @@ -190,6 +190,12 @@ ath_edma_reinit_fifo(struct ath_softc *s i = re->m_fifo_head; for (j = 0; j < re->m_fifo_depth; j++) { bf = re->m_fifo[i]; + DPRINTF(sc, ATH_DEBUG_EDMA_RX, + "%s: Q%d: pos=%i, addr=0x%x\n", + __func__, + qtype, + i, + bf->bf_daddr); ath_hal_putrxbuf(sc->sc_ah, bf->bf_daddr, qtype); INCR(i, re->m_fifolen); } @@ -221,8 +227,21 @@ ath_edma_startrecv(struct ath_softc *sc) /* * Entries should only be written out if the * FIFO is empty. + * + * XXX This isn't correct. I should be looking + * at the value of AR_RXDP_SIZE (0x0070) to determine + * how many entries are in here. + * + * A warm reset will clear the registers but not the FIFO. + * + * And I believe this is actually the address of the last + * handled buffer rather than the current FIFO pointer. + * So if no frames have been (yet) seen, we'll reinit the + * FIFO. + * + * I'll chase that up at some point. */ - if (ath_hal_getrxbuf(sc->sc_ah, HAL_RX_QUEUE_HP) == 0){ + if (ath_hal_getrxbuf(sc->sc_ah, HAL_RX_QUEUE_HP) == 0) { DPRINTF(sc, ATH_DEBUG_EDMA_RX, "%s: Re-initing HP FIFO\n", __func__); ath_edma_reinit_fifo(sc, HAL_RX_QUEUE_HP); From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 08:31:28 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3AC71065676; Tue, 10 Jul 2012 08:31:28 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE7058FC16; Tue, 10 Jul 2012 08:31:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6A8VSsq069910; Tue, 10 Jul 2012 08:31:28 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A8VSbu069908; Tue, 10 Jul 2012 08:31:28 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201207100831.q6A8VSbu069908@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 10 Jul 2012 08:31:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238345 - head/lib/libc/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 08:31:28 -0000 Author: lstewart Date: Tue Jul 10 08:31:28 2012 New Revision: 238345 URL: http://svn.freebsd.org/changeset/base/238345 Log: Move the ffclock symbols from FBSD_1.2 to FBSD_1.3 where they should have been put initially. They were added to head during development of 10-CURRENT, not 9-CURRENT. Submitted by: glebius Reviewed by: kib Modified: head/lib/libc/sys/Symbol.map Modified: head/lib/libc/sys/Symbol.map ============================================================================== --- head/lib/libc/sys/Symbol.map Tue Jul 10 07:45:47 2012 (r238344) +++ head/lib/libc/sys/Symbol.map Tue Jul 10 08:31:28 2012 (r238345) @@ -365,9 +365,6 @@ FBSD_1.2 { cap_getmode; cap_new; cap_getrights; - ffclock_getcounter; - ffclock_getestimate; - ffclock_setestimate; getloginclass; pdfork; pdgetpid; @@ -382,6 +379,9 @@ FBSD_1.2 { }; FBSD_1.3 { + ffclock_getcounter; + ffclock_getestimate; + ffclock_setestimate; posix_fadvise; }; From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 13:17:33 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F01511065672; Tue, 10 Jul 2012 13:17:32 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB7DF8FC18; Tue, 10 Jul 2012 13:17:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6ADHW21083736; Tue, 10 Jul 2012 13:17:32 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6ADHWhE083734; Tue, 10 Jul 2012 13:17:32 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201207101317.q6ADHWhE083734@svn.freebsd.org> From: Ed Maste Date: Tue, 10 Jul 2012 13:17:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238346 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 13:17:33 -0000 Author: emaste Date: Tue Jul 10 13:17:32 2012 New Revision: 238346 URL: http://svn.freebsd.org/changeset/base/238346 Log: Plug potential mbuf leak when bridging fragments If an error occurs when transmitting one mbuf in a chain of fragments, free the subsequent fragments instead of leaking them. Sponsored by: ADARA Networks Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Tue Jul 10 08:31:28 2012 (r238345) +++ head/sys/net/if_bridge.c Tue Jul 10 13:17:32 2012 (r238346) @@ -1813,6 +1813,8 @@ bridge_enqueue(struct bridge_softc *sc, if (err == 0) err = dst_ifp->if_transmit(dst_ifp, m); + else + m_freem(m); } if (err == 0) { From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 13:40:06 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F0218106566B; Tue, 10 Jul 2012 13:40:05 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 739ED8FC08; Tue, 10 Jul 2012 13:40:05 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q6ADe44I098633; Tue, 10 Jul 2012 17:40:04 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q6ADe438098632; Tue, 10 Jul 2012 17:40:04 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 10 Jul 2012 17:40:04 +0400 From: Gleb Smirnoff To: net@FreeBSD.org Message-ID: <20120710134004.GE21957@FreeBSD.org> References: <4FFA894D.9050104@FreeBSD.org> <20120709.170813.339720376082380726.hrs@allbsd.org> <4FFA9723.5000301@FreeBSD.org> <20120710.053002.914215153752773154.hrs@allbsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20120710.053002.914215153752773154.hrs@allbsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, melifaro@FreeBSD.org Subject: Re: svn commit: r238277 - in head: etc/defaults etc/rc.d sbin/ipfw share/man/man5 sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 13:40:06 -0000 Hiroki, On Tue, Jul 10, 2012 at 05:30:02AM +0900, Hiroki Sato wrote: H> Given that we add a new API to H> enumerate the interfaces including bpf-only providers with fake H> ifnets, which providers/utilities should be converted to use it? IMO H> usbusN would be a reasonable target but others still need a real H> ifnet. In my understanding, the advantage of using a fake ifnet is H> just to prevent it from appearing as an interface. Is it correct? IMO, neither ipfwlog0 nor pflog0 nor pfsync0 need 'struct ifnet'. They are pure providers for tcpdump only. (pfsync0 also consumes if_ioctl to configure itself, but this can be axed and configuring should be done via /dev/pf as all other parts of pf.) As soon as Alexander comes with API that makes it possible to create BPF "dumping points" in kernel that aren't tied to 'struct ifnet', I'd be happy to remove pfsync/pflog/ipfwlog as interfaces. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 14:21:26 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FB8A106566B; Tue, 10 Jul 2012 14:21:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A9528FC17; Tue, 10 Jul 2012 14:21:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6AELQx0086364; Tue, 10 Jul 2012 14:21:26 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6AELPDJ086362; Tue, 10 Jul 2012 14:21:25 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207101421.q6AELPDJ086362@svn.freebsd.org> From: Warner Losh Date: Tue, 10 Jul 2012 14:21:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238347 - head/sys/arm/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 14:21:26 -0000 Author: imp Date: Tue Jul 10 14:21:25 2012 New Revision: 238347 URL: http://svn.freebsd.org/changeset/base/238347 Log: Revert committal of local change accidentally swept up in r238329. Modified: head/sys/arm/include/atomic.h Modified: head/sys/arm/include/atomic.h ============================================================================== --- head/sys/arm/include/atomic.h Tue Jul 10 13:17:32 2012 (r238346) +++ head/sys/arm/include/atomic.h Tue Jul 10 14:21:25 2012 (r238347) @@ -347,9 +347,7 @@ atomic_readandclear_32(volatile u_int32_ #define atomic_cmpset_ptr(dst, old, new) \ atomic_cmpset_32((volatile u_int *)(dst), (u_int)(old), (u_int)(new)) #define atomic_cmpset_rel_ptr atomic_cmpset_ptr -#define atomic_cmpset_acq_ptr(dst, old, new) \ - atomic_cmpset_ptr((volatile uint32_t *)(dst), (volatile uint32_t)(old), \ - (volatile uint32_t)(new)) +#define atomic_cmpset_acq_ptr atomic_cmpset_ptr #define atomic_store_ptr atomic_store_32 #define atomic_store_rel_ptr atomic_store_ptr From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 15:02:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6A10D1065676; Tue, 10 Jul 2012 15:02:30 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 54C038FC1D; Tue, 10 Jul 2012 15:02:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6AF2U2K088094; Tue, 10 Jul 2012 15:02:30 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6AF2UJk088087; Tue, 10 Jul 2012 15:02:30 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207101502.q6AF2UJk088087@svn.freebsd.org> From: Warner Losh Date: Tue, 10 Jul 2012 15:02:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238348 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 15:02:30 -0000 Author: imp Date: Tue Jul 10 15:02:29 2012 New Revision: 238348 URL: http://svn.freebsd.org/changeset/base/238348 Log: Remove a useless bit of indirection. On all Atmel ARM products, irq 1 is the system IRQ, so use the define for it and get on with life. Modified: head/sys/arm/at91/at91.c head/sys/arm/at91/at91rm9200.c head/sys/arm/at91/at91sam9260.c head/sys/arm/at91/at91sam9g20.c head/sys/arm/at91/at91sam9x25.c head/sys/arm/at91/at91var.h Modified: head/sys/arm/at91/at91.c ============================================================================== --- head/sys/arm/at91/at91.c Tue Jul 10 14:21:25 2012 (r238347) +++ head/sys/arm/at91/at91.c Tue Jul 10 15:02:29 2012 (r238348) @@ -365,7 +365,7 @@ at91_setup_intr(device_t dev, device_t c struct at91_softc *sc = device_get_softc(dev); int error; - if (rman_get_start(ires) == sc->sc_irq_system && filt == NULL) + if (rman_get_start(ires) == AT91_IRQ_SYSTEM && filt == NULL) panic("All system interrupt ISRs must be FILTER"); error = BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, filt, intr, arg, cookiep); Modified: head/sys/arm/at91/at91rm9200.c ============================================================================== --- head/sys/arm/at91/at91rm9200.c Tue Jul 10 14:21:25 2012 (r238347) +++ head/sys/arm/at91/at91rm9200.c Tue Jul 10 15:02:29 2012 (r238348) @@ -204,7 +204,6 @@ at91_attach(device_t dev) /* XXX Hack to tell atmelarm about the AIC */ at91sc->sc_aic_sh = sc->sc_aic_sh; - at91sc->sc_irq_system = AT91_IRQ_SYSTEM; for (i = 0; i < 32; i++) { bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SVR + Modified: head/sys/arm/at91/at91sam9260.c ============================================================================== --- head/sys/arm/at91/at91sam9260.c Tue Jul 10 14:21:25 2012 (r238347) +++ head/sys/arm/at91/at91sam9260.c Tue Jul 10 15:02:29 2012 (r238348) @@ -204,7 +204,6 @@ at91_attach(device_t dev) /* XXX Hack to tell atmelarm about the AIC */ at91sc->sc_aic_sh = sc->sc_aic_sh; - at91sc->sc_irq_system = AT91_IRQ_SYSTEM; for (i = 0; i < 32; i++) { bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SVR + Modified: head/sys/arm/at91/at91sam9g20.c ============================================================================== --- head/sys/arm/at91/at91sam9g20.c Tue Jul 10 14:21:25 2012 (r238347) +++ head/sys/arm/at91/at91sam9g20.c Tue Jul 10 15:02:29 2012 (r238348) @@ -215,7 +215,6 @@ at91_attach(device_t dev) /* XXX Hack to tell atmelarm about the AIC */ at91sc->sc_aic_sh = sc->sc_aic_sh; - at91sc->sc_irq_system = AT91_IRQ_SYSTEM; for (i = 0; i < 32; i++) { bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SVR + Modified: head/sys/arm/at91/at91sam9x25.c ============================================================================== --- head/sys/arm/at91/at91sam9x25.c Tue Jul 10 14:21:25 2012 (r238347) +++ head/sys/arm/at91/at91sam9x25.c Tue Jul 10 15:02:29 2012 (r238348) @@ -218,7 +218,6 @@ at91_attach(device_t dev) /* XXX Hack to tell atmelarm about the AIC */ at91sc->sc_aic_sh = sc->sc_aic_sh; - at91sc->sc_irq_system = AT91_IRQ_SYSTEM; for (i = 0; i < 32; i++) { bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SVR + Modified: head/sys/arm/at91/at91var.h ============================================================================== --- head/sys/arm/at91/at91var.h Tue Jul 10 14:21:25 2012 (r238347) +++ head/sys/arm/at91/at91var.h Tue Jul 10 15:02:29 2012 (r238348) @@ -40,7 +40,6 @@ struct at91_softc { bus_space_handle_t sc_aic_sh; struct rman sc_irq_rman; struct rman sc_mem_rman; - uint32_t sc_irq_system; }; struct at91_ivar { From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 18:17:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 640E7106566C; Tue, 10 Jul 2012 18:17:04 +0000 (UTC) (envelope-from buganini@gmail.com) Received: from mail-qa0-f54.google.com (mail-qa0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id DABF78FC08; Tue, 10 Jul 2012 18:17:03 +0000 (UTC) Received: by qaat11 with SMTP id t11so457942qaa.13 for ; Tue, 10 Jul 2012 11:17:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=hO3B7buQ6CXfY9etA7Ams7IwOG+8NoXr5CsFo/Lxxg0=; b=zd2TXy894kN50Min1GXtGcMCxcN0SsB3KDLr4svtOLEqB+cnKJMqQOY9iYwYCzoidk 6AHx5bKE1Yw58oJypu6N3b68T7p8ZfK0XBeZ33XTJhFyF1YKRs9Jp/e96UJYHv4LCYch e8DRQONUCnu3emuVesXCvL/1OzuRBx0jAtNeem5MqJ9g9Yn8BKmDx1MNZYiBmLvXJn3c Ay+KLykA6vxKxoI+UJAHH1+llxwCEstWYq574lMz1XoMsXb1tsUQDkU53+Rib1cCIyad +x7czKeTlwWaCtpNuW2jtLlUdTN4CEWTxqfaP9rktxUioyQPOLOvPgJikMXMXGR6e8iE lmzA== MIME-Version: 1.0 Received: by 10.229.137.145 with SMTP id w17mr23972353qct.27.1341944222898; Tue, 10 Jul 2012 11:17:02 -0700 (PDT) Received: by 10.229.247.19 with HTTP; Tue, 10 Jul 2012 11:17:02 -0700 (PDT) In-Reply-To: <201207100743.q6A7hWBI067812@svn.freebsd.org> References: <201207100743.q6A7hWBI067812@svn.freebsd.org> Date: Wed, 11 Jul 2012 02:17:02 +0800 Message-ID: From: Buganini To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238343 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 18:17:04 -0000 /usr/src/sys/dev/ath/if_ath.c: In function 'ath_intr': /usr/src/sys/dev/ath/if_ath.c:1628: error: 'HAL_INT_RXHP' undeclared (first use in this function) /usr/src/sys/dev/ath/if_ath.c:1628: error: (Each undeclared identifier is reported only once /usr/src/sys/dev/ath/if_ath.c:1628: error: for each function it appears in.) /usr/src/sys/dev/ath/if_ath.c:1628: error: 'HAL_INT_RXLP' undeclared (first use in this function) /usr/src/sys/dev/ath/if_ath.c: In function 'ath_init': /usr/src/sys/dev/ath/if_ath.c:1880: error: 'HAL_INT_RXHP' undeclared (first use in this function) /usr/src/sys/dev/ath/if_ath.c:1880: error: 'HAL_INT_RXLP' undeclared (first use in this function) 2012/7/10 Adrian Chadd : > Author: adrian > Date: Tue Jul 10 07:43:31 2012 > New Revision: 238343 > URL: http://svn.freebsd.org/changeset/base/238343 > > Log: > Flip on EDMA RX of both HP and LP queue frames. > > Yes, this is in the legacy interrupt path. The NIC does support > MSI but I haven't yet sat down and written that code. > > Modified: > head/sys/dev/ath/if_ath.c > > Modified: head/sys/dev/ath/if_ath.c > ============================================================================== > --- head/sys/dev/ath/if_ath.c Tue Jul 10 06:50:19 2012 (r238342) > +++ head/sys/dev/ath/if_ath.c Tue Jul 10 07:43:31 2012 (r238343) > @@ -1621,7 +1621,11 @@ ath_intr(void *arg) > /* bump tx trigger level */ > ath_hal_updatetxtriglevel(ah, AH_TRUE); > } > - if (status & HAL_INT_RX) { > + /* > + * Handle both the legacy and RX EDMA interrupt bits. > + * Note that HAL_INT_RXLP is also HAL_INT_RXDESC. > + */ > + if (status & (HAL_INT_RX | HAL_INT_RXHP | HAL_INT_RXLP)) { > sc->sc_stats.ast_rx_intr++; > taskqueue_enqueue(sc->sc_tq, &sc->sc_rxtask); > } > @@ -1867,6 +1871,14 @@ ath_init(void *arg) > sc->sc_imask = HAL_INT_RX | HAL_INT_TX > | HAL_INT_RXEOL | HAL_INT_RXORN > | HAL_INT_FATAL | HAL_INT_GLOBAL; > + > + /* > + * Enable RX EDMA bits. Note these overlap with > + * HAL_INT_RX and HAL_INT_RXDESC respectively. > + */ > + if (sc->sc_isedma) > + sc->sc_imask |= (HAL_INT_RXHP | HAL_INT_RXLP); > + > /* > * Enable MIB interrupts when there are hardware phy counters. > * Note we only do this (at the moment) for station mode. > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 18:30:21 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33B271065673; Tue, 10 Jul 2012 18:30:21 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F2578FC14; Tue, 10 Jul 2012 18:30:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6AIUKdM096682; Tue, 10 Jul 2012 18:30:20 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6AIUKDm096680; Tue, 10 Jul 2012 18:30:20 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207101830.q6AIUKDm096680@svn.freebsd.org> From: Adrian Chadd Date: Tue, 10 Jul 2012 18:30:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238349 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 18:30:21 -0000 Author: adrian Date: Tue Jul 10 18:30:20 2012 New Revision: 238349 URL: http://svn.freebsd.org/changeset/base/238349 Log: Commit missing flags for the high/low priority (HP/LP) RX queues. Noticed by: everyone Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Tue Jul 10 15:02:29 2012 (r238348) +++ head/sys/dev/ath/ath_hal/ah.h Tue Jul 10 18:30:20 2012 (r238349) @@ -409,7 +409,10 @@ typedef enum { */ typedef enum { HAL_INT_RX = 0x00000001, /* Non-common mapping */ - HAL_INT_RXDESC = 0x00000002, + HAL_INT_RXDESC = 0x00000002, /* Legacy mapping */ + HAL_INT_RXHP = 0x00000001, /* EDMA */ + HAL_INT_RXLP = 0x00000002, /* EDMA */ + HAL_INT_RXERR = 0x00000004, HAL_INT_RXNOFRM = 0x00000008, HAL_INT_RXEOL = 0x00000010, HAL_INT_RXORN = 0x00000020, From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 18:57:06 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D44C106566C; Tue, 10 Jul 2012 18:57:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 493288FC08; Tue, 10 Jul 2012 18:57:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6AIv6gk097832; Tue, 10 Jul 2012 18:57:06 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6AIv61d097828; Tue, 10 Jul 2012 18:57:06 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201207101857.q6AIv61d097828@svn.freebsd.org> From: John Baldwin Date: Tue, 10 Jul 2012 18:57:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238350 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 18:57:06 -0000 Author: jhb Date: Tue Jul 10 18:57:05 2012 New Revision: 238350 URL: http://svn.freebsd.org/changeset/base/238350 Log: Fix build when ATH_DEBUG is not defined. Modified: head/sys/dev/ath/if_ath_rx_edma.c head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_rx_edma.c ============================================================================== --- head/sys/dev/ath/if_ath_rx_edma.c Tue Jul 10 18:30:20 2012 (r238349) +++ head/sys/dev/ath/if_ath_rx_edma.c Tue Jul 10 18:57:05 2012 (r238350) @@ -618,8 +618,9 @@ ath_edma_rxfifo_flush(struct ath_softc * for (i = 0; i < re->m_fifolen; i++) { if (re->m_fifo[i] != NULL) { - struct ath_buf *bf = re->m_fifo[i]; #ifdef ATH_DEBUG + struct ath_buf *bf = re->m_fifo[i]; + if (sc->sc_debug & ATH_DEBUG_RECV_DESC) ath_printrxbuf(sc, bf, 0, HAL_OK); #endif Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Tue Jul 10 18:30:20 2012 (r238349) +++ head/sys/dev/ath/if_ath_tx.c Tue Jul 10 18:57:05 2012 (r238350) @@ -3583,8 +3583,10 @@ ath_tx_aggr_comp_aggr(struct ath_softc * "seq_st=%d\n", __func__, hasba, tx_ok, isaggr, seq_st); /* XXX TODO: schedule an interface reset */ +#ifdef ATH_DEBUG ath_printtxbuf(sc, bf_first, sc->sc_ac2q[atid->ac]->axq_qnum, 0, 0); +#endif } /* From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 19:48:43 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7BC52106566B; Tue, 10 Jul 2012 19:48:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 67A948FC14; Tue, 10 Jul 2012 19:48:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6AJmhQL000197; Tue, 10 Jul 2012 19:48:43 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6AJmhUk000191; Tue, 10 Jul 2012 19:48:43 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207101948.q6AJmhUk000191@svn.freebsd.org> From: Warner Losh Date: Tue, 10 Jul 2012 19:48:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238354 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 19:48:43 -0000 Author: imp Date: Tue Jul 10 19:48:42 2012 New Revision: 238354 URL: http://svn.freebsd.org/changeset/base/238354 Log: Go ahead and disable the interrupts for the DBGU the boot loader may have left enabled after we detect the CPU, and remove the multiplely copied code from the SoC modules. Modified: head/sys/arm/at91/at91_machdep.c head/sys/arm/at91/at91rm9200.c head/sys/arm/at91/at91sam9260.c head/sys/arm/at91/at91sam9g20.c head/sys/arm/at91/at91sam9x25.c Modified: head/sys/arm/at91/at91_machdep.c ============================================================================== --- head/sys/arm/at91/at91_machdep.c Tue Jul 10 19:10:39 2012 (r238353) +++ head/sys/arm/at91/at91_machdep.c Tue Jul 10 19:48:42 2012 (r238354) @@ -90,6 +90,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -382,6 +383,14 @@ at91_try_id(uint32_t dbgu_base) default: break; } + /* + * Disable interrupts + */ + *(volatile uint32_t *)(AT91_BASE + dbgu_base + USART_IDR) = 0xffffffff; + + /* + * Save the name for later... + */ snprintf(soc_data.name, sizeof(soc_data.name), "%s%s%s", soc_type_name[soc_data.type], soc_data.subtype == AT91_ST_NONE ? "" : " subtype ", Modified: head/sys/arm/at91/at91rm9200.c ============================================================================== --- head/sys/arm/at91/at91rm9200.c Tue Jul 10 19:10:39 2012 (r238353) +++ head/sys/arm/at91/at91rm9200.c Tue Jul 10 19:48:42 2012 (r238354) @@ -50,7 +50,6 @@ struct at91rm92_softc { bus_space_handle_t sc_sh; bus_space_handle_t sc_sys_sh; bus_space_handle_t sc_aic_sh; - bus_space_handle_t sc_dbg_sh; bus_space_handle_t sc_matrix_sh; }; /* @@ -194,10 +193,6 @@ at91_attach(device_t dev) AT91RM92_SYS_SIZE, &sc->sc_sys_sh) != 0) panic("Enable to map system registers"); - if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91RM92_DBGU_BASE, - AT91RM92_DBGU_SIZE, &sc->sc_dbg_sh) != 0) - panic("Enable to map DBGU registers"); - if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91RM92_AIC_BASE, AT91RM92_AIC_SIZE, &sc->sc_aic_sh) != 0) panic("Enable to map system registers"); @@ -229,9 +224,6 @@ at91_attach(device_t dev) /* Disable all interrupts for the SDRAM controller */ bus_space_write_4(sc->sc_st, sc->sc_sys_sh, 0xfa8, 0xffffffff); - /* Disable all interrupts for DBGU */ - bus_space_write_4(sc->sc_st, sc->sc_dbg_sh, 0x0c, 0xffffffff); - /* Update USB device port clock info */ clk = at91_pmc_clock_ref("udpck"); clk->pmc_mask = PMC_SCER_UDP; Modified: head/sys/arm/at91/at91sam9260.c ============================================================================== --- head/sys/arm/at91/at91sam9260.c Tue Jul 10 19:10:39 2012 (r238353) +++ head/sys/arm/at91/at91sam9260.c Tue Jul 10 19:48:42 2012 (r238354) @@ -50,7 +50,6 @@ struct at91sam9_softc { bus_space_handle_t sc_sh; bus_space_handle_t sc_sys_sh; bus_space_handle_t sc_aic_sh; - bus_space_handle_t sc_dbg_sh; bus_space_handle_t sc_matrix_sh; }; @@ -194,10 +193,6 @@ at91_attach(device_t dev) AT91SAM9260_SYS_SIZE, &sc->sc_sys_sh) != 0) panic("Enable to map system registers"); - if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9260_DBGU_BASE, - AT91SAM9260_DBGU_SIZE, &sc->sc_dbg_sh) != 0) - panic("Enable to map DBGU registers"); - if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9260_AIC_BASE, AT91SAM9260_AIC_SIZE, &sc->sc_aic_sh) != 0) panic("Enable to map system registers"); @@ -223,9 +218,6 @@ at91_attach(device_t dev) bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_IDCR, 0xffffffff); bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_ICCR, 0xffffffff); - /* Disable all interrupts for DBGU */ - bus_space_write_4(sc->sc_st, sc->sc_dbg_sh, 0x0c, 0xffffffff); - if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9260_MATRIX_BASE, AT91SAM9260_MATRIX_SIZE, &sc->sc_matrix_sh) != 0) Modified: head/sys/arm/at91/at91sam9g20.c ============================================================================== --- head/sys/arm/at91/at91sam9g20.c Tue Jul 10 19:10:39 2012 (r238353) +++ head/sys/arm/at91/at91sam9g20.c Tue Jul 10 19:48:42 2012 (r238354) @@ -50,7 +50,6 @@ struct at91sam9_softc { bus_space_handle_t sc_sh; bus_space_handle_t sc_sys_sh; bus_space_handle_t sc_aic_sh; - bus_space_handle_t sc_dbg_sh; bus_space_handle_t sc_matrix_sh; }; @@ -205,10 +204,6 @@ at91_attach(device_t dev) AT91SAM9G20_SYS_SIZE, &sc->sc_sys_sh) != 0) panic("Enable to map system registers"); - if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9G20_DBGU_BASE, - AT91SAM9G20_DBGU_SIZE, &sc->sc_dbg_sh) != 0) - panic("Enable to map DBGU registers"); - if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9G20_AIC_BASE, AT91SAM9G20_AIC_SIZE, &sc->sc_aic_sh) != 0) panic("Enable to map system registers"); @@ -234,9 +229,6 @@ at91_attach(device_t dev) bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_IDCR, 0xffffffff); bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_ICCR, 0xffffffff); - /* Disable all interrupts for DBGU */ - bus_space_write_4(sc->sc_st, sc->sc_dbg_sh, 0x0c, 0xffffffff); - if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9G20_MATRIX_BASE, AT91SAM9G20_MATRIX_SIZE, &sc->sc_matrix_sh) != 0) Modified: head/sys/arm/at91/at91sam9x25.c ============================================================================== --- head/sys/arm/at91/at91sam9x25.c Tue Jul 10 19:10:39 2012 (r238353) +++ head/sys/arm/at91/at91sam9x25.c Tue Jul 10 19:48:42 2012 (r238354) @@ -50,7 +50,6 @@ struct at91sam9x25_softc { bus_space_handle_t sc_sh; bus_space_handle_t sc_sys_sh; bus_space_handle_t sc_aic_sh; - bus_space_handle_t sc_dbg_sh; bus_space_handle_t sc_matrix_sh; }; @@ -208,10 +207,6 @@ at91_attach(device_t dev) AT91SAM9X25_SYS_SIZE, &sc->sc_sys_sh) != 0) panic("Enable to map system registers"); - if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9X25_DBGU_BASE, - AT91SAM9X25_DBGU_SIZE, &sc->sc_dbg_sh) != 0) - panic("Enable to map DBGU registers"); - if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9X25_AIC_BASE, AT91SAM9X25_AIC_SIZE, &sc->sc_aic_sh) != 0) panic("Enable to map system registers"); @@ -237,9 +232,6 @@ at91_attach(device_t dev) bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_IDCR, 0xffffffff); bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_ICCR, 0xffffffff); - /* Disable all interrupts for DBGU */ - bus_space_write_4(sc->sc_st, sc->sc_dbg_sh, 0x0c, 0xffffffff); - if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9X25_MATRIX_BASE, AT91SAM9X25_MATRIX_SIZE, &sc->sc_matrix_sh) != 0) From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 20:59:36 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9C0CF106564A; Tue, 10 Jul 2012 20:59:36 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 86F0B8FC08; Tue, 10 Jul 2012 20:59:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6AKxao6003161; Tue, 10 Jul 2012 20:59:36 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6AKxaJr003159; Tue, 10 Jul 2012 20:59:36 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201207102059.q6AKxaJr003159@svn.freebsd.org> From: Ed Maste Date: Tue, 10 Jul 2012 20:59:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238355 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 20:59:36 -0000 Author: emaste Date: Tue Jul 10 20:59:35 2012 New Revision: 238355 URL: http://svn.freebsd.org/changeset/base/238355 Log: Simplify error case Submitted by: thompsa@ Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Tue Jul 10 19:48:42 2012 (r238354) +++ head/sys/net/if_bridge.c Tue Jul 10 20:59:35 2012 (r238355) @@ -1811,10 +1811,10 @@ bridge_enqueue(struct bridge_softc *sc, m->m_flags &= ~M_VLANTAG; } - if (err == 0) - err = dst_ifp->if_transmit(dst_ifp, m); - else - m_freem(m); + if ((err = dst_ifp->if_transmit(dst_ifp, m))) { + m_freem(m0); + break; + } } if (err == 0) { From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 21:03:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5E215106566B; Tue, 10 Jul 2012 21:03:00 +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 485108FC08; Tue, 10 Jul 2012 21:03:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6AL30Mk003352; Tue, 10 Jul 2012 21:03:00 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6AL3081003349; Tue, 10 Jul 2012 21:03:00 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201207102103.q6AL3081003349@svn.freebsd.org> From: Christian Brueffer Date: Tue, 10 Jul 2012 21:03:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238356 - head/sys/netsmb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 21:03:00 -0000 Author: brueffer Date: Tue Jul 10 21:02:59 2012 New Revision: 238356 URL: http://svn.freebsd.org/changeset/base/238356 Log: Change a duplicated check to clarify that we really want to set a reasonable default timeout. PR: 163135 Submitted by: Sascha Wildner Suggested by: bp Reviewed by: bp Modified: head/sys/netsmb/smb_trantcp.c Modified: head/sys/netsmb/smb_trantcp.c ============================================================================== --- head/sys/netsmb/smb_trantcp.c Tue Jul 10 20:59:35 2012 (r238355) +++ head/sys/netsmb/smb_trantcp.c Tue Jul 10 21:02:59 2012 (r238356) @@ -523,8 +523,10 @@ smb_nbst_connect(struct smb_vc *vcp, str return error; getnanotime(&ts2); timespecsub(&ts2, &ts1); - if (ts2.tv_sec == 0 && ts2.tv_sec == 0) + if (ts2.tv_sec == 0) { ts2.tv_sec = 1; + ts2.tv_nsec = 0; + } nbp->nbp_timo = ts2; timespecadd(&nbp->nbp_timo, &ts2); timespecadd(&nbp->nbp_timo, &ts2); From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 22:10:21 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9796106567C; Tue, 10 Jul 2012 22:10:21 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C3E298FC0A; Tue, 10 Jul 2012 22:10:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6AMALMU006120; Tue, 10 Jul 2012 22:10:21 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6AMALrJ006115; Tue, 10 Jul 2012 22:10:21 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207102210.q6AMALrJ006115@svn.freebsd.org> From: Alan Cox Date: Tue, 10 Jul 2012 22:10:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238357 - in head/sys/powerpc: aim booke powerpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 22:10:22 -0000 Author: alc Date: Tue Jul 10 22:10:21 2012 New Revision: 238357 URL: http://svn.freebsd.org/changeset/base/238357 Log: Avoid recursion on the pvh global lock in the aim oea pmap. Correct the return type of the pmap_ts_referenced() implementations. Reported by: jhibbits [1] Tested by: andreast Modified: head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/booke/pmap.c head/sys/powerpc/powerpc/mmu_if.m Modified: head/sys/powerpc/aim/mmu_oea.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea.c Tue Jul 10 21:02:59 2012 (r238356) +++ head/sys/powerpc/aim/mmu_oea.c Tue Jul 10 22:10:21 2012 (r238357) @@ -300,7 +300,7 @@ void moea_init(mmu_t); boolean_t moea_is_modified(mmu_t, vm_page_t); boolean_t moea_is_prefaultable(mmu_t, pmap_t, vm_offset_t); boolean_t moea_is_referenced(mmu_t, vm_page_t); -boolean_t moea_ts_referenced(mmu_t, vm_page_t); +int moea_ts_referenced(mmu_t, vm_page_t); vm_offset_t moea_map(mmu_t, vm_offset_t *, vm_paddr_t, vm_paddr_t, int); boolean_t moea_page_exists_quick(mmu_t, pmap_t, vm_page_t); int moea_page_wired_mappings(mmu_t, vm_page_t); @@ -1269,15 +1269,20 @@ moea_init(mmu_t mmu) boolean_t moea_is_referenced(mmu_t mmu, vm_page_t m) { + boolean_t rv; KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("moea_is_referenced: page %p is not managed", m)); - return (moea_query_bit(m, PTE_REF)); + rw_wlock(&pvh_global_lock); + rv = moea_query_bit(m, PTE_REF); + rw_wunlock(&pvh_global_lock); + return (rv); } boolean_t moea_is_modified(mmu_t mmu, vm_page_t m) { + boolean_t rv; KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("moea_is_modified: page %p is not managed", m)); @@ -1291,7 +1296,10 @@ moea_is_modified(mmu_t mmu, vm_page_t m) if ((m->oflags & VPO_BUSY) == 0 && (m->aflags & PGA_WRITEABLE) == 0) return (FALSE); - return (moea_query_bit(m, PTE_CHG)); + rw_wlock(&pvh_global_lock); + rv = moea_query_bit(m, PTE_CHG); + rw_wunlock(&pvh_global_lock); + return (rv); } boolean_t @@ -1313,7 +1321,9 @@ moea_clear_reference(mmu_t mmu, vm_page_ KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("moea_clear_reference: page %p is not managed", m)); + rw_wlock(&pvh_global_lock); moea_clear_bit(m, PTE_REF); + rw_wunlock(&pvh_global_lock); } void @@ -1333,7 +1343,9 @@ moea_clear_modify(mmu_t mmu, vm_page_t m */ if ((m->aflags & PGA_WRITEABLE) == 0) return; + rw_wlock(&pvh_global_lock); moea_clear_bit(m, PTE_CHG); + rw_wunlock(&pvh_global_lock); } /* @@ -1400,13 +1412,17 @@ moea_remove_write(mmu_t mmu, vm_page_t m * should be tested and standardized at some point in the future for * optimal aging of shared pages. */ -boolean_t +int moea_ts_referenced(mmu_t mmu, vm_page_t m) { + int count; KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("moea_ts_referenced: page %p is not managed", m)); - return (moea_clear_bit(m, PTE_REF)); + rw_wlock(&pvh_global_lock); + count = moea_clear_bit(m, PTE_REF); + rw_wunlock(&pvh_global_lock); + return (count); } /* @@ -1816,7 +1832,7 @@ moea_remove_all(mmu_t mmu, vm_page_t m) moea_pvo_remove(pvo, -1); PMAP_UNLOCK(pmap); } - if ((m->aflags & PGA_WRITEABLE) && moea_is_modified(mmu, m)) { + if ((m->aflags & PGA_WRITEABLE) && moea_query_bit(m, PTE_CHG)) { moea_attr_clear(m, PTE_CHG); vm_page_dirty(m); } @@ -2293,10 +2309,10 @@ moea_query_bit(vm_page_t m, int ptebit) struct pvo_entry *pvo; struct pte *pt; + rw_assert(&pvh_global_lock, RA_WLOCKED); if (moea_attr_fetch(m) & ptebit) return (TRUE); - rw_wlock(&pvh_global_lock); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { /* @@ -2305,7 +2321,6 @@ moea_query_bit(vm_page_t m, int ptebit) */ if (pvo->pvo_pte.pte.pte_lo & ptebit) { moea_attr_save(m, ptebit); - rw_wunlock(&pvh_global_lock); return (TRUE); } } @@ -2329,13 +2344,11 @@ moea_query_bit(vm_page_t m, int ptebit) mtx_unlock(&moea_table_mutex); if (pvo->pvo_pte.pte.pte_lo & ptebit) { moea_attr_save(m, ptebit); - rw_wunlock(&pvh_global_lock); return (TRUE); } } } - rw_wunlock(&pvh_global_lock); return (FALSE); } @@ -2346,7 +2359,7 @@ moea_clear_bit(vm_page_t m, int ptebit) struct pvo_entry *pvo; struct pte *pt; - rw_wlock(&pvh_global_lock); + rw_assert(&pvh_global_lock, RA_WLOCKED); /* * Clear the cached value. @@ -2380,7 +2393,6 @@ moea_clear_bit(vm_page_t m, int ptebit) pvo->pvo_pte.pte.pte_lo &= ~ptebit; } - rw_wunlock(&pvh_global_lock); return (count); } Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Tue Jul 10 21:02:59 2012 (r238356) +++ head/sys/powerpc/aim/mmu_oea64.c Tue Jul 10 22:10:21 2012 (r238357) @@ -305,7 +305,7 @@ void moea64_init(mmu_t); boolean_t moea64_is_modified(mmu_t, vm_page_t); boolean_t moea64_is_prefaultable(mmu_t, pmap_t, vm_offset_t); boolean_t moea64_is_referenced(mmu_t, vm_page_t); -boolean_t moea64_ts_referenced(mmu_t, vm_page_t); +int moea64_ts_referenced(mmu_t, vm_page_t); vm_offset_t moea64_map(mmu_t, vm_offset_t *, vm_paddr_t, vm_paddr_t, int); boolean_t moea64_page_exists_quick(mmu_t, pmap_t, vm_page_t); int moea64_page_wired_mappings(mmu_t, vm_page_t); @@ -1570,7 +1570,7 @@ moea64_remove_write(mmu_t mmu, vm_page_t * should be tested and standardized at some point in the future for * optimal aging of shared pages. */ -boolean_t +int moea64_ts_referenced(mmu_t mmu, vm_page_t m) { Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Tue Jul 10 21:02:59 2012 (r238356) +++ head/sys/powerpc/booke/pmap.c Tue Jul 10 22:10:21 2012 (r238357) @@ -286,7 +286,7 @@ static void mmu_booke_init(mmu_t); static boolean_t mmu_booke_is_modified(mmu_t, vm_page_t); static boolean_t mmu_booke_is_prefaultable(mmu_t, pmap_t, vm_offset_t); static boolean_t mmu_booke_is_referenced(mmu_t, vm_page_t); -static boolean_t mmu_booke_ts_referenced(mmu_t, vm_page_t); +static int mmu_booke_ts_referenced(mmu_t, vm_page_t); static vm_offset_t mmu_booke_map(mmu_t, vm_offset_t *, vm_paddr_t, vm_paddr_t, int); static int mmu_booke_mincore(mmu_t, pmap_t, vm_offset_t, Modified: head/sys/powerpc/powerpc/mmu_if.m ============================================================================== --- head/sys/powerpc/powerpc/mmu_if.m Tue Jul 10 21:02:59 2012 (r238356) +++ head/sys/powerpc/powerpc/mmu_if.m Tue Jul 10 22:10:21 2012 (r238357) @@ -387,7 +387,7 @@ METHOD boolean_t is_referenced { * * @retval int count of referenced bits */ -METHOD boolean_t ts_referenced { +METHOD int ts_referenced { mmu_t _mmu; vm_page_t _pg; }; From owner-svn-src-head@FreeBSD.ORG Tue Jul 10 23:11:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 067DF1065673; Tue, 10 Jul 2012 23:11:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E64568FC08; Tue, 10 Jul 2012 23:11:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6ANBqxU008959; Tue, 10 Jul 2012 23:11:52 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6ANBqN8008956; Tue, 10 Jul 2012 23:11:52 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207102311.q6ANBqN8008956@svn.freebsd.org> From: Warner Losh Date: Tue, 10 Jul 2012 23:11:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238358 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 23:11:53 -0000 Author: imp Date: Tue Jul 10 23:11:52 2012 New Revision: 238358 URL: http://svn.freebsd.org/changeset/base/238358 Log: Remove some more unused code. Modified: head/sys/arm/at91/at91rm9200.c head/sys/arm/at91/at91sam9x25.c Modified: head/sys/arm/at91/at91rm9200.c ============================================================================== --- head/sys/arm/at91/at91rm9200.c Tue Jul 10 22:10:21 2012 (r238357) +++ head/sys/arm/at91/at91rm9200.c Tue Jul 10 23:11:52 2012 (r238358) @@ -50,7 +50,6 @@ struct at91rm92_softc { bus_space_handle_t sc_sh; bus_space_handle_t sc_sys_sh; bus_space_handle_t sc_aic_sh; - bus_space_handle_t sc_matrix_sh; }; /* * Standard priority levels for the system. 0 is lowest and 7 is highest. Modified: head/sys/arm/at91/at91sam9x25.c ============================================================================== --- head/sys/arm/at91/at91sam9x25.c Tue Jul 10 22:10:21 2012 (r238357) +++ head/sys/arm/at91/at91sam9x25.c Tue Jul 10 23:11:52 2012 (r238358) @@ -50,7 +50,6 @@ struct at91sam9x25_softc { bus_space_handle_t sc_sh; bus_space_handle_t sc_sys_sh; bus_space_handle_t sc_aic_sh; - bus_space_handle_t sc_matrix_sh; }; /* @@ -232,20 +231,6 @@ at91_attach(device_t dev) bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_IDCR, 0xffffffff); bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_ICCR, 0xffffffff); - if (bus_space_subregion(sc->sc_st, sc->sc_sh, - AT91SAM9X25_MATRIX_BASE, AT91SAM9X25_MATRIX_SIZE, - &sc->sc_matrix_sh) != 0) - panic("Enable to map matrix registers"); - -#if 0 /* wrong, placeholder */ - /* activate NAND*/ - i = bus_space_read_4(sc->sc_st, sc->sc_matrix_sh, - AT91SAM9X25_EBICSA); - bus_space_write_4(sc->sc_st, sc->sc_matrix_sh, - AT91SAM9X25_EBICSA, - i | AT91_MATRIX_EBI_CS3A_SMC_SMARTMEDIA); -#endif - /* Update USB device port clock info */ clk = at91_pmc_clock_ref("udpck"); clk->pmc_mask = PMC_SCER_UDP_SAM9; From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 01:04:59 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA0B7106566C; Wed, 11 Jul 2012 01:04:59 +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 D59D68FC08; Wed, 11 Jul 2012 01:04:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6B14xBV013538; Wed, 11 Jul 2012 01:04:59 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6B14xTq013535; Wed, 11 Jul 2012 01:04:59 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201207110104.q6B14xTq013535@svn.freebsd.org> From: Attilio Rao Date: Wed, 11 Jul 2012 01:04:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238359 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 01:05:00 -0000 Author: attilio Date: Wed Jul 11 01:04:59 2012 New Revision: 238359 URL: http://svn.freebsd.org/changeset/base/238359 Log: Document the object type movements, related to swp_pager_copy(), in vm_object_collapse() and vm_object_split(). In collabouration with: alc MFC after: 3 days Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Tue Jul 10 23:11:52 2012 (r238358) +++ head/sys/vm/vm_object.c Wed Jul 11 01:04:59 2012 (r238359) @@ -1381,6 +1381,12 @@ retry: /* * Transfer any cached pages from orig_object to new_object. + * If swap_pager_copy() found swapped out pages within the + * specified range of orig_object, then it changed + * new_object's type to OBJT_SWAP when it transferred those + * pages to new_object. Otherwise, new_object's type + * should still be OBJT_DEFAULT and orig_object should not + * contain any cached pages within the specified range. */ if (__predict_false(orig_object->cache != NULL)) vm_page_cache_transfer(orig_object, offidxstart, @@ -1719,6 +1725,9 @@ vm_object_collapse(vm_object_t object) * swap_pager_copy() can sleep, in which case * the backing_object's and object's locks are * released and reacquired. + * Since swap_pager_copy() is being asked to + * destroy the source, it will change the + * backing_object's type to OBJT_DEFAULT. */ swap_pager_copy( backing_object, From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 02:57:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D236C1065670; Wed, 11 Jul 2012 02:57:19 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA9108FC15; Wed, 11 Jul 2012 02:57:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6B2vJFr018102; Wed, 11 Jul 2012 02:57:19 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6B2vJvf018096; Wed, 11 Jul 2012 02:57:19 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201207110257.q6B2vJvf018096@svn.freebsd.org> From: Peter Grehan Date: Wed, 11 Jul 2012 02:57:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238360 - in head/sys/dev/virtio: . balloon block network pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 02:57:19 -0000 Author: grehan Date: Wed Jul 11 02:57:19 2012 New Revision: 238360 URL: http://svn.freebsd.org/changeset/base/238360 Log: Various VirtIO improvements PCI: - Properly handle interrupt fallback from MSIX to MSI to legacy. The host may not have sufficient resources to support MSIX, so we must be able to fallback to legacy interrupts. - Add interface to get the (sub) vendor and device IDs. - Rename flags to VTPCI_FLAG_* like other VirtIO drivers. Block: - No longer allocate vtblk_requests from separate UMA zone. malloc(9) from M_DEVBUF is sufficient. Assert segment counts at allocation. - More verbose error and debug messages. Network: - Remove stray write once variable. Virtqueue: - Shuffle code around in preparation of converting the mb()s to the appropriate atomic(9) operations. - Only walk the descriptor chain when freeing if INVARIANTS is defined since the result is only KASSERT()ed. Submitted by: Bryan Venteicher (bryanv@daemoninthecloset.org) Modified: head/sys/dev/virtio/balloon/virtio_balloon.c head/sys/dev/virtio/block/virtio_blk.c head/sys/dev/virtio/network/if_vtnet.c head/sys/dev/virtio/pci/virtio_pci.c head/sys/dev/virtio/pci/virtio_pci.h head/sys/dev/virtio/virtio.c head/sys/dev/virtio/virtio.h head/sys/dev/virtio/virtio_ring.h head/sys/dev/virtio/virtqueue.c head/sys/dev/virtio/virtqueue.h Modified: head/sys/dev/virtio/balloon/virtio_balloon.c ============================================================================== --- head/sys/dev/virtio/balloon/virtio_balloon.c Wed Jul 11 01:04:59 2012 (r238359) +++ head/sys/dev/virtio/balloon/virtio_balloon.c Wed Jul 11 02:57:19 2012 (r238360) @@ -412,7 +412,6 @@ vtballoon_send_page_frames(struct vtball * interrupt handler will wake us up. */ VTBALLOON_LOCK(sc); - while ((c = virtqueue_dequeue(vq, NULL)) == NULL) msleep_spin(sc, VTBALLOON_MTX(sc), "vtbspf", 0); VTBALLOON_UNLOCK(sc); Modified: head/sys/dev/virtio/block/virtio_blk.c ============================================================================== --- head/sys/dev/virtio/block/virtio_blk.c Wed Jul 11 01:04:59 2012 (r238359) +++ head/sys/dev/virtio/block/virtio_blk.c Wed Jul 11 02:57:19 2012 (r238360) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -119,7 +118,7 @@ static int vtblk_shutdown(device_t); static int vtblk_open(struct disk *); static int vtblk_close(struct disk *); static int vtblk_ioctl(struct disk *, u_long, void *, int, - struct thread *); + struct thread *); static int vtblk_dump(void *, void *, vm_offset_t, off_t, size_t); static void vtblk_strategy(struct bio *); @@ -193,7 +192,7 @@ TUNABLE_INT("hw.vtblk.no_ident", &vtblk_ mtx_assert(VTBLK_MTX((_sc)), MA_NOTOWNED) #define VTBLK_DISK_NAME "vtbd" -#define VTBLK_QUIESCE_TIMEOUT (30 * hz) +#define VTBLK_QUIESCE_TIMEOUT (30 * hz) /* * Each block request uses at least two segments - one for the header @@ -201,8 +200,6 @@ TUNABLE_INT("hw.vtblk.no_ident", &vtblk_ */ #define VTBLK_MIN_SEGMENTS 2 -static uma_zone_t vtblk_req_zone; - static device_method_t vtblk_methods[] = { /* Device methods. */ DEVMETHOD(device_probe, vtblk_probe), @@ -236,19 +233,8 @@ vtblk_modevent(module_t mod, int type, v switch (type) { case MOD_LOAD: - vtblk_req_zone = uma_zcreate("vtblk_request", - sizeof(struct vtblk_request), - NULL, NULL, NULL, NULL, 0, 0); - break; case MOD_QUIESCE: case MOD_UNLOAD: - if (uma_zone_get_cur(vtblk_req_zone) > 0) - error = EBUSY; - else if (type == MOD_UNLOAD) { - uma_zdestroy(vtblk_req_zone); - vtblk_req_zone = NULL; - } - break; case MOD_SHUTDOWN: break; default: @@ -316,7 +302,7 @@ vtblk_attach(device_t dev) } sc->vtblk_max_nsegs = vtblk_maximum_segments(sc, &blkcfg); - if (sc->vtblk_max_nsegs <= VTBLK_MIN_SEGMENTS) { + if (sc->vtblk_max_nsegs <= VTBLK_MIN_SEGMENTS) { error = EINVAL; device_printf(dev, "fewer than minimum number of segments " "allowed: %d\n", sc->vtblk_max_nsegs); @@ -493,7 +479,6 @@ vtblk_dump(void *arg, void *virtual, vm_ int error; dp = arg; - error = 0; if ((sc = dp->d_drv1) == NULL) return (ENXIO); @@ -539,7 +524,7 @@ vtblk_strategy(struct bio *bp) return; } -#ifdef INVARIANTS +#ifdef INVARIANTS /* * Prevent read/write buffers spanning too many segments from * getting into the queue. This should only trip if d_maxsize @@ -547,13 +532,13 @@ vtblk_strategy(struct bio *bp) */ if (bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE) { int nsegs, max_nsegs; - + nsegs = sglist_count(bp->bio_data, bp->bio_bcount); max_nsegs = sc->vtblk_max_nsegs - VTBLK_MIN_SEGMENTS; KASSERT(nsegs <= max_nsegs, - ("bio spanned too many segments: %d, max: %d", - nsegs, max_nsegs)); + ("bio %p spanned too many segments: %d, max: %d", + bp, nsegs, max_nsegs)); } #endif @@ -800,27 +785,22 @@ vtblk_execute_request(struct vtblk_softc VTBLK_LOCK_ASSERT(sc); sglist_reset(sg); - error = sglist_append(sg, &req->vbr_hdr, - sizeof(struct virtio_blk_outhdr)); - KASSERT(error == 0, ("error adding header to sglist")); - KASSERT(sg->sg_nseg == 1, - ("header spanned multiple segments: %d", sg->sg_nseg)); + + sglist_append(sg, &req->vbr_hdr, sizeof(struct virtio_blk_outhdr)); if (bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE) { error = sglist_append(sg, bp->bio_data, bp->bio_bcount); - KASSERT(error == 0, ("error adding buffer to sglist")); + if (error || sg->sg_nseg == sg->sg_maxseg) + panic("%s: data buffer too big bio:%p error:%d", + __FUNCTION__, bp, error); /* BIO_READ means the host writes into our buffer. */ if (bp->bio_cmd == BIO_READ) - writable += sg->sg_nseg - 1; + writable = sg->sg_nseg - 1; } - error = sglist_append(sg, &req->vbr_ack, sizeof(uint8_t)); - KASSERT(error == 0, ("error adding ack to sglist")); writable++; - - KASSERT(sg->sg_nseg >= VTBLK_MIN_SEGMENTS, - ("fewer than min segments: %d", sg->sg_nseg)); + sglist_append(sg, &req->vbr_ack, sizeof(uint8_t)); readable = sg->sg_nseg - writable; @@ -995,12 +975,10 @@ vtblk_flush_dump(struct vtblk_softc *sc) static int vtblk_poll_request(struct vtblk_softc *sc, struct vtblk_request *req) { - device_t dev; struct virtqueue *vq; struct vtblk_request *r; int error; - dev = sc->vtblk_dev; vq = sc->vtblk_vq; if (!virtqueue_empty(vq)) @@ -1013,12 +991,12 @@ vtblk_poll_request(struct vtblk_softc *s virtqueue_notify(vq); r = virtqueue_poll(vq, NULL); - KASSERT(r == req, ("unexpected request response")); + KASSERT(r == req, ("unexpected request response: %p/%p", r, req)); error = vtblk_request_error(req); if (error && bootverbose) { - device_printf(dev, "vtblk_poll_request: IO error: %d\n", - error); + device_printf(sc->vtblk_dev, + "%s: IO error: %d\n", __FUNCTION__, error); } return (error); @@ -1090,6 +1068,20 @@ vtblk_drain(struct vtblk_softc *sc) vtblk_free_requests(sc); } +#ifdef INVARIANTS +static void +vtblk_request_invariants(struct vtblk_request *req) +{ + int hdr_nsegs, ack_nsegs; + + hdr_nsegs = sglist_count(&req->vbr_hdr, sizeof(req->vbr_hdr)); + ack_nsegs = sglist_count(&req->vbr_ack, sizeof(req->vbr_ack)); + + KASSERT(hdr_nsegs == 1, ("request header crossed page boundary")); + KASSERT(ack_nsegs == 1, ("request ack crossed page boundary")); +} +#endif + static int vtblk_alloc_requests(struct vtblk_softc *sc) { @@ -1107,10 +1099,14 @@ vtblk_alloc_requests(struct vtblk_softc nreqs /= VTBLK_MIN_SEGMENTS; for (i = 0; i < nreqs; i++) { - req = uma_zalloc(vtblk_req_zone, M_NOWAIT); + req = malloc(sizeof(struct vtblk_request), M_DEVBUF, M_NOWAIT); if (req == NULL) return (ENOMEM); +#ifdef INVARIANTS + vtblk_request_invariants(req); +#endif + sc->vtblk_request_count++; vtblk_enqueue_request(sc, req); } @@ -1128,10 +1124,11 @@ vtblk_free_requests(struct vtblk_softc * while ((req = vtblk_dequeue_request(sc)) != NULL) { sc->vtblk_request_count--; - uma_zfree(vtblk_req_zone, req); + free(req, M_DEVBUF); } - KASSERT(sc->vtblk_request_count == 0, ("leaked requests")); + KASSERT(sc->vtblk_request_count == 0, + ("leaked requests: %d", sc->vtblk_request_count)); } static struct vtblk_request * Modified: head/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- head/sys/dev/virtio/network/if_vtnet.c Wed Jul 11 01:04:59 2012 (r238359) +++ head/sys/dev/virtio/network/if_vtnet.c Wed Jul 11 02:57:19 2012 (r238360) @@ -748,11 +748,9 @@ vtnet_is_link_up(struct vtnet_softc *sc) static void vtnet_update_link_status(struct vtnet_softc *sc) { - device_t dev; struct ifnet *ifp; int link; - dev = sc->vtnet_dev; ifp = sc->vtnet_ifp; link = vtnet_is_link_up(sc); Modified: head/sys/dev/virtio/pci/virtio_pci.c ============================================================================== --- head/sys/dev/virtio/pci/virtio_pci.c Wed Jul 11 01:04:59 2012 (r238359) +++ head/sys/dev/virtio/pci/virtio_pci.c Wed Jul 11 02:57:19 2012 (r238360) @@ -57,12 +57,15 @@ struct vtpci_softc { struct resource *vtpci_msix_res; uint64_t vtpci_features; uint32_t vtpci_flags; -#define VIRTIO_PCI_FLAG_NO_MSI 0x0001 -#define VIRTIO_PCI_FLAG_MSI 0x0002 -#define VIRTIO_PCI_FLAG_NO_MSIX 0x0010 -#define VIRTIO_PCI_FLAG_MSIX 0x0020 -#define VIRTIO_PCI_FLAG_SHARED_MSIX 0x0040 +#define VTPCI_FLAG_NO_MSI 0x0001 +#define VTPCI_FLAG_NO_MSIX 0x0002 +#define VTPCI_FLAG_LEGACY 0x1000 +#define VTPCI_FLAG_MSI 0x2000 +#define VTPCI_FLAG_MSIX 0x4000 +#define VTPCI_FLAG_SHARED_MSIX 0x8000 +#define VTPCI_FLAG_ITYPE_MASK 0xF000 + /* This "bus" will only ever have one child. */ device_t vtpci_child_dev; struct virtio_feature_desc *vtpci_child_feat_desc; @@ -80,7 +83,8 @@ struct vtpci_softc { int vtpci_nvqs; struct vtpci_virtqueue { struct virtqueue *vq; - + /* Device did not provide a callback for this virtqueue. */ + int no_intr; /* Index into vtpci_intr_res[] below. Unused, then -1. */ int ires_idx; } vtpci_vqx[VIRTIO_MAX_VIRTQUEUES]; @@ -130,24 +134,39 @@ static void vtpci_describe_features(stru uint64_t); static void vtpci_probe_and_attach_child(struct vtpci_softc *); -static int vtpci_alloc_interrupts(struct vtpci_softc *, int, int, - struct vq_alloc_info *); -static int vtpci_alloc_intr_resources(struct vtpci_softc *, int, - struct vq_alloc_info *); -static int vtpci_alloc_msi(struct vtpci_softc *); -static int vtpci_alloc_msix(struct vtpci_softc *, int); +static int vtpci_alloc_msix(struct vtpci_softc *, int); +static int vtpci_alloc_msi(struct vtpci_softc *); +static int vtpci_alloc_intr_msix_pervq(struct vtpci_softc *); +static int vtpci_alloc_intr_msix_shared(struct vtpci_softc *); +static int vtpci_alloc_intr_msi(struct vtpci_softc *); +static int vtpci_alloc_intr_legacy(struct vtpci_softc *); +static int vtpci_alloc_intr_resources(struct vtpci_softc *); + +static int vtpci_setup_legacy_interrupt(struct vtpci_softc *, + enum intr_type); +static int vtpci_setup_msix_interrupts(struct vtpci_softc *, + enum intr_type); +static int vtpci_setup_interrupts(struct vtpci_softc *, enum intr_type); + static int vtpci_register_msix_vector(struct vtpci_softc *, int, int); +static int vtpci_set_host_msix_vectors(struct vtpci_softc *); +static int vtpci_reinit_virtqueue(struct vtpci_softc *, int); static void vtpci_free_interrupts(struct vtpci_softc *); static void vtpci_free_virtqueues(struct vtpci_softc *); +static void vtpci_cleanup_setup_intr_attempt(struct vtpci_softc *); static void vtpci_release_child_resources(struct vtpci_softc *); static void vtpci_reset(struct vtpci_softc *); +static void vtpci_select_virtqueue(struct vtpci_softc *, int); + static int vtpci_legacy_intr(void *); static int vtpci_vq_shared_intr(void *); static int vtpci_vq_intr(void *); static int vtpci_config_intr(void *); +#define vtpci_setup_msi_interrupt vtpci_setup_legacy_interrupt + /* * I/O port read/write wrappers. */ @@ -252,7 +271,7 @@ vtpci_attach(device_t dev) } if (pci_find_cap(dev, PCIY_MSI, NULL) != 0) - sc->vtpci_flags |= VIRTIO_PCI_FLAG_NO_MSI; + sc->vtpci_flags |= VTPCI_FLAG_NO_MSI; if (pci_find_cap(dev, PCIY_MSIX, NULL) == 0) { rid = PCIR_BAR(1); @@ -261,7 +280,7 @@ vtpci_attach(device_t dev) } if (sc->vtpci_msix_res == NULL) - sc->vtpci_flags |= VIRTIO_PCI_FLAG_NO_MSIX; + sc->vtpci_flags |= VTPCI_FLAG_NO_MSIX; vtpci_reset(sc); @@ -372,6 +391,16 @@ vtpci_read_ivar(device_t dev, device_t c switch (index) { case VIRTIO_IVAR_DEVTYPE: + case VIRTIO_IVAR_SUBDEVICE: + *result = pci_get_subdevice(dev); + break; + case VIRTIO_IVAR_VENDOR: + *result = pci_get_vendor(dev); + break; + case VIRTIO_IVAR_DEVICE: + *result = pci_get_device(dev); + break; + case VIRTIO_IVAR_SUBVENDOR: *result = pci_get_subdevice(dev); break; default: @@ -442,102 +471,97 @@ vtpci_alloc_virtqueues(device_t dev, int struct vq_alloc_info *vq_info) { struct vtpci_softc *sc; + struct virtqueue *vq; struct vtpci_virtqueue *vqx; struct vq_alloc_info *info; - int queue, error; - uint16_t vq_size; + int idx, error; + uint16_t size; sc = device_get_softc(dev); + error = 0; - if (sc->vtpci_nvqs != 0 || nvqs <= 0 || - nvqs > VIRTIO_MAX_VIRTQUEUES) + if (sc->vtpci_nvqs != 0) + return (EALREADY); + if (nvqs <= 0 || nvqs > VIRTIO_MAX_VIRTQUEUES) return (EINVAL); - error = vtpci_alloc_interrupts(sc, flags, nvqs, vq_info); - if (error) { - device_printf(dev, "cannot allocate interrupts\n"); - return (error); - } - - if (sc->vtpci_flags & VIRTIO_PCI_FLAG_MSIX) { - error = vtpci_register_msix_vector(sc, - VIRTIO_MSI_CONFIG_VECTOR, 0); - if (error) - return (error); - } + if (flags & VIRTIO_ALLOC_VQS_DISABLE_MSIX) + sc->vtpci_flags |= VTPCI_FLAG_NO_MSIX; - for (queue = 0; queue < nvqs; queue++) { - vqx = &sc->vtpci_vqx[queue]; - info = &vq_info[queue]; - - vtpci_write_config_2(sc, VIRTIO_PCI_QUEUE_SEL, queue); - - vq_size = vtpci_read_config_2(sc, VIRTIO_PCI_QUEUE_NUM); - error = virtqueue_alloc(dev, queue, vq_size, - VIRTIO_PCI_VRING_ALIGN, 0xFFFFFFFFUL, info, &vqx->vq); - if (error) - return (error); - - if (sc->vtpci_flags & VIRTIO_PCI_FLAG_MSIX) { - error = vtpci_register_msix_vector(sc, - VIRTIO_MSI_QUEUE_VECTOR, vqx->ires_idx); - if (error) - return (error); + for (idx = 0; idx < nvqs; idx++) { + vqx = &sc->vtpci_vqx[idx]; + info = &vq_info[idx]; + + vtpci_select_virtqueue(sc, idx); + size = vtpci_read_config_2(sc, VIRTIO_PCI_QUEUE_NUM); + + error = virtqueue_alloc(dev, idx, size, VIRTIO_PCI_VRING_ALIGN, + 0xFFFFFFFFUL, info, &vq); + if (error) { + device_printf(dev, + "cannot allocate virtqueue %d: %d\n", idx, error); + break; } vtpci_write_config_4(sc, VIRTIO_PCI_QUEUE_PFN, - virtqueue_paddr(vqx->vq) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT); + virtqueue_paddr(vq) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT); + + vqx->vq = *info->vqai_vq = vq; + vqx->no_intr = info->vqai_intr == NULL; - *info->vqai_vq = vqx->vq; sc->vtpci_nvqs++; } - return (0); + return (error); } static int vtpci_setup_intr(device_t dev, enum intr_type type) { struct vtpci_softc *sc; - struct vtpci_intr_resource *ires; - struct vtpci_virtqueue *vqx; - int i, flags, error; + int attempt, error; sc = device_get_softc(dev); - flags = type | INTR_MPSAFE; - ires = &sc->vtpci_intr_res[0]; - - if ((sc->vtpci_flags & VIRTIO_PCI_FLAG_MSIX) == 0) { - error = bus_setup_intr(dev, ires->irq, flags, - vtpci_legacy_intr, NULL, sc, &ires->intrhand); - return (error); - } - - error = bus_setup_intr(dev, ires->irq, flags, vtpci_config_intr, - NULL, sc, &ires->intrhand); - if (error) - return (error); + for (attempt = 0; attempt < 5; attempt++) { + /* + * Start with the most desirable interrupt configuration and + * fallback towards less desirable ones. + */ + switch (attempt) { + case 0: + error = vtpci_alloc_intr_msix_pervq(sc); + break; + case 1: + error = vtpci_alloc_intr_msix_shared(sc); + break; + case 2: + error = vtpci_alloc_intr_msi(sc); + break; + case 3: + error = vtpci_alloc_intr_legacy(sc); + break; + default: + device_printf(dev, + "exhausted all interrupt allocation attempts\n"); + return (ENXIO); + } - if (sc->vtpci_flags & VIRTIO_PCI_FLAG_SHARED_MSIX) { - ires = &sc->vtpci_intr_res[1]; - error = bus_setup_intr(dev, ires->irq, flags, - vtpci_vq_shared_intr, NULL, sc, &ires->intrhand); + if (error == 0 && vtpci_setup_interrupts(sc, type) == 0) + break; - return (error); + vtpci_cleanup_setup_intr_attempt(sc); } - /* Setup an interrupt handler for each virtqueue. */ - for (i = 0; i < sc->vtpci_nvqs; i++) { - vqx = &sc->vtpci_vqx[i]; - if (vqx->ires_idx < 1) - continue; - - ires = &sc->vtpci_intr_res[vqx->ires_idx]; - error = bus_setup_intr(dev, ires->irq, flags, - vtpci_vq_intr, NULL, vqx->vq, &ires->intrhand); - if (error) - return (error); + if (bootverbose) { + if (sc->vtpci_flags & VTPCI_FLAG_LEGACY) + device_printf(dev, "using legacy interrupt\n"); + else if (sc->vtpci_flags & VTPCI_FLAG_MSI) + device_printf(dev, "using MSI interrupt\n"); + else if (sc->vtpci_flags & VTPCI_FLAG_SHARED_MSIX) + device_printf(dev, "using shared MSIX interrupts\n"); + else + device_printf(dev, "using per VQ MSIX interrupts\n"); } return (0); @@ -554,20 +578,19 @@ static int vtpci_reinit(device_t dev, uint64_t features) { struct vtpci_softc *sc; - struct vtpci_virtqueue *vqx; - struct virtqueue *vq; - int queue, error; - uint16_t vq_size; + int idx, error; sc = device_get_softc(dev); /* - * Redrive the device initialization. This is a bit of an abuse - * of the specification, but both VirtualBox and QEMU/KVM seem - * to play nice. We do not allow the host device to change from - * what was originally negotiated beyond what the guest driver - * changed (MSIX state should not change, number of virtqueues - * and their size remain the same, etc). + * Redrive the device initialization. This is a bit of an abuse of + * the specification, but VirtualBox, QEMU/KVM, and BHyVe seem to + * play nice. + * + * We do not allow the host device to change from what was originally + * negotiated beyond what the guest driver changed. MSIX state should + * not change, number of virtqueues and their size remain the same, etc. + * This will need to be rethought when we want to support migration. */ if (vtpci_get_status(dev) != VIRTIO_CONFIG_STATUS_RESET) @@ -582,34 +605,16 @@ vtpci_reinit(device_t dev, uint64_t feat vtpci_negotiate_features(dev, features); - if (sc->vtpci_flags & VIRTIO_PCI_FLAG_MSIX) { - error = vtpci_register_msix_vector(sc, - VIRTIO_MSI_CONFIG_VECTOR, 0); + for (idx = 0; idx < sc->vtpci_nvqs; idx++) { + error = vtpci_reinit_virtqueue(sc, idx); if (error) return (error); } - for (queue = 0; queue < sc->vtpci_nvqs; queue++) { - vqx = &sc->vtpci_vqx[queue]; - vq = vqx->vq; - - KASSERT(vq != NULL, ("vq %d not allocated", queue)); - vtpci_write_config_2(sc, VIRTIO_PCI_QUEUE_SEL, queue); - - vq_size = vtpci_read_config_2(sc, VIRTIO_PCI_QUEUE_NUM); - error = virtqueue_reinit(vq, vq_size); + if (sc->vtpci_flags & VTPCI_FLAG_MSIX) { + error = vtpci_set_host_msix_vectors(sc); if (error) return (error); - - if (sc->vtpci_flags & VIRTIO_PCI_FLAG_MSIX) { - error = vtpci_register_msix_vector(sc, - VIRTIO_MSI_QUEUE_VECTOR, vqx->ires_idx); - if (error) - return (error); - } - - vtpci_write_config_4(sc, VIRTIO_PCI_QUEUE_PFN, - virtqueue_paddr(vqx->vq) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT); } return (0); @@ -744,7 +749,6 @@ vtpci_probe_and_attach_child(struct vtpc vtpci_set_status(dev, VIRTIO_CONFIG_STATUS_FAILED); vtpci_reset(sc); vtpci_release_child_resources(sc); - /* Reset status for future attempt. */ vtpci_set_status(dev, VIRTIO_CONFIG_STATUS_ACK); } else @@ -752,42 +756,126 @@ vtpci_probe_and_attach_child(struct vtpc } static int -vtpci_alloc_interrupts(struct vtpci_softc *sc, int flags, int nvqs, - struct vq_alloc_info *vq_info) +vtpci_alloc_msix(struct vtpci_softc *sc, int nvectors) +{ + device_t dev; + int nmsix, cnt, required; + + dev = sc->vtpci_dev; + + /* Allocate an additional vector for the config changes. */ + required = nvectors + 1; + + nmsix = pci_msix_count(dev); + if (nmsix < required) + return (1); + + cnt = required; + if (pci_alloc_msix(dev, &cnt) == 0 && cnt >= required) { + sc->vtpci_nintr_res = required; + return (0); + } + + pci_release_msi(dev); + + return (1); +} + +static int +vtpci_alloc_msi(struct vtpci_softc *sc) +{ + device_t dev; + int nmsi, cnt, required; + + dev = sc->vtpci_dev; + required = 1; + + nmsi = pci_msi_count(dev); + if (nmsi < required) + return (1); + + cnt = required; + if (pci_alloc_msi(dev, &cnt) == 0 && cnt >= required) { + sc->vtpci_nintr_res = required; + return (0); + } + + pci_release_msi(dev); + + return (1); +} + +static int +vtpci_alloc_intr_msix_pervq(struct vtpci_softc *sc) { int i, nvectors, error; - /* - * Only allocate a vector for virtqueues that are actually - * expecting an interrupt. - */ - for (nvectors = 0, i = 0; i < nvqs; i++) - if (vq_info[i].vqai_intr != NULL) + if (vtpci_disable_msix != 0 || + sc->vtpci_flags & VTPCI_FLAG_NO_MSIX) + return (ENOTSUP); + + for (nvectors = 0, i = 0; i < sc->vtpci_nvqs; i++) { + if (sc->vtpci_vqx[i].no_intr == 0) nvectors++; + } + + error = vtpci_alloc_msix(sc, nvectors); + if (error) + return (error); + + sc->vtpci_flags |= VTPCI_FLAG_MSIX; + + return (0); +} + +static int +vtpci_alloc_intr_msix_shared(struct vtpci_softc *sc) +{ + int error; if (vtpci_disable_msix != 0 || - sc->vtpci_flags & VIRTIO_PCI_FLAG_NO_MSIX || - flags & VIRTIO_ALLOC_VQS_DISABLE_MSIX || - vtpci_alloc_msix(sc, nvectors) != 0) { - /* - * Use MSI interrupts if available. Otherwise, we fallback - * to legacy interrupts. - */ - if ((sc->vtpci_flags & VIRTIO_PCI_FLAG_NO_MSI) == 0 && - vtpci_alloc_msi(sc) == 0) - sc->vtpci_flags |= VIRTIO_PCI_FLAG_MSI; + sc->vtpci_flags & VTPCI_FLAG_NO_MSIX) + return (ENOTSUP); - sc->vtpci_nintr_res = 1; - } + error = vtpci_alloc_msix(sc, 1); + if (error) + return (error); - error = vtpci_alloc_intr_resources(sc, nvqs, vq_info); + sc->vtpci_flags |= VTPCI_FLAG_MSIX | VTPCI_FLAG_SHARED_MSIX; - return (error); + return (0); } static int -vtpci_alloc_intr_resources(struct vtpci_softc *sc, int nvqs, - struct vq_alloc_info *vq_info) +vtpci_alloc_intr_msi(struct vtpci_softc *sc) +{ + int error; + + /* Only BHyVe supports MSI. */ + if (sc->vtpci_flags & VTPCI_FLAG_NO_MSI) + return (ENOTSUP); + + error = vtpci_alloc_msi(sc); + if (error) + return (error); + + sc->vtpci_flags |= VTPCI_FLAG_MSI; + + return (0); +} + +static int +vtpci_alloc_intr_legacy(struct vtpci_softc *sc) +{ + + sc->vtpci_flags |= VTPCI_FLAG_LEGACY; + sc->vtpci_nintr_res = 1; + + return (0); +} + +static int +vtpci_alloc_intr_resources(struct vtpci_softc *sc) { device_t dev; struct resource *irq; @@ -795,14 +883,14 @@ vtpci_alloc_intr_resources(struct vtpci_ int i, rid, flags, res_idx; dev = sc->vtpci_dev; - flags = RF_ACTIVE; - if ((sc->vtpci_flags & - (VIRTIO_PCI_FLAG_MSI | VIRTIO_PCI_FLAG_MSIX)) == 0) { + if (sc->vtpci_flags & VTPCI_FLAG_LEGACY) { rid = 0; - flags |= RF_SHAREABLE; - } else + flags = RF_ACTIVE | RF_SHAREABLE; + } else { rid = 1; + flags = RF_ACTIVE; + } for (i = 0; i < sc->vtpci_nintr_res; i++) { irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, flags); @@ -814,16 +902,16 @@ vtpci_alloc_intr_resources(struct vtpci_ } /* - * Map the virtqueue into the correct index in vq_intr_res[]. Note the - * first index is reserved for configuration changes notifications. + * Map the virtqueue into the correct index in vq_intr_res[]. The + * first index is reserved for configuration changed notifications. */ - for (i = 0, res_idx = 1; i < nvqs; i++) { + for (i = 0, res_idx = 1; i < sc->vtpci_nvqs; i++) { vqx = &sc->vtpci_vqx[i]; - if (sc->vtpci_flags & VIRTIO_PCI_FLAG_MSIX) { - if (vq_info[i].vqai_intr == NULL) + if (sc->vtpci_flags & VTPCI_FLAG_MSIX) { + if (vqx->no_intr != 0) vqx->ires_idx = -1; - else if (sc->vtpci_flags & VIRTIO_PCI_FLAG_SHARED_MSIX) + else if (sc->vtpci_flags & VTPCI_FLAG_SHARED_MSIX) vqx->ires_idx = res_idx; else vqx->ires_idx = res_idx++; @@ -835,110 +923,180 @@ vtpci_alloc_intr_resources(struct vtpci_ } static int -vtpci_alloc_msi(struct vtpci_softc *sc) +vtpci_setup_legacy_interrupt(struct vtpci_softc *sc, enum intr_type type) { device_t dev; - int nmsi, cnt; + struct vtpci_intr_resource *ires; + int error; dev = sc->vtpci_dev; - nmsi = pci_msi_count(dev); - - if (nmsi < 1) - return (1); - cnt = 1; - if (pci_alloc_msi(dev, &cnt) == 0 && cnt == 1) - return (0); + ires = &sc->vtpci_intr_res[0]; + error = bus_setup_intr(dev, ires->irq, type, vtpci_legacy_intr, NULL, + sc, &ires->intrhand); - return (1); + return (error); } static int -vtpci_alloc_msix(struct vtpci_softc *sc, int nvectors) +vtpci_setup_msix_interrupts(struct vtpci_softc *sc, enum intr_type type) { device_t dev; - int nmsix, cnt, required; + struct vtpci_intr_resource *ires; + struct vtpci_virtqueue *vqx; + int i, error; dev = sc->vtpci_dev; - nmsix = pci_msix_count(dev); - if (nmsix < 1) - return (1); + /* + * The first resource is used for configuration changed interrupts. + */ + ires = &sc->vtpci_intr_res[0]; + error = bus_setup_intr(dev, ires->irq, type, vtpci_config_intr, + NULL, sc, &ires->intrhand); + if (error) + return (error); - /* An additional vector is needed for the config changes. */ - required = nvectors + 1; - if (nmsix >= required) { - cnt = required; - if (pci_alloc_msix(dev, &cnt) == 0 && cnt >= required) - goto out; + if (sc->vtpci_flags & VTPCI_FLAG_SHARED_MSIX) { + ires = &sc->vtpci_intr_res[1]; - pci_release_msi(dev); + error = bus_setup_intr(dev, ires->irq, type, + vtpci_vq_shared_intr, NULL, sc, &ires->intrhand); + if (error) + return (error); + } else { + /* + * Each remaining resource is assigned to a specific virtqueue. + */ + for (i = 0; i < sc->vtpci_nvqs; i++) { + vqx = &sc->vtpci_vqx[i]; + if (vqx->ires_idx < 1) + continue; + + ires = &sc->vtpci_intr_res[vqx->ires_idx]; + error = bus_setup_intr(dev, ires->irq, type, + vtpci_vq_intr, NULL, vqx->vq, &ires->intrhand); + if (error) + return (error); + } } - /* Attempt shared MSIX configuration. */ - required = 2; - if (nmsix >= required) { - cnt = required; - if (pci_alloc_msix(dev, &cnt) == 0 && cnt >= required) { - sc->vtpci_flags |= VIRTIO_PCI_FLAG_SHARED_MSIX; - goto out; - } + error = vtpci_set_host_msix_vectors(sc); + if (error) + return (error); - pci_release_msi(dev); - } + return (0); +} - return (1); +static int +vtpci_setup_interrupts(struct vtpci_softc *sc, enum intr_type type) +{ + int error; -out: - sc->vtpci_nintr_res = required; - sc->vtpci_flags |= VIRTIO_PCI_FLAG_MSIX; + type |= INTR_MPSAFE; + KASSERT(sc->vtpci_flags & VTPCI_FLAG_ITYPE_MASK, + ("no interrupt type selected: %#x", sc->vtpci_flags)); - if (bootverbose) { - if (sc->vtpci_flags & VIRTIO_PCI_FLAG_SHARED_MSIX) - device_printf(dev, "using shared virtqueue MSIX\n"); - else - device_printf(dev, "using per virtqueue MSIX\n"); - } + error = vtpci_alloc_intr_resources(sc); + if (error) + return (error); - return (0); + if (sc->vtpci_flags & VTPCI_FLAG_LEGACY) + error = vtpci_setup_legacy_interrupt(sc, type); + else if (sc->vtpci_flags & VTPCI_FLAG_MSI) + error = vtpci_setup_msi_interrupt(sc, type); + else + error = vtpci_setup_msix_interrupts(sc, type); + + return (error); } static int vtpci_register_msix_vector(struct vtpci_softc *sc, int offset, int res_idx) { device_t dev; - uint16_t vector; + uint16_t vector, rdvector; dev = sc->vtpci_dev; - if (offset != VIRTIO_MSI_CONFIG_VECTOR && - offset != VIRTIO_MSI_QUEUE_VECTOR) - return (EINVAL); - if (res_idx != -1) { - /* Map from rid to host vector. */ + /* Map from guest rid to host vector. */ vector = sc->vtpci_intr_res[res_idx].rid - 1; } else vector = VIRTIO_MSI_NO_VECTOR; - /* The first resource is special; make sure it is used correctly. */ + /* + * Assert the first resource is always used for the configuration + * changed interrupts. + */ if (res_idx == 0) { - KASSERT(vector == 0, ("unexpected config vector")); - KASSERT(offset == VIRTIO_MSI_CONFIG_VECTOR, - ("unexpected config offset")); - } + KASSERT(vector == 0 && offset == VIRTIO_MSI_CONFIG_VECTOR, + ("bad first res use vector:%d offset:%d", vector, offset)); + } else + KASSERT(offset == VIRTIO_MSI_QUEUE_VECTOR, ("bad offset")); vtpci_write_config_2(sc, offset, vector); - if (vtpci_read_config_2(sc, offset) != vector) { - device_printf(dev, "insufficient host resources for " - "MSIX interrupts\n"); + /* Read vector to determine if the host had sufficient resources. */ + rdvector = vtpci_read_config_2(sc, offset); + if (rdvector != vector) { + device_printf(dev, + "insufficient host resources for MSIX interrupts\n"); return (ENODEV); } return (0); } +static int +vtpci_set_host_msix_vectors(struct vtpci_softc *sc) +{ + struct vtpci_virtqueue *vqx; + int idx, error; + + error = vtpci_register_msix_vector(sc, VIRTIO_MSI_CONFIG_VECTOR, 0); + if (error) + return (error); + + for (idx = 0; idx < sc->vtpci_nvqs; idx++) { + vqx = &sc->vtpci_vqx[idx]; + + vtpci_select_virtqueue(sc, idx); + error = vtpci_register_msix_vector(sc, VIRTIO_MSI_QUEUE_VECTOR, + vqx->ires_idx); + if (error) + return (error); + } + + return (0); +} + +static int *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 02:57:33 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6A021065691; Wed, 11 Jul 2012 02:57:33 +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 A1E5F8FC14; Wed, 11 Jul 2012 02:57:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6B2vX5q018147; Wed, 11 Jul 2012 02:57:33 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6B2vXeW018145; Wed, 11 Jul 2012 02:57:33 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201207110257.q6B2vXeW018145@svn.freebsd.org> From: Hiroki Sato Date: Wed, 11 Jul 2012 02:57:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238361 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 02:57:34 -0000 Author: hrs Date: Wed Jul 11 02:57:32 2012 New Revision: 238361 URL: http://svn.freebsd.org/changeset/base/238361 Log: Merge from r234532: - Fix an ifname matching issue which prevented "ifconfig wlan0 create" from working. - Return non-zero status when unit < 0. Spotted by: dhw Modified: head/sys/dev/usb/usb_pf.c Modified: head/sys/dev/usb/usb_pf.c ============================================================================== --- head/sys/dev/usb/usb_pf.c Wed Jul 11 02:57:19 2012 (r238360) +++ head/sys/dev/usb/usb_pf.c Wed Jul 11 02:57:32 2012 (r238361) @@ -129,7 +129,7 @@ usbpf_ifname2ubus(const char *ifname) int unit; int error; - if (strncmp(ifname, USBUSNAME, sizeof(USBUSNAME)) <= 0) + if (strncmp(ifname, USBUSNAME, sizeof(USBUSNAME) - 1) != 0) return (NULL); error = ifc_name2unit(ifname, &unit); if (error || unit < 0) @@ -167,8 +167,10 @@ usbpf_clone_create(struct if_clone *ifc, struct usb_bus *ubus; error = ifc_name2unit(name, &unit); - if (error || unit < 0) + if (error) return (error); + if (unit < 0) + return (EINVAL); ubus = usbpf_ifname2ubus(name); if (ubus == NULL) From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 08:24:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D3CD9106564A; Wed, 11 Jul 2012 08:24:30 +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 BF07F8FC0C; Wed, 11 Jul 2012 08:24:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6B8OUfU031836; Wed, 11 Jul 2012 08:24:30 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6B8OUlV031834; Wed, 11 Jul 2012 08:24:30 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201207110824.q6B8OUlV031834@svn.freebsd.org> From: Christian Brueffer Date: Wed, 11 Jul 2012 08:24:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238363 - head/sys/cam/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 08:24:30 -0000 Author: brueffer Date: Wed Jul 11 08:24:30 2012 New Revision: 238363 URL: http://svn.freebsd.org/changeset/base/238363 Log: - fix description of SECURITY_FREEZE_LOCK (1) - add missing underscores to SECURITY_DISABLE_PASSWORD PR: 169763 (1) Submitted by: Steven Hartland Reviewed by: mav MFC after: 1 week Modified: head/sys/cam/ata/ata_all.c Modified: head/sys/cam/ata/ata_all.c ============================================================================== --- head/sys/cam/ata/ata_all.c Wed Jul 11 03:49:05 2012 (r238362) +++ head/sys/cam/ata/ata_all.c Wed Jul 11 08:24:30 2012 (r238363) @@ -171,8 +171,8 @@ ata_op_string(struct ata_cmd *cmd) case 0xf2: return ("SECURITY_UNLOCK"); case 0xf3: return ("SECURITY_ERASE_PREPARE"); case 0xf4: return ("SECURITY_ERASE_UNIT"); - case 0xf5: return ("SECURITY_FREE_LOCK"); - case 0xf6: return ("SECURITY DISABLE PASSWORD"); + case 0xf5: return ("SECURITY_FREEZE_LOCK"); + case 0xf6: return ("SECURITY_DISABLE_PASSWORD"); case 0xf8: return ("READ_NATIVE_MAX_ADDRESS"); case 0xf9: return ("SET_MAX_ADDRESS"); } From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 12:10:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B5C81065674; Wed, 11 Jul 2012 12:10:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4696B8FC1B; Wed, 11 Jul 2012 12:10:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6BCAEJH042564; Wed, 11 Jul 2012 12:10:14 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6BCAEFk042562; Wed, 11 Jul 2012 12:10:14 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201207111210.q6BCAEFk042562@svn.freebsd.org> From: John Baldwin Date: Wed, 11 Jul 2012 12:10:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238364 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 12:10:14 -0000 Author: jhb Date: Wed Jul 11 12:10:13 2012 New Revision: 238364 URL: http://svn.freebsd.org/changeset/base/238364 Log: Map ATH_KTR_* to 0 when ATH_DEBUG is not defined. This effectively NOPs out their use in that case. Modified: head/sys/dev/ath/if_ath_debug.h Modified: head/sys/dev/ath/if_ath_debug.h ============================================================================== --- head/sys/dev/ath/if_ath_debug.h Wed Jul 11 08:24:30 2012 (r238363) +++ head/sys/dev/ath/if_ath_debug.h Wed Jul 11 12:10:13 2012 (r238364) @@ -91,6 +91,9 @@ extern void ath_printrxbuf(struct ath_so extern void ath_printtxbuf(struct ath_softc *, const struct ath_buf *bf, u_int qnum, u_int ix, int done); #else /* ATH_DEBUG */ +#define ATH_KTR_INTR 0 +#define ATH_KTR_ERR 0 + #define IFF_DUMPPKTS(sc, m) \ ((sc->sc_ifp->if_flags & (IFF_DEBUG|IFF_LINK2)) == (IFF_DEBUG|IFF_LINK2)) #define DPRINTF(sc, m, fmt, ...) do { \ From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 15:04:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F26A61065670; Wed, 11 Jul 2012 15:04:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDB268FC08; Wed, 11 Jul 2012 15:04:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6BF4KMm049816; Wed, 11 Jul 2012 15:04:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6BF4KIM049814; Wed, 11 Jul 2012 15:04:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201207111504.q6BF4KIM049814@svn.freebsd.org> From: John Baldwin Date: Wed, 11 Jul 2012 15:04:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238365 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 15:04:21 -0000 Author: jhb Date: Wed Jul 11 15:04:20 2012 New Revision: 238365 URL: http://svn.freebsd.org/changeset/base/238365 Log: Cast a bus address to a uintmax_t for a debug printf to fix the build on arm. Modified: head/sys/dev/ath/if_ath_rx_edma.c Modified: head/sys/dev/ath/if_ath_rx_edma.c ============================================================================== --- head/sys/dev/ath/if_ath_rx_edma.c Wed Jul 11 12:10:13 2012 (r238364) +++ head/sys/dev/ath/if_ath_rx_edma.c Wed Jul 11 15:04:20 2012 (r238365) @@ -191,11 +191,11 @@ ath_edma_reinit_fifo(struct ath_softc *s for (j = 0; j < re->m_fifo_depth; j++) { bf = re->m_fifo[i]; DPRINTF(sc, ATH_DEBUG_EDMA_RX, - "%s: Q%d: pos=%i, addr=0x%x\n", + "%s: Q%d: pos=%i, addr=0x%jx\n", __func__, qtype, i, - bf->bf_daddr); + (uintmax_t)bf->bf_daddr); ath_hal_putrxbuf(sc->sc_ah, bf->bf_daddr, qtype); INCR(i, re->m_fifolen); } From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 16:27:03 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45920106566B; Wed, 11 Jul 2012 16:27:03 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CB608FC18; Wed, 11 Jul 2012 16:27:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6BGR3SU053296; Wed, 11 Jul 2012 16:27:03 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6BGR2Gn053287; Wed, 11 Jul 2012 16:27:02 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201207111627.q6BGR2Gn053287@svn.freebsd.org> From: "George V. Neville-Neil" Date: Wed, 11 Jul 2012 16:27:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238366 - in head: cddl/lib/libdtrace sys/kern sys/modules/dtrace sys/modules/dtrace/dtio sys/modules/dtrace/dtraceall sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 16:27:03 -0000 Author: gnn Date: Wed Jul 11 16:27:02 2012 New Revision: 238366 URL: http://svn.freebsd.org/changeset/base/238366 Log: Initial commit of an I/O provider for DTrace on FreeBSD. These probes are most useful when looking into the structures they provide, which are listed in io.d. For example: dtrace -n 'io:genunix::start { printf("%d\n", args[0]->bio_bcount); }' Note that the I/O systems in FreeBSD and Solaris/Illumos are sufficiently different that there is not a 1:1 mapping from scripts that work with one to the other. MFC after: 1 month Added: head/sys/kern/dtio_kdtrace.c (contents, props changed) head/sys/modules/dtrace/dtio/ head/sys/modules/dtrace/dtio/Makefile (contents, props changed) Modified: head/cddl/lib/libdtrace/Makefile head/cddl/lib/libdtrace/io.d head/sys/kern/subr_devstat.c head/sys/modules/dtrace/Makefile head/sys/modules/dtrace/dtraceall/dtraceall.c head/sys/sys/dtrace_bsd.h Modified: head/cddl/lib/libdtrace/Makefile ============================================================================== --- head/cddl/lib/libdtrace/Makefile Wed Jul 11 15:04:20 2012 (r238365) +++ head/cddl/lib/libdtrace/Makefile Wed Jul 11 16:27:02 2012 (r238366) @@ -45,6 +45,7 @@ SRCS= dt_aggregate.c \ gmatch.c DSRCS= errno.d \ + io.d \ psinfo.d \ signal.d \ unistd.d Modified: head/cddl/lib/libdtrace/io.d ============================================================================== --- head/cddl/lib/libdtrace/io.d Wed Jul 11 15:04:20 2012 (r238365) +++ head/cddl/lib/libdtrace/io.d Wed Jul 11 16:27:02 2012 (r238366) @@ -27,114 +27,50 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma D depends_on module unix #pragma D depends_on provider io -inline int B_BUSY = B_BUSY; -#pragma D binding "1.0" B_BUSY -inline int B_DONE = 0x00000200; -#pragma D binding "1.0" B_DONE -inline int B_ERROR = B_ERROR; -#pragma D binding "1.0" B_ERROR -inline int B_PAGEIO = B_PAGEIO; -#pragma D binding "1.0" B_PAGEIO -inline int B_PHYS = B_PHYS; -#pragma D binding "1.0" B_PHYS -inline int B_READ = B_READ; -#pragma D binding "1.0" B_READ -inline int B_WRITE = B_WRITE; -#pragma D binding "1.0" B_WRITE -inline int B_ASYNC = 0x00000004; -#pragma D binding "1.0" B_ASYNC - -typedef struct bufinfo { - int b_flags; /* buffer status */ - size_t b_bcount; /* number of bytes */ - caddr_t b_addr; /* buffer address */ - uint64_t b_lblkno; /* block # on device */ - uint64_t b_blkno; /* expanded block # on device */ - size_t b_resid; /* # of bytes not transferred */ - size_t b_bufsize; /* size of allocated buffer */ - caddr_t b_iodone; /* I/O completion routine */ - int b_error; /* expanded error field */ - dev_t b_edev; /* extended device */ -} bufinfo_t; - -#pragma D binding "1.0" translator -translator bufinfo_t < struct buf *B > { - b_flags = B->b_flags; - b_addr = B->b_un.b_addr; - b_bcount = B->b_bcount; - b_lblkno = B->_b_blkno._f; - b_blkno = sizeof (long) == 8 ? B->_b_blkno._f : B->_b_blkno._p._l; - b_resid = B->b_resid; - b_bufsize = B->b_bufsize; - b_iodone = (caddr_t)B->b_iodone; - b_error = B->b_error; - b_edev = B->b_edev; -}; - typedef struct devinfo { - int dev_major; /* major number */ - int dev_minor; /* minor number */ - int dev_instance; /* instance number */ - string dev_name; /* name of device */ - string dev_statname; /* name of device + instance/minor */ - string dev_pathname; /* pathname of device */ + int dev_major; /* major number */ + int dev_minor; /* minor number */ + int dev_instance; /* instance number */ + string dev_name; /* name of device */ + string dev_statname; /* name of device + instance/minor */ + string dev_pathname; /* pathname of device */ } devinfo_t; #pragma D binding "1.0" translator -translator devinfo_t < struct buf *B > { - dev_major = B->b_dip != NULL ? getmajor(B->b_edev) : - getmajor(B->b_file->v_vfsp->vfs_dev); - dev_minor = B->b_dip != NULL ? getminor(B->b_edev) : - getminor(B->b_file->v_vfsp->vfs_dev); - dev_instance = B->b_dip == NULL ? - getminor(B->b_file->v_vfsp->vfs_dev) : - ((struct dev_info *)B->b_dip)->devi_instance; - dev_name = B->b_dip == NULL ? "nfs" : - stringof(`devnamesp[getmajor(B->b_edev)].dn_name); - dev_statname = strjoin(B->b_dip == NULL ? "nfs" : - stringof(`devnamesp[getmajor(B->b_edev)].dn_name), - lltostr(B->b_dip == NULL ? getminor(B->b_file->v_vfsp->vfs_dev) : - ((struct dev_info *)B->b_dip)->devi_instance == 0 && - ((struct dev_info *)B->b_dip)->devi_parent != NULL && - ((struct dev_info *)B->b_dip)->devi_parent->devi_node_name == - "pseudo" ? getminor(B->b_edev) : - ((struct dev_info *)B->b_dip)->devi_instance)); - dev_pathname = B->b_dip == NULL ? "" : - ddi_pathname(B->b_dip, getminor(B->b_edev)); +translator devinfo_t < struct devstat *D > { + dev_major = D->device_number; + dev_minor = D->unit_number; + dev_instance = 0; + dev_name = stringof(D->device_name); + dev_statname = stringof(D->device_name); + dev_pathname = stringof(D->device_name); }; -typedef struct fileinfo { - string fi_name; /* name (basename of fi_pathname) */ - string fi_dirname; /* directory (dirname of fi_pathname) */ - string fi_pathname; /* full pathname */ - offset_t fi_offset; /* offset within file */ - string fi_fs; /* filesystem */ - string fi_mount; /* mount point of file system */ - int fi_oflags; /* open(2) flags for file descriptor */ -} fileinfo_t; +typedef struct bufinfo { + int b_flags; /* flags */ + long b_bcount; /* number of bytes */ + caddr_t b_addr; /* buffer address */ + uint64_t b_blkno; /* expanded block # on device */ + uint64_t b_lblkno; /* block # on device */ + size_t b_resid; /* # of bytes not transferred */ + size_t b_bufsize; /* size of allocated buffer */ +/* caddr_t b_iodone; I/O completion routine */ + int b_error; /* expanded error field */ +/* dev_t b_edev; extended device */ +} bufinfo_t; #pragma D binding "1.0" translator -translator fileinfo_t < struct buf *B > { - fi_name = B->b_file == NULL ? "" : - B->b_file->v_path == NULL ? "" : - basename(cleanpath(B->b_file->v_path)); - fi_dirname = B->b_file == NULL ? "" : - B->b_file->v_path == NULL ? "" : - dirname(cleanpath(B->b_file->v_path)); - fi_pathname = B->b_file == NULL ? "" : - B->b_file->v_path == NULL ? "" : - cleanpath(B->b_file->v_path); - fi_offset = B->b_offset; - fi_fs = B->b_file == NULL ? "" : - stringof(B->b_file->v_op->vnop_name); - fi_mount = B->b_file == NULL ? "" : - B->b_file->v_vfsp->vfs_vnodecovered == NULL ? "/" : - B->b_file->v_vfsp->vfs_vnodecovered->v_path == NULL ? "" : - cleanpath(B->b_file->v_vfsp->vfs_vnodecovered->v_path); - fi_oflags = 0; +translator bufinfo_t < struct bio *B > { + b_flags = B->bio_flags; + b_bcount = B->bio_bcount; + b_addr = B->bio_data; + b_blkno = 0; + b_lblkno = 0; + b_resid = B->bio_resid; + b_bufsize = 0; /* XXX gnn */ + b_error = B->bio_error; }; /* @@ -158,63 +94,17 @@ inline int O_APPEND = 0x0008; #pragma D binding "1.1" O_APPEND inline int O_CREAT = 0x0200; #pragma D binding "1.1" O_CREAT -inline int O_DSYNC = O_DSYNC; -#pragma D binding "1.1" O_DSYNC inline int O_EXCL = 0x0800; #pragma D binding "1.1" O_EXCL -inline int O_LARGEFILE = O_LARGEFILE; -#pragma D binding "1.1" O_LARGEFILE inline int O_NOCTTY = 0x8000; #pragma D binding "1.1" O_NOCTTY inline int O_NONBLOCK = 0x0004; #pragma D binding "1.1" O_NONBLOCK inline int O_NDELAY = 0x0004; #pragma D binding "1.1" O_NDELAY -inline int O_RSYNC = O_RSYNC; -#pragma D binding "1.1" O_RSYNC inline int O_SYNC = 0x0080; #pragma D binding "1.1" O_SYNC inline int O_TRUNC = 0x0400; #pragma D binding "1.1" O_TRUNC -inline int O_XATTR = O_XATTR; -#pragma D binding "1.1" O_XATTR -#pragma D binding "1.1" translator -translator fileinfo_t < struct file *F > { - fi_name = F == NULL ? "" : - F->f_vnode->v_path == NULL ? "" : - basename(cleanpath(F->f_vnode->v_path)); - fi_dirname = F == NULL ? "" : - F->f_vnode->v_path == NULL ? "" : - dirname(cleanpath(F->f_vnode->v_path)); - fi_pathname = F == NULL ? "" : - F->f_vnode->v_path == NULL ? "" : - cleanpath(F->f_vnode->v_path); - fi_offset = F == NULL ? 0 : F->f_offset; - fi_fs = F == NULL ? "" : stringof(F->f_vnode->v_op->vnop_name); - fi_mount = F == NULL ? "" : - F->f_vnode->v_vfsp->vfs_vnodecovered == NULL ? "/" : - F->f_vnode->v_vfsp->vfs_vnodecovered->v_path == NULL ? "" : - cleanpath(F->f_vnode->v_vfsp->vfs_vnodecovered->v_path); - fi_oflags = F == NULL ? 0 : F->f_flag + (int)FOPEN; -}; -inline fileinfo_t fds[int fd] = xlate ( - fd >= 0 && fd < curthread->t_procp->p_user.u_finfo.fi_nfiles ? - curthread->t_procp->p_user.u_finfo.fi_list[fd].uf_file : NULL); - -#pragma D attributes Stable/Stable/Common fds -#pragma D binding "1.1" fds - -#pragma D binding "1.2" translator -translator fileinfo_t < struct vnode *V > { - fi_name = V->v_path == NULL ? "" : - basename(cleanpath(V->v_path)); - fi_dirname = V->v_path == NULL ? "" : - dirname(cleanpath(V->v_path)); - fi_pathname = V->v_path == NULL ? "" : cleanpath(V->v_path); - fi_fs = stringof(V->v_op->vnop_name); - fi_mount = V->v_vfsp->vfs_vnodecovered == NULL ? "/" : - V->v_vfsp->vfs_vnodecovered->v_path == NULL ? "" : - cleanpath(V->v_vfsp->vfs_vnodecovered->v_path); -}; Added: head/sys/kern/dtio_kdtrace.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/kern/dtio_kdtrace.c Wed Jul 11 16:27:02 2012 (r238366) @@ -0,0 +1,232 @@ +/*- + * Copyright (c) 2012 Advanced Computing Technologies LLC + * Written by George Neville-Neil gnn@freebsd.org + * 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 "../sys/dtrace_bsd.h" + + +static int dtio_unload(void); +static void dtio_getargdesc(void *, dtrace_id_t, void *, + dtrace_argdesc_t *); +static void dtio_provide(void *, dtrace_probedesc_t *); +static void dtio_destroy(void *, dtrace_id_t, void *); +static void dtio_enable(void *, dtrace_id_t, void *); +static void dtio_disable(void *, dtrace_id_t, void *); +static void dtio_load(void *); + +static dtrace_pattr_t dtio_attr = { +{ DTRACE_STABILITY_STABLE, DTRACE_STABILITY_STABLE, DTRACE_CLASS_COMMON }, +{ DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_UNKNOWN }, +{ DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_UNKNOWN }, +{ DTRACE_STABILITY_STABLE, DTRACE_STABILITY_STABLE, DTRACE_CLASS_COMMON }, +{ DTRACE_STABILITY_STABLE, DTRACE_STABILITY_STABLE, DTRACE_CLASS_COMMON }, +}; + +static char *genunix = "genunix"; + +/* + * Name strings. + */ +static char *dtio_start_str = "start"; +static char *dtio_done_str = "done"; +static char *dtio_wait_start_str = "wait-start"; +static char *dtio_wait_done_str = "wait-done"; + +static dtrace_pops_t dtio_pops = { + dtio_provide, + NULL, + dtio_enable, + dtio_disable, + NULL, + NULL, + dtio_getargdesc, + NULL, + NULL, + dtio_destroy +}; + +static dtrace_provider_id_t dtio_id; + +extern uint32_t dtio_start_id; +extern uint32_t dtio_done_id; +extern uint32_t dtio_wait_start_id; +extern uint32_t dtio_wait_done_id; + +static void +dtio_getargdesc(void *arg, dtrace_id_t id, void *parg, + dtrace_argdesc_t *desc) +{ + const char *p = NULL; + + switch (desc->dtargd_ndx) { + case 0: + p = "struct bio *"; + break; + case 1: + p = "struct devstat *"; + break; + default: + desc->dtargd_ndx = DTRACE_ARGNONE; + } + + if (p != NULL) + strlcpy(desc->dtargd_native, p, sizeof(desc->dtargd_native)); +} + +static void +dtio_provide(void *arg, dtrace_probedesc_t *desc) +{ + if (desc != NULL) + return; + + if (dtrace_probe_lookup(dtio_id, genunix, NULL, + dtio_start_str) == 0) { + dtio_start_id = dtrace_probe_create(dtio_id, genunix, NULL, + dtio_start_str, 0, NULL); + } + if (dtrace_probe_lookup(dtio_id, genunix, NULL, dtio_done_str) == 0) { + dtio_done_id = dtrace_probe_create(dtio_id, genunix, NULL, + dtio_done_str, 0, NULL); + } + if (dtrace_probe_lookup(dtio_id, genunix, NULL, + dtio_wait_start_str) == 0) { + dtio_wait_start_id = dtrace_probe_create(dtio_id, genunix, + NULL, + dtio_wait_start_str, + 0, NULL); + } + if (dtrace_probe_lookup(dtio_id, genunix, NULL, + dtio_wait_done_str) == 0) { + dtio_wait_done_id = dtrace_probe_create(dtio_id, genunix, NULL, + dtio_wait_done_str, 0, NULL); + } + +} + +static void +dtio_destroy(void *arg, dtrace_id_t id, void *parg) +{ +} + +static void +dtio_enable(void *arg, dtrace_id_t id, void *parg) +{ + if (id == dtio_start_id) + dtrace_io_start_probe = + (dtrace_io_start_probe_func_t)dtrace_probe; + else if (id == dtio_done_id) + dtrace_io_done_probe = + (dtrace_io_done_probe_func_t)dtrace_probe; + else if (id == dtio_wait_start_id) + dtrace_io_wait_start_probe = + (dtrace_io_wait_start_probe_func_t)dtrace_probe; + else if (id == dtio_wait_done_id) + dtrace_io_wait_done_probe = + (dtrace_io_wait_done_probe_func_t)dtrace_probe; + else + printf("dtrace io provider: unknown ID\n"); + +} + +static void +dtio_disable(void *arg, dtrace_id_t id, void *parg) +{ + if (id == dtio_start_id) + dtrace_io_start_probe = NULL; + else if (id == dtio_done_id) + dtrace_io_done_probe = NULL; + else if (id == dtio_wait_start_id) + dtrace_io_wait_start_probe = NULL; + else if (id == dtio_wait_done_id) + dtrace_io_wait_done_probe = NULL; + else + printf("dtrace io provider: unknown ID\n"); + +} + +static void +dtio_load(void *dummy) +{ + if (dtrace_register("io", &dtio_attr, DTRACE_PRIV_USER, NULL, + &dtio_pops, NULL, &dtio_id) != 0) + return; +} + + +static int +dtio_unload() +{ + dtrace_io_start_probe = NULL; + dtrace_io_done_probe = NULL; + dtrace_io_wait_start_probe = NULL; + dtrace_io_wait_done_probe = NULL; + + return (dtrace_unregister(dtio_id)); +} + +static int +dtio_modevent(module_t mod __unused, int type, void *data __unused) +{ + int error = 0; + + switch (type) { + case MOD_LOAD: + break; + + case MOD_UNLOAD: + break; + + case MOD_SHUTDOWN: + break; + + default: + error = EOPNOTSUPP; + break; + } + + return (error); +} + +SYSINIT(dtio_load, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, + dtio_load, NULL); +SYSUNINIT(dtio_unload, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, + dtio_unload, NULL); + +DEV_MODULE(dtio, dtio_modevent, NULL); +MODULE_VERSION(dtio, 1); +MODULE_DEPEND(dtio, dtrace, 1, 1, 1); +MODULE_DEPEND(dtio, opensolaris, 1, 1, 1); Modified: head/sys/kern/subr_devstat.c ============================================================================== --- head/sys/kern/subr_devstat.c Wed Jul 11 15:04:20 2012 (r238365) +++ head/sys/kern/subr_devstat.c Wed Jul 11 16:27:02 2012 (r238366) @@ -29,6 +29,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_kdtrace.h" + #include #include #include @@ -44,6 +46,54 @@ __FBSDID("$FreeBSD$"); #include +#ifdef KDTRACE_HOOKS +#include + +dtrace_io_start_probe_func_t dtrace_io_start_probe; +dtrace_io_done_probe_func_t dtrace_io_done_probe; +dtrace_io_wait_start_probe_func_t dtrace_io_wait_start_probe; +dtrace_io_wait_done_probe_func_t dtrace_io_wait_done_probe; + +uint32_t dtio_start_id; +uint32_t dtio_done_id; +uint32_t dtio_wait_start_id; +uint32_t dtio_wait_done_id; + +#define DTRACE_DEVSTAT_START() \ + if (dtrace_io_start_probe != NULL) \ + (*dtrace_io_start_probe)(dtio_start_id, NULL, ds); + +#define DTRACE_DEVSTAT_BIO_START() \ + if (dtrace_io_start_probe != NULL) \ + (*dtrace_io_start_probe)(dtio_start_id, bp, ds); + +#define DTRACE_DEVSTAT_DONE() \ + if (dtrace_io_done_probe != NULL) \ + (*dtrace_io_done_probe)(dtio_done_id, NULL, ds); + +#define DTRACE_DEVSTAT_BIO_DONE() \ + if (dtrace_io_done_probe != NULL) \ + (*dtrace_io_done_probe)(dtio_done_id, bp, ds); + +#define DTRACE_DEVSTAT_WAIT_START() \ + if (dtrace_io_wait_start_probe != NULL) \ + (*dtrace_io_wait_start_probe)(dtio_wait_start_id, NULL, ds); + +#define DTRACE_DEVSTAT_WAIT_DONE() \ + if (dtrace_io_wait_done_probe != NULL) \ + (*dtrace_io_wait_done_probe)(dtio_wait_done_id, NULL, ds); + +#else /* ! KDTRACE_HOOKS */ + +#define DTRACE_DEVSTAT_START() + +#define DTRACE_DEVSTAT_DONE() + +#define DTRACE_DEVSTAT_WAIT_START() + +#define DTRACE_DEVSTAT_WAIT_DONE() +#endif /* KDTRACE_HOOKS */ + static int devstat_num_devs; static long devstat_generation = 1; static int devstat_version = DEVSTAT_VERSION; @@ -227,6 +277,7 @@ devstat_start_transaction(struct devstat } ds->start_count++; atomic_add_rel_int(&ds->sequence0, 1); + DTRACE_DEVSTAT_START(); } void @@ -241,6 +292,7 @@ devstat_start_transaction_bio(struct dev binuptime(&bp->bio_t0); devstat_start_transaction(ds, &bp->bio_t0); + DTRACE_DEVSTAT_BIO_START(); } /* @@ -312,6 +364,7 @@ devstat_end_transaction(struct devstat * ds->end_count++; atomic_add_rel_int(&ds->sequence0, 1); + DTRACE_DEVSTAT_DONE(); } void @@ -334,6 +387,7 @@ devstat_end_transaction_bio(struct devst devstat_end_transaction(ds, bp->bio_bcount - bp->bio_resid, DEVSTAT_TAG_SIMPLE, flg, NULL, &bp->bio_t0); + DTRACE_DEVSTAT_BIO_DONE(); } /* Modified: head/sys/modules/dtrace/Makefile ============================================================================== --- head/sys/modules/dtrace/Makefile Wed Jul 11 15:04:20 2012 (r238365) +++ head/sys/modules/dtrace/Makefile Wed Jul 11 16:27:02 2012 (r238366) @@ -9,6 +9,7 @@ SUBDIR= dtmalloc \ dtrace \ dtraceall \ dtrace_test \ + dtio \ prototype \ sdt \ systrace Added: head/sys/modules/dtrace/dtio/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/dtrace/dtio/Makefile Wed Jul 11 16:27:02 2012 (r238366) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../kern + +KMOD= dtio +SRCS= dtio_kdtrace.c \ + vnode_if.h + +CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ + -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ + -I${.CURDIR}/../../.. + +.include Modified: head/sys/modules/dtrace/dtraceall/dtraceall.c ============================================================================== --- head/sys/modules/dtrace/dtraceall/dtraceall.c Wed Jul 11 15:04:20 2012 (r238365) +++ head/sys/modules/dtrace/dtraceall/dtraceall.c Wed Jul 11 16:27:02 2012 (r238366) @@ -65,6 +65,7 @@ MODULE_VERSION(dtraceall, 1); MODULE_DEPEND(dtraceall, cyclic, 1, 1, 1); MODULE_DEPEND(dtraceall, opensolaris, 1, 1, 1); MODULE_DEPEND(dtraceall, dtrace, 1, 1, 1); +MODULE_DEPEND(dtraceall, dtio, 1, 1, 1); MODULE_DEPEND(dtraceall, dtmalloc, 1, 1, 1); MODULE_DEPEND(dtraceall, dtnfscl, 1, 1, 1); MODULE_DEPEND(dtraceall, dtnfsclient, 1, 1, 1); Modified: head/sys/sys/dtrace_bsd.h ============================================================================== --- head/sys/sys/dtrace_bsd.h Wed Jul 11 15:04:20 2012 (r238365) +++ head/sys/sys/dtrace_bsd.h Wed Jul 11 16:27:02 2012 (r238366) @@ -38,6 +38,8 @@ struct thread; struct vattr; struct vnode; struct reg; +struct devstat; +struct bio; /* * Cyclic clock function type definition used to hook the cyclic @@ -168,6 +170,23 @@ extern dtrace_nfsclient_nfs23_done_probe extern dtrace_nfsclient_nfs23_done_probe_func_t dtrace_nfscl_nfs234_done_probe; +/* IO Provider hooks, really hook into devstat */ +typedef void (*dtrace_io_start_probe_func_t)(uint32_t, struct bio *, + struct devstat *); +extern dtrace_io_start_probe_func_t dtrace_io_start_probe; + +typedef void (*dtrace_io_done_probe_func_t)(uint32_t, struct bio *, + struct devstat *); +extern dtrace_io_done_probe_func_t dtrace_io_done_probe; + +typedef void (*dtrace_io_wait_start_probe_func_t)(uint32_t, uintptr_t *, + struct devstat *); +extern dtrace_io_wait_start_probe_func_t dtrace_io_wait_start_probe; + +typedef void (*dtrace_io_wait_done_probe_func_t)(uint32_t, uintptr_t *, + struct devstat *); +extern dtrace_io_wait_done_probe_func_t dtrace_io_wait_done_probe; + /* * Functions which allow the dtrace module to check that the kernel * hooks have been compiled with sufficient space for it's private From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 17:11:08 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28DB6106564A; Wed, 11 Jul 2012 17:11:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A9618FC0C; Wed, 11 Jul 2012 17:11:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6BHB7Le055269; Wed, 11 Jul 2012 17:11:07 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6BHB7fs055266; Wed, 11 Jul 2012 17:11:07 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207111711.q6BHB7fs055266@svn.freebsd.org> From: Warner Losh Date: Wed, 11 Jul 2012 17:11:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238369 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 17:11:08 -0000 Author: imp Date: Wed Jul 11 17:11:07 2012 New Revision: 238369 URL: http://svn.freebsd.org/changeset/base/238369 Log: at91$DEV->at91_$DEV to match other Atmel drivers. Also, export at91_rst_cpu_reset. Modified: head/sys/arm/at91/at91_rst.c head/sys/arm/at91/at91_rstreg.h Modified: head/sys/arm/at91/at91_rst.c ============================================================================== --- head/sys/arm/at91/at91_rst.c Wed Jul 11 16:52:25 2012 (r238368) +++ head/sys/arm/at91/at91_rst.c Wed Jul 11 17:11:07 2012 (r238369) @@ -42,26 +42,26 @@ __FBSDID("$FreeBSD$"); #define RST_TIMEOUT (5) /* Seconds to hold NRST for hard reset */ #define RST_TICK (20) /* sample NRST at hz/RST_TICK intervals */ -static int at91rst_intr(void *arg); +static int at91_rst_intr(void *arg); -static struct at91rst_softc { +static struct at91_rst_softc { struct resource *mem_res; /* Memory resource */ struct resource *irq_res; /* IRQ resource */ void *intrhand; /* Interrupt handle */ struct callout tick_ch; /* Tick callout */ device_t sc_dev; u_int shutdown; /* Shutdown in progress */ -} *at91rst_sc; +} *at91_rst_sc; static inline uint32_t -RD4(struct at91rst_softc *sc, bus_size_t off) +RD4(struct at91_rst_softc *sc, bus_size_t off) { return (bus_read_4(sc->mem_res, off)); } static inline void -WR4(struct at91rst_softc *sc, bus_size_t off, uint32_t val) +WR4(struct at91_rst_softc *sc, bus_size_t off, uint32_t val) { bus_write_4(sc->mem_res, off, val); @@ -70,17 +70,17 @@ WR4(struct at91rst_softc *sc, bus_size_t void cpu_reset_sam9g20(void) __attribute__((weak)); void cpu_reset_sam9g20(void) {} -static void -at91rst_cpu_reset(void) +void +at91_rst_cpu_reset(void) { - if (at91rst_sc) { + if (at91_rst_sc) { cpu_reset_sam9g20(); /* May be null */ - WR4(at91rst_sc, RST_MR, + WR4(at91_rst_sc, RST_MR, RST_MR_ERSTL(0xd) | RST_MR_URSTEN | RST_MR_KEY); - WR4(at91rst_sc, RST_CR, + WR4(at91_rst_sc, RST_CR, RST_CR_PROCRST | RST_CR_PERRST | RST_CR_EXTRST | @@ -91,7 +91,7 @@ at91rst_cpu_reset(void) } static int -at91rst_probe(device_t dev) +at91_rst_probe(device_t dev) { device_set_desc(dev, "AT91SAM9 Reset Controller"); @@ -99,13 +99,13 @@ at91rst_probe(device_t dev) } static int -at91rst_attach(device_t dev) +at91_rst_attach(device_t dev) { - struct at91rst_softc *sc; + struct at91_rst_softc *sc; const char *cause; int rid, err; - at91rst_sc = sc = device_get_softc(dev); + at91_rst_sc = sc = device_get_softc(dev); sc->sc_dev = dev; callout_init(&sc->tick_ch, 0); @@ -129,11 +129,11 @@ at91rst_attach(device_t dev) /* Activate the interrupt. */ err = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_MISC | INTR_MPSAFE, - at91rst_intr, NULL, sc, &sc->intrhand); + at91_rst_intr, NULL, sc, &sc->intrhand); if (err) device_printf(dev, "could not establish interrupt handler.\n"); - WR4(at91rst_sc, RST_MR, RST_MR_ERSTL(0xd) | RST_MR_URSIEN | RST_MR_KEY); + WR4(at91_rst_sc, RST_MR, RST_MR_ERSTL(0xd) | RST_MR_URSIEN | RST_MR_KEY); switch (RD4(sc, RST_SR) & RST_SR_RST_MASK) { case RST_SR_RST_POW: @@ -157,15 +157,14 @@ at91rst_attach(device_t dev) } device_printf(dev, "Reset cause: %s.\n", cause); - soc_data.reset = at91rst_cpu_reset; out: return (err); } static void -at91rst_tick(void *argp) +at91_rst_tick(void *argp) { - struct at91rst_softc *sc = argp; + struct at91_rst_softc *sc = argp; if (sc->shutdown++ >= RST_TIMEOUT * RST_TICK) { /* User released the button in morre than RST_TIMEOUT */ @@ -176,36 +175,36 @@ at91rst_tick(void *argp) device_printf(sc->sc_dev, "shutting down...\n"); shutdown_nice(0); } else { - callout_reset(&sc->tick_ch, hz/RST_TICK, at91rst_tick, sc); + callout_reset(&sc->tick_ch, hz/RST_TICK, at91_rst_tick, sc); } } static int -at91rst_intr(void *argp) +at91_rst_intr(void *argp) { - struct at91rst_softc *sc = argp; + struct at91_rst_softc *sc = argp; if (RD4(sc, RST_SR) & RST_SR_URSTS) { if (sc->shutdown == 0) - callout_reset(&sc->tick_ch, hz/RST_TICK, at91rst_tick, sc); + callout_reset(&sc->tick_ch, hz/RST_TICK, at91_rst_tick, sc); return (FILTER_HANDLED); } return (FILTER_STRAY); } -static device_method_t at91rst_methods[] = { - DEVMETHOD(device_probe, at91rst_probe), - DEVMETHOD(device_attach, at91rst_attach), +static device_method_t at91_rst_methods[] = { + DEVMETHOD(device_probe, at91_rst_probe), + DEVMETHOD(device_attach, at91_rst_attach), DEVMETHOD_END }; -static driver_t at91rst_driver = { +static driver_t at91_rst_driver = { "at91_rst", - at91rst_methods, - sizeof(struct at91rst_softc), + at91_rst_methods, + sizeof(struct at91_rst_softc), }; -static devclass_t at91rst_devclass; +static devclass_t at91_rst_devclass; -DRIVER_MODULE(at91_rst, atmelarm, at91rst_driver, at91rst_devclass, NULL, +DRIVER_MODULE(at91_rst, atmelarm, at91_rst_driver, at91_rst_devclass, NULL, NULL); Modified: head/sys/arm/at91/at91_rstreg.h ============================================================================== --- head/sys/arm/at91/at91_rstreg.h Wed Jul 11 16:52:25 2012 (r238368) +++ head/sys/arm/at91/at91_rstreg.h Wed Jul 11 17:11:07 2012 (r238369) @@ -25,8 +25,8 @@ /* $FreeBSD$ */ -#ifndef ARM_AT91_AT91RSTREG_H -#define ARM_AT91_AT91RSTREG_H +#ifndef ARM_AT91_AT91_RSTREG_H +#define ARM_AT91_AT91_RSTREG_H #define RST_CR 0x0 /* Control Register */ #define RST_SR 0x4 /* Status Register */ @@ -56,4 +56,8 @@ #define RST_MR_ERSTL(x) ((x)<<8) /* External reset length */ #define RST_MR_KEY (0xa5<<24) -#endif /* ARM_AT91_AT91RSTREG_H */ +#ifndef __ASSEMBLER__ +void at91_rst_cpu_reset(void); +#endif + +#endif /* ARM_AT91_AT91_RSTREG_H */ From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 17:11:55 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3EACC106566B; Wed, 11 Jul 2012 17:11:55 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A8788FC14; Wed, 11 Jul 2012 17:11:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6BHBsaF055334; Wed, 11 Jul 2012 17:11:54 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6BHBsYN055331; Wed, 11 Jul 2012 17:11:54 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207111711.q6BHBsYN055331@svn.freebsd.org> From: Warner Losh Date: Wed, 11 Jul 2012 17:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238370 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 17:11:55 -0000 Author: imp Date: Wed Jul 11 17:11:54 2012 New Revision: 238370 URL: http://svn.freebsd.org/changeset/base/238370 Log: at91pit->at91_pit for consistnecy with other drivers. Modified: head/sys/arm/at91/at91_pit.c head/sys/arm/at91/at91_pitreg.h Modified: head/sys/arm/at91/at91_pit.c ============================================================================== --- head/sys/arm/at91/at91_pit.c Wed Jul 11 17:11:07 2012 (r238369) +++ head/sys/arm/at91/at91_pit.c Wed Jul 11 17:11:54 2012 (r238370) @@ -59,7 +59,7 @@ static struct pit_softc { } *sc; static uint32_t timecount = 0; -static unsigned at91pit_get_timecount(struct timecounter *tc); +static unsigned at91_pit_get_timecount(struct timecounter *tc); static int pit_intr(void *arg); static inline uint32_t @@ -76,8 +76,8 @@ WR4(struct pit_softc *sc, bus_size_t off bus_write_4(sc->mem_res, off, val); } -static void -at91pit_delay(int us) +void +at91_pit_delay(int us) { int32_t cnt, last, piv; uint64_t pit_freq; @@ -99,8 +99,8 @@ at91pit_delay(int us) } } -static struct timecounter at91pit_timecounter = { - at91pit_get_timecount, /* get_timecount */ +static struct timecounter at91_pit_timecounter = { + at91_pit_get_timecount, /* get_timecount */ NULL, /* no poll_pps */ 0xffffffff, /* counter mask */ 0 / PIT_PRESCALE, /* frequency */ @@ -109,7 +109,7 @@ static struct timecounter at91pit_timeco }; static int -at91pit_probe(device_t dev) +at91_pit_probe(device_t dev) { device_set_desc(dev, "AT91SAM9 PIT"); @@ -117,7 +117,7 @@ at91pit_probe(device_t dev) } static int -at91pit_attach(device_t dev) +at91_pit_attach(device_t dev) { void *ih; int rid, err = 0; @@ -148,32 +148,31 @@ at91pit_attach(device_t dev) err = bus_setup_intr(dev, irq, INTR_TYPE_CLK, pit_intr, NULL, NULL, &ih); - at91pit_timecounter.tc_frequency = at91_master_clock / PIT_PRESCALE; - tc_init(&at91pit_timecounter); + at91_pit_timecounter.tc_frequency = at91_master_clock / PIT_PRESCALE; + tc_init(&at91_pit_timecounter); /* Enable the PIT here. */ WR4(sc, PIT_MR, PIT_PIV(at91_master_clock / PIT_PRESCALE / hz) | PIT_EN | PIT_IEN); - soc_data.delay = at91pit_delay; out: return (err); } -static device_method_t at91pit_methods[] = { - DEVMETHOD(device_probe, at91pit_probe), - DEVMETHOD(device_attach, at91pit_attach), +static device_method_t at91_pit_methods[] = { + DEVMETHOD(device_probe, at91_pit_probe), + DEVMETHOD(device_attach, at91_pit_attach), DEVMETHOD_END }; -static driver_t at91pit_driver = { +static driver_t at91_pit_driver = { "at91_pit", - at91pit_methods, + at91_pit_methods, sizeof(struct pit_softc), }; -static devclass_t at91pit_devclass; +static devclass_t at91_pit_devclass; -DRIVER_MODULE(at91_pit, atmelarm, at91pit_driver, at91pit_devclass, NULL, +DRIVER_MODULE(at91_pit, atmelarm, at91_pit_driver, at91_pit_devclass, NULL, NULL); static int @@ -195,7 +194,7 @@ pit_intr(void *arg) } static unsigned -at91pit_get_timecount(struct timecounter *tc) +at91_pit_get_timecount(struct timecounter *tc) { uint32_t piir, icnt; Modified: head/sys/arm/at91/at91_pitreg.h ============================================================================== --- head/sys/arm/at91/at91_pitreg.h Wed Jul 11 17:11:07 2012 (r238369) +++ head/sys/arm/at91/at91_pitreg.h Wed Jul 11 17:11:54 2012 (r238370) @@ -25,8 +25,8 @@ /* $FreeBSD$ */ -#ifndef ARM_AT91_AT91PITREG_H -#define ARM_AT91_AT91PITREG_H +#ifndef ARM_AT91_AT91_PITREG_H +#define ARM_AT91_AT91_PITREG_H #define PIT_MR 0x0 #define PIT_SR 0x4 @@ -42,4 +42,6 @@ /* PIT_SR */ #define PIT_PITS_DONE 1 /* interrupt done */ -#endif /* ARM_AT91_AT91PITREG_H */ +void at91_pit_delay(int us); + +#endif /* ARM_AT91_AT91_PITREG_H */ From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 18:16:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B11D4106566B; Wed, 11 Jul 2012 18:16:54 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CA0A8FC08; Wed, 11 Jul 2012 18:16:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6BIGscV058072; Wed, 11 Jul 2012 18:16:54 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6BIGscc058070; Wed, 11 Jul 2012 18:16:54 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201207111816.q6BIGscc058070@svn.freebsd.org> From: Sean Bruno Date: Wed, 11 Jul 2012 18:16:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238371 - head/sys/dev/mfi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 18:16:54 -0000 Author: sbruno Date: Wed Jul 11 18:16:54 2012 New Revision: 238371 URL: http://svn.freebsd.org/changeset/base/238371 Log: When an MFI command fails, the driver needs to set bio->bio_resid so that the upper levels notice. Otherwise we see commands silently failing leading to data corruption. This mirrors dadone() Submitted by: Andrew Boyer aboyer@averesystems.com Reviewed by: scottl@freebsd.org MFC after: 2 weeks Modified: head/sys/dev/mfi/mfi_disk.c Modified: head/sys/dev/mfi/mfi_disk.c ============================================================================== --- head/sys/dev/mfi/mfi_disk.c Wed Jul 11 17:11:54 2012 (r238370) +++ head/sys/dev/mfi/mfi_disk.c Wed Jul 11 18:16:54 2012 (r238371) @@ -298,6 +298,7 @@ mfi_disk_complete(struct bio *bio) hdr = bio->bio_driver1; if (bio->bio_flags & BIO_ERROR) { + bio->bio_resid = bio->bio_bcount; if (bio->bio_error == 0) bio->bio_error = EIO; disk_err(bio, "hard error", -1, 1); From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 18:50:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 47AB4106566C; Wed, 11 Jul 2012 18:50:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 33AC68FC1A; Wed, 11 Jul 2012 18:50:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6BIopPp059446; Wed, 11 Jul 2012 18:50:51 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6BIop61059444; Wed, 11 Jul 2012 18:50:51 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207111850.q6BIop61059444@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 11 Jul 2012 18:50:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238372 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 18:50:51 -0000 Author: kib Date: Wed Jul 11 18:50:50 2012 New Revision: 238372 URL: http://svn.freebsd.org/changeset/base/238372 Log: Fix build for kernels with dtrace hooks. MFC after: 1 month Modified: head/sys/kern/subr_devstat.c Modified: head/sys/kern/subr_devstat.c ============================================================================== --- head/sys/kern/subr_devstat.c Wed Jul 11 18:16:54 2012 (r238371) +++ head/sys/kern/subr_devstat.c Wed Jul 11 18:50:50 2012 (r238372) @@ -87,8 +87,12 @@ uint32_t dtio_wait_done_id; #define DTRACE_DEVSTAT_START() +#define DTRACE_DEVSTAT_BIO_START() + #define DTRACE_DEVSTAT_DONE() +#define DTRACE_DEVSTAT_BIO_DONE() + #define DTRACE_DEVSTAT_WAIT_START() #define DTRACE_DEVSTAT_WAIT_DONE() From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 18:54:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16337106564A; Wed, 11 Jul 2012 18:54:22 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 873878FC0A; Wed, 11 Jul 2012 18:54:21 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q6BIsRuG091689; Wed, 11 Jul 2012 21:54:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q6BIsFCk062181; Wed, 11 Jul 2012 21:54:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q6BIsFHB062180; Wed, 11 Jul 2012 21:54:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 11 Jul 2012 21:54:15 +0300 From: Konstantin Belousov To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20120711185415.GI2338@deviant.kiev.zoral.com.ua> References: <201207111850.q6BIop61059444@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="h3Z7hgQQ7qPTU8Su" Content-Disposition: inline In-Reply-To: <201207111850.q6BIop61059444@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Subject: Re: svn commit: r238372 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 18:54:22 -0000 --h3Z7hgQQ7qPTU8Su Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 11, 2012 at 06:50:50PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Wed Jul 11 18:50:50 2012 > New Revision: 238372 > URL: http://svn.freebsd.org/changeset/base/238372 >=20 > Log: > Fix build for kernels with dtrace hooks. Obviously, this should be read as 'without'. --h3Z7hgQQ7qPTU8Su Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/9y9YACgkQC3+MBN1Mb4jRjgCfZGXaBElf62XA/96fv/I5bSWK X98AoIM45ShDyremaGYeIUXqsptD9ezr =GhVh -----END PGP SIGNATURE----- --h3Z7hgQQ7qPTU8Su-- From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 19:08:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4855B106564A; Wed, 11 Jul 2012 19:08:24 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 346888FC0A; Wed, 11 Jul 2012 19:08:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6BJ8ONN060313; Wed, 11 Jul 2012 19:08:24 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6BJ8O04060311; Wed, 11 Jul 2012 19:08:24 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201207111908.q6BJ8O04060311@svn.freebsd.org> From: Sean Bruno Date: Wed, 11 Jul 2012 19:08:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238373 - head/sys/dev/mfi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 19:08:24 -0000 Author: sbruno Date: Wed Jul 11 19:08:23 2012 New Revision: 238373 URL: http://svn.freebsd.org/changeset/base/238373 Log: sys/dev/mfivar.h contains references to MFI_DEBUG, but it never gets turned on unless the file also includes opt_mfi.h. Submitted by: Andrew Boyer aboyer@averesystems.com MFC after: 2 weeks Modified: head/sys/dev/mfi/mfivar.h Modified: head/sys/dev/mfi/mfivar.h ============================================================================== --- head/sys/dev/mfi/mfivar.h Wed Jul 11 18:50:50 2012 (r238372) +++ head/sys/dev/mfi/mfivar.h Wed Jul 11 19:08:23 2012 (r238373) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "opt_mfi.h" /* * SCSI structures and definitions are used from here, but no linking From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 19:12:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 366031065675; Wed, 11 Jul 2012 19:12:11 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 174AF8FC1A; Wed, 11 Jul 2012 19:12:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6BJCASC060516; Wed, 11 Jul 2012 19:12:10 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6BJCAUT060514; Wed, 11 Jul 2012 19:12:10 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207111912.q6BJCAUT060514@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 11 Jul 2012 19:12:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238374 - head/tools/test/upsdl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 19:12:11 -0000 Author: kib Date: Wed Jul 11 19:12:10 2012 New Revision: 238374 URL: http://svn.freebsd.org/changeset/base/238374 Log: Add a test program, written by Stephan Uphoff, which demonstrates the deadlock due to i/o performed over the buffers backed by file mappings. MFC after: 2 weeks Approved by: ups Added: head/tools/test/upsdl/ head/tools/test/upsdl/Makefile (contents, props changed) head/tools/test/upsdl/upsdl.c (contents, props changed) Added: head/tools/test/upsdl/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/upsdl/Makefile Wed Jul 11 19:12:10 2012 (r238374) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +PROG= upsdl +NO_MAN= + +.include Added: head/tools/test/upsdl/upsdl.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/upsdl/upsdl.c Wed Jul 11 19:12:10 2012 (r238374) @@ -0,0 +1,175 @@ +/*- + * Copyright (c) 2006, Stephan Uphoff + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR 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$ + */ + + +#include +#include +#include +#include +#include +#include + + +int prepareFile(char* filename,int* fdp); +int mapBuffer(char** bufferp,int fd1,int fd2); +int startIO(int fd,char *buffer); + +int pagesize; + +#define FILESIZE (32*1024) +char wbuffer[FILESIZE]; + +/* Create a FILESIZE sized file - then remove file data from the cache*/ +int prepareFile(char* filename,int* fdp) +{ + int fd; + int len; + int status; + void *addr; + + fd = open(filename,O_CREAT | O_TRUNC | O_RDWR,S_IRWXU); + if (fd == -1) + { + perror("Creating file"); + return fd; + } + + len = write(fd,wbuffer,FILESIZE); + if (len < 0) + { + perror("Write failed"); + return 1; + } + + status = fsync(fd); + if (status != 0) + { + perror("fsync failed"); + return 1; + } + + addr = mmap(NULL,FILESIZE, PROT_READ | PROT_WRITE , MAP_SHARED, fd, 0); + if (addr == MAP_FAILED) + { + perror("Mmap failed"); + return 1; + } + + status = msync(addr,FILESIZE,MS_INVALIDATE | MS_SYNC); + if (status != 0) + { + perror("Msync failed"); + return 1; + } + + munmap(addr,FILESIZE); + + *fdp = fd; + return 0; +} + + +/* mmap a 2 page buffer - first page is from fd1, second page from fd2 */ +int mapBuffer(char** bufferp,int fd1,int fd2) +{ + void* addr; + char *buffer; + + addr = mmap(NULL,pagesize*2, PROT_READ | PROT_WRITE , MAP_SHARED, fd1, 0); + if (addr == MAP_FAILED) + { + perror("Mmap failed"); + return 1; + } + + buffer = addr; + addr = mmap(buffer + pagesize,pagesize, PROT_READ | PROT_WRITE , MAP_FIXED | +MAP_SHARED, fd2, 0); + + if (addr == MAP_FAILED) + { + perror("Mmap2 failed"); + return 1; + } + *bufferp = buffer; + return 0; +} + + +int startIO(int fd,char *buffer) +{ + ssize_t len; + len = write(fd,buffer,2*pagesize); + if (len == -1) + { + perror("write failed"); + return 1; + } + return 0; +} + + +int main(int argc,char *argv[],char *envp[]) +{ + + int fdA,fdB,fdDelayA,fdDelayB; + int status; + char *bufferA,*bufferB; + pid_t pid; + + pagesize = getpagesize(); + + if ((prepareFile("A",&fdA)) + || (prepareFile("B",&fdB)) + || (prepareFile("DelayA",&fdDelayA)) + || (prepareFile("DelayB",&fdDelayB)) + || (mapBuffer(&bufferA,fdDelayA,fdB)) + || (mapBuffer(&bufferB,fdDelayB,fdA))) + exit(1); + + pid = fork(); + + if (pid == 0) + { + status = startIO(fdA,bufferA); + exit(status); + } + + if (pid == -1) + { + exit(1); + } + status = startIO(fdB,bufferB); + exit(status); + +} + + + + + From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 19:46:40 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B5A3106566C; Wed, 11 Jul 2012 19:46:40 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4698B8FC12; Wed, 11 Jul 2012 19:46:40 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so2774369pbb.13 for ; Wed, 11 Jul 2012 12:46:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=M2LQtJCTXXtMh/hOLu8m1OZo7i7u7+33B+Zhye1zNEs=; b=RsrUmRvcMj70bk5epGU1cCOKl3v7FdfqKRn7EmM4k/j/04tECl2wFI6KIcpYT4VlzE m0UbESbFkWHTiXSKzov7aM6Gi2sxN8+WpCsM/G4k+2JsvaqUjhkwdbGGnXy49NcTVdCk BZLaVnwePN3Gkh/XRSfrRB2eRvu8WFjNOgPE+JlhPjNio2arBciQjMQYahWbFISzXRuK nfW6DbNzRLu01rlswzO5gAsbvQkB7ICVDct5fm3stxQFI3tpQ9USyznL/RS+kFAWl7z9 UKMqbQRgAHezIxToVUpp5yubk2FmgBatcQLlwwSeMKEI99fBn4n3FfQXclJ1GfWXSmdQ GnQg== MIME-Version: 1.0 Received: by 10.68.222.163 with SMTP id qn3mr81056287pbc.135.1342036000122; Wed, 11 Jul 2012 12:46:40 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.68.195.102 with HTTP; Wed, 11 Jul 2012 12:46:40 -0700 (PDT) In-Reply-To: <201207110257.q6B2vXeW018145@svn.freebsd.org> References: <201207110257.q6B2vXeW018145@svn.freebsd.org> Date: Wed, 11 Jul 2012 12:46:40 -0700 X-Google-Sender-Auth: sIBpp74Jfg0kgJUSnC3eJ0oWqSw Message-ID: From: Adrian Chadd To: Hiroki Sato Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, current@freebsd.org Subject: Re: svn commit: r238361 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 19:46:40 -0000 Hi, What was the original commit which broke wlan name matching? I can't see how a commit to usb_pf.c would "fix" this. Adrian From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 19:53:42 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15D691065672; Wed, 11 Jul 2012 19:53:42 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (m209-73.dsl.rawbw.com [198.144.209.73]) by mx1.freebsd.org (Postfix) with ESMTP id D7A0C8FC1E; Wed, 11 Jul 2012 19:53:41 +0000 (UTC) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.5/8.14.5) with ESMTP id q6BJrfGK007318; Wed, 11 Jul 2012 12:53:41 -0700 (PDT) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.5/8.14.5/Submit) id q6BJrflY007317; Wed, 11 Jul 2012 12:53:41 -0700 (PDT) (envelope-from david) Date: Wed, 11 Jul 2012 12:53:41 -0700 From: David Wolfskill To: Adrian Chadd Message-ID: <20120711195341.GK3599@albert.catwhisker.org> Mail-Followup-To: David Wolfskill , Adrian Chadd , Hiroki Sato , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, current@freebsd.org References: <201207110257.q6B2vXeW018145@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YIleam+9adpUeYf+" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Hiroki Sato , src-committers@freebsd.org, current@freebsd.org Subject: Re: svn commit: r238361 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 19:53:42 -0000 --YIleam+9adpUeYf+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 11, 2012 at 12:46:40PM -0700, Adrian Chadd wrote: > Hi, >=20 > What was the original commit which broke wlan name matching? >=20 > I can't see how a commit to usb_pf.c would "fix" this. > ... r238279 Peace, david --=20 David H. Wolfskill david@catwhisker.org Depriving a girl or boy of an opportunity for education is evil. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --YIleam+9adpUeYf+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/92cUACgkQmprOCmdXAD0pBwCfWs27KE/UsCDfbj2h2zdDzpHt 1tUAn1kn+aWmhtM0+ooueqbMG+Aj5GF8 =Y33G -----END PGP SIGNATURE----- --YIleam+9adpUeYf+-- From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 20:17:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EA321065670; Wed, 11 Jul 2012 20:17:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4564C8FC1B; Wed, 11 Jul 2012 20:17:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6BKHF69063189; Wed, 11 Jul 2012 20:17:15 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6BKHFZK063176; Wed, 11 Jul 2012 20:17:15 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207112017.q6BKHFZK063176@svn.freebsd.org> From: Warner Losh Date: Wed, 11 Jul 2012 20:17:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238376 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 20:17:15 -0000 Author: imp Date: Wed Jul 11 20:17:14 2012 New Revision: 238376 URL: http://svn.freebsd.org/changeset/base/238376 Log: Make the SoC stuff a little more modular, and start to move away from having the CPU device that's a child of atmelarm that does stuff. o Create a linker_set for the support fucntions for the SoCs. o Rename soc_data to soc_info. o Move the delay and reset function pointers to new soc_data struct o Create elements for all known SoCs o Add lookup of the SoC we found, and print a warning if it isn't one we know about. Added: head/sys/arm/at91/at91soc.c (contents, props changed) head/sys/arm/at91/at91soc.h (contents, props changed) Modified: head/sys/arm/at91/at91_machdep.c head/sys/arm/at91/at91_mci.c head/sys/arm/at91/at91_st.c head/sys/arm/at91/at91_streg.h head/sys/arm/at91/at91rm9200.c head/sys/arm/at91/at91sam9260.c head/sys/arm/at91/at91sam9g20.c head/sys/arm/at91/at91sam9x25.c head/sys/arm/at91/at91var.h head/sys/arm/at91/files.at91 Modified: head/sys/arm/at91/at91_machdep.c ============================================================================== --- head/sys/arm/at91/at91_machdep.c Wed Jul 11 19:54:21 2012 (r238375) +++ head/sys/arm/at91/at91_machdep.c Wed Jul 11 20:17:14 2012 (r238376) @@ -90,6 +90,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -278,7 +279,7 @@ static const char *soc_subtype_name[] = [AT91_ST_SAM9X35] = "at91sam9x35", }; -struct at91_soc_info soc_data; +struct at91_soc_info soc_info; /* * Read the SoC ID from the CIDR register and try to match it against the @@ -291,92 +292,92 @@ at91_try_id(uint32_t dbgu_base) { uint32_t socid; - soc_data.cidr = *(volatile uint32_t *)(AT91_BASE + dbgu_base + + soc_info.cidr = *(volatile uint32_t *)(AT91_BASE + dbgu_base + DBGU_C1R); - socid = soc_data.cidr & ~AT91_CPU_VERSION_MASK; + socid = soc_info.cidr & ~AT91_CPU_VERSION_MASK; - soc_data.type = AT91_T_NONE; - soc_data.subtype = AT91_ST_NONE; - soc_data.family = (soc_data.cidr & AT91_CPU_FAMILY_MASK) >> 20; - soc_data.exid = *(volatile uint32_t *)(AT91_BASE + dbgu_base + + soc_info.type = AT91_T_NONE; + soc_info.subtype = AT91_ST_NONE; + soc_info.family = (soc_info.cidr & AT91_CPU_FAMILY_MASK) >> 20; + soc_info.exid = *(volatile uint32_t *)(AT91_BASE + dbgu_base + DBGU_C2R); switch (socid) { case AT91_CPU_CAP9: - soc_data.type = AT91_T_CAP9; + soc_info.type = AT91_T_CAP9; break; case AT91_CPU_RM9200: - soc_data.type = AT91_T_RM9200; + soc_info.type = AT91_T_RM9200; break; case AT91_CPU_SAM9XE128: case AT91_CPU_SAM9XE256: case AT91_CPU_SAM9XE512: case AT91_CPU_SAM9260: - soc_data.type = AT91_T_SAM9260; - if (soc_data.family == AT91_FAMILY_SAM9XE) - soc_data.subtype = AT91_ST_SAM9XE; + soc_info.type = AT91_T_SAM9260; + if (soc_info.family == AT91_FAMILY_SAM9XE) + soc_info.subtype = AT91_ST_SAM9XE; break; case AT91_CPU_SAM9261: - soc_data.type = AT91_T_SAM9261; + soc_info.type = AT91_T_SAM9261; break; case AT91_CPU_SAM9263: - soc_data.type = AT91_T_SAM9263; + soc_info.type = AT91_T_SAM9263; break; case AT91_CPU_SAM9G10: - soc_data.type = AT91_T_SAM9G10; + soc_info.type = AT91_T_SAM9G10; break; case AT91_CPU_SAM9G20: - soc_data.type = AT91_T_SAM9G20; + soc_info.type = AT91_T_SAM9G20; break; case AT91_CPU_SAM9G45: - soc_data.type = AT91_T_SAM9G45; + soc_info.type = AT91_T_SAM9G45; break; case AT91_CPU_SAM9N12: - soc_data.type = AT91_T_SAM9N12; + soc_info.type = AT91_T_SAM9N12; break; case AT91_CPU_SAM9RL64: - soc_data.type = AT91_T_SAM9RL; + soc_info.type = AT91_T_SAM9RL; break; case AT91_CPU_SAM9X5: - soc_data.type = AT91_T_SAM9X5; + soc_info.type = AT91_T_SAM9X5; break; default: return (0); } - switch (soc_data.type) { + switch (soc_info.type) { case AT91_T_SAM9G45: - switch (soc_data.exid) { + switch (soc_info.exid) { case AT91_EXID_SAM9G45: - soc_data.subtype = AT91_ST_SAM9G45; + soc_info.subtype = AT91_ST_SAM9G45; break; case AT91_EXID_SAM9G46: - soc_data.subtype = AT91_ST_SAM9G46; + soc_info.subtype = AT91_ST_SAM9G46; break; case AT91_EXID_SAM9M10: - soc_data.subtype = AT91_ST_SAM9M10; + soc_info.subtype = AT91_ST_SAM9M10; break; case AT91_EXID_SAM9M11: - soc_data.subtype = AT91_ST_SAM9M11; + soc_info.subtype = AT91_ST_SAM9M11; break; } break; case AT91_T_SAM9X5: - switch (soc_data.exid) { + switch (soc_info.exid) { case AT91_EXID_SAM9G15: - soc_data.subtype = AT91_ST_SAM9G15; + soc_info.subtype = AT91_ST_SAM9G15; break; case AT91_EXID_SAM9G25: - soc_data.subtype = AT91_ST_SAM9G25; + soc_info.subtype = AT91_ST_SAM9G25; break; case AT91_EXID_SAM9G35: - soc_data.subtype = AT91_ST_SAM9G35; + soc_info.subtype = AT91_ST_SAM9G35; break; case AT91_EXID_SAM9X25: - soc_data.subtype = AT91_ST_SAM9X25; + soc_info.subtype = AT91_ST_SAM9X25; break; case AT91_EXID_SAM9X35: - soc_data.subtype = AT91_ST_SAM9X35; + soc_info.subtype = AT91_ST_SAM9X35; break; } break; @@ -384,18 +385,24 @@ at91_try_id(uint32_t dbgu_base) break; } /* - * Disable interrupts + * Disable interrupts in the DBGU unit... */ *(volatile uint32_t *)(AT91_BASE + dbgu_base + USART_IDR) = 0xffffffff; /* * Save the name for later... */ - snprintf(soc_data.name, sizeof(soc_data.name), "%s%s%s", - soc_type_name[soc_data.type], - soc_data.subtype == AT91_ST_NONE ? "" : " subtype ", - soc_data.subtype == AT91_ST_NONE ? "" : - soc_subtype_name[soc_data.subtype]); + snprintf(soc_info.name, sizeof(soc_info.name), "%s%s%s", + soc_type_name[soc_info.type], + soc_info.subtype == AT91_ST_NONE ? "" : " subtype ", + soc_info.subtype == AT91_ST_NONE ? "" : + soc_subtype_name[soc_info.subtype]); + + /* + * try to get the matching CPU support. + */ + soc_info.soc_data = at91_match_soc(soc_info.type, soc_info.subtype); + return (1); } @@ -548,6 +555,9 @@ initarm(struct arm_boot_params *abp) cninit(); + if (soc_info.soc_data == NULL) + printf("Warning: No soc support for %s found.\n", soc_info.name); + memsize = board_init(); physmem = memsize / PAGE_SIZE; @@ -637,16 +647,16 @@ void DELAY(int n) { - if (soc_data.delay) - soc_data.delay(n); + if (soc_info.soc_data) + soc_info.soc_data->soc_delay(n); } void cpu_reset(void) { - if (soc_data.reset) - soc_data.reset(); + if (soc_info.soc_data) + soc_info.soc_data->soc_reset(); while (1) continue; } Modified: head/sys/arm/at91/at91_mci.c ============================================================================== --- head/sys/arm/at91/at91_mci.c Wed Jul 11 19:54:21 2012 (r238375) +++ head/sys/arm/at91/at91_mci.c Wed Jul 11 20:17:14 2012 (r238376) @@ -313,7 +313,7 @@ static int at91_mci_is_mci1rev2xx(void) { - switch (soc_data.type) { + switch (soc_info.type) { case AT91_T_SAM9260: case AT91_T_SAM9263: case AT91_T_CAP9: Modified: head/sys/arm/at91/at91_st.c ============================================================================== --- head/sys/arm/at91/at91_st.c Wed Jul 11 19:54:21 2012 (r238375) +++ head/sys/arm/at91/at91_st.c Wed Jul 11 20:17:14 2012 (r238376) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include static struct at91_st_softc { struct resource * sc_irq_res; @@ -57,6 +58,12 @@ static inline uint32_t RD4(bus_size_t off) { + if (timer_softc == NULL) { + uint32_t *p = (uint32_t *)(AT91_BASE + AT91RM92_ST_BASE + off); + + return *p; + } + return (bus_read_4(timer_softc->sc_mem_res, off)); } @@ -64,7 +71,13 @@ static inline void WR4(bus_size_t off, uint32_t val) { - bus_write_4(timer_softc->sc_mem_res, off, val); + if (timer_softc == NULL) { + uint32_t *p = (uint32_t *)(AT91_BASE + AT91RM92_ST_BASE + off); + + *p = val; + } + else + bus_write_4(timer_softc->sc_mem_res, off, val); } static void at91_st_watchdog(void *, u_int, int *); @@ -105,7 +118,7 @@ clock_intr(void *arg) return (FILTER_STRAY); } -static void +void at91_st_delay(int n) { uint32_t start, end, cur; @@ -125,7 +138,7 @@ at91_st_delay(int n) } } -static void +void at91_st_cpu_reset(void) { /* @@ -209,9 +222,6 @@ at91_st_attach(device_t dev) if (err) return err; - soc_data.delay = at91_st_delay; - soc_data.reset = at91_st_cpu_reset; // XXX kinda late to be setting this... - timer_softc->sc_wet = EVENTHANDLER_REGISTER(watchdog_list, at91_st_watchdog, dev, 0); Modified: head/sys/arm/at91/at91_streg.h ============================================================================== --- head/sys/arm/at91/at91_streg.h Wed Jul 11 19:54:21 2012 (r238375) +++ head/sys/arm/at91/at91_streg.h Wed Jul 11 20:17:14 2012 (r238376) @@ -55,4 +55,7 @@ /* ST_CRTR */ #define ST_CRTR_MASK 0xfffff /* 20-bit counter */ +void at91_st_delay(int n); +void at91_st_cpu_reset(void); + #endif /* ARM_AT91_AT91STREG_H */ Modified: head/sys/arm/at91/at91rm9200.c ============================================================================== --- head/sys/arm/at91/at91rm9200.c Wed Jul 11 19:54:21 2012 (r238375) +++ head/sys/arm/at91/at91rm9200.c Wed Jul 11 20:17:14 2012 (r238376) @@ -42,7 +42,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include + struct at91rm92_softc { device_t dev; @@ -171,7 +174,7 @@ static int at91_probe(device_t dev) { - device_set_desc(dev, soc_data.name); + device_set_desc(dev, soc_info.name); return (0); } @@ -277,3 +280,10 @@ static driver_t at91rm92_driver = { static devclass_t at91rm92_devclass; DRIVER_MODULE(at91rm920, atmelarm, at91rm92_driver, at91rm92_devclass, 0, 0); + +static struct at91_soc_data soc_data = { + .soc_delay = at91_st_delay, + .soc_reset = at91_st_cpu_reset +}; + +AT91_SOC(AT91_T_RM9200, &soc_data); Modified: head/sys/arm/at91/at91sam9260.c ============================================================================== --- head/sys/arm/at91/at91sam9260.c Wed Jul 11 19:54:21 2012 (r238375) +++ head/sys/arm/at91/at91sam9260.c Wed Jul 11 20:17:14 2012 (r238376) @@ -39,10 +39,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include +#include #include #include +#include struct at91sam9_softc { device_t dev; @@ -162,7 +165,7 @@ static void at91_identify(driver_t *drv, device_t parent) { - if (soc_data.type == AT91_T_SAM9260) { + if (soc_info.type == AT91_T_SAM9260) { at91_add_child(parent, 0, "at91sam9260", 0, 0, 0, -1, 0, 0); at91_cpu_add_builtin_children(parent); } @@ -172,7 +175,7 @@ static int at91_probe(device_t dev) { - device_set_desc(dev, soc_data.name); + device_set_desc(dev, soc_info.name); return (0); } @@ -293,3 +296,10 @@ static devclass_t at91sam9260_devclass; DRIVER_MODULE(at91sam9260, atmelarm, at91sam9260_driver, at91sam9260_devclass, NULL, NULL); + +static struct at91_soc_data soc_data = { + .soc_delay = at91_pit_delay, + .soc_reset = at91_rst_cpu_reset +}; + +AT91_SOC(AT91_T_SAM9260, &soc_data); Modified: head/sys/arm/at91/at91sam9g20.c ============================================================================== --- head/sys/arm/at91/at91sam9g20.c Wed Jul 11 19:54:21 2012 (r238375) +++ head/sys/arm/at91/at91sam9g20.c Wed Jul 11 20:17:14 2012 (r238376) @@ -39,10 +39,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include +#include #include #include +#include struct at91sam9_softc { device_t dev; @@ -179,7 +182,7 @@ static int at91_probe(device_t dev) { - device_set_desc(dev, soc_data.name); + device_set_desc(dev, soc_info.name); return (0); } @@ -295,3 +298,10 @@ static driver_t at91sam9_driver = { static devclass_t at91sam9_devclass; DRIVER_MODULE(at91sam, atmelarm, at91sam9_driver, at91sam9_devclass, 0, 0); + +static struct at91_soc_data soc_data = { + .soc_delay = at91_pit_delay, + .soc_reset = at91_rst_cpu_reset +}; + +AT91_SOC(AT91_T_SAM9G20, &soc_data); Modified: head/sys/arm/at91/at91sam9x25.c ============================================================================== --- head/sys/arm/at91/at91sam9x25.c Wed Jul 11 19:54:21 2012 (r238375) +++ head/sys/arm/at91/at91sam9x25.c Wed Jul 11 20:17:14 2012 (r238376) @@ -39,10 +39,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include +#include #include #include +#include struct at91sam9x25_softc { device_t dev; @@ -171,7 +174,7 @@ static void at91_identify(driver_t *drv, device_t parent) { - if (soc_data.type == AT91_T_SAM9X5 && soc_data.subtype == AT91_ST_SAM9X25) { + if (soc_info.type == AT91_T_SAM9X5 && soc_info.subtype == AT91_ST_SAM9X25) { at91_add_child(parent, 0, "at91sam9x25", 0, 0, 0, -1, 0, 0); at91_cpu_add_builtin_children(parent); } @@ -284,3 +287,10 @@ static driver_t at91sam9x25_driver = { static devclass_t at91sam9x25_devclass; DRIVER_MODULE(at91sam9x25, atmelarm, at91sam9x25_driver, at91sam9x25_devclass, 0, 0); + +static struct at91_soc_data soc_data = { + .soc_delay = at91_pit_delay, + .soc_reset = at91_rst_cpu_reset +}; + +AT91_SOC_SUB(AT91_T_SAM9X5, AT91_ST_SAM9X25, &soc_data); Added: head/sys/arm/at91/at91soc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/at91soc.c Wed Jul 11 20:17:14 2012 (r238376) @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 2012 Warner Losh. 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 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 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 + +SET_DECLARE(at91_socs, const struct at91_soc); + +struct at91_soc_data * +at91_match_soc(enum at91_soc_type type, enum at91_soc_subtype subtype) +{ + const struct at91_soc **socp; + + SET_FOREACH(socp, at91_socs) { + if ((*socp)->soc_type != type) + continue; + if ((*socp)->soc_subtype != AT91_ST_ANY && + (*socp)->soc_subtype != subtype) + continue; + return (*socp)->soc_data; + } + return NULL; +} Added: head/sys/arm/at91/at91soc.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/at91soc.h Wed Jul 11 20:17:14 2012 (r238376) @@ -0,0 +1,58 @@ +/*- + * Copyright (c) 2012 Warner Losh. 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 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 AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* $FreeBSD$ */ + +#ifndef _ARM_AT91_AT91SOC_H_ +#define _ARM_AT91_AT91SOC_H_ + +#include + +struct at91_soc { + enum at91_soc_type soc_type; /* Family of mail type of SoC */ + enum at91_soc_subtype soc_subtype; /* More specific soc, if any */ + struct at91_soc_data *soc_data; +}; + +// Make varadic +#define AT91_SOC(type, data) \ + static struct at91_soc this_soc = { \ + .soc_type = type, \ + .soc_subtype = AT91_ST_ANY, \ + .soc_data = data, \ + }; \ + DATA_SET(at91_socs, this_soc); + +#define AT91_SOC_SUB(type, subtype, data) \ + static struct at91_soc this_soc = { \ + .soc_type = type, \ + .soc_subtype = subtype, \ + .soc_data = data, \ + }; \ + DATA_SET(at91_socs, this_soc); + +struct at91_soc_data *at91_match_soc(enum at91_soc_type, enum at91_soc_subtype); + +#endif /* _ARM_AT91_AT91SOC_H_ */ Modified: head/sys/arm/at91/at91var.h ============================================================================== --- head/sys/arm/at91/at91var.h Wed Jul 11 19:54:21 2012 (r238375) +++ head/sys/arm/at91/at91var.h Wed Jul 11 20:17:14 2012 (r238376) @@ -74,6 +74,7 @@ enum at91_soc_type { }; enum at91_soc_subtype { + AT91_ST_ANY = -1, /* Match any type */ AT91_ST_NONE = 0, /* AT91RM9200 */ AT91_ST_RM9200_BGA, @@ -104,6 +105,11 @@ enum at91_soc_family { typedef void (*DELAY_t)(int); typedef void (*cpu_reset_t)(void); +struct at91_soc_data { + DELAY_t soc_delay; + cpu_reset_t soc_reset; +}; + struct at91_soc_info { enum at91_soc_type type; enum at91_soc_subtype subtype; @@ -111,11 +117,10 @@ struct at91_soc_info { uint32_t cidr; uint32_t exid; char name[AT91_SOC_NAME_MAX]; - DELAY_t delay; - cpu_reset_t reset; + struct at91_soc_data *soc_data; }; -extern struct at91_soc_info soc_data; +extern struct at91_soc_info soc_info; static inline int at91_is_rm92(void); static inline int at91_is_sam9(void); @@ -126,28 +131,28 @@ static inline int at91_is_rm92(void) { - return (soc_data.type == AT91_T_RM9200); + return (soc_info.type == AT91_T_RM9200); } static inline int at91_is_sam9(void) { - return (soc_data.family == AT91_FAMILY_SAM9); + return (soc_info.family == AT91_FAMILY_SAM9); } static inline int at91_is_sam9xe(void) { - return (soc_data.family == AT91_FAMILY_SAM9XE); + return (soc_info.family == AT91_FAMILY_SAM9XE); } static inline int at91_cpu_is(u_int cpu) { - return (soc_data.type == cpu); + return (soc_info.type == cpu); } void at91_add_child(device_t dev, int prio, const char *name, int unit, Modified: head/sys/arm/at91/files.at91 ============================================================================== --- head/sys/arm/at91/files.at91 Wed Jul 11 19:54:21 2012 (r238375) +++ head/sys/arm/at91/files.at91 Wed Jul 11 20:17:14 2012 (r238376) @@ -27,6 +27,7 @@ arm/at91/uart_dev_at91usart.c optional u # # All the "systems on a chip" we support # +arm/at91/at91soc.c standard arm/at91/at91rm9200.c optional at91rm9200 arm/at91/at91sam9260.c optional at91sam9260 arm/at91/at91sam9g20.c optional at91sam9g20 From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 22:16:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4762E10656B9; Wed, 11 Jul 2012 22:16:00 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id EB57B8FC08; Wed, 11 Jul 2012 22:15:59 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so2968446pbb.13 for ; Wed, 11 Jul 2012 15:15:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=2zJnKa7+mrPuwUwRiAzeb2DIvN63YMb+zpsBLeYZAwQ=; b=qAXMxSpmItzINMQVV33cbLXuLdhCvDqaGvd5NHGtoJw3+h9vDX28yjzdIRbO6TYKbh 26M4xq9eenM/OhxPCfxY+FWfL5OrRNLrmBEPfyXvW8peqJwcyprPpXvjjbzOpPONceb+ b02NcjWSkyd73MB7FLKxERMNuKV9YKV9vL/IvpyUFgADa5CJ1NG7tORAqDgy7vumCuk8 X7u4gGvPftaHQEIif3igSBntupOZoSPFeqNJ52jXXU5Vjju2zOXAeF/KyJb74yKz5xoK IwvqJp6Z+onJrDHCWyaMTZlqZLGFxADNhA/R1ilJqqwIW61W0423NtZUIEwSUfSEHXl5 /dew== MIME-Version: 1.0 Received: by 10.68.201.9 with SMTP id jw9mr81292849pbc.28.1342044959711; Wed, 11 Jul 2012 15:15:59 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.68.195.102 with HTTP; Wed, 11 Jul 2012 15:15:59 -0700 (PDT) In-Reply-To: <20120711195341.GK3599@albert.catwhisker.org> References: <201207110257.q6B2vXeW018145@svn.freebsd.org> <20120711195341.GK3599@albert.catwhisker.org> Date: Wed, 11 Jul 2012 15:15:59 -0700 X-Google-Sender-Auth: z6Z4KkGGoUO3dmKwFDeAaI5rCNE Message-ID: From: Adrian Chadd To: David Wolfskill , Adrian Chadd , Hiroki Sato , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: Re: svn commit: r238361 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 22:16:00 -0000 Again, that just touched usb. So, how'd that affect non-USB wifi cloning? Adiran From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 22:17:08 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 34AD91065673; Wed, 11 Jul 2012 22:17:07 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id A2B578FC15; Wed, 11 Jul 2012 22:17:07 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so2969904pbb.13 for ; Wed, 11 Jul 2012 15:17:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=IOa41/5lpawIsYG1S7oJqzMsDY5OPEvbXqECysz31O0=; b=AsHlYaok8m6Vuw6RUWHLzK4H0j/vkofdpPYVChfeYMD5Y9eWXF5Ra1R4/ZalqNGgWi zKTMgFi7h4tMhfM72Ao3sb50T5GugBtrDTS7zH199sjAcvflXR+O1KjQ5UoKw33EIQ+B +mI6B5xS90Ddc3mW2+zp6Kni26UfaHql+9SY6a4Cc4hp9XmnA65KJJmFPyo/a0e3z74T pda0oT+vb1N2lv/7gjY/3PzYZtr3kp3VDlDwltTbuY8Yht7Com25PYitoWsOr60aBFX9 UKMg3MtCDX5jA8gASqBmLVZ7RBZ/kT6hbcgdqmE2iMztnwM224M6VIWM7jxRUZ5bZ5ah HK3g== MIME-Version: 1.0 Received: by 10.68.195.198 with SMTP id ig6mr1400137pbc.92.1342045027419; Wed, 11 Jul 2012 15:17:07 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.68.195.102 with HTTP; Wed, 11 Jul 2012 15:17:07 -0700 (PDT) In-Reply-To: <201207111210.q6BCAEFk042562@svn.freebsd.org> References: <201207111210.q6BCAEFk042562@svn.freebsd.org> Date: Wed, 11 Jul 2012 15:17:07 -0700 X-Google-Sender-Auth: VUr7dHqwhcVTcwpwbf9IIrYkpBA Message-ID: From: Adrian Chadd To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238364 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 22:17:08 -0000 .. hm, interesting. I didn't catch this. Maybe I should whack the ATH_KTR_* things outside of the #ifdef ATH_DEBUG .. ? ADrian On 11 July 2012 05:10, John Baldwin wrote: > Author: jhb > Date: Wed Jul 11 12:10:13 2012 > New Revision: 238364 > URL: http://svn.freebsd.org/changeset/base/238364 > > Log: > Map ATH_KTR_* to 0 when ATH_DEBUG is not defined. This effectively NOPs > out their use in that case. > > Modified: > head/sys/dev/ath/if_ath_debug.h > > Modified: head/sys/dev/ath/if_ath_debug.h > ============================================================================== > --- head/sys/dev/ath/if_ath_debug.h Wed Jul 11 08:24:30 2012 (r238363) > +++ head/sys/dev/ath/if_ath_debug.h Wed Jul 11 12:10:13 2012 (r238364) > @@ -91,6 +91,9 @@ extern void ath_printrxbuf(struct ath_so > extern void ath_printtxbuf(struct ath_softc *, const struct ath_buf *bf, > u_int qnum, u_int ix, int done); > #else /* ATH_DEBUG */ > +#define ATH_KTR_INTR 0 > +#define ATH_KTR_ERR 0 > + > #define IFF_DUMPPKTS(sc, m) \ > ((sc->sc_ifp->if_flags & (IFF_DEBUG|IFF_LINK2)) == (IFF_DEBUG|IFF_LINK2)) > #define DPRINTF(sc, m, fmt, ...) do { \ From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 22:17:59 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61E1D106575E; Wed, 11 Jul 2012 22:17:59 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4CE368FC16; Wed, 11 Jul 2012 22:17:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6BMHxtF068095; Wed, 11 Jul 2012 22:17:59 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6BMHxXn068093; Wed, 11 Jul 2012 22:17:59 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201207112217.q6BMHxXn068093@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 11 Jul 2012 22:17:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238377 - head/bin/sh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 22:17:59 -0000 Author: pfg Date: Wed Jul 11 22:17:58 2012 New Revision: 238377 URL: http://svn.freebsd.org/changeset/base/238377 Log: Merge libedit adjustment from NetBSD. On recent versions of NetBSD's libedit, el_gets now sets el_len to -1 on error so we can distinguish between a NULL string and an error. This fixes sh from exiting with newer versions of libedit now allowing EINTR to return. Obtained from: NetBSD Reviewed by: jilles MFC after: 3 weeks Modified: head/bin/sh/input.c Modified: head/bin/sh/input.c ============================================================================== --- head/bin/sh/input.c Wed Jul 11 20:17:14 2012 (r238376) +++ head/bin/sh/input.c Wed Jul 11 22:17:58 2012 (r238377) @@ -186,7 +186,7 @@ retry: if (rl_cp == NULL) rl_cp = el_gets(el, &el_len); if (rl_cp == NULL) - nr = 0; + nr = el_len == 0 ? 0 : -1; else { nr = el_len; if (nr > BUFSIZ) From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 22:20:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19EB8106568A; Wed, 11 Jul 2012 22:20:20 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 040388FC1C; Wed, 11 Jul 2012 22:20:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6BMKJCF068235; Wed, 11 Jul 2012 22:20:19 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6BMKJtR068228; Wed, 11 Jul 2012 22:20:19 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201207112220.q6BMKJtR068228@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 11 Jul 2012 22:20:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238378 - head/lib/libedit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 22:20:20 -0000 Author: pfg Date: Wed Jul 11 22:20:19 2012 New Revision: 238378 URL: http://svn.freebsd.org/changeset/base/238378 Log: Re-merge a couple of changes from NetBSD's libedit. bin/sh has been taught about el_gets setting the count to -1 on error, so now we can partially revert r238173 to reduce differences with NetBSD's implementation. Unfortunately NetBSD's libedit handling of EINTR (Revision 1.44 in read.c + SIGWINCH fixes) still causes trouble in bin/sh and other utilities and has to be avoided. MFC after: 1 month Modified: head/lib/libedit/editline.3 head/lib/libedit/el.h head/lib/libedit/read.c head/lib/libedit/sig.c head/lib/libedit/sig.h Modified: head/lib/libedit/editline.3 ============================================================================== --- head/lib/libedit/editline.3 Wed Jul 11 22:17:58 2012 (r238377) +++ head/lib/libedit/editline.3 Wed Jul 11 22:20:19 2012 (r238378) @@ -162,6 +162,11 @@ is modified to contain the number of cha Returns the line read if successful, or .Dv NULL if no characters were read or if an error occurred. +If an error occurred, +.Fa count +is set to \-1 and +.Dv errno +contains the error code that caused it. The return value may not remain valid across calls to .Fn el_gets and must be copied if the data is to be retained. Modified: head/lib/libedit/el.h ============================================================================== --- head/lib/libedit/el.h Wed Jul 11 22:17:58 2012 (r238377) +++ head/lib/libedit/el.h Wed Jul 11 22:20:19 2012 (r238378) @@ -115,6 +115,7 @@ struct editline { FILE *el_errfile; /* Stdio stuff */ int el_infd; /* Input file descriptor */ int el_flags; /* Various flags. */ + int el_errno; /* Local copy of errno */ coord_t el_cursor; /* Cursor location */ char **el_display; /* Real screen image = what is there */ char **el_vdisplay; /* Virtual screen image = what we see */ Modified: head/lib/libedit/read.c ============================================================================== --- head/lib/libedit/read.c Wed Jul 11 22:17:58 2012 (r238377) +++ head/lib/libedit/read.c Wed Jul 11 22:20:19 2012 (r238378) @@ -235,9 +235,12 @@ read_getcmd(EditLine *el, el_action_t *c el_action_t cmd; int num; + el->el_errno = 0; do { - if ((num = el_getc(el, ch)) != 1) /* if EOF or error */ + if ((num = el_getc(el, ch)) != 1) { /* if EOF or error */ + el->el_errno = num == 0 ? 0 : errno; return (num); + } #ifdef KANJI if ((*ch & 0200)) { @@ -289,14 +292,21 @@ read_char(EditLine *el, char *cp) ssize_t num_read; int tried = 0; - while ((num_read = read(el->el_infd, cp, 1)) == -1) + again: + el->el_signal->sig_no = 0; + while ((num_read = read(el->el_infd, cp, 1)) == -1) { + if (el->el_signal->sig_no == SIGCONT) { + sig_set(el); + el_set(el, EL_REFRESH); + goto again; + } if (!tried && read__fixio(el->el_infd, errno) == 0) tried = 1; else { *cp = '\0'; return (-1); } - + } return (int)num_read; } @@ -403,10 +413,13 @@ el_gets(EditLine *el, int *nread) int num; /* how many chars we have read at NL */ char ch; int crlf = 0; + int nrb; #ifdef FIONREAD c_macro_t *ma = &el->el_chared.c_macro; #endif /* FIONREAD */ + if (nread == NULL) + nread = &nrb; *nread = 0; if (el->el_flags & NO_TTY) { @@ -427,12 +440,13 @@ el_gets(EditLine *el, int *nread) if (cp[-1] == '\r' || cp[-1] == '\n') break; } + if (num == -1) + el->el_errno = errno; el->el_line.cursor = el->el_line.lastchar = cp; *cp = '\0'; - if (nread) - *nread = (int)(el->el_line.cursor - el->el_line.buffer); - return (*nread ? el->el_line.buffer : NULL); + *nread = (int)(el->el_line.cursor - el->el_line.buffer); + goto done; } @@ -443,8 +457,8 @@ el_gets(EditLine *el, int *nread) (void) ioctl(el->el_infd, FIONREAD, (ioctl_t) & chrs); if (chrs == 0) { if (tty_rawmode(el) < 0) { - if (nread) - *nread = 0; + errno = 0; + *nread = 0; return (NULL); } } @@ -457,6 +471,7 @@ el_gets(EditLine *el, int *nread) if (el->el_flags & EDIT_DISABLED) { char *cp; size_t idx; + if ((el->el_flags & UNBUFFERED) == 0) cp = el->el_line.buffer; else @@ -480,11 +495,13 @@ el_gets(EditLine *el, int *nread) break; } + if (num == -1) { + el->el_errno = errno; + } + el->el_line.cursor = el->el_line.lastchar = cp; *cp = '\0'; - if (nread) - *nread = (int)(el->el_line.cursor - el->el_line.buffer); - return (*nread ? el->el_line.buffer : NULL); + goto done; } for (num = OKCMD; num == OKCMD;) { /* while still editing this @@ -617,12 +634,17 @@ el_gets(EditLine *el, int *nread) /* make sure the tty is set up correctly */ if ((el->el_flags & UNBUFFERED) == 0) { read_finish(el); - if (nread) - *nread = num; + *nread = num != -1 ? num : 0; } else { - if (nread) - *nread = - (int)(el->el_line.lastchar - el->el_line.buffer); + *nread = (int)(el->el_line.lastchar - el->el_line.buffer); } - return (num ? el->el_line.buffer : NULL); +done: + if (*nread == 0) { + if (num == -1) { + *nread = -1; + errno = el->el_errno; + } + return NULL; + } else + return el->el_line.buffer; } Modified: head/lib/libedit/sig.c ============================================================================== --- head/lib/libedit/sig.c Wed Jul 11 22:17:58 2012 (r238377) +++ head/lib/libedit/sig.c Wed Jul 11 22:20:19 2012 (r238378) @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $NetBSD: sig.c,v 1.14 2009/02/18 15:04:40 christos Exp $ + * $NetBSD: sig.c,v 1.15 2009/02/19 15:20:22 christos Exp $ */ #if !defined(lint) && !defined(SCCSID) @@ -73,6 +73,8 @@ sig_handler(int signo) (void) sigaddset(&nset, signo); (void) sigprocmask(SIG_BLOCK, &nset, &oset); + sel->el_signal->sig_no = signo; + switch (signo) { case SIGCONT: tty_rawmode(sel); @@ -158,12 +160,12 @@ sig_set(EditLine *el) struct sigaction osa, nsa; nsa.sa_handler = sig_handler; + nsa.sa_flags = 0; sigemptyset(&nsa.sa_mask); (void) sigprocmask(SIG_BLOCK, &el->el_signal->sig_set, &oset); for (i = 0; sighdl[i] != -1; i++) { - nsa.sa_flags = SIGINT ? 0 : SA_RESTART; /* This could happen if we get interrupted */ if (sigaction(sighdl[i], &nsa, &osa) != -1 && osa.sa_handler != sig_handler) Modified: head/lib/libedit/sig.h ============================================================================== --- head/lib/libedit/sig.h Wed Jul 11 22:17:58 2012 (r238377) +++ head/lib/libedit/sig.h Wed Jul 11 22:20:19 2012 (r238378) @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * @(#)sig.h 8.1 (Berkeley) 6/4/93 - * $NetBSD: sig.h,v 1.7 2009/02/15 21:25:01 christos Exp $ + * $NetBSD: sig.h,v 1.8 2009/02/19 15:20:22 christos Exp $ * $FreeBSD$ */ @@ -61,6 +61,7 @@ typedef struct { struct sigaction sig_action[ALLSIGSNO]; sigset_t sig_set; + volatile sig_atomic_t sig_no; } *el_signal_t; protected void sig_end(EditLine*); From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 22:44:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A72F1065673 for ; Wed, 11 Jul 2012 22:44:58 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 791468FC18 for ; Wed, 11 Jul 2012 22:44:57 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so3004961pbb.13 for ; Wed, 11 Jul 2012 15:44:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :x-gm-message-state; bh=qbfCTV6dbN8UnqvrR5PykniwBVg3o2Z1lMeuUokwF2s=; b=c5AiGWXdDpBmcfycNqCxJUs5sJWMdpgwLoEvMQKy84RHGZLpcICfK+2UuoMIgX80ES Of86xnAz9WIi8eyPJSfwoGEfBl3vKLpGIVgDTaQ1YuPYhKwnvACRnrqIE5UnsOK/wd7j /n/F4kIfffTvgwch/8Q1I+uhKgCNIWymvzDw84k+PU/eOwPQ8Vk96FlwNeovxJX7cj9W NdZMgkQ9Zv1EHLbdoCIydK5p4Wb/tOCBozxkUVwfGlGi/5iWYujZqbu56RIrsN30ENXi KCM6cBvrHxZJPZqAjzG0Mx0gLWo7qQ+HKp58qD5d+3fMvZnKFic1o9RSoJUR0oSxOxGR TYDQ== MIME-Version: 1.0 Received: by 10.68.240.73 with SMTP id vy9mr81201045pbc.102.1342046697258; Wed, 11 Jul 2012 15:44:57 -0700 (PDT) Sender: andy@fud.org.nz Received: by 10.68.20.71 with HTTP; Wed, 11 Jul 2012 15:44:57 -0700 (PDT) In-Reply-To: References: <201207110257.q6B2vXeW018145@svn.freebsd.org> <20120711195341.GK3599@albert.catwhisker.org> Date: Thu, 12 Jul 2012 10:44:57 +1200 X-Google-Sender-Auth: d6fBxc-ixwnJQu7VPfezUCaz6Nc Message-ID: From: Andrew Thompson To: Adrian Chadd Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQlRRdvmcOTWH6J9rT+/6V2PuVLh2/NJjVoZdaXS6dLNElZHiMD6j0pKQmgHcxpUyIcp9qg6 Cc: src-committers@freebsd.org, current@freebsd.org, svn-src-all@freebsd.org, Hiroki Sato , svn-src-head@freebsd.org, David Wolfskill Subject: Re: svn commit: r238361 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 22:44:58 -0000 On 12 July 2012 10:15, Adrian Chadd wrote: > Again, that just touched usb. So, how'd that affect non-USB wifi cloning? I guess cloning is first match wins and usb was incorrectly matching wlan* Andrew From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 23:00:27 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B7CF106566C; Wed, 11 Jul 2012 23:00:27 +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 36B138FC12; Wed, 11 Jul 2012 23:00:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6BN0R42070000; Wed, 11 Jul 2012 23:00:27 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6BN0RLk069998; Wed, 11 Jul 2012 23:00:27 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201207112300.q6BN0RLk069998@svn.freebsd.org> From: Christian Brueffer Date: Wed, 11 Jul 2012 23:00:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238379 - head/sys/cam/scsi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 23:00:27 -0000 Author: brueffer Date: Wed Jul 11 23:00:26 2012 New Revision: 238379 URL: http://svn.freebsd.org/changeset/base/238379 Log: Renamed the kern.cam.da.da_send_ordered sysctl and tunable to kern.cam.da.send_ordered, more in line with the other da sysctls/tunables. PR: 169765 Submitted by: Steven Hartland Reviewed by: mav Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Wed Jul 11 22:20:19 2012 (r238378) +++ head/sys/cam/scsi/scsi_da.c Wed Jul 11 23:00:26 2012 (r238379) @@ -883,9 +883,9 @@ TUNABLE_INT("kern.cam.da.retry_count", & SYSCTL_INT(_kern_cam_da, OID_AUTO, default_timeout, CTLFLAG_RW, &da_default_timeout, 0, "Normal I/O timeout (in seconds)"); TUNABLE_INT("kern.cam.da.default_timeout", &da_default_timeout); -SYSCTL_INT(_kern_cam_da, OID_AUTO, da_send_ordered, CTLFLAG_RW, +SYSCTL_INT(_kern_cam_da, OID_AUTO, send_ordered, CTLFLAG_RW, &da_send_ordered, 0, "Send Ordered Tags"); -TUNABLE_INT("kern.cam.da.da_send_ordered", &da_send_ordered); +TUNABLE_INT("kern.cam.da.send_ordered", &da_send_ordered); /* * DA_ORDEREDTAG_INTERVAL determines how often, relative From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 23:18:36 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1AE1106564A; Wed, 11 Jul 2012 23:18:36 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 97D2D8FC08; Wed, 11 Jul 2012 23:18:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6BNIa2L070829; Wed, 11 Jul 2012 23:18:36 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6BNIa8Z070803; Wed, 11 Jul 2012 23:18:36 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201207112318.q6BNIa8Z070803@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 11 Jul 2012 23:18:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238381 - in head: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/components/events sys/contrib/dev/ac... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 23:18:36 -0000 Author: jkim Date: Wed Jul 11 23:18:35 2012 New Revision: 238381 URL: http://svn.freebsd.org/changeset/base/238381 Log: Merge ACPICA 20120711. Added: head/sys/contrib/dev/acpica/components/tables/tbxfload.c - copied, changed from r238368, vendor-sys/acpica/dist/source/components/tables/tbxfload.c head/sys/contrib/dev/acpica/components/utilities/utexcep.c - copied, changed from r238368, vendor-sys/acpica/dist/source/components/utilities/utexcep.c Modified: head/sys/conf/files head/sys/contrib/dev/acpica/changes.txt (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslmain.c head/sys/contrib/dev/acpica/components/debugger/dbcmds.c head/sys/contrib/dev/acpica/components/debugger/dbinput.c head/sys/contrib/dev/acpica/components/events/evxfgpe.c head/sys/contrib/dev/acpica/components/executer/exprep.c head/sys/contrib/dev/acpica/components/executer/exresolv.c head/sys/contrib/dev/acpica/components/executer/exstore.c head/sys/contrib/dev/acpica/components/executer/exutils.c head/sys/contrib/dev/acpica/components/hardware/hwsleep.c head/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c head/sys/contrib/dev/acpica/components/namespace/nspredef.c head/sys/contrib/dev/acpica/components/parser/psxface.c head/sys/contrib/dev/acpica/components/resources/rscreate.c head/sys/contrib/dev/acpica/components/resources/rsutils.c head/sys/contrib/dev/acpica/components/tables/tbfadt.c head/sys/contrib/dev/acpica/components/tables/tbinstal.c head/sys/contrib/dev/acpica/components/tables/tbutils.c head/sys/contrib/dev/acpica/components/tables/tbxface.c head/sys/contrib/dev/acpica/components/tables/tbxfroot.c head/sys/contrib/dev/acpica/components/utilities/utdecode.c head/sys/contrib/dev/acpica/components/utilities/utglobal.c head/sys/contrib/dev/acpica/components/utilities/utmisc.c head/sys/contrib/dev/acpica/components/utilities/utobject.c head/sys/contrib/dev/acpica/components/utilities/utresrc.c head/sys/contrib/dev/acpica/components/utilities/utxferror.c head/sys/contrib/dev/acpica/include/acdebug.h head/sys/contrib/dev/acpica/include/acexcep.h head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/acmacros.h head/sys/contrib/dev/acpica/include/acobject.h head/sys/contrib/dev/acpica/include/acoutput.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/actbl1.h head/sys/contrib/dev/acpica/include/platform/acenv.h head/sys/modules/acpi/acpi/Makefile head/usr.sbin/acpi/acpidb/Makefile head/usr.sbin/acpi/iasl/Makefile Directory Properties: head/sys/contrib/dev/acpica/ (props changed) head/sys/contrib/dev/acpica/compiler/ (props changed) head/sys/contrib/dev/acpica/components/debugger/ (props changed) head/sys/contrib/dev/acpica/components/events/ (props changed) head/sys/contrib/dev/acpica/components/executer/ (props changed) head/sys/contrib/dev/acpica/components/hardware/ (props changed) head/sys/contrib/dev/acpica/components/namespace/ (props changed) head/sys/contrib/dev/acpica/components/parser/ (props changed) head/sys/contrib/dev/acpica/components/resources/ (props changed) head/sys/contrib/dev/acpica/components/tables/ (props changed) head/sys/contrib/dev/acpica/components/utilities/ (props changed) head/sys/contrib/dev/acpica/include/ (props changed) Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Jul 11 23:12:17 2012 (r238380) +++ head/sys/conf/files Wed Jul 11 23:18:35 2012 (r238381) @@ -412,6 +412,7 @@ contrib/dev/acpica/components/tables/tbf contrib/dev/acpica/components/tables/tbinstal.c optional acpi contrib/dev/acpica/components/tables/tbutils.c optional acpi contrib/dev/acpica/components/tables/tbxface.c optional acpi +contrib/dev/acpica/components/tables/tbxfload.c optional acpi contrib/dev/acpica/components/tables/tbxfroot.c optional acpi contrib/dev/acpica/components/utilities/utaddress.c optional acpi contrib/dev/acpica/components/utilities/utalloc.c optional acpi @@ -421,6 +422,7 @@ contrib/dev/acpica/components/utilities/ contrib/dev/acpica/components/utilities/utdecode.c optional acpi contrib/dev/acpica/components/utilities/utdelete.c optional acpi contrib/dev/acpica/components/utilities/uteval.c optional acpi +contrib/dev/acpica/components/utilities/utexcep.c optional acpi contrib/dev/acpica/components/utilities/utglobal.c optional acpi contrib/dev/acpica/components/utilities/utids.c optional acpi contrib/dev/acpica/components/utilities/utinit.c optional acpi Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Wed Jul 11 23:12:17 2012 (r238380) +++ head/sys/contrib/dev/acpica/changes.txt Wed Jul 11 23:18:35 2012 (r238381) @@ -1,4 +1,82 @@ ---------------------------------------- +11 July 2012. Summary of changes for version 20120711: + +This release is available at https://www.acpica.org/downloads The ACPI 5.0 +specification is available at www.acpi.info + +1) ACPICA Kernel-resident Subsystem: + +Fixed a possible fault in the return package object repair code. Fixes a +problem that can occur when a lone package object is wrapped with an outer +package object in order to force conformance to the ACPI specification. Can +affect these predefined names: _ALR, _MLS, _PSS, _TRT, _TSS, _PRT, _HPX, _DLM, +_CSD, _PSD, _TSD. + +Removed code to disable/enable bus master arbitration (ARB_DIS bit in the +PM2_CNT register) in the ACPICA sleep/wake interfaces. Management of the +ARB_DIS bit must be implemented in the host-dependent C3 processor power state +support. Note, ARB_DIS is obsolete and only applies to older chipsets, both +Intel and other vendors. (for Intel: ICH4-M and earlier) + +This change removes the code to disable/enable bus master arbitration during +suspend/resume. Use of the ARB_DIS bit in the optional PM2_CNT register causes +resume problems on some machines. The change has been in use for over seven +years within Linux. + +Implemented two new external interfaces to support host-directed dynamic ACPI +table load and unload. They are intended to simplify the host implementation +of hot-plug support: + AcpiLoadTable: Load an SSDT from a buffer into the namespace. + AcpiUnloadParentTable: Unload an SSDT via a named object owned by the table. +See the ACPICA reference for additional details. Adds one new file, +components/tables/tbxfload.c + +Implemented and deployed two new interfaces for errors and warnings that are +known to be caused by BIOS/firmware issues: + AcpiBiosError: Prints "ACPI Firmware Error" message. + AcpiBiosWarning: Prints "ACPI Firmware Warning" message. +Deployed these new interfaces in the ACPICA Table Manager code for ACPI table +and FADT errors. Additional deployment to be completed as appropriate in the +future. The associated conditional macros are ACPI_BIOS_ERROR and +ACPI_BIOS_WARNING. See the ACPICA reference for additional details. ACPICA BZ +843. + +Implicit notify support: ensure that no memory allocation occurs within a +critical region. This fix moves a memory allocation outside of the time that a +spinlock is held. Fixes issues on systems that do not allow this behavior. +Jung-uk Kim. + +Split exception code utilities and tables into a new file, utilities/utexcep.c + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug +version of the code includes the debug output trace mechanism and has a much +larger code and data size. + + Previous Release: + Non-Debug Version: 93.1K Code, 25.1K Data, 118.2K Total + Debug Version: 172.9K Code, 73.6K Data, 246.5K Total + Current Release: + Non-Debug Version: 93.5K Code, 25.3K Data, 118.8K Total + Debug Version: 173.7K Code, 74.0K Data, 247.7K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Fixed a parser problem for hosts where EOF is defined as -1 instead of +0. Jung-uk Kim. + +Debugger: Enhanced the "tables" command to emit additional information about +the current set of ACPI tables, including the owner ID and flags decode. + +Debugger: Reimplemented the "unload" command to use the new +AcpiUnloadParentTable external interface. This command was disable previously +due to need for an unload interface. + +AcpiHelp: Added a new option to decode ACPICA exception codes. The -e option +will decode 16-bit hex status codes (ACPI_STATUS) to name strings. + +---------------------------------------- 20 June 2012. Summary of changes for version 20120620: This release is available at https://www.acpica.org/downloads Modified: head/sys/contrib/dev/acpica/compiler/aslmain.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmain.c Wed Jul 11 23:12:17 2012 (r238380) +++ head/sys/contrib/dev/acpica/compiler/aslmain.c Wed Jul 11 23:18:35 2012 (r238381) @@ -96,7 +96,7 @@ AslDoResponseFile ( #define ASL_TOKEN_SEPARATORS " \t\n" -#define ASL_SUPPORTED_OPTIONS "@:2b|c|d^D:e:fgh^i|I:l^mno|p:P^r:s|t|T:G^v|w|x:z" +#define ASL_SUPPORTED_OPTIONS "@:2b|c|d^D:e:fgh^i|I:l^mno|p:P^r:s|t|T:G^v^w|x:z" /******************************************************************************* @@ -119,6 +119,7 @@ Options ( printf ("\nGlobal:\n"); ACPI_OPTION ("-@ ", "Specify command file"); ACPI_OPTION ("-I ", "Specify additional include directory"); + ACPI_OPTION ("-v", "Display compiler version"); printf ("\nPreprocessor:\n"); ACPI_OPTION ("-D ", "Define symbol for preprocessor use"); @@ -751,9 +752,13 @@ AslDoOptions ( break; - case 'v': /* Verbosity settings */ + case 'v': /* Version and verbosity settings */ switch (AcpiGbl_Optarg[0]) { + case '^': + printf (ACPI_COMMON_SIGNON (ASL_COMPILER_NAME)); + exit (0); + case 'a': /* Disable All error/warning messages */ Modified: head/sys/contrib/dev/acpica/components/debugger/dbcmds.c ============================================================================== --- head/sys/contrib/dev/acpica/components/debugger/dbcmds.c Wed Jul 11 23:12:17 2012 (r238380) +++ head/sys/contrib/dev/acpica/components/debugger/dbcmds.c Wed Jul 11 23:18:35 2012 (r238381) @@ -254,12 +254,53 @@ AcpiDbDisplayTableInfo ( ACPI_STATUS Status; + /* Header */ + + AcpiOsPrintf ("Idx ID Status Type Sig Address Len Header\n"); + /* Walk the entire root table list */ for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; i++) { TableDesc = &AcpiGbl_RootTableList.Tables[i]; - AcpiOsPrintf ("%u ", i); + + /* Index and Table ID */ + + AcpiOsPrintf ("%3u %.2u ", i, TableDesc->OwnerId); + + /* Decode the table flags */ + + if (!(TableDesc->Flags & ACPI_TABLE_IS_LOADED)) + { + AcpiOsPrintf ("NotLoaded "); + } + else + { + AcpiOsPrintf (" Loaded "); + } + + switch (TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK) + { + case ACPI_TABLE_ORIGIN_UNKNOWN: + AcpiOsPrintf ("Unknown "); + break; + + case ACPI_TABLE_ORIGIN_MAPPED: + AcpiOsPrintf ("Mapped "); + break; + + case ACPI_TABLE_ORIGIN_ALLOCATED: + AcpiOsPrintf ("Allocated "); + break; + + case ACPI_TABLE_ORIGIN_OVERRIDE: + AcpiOsPrintf ("Override "); + break; + + default: + AcpiOsPrintf ("INVALID "); + break; + } /* Make sure that the table is mapped */ @@ -290,55 +331,45 @@ AcpiDbDisplayTableInfo ( * * FUNCTION: AcpiDbUnloadAcpiTable * - * PARAMETERS: TableArg - Name of the table to be unloaded - * InstanceArg - Which instance of the table to unload (if - * there are multiple tables of the same type) + * PARAMETERS: ObjectName - Namespace pathname for an object that + * is owned by the table to be unloaded * - * RETURN: Nonde + * RETURN: None * - * DESCRIPTION: Unload an ACPI table. - * Instance is not implemented + * DESCRIPTION: Unload an ACPI table, via any namespace node that is owned + * by the table. * ******************************************************************************/ void AcpiDbUnloadAcpiTable ( - char *TableArg, - char *InstanceArg) + char *ObjectName) { -/* TBD: Need to reimplement for new data structures */ - -#if 0 - UINT32 i; + ACPI_NAMESPACE_NODE *Node; ACPI_STATUS Status; - /* Search all tables for the target type */ + /* Translate name to an Named object */ - for (i = 0; i < (ACPI_TABLE_ID_MAX+1); i++) + Node = AcpiDbConvertToNode (ObjectName); + if (!Node) { - if (!ACPI_STRNCMP (TableArg, AcpiGbl_TableData[i].Signature, - AcpiGbl_TableData[i].SigLength)) - { - /* Found the table, unload it */ - - Status = AcpiUnloadTable (i); - if (ACPI_SUCCESS (Status)) - { - AcpiOsPrintf ("[%s] unloaded and uninstalled\n", TableArg); - } - else - { - AcpiOsPrintf ("%s, while unloading [%s]\n", - AcpiFormatException (Status), TableArg); - } - - return; - } + AcpiOsPrintf ("Could not find [%s] in namespace\n", + ObjectName); + return; } - AcpiOsPrintf ("Unknown table type [%s]\n", TableArg); -#endif + Status = AcpiUnloadParentTable (ACPI_CAST_PTR (ACPI_HANDLE, Node)); + if (ACPI_SUCCESS (Status)) + { + AcpiOsPrintf ("Parent of [%s] (%p) unloaded and uninstalled\n", + ObjectName, Node); + } + else + { + AcpiOsPrintf ("%s, while unloading parent table of [%s]\n", + AcpiFormatException (Status), ObjectName); + } } Modified: head/sys/contrib/dev/acpica/components/debugger/dbinput.c ============================================================================== --- head/sys/contrib/dev/acpica/components/debugger/dbinput.c Wed Jul 11 23:12:17 2012 (r238380) +++ head/sys/contrib/dev/acpica/components/debugger/dbinput.c Wed Jul 11 23:18:35 2012 (r238381) @@ -250,7 +250,7 @@ AcpiDbDisplayHelp ( AcpiOsPrintf (" Stack Display CPU stack usage\n"); AcpiOsPrintf (" Tables Info about current ACPI table(s)\n"); AcpiOsPrintf (" Tables Display info about loaded ACPI tables\n"); - AcpiOsPrintf (" Unload [Instance] Unload an ACPI table\n"); + AcpiOsPrintf (" Unload Unload an ACPI table via namespace object\n"); AcpiOsPrintf (" ! Execute command from history buffer\n"); AcpiOsPrintf (" !! Execute last command again\n"); @@ -894,7 +894,7 @@ AcpiDbCommandDispatch ( break; case CMD_UNLOAD: - AcpiDbUnloadAcpiTable (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]); + AcpiDbUnloadAcpiTable (AcpiGbl_DbArgs[1]); break; case CMD_EXIT: Modified: head/sys/contrib/dev/acpica/components/events/evxfgpe.c ============================================================================== --- head/sys/contrib/dev/acpica/components/events/evxfgpe.c Wed Jul 11 23:12:17 2012 (r238380) +++ head/sys/contrib/dev/acpica/components/events/evxfgpe.c Wed Jul 11 23:18:35 2012 (r238381) @@ -83,7 +83,7 @@ AcpiUpdateAllGpes ( ACPI_STATUS Status; - ACPI_FUNCTION_TRACE (AcpiUpdateGpes); + ACPI_FUNCTION_TRACE (AcpiUpdateAllGpes); Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS); @@ -298,7 +298,8 @@ AcpiSetupGpeForWake ( ACPI_STATUS Status; ACPI_GPE_EVENT_INFO *GpeEventInfo; ACPI_NAMESPACE_NODE *DeviceNode; - ACPI_GPE_NOTIFY_INFO *NewNotify, *Notify; + ACPI_GPE_NOTIFY_INFO *Notify; + ACPI_GPE_NOTIFY_INFO *NewNotify; ACPI_CPU_FLAGS Flags; @@ -334,6 +335,11 @@ AcpiSetupGpeForWake ( return_ACPI_STATUS (AE_BAD_PARAMETER); } + /* + * Allocate a new notify object up front, in case it is needed. + * Memory allocation while holding a spinlock is a big no-no + * on some hosts. + */ NewNotify = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_GPE_NOTIFY_INFO)); if (!NewNotify) { @@ -401,8 +407,12 @@ AcpiSetupGpeForWake ( GpeEventInfo->Flags |= ACPI_GPE_CAN_WAKE; Status = AE_OK; + UnlockAndExit: AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); + + /* Delete the notify object if it was not used above */ + if (NewNotify) { ACPI_FREE (NewNotify); Modified: head/sys/contrib/dev/acpica/components/executer/exprep.c ============================================================================== --- head/sys/contrib/dev/acpica/components/executer/exprep.c Wed Jul 11 23:12:17 2012 (r238380) +++ head/sys/contrib/dev/acpica/components/executer/exprep.c Wed Jul 11 23:18:35 2012 (r238381) @@ -418,8 +418,8 @@ AcpiExPrepCommonFieldObject ( * * RETURN: Status * - * DESCRIPTION: Construct an ACPI_OPERAND_OBJECT of type DefField and - * connect it to the parent Node. + * DESCRIPTION: Construct an object of type ACPI_OPERAND_OBJECT with a + * subtype of DefField and connect it to the parent Node. * ******************************************************************************/ Modified: head/sys/contrib/dev/acpica/components/executer/exresolv.c ============================================================================== --- head/sys/contrib/dev/acpica/components/executer/exresolv.c Wed Jul 11 23:12:17 2012 (r238380) +++ head/sys/contrib/dev/acpica/components/executer/exresolv.c Wed Jul 11 23:18:35 2012 (r238381) @@ -165,7 +165,7 @@ AcpiExResolveObjectToValue ( StackDesc = *StackPtr; - /* This is an ACPI_OPERAND_OBJECT */ + /* This is an object of type ACPI_OPERAND_OBJECT */ switch (StackDesc->Common.Type) { Modified: head/sys/contrib/dev/acpica/components/executer/exstore.c ============================================================================== --- head/sys/contrib/dev/acpica/components/executer/exstore.c Wed Jul 11 23:12:17 2012 (r238380) +++ head/sys/contrib/dev/acpica/components/executer/exstore.c Wed Jul 11 23:18:35 2012 (r238381) @@ -68,15 +68,15 @@ AcpiExStoreObjectToIndex ( * FUNCTION: AcpiExStore * * PARAMETERS: *SourceDesc - Value to be stored - * *DestDesc - Where to store it. Must be an NS node - * or an ACPI_OPERAND_OBJECT of type + * *DestDesc - Where to store it. Must be an NS node + * or ACPI_OPERAND_OBJECT of type * Reference; * WalkState - Current walk state * * RETURN: Status * * DESCRIPTION: Store the value described by SourceDesc into the location - * described by DestDesc. Called by various interpreter + * described by DestDesc. Called by various interpreter * functions to store the result of an operation into * the destination operand -- not just simply the actual "Store" * ASL operator. Modified: head/sys/contrib/dev/acpica/components/executer/exutils.c ============================================================================== --- head/sys/contrib/dev/acpica/components/executer/exutils.c Wed Jul 11 23:12:17 2012 (r238380) +++ head/sys/contrib/dev/acpica/components/executer/exutils.c Wed Jul 11 23:18:35 2012 (r238381) @@ -121,7 +121,7 @@ AcpiExEnterInterpreter ( * * DESCRIPTION: Reacquire the interpreter execution region from within the * interpreter code. Failure to enter the interpreter region is a - * fatal system error. Used in conjuction with + * fatal system error. Used in conjunction with * RelinquishInterpreter * ******************************************************************************/ Modified: head/sys/contrib/dev/acpica/components/hardware/hwsleep.c ============================================================================== --- head/sys/contrib/dev/acpica/components/hardware/hwsleep.c Wed Jul 11 23:12:17 2012 (r238380) +++ head/sys/contrib/dev/acpica/components/hardware/hwsleep.c Wed Jul 11 23:18:35 2012 (r238381) @@ -100,20 +100,6 @@ AcpiHwLegacySleep ( return_ACPI_STATUS (Status); } - if (SleepState != ACPI_STATE_S5) - { - /* - * Disable BM arbitration. This feature is contained within an - * optional register (PM2 Control), so ignore a BAD_ADDRESS - * exception. - */ - Status = AcpiWriteBitRegister (ACPI_BITREG_ARB_DISABLE, 1); - if (ACPI_FAILURE (Status) && (Status != AE_BAD_ADDRESS)) - { - return_ACPI_STATUS (Status); - } - } - /* * 1) Disable/Clear all GPEs * 2) Enable all wakeup GPEs @@ -394,17 +380,6 @@ AcpiHwLegacyWake ( AcpiGbl_FixedEventInfo[ACPI_EVENT_POWER_BUTTON].StatusRegisterId, ACPI_CLEAR_STATUS); - /* - * Enable BM arbitration. This feature is contained within an - * optional register (PM2 Control), so ignore a BAD_ADDRESS - * exception. - */ - Status = AcpiWriteBitRegister (ACPI_BITREG_ARB_DISABLE, 0); - if (ACPI_FAILURE (Status) && (Status != AE_BAD_ADDRESS)) - { - return_ACPI_STATUS (Status); - } - AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WORKING); return_ACPI_STATUS (Status); } Modified: head/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c ============================================================================== --- head/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c Wed Jul 11 23:12:17 2012 (r238380) +++ head/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c Wed Jul 11 23:18:35 2012 (r238381) @@ -101,6 +101,14 @@ AcpiSetFirmwareWakingVector ( ACPI_FUNCTION_TRACE (AcpiSetFirmwareWakingVector); + /* + * According to the ACPI specification 2.0c and later, the 64-bit + * waking vector should be cleared and the 32-bit waking vector should + * be used, unless we want the wake-up code to be called by the BIOS in + * Protected Mode. Some systems (for example HP dv5-1004nr) are known + * to fail to resume if the 64-bit vector is used. + */ + /* Set the 32-bit vector */ AcpiGbl_FACS->FirmwareWakingVector = PhysicalAddress; Modified: head/sys/contrib/dev/acpica/components/namespace/nspredef.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nspredef.c Wed Jul 11 23:12:17 2012 (r238380) +++ head/sys/contrib/dev/acpica/components/namespace/nspredef.c Wed Jul 11 23:18:35 2012 (r238381) @@ -681,7 +681,7 @@ AcpiNsCheckPackage ( { /* Create the new outer package and populate it */ - Status = AcpiNsWrapWithPackage (Data, *Elements, ReturnObjectPtr); + Status = AcpiNsWrapWithPackage (Data, ReturnObject, ReturnObjectPtr); if (ACPI_FAILURE (Status)) { return (Status); Modified: head/sys/contrib/dev/acpica/components/parser/psxface.c ============================================================================== --- head/sys/contrib/dev/acpica/components/parser/psxface.c Wed Jul 11 23:12:17 2012 (r238380) +++ head/sys/contrib/dev/acpica/components/parser/psxface.c Wed Jul 11 23:18:35 2012 (r238381) @@ -348,8 +348,8 @@ AcpiPsExecuteMethod ( } /* - * Start method evaluation with an implicit return of zero. This is done - * for Windows compatibility. + * Start method evaluation with an implicit return of zero. + * This is done for Windows compatibility. */ if (AcpiGbl_EnableInterpreterSlack) { Modified: head/sys/contrib/dev/acpica/components/resources/rscreate.c ============================================================================== --- head/sys/contrib/dev/acpica/components/resources/rscreate.c Wed Jul 11 23:12:17 2012 (r238380) +++ head/sys/contrib/dev/acpica/components/resources/rscreate.c Wed Jul 11 23:18:35 2012 (r238381) @@ -209,8 +209,8 @@ AcpiRsCreateResourceList ( * * FUNCTION: AcpiRsCreatePciRoutingTable * - * PARAMETERS: PackageObject - Pointer to an ACPI_OPERAND_OBJECT - * package + * PARAMETERS: PackageObject - Pointer to a package containing one + * of more ACPI_OPERAND_OBJECTs * OutputBuffer - Pointer to the user's buffer * * RETURN: Status AE_OK if okay, else a valid ACPI_STATUS code. @@ -218,7 +218,7 @@ AcpiRsCreateResourceList ( * AE_BUFFER_OVERFLOW and OutputBuffer->Length will point * to the size buffer needed. * - * DESCRIPTION: Takes the ACPI_OPERAND_OBJECT package and creates a + * DESCRIPTION: Takes the ACPI_OPERAND_OBJECT package and creates a * linked list of PCI interrupt descriptions * * NOTE: It is the caller's responsibility to ensure that the start of the Modified: head/sys/contrib/dev/acpica/components/resources/rsutils.c ============================================================================== --- head/sys/contrib/dev/acpica/components/resources/rsutils.c Wed Jul 11 23:12:17 2012 (r238380) +++ head/sys/contrib/dev/acpica/components/resources/rsutils.c Wed Jul 11 23:18:35 2012 (r238381) @@ -181,7 +181,7 @@ AcpiRsMoveData ( /* * 16-, 32-, and 64-bit cases must use the move macros that perform - * endian conversion and/or accomodate hardware that cannot perform + * endian conversion and/or accommodate hardware that cannot perform * misaligned memory transfers */ case ACPI_RSC_MOVE16: Modified: head/sys/contrib/dev/acpica/components/tables/tbfadt.c ============================================================================== --- head/sys/contrib/dev/acpica/components/tables/tbfadt.c Wed Jul 11 23:12:17 2012 (r238380) +++ head/sys/contrib/dev/acpica/components/tables/tbfadt.c Wed Jul 11 23:18:35 2012 (r238381) @@ -192,7 +192,7 @@ static ACPI_FADT_PM_INFO FadtPmInfoTa * * PARAMETERS: GenericAddress - GAS struct to be initialized * SpaceId - ACPI Space ID for this register - * ByteWidth - Width of this register, in bytes + * ByteWidth - Width of this register * Address - Address of the register * * RETURN: None @@ -338,7 +338,7 @@ AcpiTbCreateLocalFadt ( */ if (Length > sizeof (ACPI_TABLE_FADT)) { - ACPI_WARNING ((AE_INFO, + ACPI_BIOS_WARNING ((AE_INFO, "FADT (revision %u) is longer than ACPI 5.0 version, " "truncating length %u to %u", Table->Revision, Length, (UINT32) sizeof (ACPI_TABLE_FADT))); @@ -486,8 +486,9 @@ AcpiTbConvertFadt ( if (Address64->Address && Address32 && (Address64->Address != (UINT64) Address32)) { - ACPI_ERROR ((AE_INFO, - "32/64X address mismatch in %s: 0x%8.8X/0x%8.8X%8.8X, using 32", + ACPI_BIOS_ERROR ((AE_INFO, + "32/64X address mismatch in FADT/%s: " + "0x%8.8X/0x%8.8X%8.8X, using 32", FadtInfoTable[i].Name, Address32, ACPI_FORMAT_UINT64 (Address64->Address))); } @@ -546,7 +547,7 @@ AcpiTbValidateFadt ( if (AcpiGbl_FADT.Facs && (AcpiGbl_FADT.XFacs != (UINT64) AcpiGbl_FADT.Facs)) { - ACPI_WARNING ((AE_INFO, + ACPI_BIOS_WARNING ((AE_INFO, "32/64X FACS address mismatch in FADT - " "0x%8.8X/0x%8.8X%8.8X, using 32", AcpiGbl_FADT.Facs, ACPI_FORMAT_UINT64 (AcpiGbl_FADT.XFacs))); @@ -557,7 +558,7 @@ AcpiTbValidateFadt ( if (AcpiGbl_FADT.Dsdt && (AcpiGbl_FADT.XDsdt != (UINT64) AcpiGbl_FADT.Dsdt)) { - ACPI_WARNING ((AE_INFO, + ACPI_BIOS_WARNING ((AE_INFO, "32/64X DSDT address mismatch in FADT - " "0x%8.8X/0x%8.8X%8.8X, using 32", AcpiGbl_FADT.Dsdt, ACPI_FORMAT_UINT64 (AcpiGbl_FADT.XDsdt))); @@ -593,8 +594,8 @@ AcpiTbValidateFadt ( if (Address64->Address && (Address64->BitWidth != ACPI_MUL_8 (Length))) { - ACPI_WARNING ((AE_INFO, - "32/64X length mismatch in %s: %u/%u", + ACPI_BIOS_WARNING ((AE_INFO, + "32/64X length mismatch in FADT/%s: %u/%u", Name, ACPI_MUL_8 (Length), Address64->BitWidth)); } @@ -606,9 +607,9 @@ AcpiTbValidateFadt ( */ if (!Address64->Address || !Length) { - ACPI_ERROR ((AE_INFO, - "Required field %s has zero address and/or length:" - " 0x%8.8X%8.8X/0x%X", + ACPI_BIOS_ERROR ((AE_INFO, + "Required FADT field %s has zero address and/or length: " + "0x%8.8X%8.8X/0x%X", Name, ACPI_FORMAT_UINT64 (Address64->Address), Length)); } } @@ -622,8 +623,8 @@ AcpiTbValidateFadt ( if ((Address64->Address && !Length) || (!Address64->Address && Length)) { - ACPI_WARNING ((AE_INFO, - "Optional field %s has zero address or length: " + ACPI_BIOS_WARNING ((AE_INFO, + "Optional FADT field %s has zero address or length: " "0x%8.8X%8.8X/0x%X", Name, ACPI_FORMAT_UINT64 (Address64->Address), Length)); } @@ -674,8 +675,8 @@ AcpiTbSetupFadtRegisters ( (FadtInfoTable[i].DefaultLength > 0) && (FadtInfoTable[i].DefaultLength != Target64->BitWidth)) { - ACPI_WARNING ((AE_INFO, - "Invalid length for %s: %u, using default %u", + ACPI_BIOS_WARNING ((AE_INFO, + "Invalid length for FADT/%s: %u, using default %u", FadtInfoTable[i].Name, Target64->BitWidth, FadtInfoTable[i].DefaultLength)); Modified: head/sys/contrib/dev/acpica/components/tables/tbinstal.c ============================================================================== --- head/sys/contrib/dev/acpica/components/tables/tbinstal.c Wed Jul 11 23:12:17 2012 (r238380) +++ head/sys/contrib/dev/acpica/components/tables/tbinstal.c Wed Jul 11 23:18:35 2012 (r238381) @@ -157,8 +157,9 @@ AcpiTbAddTable ( (!ACPI_COMPARE_NAME (TableDesc->Pointer->Signature, ACPI_SIG_SSDT)) && (ACPI_STRNCMP (TableDesc->Pointer->Signature, "OEM", 3))) { - ACPI_ERROR ((AE_INFO, - "Table has invalid signature [%4.4s] (0x%8.8X), must be SSDT or OEMx", + ACPI_BIOS_ERROR ((AE_INFO, + "Table has invalid signature [%4.4s] (0x%8.8X), " + "must be SSDT or OEMx", AcpiUtValidAcpiName (*(UINT32 *) TableDesc->Pointer->Signature) ? TableDesc->Pointer->Signature : "????", *(UINT32 *) TableDesc->Pointer->Signature)); Modified: head/sys/contrib/dev/acpica/components/tables/tbutils.c ============================================================================== --- head/sys/contrib/dev/acpica/components/tables/tbutils.c Wed Jul 11 23:12:17 2012 (r238380) +++ head/sys/contrib/dev/acpica/components/tables/tbutils.c Wed Jul 11 23:18:35 2012 (r238381) @@ -287,8 +287,9 @@ AcpiTbVerifyChecksum ( if (Checksum) { - ACPI_WARNING ((AE_INFO, - "Incorrect checksum in table [%4.4s] - 0x%2.2X, should be 0x%2.2X", + ACPI_BIOS_WARNING ((AE_INFO, + "Incorrect checksum in table [%4.4s] - 0x%2.2X, " + "should be 0x%2.2X", Table->Signature, Table->Checksum, (UINT8) (Table->Checksum - Checksum))); @@ -356,8 +357,9 @@ AcpiTbCheckDsdtHeader ( if (AcpiGbl_OriginalDsdtHeader.Length != AcpiGbl_DSDT->Length || AcpiGbl_OriginalDsdtHeader.Checksum != AcpiGbl_DSDT->Checksum) { - ACPI_ERROR ((AE_INFO, - "The DSDT has been corrupted or replaced - old, new headers below")); + ACPI_BIOS_ERROR ((AE_INFO, + "The DSDT has been corrupted or replaced - " + "old, new headers below")); AcpiTbPrintTableHeader (0, &AcpiGbl_OriginalDsdtHeader); AcpiTbPrintTableHeader (0, AcpiGbl_DSDT); @@ -460,27 +462,12 @@ AcpiTbInstallTable ( return; } - /* Skip SSDT when DSDT is overriden */ - - if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_SSDT) && - (AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Flags & - ACPI_TABLE_ORIGIN_OVERRIDE)) - { - ACPI_INFO ((AE_INFO, - "%4.4s @ 0x%p Table override, replaced with:", ACPI_SIG_SSDT, - ACPI_CAST_PTR (void, Address))); - AcpiTbPrintTableHeader ( - AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Address, - AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Pointer); - goto UnmapAndExit; - } - /* If a particular signature is expected (DSDT/FACS), it must match */ if (Signature && !ACPI_COMPARE_NAME (Table->Signature, Signature)) { - ACPI_ERROR ((AE_INFO, + ACPI_BIOS_ERROR ((AE_INFO, "Invalid signature 0x%X for ACPI table, expected [%s]", *ACPI_CAST_PTR (UINT32, Table->Signature), Signature)); goto UnmapAndExit; @@ -498,6 +485,19 @@ AcpiTbInstallTable ( TableDesc->Flags = ACPI_TABLE_ORIGIN_MAPPED; ACPI_MOVE_32_TO_32 (TableDesc->Signature.Ascii, Table->Signature); + /* When DSDT is overriden, assume SSDT is also overriden with it */ + + if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_SSDT) && + (AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Flags & + ACPI_TABLE_ORIGIN_OVERRIDE)) + { + TableDesc->Flags = ACPI_TABLE_ORIGIN_OVERRIDE; + ACPI_INFO ((AE_INFO, + "%4.4s %p Logical table override, replaced with %4.4s", + ACPI_SIG_SSDT, ACPI_CAST_PTR (void, Address), ACPI_SIG_DSDT)); + goto UnmapAndExit; + } + /* * ACPI Table Override: * @@ -599,7 +599,7 @@ AcpiTbGetRootTableEntry ( { /* Will truncate 64-bit address to 32 bits, issue warning */ - ACPI_WARNING ((AE_INFO, + ACPI_BIOS_WARNING ((AE_INFO, "64-bit Physical Address in XSDT is too large (0x%8.8X%8.8X)," " truncating", ACPI_FORMAT_UINT64 (Address64))); @@ -701,7 +701,8 @@ AcpiTbParseRootTable ( if (Length < sizeof (ACPI_TABLE_HEADER)) { - ACPI_ERROR ((AE_INFO, "Invalid length 0x%X in RSDT/XSDT", Length)); + ACPI_BIOS_ERROR ((AE_INFO, + "Invalid table length 0x%X in RSDT/XSDT", Length)); return_ACPI_STATUS (AE_INVALID_TABLE_LENGTH); } Modified: head/sys/contrib/dev/acpica/components/tables/tbxface.c ============================================================================== --- head/sys/contrib/dev/acpica/components/tables/tbxface.c Wed Jul 11 23:12:17 2012 (r238380) +++ head/sys/contrib/dev/acpica/components/tables/tbxface.c Wed Jul 11 23:18:35 2012 (r238381) @@ -1,7 +1,6 @@ /****************************************************************************** * - * Module Name: tbxface - Public interfaces to the ACPI subsystem - * ACPI table oriented interfaces + * Module Name: tbxface - ACPI table oriented external interfaces * *****************************************************************************/ @@ -46,18 +45,11 @@ #include #include -#include #include #define _COMPONENT ACPI_TABLES ACPI_MODULE_NAME ("tbxface") -/* Local prototypes */ - -static ACPI_STATUS -AcpiTbLoadNamespace ( - void); - /******************************************************************************* * @@ -458,165 +450,6 @@ ACPI_EXPORT_SYMBOL (AcpiGetTableByIndex) /******************************************************************************* * - * FUNCTION: AcpiTbLoadNamespace - * - * PARAMETERS: None - * - * RETURN: Status - * - * DESCRIPTION: Load the namespace from the DSDT and all SSDTs/PSDTs found in - * the RSDT/XSDT. - * - ******************************************************************************/ - -static ACPI_STATUS -AcpiTbLoadNamespace ( - void) -{ - ACPI_STATUS Status; - UINT32 i; - ACPI_TABLE_HEADER *NewDsdt; - - - ACPI_FUNCTION_TRACE (TbLoadNamespace); - - - (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); - - /* - * Load the namespace. The DSDT is required, but any SSDT and - * PSDT tables are optional. Verify the DSDT. - */ - if (!AcpiGbl_RootTableList.CurrentTableCount || - !ACPI_COMPARE_NAME ( - &(AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Signature), - ACPI_SIG_DSDT) || - ACPI_FAILURE (AcpiTbVerifyTable ( - &AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT]))) - { - Status = AE_NO_ACPI_TABLES; - goto UnlockAndExit; - } - - /* - * Save the DSDT pointer for simple access. This is the mapped memory - * address. We must take care here because the address of the .Tables - * array can change dynamically as tables are loaded at run-time. Note: - * .Pointer field is not validated until after call to AcpiTbVerifyTable. - */ - AcpiGbl_DSDT = AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Pointer; - - /* - * Optionally copy the entire DSDT to local memory (instead of simply - * mapping it.) There are some BIOSs that corrupt or replace the original - * DSDT, creating the need for this option. Default is FALSE, do not copy - * the DSDT. - */ - if (AcpiGbl_CopyDsdtLocally) - { - NewDsdt = AcpiTbCopyDsdt (ACPI_TABLE_INDEX_DSDT); - if (NewDsdt) - { - AcpiGbl_DSDT = NewDsdt; - } - } - - /* - * Save the original DSDT header for detection of table corruption - * and/or replacement of the DSDT from outside the OS. - */ - ACPI_MEMCPY (&AcpiGbl_OriginalDsdtHeader, AcpiGbl_DSDT, - sizeof (ACPI_TABLE_HEADER)); - - (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); - - /* Load and parse tables */ - - Status = AcpiNsLoadTable (ACPI_TABLE_INDEX_DSDT, AcpiGbl_RootNode); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } - - /* Load any SSDT or PSDT tables. Note: Loop leaves tables locked */ - - (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); - for (i = 2; i < AcpiGbl_RootTableList.CurrentTableCount; ++i) - { - if ((!ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[i].Signature), - ACPI_SIG_SSDT) && - !ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[i].Signature), - ACPI_SIG_PSDT)) || - ACPI_FAILURE (AcpiTbVerifyTable ( - &AcpiGbl_RootTableList.Tables[i]))) - { - continue; - } - - /* Skip SSDT when DSDT is overriden */ - - if (ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[i].Signature), - ACPI_SIG_SSDT) && - (AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Flags & - ACPI_TABLE_ORIGIN_OVERRIDE)) - { - continue; - } - - /* Ignore errors while loading tables, get as many as possible */ - - (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); - (void) AcpiNsLoadTable (i, AcpiGbl_RootNode); - (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); - } - - ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "ACPI Tables successfully acquired\n")); - -UnlockAndExit: - (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); - return_ACPI_STATUS (Status); -} - - -/******************************************************************************* - * - * FUNCTION: AcpiLoadTables - * - * PARAMETERS: None - * - * RETURN: Status - * - * DESCRIPTION: Load the ACPI tables from the RSDT/XSDT - * - ******************************************************************************/ - -ACPI_STATUS -AcpiLoadTables ( - void) -{ - ACPI_STATUS Status; - - - ACPI_FUNCTION_TRACE (AcpiLoadTables); - - - /* Load the namespace from the tables */ - - Status = AcpiTbLoadNamespace (); - if (ACPI_FAILURE (Status)) - { - ACPI_EXCEPTION ((AE_INFO, Status, - "While loading namespace from ACPI tables")); - } - - return_ACPI_STATUS (Status); -} - -ACPI_EXPORT_SYMBOL (AcpiLoadTables) - - -/******************************************************************************* - * * FUNCTION: AcpiInstallTableHandler * * PARAMETERS: Handler - Table event handler Copied and modified: head/sys/contrib/dev/acpica/components/tables/tbxfload.c (from r238368, vendor-sys/acpica/dist/source/components/tables/tbxfload.c) ============================================================================== --- vendor-sys/acpica/dist/source/components/tables/tbxfload.c Wed Jul 11 16:52:25 2012 (r238368, copy source) +++ head/sys/contrib/dev/acpica/components/tables/tbxfload.c Wed Jul 11 23:18:35 2012 (r238381) @@ -43,10 +43,10 @@ #define __TBXFLOAD_C__ -#include "acpi.h" -#include "accommon.h" -#include "acnamesp.h" -#include "actables.h" +#include +#include +#include +#include #define _COMPONENT ACPI_TABLES ACPI_MODULE_NAME ("tbxfload") @@ -180,7 +180,7 @@ AcpiTbLoadNamespace ( /* Load any SSDT or PSDT tables. Note: Loop leaves tables locked */ (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); - for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i) + for (i = 2; i < AcpiGbl_RootTableList.CurrentTableCount; ++i) { if ((!ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[i].Signature), ACPI_SIG_SSDT) && @@ -192,6 +192,15 @@ AcpiTbLoadNamespace ( continue; } + /* Skip SSDT when it is overriden with DSDT */ + if (ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[i].Signature), + ACPI_SIG_SSDT) && + (AcpiGbl_RootTableList.Tables[i].Flags & + ACPI_TABLE_ORIGIN_OVERRIDE)) + { + continue; + } + /* Ignore errors while loading tables, get as many as possible */ (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); Modified: head/sys/contrib/dev/acpica/components/tables/tbxfroot.c ============================================================================== --- head/sys/contrib/dev/acpica/components/tables/tbxfroot.c Wed Jul 11 23:12:17 2012 (r238380) +++ head/sys/contrib/dev/acpica/components/tables/tbxfroot.c Wed Jul 11 23:18:35 2012 (r238381) @@ -234,7 +234,7 @@ AcpiFindRootPointer ( /* A valid RSDP was not found */ - ACPI_ERROR ((AE_INFO, "A valid RSDP was not found")); + ACPI_BIOS_ERROR ((AE_INFO, "A valid RSDP was not found")); return_ACPI_STATUS (AE_NOT_FOUND); } Modified: head/sys/contrib/dev/acpica/components/utilities/utdecode.c ============================================================================== --- head/sys/contrib/dev/acpica/components/utilities/utdecode.c Wed Jul 11 23:12:17 2012 (r238380) +++ head/sys/contrib/dev/acpica/components/utilities/utdecode.c Wed Jul 11 23:18:35 2012 (r238381) @@ -51,47 +51,6 @@ ACPI_MODULE_NAME ("utdecode") -/******************************************************************************* - * - * FUNCTION: AcpiFormatException - * - * PARAMETERS: Status - The ACPI_STATUS code to be formatted - * - * RETURN: A string containing the exception text. A valid pointer is - * always returned. - * - * DESCRIPTION: This function translates an ACPI exception into an ASCII string - * It is here instead of utxface.c so it is always present. - * - ******************************************************************************/ - -const char * -AcpiFormatException ( - ACPI_STATUS Status) -{ - const char *Exception = NULL; - - - ACPI_FUNCTION_ENTRY (); - - - Exception = AcpiUtValidateException (Status); - if (!Exception) - { - /* Exception code was not recognized */ - - ACPI_ERROR ((AE_INFO, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Jul 11 23:22:10 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2F67106564A; Wed, 11 Jul 2012 23:22: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 DE0718FC0A; Wed, 11 Jul 2012 23:22:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6BNM9Ce071022; Wed, 11 Jul 2012 23:22:09 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6BNM95G071020; Wed, 11 Jul 2012 23:22:09 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201207112322.q6BNM95G071020@svn.freebsd.org> From: Christian Brueffer Date: Wed, 11 Jul 2012 23:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238382 - head/sys/cam/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 23:22:10 -0000 Author: brueffer Date: Wed Jul 11 23:22:09 2012 New Revision: 238382 URL: http://svn.freebsd.org/changeset/base/238382 Log: Apply similar same change as in r238379: Renamed the kern.cam.ada.ada_send_ordered sysctl and tunable to kern.cam.ada.send_ordered, more in line with the other da sysctls/tunables. Suggested by: kib Modified: head/sys/cam/ata/ata_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Wed Jul 11 23:18:35 2012 (r238381) +++ head/sys/cam/ata/ata_da.c Wed Jul 11 23:22:09 2012 (r238382) @@ -368,9 +368,9 @@ TUNABLE_INT("kern.cam.ada.retry_count", SYSCTL_INT(_kern_cam_ada, OID_AUTO, default_timeout, CTLFLAG_RW, &ada_default_timeout, 0, "Normal I/O timeout (in seconds)"); TUNABLE_INT("kern.cam.ada.default_timeout", &ada_default_timeout); -SYSCTL_INT(_kern_cam_ada, OID_AUTO, ada_send_ordered, CTLFLAG_RW, +SYSCTL_INT(_kern_cam_ada, OID_AUTO, send_ordered, CTLFLAG_RW, &ada_send_ordered, 0, "Send Ordered Tags"); -TUNABLE_INT("kern.cam.ada.ada_send_ordered", &ada_send_ordered); +TUNABLE_INT("kern.cam.ada.send_ordered", &ada_send_ordered); SYSCTL_INT(_kern_cam_ada, OID_AUTO, spindown_shutdown, CTLFLAG_RW, &ada_spindown_shutdown, 0, "Spin down upon shutdown"); TUNABLE_INT("kern.cam.ada.spindown_shutdown", &ada_spindown_shutdown); From owner-svn-src-head@FreeBSD.ORG Thu Jul 12 02:58:46 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5962B106564A; Thu, 12 Jul 2012 02:58:46 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38F768FC08; Thu, 12 Jul 2012 02:58:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6C2wkZp080642; Thu, 12 Jul 2012 02:58:46 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6C2wjZA080635; Thu, 12 Jul 2012 02:58:45 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207120258.q6C2wjZA080635@svn.freebsd.org> From: Warner Losh Date: Thu, 12 Jul 2012 02:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238389 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 02:58:46 -0000 Author: imp Date: Thu Jul 12 02:58:45 2012 New Revision: 238389 URL: http://svn.freebsd.org/changeset/base/238389 Log: Export the interrupt status vector via soc_data. Set the interrupt priorities in the AIC in the atmelarm driver before attaching the children. Delete redunant copies of the code. Modified: head/sys/arm/at91/at91.c head/sys/arm/at91/at91rm9200.c head/sys/arm/at91/at91sam9260.c head/sys/arm/at91/at91sam9g20.c head/sys/arm/at91/at91sam9x25.c head/sys/arm/at91/at91var.h Modified: head/sys/arm/at91/at91.c ============================================================================== --- head/sys/arm/at91/at91.c Thu Jul 12 02:15:06 2012 (r238388) +++ head/sys/arm/at91/at91.c Thu Jul 12 02:58:45 2012 (r238389) @@ -247,10 +247,12 @@ at91_attach(device_t dev) { struct at91_softc *sc = device_get_softc(dev); const struct pmap_devmap *pdevmap; + int i; at91_softc = sc; sc->sc_st = &at91_bs_tag; sc->sc_sh = AT91_BASE; + sc->sc_aic_sh = AT91_BASE + AT91_SYS_BASE; sc->dev = dev; sc->sc_irq_rman.rm_type = RMAN_ARRAY; @@ -269,13 +271,35 @@ at91_attach(device_t dev) panic("at91_attach: failed to set up memory rman"); } + /* + * Setup the interrupt table. + */ + if (soc_info.soc_data == NULL || soc_info.soc_data->soc_irq_prio == NULL) + panic("Interrupt priority table missing\n"); + for (i = 0; i < 32; i++) { + bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SVR + + i * 4, i); + /* Priority. */ + bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SMR + i * 4, + soc_info.soc_data->soc_irq_prio[i]); + if (i < 8) + bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_EOICR, + 1); + } + + bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SPU, 32); + /* No debug. */ + bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_DCR, 0); + /* Disable and clear all interrupts. */ + bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_IDCR, 0xffffffff); + bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_ICCR, 0xffffffff); /* - * Our device list will be added automatically by the cpu device + * Our device list will be added automatically by the cpu device * e.g. at91rm9200.c when it is identified. To ensure that the * CPU and PMC are attached first any other "identified" devices * call BUS_ADD_CHILD(9) with an "order" of at least 2. - */ + */ bus_generic_probe(dev); bus_generic_attach(dev); Modified: head/sys/arm/at91/at91rm9200.c ============================================================================== --- head/sys/arm/at91/at91rm9200.c Thu Jul 12 02:15:06 2012 (r238388) +++ head/sys/arm/at91/at91rm9200.c Thu Jul 12 02:58:45 2012 (r238389) @@ -183,8 +183,6 @@ at91_attach(device_t dev) { struct at91_pmc_clock *clk; struct at91rm92_softc *sc = device_get_softc(dev); - int i; - struct at91_softc *at91sc = device_get_softc(device_get_parent(dev)); sc->sc_st = at91sc->sc_st; @@ -195,31 +193,6 @@ at91_attach(device_t dev) AT91RM92_SYS_SIZE, &sc->sc_sys_sh) != 0) panic("Enable to map system registers"); - if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91RM92_AIC_BASE, - AT91RM92_AIC_SIZE, &sc->sc_aic_sh) != 0) - panic("Enable to map system registers"); - - /* XXX Hack to tell atmelarm about the AIC */ - at91sc->sc_aic_sh = sc->sc_aic_sh; - - for (i = 0; i < 32; i++) { - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SVR + - i * 4, i); - /* Priority. */ - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SMR + i * 4, - at91_irq_prio[i]); - if (i < 8) - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_EOICR, - 1); - } - - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SPU, 32); - /* No debug. */ - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_DCR, 0); - /* Disable and clear all interrupts. */ - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_IDCR, 0xffffffff); - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_ICCR, 0xffffffff); - /* Disable all interrupts for RTC (0xe24 == RTC_IDR) */ bus_space_write_4(sc->sc_st, sc->sc_sys_sh, 0xe24, 0xffffffff); @@ -283,7 +256,8 @@ DRIVER_MODULE(at91rm920, atmelarm, at91r static struct at91_soc_data soc_data = { .soc_delay = at91_st_delay, - .soc_reset = at91_st_cpu_reset + .soc_reset = at91_st_cpu_reset, + .soc_irq_prio = at91_irq_prio, }; AT91_SOC(AT91_T_RM9200, &soc_data); Modified: head/sys/arm/at91/at91sam9260.c ============================================================================== --- head/sys/arm/at91/at91sam9260.c Thu Jul 12 02:15:06 2012 (r238388) +++ head/sys/arm/at91/at91sam9260.c Thu Jul 12 02:58:45 2012 (r238389) @@ -51,8 +51,6 @@ struct at91sam9_softc { device_t dev; bus_space_tag_t sc_st; bus_space_handle_t sc_sh; - bus_space_handle_t sc_sys_sh; - bus_space_handle_t sc_aic_sh; bus_space_handle_t sc_matrix_sh; }; @@ -184,43 +182,13 @@ at91_attach(device_t dev) { struct at91_pmc_clock *clk; struct at91sam9_softc *sc = device_get_softc(dev); - int i; - struct at91_softc *at91sc = device_get_softc(device_get_parent(dev)); + uint32_t i; sc->sc_st = at91sc->sc_st; sc->sc_sh = at91sc->sc_sh; sc->dev = dev; - if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9260_SYS_BASE, - AT91SAM9260_SYS_SIZE, &sc->sc_sys_sh) != 0) - panic("Enable to map system registers"); - - if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9260_AIC_BASE, - AT91SAM9260_AIC_SIZE, &sc->sc_aic_sh) != 0) - panic("Enable to map system registers"); - - /* XXX Hack to tell atmelarm about the AIC */ - at91sc->sc_aic_sh = sc->sc_aic_sh; - - for (i = 0; i < 32; i++) { - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SVR + - i * 4, i); - /* Priority. */ - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SMR + i * 4, - at91_irq_prio[i]); - if (i < 8) - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_EOICR, - 1); - } - - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SPU, 32); - /* No debug. */ - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_DCR, 0); - /* Disable and clear all interrupts. */ - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_IDCR, 0xffffffff); - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_ICCR, 0xffffffff); - if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9260_MATRIX_BASE, AT91SAM9260_MATRIX_SIZE, &sc->sc_matrix_sh) != 0) @@ -299,7 +267,8 @@ DRIVER_MODULE(at91sam9260, atmelarm, at9 static struct at91_soc_data soc_data = { .soc_delay = at91_pit_delay, - .soc_reset = at91_rst_cpu_reset + .soc_reset = at91_rst_cpu_reset, + .soc_irq_prio = at91_irq_prio, }; AT91_SOC(AT91_T_SAM9260, &soc_data); Modified: head/sys/arm/at91/at91sam9g20.c ============================================================================== --- head/sys/arm/at91/at91sam9g20.c Thu Jul 12 02:15:06 2012 (r238388) +++ head/sys/arm/at91/at91sam9g20.c Thu Jul 12 02:58:45 2012 (r238389) @@ -51,8 +51,6 @@ struct at91sam9_softc { device_t dev; bus_space_tag_t sc_st; bus_space_handle_t sc_sh; - bus_space_handle_t sc_sys_sh; - bus_space_handle_t sc_aic_sh; bus_space_handle_t sc_matrix_sh; }; @@ -191,47 +189,13 @@ at91_attach(device_t dev) { struct at91_pmc_clock *clk; struct at91sam9_softc *sc = device_get_softc(dev); - int i; - struct at91_softc *at91sc = device_get_softc(device_get_parent(dev)); + uint32_t i; sc->sc_st = at91sc->sc_st; sc->sc_sh = at91sc->sc_sh; sc->dev = dev; - /* - * XXX These values work for the RM9200, SAM926[01], and SAM9G20 - * will have to fix this when we want to support anything else. XXX - */ - if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9G20_SYS_BASE, - AT91SAM9G20_SYS_SIZE, &sc->sc_sys_sh) != 0) - panic("Enable to map system registers"); - - if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9G20_AIC_BASE, - AT91SAM9G20_AIC_SIZE, &sc->sc_aic_sh) != 0) - panic("Enable to map system registers"); - - /* XXX Hack to tell atmelarm about the AIC */ - at91sc->sc_aic_sh = sc->sc_aic_sh; - - for (i = 0; i < 32; i++) { - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SVR + - i * 4, i); - /* Priority. */ - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SMR + i * 4, - at91_irq_prio[i]); - if (i < 8) - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_EOICR, - 1); - } - - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SPU, 32); - /* No debug. */ - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_DCR, 0); - /* Disable and clear all interrupts. */ - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_IDCR, 0xffffffff); - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_ICCR, 0xffffffff); - if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9G20_MATRIX_BASE, AT91SAM9G20_MATRIX_SIZE, &sc->sc_matrix_sh) != 0) @@ -301,7 +265,8 @@ DRIVER_MODULE(at91sam, atmelarm, at91sam static struct at91_soc_data soc_data = { .soc_delay = at91_pit_delay, - .soc_reset = at91_rst_cpu_reset + .soc_reset = at91_rst_cpu_reset, + .soc_irq_prio = at91_irq_prio, }; AT91_SOC(AT91_T_SAM9G20, &soc_data); Modified: head/sys/arm/at91/at91sam9x25.c ============================================================================== --- head/sys/arm/at91/at91sam9x25.c Thu Jul 12 02:15:06 2012 (r238388) +++ head/sys/arm/at91/at91sam9x25.c Thu Jul 12 02:58:45 2012 (r238389) @@ -51,8 +51,6 @@ struct at91sam9x25_softc { device_t dev; bus_space_tag_t sc_st; bus_space_handle_t sc_sh; - bus_space_handle_t sc_sys_sh; - bus_space_handle_t sc_aic_sh; }; /* @@ -193,47 +191,12 @@ at91_attach(device_t dev) { struct at91_pmc_clock *clk; struct at91sam9x25_softc *sc = device_get_softc(dev); - int i; - struct at91_softc *at91sc = device_get_softc(device_get_parent(dev)); sc->sc_st = at91sc->sc_st; sc->sc_sh = at91sc->sc_sh; sc->dev = dev; - /* - * XXX These values work for the RM9200, SAM926[01], and SAM9X25 - * will have to fix this when we want to support anything else. XXX - */ - if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9X25_SYS_BASE, - AT91SAM9X25_SYS_SIZE, &sc->sc_sys_sh) != 0) - panic("Enable to map system registers"); - - if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9X25_AIC_BASE, - AT91SAM9X25_AIC_SIZE, &sc->sc_aic_sh) != 0) - panic("Enable to map system registers"); - - /* XXX Hack to tell atmelarm about the AIC */ - at91sc->sc_aic_sh = sc->sc_aic_sh; - - for (i = 0; i < 32; i++) { - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SVR + - i * 4, i); - /* Priority. */ - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SMR + i * 4, - at91_irq_prio[i]); - if (i < 8) - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_EOICR, - 1); - } - - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SPU, 32); - /* No debug. */ - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_DCR, 0); - /* Disable and clear all interrupts. */ - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_IDCR, 0xffffffff); - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_ICCR, 0xffffffff); - /* Update USB device port clock info */ clk = at91_pmc_clock_ref("udpck"); clk->pmc_mask = PMC_SCER_UDP_SAM9; @@ -290,7 +253,8 @@ DRIVER_MODULE(at91sam9x25, atmelarm, at9 static struct at91_soc_data soc_data = { .soc_delay = at91_pit_delay, - .soc_reset = at91_rst_cpu_reset + .soc_reset = at91_rst_cpu_reset, + .soc_irq_prio = at91_irq_prio, }; AT91_SOC_SUB(AT91_T_SAM9X5, AT91_ST_SAM9X25, &soc_data); Modified: head/sys/arm/at91/at91var.h ============================================================================== --- head/sys/arm/at91/at91var.h Thu Jul 12 02:15:06 2012 (r238388) +++ head/sys/arm/at91/at91var.h Thu Jul 12 02:58:45 2012 (r238389) @@ -108,6 +108,7 @@ typedef void (*cpu_reset_t)(void); struct at91_soc_data { DELAY_t soc_delay; cpu_reset_t soc_reset; + const int *soc_irq_prio; }; struct at91_soc_info { From owner-svn-src-head@FreeBSD.ORG Thu Jul 12 04:23:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B09C41065670; Thu, 12 Jul 2012 04:23:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 999258FC0A; Thu, 12 Jul 2012 04:23:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6C4NCc6084400; Thu, 12 Jul 2012 04:23:12 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6C4NCRB084393; Thu, 12 Jul 2012 04:23:12 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207120423.q6C4NCRB084393@svn.freebsd.org> From: Warner Losh Date: Thu, 12 Jul 2012 04:23:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238390 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 04:23:12 -0000 Author: imp Date: Thu Jul 12 04:23:11 2012 New Revision: 238390 URL: http://svn.freebsd.org/changeset/base/238390 Log: Create the children devices for the SoC in atmelarm bus node, not in the identify routine of the CPU. Modified: head/sys/arm/at91/at91.c head/sys/arm/at91/at91rm9200.c head/sys/arm/at91/at91sam9260.c head/sys/arm/at91/at91sam9g20.c head/sys/arm/at91/at91sam9x25.c head/sys/arm/at91/at91var.h Modified: head/sys/arm/at91/at91.c ============================================================================== --- head/sys/arm/at91/at91.c Thu Jul 12 02:58:45 2012 (r238389) +++ head/sys/arm/at91/at91.c Thu Jul 12 04:23:11 2012 (r238390) @@ -242,6 +242,18 @@ at91_identify(driver_t *drv, device_t pa BUS_ADD_CHILD(parent, 0, "atmelarm", 0); } +static void +at91_cpu_add_builtin_children(device_t dev, const struct cpu_devs *walker) +{ + int i; + + for (i = 1; walker->name; i++, walker++) { + at91_add_child(dev, i, walker->name, walker->unit, + walker->mem_base, walker->mem_len, walker->irq0, + walker->irq1, walker->irq2); + } +} + static int at91_attach(device_t dev) { @@ -294,12 +306,10 @@ at91_attach(device_t dev) bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_IDCR, 0xffffffff); bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_ICCR, 0xffffffff); - /* - * Our device list will be added automatically by the cpu device - * e.g. at91rm9200.c when it is identified. To ensure that the - * CPU and PMC are attached first any other "identified" devices - * call BUS_ADD_CHILD(9) with an "order" of at least 2. - */ + /* + * Add this device's children... + */ + at91_cpu_add_builtin_children(dev, soc_info.soc_data->soc_children); bus_generic_probe(dev); bus_generic_attach(dev); Modified: head/sys/arm/at91/at91rm9200.c ============================================================================== --- head/sys/arm/at91/at91rm9200.c Thu Jul 12 02:58:45 2012 (r238389) +++ head/sys/arm/at91/at91rm9200.c Thu Jul 12 04:23:11 2012 (r238390) @@ -137,19 +137,6 @@ static const struct cpu_devs at91_devs[] { 0, 0, 0, 0, 0 } }; -static void -at91_cpu_add_builtin_children(device_t dev) -{ - int i; - const struct cpu_devs *walker; - - for (i = 1, walker = at91_devs; walker->name; i++, walker++) { - at91_add_child(dev, i, walker->name, walker->unit, - walker->mem_base, walker->mem_len, walker->irq0, - walker->irq1, walker->irq2); - } -} - static uint32_t at91_pll_outb(int freq) { @@ -164,10 +151,8 @@ static void at91_identify(driver_t *drv, device_t parent) { - if (at91_cpu_is(AT91_T_RM9200)) { + if (at91_cpu_is(AT91_T_RM9200)) at91_add_child(parent, 0, "at91rm920", 0, 0, 0, -1, 0, 0); - at91_cpu_add_builtin_children(parent); - } } static int @@ -258,6 +243,7 @@ static struct at91_soc_data soc_data = { .soc_delay = at91_st_delay, .soc_reset = at91_st_cpu_reset, .soc_irq_prio = at91_irq_prio, + .soc_children = at91_devs, }; AT91_SOC(AT91_T_RM9200, &soc_data); Modified: head/sys/arm/at91/at91sam9260.c ============================================================================== --- head/sys/arm/at91/at91sam9260.c Thu Jul 12 02:58:45 2012 (r238389) +++ head/sys/arm/at91/at91sam9260.c Thu Jul 12 04:23:11 2012 (r238390) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include struct at91sam9_softc { - device_t dev; bus_space_tag_t sc_st; bus_space_handle_t sc_sh; bus_space_handle_t sc_matrix_sh; @@ -129,19 +128,6 @@ static const struct cpu_devs at91_devs[] { 0, 0, 0, 0, 0 } }; -static void -at91_cpu_add_builtin_children(device_t dev) -{ - int i; - const struct cpu_devs *walker; - - for (i = 1, walker = at91_devs; walker->name; i++, walker++) { - at91_add_child(dev, i, walker->name, walker->unit, - walker->mem_base, walker->mem_len, walker->irq0, - walker->irq1, walker->irq2); - } -} - static uint32_t at91_pll_outa(int freq) { @@ -163,10 +149,8 @@ static void at91_identify(driver_t *drv, device_t parent) { - if (soc_info.type == AT91_T_SAM9260) { + if (soc_info.type == AT91_T_SAM9260) at91_add_child(parent, 0, "at91sam9260", 0, 0, 0, -1, 0, 0); - at91_cpu_add_builtin_children(parent); - } } static int @@ -187,7 +171,6 @@ at91_attach(device_t dev) sc->sc_st = at91sc->sc_st; sc->sc_sh = at91sc->sc_sh; - sc->dev = dev; if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9260_MATRIX_BASE, AT91SAM9260_MATRIX_SIZE, @@ -269,6 +252,7 @@ static struct at91_soc_data soc_data = { .soc_delay = at91_pit_delay, .soc_reset = at91_rst_cpu_reset, .soc_irq_prio = at91_irq_prio, + .soc_children = at91_devs, }; AT91_SOC(AT91_T_SAM9260, &soc_data); Modified: head/sys/arm/at91/at91sam9g20.c ============================================================================== --- head/sys/arm/at91/at91sam9g20.c Thu Jul 12 02:58:45 2012 (r238389) +++ head/sys/arm/at91/at91sam9g20.c Thu Jul 12 04:23:11 2012 (r238390) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include struct at91sam9_softc { - device_t dev; bus_space_tag_t sc_st; bus_space_handle_t sc_sh; bus_space_handle_t sc_matrix_sh; @@ -129,19 +128,6 @@ static const struct cpu_devs at91_devs[] { 0, 0, 0, 0, 0 } }; -static void -at91_cpu_add_builtin_children(device_t dev) -{ - int i; - const struct cpu_devs *walker; - - for (i = 1, walker = at91_devs; walker->name; i++, walker++) { - at91_add_child(dev, i, walker->name, walker->unit, - walker->mem_base, walker->mem_len, walker->irq0, - walker->irq1, walker->irq2); - } -} - static uint32_t at91_pll_outa(int freq) { @@ -170,10 +156,8 @@ static void at91_identify(driver_t *drv, device_t parent) { - if (at91_cpu_is(AT91_T_SAM9G20)) { + if (at91_cpu_is(AT91_T_SAM9G20)) at91_add_child(parent, 0, "at91sam", 9, 0, 0, -1, 0, 0); - at91_cpu_add_builtin_children(parent); - } } static int @@ -194,7 +178,6 @@ at91_attach(device_t dev) sc->sc_st = at91sc->sc_st; sc->sc_sh = at91sc->sc_sh; - sc->dev = dev; if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9G20_MATRIX_BASE, AT91SAM9G20_MATRIX_SIZE, @@ -267,6 +250,7 @@ static struct at91_soc_data soc_data = { .soc_delay = at91_pit_delay, .soc_reset = at91_rst_cpu_reset, .soc_irq_prio = at91_irq_prio, + .soc_childpren = at91_devs, }; AT91_SOC(AT91_T_SAM9G20, &soc_data); Modified: head/sys/arm/at91/at91sam9x25.c ============================================================================== --- head/sys/arm/at91/at91sam9x25.c Thu Jul 12 02:58:45 2012 (r238389) +++ head/sys/arm/at91/at91sam9x25.c Thu Jul 12 04:23:11 2012 (r238390) @@ -48,9 +48,7 @@ __FBSDID("$FreeBSD$"); #include struct at91sam9x25_softc { - device_t dev; - bus_space_tag_t sc_st; - bus_space_handle_t sc_sh; + int filler; }; /* @@ -131,19 +129,6 @@ static const struct cpu_devs at91_devs[] { 0, 0, 0, 0, 0 } }; -static void -at91_cpu_add_builtin_children(device_t dev) -{ - int i; - const struct cpu_devs *walker; - - for (i = 1, walker = at91_devs; walker->name; i++, walker++) { - at91_add_child(dev, i, walker->name, walker->unit, - walker->mem_base, walker->mem_len, walker->irq0, - walker->irq1, walker->irq2); - } -} - static uint32_t at91_pll_outa(int freq) { @@ -172,10 +157,8 @@ static void at91_identify(driver_t *drv, device_t parent) { - if (soc_info.type == AT91_T_SAM9X5 && soc_info.subtype == AT91_ST_SAM9X25) { + if (soc_info.type == AT91_T_SAM9X5 && soc_info.subtype == AT91_ST_SAM9X25) at91_add_child(parent, 0, "at91sam9x25", 0, 0, 0, -1, 0, 0); - at91_cpu_add_builtin_children(parent); - } } static int @@ -190,12 +173,6 @@ static int at91_attach(device_t dev) { struct at91_pmc_clock *clk; - struct at91sam9x25_softc *sc = device_get_softc(dev); - struct at91_softc *at91sc = device_get_softc(device_get_parent(dev)); - - sc->sc_st = at91sc->sc_st; - sc->sc_sh = at91sc->sc_sh; - sc->dev = dev; /* Update USB device port clock info */ clk = at91_pmc_clock_ref("udpck"); @@ -255,6 +232,7 @@ static struct at91_soc_data soc_data = { .soc_delay = at91_pit_delay, .soc_reset = at91_rst_cpu_reset, .soc_irq_prio = at91_irq_prio, + .soc_childpren = at91_devs, }; AT91_SOC_SUB(AT91_T_SAM9X5, AT91_ST_SAM9X25, &soc_data); Modified: head/sys/arm/at91/at91var.h ============================================================================== --- head/sys/arm/at91/at91var.h Thu Jul 12 02:58:45 2012 (r238389) +++ head/sys/arm/at91/at91var.h Thu Jul 12 04:23:11 2012 (r238390) @@ -109,6 +109,7 @@ struct at91_soc_data { DELAY_t soc_delay; cpu_reset_t soc_reset; const int *soc_irq_prio; + const struct cpu_devs *soc_children; }; struct at91_soc_info { From owner-svn-src-head@FreeBSD.ORG Thu Jul 12 06:29:55 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67E68106564A; Thu, 12 Jul 2012 06:29:55 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 539908FC16; Thu, 12 Jul 2012 06:29:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6C6TtvW090339; Thu, 12 Jul 2012 06:29:55 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6C6TtOa090337; Thu, 12 Jul 2012 06:29:55 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201207120629.q6C6TtOa090337@svn.freebsd.org> From: Martin Matuska Date: Thu, 12 Jul 2012 06:29:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238391 - head/cddl/contrib/opensolaris/lib/libzfs/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 06:29:55 -0000 Author: mm Date: Thu Jul 12 06:29:54 2012 New Revision: 238391 URL: http://svn.freebsd.org/changeset/base/238391 Log: Change behavior introduced in r237119 to vendor solution References: https://www.illumos.org/issues/2883 PR: 167905 Obtained from: illumos (issue #2883) MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Thu Jul 12 04:23:11 2012 (r238390) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Thu Jul 12 06:29:54 2012 (r238391) @@ -1484,14 +1484,17 @@ zfs_prop_set(zfs_handle_t *zhp, const ch } /* - * If the dataset's canmount property is being set to noauto, - * or being set to on and the dataset is already mounted, - * then we want to prevent unmounting & remounting it. - */ - do_prefix = !((prop == ZFS_PROP_CANMOUNT) && - (zprop_string_to_index(prop, propval, &idx, - ZFS_TYPE_DATASET) == 0) && (idx == ZFS_CANMOUNT_NOAUTO || - (idx == ZFS_CANMOUNT_ON && zfs_is_mounted(zhp, NULL)))); + * We don't want to unmount & remount the dataset when changing + * its canmount property to 'on' or 'noauto'. We only use + * the changelist logic to unmount when setting canmount=off. + */ + if (prop == ZFS_PROP_CANMOUNT) { + uint64_t idx; + int err = zprop_string_to_index(prop, propval, &idx, + ZFS_TYPE_DATASET); + if (err == 0 && idx != ZFS_CANMOUNT_OFF) + do_prefix = B_FALSE; + } if (do_prefix && (ret = changelist_prefix(cl)) != 0) goto error; From owner-svn-src-head@FreeBSD.ORG Thu Jul 12 06:43:53 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28C3C106572D; Thu, 12 Jul 2012 06:43:51 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) by mx1.freebsd.org (Postfix) with ESMTP id 961AC8FC17; Thu, 12 Jul 2012 06:43:50 +0000 (UTC) Received: from alph.allbsd.org (p2214-ipbf2707funabasi.chiba.ocn.ne.jp [123.225.119.214]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id q6C6hIr8051633 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 12 Jul 2012 15:43:31 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) (authenticated bits=0) by alph.allbsd.org (8.14.5/8.14.5) with ESMTP id q6C6hFbj007308; Thu, 12 Jul 2012 15:43:16 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Thu, 12 Jul 2012 15:43:09 +0900 (JST) Message-Id: <20120712.154309.1565855047300110662.hrs@allbsd.org> To: thompsa@FreeBSD.org From: Hiroki Sato In-Reply-To: References: <20120711195341.GK3599@albert.catwhisker.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 23.4 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Thu_Jul_12_15_43_09_2012_012)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Thu, 12 Jul 2012 15:43:33 +0900 (JST) X-Spam-Status: No, score=-96.8 required=13.0 tests=CONTENT_TYPE_PRESENT, ONLY1HOPDIRECT, RCVD_IN_RP_RNBL, SAMEHELOBY2HOP, USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: adrian@FreeBSD.org, src-committers@FreeBSD.org, current@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org, david@catwhisker.org Subject: Re: svn commit: r238361 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 06:43:53 -0000 ----Security_Multipart(Thu_Jul_12_15_43_09_2012_012)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Andrew Thompson wrote in : th> On 12 July 2012 10:15, Adrian Chadd wrote: th> > Again, that just touched usb. So, how'd that affect non-USB wifi cloning? th> th> I guess cloning is first match wins and usb was incorrectly matching wlan* Yes, a greedier ifname matching rule can unintentionally win regardless of the interface type. -- Hiroki ----Security_Multipart(Thu_Jul_12_15_43_09_2012_012)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEABECAAYFAk/+cf0ACgkQTyzT2CeTzy2LDwCgozmSWQ9KbUr/eh78FBazNZRt d4oAn0jGZuXDJn2kAGqYzdPPSSPHIz3G =PXUn -----END PGP SIGNATURE----- ----Security_Multipart(Thu_Jul_12_15_43_09_2012_012)---- From owner-svn-src-head@FreeBSD.ORG Thu Jul 12 07:34:09 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BC4FE106564A; Thu, 12 Jul 2012 07:34: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 A86088FC0A; Thu, 12 Jul 2012 07:34:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6C7Y9cR093040; Thu, 12 Jul 2012 07:34:09 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6C7Y9FN093038; Thu, 12 Jul 2012 07:34:09 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201207120734.q6C7Y9FN093038@svn.freebsd.org> From: Christian Brueffer Date: Thu, 12 Jul 2012 07:34:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238392 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 07:34:09 -0000 Author: brueffer Date: Thu Jul 12 07:34:09 2012 New Revision: 238392 URL: http://svn.freebsd.org/changeset/base/238392 Log: Document the sysctl/tunable changes in r238379 and r238382. Suggested by: mjacob Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Jul 12 06:29:54 2012 (r238391) +++ head/UPDATING Thu Jul 12 07:34:09 2012 (r238392) @@ -24,6 +24,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20120712: + The following sysctls and tunables have been renamed for consistency + with other variables: + kern.cam.da.da_send_ordered -> kern.cam.da.send_ordered + kern.cam.ada.ada_send_ordered -> kern.cam.ada.send_ordered + 20120628: The sort utility has been replaced with BSD sort. For now, GNU sort is also available as "gnusort" or the default can be set back to From owner-svn-src-head@FreeBSD.ORG Thu Jul 12 07:34:59 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CD42106566C; Thu, 12 Jul 2012 07:34:59 +0000 (UTC) (envelope-from SRS0=T1ve=FN=FreeBSD.org=brueffer@srs.kundenserver.de) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mx1.freebsd.org (Postfix) with ESMTP id F23778FC0A; Thu, 12 Jul 2012 07:34:58 +0000 (UTC) Received: from hd948344f.sedadby.dyn.perspektivbredband.net (hd948344f.sedadby.dyn.perspektivbredband.net [217.72.52.79]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0MKMjK-1SnZEV2eAA-001fsT; Thu, 12 Jul 2012 09:34:58 +0200 Message-ID: <4FFE7E24.9060603@FreeBSD.org> Date: Thu, 12 Jul 2012 09:35:00 +0200 From: Christian Brueffer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201207112322.q6BNM95G071020@svn.freebsd.org> In-Reply-To: <201207112322.q6BNM95G071020@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:KOzRvOJX8YlrzpsSnFC5DDiJReuVIqliStW0tI77j1P 3OSueC/YU5zIlm5cWdK5S968r1uRlpHtw+IRxhwu/7taLuCkrX SlWsbGEo2ISFj24qrzmt84W9cyawIGyWMEBZhJ1NOA8/lrUt2y u9NLDL6F59zWM7PZbHoID5r8se4i+b9fVNsT4O6QJx7Oi7Jj4m tWpa5e9MAY9ICVTApk4W6uNmwVr4xFdspkV0CmdZpDJRd1mxGQ 6LFdHE1UQX11vmpdjr61eJYPJoZ1rh6FCvpJxA+h3xw65uoVXJ FDwDHHrMJVYYODHP/AUMuC1Z23eZfqN8Yobc7mxZTSSEicm/8x 9gyr+UcOUT5ESTr99rmlGzhVHdFKV8hSbuxz1kGofXsP+Dp1hN 3xXmylV+ClYKg== Cc: Subject: Re: svn commit: r238382 - head/sys/cam/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 07:34:59 -0000 On 7/12/12 1:22 , Christian Brueffer wrote: > Author: brueffer > Date: Wed Jul 11 23:22:09 2012 > New Revision: 238382 > URL: http://svn.freebsd.org/changeset/base/238382 > > Log: > Apply similar same change as in r238379: > > Renamed the kern.cam.ada.ada_send_ordered sysctl and tunable to > kern.cam.ada.send_ordered, more in line with the other da sysctls/tunables. > > Suggested by: kib Sorry, this should have said mav, not kib. Chris From owner-svn-src-head@FreeBSD.ORG Thu Jul 12 10:09:35 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EA931065672; Thu, 12 Jul 2012 10:09:35 +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 F3D858FC1E; Thu, 12 Jul 2012 10:09:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6CA9Yhi099451; Thu, 12 Jul 2012 10:09:34 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6CA9YaN099448; Thu, 12 Jul 2012 10:09:34 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201207121009.q6CA9YaN099448@svn.freebsd.org> From: Christian Brueffer Date: Thu, 12 Jul 2012 10:09:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238393 - in head/sys: cam/ata sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 10:09:35 -0000 Author: brueffer Date: Thu Jul 12 10:09:34 2012 New Revision: 238393 URL: http://svn.freebsd.org/changeset/base/238393 Log: Add and utilize defines for the ATA device register. PR: 169764 Submitted by: Steven Hartland Reviewed by: mav MFC after: 2 weeks Modified: head/sys/cam/ata/ata_all.c head/sys/sys/ata.h Modified: head/sys/cam/ata/ata_all.c ============================================================================== --- head/sys/cam/ata/ata_all.c Thu Jul 12 07:34:09 2012 (r238392) +++ head/sys/cam/ata/ata_all.c Thu Jul 12 10:09:34 2012 (r238393) @@ -359,7 +359,7 @@ ata_28bit_cmd(struct ccb_ataio *ataio, u ataio->cmd.lba_low = lba; ataio->cmd.lba_mid = lba >> 8; ataio->cmd.lba_high = lba >> 16; - ataio->cmd.device = 0x40 | ((lba >> 24) & 0x0f); + ataio->cmd.device = ATA_DEV_LBA | ((lba >> 24) & 0x0f); ataio->cmd.sector_count = sector_count; } @@ -384,7 +384,7 @@ ata_48bit_cmd(struct ccb_ataio *ataio, u ataio->cmd.lba_low = lba; ataio->cmd.lba_mid = lba >> 8; ataio->cmd.lba_high = lba >> 16; - ataio->cmd.device = 0x40; + ataio->cmd.device = ATA_DEV_LBA; ataio->cmd.lba_low_exp = lba >> 24; ataio->cmd.lba_mid_exp = lba >> 32; ataio->cmd.lba_high_exp = lba >> 40; @@ -404,7 +404,7 @@ ata_ncq_cmd(struct ccb_ataio *ataio, uin ataio->cmd.lba_low = lba; ataio->cmd.lba_mid = lba >> 8; ataio->cmd.lba_high = lba >> 16; - ataio->cmd.device = 0x40; + ataio->cmd.device = ATA_DEV_LBA; ataio->cmd.lba_low_exp = lba >> 24; ataio->cmd.lba_mid_exp = lba >> 32; ataio->cmd.lba_high_exp = lba >> 40; Modified: head/sys/sys/ata.h ============================================================================== --- head/sys/sys/ata.h Thu Jul 12 07:34:09 2012 (r238392) +++ head/sys/sys/ata.h Thu Jul 12 10:09:34 2012 (r238393) @@ -261,6 +261,20 @@ struct ata_params { /*255*/ u_int16_t integrity; } __packed; +/* + * ATA Device Register + * + * bit 7 Obsolete (was 1 in early ATA specs) + * bit 6 Sets LBA/CHS mode. 1=LBA, 0=CHS + * bit 5 Obsolete (was 1 in early ATA specs) + * bit 4 1 = Slave Drive, 0 = Master Drive + * bit 3-0 In LBA mode, 27-24 of address. In CHS mode, head number +*/ + +#define ATA_DEV_MASTER 0x00 +#define ATA_DEV_SLAVE 0x10 +#define ATA_DEV_LBA 0x40 + /* ATA transfer modes */ #define ATA_MODE_MASK 0x0f From owner-svn-src-head@FreeBSD.ORG Thu Jul 12 12:11:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B16EE1065675; Thu, 12 Jul 2012 12:11:32 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C56C8FC0C; Thu, 12 Jul 2012 12:11:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6CCBWlh006486; Thu, 12 Jul 2012 12:11:32 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6CCBWTD006484; Thu, 12 Jul 2012 12:11:32 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201207121211.q6CCBWTD006484@svn.freebsd.org> From: Gavin Atkinson Date: Thu, 12 Jul 2012 12:11:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238396 - head/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 12:11:32 -0000 Author: gavin Date: Thu Jul 12 12:11:32 2012 New Revision: 238396 URL: http://svn.freebsd.org/changeset/base/238396 Log: Update for new core team. Looks like this file was not updated two years ago for the last core team. MFC after: 3 days Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot ============================================================================== --- head/share/misc/organization.dot Thu Jul 12 11:02:57 2012 (r238395) +++ head/share/misc/organization.dot Thu Jul 12 12:11:32 2012 (r238396) @@ -25,7 +25,7 @@ _misc [label="Miscellaneous Hats"] # Development teams go here alphabetically sorted -core [label="Core Team\ncore@FreeBSD.org\nwilko, brooks, keramida, imp,\ngnn, wes, hrs, murray,\nrwatson"] +core [label="Core Team\ncore@FreeBSD.org\ntabthorpe, gavin, jhb, kib,\ntheraven, attilio, hrs,\npeter, miwi"] coresecretary [label="Core Team Secretary\ncore-secretary@FreeBSD.org\ngavin"] doccommitters [label="Doc/www Committers\ndoc-committers@FreeBSD.org"] doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\ngjb, blackend,\ngabor, hrs"] From owner-svn-src-head@FreeBSD.ORG Thu Jul 12 12:35:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C2503106566B; Thu, 12 Jul 2012 12:35:04 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 90B538FC17; Thu, 12 Jul 2012 12:35:04 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E2510B926; Thu, 12 Jul 2012 08:35:03 -0400 (EDT) From: John Baldwin To: Adrian Chadd Date: Thu, 12 Jul 2012 07:42:58 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201207111210.q6BCAEFk042562@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201207120742.58379.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 12 Jul 2012 08:35:04 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238364 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 12:35:04 -0000 On Wednesday, July 11, 2012 6:17:07 pm Adrian Chadd wrote: > .. hm, interesting. I didn't catch this. The tinderbox was complaining for over a day. A make tinderbox showed these errors as well. > Maybe I should whack the ATH_KTR_* things outside of the #ifdef ATH_DEBUG .. ? Feel free to fix it that way if you wish. I had guessed as to what you wanted to happen since you had moved them inside ATH_DEBUG. My goal was to get universe building again. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Thu Jul 12 13:45:59 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7925E1065792; Thu, 12 Jul 2012 13:45:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 592D68FC1C; Thu, 12 Jul 2012 13:45:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6CDjxpk010391; Thu, 12 Jul 2012 13:45:59 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6CDjxQK010384; Thu, 12 Jul 2012 13:45:59 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207121345.q6CDjxQK010384@svn.freebsd.org> From: Warner Losh Date: Thu, 12 Jul 2012 13:45:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238397 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 13:45:59 -0000 Author: imp Date: Thu Jul 12 13:45:58 2012 New Revision: 238397 URL: http://svn.freebsd.org/changeset/base/238397 Log: Complete the transition away from newbus to populate the children to the linker set of CPU modules. The newbus method, although clever, had many flaws: it didn't really support multiple SoC, many of the comments about order were just wrong, and it did a few things far too late to be useful. delay and cpu_reset now work much earlier in the boot process. Modified: head/sys/arm/at91/at91.c head/sys/arm/at91/at91rm9200.c head/sys/arm/at91/at91sam9260.c head/sys/arm/at91/at91sam9g20.c head/sys/arm/at91/at91sam9x25.c head/sys/arm/at91/at91var.h Modified: head/sys/arm/at91/at91.c ============================================================================== --- head/sys/arm/at91/at91.c Thu Jul 12 12:11:32 2012 (r238396) +++ head/sys/arm/at91/at91.c Thu Jul 12 13:45:58 2012 (r238397) @@ -310,6 +310,7 @@ at91_attach(device_t dev) * Add this device's children... */ at91_cpu_add_builtin_children(dev, soc_info.soc_data->soc_children); + soc_info.soc_data->soc_clock_init(); bus_generic_probe(dev); bus_generic_attach(dev); Modified: head/sys/arm/at91/at91rm9200.c ============================================================================== --- head/sys/arm/at91/at91rm9200.c Thu Jul 12 12:11:32 2012 (r238396) +++ head/sys/arm/at91/at91rm9200.c Thu Jul 12 13:45:58 2012 (r238397) @@ -46,14 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include - -struct at91rm92_softc { - device_t dev; - bus_space_tag_t sc_st; - bus_space_handle_t sc_sh; - bus_space_handle_t sc_sys_sh; - bus_space_handle_t sc_aic_sh; -}; /* * Standard priority levels for the system. 0 is lowest and 7 is highest. * These values are the ones Atmel uses for its Linux port, which differ @@ -147,42 +139,19 @@ at91_pll_outb(int freq) return (0x8000); } -static void -at91_identify(driver_t *drv, device_t parent) -{ - - if (at91_cpu_is(AT91_T_RM9200)) - at91_add_child(parent, 0, "at91rm920", 0, 0, 0, -1, 0, 0); -} - -static int -at91_probe(device_t dev) -{ - - device_set_desc(dev, soc_info.name); - return (0); -} - -static int -at91_attach(device_t dev) -{ - struct at91_pmc_clock *clk; - struct at91rm92_softc *sc = device_get_softc(dev); - struct at91_softc *at91sc = device_get_softc(device_get_parent(dev)); - - sc->sc_st = at91sc->sc_st; - sc->sc_sh = at91sc->sc_sh; - sc->dev = dev; - - if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91RM92_SYS_BASE, - AT91RM92_SYS_SIZE, &sc->sc_sys_sh) != 0) - panic("Enable to map system registers"); - +#if 0 +/* -- XXX are these needed? */ /* Disable all interrupts for RTC (0xe24 == RTC_IDR) */ bus_space_write_4(sc->sc_st, sc->sc_sys_sh, 0xe24, 0xffffffff); /* Disable all interrupts for the SDRAM controller */ bus_space_write_4(sc->sc_st, sc->sc_sys_sh, 0xfa8, 0xffffffff); +#endif + +static void +at91_clock_init(void) +{ + struct at91_pmc_clock *clk; /* Update USB device port clock info */ clk = at91_pmc_clock_ref("udpck"); @@ -218,30 +187,12 @@ at91_attach(device_t dev) clk->pll_div_mask = RM9200_PLL_B_DIV_MASK; clk->set_outb = at91_pll_outb; at91_pmc_clock_deref(clk); - - return (0); } -static device_method_t at91_methods[] = { - DEVMETHOD(device_probe, at91_probe), - DEVMETHOD(device_attach, at91_attach), - DEVMETHOD(device_identify, at91_identify), - {0, 0}, -}; - -static driver_t at91rm92_driver = { - "at91rm920", - at91_methods, - sizeof(struct at91rm92_softc), -}; - -static devclass_t at91rm92_devclass; - -DRIVER_MODULE(at91rm920, atmelarm, at91rm92_driver, at91rm92_devclass, 0, 0); - static struct at91_soc_data soc_data = { .soc_delay = at91_st_delay, .soc_reset = at91_st_cpu_reset, + .soc_clock_init = at91_clock_init, .soc_irq_prio = at91_irq_prio, .soc_children = at91_devs, }; Modified: head/sys/arm/at91/at91sam9260.c ============================================================================== --- head/sys/arm/at91/at91sam9260.c Thu Jul 12 12:11:32 2012 (r238396) +++ head/sys/arm/at91/at91sam9260.c Thu Jul 12 13:45:58 2012 (r238397) @@ -47,12 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include -struct at91sam9_softc { - bus_space_tag_t sc_st; - bus_space_handle_t sc_sh; - bus_space_handle_t sc_matrix_sh; -}; - /* * Standard priority levels for the system. 0 is lowest and 7 is highest. * These values are the ones Atmel uses for its Linux port @@ -146,43 +140,9 @@ at91_pll_outb(int freq) } static void -at91_identify(driver_t *drv, device_t parent) -{ - - if (soc_info.type == AT91_T_SAM9260) - at91_add_child(parent, 0, "at91sam9260", 0, 0, 0, -1, 0, 0); -} - -static int -at91_probe(device_t dev) -{ - - device_set_desc(dev, soc_info.name); - return (0); -} - -static int -at91_attach(device_t dev) +at91_clock_init(void) { struct at91_pmc_clock *clk; - struct at91sam9_softc *sc = device_get_softc(dev); - struct at91_softc *at91sc = device_get_softc(device_get_parent(dev)); - uint32_t i; - - sc->sc_st = at91sc->sc_st; - sc->sc_sh = at91sc->sc_sh; - - if (bus_space_subregion(sc->sc_st, sc->sc_sh, - AT91SAM9260_MATRIX_BASE, AT91SAM9260_MATRIX_SIZE, - &sc->sc_matrix_sh) != 0) - panic("Enable to map matrix registers"); - - /* activate NAND */ - i = bus_space_read_4(sc->sc_st, sc->sc_matrix_sh, - AT91SAM9260_EBICSA); - bus_space_write_4(sc->sc_st, sc->sc_matrix_sh, - AT91SAM9260_EBICSA, - i | AT91_MATRIX_EBI_CS3A_SMC_SMARTMEDIA); /* Update USB device port clock info */ clk = at91_pmc_clock_ref("udpck"); @@ -227,30 +187,12 @@ at91_attach(device_t dev) clk->pll_div_mask = SAM9260_PLL_B_DIV_MASK; clk->set_outb = at91_pll_outb; at91_pmc_clock_deref(clk); - return (0); } -static device_method_t at91sam9260_methods[] = { - DEVMETHOD(device_probe, at91_probe), - DEVMETHOD(device_attach, at91_attach), - DEVMETHOD(device_identify, at91_identify), - DEVMETHOD_END -}; - -static driver_t at91sam9260_driver = { - "at91sam9260", - at91sam9260_methods, - sizeof(struct at91sam9_softc), -}; - -static devclass_t at91sam9260_devclass; - -DRIVER_MODULE(at91sam9260, atmelarm, at91sam9260_driver, at91sam9260_devclass, - NULL, NULL); - static struct at91_soc_data soc_data = { .soc_delay = at91_pit_delay, .soc_reset = at91_rst_cpu_reset, + .soc_clock_init = at91_clock_init, .soc_irq_prio = at91_irq_prio, .soc_children = at91_devs, }; Modified: head/sys/arm/at91/at91sam9g20.c ============================================================================== --- head/sys/arm/at91/at91sam9g20.c Thu Jul 12 12:11:32 2012 (r238396) +++ head/sys/arm/at91/at91sam9g20.c Thu Jul 12 13:45:58 2012 (r238397) @@ -47,12 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include -struct at91sam9_softc { - bus_space_tag_t sc_st; - bus_space_handle_t sc_sh; - bus_space_handle_t sc_matrix_sh; -}; - /* * Standard priority levels for the system. 0 is lowest and 7 is highest. * These values are the ones Atmel uses for its Linux port @@ -153,44 +147,9 @@ at91_pll_outb(int freq) } static void -at91_identify(driver_t *drv, device_t parent) -{ - - if (at91_cpu_is(AT91_T_SAM9G20)) - at91_add_child(parent, 0, "at91sam", 9, 0, 0, -1, 0, 0); -} - -static int -at91_probe(device_t dev) -{ - - device_set_desc(dev, soc_info.name); - return (0); -} - -static int -at91_attach(device_t dev) +at91_clock_init(void) { struct at91_pmc_clock *clk; - struct at91sam9_softc *sc = device_get_softc(dev); - struct at91_softc *at91sc = device_get_softc(device_get_parent(dev)); - uint32_t i; - - sc->sc_st = at91sc->sc_st; - sc->sc_sh = at91sc->sc_sh; - - if (bus_space_subregion(sc->sc_st, sc->sc_sh, - AT91SAM9G20_MATRIX_BASE, AT91SAM9G20_MATRIX_SIZE, - &sc->sc_matrix_sh) != 0) - panic("Enable to map matrix registers"); - - /* activate NAND*/ - i = bus_space_read_4(sc->sc_st, sc->sc_matrix_sh, - AT91SAM9G20_EBICSA); - bus_space_write_4(sc->sc_st, sc->sc_matrix_sh, - AT91SAM9G20_EBICSA, - i | AT91_MATRIX_EBI_CS3A_SMC_SMARTMEDIA); - /* Update USB device port clock info */ clk = at91_pmc_clock_ref("udpck"); @@ -226,31 +185,14 @@ at91_attach(device_t dev) clk->pll_div_mask = SAM9G20_PLL_B_DIV_MASK; clk->set_outb = at91_pll_outb; at91_pmc_clock_deref(clk); - return (0); } -static device_method_t at91_methods[] = { - DEVMETHOD(device_probe, at91_probe), - DEVMETHOD(device_attach, at91_attach), - DEVMETHOD(device_identify, at91_identify), - {0, 0}, -}; - -static driver_t at91sam9_driver = { - "at91sam", - at91_methods, - sizeof(struct at91sam9_softc), -}; - -static devclass_t at91sam9_devclass; - -DRIVER_MODULE(at91sam, atmelarm, at91sam9_driver, at91sam9_devclass, 0, 0); - static struct at91_soc_data soc_data = { .soc_delay = at91_pit_delay, .soc_reset = at91_rst_cpu_reset, + .soc_clock_init = at91_clock_init, .soc_irq_prio = at91_irq_prio, - .soc_childpren = at91_devs, + .soc_children = at91_devs, }; AT91_SOC(AT91_T_SAM9G20, &soc_data); Modified: head/sys/arm/at91/at91sam9x25.c ============================================================================== --- head/sys/arm/at91/at91sam9x25.c Thu Jul 12 12:11:32 2012 (r238396) +++ head/sys/arm/at91/at91sam9x25.c Thu Jul 12 13:45:58 2012 (r238397) @@ -47,10 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include -struct at91sam9x25_softc { - int filler; -}; - /* * Standard priority levels for the system. 0 is lowest and 7 is highest. * These values are the ones Atmel uses for its Linux port @@ -154,23 +150,7 @@ at91_pll_outb(int freq) } static void -at91_identify(driver_t *drv, device_t parent) -{ - - if (soc_info.type == AT91_T_SAM9X5 && soc_info.subtype == AT91_ST_SAM9X25) - at91_add_child(parent, 0, "at91sam9x25", 0, 0, 0, -1, 0, 0); -} - -static int -at91_probe(device_t dev) -{ - - device_set_desc(dev, "AT91SAM9X25"); - return (0); -} - -static int -at91_attach(device_t dev) +at91_clock_init(void) { struct at91_pmc_clock *clk; @@ -208,31 +188,14 @@ at91_attach(device_t dev) clk->pll_div_mask = SAM9X25_PLL_B_DIV_MASK; clk->set_outb = at91_pll_outb; at91_pmc_clock_deref(clk); - return (0); } -static device_method_t at91sam9x25_methods[] = { - DEVMETHOD(device_probe, at91_probe), - DEVMETHOD(device_attach, at91_attach), - DEVMETHOD(device_identify, at91_identify), - {0, 0}, -}; - -static driver_t at91sam9x25_driver = { - "at91sam9x25", - at91sam9x25_methods, - sizeof(struct at91sam9x25_softc), -}; - -static devclass_t at91sam9x25_devclass; - -DRIVER_MODULE(at91sam9x25, atmelarm, at91sam9x25_driver, at91sam9x25_devclass, 0, 0); - static struct at91_soc_data soc_data = { .soc_delay = at91_pit_delay, .soc_reset = at91_rst_cpu_reset, + .soc_clock_init = at91_clock_init, .soc_irq_prio = at91_irq_prio, - .soc_childpren = at91_devs, + .soc_children = at91_devs, }; AT91_SOC_SUB(AT91_T_SAM9X5, AT91_ST_SAM9X25, &soc_data); Modified: head/sys/arm/at91/at91var.h ============================================================================== --- head/sys/arm/at91/at91var.h Thu Jul 12 12:11:32 2012 (r238396) +++ head/sys/arm/at91/at91var.h Thu Jul 12 13:45:58 2012 (r238397) @@ -104,10 +104,12 @@ enum at91_soc_family { typedef void (*DELAY_t)(int); typedef void (*cpu_reset_t)(void); +typedef void (*clk_init_t)(void); struct at91_soc_data { DELAY_t soc_delay; cpu_reset_t soc_reset; + clk_init_t soc_clock_init; const int *soc_irq_prio; const struct cpu_devs *soc_children; }; From owner-svn-src-head@FreeBSD.ORG Thu Jul 12 13:54:25 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58829106566C; Thu, 12 Jul 2012 13:54:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 443F28FC0C; Thu, 12 Jul 2012 13:54:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6CDsPxR010765; Thu, 12 Jul 2012 13:54:25 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6CDsPme010763; Thu, 12 Jul 2012 13:54:25 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207121354.q6CDsPme010763@svn.freebsd.org> From: Warner Losh Date: Thu, 12 Jul 2012 13:54:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238398 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 13:54:25 -0000 Author: imp Date: Thu Jul 12 13:54:24 2012 New Revision: 238398 URL: http://svn.freebsd.org/changeset/base/238398 Log: Fix whitespace divot. Modified: head/sys/arm/at91/at91.c Modified: head/sys/arm/at91/at91.c ============================================================================== --- head/sys/arm/at91/at91.c Thu Jul 12 13:45:58 2012 (r238397) +++ head/sys/arm/at91/at91.c Thu Jul 12 13:54:24 2012 (r238398) @@ -310,7 +310,7 @@ at91_attach(device_t dev) * Add this device's children... */ at91_cpu_add_builtin_children(dev, soc_info.soc_data->soc_children); - soc_info.soc_data->soc_clock_init(); + soc_info.soc_data->soc_clock_init(); bus_generic_probe(dev); bus_generic_attach(dev); From owner-svn-src-head@FreeBSD.ORG Thu Jul 12 15:20:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9F3B1065672; Thu, 12 Jul 2012 15:20:20 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B61F88FC08; Thu, 12 Jul 2012 15:20:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6CFKKF9014455; Thu, 12 Jul 2012 15:20:20 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6CFKKPe014453; Thu, 12 Jul 2012 15:20:20 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201207121520.q6CFKKPe014453@svn.freebsd.org> From: Eitan Adler Date: Thu, 12 Jul 2012 15:20:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238399 - head/sbin/mount X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 15:20:20 -0000 Author: eadler Date: Thu Jul 12 15:20:20 2012 New Revision: 238399 URL: http://svn.freebsd.org/changeset/base/238399 Log: Document the behavior of mount with failok specified. PR: docs/163742 Submitted by: gcooper Discussion by: gcooper Discussion by: bjk Approved by: gabor MFC after: 3 days Modified: head/sbin/mount/mount.8 Modified: head/sbin/mount/mount.8 ============================================================================== --- head/sbin/mount/mount.8 Thu Jul 12 13:54:24 2012 (r238398) +++ head/sbin/mount/mount.8 Thu Jul 12 15:20:20 2012 (r238399) @@ -28,7 +28,7 @@ .\" @(#)mount.8 8.8 (Berkeley) 6/16/94 .\" $FreeBSD$ .\" -.Dd June 6, 2011 +.Dd July 12, 2012 .Dt MOUNT 8 .Os .Sh NAME @@ -145,6 +145,11 @@ When used with the .Fl u flag, this is the same as specifying the options currently in effect for the mounted file system. +.It Cm failok +If this option is specified, +.Nm +will return 0 even if an error occurs +during the mount of the filesystem. .It Cm force The same as .Fl f ; From owner-svn-src-head@FreeBSD.ORG Thu Jul 12 19:11:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8B441106566C; Thu, 12 Jul 2012 19:11:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 76EAF8FC18; Thu, 12 Jul 2012 19:11:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6CJBcDA024173; Thu, 12 Jul 2012 19:11:38 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6CJBcnL024169; Thu, 12 Jul 2012 19:11:38 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207121911.q6CJBcnL024169@svn.freebsd.org> From: Warner Losh Date: Thu, 12 Jul 2012 19:11:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238403 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 19:11:38 -0000 Author: imp Date: Thu Jul 12 19:11:37 2012 New Revision: 238403 URL: http://svn.freebsd.org/changeset/base/238403 Log: Remember where we found the DBGU and use that for our console. Modified: head/sys/arm/at91/at91_machdep.c head/sys/arm/at91/at91var.h head/sys/arm/at91/uart_cpu_at91rm9200usart.c Modified: head/sys/arm/at91/at91_machdep.c ============================================================================== --- head/sys/arm/at91/at91_machdep.c Thu Jul 12 16:47:18 2012 (r238402) +++ head/sys/arm/at91/at91_machdep.c Thu Jul 12 19:11:37 2012 (r238403) @@ -402,6 +402,7 @@ at91_try_id(uint32_t dbgu_base) * try to get the matching CPU support. */ soc_info.soc_data = at91_match_soc(soc_info.type, soc_info.subtype); + soc_info.dbgu_base = AT91_BASE + dbgu_base; return (1); } Modified: head/sys/arm/at91/at91var.h ============================================================================== --- head/sys/arm/at91/at91var.h Thu Jul 12 16:47:18 2012 (r238402) +++ head/sys/arm/at91/at91var.h Thu Jul 12 19:11:37 2012 (r238403) @@ -121,6 +121,7 @@ struct at91_soc_info { uint32_t cidr; uint32_t exid; char name[AT91_SOC_NAME_MAX]; + uint32_t dbgu_base; struct at91_soc_data *soc_data; }; Modified: head/sys/arm/at91/uart_cpu_at91rm9200usart.c ============================================================================== --- head/sys/arm/at91/uart_cpu_at91rm9200usart.c Thu Jul 12 16:47:18 2012 (r238402) +++ head/sys/arm/at91/uart_cpu_at91rm9200usart.c Thu Jul 12 19:11:37 2012 (r238403) @@ -71,9 +71,10 @@ uart_cpu_getdev(int devtype, struct uart di->bas.bst = &at91_bs_tag; /* * XXX: Not pretty, but will work because we map the needed addresses - * early. + * early. At least we probed this so that the console will work on + * all flavors of Atmel we can detect. */ - di->bas.bsh = AT91_BASE + AT91RM92_DBGU_BASE; + di->bas.bsh = soc_info.dbgu_base; di->baudrate = 115200; di->bas.regshft = 0; di->bas.rclk = 0; From owner-svn-src-head@FreeBSD.ORG Thu Jul 12 19:15:39 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2AF4A1065670; Thu, 12 Jul 2012 19:15:39 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 15F008FC12; Thu, 12 Jul 2012 19:15:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6CJFcv4024387; Thu, 12 Jul 2012 19:15:38 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6CJFcNc024384; Thu, 12 Jul 2012 19:15:38 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207121915.q6CJFcNc024384@svn.freebsd.org> From: Warner Losh Date: Thu, 12 Jul 2012 19:15:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238404 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 19:15:39 -0000 Author: imp Date: Thu Jul 12 19:15:38 2012 New Revision: 238404 URL: http://svn.freebsd.org/changeset/base/238404 Log: This file is no longer AT91RM9200 specific, but now is generic to all Atmel AT91 SoC's we support. Rename to reflect that. Added: head/sys/arm/at91/uart_cpu_at91usart.c - copied, changed from r238403, head/sys/arm/at91/uart_cpu_at91rm9200usart.c Deleted: head/sys/arm/at91/uart_cpu_at91rm9200usart.c Modified: head/sys/arm/at91/files.at91 Modified: head/sys/arm/at91/files.at91 ============================================================================== --- head/sys/arm/at91/files.at91 Thu Jul 12 19:11:37 2012 (r238403) +++ head/sys/arm/at91/files.at91 Thu Jul 12 19:15:38 2012 (r238404) @@ -22,7 +22,7 @@ arm/at91/at91_wdt.c optional at91_wdt arm/at91/if_ate.c optional ate arm/at91/if_macb.c optional macb arm/at91/uart_bus_at91usart.c optional uart -arm/at91/uart_cpu_at91rm9200usart.c optional uart +arm/at91/uart_cpu_at91usart.c optional uart arm/at91/uart_dev_at91usart.c optional uart # # All the "systems on a chip" we support Copied and modified: head/sys/arm/at91/uart_cpu_at91usart.c (from r238403, head/sys/arm/at91/uart_cpu_at91rm9200usart.c) ============================================================================== --- head/sys/arm/at91/uart_cpu_at91rm9200usart.c Thu Jul 12 19:11:37 2012 (r238403, copy source) +++ head/sys/arm/at91/uart_cpu_at91usart.c Thu Jul 12 19:15:38 2012 (r238404) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include bus_space_tag_t uart_bus_space_io; From owner-svn-src-head@FreeBSD.ORG Thu Jul 12 19:30:56 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D923106566C; Thu, 12 Jul 2012 19:30:56 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7FCCA8FC08; Thu, 12 Jul 2012 19:30:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6CJUu26025040; Thu, 12 Jul 2012 19:30:56 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6CJUu97025034; Thu, 12 Jul 2012 19:30:56 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201207121930.q6CJUu97025034@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 12 Jul 2012 19:30:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238405 - in head: . crypto/openssl crypto/openssl/apps crypto/openssl/apps/demoCA crypto/openssl/bugs crypto/openssl/certs/demo crypto/openssl/crypto crypto/openssl/crypto/aes crypto/o... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 19:30:56 -0000 Author: jkim Date: Thu Jul 12 19:30:53 2012 New Revision: 238405 URL: http://svn.freebsd.org/changeset/base/238405 Log: Merge OpenSSL 1.0.1c. Approved by: benl (maintainer) Added: head/crypto/openssl/apps/genpkey.c - copied unchanged from r238402, vendor-crypto/openssl/dist/apps/genpkey.c head/crypto/openssl/apps/pkey.c - copied unchanged from r238402, vendor-crypto/openssl/dist/apps/pkey.c head/crypto/openssl/apps/pkeyparam.c - copied unchanged from r238402, vendor-crypto/openssl/dist/apps/pkeyparam.c head/crypto/openssl/apps/pkeyutl.c - copied unchanged from r238402, vendor-crypto/openssl/dist/apps/pkeyutl.c head/crypto/openssl/apps/srp.c - copied unchanged from r238402, vendor-crypto/openssl/dist/apps/srp.c head/crypto/openssl/apps/ts.c - copied unchanged from r238402, vendor-crypto/openssl/dist/apps/ts.c head/crypto/openssl/apps/tsget - copied unchanged from r238402, vendor-crypto/openssl/dist/apps/tsget head/crypto/openssl/crypto/aes/aes_x86core.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/aes/aes_x86core.c head/crypto/openssl/crypto/aes/asm/aes-armv4.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/aes/asm/aes-armv4.pl head/crypto/openssl/crypto/aes/asm/aes-mips.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/aes/asm/aes-mips.pl head/crypto/openssl/crypto/aes/asm/aes-parisc.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/aes/asm/aes-parisc.pl head/crypto/openssl/crypto/aes/asm/aes-ppc.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/aes/asm/aes-ppc.pl head/crypto/openssl/crypto/aes/asm/aes-s390x.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/aes/asm/aes-s390x.pl head/crypto/openssl/crypto/aes/asm/aes-sparcv9.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/aes/asm/aes-sparcv9.pl head/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/aes/asm/aesni-sha1-x86_64.pl head/crypto/openssl/crypto/aes/asm/aesni-x86.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/aes/asm/aesni-x86.pl head/crypto/openssl/crypto/aes/asm/aesni-x86_64.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/aes/asm/aesni-x86_64.pl head/crypto/openssl/crypto/aes/asm/bsaes-x86_64.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/aes/asm/bsaes-x86_64.pl head/crypto/openssl/crypto/aes/asm/vpaes-x86.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/aes/asm/vpaes-x86.pl head/crypto/openssl/crypto/aes/asm/vpaes-x86_64.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/aes/asm/vpaes-x86_64.pl head/crypto/openssl/crypto/arm_arch.h - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/arm_arch.h head/crypto/openssl/crypto/armcap.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/armcap.c head/crypto/openssl/crypto/armv4cpuid.S - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/armv4cpuid.S head/crypto/openssl/crypto/asn1/ameth_lib.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/asn1/ameth_lib.c head/crypto/openssl/crypto/asn1/asn1_locl.h - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/asn1/asn1_locl.h head/crypto/openssl/crypto/asn1/bio_asn1.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/asn1/bio_asn1.c head/crypto/openssl/crypto/asn1/bio_ndef.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/asn1/bio_ndef.c head/crypto/openssl/crypto/asn1/x_nx509.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/asn1/x_nx509.c head/crypto/openssl/crypto/bn/asm/armv4-gf2m.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/bn/asm/armv4-gf2m.pl head/crypto/openssl/crypto/bn/asm/armv4-mont.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/bn/asm/armv4-mont.pl head/crypto/openssl/crypto/bn/asm/ia64-mont.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/bn/asm/ia64-mont.pl head/crypto/openssl/crypto/bn/asm/mips-mont.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/bn/asm/mips-mont.pl head/crypto/openssl/crypto/bn/asm/mips.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/bn/asm/mips.pl head/crypto/openssl/crypto/bn/asm/mips3-mont.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/bn/asm/mips3-mont.pl head/crypto/openssl/crypto/bn/asm/modexp512-x86_64.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/bn/asm/modexp512-x86_64.pl head/crypto/openssl/crypto/bn/asm/parisc-mont.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/bn/asm/parisc-mont.pl head/crypto/openssl/crypto/bn/asm/ppc-mont.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/bn/asm/ppc-mont.pl head/crypto/openssl/crypto/bn/asm/ppc64-mont.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/bn/asm/ppc64-mont.pl head/crypto/openssl/crypto/bn/asm/s390x-gf2m.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/bn/asm/s390x-gf2m.pl head/crypto/openssl/crypto/bn/asm/s390x-mont.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/bn/asm/s390x-mont.pl head/crypto/openssl/crypto/bn/asm/s390x.S - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/bn/asm/s390x.S head/crypto/openssl/crypto/bn/asm/sparcv9-mont.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/bn/asm/sparcv9-mont.pl head/crypto/openssl/crypto/bn/asm/sparcv9a-mont.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/bn/asm/sparcv9a-mont.pl head/crypto/openssl/crypto/bn/asm/via-mont.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/bn/asm/via-mont.pl head/crypto/openssl/crypto/bn/asm/x86-gf2m.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/bn/asm/x86-gf2m.pl head/crypto/openssl/crypto/bn/asm/x86-mont.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/bn/asm/x86-mont.pl head/crypto/openssl/crypto/bn/asm/x86_64-gf2m.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl head/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/bn/asm/x86_64-mont5.pl head/crypto/openssl/crypto/camellia/asm/ - copied from r238402, vendor-crypto/openssl/dist/crypto/camellia/asm/ head/crypto/openssl/crypto/camellia/cmll_utl.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/camellia/cmll_utl.c head/crypto/openssl/crypto/cmac/ - copied from r238402, vendor-crypto/openssl/dist/crypto/cmac/ head/crypto/openssl/crypto/cms/cms_pwri.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/cms/cms_pwri.c head/crypto/openssl/crypto/dh/dh_ameth.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/dh/dh_ameth.c head/crypto/openssl/crypto/dh/dh_pmeth.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/dh/dh_pmeth.c head/crypto/openssl/crypto/dh/dh_prn.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/dh/dh_prn.c head/crypto/openssl/crypto/dsa/dsa_ameth.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/dsa/dsa_ameth.c head/crypto/openssl/crypto/dsa/dsa_locl.h - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/dsa/dsa_locl.h head/crypto/openssl/crypto/dsa/dsa_pmeth.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/dsa/dsa_pmeth.c head/crypto/openssl/crypto/dsa/dsa_prn.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/dsa/dsa_prn.c head/crypto/openssl/crypto/dso/dso_beos.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/dso/dso_beos.c head/crypto/openssl/crypto/ec/ec2_oct.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/ec/ec2_oct.c head/crypto/openssl/crypto/ec/ec_ameth.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/ec/ec_ameth.c head/crypto/openssl/crypto/ec/ec_oct.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/ec/ec_oct.c head/crypto/openssl/crypto/ec/ec_pmeth.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/ec/ec_pmeth.c head/crypto/openssl/crypto/ec/eck_prn.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/ec/eck_prn.c head/crypto/openssl/crypto/ec/ecp_nistp224.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/ec/ecp_nistp224.c head/crypto/openssl/crypto/ec/ecp_nistp256.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/ec/ecp_nistp256.c head/crypto/openssl/crypto/ec/ecp_nistp521.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/ec/ecp_nistp521.c head/crypto/openssl/crypto/ec/ecp_nistputil.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/ec/ecp_nistputil.c head/crypto/openssl/crypto/ec/ecp_oct.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/ec/ecp_oct.c head/crypto/openssl/crypto/engine/eng_rdrand.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/engine/eng_rdrand.c head/crypto/openssl/crypto/engine/eng_rsax.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/engine/eng_rsax.c head/crypto/openssl/crypto/engine/tb_asnmth.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/engine/tb_asnmth.c head/crypto/openssl/crypto/engine/tb_pkmeth.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/engine/tb_pkmeth.c head/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/evp/e_aes_cbc_hmac_sha1.c head/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/evp/e_rc4_hmac_md5.c head/crypto/openssl/crypto/evp/evp_fips.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/evp/evp_fips.c head/crypto/openssl/crypto/evp/m_sigver.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/evp/m_sigver.c head/crypto/openssl/crypto/evp/m_wp.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/evp/m_wp.c head/crypto/openssl/crypto/evp/pmeth_fn.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/evp/pmeth_fn.c head/crypto/openssl/crypto/evp/pmeth_gn.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/evp/pmeth_gn.c head/crypto/openssl/crypto/evp/pmeth_lib.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/evp/pmeth_lib.c head/crypto/openssl/crypto/fips_ers.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/fips_ers.c head/crypto/openssl/crypto/hmac/hm_ameth.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/hmac/hm_ameth.c head/crypto/openssl/crypto/hmac/hm_pmeth.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/hmac/hm_pmeth.c head/crypto/openssl/crypto/md5/asm/md5-ia64.S - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/md5/asm/md5-ia64.S head/crypto/openssl/crypto/modes/ - copied from r238402, vendor-crypto/openssl/dist/crypto/modes/ head/crypto/openssl/crypto/o_fips.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/o_fips.c head/crypto/openssl/crypto/objects/obj_xref.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/objects/obj_xref.c head/crypto/openssl/crypto/objects/obj_xref.h - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/objects/obj_xref.h head/crypto/openssl/crypto/objects/obj_xref.txt - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/objects/obj_xref.txt head/crypto/openssl/crypto/objects/objxref.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/objects/objxref.pl head/crypto/openssl/crypto/pariscid.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/pariscid.pl head/crypto/openssl/crypto/pem/pvkfmt.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/pem/pvkfmt.c head/crypto/openssl/crypto/perlasm/ppc-xlate.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/perlasm/ppc-xlate.pl head/crypto/openssl/crypto/perlasm/x86gas.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/perlasm/x86gas.pl head/crypto/openssl/crypto/perlasm/x86masm.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/perlasm/x86masm.pl head/crypto/openssl/crypto/pkcs7/bio_pk7.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/pkcs7/bio_pk7.c head/crypto/openssl/crypto/ppccap.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/ppccap.c head/crypto/openssl/crypto/ppccpuid.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/ppccpuid.pl head/crypto/openssl/crypto/rc4/asm/rc4-ia64.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/rc4/asm/rc4-ia64.pl head/crypto/openssl/crypto/rc4/asm/rc4-md5-x86_64.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/rc4/asm/rc4-md5-x86_64.pl head/crypto/openssl/crypto/rc4/asm/rc4-parisc.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/rc4/asm/rc4-parisc.pl head/crypto/openssl/crypto/rc4/asm/rc4-s390x.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/rc4/asm/rc4-s390x.pl head/crypto/openssl/crypto/rc4/rc4_utl.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/rc4/rc4_utl.c head/crypto/openssl/crypto/rsa/rsa_ameth.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/rsa/rsa_ameth.c head/crypto/openssl/crypto/rsa/rsa_crpt.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/rsa/rsa_crpt.c head/crypto/openssl/crypto/rsa/rsa_locl.h - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/rsa/rsa_locl.h head/crypto/openssl/crypto/rsa/rsa_pmeth.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/rsa/rsa_pmeth.c head/crypto/openssl/crypto/rsa/rsa_prn.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/rsa/rsa_prn.c head/crypto/openssl/crypto/s390xcap.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/s390xcap.c head/crypto/openssl/crypto/s390xcpuid.S - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/s390xcpuid.S head/crypto/openssl/crypto/sha/asm/sha1-armv4-large.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/sha/asm/sha1-armv4-large.pl head/crypto/openssl/crypto/sha/asm/sha1-mips.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/sha/asm/sha1-mips.pl head/crypto/openssl/crypto/sha/asm/sha1-parisc.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/sha/asm/sha1-parisc.pl head/crypto/openssl/crypto/sha/asm/sha1-ppc.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/sha/asm/sha1-ppc.pl head/crypto/openssl/crypto/sha/asm/sha1-s390x.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/sha/asm/sha1-s390x.pl head/crypto/openssl/crypto/sha/asm/sha1-sparcv9.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/sha/asm/sha1-sparcv9.pl head/crypto/openssl/crypto/sha/asm/sha1-sparcv9a.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/sha/asm/sha1-sparcv9a.pl head/crypto/openssl/crypto/sha/asm/sha1-thumb.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/sha/asm/sha1-thumb.pl head/crypto/openssl/crypto/sha/asm/sha256-586.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/sha/asm/sha256-586.pl head/crypto/openssl/crypto/sha/asm/sha256-armv4.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/sha/asm/sha256-armv4.pl head/crypto/openssl/crypto/sha/asm/sha512-586.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/sha/asm/sha512-586.pl head/crypto/openssl/crypto/sha/asm/sha512-armv4.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/sha/asm/sha512-armv4.pl head/crypto/openssl/crypto/sha/asm/sha512-mips.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/sha/asm/sha512-mips.pl head/crypto/openssl/crypto/sha/asm/sha512-parisc.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/sha/asm/sha512-parisc.pl head/crypto/openssl/crypto/sha/asm/sha512-ppc.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/sha/asm/sha512-ppc.pl head/crypto/openssl/crypto/sha/asm/sha512-s390x.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/sha/asm/sha512-s390x.pl head/crypto/openssl/crypto/sha/asm/sha512-sparcv9.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/sha/asm/sha512-sparcv9.pl head/crypto/openssl/crypto/sparcv9cap.c - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/sparcv9cap.c head/crypto/openssl/crypto/srp/ - copied from r238402, vendor-crypto/openssl/dist/crypto/srp/ head/crypto/openssl/crypto/ts/ - copied from r238402, vendor-crypto/openssl/dist/crypto/ts/ head/crypto/openssl/crypto/vms_rms.h - copied unchanged from r238402, vendor-crypto/openssl/dist/crypto/vms_rms.h head/crypto/openssl/crypto/whrlpool/ - copied from r238402, vendor-crypto/openssl/dist/crypto/whrlpool/ head/crypto/openssl/doc/apps/cms.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/apps/cms.pod head/crypto/openssl/doc/apps/genpkey.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/apps/genpkey.pod head/crypto/openssl/doc/apps/pkey.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/apps/pkey.pod head/crypto/openssl/doc/apps/pkeyparam.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/apps/pkeyparam.pod head/crypto/openssl/doc/apps/pkeyutl.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/apps/pkeyutl.pod head/crypto/openssl/doc/apps/ts.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/apps/ts.pod head/crypto/openssl/doc/apps/tsget.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/apps/tsget.pod head/crypto/openssl/doc/crypto/BIO_new_CMS.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/BIO_new_CMS.pod head/crypto/openssl/doc/crypto/CMS_add0_cert.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/CMS_add0_cert.pod head/crypto/openssl/doc/crypto/CMS_add1_recipient_cert.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/CMS_add1_recipient_cert.pod head/crypto/openssl/doc/crypto/CMS_compress.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/CMS_compress.pod head/crypto/openssl/doc/crypto/CMS_decrypt.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/CMS_decrypt.pod head/crypto/openssl/doc/crypto/CMS_encrypt.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/CMS_encrypt.pod head/crypto/openssl/doc/crypto/CMS_final.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/CMS_final.pod head/crypto/openssl/doc/crypto/CMS_get0_RecipientInfos.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/CMS_get0_RecipientInfos.pod head/crypto/openssl/doc/crypto/CMS_get0_SignerInfos.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/CMS_get0_SignerInfos.pod head/crypto/openssl/doc/crypto/CMS_get0_type.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/CMS_get0_type.pod head/crypto/openssl/doc/crypto/CMS_get1_ReceiptRequest.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/CMS_get1_ReceiptRequest.pod head/crypto/openssl/doc/crypto/CMS_sign.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/CMS_sign.pod head/crypto/openssl/doc/crypto/CMS_sign_add1_signer.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/CMS_sign_add1_signer.pod head/crypto/openssl/doc/crypto/CMS_sign_receipt.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/CMS_sign_receipt.pod head/crypto/openssl/doc/crypto/CMS_uncompress.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/CMS_uncompress.pod head/crypto/openssl/doc/crypto/CMS_verify.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/CMS_verify.pod head/crypto/openssl/doc/crypto/CMS_verify_receipt.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/CMS_verify_receipt.pod head/crypto/openssl/doc/crypto/EVP_DigestSignInit.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/EVP_DigestSignInit.pod head/crypto/openssl/doc/crypto/EVP_DigestVerifyInit.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/EVP_DigestVerifyInit.pod head/crypto/openssl/doc/crypto/EVP_PKEY_CTX_ctrl.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/EVP_PKEY_CTX_ctrl.pod head/crypto/openssl/doc/crypto/EVP_PKEY_CTX_new.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/EVP_PKEY_CTX_new.pod head/crypto/openssl/doc/crypto/EVP_PKEY_cmp.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/EVP_PKEY_cmp.pod head/crypto/openssl/doc/crypto/EVP_PKEY_decrypt.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/EVP_PKEY_decrypt.pod head/crypto/openssl/doc/crypto/EVP_PKEY_derive.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/EVP_PKEY_derive.pod head/crypto/openssl/doc/crypto/EVP_PKEY_encrypt.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/EVP_PKEY_encrypt.pod head/crypto/openssl/doc/crypto/EVP_PKEY_get_default_digest.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/EVP_PKEY_get_default_digest.pod head/crypto/openssl/doc/crypto/EVP_PKEY_keygen.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/EVP_PKEY_keygen.pod head/crypto/openssl/doc/crypto/EVP_PKEY_print_private.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/EVP_PKEY_print_private.pod head/crypto/openssl/doc/crypto/EVP_PKEY_sign.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/EVP_PKEY_sign.pod head/crypto/openssl/doc/crypto/EVP_PKEY_verify.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/EVP_PKEY_verify.pod head/crypto/openssl/doc/crypto/EVP_PKEY_verifyrecover.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/EVP_PKEY_verifyrecover.pod head/crypto/openssl/doc/crypto/PEM_write_bio_CMS_stream.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/PEM_write_bio_CMS_stream.pod head/crypto/openssl/doc/crypto/PEM_write_bio_PKCS7_stream.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/PEM_write_bio_PKCS7_stream.pod head/crypto/openssl/doc/crypto/PKCS7_sign_add_signer.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/PKCS7_sign_add_signer.pod head/crypto/openssl/doc/crypto/SMIME_read_CMS.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/SMIME_read_CMS.pod head/crypto/openssl/doc/crypto/SMIME_write_CMS.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/SMIME_write_CMS.pod head/crypto/openssl/doc/crypto/X509_STORE_CTX_get_error.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/X509_STORE_CTX_get_error.pod head/crypto/openssl/doc/crypto/X509_STORE_CTX_get_ex_new_index.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/X509_STORE_CTX_get_ex_new_index.pod head/crypto/openssl/doc/crypto/X509_STORE_CTX_new.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/X509_STORE_CTX_new.pod head/crypto/openssl/doc/crypto/X509_STORE_CTX_set_verify_cb.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/X509_STORE_CTX_set_verify_cb.pod head/crypto/openssl/doc/crypto/X509_STORE_set_verify_cb_func.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/X509_STORE_set_verify_cb_func.pod head/crypto/openssl/doc/crypto/X509_VERIFY_PARAM_set_flags.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/X509_VERIFY_PARAM_set_flags.pod head/crypto/openssl/doc/crypto/X509_verify_cert.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/X509_verify_cert.pod head/crypto/openssl/doc/crypto/i2d_CMS_bio_stream.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/i2d_CMS_bio_stream.pod head/crypto/openssl/doc/crypto/i2d_PKCS7_bio_stream.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/crypto/i2d_PKCS7_bio_stream.pod head/crypto/openssl/doc/ssl/SSL_CTX_set_psk_client_callback.pod - copied, changed from r238402, vendor-crypto/openssl/dist/doc/ssl/SSL_CTX_set_psk_client_callback.pod head/crypto/openssl/doc/ssl/SSL_CTX_use_psk_identity_hint.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/ssl/SSL_CTX_use_psk_identity_hint.pod head/crypto/openssl/doc/ssl/SSL_get_psk_identity.pod - copied unchanged from r238402, vendor-crypto/openssl/dist/doc/ssl/SSL_get_psk_identity.pod head/crypto/openssl/engines/ccgost/ - copied from r238402, vendor-crypto/openssl/dist/engines/ccgost/ head/crypto/openssl/engines/e_padlock.c - copied unchanged from r238402, vendor-crypto/openssl/dist/engines/e_padlock.c head/crypto/openssl/ssl/d1_srtp.c - copied unchanged from r238402, vendor-crypto/openssl/dist/ssl/d1_srtp.c head/crypto/openssl/ssl/srtp.h - copied, changed from r238402, vendor-crypto/openssl/dist/ssl/srtp.h head/crypto/openssl/ssl/tls_srp.c - copied unchanged from r238402, vendor-crypto/openssl/dist/ssl/tls_srp.c head/crypto/openssl/util/cygwin.sh - copied unchanged from r238402, vendor-crypto/openssl/dist/util/cygwin.sh head/crypto/openssl/util/mkrc.pl - copied unchanged from r238402, vendor-crypto/openssl/dist/util/mkrc.pl head/secure/lib/libcrypto/amd64/ head/secure/lib/libcrypto/amd64/aes-x86_64.S (contents, props changed) head/secure/lib/libcrypto/amd64/aesni-sha1-x86_64.S (contents, props changed) head/secure/lib/libcrypto/amd64/aesni-x86_64.S (contents, props changed) head/secure/lib/libcrypto/amd64/bsaes-x86_64.S (contents, props changed) head/secure/lib/libcrypto/amd64/cmll-x86_64.S (contents, props changed) head/secure/lib/libcrypto/amd64/ghash-x86_64.S (contents, props changed) head/secure/lib/libcrypto/amd64/md5-x86_64.S (contents, props changed) head/secure/lib/libcrypto/amd64/modexp512-x86_64.S (contents, props changed) head/secure/lib/libcrypto/amd64/rc4-md5-x86_64.S (contents, props changed) head/secure/lib/libcrypto/amd64/rc4-x86_64.S (contents, props changed) head/secure/lib/libcrypto/amd64/sha1-x86_64.S (contents, props changed) head/secure/lib/libcrypto/amd64/sha256-x86_64.S (contents, props changed) head/secure/lib/libcrypto/amd64/sha512-x86_64.S (contents, props changed) head/secure/lib/libcrypto/amd64/vpaes-x86_64.S (contents, props changed) head/secure/lib/libcrypto/amd64/wp-x86_64.S (contents, props changed) head/secure/lib/libcrypto/amd64/x86_64-gf2m.S (contents, props changed) head/secure/lib/libcrypto/amd64/x86_64-mont.S (contents, props changed) head/secure/lib/libcrypto/amd64/x86_64-mont5.S (contents, props changed) head/secure/lib/libcrypto/amd64/x86_64cpuid.S (contents, props changed) head/secure/lib/libcrypto/engines/libgost/ head/secure/lib/libcrypto/engines/libgost/Makefile (contents, props changed) head/secure/lib/libcrypto/i386/aes-586.s (contents, props changed) head/secure/lib/libcrypto/i386/aesni-x86.s (contents, props changed) head/secure/lib/libcrypto/i386/cmll-x86.s (contents, props changed) head/secure/lib/libcrypto/i386/ghash-x86.s (contents, props changed) head/secure/lib/libcrypto/i386/sha256-586.s (contents, props changed) head/secure/lib/libcrypto/i386/sha512-586.s (contents, props changed) head/secure/lib/libcrypto/i386/vpaes-x86.s (contents, props changed) head/secure/lib/libcrypto/i386/wp-mmx.s (contents, props changed) head/secure/lib/libcrypto/i386/x86-gf2m.s (contents, props changed) head/secure/lib/libcrypto/i386/x86-mont.s (contents, props changed) head/secure/lib/libcrypto/i386/x86cpuid.s (contents, props changed) head/secure/lib/libcrypto/man/BIO_new_CMS.3 (contents, props changed) head/secure/lib/libcrypto/man/CMS_add0_cert.3 (contents, props changed) head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 (contents, props changed) head/secure/lib/libcrypto/man/CMS_compress.3 (contents, props changed) head/secure/lib/libcrypto/man/CMS_decrypt.3 (contents, props changed) head/secure/lib/libcrypto/man/CMS_encrypt.3 (contents, props changed) head/secure/lib/libcrypto/man/CMS_final.3 (contents, props changed) head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 (contents, props changed) head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 (contents, props changed) head/secure/lib/libcrypto/man/CMS_get0_type.3 (contents, props changed) head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 (contents, props changed) head/secure/lib/libcrypto/man/CMS_sign.3 (contents, props changed) head/secure/lib/libcrypto/man/CMS_sign_add1_signer.3 (contents, props changed) head/secure/lib/libcrypto/man/CMS_sign_receipt.3 (contents, props changed) head/secure/lib/libcrypto/man/CMS_uncompress.3 (contents, props changed) head/secure/lib/libcrypto/man/CMS_verify.3 (contents, props changed) head/secure/lib/libcrypto/man/CMS_verify_receipt.3 (contents, props changed) head/secure/lib/libcrypto/man/EVP_DigestSignInit.3 (contents, props changed) head/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 (contents, props changed) head/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 (contents, props changed) head/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 (contents, props changed) head/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 (contents, props changed) head/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 (contents, props changed) head/secure/lib/libcrypto/man/EVP_PKEY_derive.3 (contents, props changed) head/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 (contents, props changed) head/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 (contents, props changed) head/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 (contents, props changed) head/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 (contents, props changed) head/secure/lib/libcrypto/man/EVP_PKEY_sign.3 (contents, props changed) head/secure/lib/libcrypto/man/EVP_PKEY_verify.3 (contents, props changed) head/secure/lib/libcrypto/man/EVP_PKEY_verifyrecover.3 (contents, props changed) head/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 (contents, props changed) head/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 (contents, props changed) head/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 (contents, props changed) head/secure/lib/libcrypto/man/SMIME_read_CMS.3 (contents, props changed) head/secure/lib/libcrypto/man/SMIME_write_CMS.3 (contents, props changed) head/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 (contents, props changed) head/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 (contents, props changed) head/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 (contents, props changed) head/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 (contents, props changed) head/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 (contents, props changed) head/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 (contents, props changed) head/secure/lib/libcrypto/man/X509_verify_cert.3 (contents, props changed) head/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 (contents, props changed) head/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 (contents, props changed) head/secure/lib/libcrypto/opensslconf-x86.h (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 (contents, props changed) head/secure/lib/libssl/man/SSL_get_psk_identity.3 (contents, props changed) head/secure/usr.bin/openssl/man/cms.1 (contents, props changed) head/secure/usr.bin/openssl/man/genpkey.1 (contents, props changed) head/secure/usr.bin/openssl/man/pkey.1 (contents, props changed) head/secure/usr.bin/openssl/man/pkeyparam.1 (contents, props changed) head/secure/usr.bin/openssl/man/pkeyutl.1 (contents, props changed) head/secure/usr.bin/openssl/man/ts.1 (contents, props changed) head/secure/usr.bin/openssl/man/tsget.1 (contents, props changed) Deleted: head/crypto/openssl/apps/demoCA/ head/crypto/openssl/apps/winrand.c head/crypto/openssl/bugs/ head/crypto/openssl/certs/demo/ head/crypto/openssl/crypto/LPdir_nyi.c head/crypto/openssl/crypto/LPdir_vms.c head/crypto/openssl/crypto/LPdir_win.c head/crypto/openssl/crypto/LPdir_win32.c head/crypto/openssl/crypto/LPdir_wince.c head/crypto/openssl/crypto/asn1/a_hdr.c head/crypto/openssl/crypto/asn1/a_meth.c head/crypto/openssl/crypto/asn1/p8_key.c head/crypto/openssl/crypto/bf/bfs.cpp head/crypto/openssl/crypto/bn/asm/mo-586.pl head/crypto/openssl/crypto/bn/bn_opt.c head/crypto/openssl/crypto/cast/casts.cpp head/crypto/openssl/crypto/des/asm/des686.pl head/crypto/openssl/crypto/des/des3s.cpp head/crypto/openssl/crypto/des/des_lib.c head/crypto/openssl/crypto/des/dess.cpp head/crypto/openssl/crypto/des/t/ head/crypto/openssl/crypto/des/times/ head/crypto/openssl/crypto/dsa/dsa_utl.c head/crypto/openssl/crypto/dyn_lck.c head/crypto/openssl/crypto/ec/ec2_smpt.c head/crypto/openssl/crypto/engine/eng_padlock.c head/crypto/openssl/crypto/err/err_bio.c head/crypto/openssl/crypto/err/err_def.c head/crypto/openssl/crypto/err/err_str.c head/crypto/openssl/crypto/err/openssl.ec head/crypto/openssl/crypto/evp/dig_eng.c head/crypto/openssl/crypto/evp/enc_min.c head/crypto/openssl/crypto/evp/evp_cnf.c head/crypto/openssl/crypto/fips_err.c head/crypto/openssl/crypto/md4/md4s.cpp head/crypto/openssl/crypto/md5/md5s.cpp head/crypto/openssl/crypto/perlasm/x86ms.pl head/crypto/openssl/crypto/perlasm/x86unix.pl head/crypto/openssl/crypto/pqueue/pq_compat.h head/crypto/openssl/crypto/rand/rand_eng.c head/crypto/openssl/crypto/rand/rand_nw.c head/crypto/openssl/crypto/rand/rand_os2.c head/crypto/openssl/crypto/rand/rand_vms.c head/crypto/openssl/crypto/rand/rand_win.c head/crypto/openssl/crypto/rc4/asm/rc4-ia64.S head/crypto/openssl/crypto/rc4/rc4_fblk.c head/crypto/openssl/crypto/rc4/rc4s.cpp head/crypto/openssl/crypto/rc5/rc5s.cpp head/crypto/openssl/crypto/ripemd/asm/rips.cpp head/crypto/openssl/crypto/rsa/rsa_eng.c head/crypto/openssl/crypto/rsa/rsa_x931g.c head/crypto/openssl/crypto/sha/asm/sha512-sse2.pl head/crypto/openssl/crypto/sha/sha1s.cpp head/crypto/openssl/crypto/tmdiff.c head/crypto/openssl/crypto/tmdiff.h head/crypto/openssl/demos/ head/crypto/openssl/engines/alpha.opt head/crypto/openssl/engines/e_4758cca.ec head/crypto/openssl/engines/e_aep.ec head/crypto/openssl/engines/e_atalla.ec head/crypto/openssl/engines/e_capi.ec head/crypto/openssl/engines/e_chil.ec head/crypto/openssl/engines/e_cswift.ec head/crypto/openssl/engines/e_gmp.ec head/crypto/openssl/engines/e_nuron.ec head/crypto/openssl/engines/e_sureware.ec head/crypto/openssl/engines/e_ubsec.ec head/crypto/openssl/engines/ia64.opt head/crypto/openssl/engines/vax.opt head/crypto/openssl/fips/ head/crypto/openssl/openssl.doxy head/crypto/openssl/openssl.spec head/crypto/openssl/test/ head/crypto/openssl/times/ head/crypto/openssl/tools/ head/crypto/openssl/util/arx.pl head/crypto/openssl/util/fipslink.pl head/crypto/openssl/util/mksdef.pl head/secure/lib/libcrypto/man/des_modes.3 head/secure/lib/libcrypto/opensslconf-amd64.h head/secure/lib/libcrypto/opensslconf-i386.h head/secure/usr.bin/openssl/man/config.1 Modified: head/ObsoleteFiles.inc head/UPDATING head/crypto/openssl/CHANGES head/crypto/openssl/CHANGES.SSLeay head/crypto/openssl/Configure head/crypto/openssl/INSTALL head/crypto/openssl/Makefile head/crypto/openssl/Makefile.org head/crypto/openssl/Makefile.shared head/crypto/openssl/NEWS head/crypto/openssl/README head/crypto/openssl/apps/Makefile head/crypto/openssl/apps/apps.c head/crypto/openssl/apps/apps.h head/crypto/openssl/apps/asn1pars.c head/crypto/openssl/apps/ca.c head/crypto/openssl/apps/ciphers.c head/crypto/openssl/apps/client.pem head/crypto/openssl/apps/cms.c head/crypto/openssl/apps/crl2p7.c head/crypto/openssl/apps/dgst.c head/crypto/openssl/apps/dh.c head/crypto/openssl/apps/dhparam.c head/crypto/openssl/apps/dsa.c head/crypto/openssl/apps/ec.c head/crypto/openssl/apps/ecparam.c head/crypto/openssl/apps/enc.c head/crypto/openssl/apps/engine.c head/crypto/openssl/apps/errstr.c head/crypto/openssl/apps/gendh.c head/crypto/openssl/apps/genrsa.c head/crypto/openssl/apps/ocsp.c head/crypto/openssl/apps/openssl.c head/crypto/openssl/apps/openssl.cnf head/crypto/openssl/apps/pkcs12.c head/crypto/openssl/apps/pkcs7.c head/crypto/openssl/apps/pkcs8.c head/crypto/openssl/apps/prime.c head/crypto/openssl/apps/progs.h head/crypto/openssl/apps/progs.pl head/crypto/openssl/apps/req.c head/crypto/openssl/apps/rsa.c head/crypto/openssl/apps/rsautl.c head/crypto/openssl/apps/s_apps.h head/crypto/openssl/apps/s_cb.c head/crypto/openssl/apps/s_client.c head/crypto/openssl/apps/s_server.c head/crypto/openssl/apps/s_socket.c head/crypto/openssl/apps/s_time.c head/crypto/openssl/apps/server.pem head/crypto/openssl/apps/server2.pem head/crypto/openssl/apps/sess_id.c head/crypto/openssl/apps/smime.c head/crypto/openssl/apps/speed.c head/crypto/openssl/apps/verify.c head/crypto/openssl/apps/x509.c head/crypto/openssl/config head/crypto/openssl/crypto/Makefile head/crypto/openssl/crypto/aes/Makefile head/crypto/openssl/crypto/aes/aes.h head/crypto/openssl/crypto/aes/aes_cbc.c head/crypto/openssl/crypto/aes/aes_cfb.c head/crypto/openssl/crypto/aes/aes_core.c head/crypto/openssl/crypto/aes/aes_ctr.c head/crypto/openssl/crypto/aes/aes_ige.c head/crypto/openssl/crypto/aes/aes_misc.c head/crypto/openssl/crypto/aes/aes_ofb.c head/crypto/openssl/crypto/aes/asm/aes-586.pl head/crypto/openssl/crypto/aes/asm/aes-x86_64.pl head/crypto/openssl/crypto/asn1/Makefile head/crypto/openssl/crypto/asn1/a_bitstr.c head/crypto/openssl/crypto/asn1/a_digest.c head/crypto/openssl/crypto/asn1/a_dup.c head/crypto/openssl/crypto/asn1/a_gentm.c head/crypto/openssl/crypto/asn1/a_int.c head/crypto/openssl/crypto/asn1/a_object.c head/crypto/openssl/crypto/asn1/a_octet.c head/crypto/openssl/crypto/asn1/a_set.c head/crypto/openssl/crypto/asn1/a_sign.c head/crypto/openssl/crypto/asn1/a_strnid.c head/crypto/openssl/crypto/asn1/a_time.c head/crypto/openssl/crypto/asn1/a_type.c head/crypto/openssl/crypto/asn1/a_utctm.c head/crypto/openssl/crypto/asn1/a_verify.c head/crypto/openssl/crypto/asn1/asn1.h head/crypto/openssl/crypto/asn1/asn1_err.c head/crypto/openssl/crypto/asn1/asn1_gen.c head/crypto/openssl/crypto/asn1/asn1_lib.c head/crypto/openssl/crypto/asn1/asn1_mac.h head/crypto/openssl/crypto/asn1/asn1_par.c head/crypto/openssl/crypto/asn1/asn1t.h head/crypto/openssl/crypto/asn1/asn_mime.c head/crypto/openssl/crypto/asn1/asn_pack.c head/crypto/openssl/crypto/asn1/charmap.h head/crypto/openssl/crypto/asn1/d2i_pr.c head/crypto/openssl/crypto/asn1/d2i_pu.c head/crypto/openssl/crypto/asn1/i2d_pr.c head/crypto/openssl/crypto/asn1/n_pkey.c head/crypto/openssl/crypto/asn1/nsseq.c head/crypto/openssl/crypto/asn1/p5_pbe.c head/crypto/openssl/crypto/asn1/p5_pbev2.c head/crypto/openssl/crypto/asn1/p8_pkey.c head/crypto/openssl/crypto/asn1/t_crl.c head/crypto/openssl/crypto/asn1/t_pkey.c head/crypto/openssl/crypto/asn1/t_req.c head/crypto/openssl/crypto/asn1/t_spki.c head/crypto/openssl/crypto/asn1/t_x509.c head/crypto/openssl/crypto/asn1/tasn_dec.c head/crypto/openssl/crypto/asn1/tasn_enc.c head/crypto/openssl/crypto/asn1/tasn_fre.c head/crypto/openssl/crypto/asn1/tasn_new.c head/crypto/openssl/crypto/asn1/tasn_prn.c head/crypto/openssl/crypto/asn1/tasn_typ.c head/crypto/openssl/crypto/asn1/x_algor.c head/crypto/openssl/crypto/asn1/x_crl.c head/crypto/openssl/crypto/asn1/x_long.c head/crypto/openssl/crypto/asn1/x_name.c head/crypto/openssl/crypto/asn1/x_pubkey.c head/crypto/openssl/crypto/asn1/x_req.c head/crypto/openssl/crypto/asn1/x_x509.c head/crypto/openssl/crypto/bf/Makefile head/crypto/openssl/crypto/bf/asm/bf-586.pl head/crypto/openssl/crypto/bf/bf_skey.c head/crypto/openssl/crypto/bf/blowfish.h head/crypto/openssl/crypto/bio/Makefile head/crypto/openssl/crypto/bio/b_print.c head/crypto/openssl/crypto/bio/b_sock.c head/crypto/openssl/crypto/bio/bio.h head/crypto/openssl/crypto/bio/bio_cb.c head/crypto/openssl/crypto/bio/bio_err.c head/crypto/openssl/crypto/bio/bio_lcl.h head/crypto/openssl/crypto/bio/bio_lib.c head/crypto/openssl/crypto/bio/bss_acpt.c head/crypto/openssl/crypto/bio/bss_bio.c head/crypto/openssl/crypto/bio/bss_dgram.c head/crypto/openssl/crypto/bio/bss_fd.c head/crypto/openssl/crypto/bio/bss_file.c head/crypto/openssl/crypto/bio/bss_log.c head/crypto/openssl/crypto/bio/bss_mem.c head/crypto/openssl/crypto/bn/Makefile head/crypto/openssl/crypto/bn/asm/bn-586.pl head/crypto/openssl/crypto/bn/asm/co-586.pl head/crypto/openssl/crypto/bn/asm/ppc.pl head/crypto/openssl/crypto/bn/asm/sparcv8plus.S head/crypto/openssl/crypto/bn/asm/x86_64-gcc.c head/crypto/openssl/crypto/bn/asm/x86_64-mont.pl head/crypto/openssl/crypto/bn/bn.h head/crypto/openssl/crypto/bn/bn_asm.c head/crypto/openssl/crypto/bn/bn_blind.c head/crypto/openssl/crypto/bn/bn_ctx.c head/crypto/openssl/crypto/bn/bn_div.c head/crypto/openssl/crypto/bn/bn_exp.c head/crypto/openssl/crypto/bn/bn_gf2m.c head/crypto/openssl/crypto/bn/bn_lcl.h head/crypto/openssl/crypto/bn/bn_lib.c head/crypto/openssl/crypto/bn/bn_mont.c head/crypto/openssl/crypto/bn/bn_nist.c head/crypto/openssl/crypto/bn/bn_print.c head/crypto/openssl/crypto/bn/bn_shift.c head/crypto/openssl/crypto/bn/bntest.c head/crypto/openssl/crypto/bn/exptest.c head/crypto/openssl/crypto/buffer/Makefile head/crypto/openssl/crypto/buffer/buf_err.c head/crypto/openssl/crypto/buffer/buf_str.c head/crypto/openssl/crypto/buffer/buffer.c head/crypto/openssl/crypto/buffer/buffer.h head/crypto/openssl/crypto/camellia/Makefile head/crypto/openssl/crypto/camellia/camellia.c head/crypto/openssl/crypto/camellia/camellia.h head/crypto/openssl/crypto/camellia/cmll_cbc.c head/crypto/openssl/crypto/camellia/cmll_cfb.c head/crypto/openssl/crypto/camellia/cmll_ctr.c head/crypto/openssl/crypto/camellia/cmll_locl.h head/crypto/openssl/crypto/camellia/cmll_misc.c head/crypto/openssl/crypto/camellia/cmll_ofb.c head/crypto/openssl/crypto/cast/Makefile head/crypto/openssl/crypto/cast/asm/cast-586.pl head/crypto/openssl/crypto/cast/c_skey.c head/crypto/openssl/crypto/cast/cast.h head/crypto/openssl/crypto/cms/Makefile head/crypto/openssl/crypto/cms/cms.h head/crypto/openssl/crypto/cms/cms_asn1.c head/crypto/openssl/crypto/cms/cms_env.c head/crypto/openssl/crypto/cms/cms_err.c head/crypto/openssl/crypto/cms/cms_ess.c head/crypto/openssl/crypto/cms/cms_io.c head/crypto/openssl/crypto/cms/cms_lcl.h head/crypto/openssl/crypto/cms/cms_lib.c head/crypto/openssl/crypto/cms/cms_sd.c head/crypto/openssl/crypto/cms/cms_smime.c head/crypto/openssl/crypto/comp/Makefile head/crypto/openssl/crypto/comp/c_rle.c head/crypto/openssl/crypto/comp/c_zlib.c head/crypto/openssl/crypto/comp/comp_err.c head/crypto/openssl/crypto/conf/Makefile head/crypto/openssl/crypto/conf/README head/crypto/openssl/crypto/conf/conf.h head/crypto/openssl/crypto/conf/conf_api.c head/crypto/openssl/crypto/conf/conf_def.c head/crypto/openssl/crypto/conf/conf_err.c head/crypto/openssl/crypto/conf/conf_lib.c head/crypto/openssl/crypto/conf/conf_mall.c head/crypto/openssl/crypto/conf/conf_mod.c head/crypto/openssl/crypto/cpt_err.c head/crypto/openssl/crypto/cryptlib.c head/crypto/openssl/crypto/cryptlib.h head/crypto/openssl/crypto/crypto.h head/crypto/openssl/crypto/des/Makefile head/crypto/openssl/crypto/des/asm/crypt586.pl head/crypto/openssl/crypto/des/asm/des-586.pl head/crypto/openssl/crypto/des/asm/des_enc.m4 head/crypto/openssl/crypto/des/des.h head/crypto/openssl/crypto/des/des_enc.c head/crypto/openssl/crypto/des/des_locl.h head/crypto/openssl/crypto/des/ecb_enc.c head/crypto/openssl/crypto/des/enc_read.c head/crypto/openssl/crypto/des/enc_writ.c head/crypto/openssl/crypto/des/fcrypt_b.c head/crypto/openssl/crypto/des/set_key.c head/crypto/openssl/crypto/des/xcbc_enc.c head/crypto/openssl/crypto/dh/Makefile head/crypto/openssl/crypto/dh/dh.h head/crypto/openssl/crypto/dh/dh_asn1.c head/crypto/openssl/crypto/dh/dh_check.c head/crypto/openssl/crypto/dh/dh_err.c head/crypto/openssl/crypto/dh/dh_gen.c head/crypto/openssl/crypto/dh/dh_key.c head/crypto/openssl/crypto/dh/dh_lib.c head/crypto/openssl/crypto/dsa/Makefile head/crypto/openssl/crypto/dsa/dsa.h head/crypto/openssl/crypto/dsa/dsa_asn1.c head/crypto/openssl/crypto/dsa/dsa_err.c head/crypto/openssl/crypto/dsa/dsa_gen.c head/crypto/openssl/crypto/dsa/dsa_key.c head/crypto/openssl/crypto/dsa/dsa_lib.c head/crypto/openssl/crypto/dsa/dsa_ossl.c head/crypto/openssl/crypto/dsa/dsa_sign.c head/crypto/openssl/crypto/dsa/dsa_vrf.c head/crypto/openssl/crypto/dsa/dsatest.c head/crypto/openssl/crypto/dso/Makefile head/crypto/openssl/crypto/dso/dso.h head/crypto/openssl/crypto/dso/dso_dl.c head/crypto/openssl/crypto/dso/dso_dlfcn.c head/crypto/openssl/crypto/dso/dso_err.c head/crypto/openssl/crypto/dso/dso_lib.c head/crypto/openssl/crypto/dso/dso_null.c head/crypto/openssl/crypto/dso/dso_openssl.c head/crypto/openssl/crypto/ec/Makefile head/crypto/openssl/crypto/ec/ec.h head/crypto/openssl/crypto/ec/ec2_mult.c head/crypto/openssl/crypto/ec/ec2_smpl.c head/crypto/openssl/crypto/ec/ec_asn1.c head/crypto/openssl/crypto/ec/ec_curve.c head/crypto/openssl/crypto/ec/ec_cvt.c head/crypto/openssl/crypto/ec/ec_err.c head/crypto/openssl/crypto/ec/ec_key.c head/crypto/openssl/crypto/ec/ec_lcl.h head/crypto/openssl/crypto/ec/ec_lib.c head/crypto/openssl/crypto/ec/ec_mult.c head/crypto/openssl/crypto/ec/ecp_mont.c head/crypto/openssl/crypto/ec/ecp_nist.c head/crypto/openssl/crypto/ec/ecp_smpl.c head/crypto/openssl/crypto/ec/ectest.c head/crypto/openssl/crypto/ecdh/Makefile head/crypto/openssl/crypto/ecdh/ecdh.h head/crypto/openssl/crypto/ecdh/ecdhtest.c head/crypto/openssl/crypto/ecdh/ech_err.c head/crypto/openssl/crypto/ecdh/ech_lib.c head/crypto/openssl/crypto/ecdh/ech_locl.h head/crypto/openssl/crypto/ecdh/ech_ossl.c head/crypto/openssl/crypto/ecdsa/Makefile head/crypto/openssl/crypto/ecdsa/ecdsa.h head/crypto/openssl/crypto/ecdsa/ecdsatest.c head/crypto/openssl/crypto/ecdsa/ecs_err.c head/crypto/openssl/crypto/ecdsa/ecs_lib.c head/crypto/openssl/crypto/ecdsa/ecs_locl.h head/crypto/openssl/crypto/ecdsa/ecs_ossl.c head/crypto/openssl/crypto/engine/Makefile head/crypto/openssl/crypto/engine/eng_all.c head/crypto/openssl/crypto/engine/eng_cryptodev.c head/crypto/openssl/crypto/engine/eng_dyn.c head/crypto/openssl/crypto/engine/eng_err.c head/crypto/openssl/crypto/engine/eng_fat.c head/crypto/openssl/crypto/engine/eng_int.h head/crypto/openssl/crypto/engine/eng_lib.c head/crypto/openssl/crypto/engine/eng_list.c head/crypto/openssl/crypto/engine/eng_openssl.c head/crypto/openssl/crypto/engine/eng_table.c head/crypto/openssl/crypto/engine/engine.h head/crypto/openssl/crypto/engine/enginetest.c head/crypto/openssl/crypto/err/Makefile head/crypto/openssl/crypto/err/err.c head/crypto/openssl/crypto/err/err.h head/crypto/openssl/crypto/err/err_all.c head/crypto/openssl/crypto/err/err_prn.c head/crypto/openssl/crypto/evp/Makefile head/crypto/openssl/crypto/evp/bio_enc.c head/crypto/openssl/crypto/evp/bio_md.c head/crypto/openssl/crypto/evp/bio_ok.c head/crypto/openssl/crypto/evp/c_all.c head/crypto/openssl/crypto/evp/c_allc.c head/crypto/openssl/crypto/evp/c_alld.c head/crypto/openssl/crypto/evp/digest.c head/crypto/openssl/crypto/evp/e_aes.c head/crypto/openssl/crypto/evp/e_camellia.c head/crypto/openssl/crypto/evp/e_des.c head/crypto/openssl/crypto/evp/e_des3.c head/crypto/openssl/crypto/evp/e_idea.c head/crypto/openssl/crypto/evp/e_null.c head/crypto/openssl/crypto/evp/e_rc2.c head/crypto/openssl/crypto/evp/e_rc4.c head/crypto/openssl/crypto/evp/e_seed.c head/crypto/openssl/crypto/evp/e_xcbc_d.c head/crypto/openssl/crypto/evp/encode.c head/crypto/openssl/crypto/evp/evp.h head/crypto/openssl/crypto/evp/evp_enc.c head/crypto/openssl/crypto/evp/evp_err.c head/crypto/openssl/crypto/evp/evp_key.c head/crypto/openssl/crypto/evp/evp_lib.c head/crypto/openssl/crypto/evp/evp_locl.h head/crypto/openssl/crypto/evp/evp_pbe.c head/crypto/openssl/crypto/evp/evp_pkey.c head/crypto/openssl/crypto/evp/evp_test.c head/crypto/openssl/crypto/evp/evptests.txt head/crypto/openssl/crypto/evp/m_dss.c head/crypto/openssl/crypto/evp/m_dss1.c head/crypto/openssl/crypto/evp/m_ecdsa.c head/crypto/openssl/crypto/evp/m_md2.c head/crypto/openssl/crypto/evp/m_md4.c head/crypto/openssl/crypto/evp/m_md5.c head/crypto/openssl/crypto/evp/m_mdc2.c head/crypto/openssl/crypto/evp/m_ripemd.c head/crypto/openssl/crypto/evp/m_sha.c head/crypto/openssl/crypto/evp/m_sha1.c head/crypto/openssl/crypto/evp/names.c head/crypto/openssl/crypto/evp/p5_crpt.c head/crypto/openssl/crypto/evp/p5_crpt2.c head/crypto/openssl/crypto/evp/p_dec.c head/crypto/openssl/crypto/evp/p_enc.c head/crypto/openssl/crypto/evp/p_lib.c head/crypto/openssl/crypto/evp/p_open.c head/crypto/openssl/crypto/evp/p_seal.c head/crypto/openssl/crypto/evp/p_sign.c head/crypto/openssl/crypto/evp/p_verify.c head/crypto/openssl/crypto/ex_data.c head/crypto/openssl/crypto/fips_err.h head/crypto/openssl/crypto/hmac/Makefile head/crypto/openssl/crypto/hmac/hmac.c head/crypto/openssl/crypto/hmac/hmac.h head/crypto/openssl/crypto/ia64cpuid.S head/crypto/openssl/crypto/idea/Makefile head/crypto/openssl/crypto/idea/i_skey.c head/crypto/openssl/crypto/idea/idea.h head/crypto/openssl/crypto/jpake/Makefile head/crypto/openssl/crypto/jpake/jpake.c head/crypto/openssl/crypto/jpake/jpaketest.c head/crypto/openssl/crypto/krb5/Makefile head/crypto/openssl/crypto/lhash/Makefile head/crypto/openssl/crypto/lhash/lh_stats.c head/crypto/openssl/crypto/lhash/lhash.c head/crypto/openssl/crypto/lhash/lhash.h head/crypto/openssl/crypto/md2/Makefile head/crypto/openssl/crypto/md2/md2_dgst.c head/crypto/openssl/crypto/md32_common.h head/crypto/openssl/crypto/md4/Makefile head/crypto/openssl/crypto/md4/md4.h head/crypto/openssl/crypto/md4/md4_dgst.c head/crypto/openssl/crypto/md5/Makefile head/crypto/openssl/crypto/md5/asm/md5-586.pl head/crypto/openssl/crypto/md5/asm/md5-x86_64.pl head/crypto/openssl/crypto/md5/md5.h head/crypto/openssl/crypto/md5/md5_dgst.c head/crypto/openssl/crypto/md5/md5_locl.h head/crypto/openssl/crypto/mdc2/Makefile head/crypto/openssl/crypto/mdc2/mdc2.h head/crypto/openssl/crypto/mdc2/mdc2dgst.c head/crypto/openssl/crypto/mem.c head/crypto/openssl/crypto/mem_dbg.c head/crypto/openssl/crypto/o_init.c head/crypto/openssl/crypto/o_time.c head/crypto/openssl/crypto/o_time.h head/crypto/openssl/crypto/objects/Makefile head/crypto/openssl/crypto/objects/o_names.c head/crypto/openssl/crypto/objects/obj_dat.c head/crypto/openssl/crypto/objects/obj_dat.h head/crypto/openssl/crypto/objects/obj_dat.pl head/crypto/openssl/crypto/objects/obj_err.c head/crypto/openssl/crypto/objects/obj_lib.c head/crypto/openssl/crypto/objects/obj_mac.h head/crypto/openssl/crypto/objects/obj_mac.num head/crypto/openssl/crypto/objects/objects.h head/crypto/openssl/crypto/objects/objects.pl head/crypto/openssl/crypto/objects/objects.txt head/crypto/openssl/crypto/ocsp/Makefile head/crypto/openssl/crypto/ocsp/ocsp.h head/crypto/openssl/crypto/ocsp/ocsp_cl.c head/crypto/openssl/crypto/ocsp/ocsp_err.c head/crypto/openssl/crypto/ocsp/ocsp_ext.c head/crypto/openssl/crypto/ocsp/ocsp_ht.c head/crypto/openssl/crypto/ocsp/ocsp_lib.c head/crypto/openssl/crypto/ocsp/ocsp_prn.c head/crypto/openssl/crypto/ocsp/ocsp_vfy.c head/crypto/openssl/crypto/opensslconf.h head/crypto/openssl/crypto/opensslconf.h.in head/crypto/openssl/crypto/opensslv.h head/crypto/openssl/crypto/ossl_typ.h head/crypto/openssl/crypto/pem/Makefile head/crypto/openssl/crypto/pem/pem.h head/crypto/openssl/crypto/pem/pem_all.c head/crypto/openssl/crypto/pem/pem_err.c head/crypto/openssl/crypto/pem/pem_info.c head/crypto/openssl/crypto/pem/pem_lib.c head/crypto/openssl/crypto/pem/pem_pkey.c head/crypto/openssl/crypto/pem/pem_x509.c head/crypto/openssl/crypto/pem/pem_xaux.c head/crypto/openssl/crypto/perlasm/x86_64-xlate.pl head/crypto/openssl/crypto/perlasm/x86asm.pl head/crypto/openssl/crypto/perlasm/x86nasm.pl head/crypto/openssl/crypto/pkcs12/Makefile head/crypto/openssl/crypto/pkcs12/p12_add.c head/crypto/openssl/crypto/pkcs12/p12_attr.c head/crypto/openssl/crypto/pkcs12/p12_crpt.c head/crypto/openssl/crypto/pkcs12/p12_crt.c head/crypto/openssl/crypto/pkcs12/p12_decr.c head/crypto/openssl/crypto/pkcs12/p12_key.c head/crypto/openssl/crypto/pkcs12/p12_kiss.c head/crypto/openssl/crypto/pkcs12/p12_mutl.c head/crypto/openssl/crypto/pkcs12/p12_utl.c head/crypto/openssl/crypto/pkcs12/pk12err.c head/crypto/openssl/crypto/pkcs12/pkcs12.h head/crypto/openssl/crypto/pkcs7/Makefile head/crypto/openssl/crypto/pkcs7/pk7_asn1.c head/crypto/openssl/crypto/pkcs7/pk7_attr.c head/crypto/openssl/crypto/pkcs7/pk7_doit.c head/crypto/openssl/crypto/pkcs7/pk7_lib.c head/crypto/openssl/crypto/pkcs7/pk7_mime.c head/crypto/openssl/crypto/pkcs7/pk7_smime.c head/crypto/openssl/crypto/pkcs7/pkcs7.h head/crypto/openssl/crypto/pkcs7/pkcs7err.c head/crypto/openssl/crypto/pqueue/Makefile head/crypto/openssl/crypto/pqueue/pqueue.c head/crypto/openssl/crypto/pqueue/pqueue.h head/crypto/openssl/crypto/rand/Makefile head/crypto/openssl/crypto/rand/md_rand.c head/crypto/openssl/crypto/rand/rand.h head/crypto/openssl/crypto/rand/rand_egd.c head/crypto/openssl/crypto/rand/rand_err.c head/crypto/openssl/crypto/rand/rand_lcl.h head/crypto/openssl/crypto/rand/rand_lib.c head/crypto/openssl/crypto/rand/rand_unix.c head/crypto/openssl/crypto/rand/randfile.c head/crypto/openssl/crypto/rc2/Makefile head/crypto/openssl/crypto/rc2/rc2_skey.c head/crypto/openssl/crypto/rc4/Makefile head/crypto/openssl/crypto/rc4/asm/rc4-586.pl head/crypto/openssl/crypto/rc4/asm/rc4-x86_64.pl head/crypto/openssl/crypto/rc4/rc4.h head/crypto/openssl/crypto/rc4/rc4_enc.c head/crypto/openssl/crypto/rc4/rc4_skey.c head/crypto/openssl/crypto/rc4/rc4test.c head/crypto/openssl/crypto/rc5/Makefile head/crypto/openssl/crypto/rc5/asm/rc5-586.pl head/crypto/openssl/crypto/rc5/rc5.h head/crypto/openssl/crypto/rc5/rc5_skey.c head/crypto/openssl/crypto/ripemd/Makefile head/crypto/openssl/crypto/ripemd/asm/rmd-586.pl head/crypto/openssl/crypto/ripemd/ripemd.h head/crypto/openssl/crypto/ripemd/rmd_dgst.c head/crypto/openssl/crypto/ripemd/rmd_locl.h head/crypto/openssl/crypto/rsa/Makefile head/crypto/openssl/crypto/rsa/rsa.h head/crypto/openssl/crypto/rsa/rsa_asn1.c head/crypto/openssl/crypto/rsa/rsa_eay.c head/crypto/openssl/crypto/rsa/rsa_err.c head/crypto/openssl/crypto/rsa/rsa_gen.c head/crypto/openssl/crypto/rsa/rsa_lib.c head/crypto/openssl/crypto/rsa/rsa_oaep.c head/crypto/openssl/crypto/rsa/rsa_pss.c head/crypto/openssl/crypto/rsa/rsa_sign.c head/crypto/openssl/crypto/rsa/rsa_test.c head/crypto/openssl/crypto/seed/Makefile head/crypto/openssl/crypto/seed/seed.c head/crypto/openssl/crypto/seed/seed.h head/crypto/openssl/crypto/seed/seed_cbc.c head/crypto/openssl/crypto/seed/seed_cfb.c head/crypto/openssl/crypto/seed/seed_ofb.c head/crypto/openssl/crypto/sha/Makefile head/crypto/openssl/crypto/sha/asm/sha1-586.pl head/crypto/openssl/crypto/sha/asm/sha1-ia64.pl head/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl head/crypto/openssl/crypto/sha/asm/sha512-x86_64.pl head/crypto/openssl/crypto/sha/sha.h head/crypto/openssl/crypto/sha/sha1_one.c head/crypto/openssl/crypto/sha/sha1dgst.c head/crypto/openssl/crypto/sha/sha256.c head/crypto/openssl/crypto/sha/sha512.c head/crypto/openssl/crypto/sha/sha_dgst.c head/crypto/openssl/crypto/sha/sha_locl.h head/crypto/openssl/crypto/sha/shatest.c head/crypto/openssl/crypto/sparccpuid.S head/crypto/openssl/crypto/stack/Makefile head/crypto/openssl/crypto/stack/safestack.h head/crypto/openssl/crypto/stack/stack.c head/crypto/openssl/crypto/stack/stack.h head/crypto/openssl/crypto/store/Makefile head/crypto/openssl/crypto/store/store.h head/crypto/openssl/crypto/store/str_err.c head/crypto/openssl/crypto/store/str_lib.c head/crypto/openssl/crypto/store/str_mem.c head/crypto/openssl/crypto/symhacks.h head/crypto/openssl/crypto/threads/mttest.c head/crypto/openssl/crypto/txt_db/Makefile head/crypto/openssl/crypto/txt_db/txt_db.c head/crypto/openssl/crypto/txt_db/txt_db.h head/crypto/openssl/crypto/ui/Makefile head/crypto/openssl/crypto/ui/ui.h head/crypto/openssl/crypto/ui/ui_err.c head/crypto/openssl/crypto/ui/ui_lib.c head/crypto/openssl/crypto/ui/ui_openssl.c head/crypto/openssl/crypto/x509/Makefile head/crypto/openssl/crypto/x509/by_dir.c head/crypto/openssl/crypto/x509/by_file.c head/crypto/openssl/crypto/x509/x509.h head/crypto/openssl/crypto/x509/x509_cmp.c head/crypto/openssl/crypto/x509/x509_err.c head/crypto/openssl/crypto/x509/x509_lu.c head/crypto/openssl/crypto/x509/x509_obj.c head/crypto/openssl/crypto/x509/x509_req.c head/crypto/openssl/crypto/x509/x509_set.c head/crypto/openssl/crypto/x509/x509_trs.c head/crypto/openssl/crypto/x509/x509_txt.c head/crypto/openssl/crypto/x509/x509_vfy.c head/crypto/openssl/crypto/x509/x509_vfy.h head/crypto/openssl/crypto/x509/x509_vpm.c head/crypto/openssl/crypto/x509/x509cset.c head/crypto/openssl/crypto/x509/x509name.c head/crypto/openssl/crypto/x509/x509type.c head/crypto/openssl/crypto/x509/x_all.c head/crypto/openssl/crypto/x509v3/Makefile head/crypto/openssl/crypto/x509v3/ext_dat.h head/crypto/openssl/crypto/x509v3/pcy_cache.c head/crypto/openssl/crypto/x509v3/pcy_data.c head/crypto/openssl/crypto/x509v3/pcy_int.h head/crypto/openssl/crypto/x509v3/pcy_map.c head/crypto/openssl/crypto/x509v3/pcy_node.c head/crypto/openssl/crypto/x509v3/pcy_tree.c head/crypto/openssl/crypto/x509v3/v3_addr.c head/crypto/openssl/crypto/x509v3/v3_alt.c head/crypto/openssl/crypto/x509v3/v3_asid.c head/crypto/openssl/crypto/x509v3/v3_conf.c head/crypto/openssl/crypto/x509v3/v3_cpols.c head/crypto/openssl/crypto/x509v3/v3_crld.c head/crypto/openssl/crypto/x509v3/v3_enum.c head/crypto/openssl/crypto/x509v3/v3_extku.c head/crypto/openssl/crypto/x509v3/v3_genn.c head/crypto/openssl/crypto/x509v3/v3_lib.c head/crypto/openssl/crypto/x509v3/v3_ncons.c head/crypto/openssl/crypto/x509v3/v3_ocsp.c head/crypto/openssl/crypto/x509v3/v3_pci.c head/crypto/openssl/crypto/x509v3/v3_pcons.c head/crypto/openssl/crypto/x509v3/v3_pmaps.c head/crypto/openssl/crypto/x509v3/v3_prn.c head/crypto/openssl/crypto/x509v3/v3_purp.c head/crypto/openssl/crypto/x509v3/v3_skey.c head/crypto/openssl/crypto/x509v3/v3_utl.c head/crypto/openssl/crypto/x509v3/v3err.c head/crypto/openssl/crypto/x509v3/x509v3.h head/crypto/openssl/crypto/x86_64cpuid.pl head/crypto/openssl/crypto/x86cpuid.pl head/crypto/openssl/doc/apps/asn1parse.pod head/crypto/openssl/doc/apps/ca.pod head/crypto/openssl/doc/apps/ciphers.pod head/crypto/openssl/doc/apps/config.pod head/crypto/openssl/doc/apps/dgst.pod head/crypto/openssl/doc/apps/dhparam.pod head/crypto/openssl/doc/apps/dsa.pod head/crypto/openssl/doc/apps/dsaparam.pod head/crypto/openssl/doc/apps/ec.pod head/crypto/openssl/doc/apps/ecparam.pod head/crypto/openssl/doc/apps/enc.pod head/crypto/openssl/doc/apps/gendsa.pod head/crypto/openssl/doc/apps/genrsa.pod head/crypto/openssl/doc/apps/ocsp.pod head/crypto/openssl/doc/apps/openssl.pod head/crypto/openssl/doc/apps/pkcs12.pod head/crypto/openssl/doc/apps/pkcs7.pod head/crypto/openssl/doc/apps/pkcs8.pod head/crypto/openssl/doc/apps/req.pod head/crypto/openssl/doc/apps/rsa.pod head/crypto/openssl/doc/apps/s_client.pod head/crypto/openssl/doc/apps/s_server.pod head/crypto/openssl/doc/apps/smime.pod head/crypto/openssl/doc/apps/speed.pod head/crypto/openssl/doc/apps/spkac.pod head/crypto/openssl/doc/apps/verify.pod head/crypto/openssl/doc/apps/x509.pod head/crypto/openssl/doc/apps/x509v3_config.pod head/crypto/openssl/doc/crypto/ASN1_generate_nconf.pod head/crypto/openssl/doc/crypto/BIO_f_md.pod head/crypto/openssl/doc/crypto/BIO_f_ssl.pod head/crypto/openssl/doc/crypto/BIO_s_file.pod head/crypto/openssl/doc/crypto/BIO_s_mem.pod head/crypto/openssl/doc/crypto/BN_BLINDING_new.pod head/crypto/openssl/doc/crypto/DSA_get_ex_new_index.pod head/crypto/openssl/doc/crypto/EVP_DigestInit.pod head/crypto/openssl/doc/crypto/EVP_SignInit.pod head/crypto/openssl/doc/crypto/EVP_VerifyInit.pod head/crypto/openssl/doc/crypto/PKCS7_encrypt.pod head/crypto/openssl/doc/crypto/PKCS7_sign.pod head/crypto/openssl/doc/crypto/SMIME_write_PKCS7.pod head/crypto/openssl/doc/crypto/d2i_RSAPublicKey.pod head/crypto/openssl/doc/crypto/ecdsa.pod head/crypto/openssl/doc/crypto/evp.pod head/crypto/openssl/doc/crypto/hmac.pod head/crypto/openssl/doc/crypto/lhash.pod head/crypto/openssl/doc/crypto/threads.pod head/crypto/openssl/doc/ssl/SSL_CTX_new.pod head/crypto/openssl/doc/ssl/SSL_CTX_set_mode.pod head/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod head/crypto/openssl/doc/ssl/SSL_CTX_set_ssl_version.pod head/crypto/openssl/doc/ssl/SSL_alert_type_string.pod head/crypto/openssl/doc/ssl/SSL_library_init.pod head/crypto/openssl/doc/ssl/ssl.pod head/crypto/openssl/doc/ssleay.txt head/crypto/openssl/doc/standards.txt head/crypto/openssl/e_os.h head/crypto/openssl/e_os2.h head/crypto/openssl/engines/Makefile head/crypto/openssl/engines/e_4758cca.c head/crypto/openssl/engines/e_aep.c head/crypto/openssl/engines/e_capi.c head/crypto/openssl/engines/e_capi_err.c head/crypto/openssl/engines/e_chil.c head/crypto/openssl/engines/e_gmp.c head/crypto/openssl/engines/e_sureware.c head/crypto/openssl/engines/e_ubsec.c head/crypto/openssl/ssl/Makefile head/crypto/openssl/ssl/bio_ssl.c head/crypto/openssl/ssl/d1_both.c head/crypto/openssl/ssl/d1_clnt.c head/crypto/openssl/ssl/d1_enc.c head/crypto/openssl/ssl/d1_lib.c head/crypto/openssl/ssl/d1_meth.c head/crypto/openssl/ssl/d1_pkt.c head/crypto/openssl/ssl/d1_srvr.c head/crypto/openssl/ssl/dtls1.h head/crypto/openssl/ssl/kssl.c head/crypto/openssl/ssl/kssl.h head/crypto/openssl/ssl/kssl_lcl.h head/crypto/openssl/ssl/s23_clnt.c head/crypto/openssl/ssl/s23_lib.c head/crypto/openssl/ssl/s23_meth.c head/crypto/openssl/ssl/s23_srvr.c head/crypto/openssl/ssl/s2_clnt.c head/crypto/openssl/ssl/s2_enc.c head/crypto/openssl/ssl/s2_lib.c head/crypto/openssl/ssl/s2_meth.c head/crypto/openssl/ssl/s2_pkt.c head/crypto/openssl/ssl/s2_srvr.c head/crypto/openssl/ssl/s3_both.c head/crypto/openssl/ssl/s3_clnt.c head/crypto/openssl/ssl/s3_enc.c head/crypto/openssl/ssl/s3_lib.c head/crypto/openssl/ssl/s3_meth.c head/crypto/openssl/ssl/s3_pkt.c head/crypto/openssl/ssl/s3_srvr.c head/crypto/openssl/ssl/ssl.h head/crypto/openssl/ssl/ssl2.h head/crypto/openssl/ssl/ssl3.h head/crypto/openssl/ssl/ssl_algs.c head/crypto/openssl/ssl/ssl_asn1.c head/crypto/openssl/ssl/ssl_cert.c head/crypto/openssl/ssl/ssl_ciph.c head/crypto/openssl/ssl/ssl_err.c head/crypto/openssl/ssl/ssl_lib.c head/crypto/openssl/ssl/ssl_locl.h head/crypto/openssl/ssl/ssl_sess.c head/crypto/openssl/ssl/ssl_stat.c head/crypto/openssl/ssl/ssl_txt.c head/crypto/openssl/ssl/ssltest.c head/crypto/openssl/ssl/t1_clnt.c head/crypto/openssl/ssl/t1_enc.c head/crypto/openssl/ssl/t1_lib.c head/crypto/openssl/ssl/t1_meth.c head/crypto/openssl/ssl/t1_srvr.c head/crypto/openssl/ssl/tls1.h head/crypto/openssl/util/ck_errf.pl head/crypto/openssl/util/clean-depend.pl head/crypto/openssl/util/domd head/crypto/openssl/util/libeay.num head/crypto/openssl/util/mk1mf.pl head/crypto/openssl/util/mkdef.pl head/crypto/openssl/util/mkerr.pl head/crypto/openssl/util/mkfiles.pl head/crypto/openssl/util/mklink.pl head/crypto/openssl/util/mkstack.pl head/crypto/openssl/util/pl/BC-32.pl head/crypto/openssl/util/pl/Mingw32.pl head/crypto/openssl/util/pl/VC-32.pl head/crypto/openssl/util/pl/netware.pl head/crypto/openssl/util/point.sh head/crypto/openssl/util/selftest.pl head/crypto/openssl/util/shlib_wrap.sh head/crypto/openssl/util/ssleay.num head/lib/libfetch/common.h head/secure/lib/libcrypto/Makefile head/secure/lib/libcrypto/Makefile.asm head/secure/lib/libcrypto/Makefile.inc head/secure/lib/libcrypto/Makefile.man head/secure/lib/libcrypto/engines/Makefile head/secure/lib/libcrypto/engines/Makefile.inc head/secure/lib/libcrypto/i386/bf-586.s head/secure/lib/libcrypto/i386/bf-686.s head/secure/lib/libcrypto/i386/bn-586.s head/secure/lib/libcrypto/i386/cast-586.s head/secure/lib/libcrypto/i386/co-586.s head/secure/lib/libcrypto/i386/crypt586.s head/secure/lib/libcrypto/i386/des-586.s head/secure/lib/libcrypto/i386/md5-586.s head/secure/lib/libcrypto/i386/rc4-586.s head/secure/lib/libcrypto/i386/rc5-586.s head/secure/lib/libcrypto/i386/rmd-586.s head/secure/lib/libcrypto/i386/sha1-586.s head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 (contents, props changed) head/secure/lib/libcrypto/man/ASN1_STRING_length.3 (contents, props changed) head/secure/lib/libcrypto/man/ASN1_STRING_new.3 (contents, props changed) head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 (contents, props changed) head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 (contents, props changed) head/secure/lib/libcrypto/man/BIO_ctrl.3 (contents, props changed) head/secure/lib/libcrypto/man/BIO_f_base64.3 (contents, props changed) head/secure/lib/libcrypto/man/BIO_f_buffer.3 (contents, props changed) head/secure/lib/libcrypto/man/BIO_f_cipher.3 (contents, props changed) head/secure/lib/libcrypto/man/BIO_f_md.3 (contents, props changed) head/secure/lib/libcrypto/man/BIO_f_null.3 (contents, props changed) head/secure/lib/libcrypto/man/BIO_f_ssl.3 (contents, props changed) head/secure/lib/libcrypto/man/BIO_find_type.3 (contents, props changed) head/secure/lib/libcrypto/man/BIO_new.3 (contents, props changed) head/secure/lib/libcrypto/man/BIO_push.3 (contents, props changed) head/secure/lib/libcrypto/man/BIO_read.3 (contents, props changed) head/secure/lib/libcrypto/man/BIO_s_accept.3 (contents, props changed) head/secure/lib/libcrypto/man/BIO_s_bio.3 (contents, props changed) head/secure/lib/libcrypto/man/BIO_s_connect.3 (contents, props changed) head/secure/lib/libcrypto/man/BIO_s_fd.3 (contents, props changed) head/secure/lib/libcrypto/man/BIO_s_file.3 (contents, props changed) head/secure/lib/libcrypto/man/BIO_s_mem.3 (contents, props changed) head/secure/lib/libcrypto/man/BIO_s_null.3 (contents, props changed) head/secure/lib/libcrypto/man/BIO_s_socket.3 (contents, props changed) head/secure/lib/libcrypto/man/BIO_set_callback.3 (contents, props changed) head/secure/lib/libcrypto/man/BIO_should_retry.3 (contents, props changed) head/secure/lib/libcrypto/man/BN_BLINDING_new.3 (contents, props changed) head/secure/lib/libcrypto/man/BN_CTX_new.3 (contents, props changed) head/secure/lib/libcrypto/man/BN_CTX_start.3 (contents, props changed) head/secure/lib/libcrypto/man/BN_add.3 (contents, props changed) head/secure/lib/libcrypto/man/BN_add_word.3 (contents, props changed) head/secure/lib/libcrypto/man/BN_bn2bin.3 (contents, props changed) head/secure/lib/libcrypto/man/BN_cmp.3 (contents, props changed) head/secure/lib/libcrypto/man/BN_copy.3 (contents, props changed) head/secure/lib/libcrypto/man/BN_generate_prime.3 (contents, props changed) head/secure/lib/libcrypto/man/BN_mod_inverse.3 (contents, props changed) head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 (contents, props changed) head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 (contents, props changed) head/secure/lib/libcrypto/man/BN_new.3 (contents, props changed) head/secure/lib/libcrypto/man/BN_num_bytes.3 (contents, props changed) head/secure/lib/libcrypto/man/BN_rand.3 (contents, props changed) head/secure/lib/libcrypto/man/BN_set_bit.3 (contents, props changed) head/secure/lib/libcrypto/man/BN_swap.3 (contents, props changed) head/secure/lib/libcrypto/man/BN_zero.3 (contents, props changed) head/secure/lib/libcrypto/man/CONF_modules_free.3 (contents, props changed) head/secure/lib/libcrypto/man/CONF_modules_load_file.3 (contents, props changed) head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 (contents, props changed) head/secure/lib/libcrypto/man/DH_generate_key.3 (contents, props changed) head/secure/lib/libcrypto/man/DH_generate_parameters.3 (contents, props changed) head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 (contents, props changed) head/secure/lib/libcrypto/man/DH_new.3 (contents, props changed) head/secure/lib/libcrypto/man/DH_set_method.3 (contents, props changed) head/secure/lib/libcrypto/man/DH_size.3 (contents, props changed) head/secure/lib/libcrypto/man/DSA_SIG_new.3 (contents, props changed) head/secure/lib/libcrypto/man/DSA_do_sign.3 (contents, props changed) head/secure/lib/libcrypto/man/DSA_dup_DH.3 (contents, props changed) head/secure/lib/libcrypto/man/DSA_generate_key.3 (contents, props changed) head/secure/lib/libcrypto/man/DSA_generate_parameters.3 (contents, props changed) head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 (contents, props changed) head/secure/lib/libcrypto/man/DSA_new.3 (contents, props changed) head/secure/lib/libcrypto/man/DSA_set_method.3 (contents, props changed) head/secure/lib/libcrypto/man/DSA_sign.3 (contents, props changed) head/secure/lib/libcrypto/man/DSA_size.3 (contents, props changed) head/secure/lib/libcrypto/man/ERR_GET_LIB.3 (contents, props changed) head/secure/lib/libcrypto/man/ERR_clear_error.3 (contents, props changed) head/secure/lib/libcrypto/man/ERR_error_string.3 (contents, props changed) head/secure/lib/libcrypto/man/ERR_get_error.3 (contents, props changed) head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 (contents, props changed) head/secure/lib/libcrypto/man/ERR_load_strings.3 (contents, props changed) head/secure/lib/libcrypto/man/ERR_print_errors.3 (contents, props changed) head/secure/lib/libcrypto/man/ERR_put_error.3 (contents, props changed) head/secure/lib/libcrypto/man/ERR_remove_state.3 (contents, props changed) head/secure/lib/libcrypto/man/ERR_set_mark.3 (contents, props changed) head/secure/lib/libcrypto/man/EVP_BytesToKey.3 (contents, props changed) head/secure/lib/libcrypto/man/EVP_DigestInit.3 (contents, props changed) head/secure/lib/libcrypto/man/EVP_EncryptInit.3 (contents, props changed) head/secure/lib/libcrypto/man/EVP_OpenInit.3 (contents, props changed) head/secure/lib/libcrypto/man/EVP_PKEY_new.3 (contents, props changed) head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 (contents, props changed) head/secure/lib/libcrypto/man/EVP_SealInit.3 (contents, props changed) head/secure/lib/libcrypto/man/EVP_SignInit.3 (contents, props changed) head/secure/lib/libcrypto/man/EVP_VerifyInit.3 (contents, props changed) head/secure/lib/libcrypto/man/OBJ_nid2obj.3 (contents, props changed) head/secure/lib/libcrypto/man/OPENSSL_Applink.3 (contents, props changed) head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 (contents, props changed) head/secure/lib/libcrypto/man/OPENSSL_config.3 (contents, props changed) head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 (contents, props changed) head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 (contents, props changed) head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 (contents, props changed) head/secure/lib/libcrypto/man/PKCS12_create.3 (contents, props changed) head/secure/lib/libcrypto/man/PKCS12_parse.3 (contents, props changed) head/secure/lib/libcrypto/man/PKCS7_decrypt.3 (contents, props changed) head/secure/lib/libcrypto/man/PKCS7_encrypt.3 (contents, props changed) head/secure/lib/libcrypto/man/PKCS7_sign.3 (contents, props changed) head/secure/lib/libcrypto/man/PKCS7_verify.3 (contents, props changed) head/secure/lib/libcrypto/man/RAND_add.3 (contents, props changed) head/secure/lib/libcrypto/man/RAND_bytes.3 (contents, props changed) head/secure/lib/libcrypto/man/RAND_cleanup.3 (contents, props changed) head/secure/lib/libcrypto/man/RAND_egd.3 (contents, props changed) head/secure/lib/libcrypto/man/RAND_load_file.3 (contents, props changed) head/secure/lib/libcrypto/man/RAND_set_rand_method.3 (contents, props changed) head/secure/lib/libcrypto/man/RSA_blinding_on.3 (contents, props changed) head/secure/lib/libcrypto/man/RSA_check_key.3 (contents, props changed) head/secure/lib/libcrypto/man/RSA_generate_key.3 (contents, props changed) head/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 (contents, props changed) head/secure/lib/libcrypto/man/RSA_new.3 (contents, props changed) head/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 (contents, props changed) head/secure/lib/libcrypto/man/RSA_print.3 (contents, props changed) head/secure/lib/libcrypto/man/RSA_private_encrypt.3 (contents, props changed) head/secure/lib/libcrypto/man/RSA_public_encrypt.3 (contents, props changed) head/secure/lib/libcrypto/man/RSA_set_method.3 (contents, props changed) head/secure/lib/libcrypto/man/RSA_sign.3 (contents, props changed) head/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 (contents, props changed) head/secure/lib/libcrypto/man/RSA_size.3 (contents, props changed) head/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 (contents, props changed) head/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 (contents, props changed) head/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 (contents, props changed) head/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 (contents, props changed) head/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 (contents, props changed) head/secure/lib/libcrypto/man/X509_NAME_print_ex.3 (contents, props changed) head/secure/lib/libcrypto/man/X509_new.3 (contents, props changed) head/secure/lib/libcrypto/man/bio.3 (contents, props changed) head/secure/lib/libcrypto/man/blowfish.3 (contents, props changed) head/secure/lib/libcrypto/man/bn.3 (contents, props changed) head/secure/lib/libcrypto/man/bn_internal.3 (contents, props changed) head/secure/lib/libcrypto/man/buffer.3 (contents, props changed) head/secure/lib/libcrypto/man/crypto.3 (contents, props changed) head/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 (contents, props changed) head/secure/lib/libcrypto/man/d2i_DHparams.3 (contents, props changed) head/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 (contents, props changed) head/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 (contents, props changed) head/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 (contents, props changed) head/secure/lib/libcrypto/man/d2i_X509.3 (contents, props changed) head/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 (contents, props changed) head/secure/lib/libcrypto/man/d2i_X509_CRL.3 (contents, props changed) head/secure/lib/libcrypto/man/d2i_X509_NAME.3 (contents, props changed) head/secure/lib/libcrypto/man/d2i_X509_REQ.3 (contents, props changed) head/secure/lib/libcrypto/man/d2i_X509_SIG.3 (contents, props changed) head/secure/lib/libcrypto/man/des.3 (contents, props changed) head/secure/lib/libcrypto/man/dh.3 (contents, props changed) head/secure/lib/libcrypto/man/dsa.3 (contents, props changed) head/secure/lib/libcrypto/man/ecdsa.3 (contents, props changed) head/secure/lib/libcrypto/man/engine.3 (contents, props changed) head/secure/lib/libcrypto/man/err.3 (contents, props changed) head/secure/lib/libcrypto/man/evp.3 (contents, props changed) head/secure/lib/libcrypto/man/hmac.3 (contents, props changed) head/secure/lib/libcrypto/man/lh_stats.3 (contents, props changed) head/secure/lib/libcrypto/man/lhash.3 (contents, props changed) head/secure/lib/libcrypto/man/md5.3 (contents, props changed) head/secure/lib/libcrypto/man/mdc2.3 (contents, props changed) head/secure/lib/libcrypto/man/pem.3 (contents, props changed) head/secure/lib/libcrypto/man/rand.3 (contents, props changed) head/secure/lib/libcrypto/man/rc4.3 (contents, props changed) head/secure/lib/libcrypto/man/ripemd.3 (contents, props changed) head/secure/lib/libcrypto/man/rsa.3 (contents, props changed) head/secure/lib/libcrypto/man/sha.3 (contents, props changed) head/secure/lib/libcrypto/man/threads.3 (contents, props changed) head/secure/lib/libcrypto/man/ui.3 (contents, props changed) head/secure/lib/libcrypto/man/ui_compat.3 (contents, props changed) head/secure/lib/libcrypto/man/x509.3 (contents, props changed) head/secure/lib/libcrypto/opensslconf-arm.h head/secure/lib/libcrypto/opensslconf-ia64.h head/secure/lib/libcrypto/opensslconf-mips.h head/secure/lib/libcrypto/opensslconf-powerpc.h head/secure/lib/libcrypto/opensslconf-sparc64.h head/secure/lib/libssl/Makefile head/secure/lib/libssl/Makefile.man head/secure/lib/libssl/man/SSL_CIPHER_get_name.3 (contents, props changed) head/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_add_session.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_ctrl.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_free.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_new.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_sess_number.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_sessions.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_set_mode.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_set_options.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_set_timeout.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_set_verify.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_use_certificate.3 (contents, props changed) head/secure/lib/libssl/man/SSL_SESSION_free.3 (contents, props changed) head/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 (contents, props changed) head/secure/lib/libssl/man/SSL_SESSION_get_time.3 (contents, props changed) head/secure/lib/libssl/man/SSL_accept.3 (contents, props changed) head/secure/lib/libssl/man/SSL_alert_type_string.3 (contents, props changed) head/secure/lib/libssl/man/SSL_clear.3 (contents, props changed) head/secure/lib/libssl/man/SSL_connect.3 (contents, props changed) head/secure/lib/libssl/man/SSL_do_handshake.3 (contents, props changed) head/secure/lib/libssl/man/SSL_free.3 (contents, props changed) head/secure/lib/libssl/man/SSL_get_SSL_CTX.3 (contents, props changed) head/secure/lib/libssl/man/SSL_get_ciphers.3 (contents, props changed) head/secure/lib/libssl/man/SSL_get_client_CA_list.3 (contents, props changed) head/secure/lib/libssl/man/SSL_get_current_cipher.3 (contents, props changed) head/secure/lib/libssl/man/SSL_get_default_timeout.3 (contents, props changed) head/secure/lib/libssl/man/SSL_get_error.3 (contents, props changed) head/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 (contents, props changed) head/secure/lib/libssl/man/SSL_get_ex_new_index.3 (contents, props changed) head/secure/lib/libssl/man/SSL_get_fd.3 (contents, props changed) head/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 (contents, props changed) head/secure/lib/libssl/man/SSL_get_peer_certificate.3 (contents, props changed) head/secure/lib/libssl/man/SSL_get_rbio.3 (contents, props changed) head/secure/lib/libssl/man/SSL_get_session.3 (contents, props changed) head/secure/lib/libssl/man/SSL_get_verify_result.3 (contents, props changed) head/secure/lib/libssl/man/SSL_get_version.3 (contents, props changed) head/secure/lib/libssl/man/SSL_library_init.3 (contents, props changed) head/secure/lib/libssl/man/SSL_load_client_CA_file.3 (contents, props changed) head/secure/lib/libssl/man/SSL_new.3 (contents, props changed) head/secure/lib/libssl/man/SSL_pending.3 (contents, props changed) head/secure/lib/libssl/man/SSL_read.3 (contents, props changed) head/secure/lib/libssl/man/SSL_rstate_string.3 (contents, props changed) head/secure/lib/libssl/man/SSL_session_reused.3 (contents, props changed) head/secure/lib/libssl/man/SSL_set_bio.3 (contents, props changed) head/secure/lib/libssl/man/SSL_set_connect_state.3 (contents, props changed) head/secure/lib/libssl/man/SSL_set_fd.3 (contents, props changed) head/secure/lib/libssl/man/SSL_set_session.3 (contents, props changed) head/secure/lib/libssl/man/SSL_set_shutdown.3 (contents, props changed) head/secure/lib/libssl/man/SSL_set_verify_result.3 (contents, props changed) head/secure/lib/libssl/man/SSL_shutdown.3 (contents, props changed) head/secure/lib/libssl/man/SSL_state_string.3 (contents, props changed) head/secure/lib/libssl/man/SSL_want.3 (contents, props changed) head/secure/lib/libssl/man/SSL_write.3 (contents, props changed) head/secure/lib/libssl/man/d2i_SSL_SESSION.3 (contents, props changed) head/secure/lib/libssl/man/ssl.3 (contents, props changed) head/secure/usr.bin/openssl/Makefile head/secure/usr.bin/openssl/Makefile.man head/secure/usr.bin/openssl/man/CA.pl.1 (contents, props changed) head/secure/usr.bin/openssl/man/asn1parse.1 (contents, props changed) head/secure/usr.bin/openssl/man/ca.1 (contents, props changed) head/secure/usr.bin/openssl/man/ciphers.1 (contents, props changed) head/secure/usr.bin/openssl/man/crl.1 (contents, props changed) head/secure/usr.bin/openssl/man/crl2pkcs7.1 (contents, props changed) head/secure/usr.bin/openssl/man/dgst.1 (contents, props changed) head/secure/usr.bin/openssl/man/dhparam.1 (contents, props changed) head/secure/usr.bin/openssl/man/dsa.1 (contents, props changed) head/secure/usr.bin/openssl/man/dsaparam.1 (contents, props changed) head/secure/usr.bin/openssl/man/ec.1 (contents, props changed) head/secure/usr.bin/openssl/man/ecparam.1 (contents, props changed) head/secure/usr.bin/openssl/man/enc.1 (contents, props changed) head/secure/usr.bin/openssl/man/errstr.1 (contents, props changed) head/secure/usr.bin/openssl/man/gendsa.1 (contents, props changed) head/secure/usr.bin/openssl/man/genrsa.1 (contents, props changed) head/secure/usr.bin/openssl/man/nseq.1 (contents, props changed) head/secure/usr.bin/openssl/man/ocsp.1 (contents, props changed) head/secure/usr.bin/openssl/man/openssl.1 (contents, props changed) head/secure/usr.bin/openssl/man/passwd.1 (contents, props changed) head/secure/usr.bin/openssl/man/pkcs12.1 (contents, props changed) head/secure/usr.bin/openssl/man/pkcs7.1 (contents, props changed) head/secure/usr.bin/openssl/man/pkcs8.1 (contents, props changed) head/secure/usr.bin/openssl/man/rand.1 (contents, props changed) head/secure/usr.bin/openssl/man/req.1 (contents, props changed) head/secure/usr.bin/openssl/man/rsa.1 (contents, props changed) head/secure/usr.bin/openssl/man/rsautl.1 (contents, props changed) head/secure/usr.bin/openssl/man/s_client.1 (contents, props changed) head/secure/usr.bin/openssl/man/s_server.1 (contents, props changed) head/secure/usr.bin/openssl/man/s_time.1 (contents, props changed) head/secure/usr.bin/openssl/man/sess_id.1 (contents, props changed) head/secure/usr.bin/openssl/man/smime.1 (contents, props changed) head/secure/usr.bin/openssl/man/speed.1 (contents, props changed) head/secure/usr.bin/openssl/man/spkac.1 (contents, props changed) head/secure/usr.bin/openssl/man/verify.1 (contents, props changed) head/secure/usr.bin/openssl/man/version.1 (contents, props changed) head/secure/usr.bin/openssl/man/x509.1 (contents, props changed) head/secure/usr.bin/openssl/man/x509v3_config.1 (contents, props changed) head/sys/sys/param.h Directory Properties: head/crypto/openssl/ (props changed) Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Jul 12 19:15:38 2012 (r238404) +++ head/ObsoleteFiles.inc Thu Jul 12 19:30:53 2012 (r238405) @@ -38,6 +38,22 @@ # xargs -n1 | sort | uniq -d; # done +# 20120712: OpenSSL 1.0.1c import +OLD_FILES+=lib/libcrypto.so.6 +OLD_FILES+=usr/include/openssl/aes_locl.h +OLD_FILES+=usr/include/openssl/bio_lcl.h +OLD_FILES+=usr/include/openssl/e_os.h +OLD_FILES+=usr/include/openssl/fips.h +OLD_FILES+=usr/include/openssl/fips_rand.h +OLD_FILES+=usr/include/openssl/md2.h +OLD_FILES+=usr/include/openssl/pq_compat.h +OLD_FILES+=usr/include/openssl/store.h +OLD_FILES+=usr/include/openssl/tmdiff.h +OLD_FILES+=usr/include/openssl/ui_locl.h +OLD_FILES+=usr/lib/libssl.so.6 +OLD_FILES+=usr/lib32/libcrypto.so.6 +OLD_FILES+=usr/lib32/libssl.so.6 +OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_set_id_callback.3.gz # 20120621: remove old man page OLD_FILES+=usr/share/man/man8/vnconfig.8.gz # 20120613: auth.conf removed Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Jul 12 19:15:38 2012 (r238404) +++ head/UPDATING Thu Jul 12 19:30:53 2012 (r238405) @@ -25,6 +25,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 "ln -s 'abort:false,junk:false' /etc/malloc.conf".) 20120712: + The OpenSSL has been upgraded to 1.0.1c. Any binaries requiring + libcrypto.so.6 or libssl.so.6 must be recompiled. Also, there are + configuration changes. Make sure to merge /etc/ssl/openssl.cnf. + +20120712: The following sysctls and tunables have been renamed for consistency with other variables: kern.cam.da.da_send_ordered -> kern.cam.da.send_ordered Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Thu Jul 12 19:15:38 2012 (r238404) +++ head/crypto/openssl/CHANGES Thu Jul 12 19:30:53 2012 (r238405) @@ -2,10 +2,10 @@ OpenSSL CHANGES _______________ - Changes between 0.9.8w and 0.9.8x [10 May 2012] + Changes between 1.0.1b and 1.0.1c [10 May 2012] - *) Sanity check record length before skipping explicit IV in DTLS - to fix DoS attack. + *) Sanity check record length before skipping explicit IV in TLS + 1.2, 1.1 and DTLS to fix DoS attack. Thanks to Codenomicon for discovering this issue using Fuzz-o-Matic fuzzing as a service testing platform. @@ -16,15 +16,34 @@ Thanks to Solar Designer of Openwall for reporting this issue. [Steve Henson] - Changes between 0.9.8v and 0.9.8w [23 Apr 2012] + *) In FIPS mode don't try to use composite ciphers as they are not + approved. + [Steve Henson] - *) The fix for CVE-2012-2110 did not take into account that the - 'len' argument to BUF_MEM_grow and BUF_MEM_grow_clean is an - int in OpenSSL 0.9.8, making it still vulnerable. Fix by - rejecting negative len parameter. (CVE-2012-2131) - [Tomas Hoger ] + Changes between 1.0.1a and 1.0.1b [26 Apr 2012] + + *) OpenSSL 1.0.0 sets SSL_OP_ALL to 0x80000FFFL and OpenSSL 1.0.1 and + 1.0.1a set SSL_OP_NO_TLSv1_1 to 0x00000400L which would unfortunately + mean any application compiled against OpenSSL 1.0.0 headers setting + SSL_OP_ALL would also set SSL_OP_NO_TLSv1_1, unintentionally disablng + TLS 1.1 also. Fix this by changing the value of SSL_OP_NO_TLSv1_1 to + 0x10000000L Any application which was previously compiled against + OpenSSL 1.0.1 or 1.0.1a headers and which cares about SSL_OP_NO_TLSv1_1 + will need to be recompiled as a result. Letting be results in + inability to disable specifically TLS 1.1 and in client context, + in unlike event, limit maximum offered version to TLS 1.0 [see below]. + [Steve Henson] + + *) In order to ensure interoperabilty SSL_OP_NO_protocolX does not + disable just protocol X, but all protocols above X *if* there are + protocols *below* X still enabled. In more practical terms it means + that if application wants to disable TLS1.0 in favor of TLS1.1 and + above, it's not sufficient to pass SSL_OP_NO_TLSv1, one has to pass + SSL_OP_NO_TLSv1|SSL_OP_NO_SSLv3|SSL_OP_NO_SSLv2. This applies to + client side. + [Andy Polyakov] - Changes between 0.9.8u and 0.9.8v [19 Apr 2012] + Changes between 1.0.1 and 1.0.1a [19 Apr 2012] *) Check for potentially exploitable overflows in asn1_d2i_read_bio BUF_mem_grow and BUF_mem_grow_clean. Refuse attempts to shrink buffer @@ -35,7 +54,310 @@ (CVE-2012-2110) [Adam Langley (Google), Tavis Ormandy, Google Security Team] - Changes between 0.9.8t and 0.9.8u [12 Mar 2012] + *) Don't allow TLS 1.2 SHA-256 ciphersuites in TLS 1.0, 1.1 connections. + [Adam Langley] + + *) Workarounds for some broken servers that "hang" if a client hello + record length exceeds 255 bytes. + + 1. Do not use record version number > TLS 1.0 in initial client + hello: some (but not all) hanging servers will now work. + 2. If we set OPENSSL_MAX_TLS1_2_CIPHER_LENGTH this will truncate + the number of ciphers sent in the client hello. This should be + set to an even number, such as 50, for example by passing: + -DOPENSSL_MAX_TLS1_2_CIPHER_LENGTH=50 to config or Configure. + Most broken servers should now work. + 3. If all else fails setting OPENSSL_NO_TLS1_2_CLIENT will disable + TLS 1.2 client support entirely. + [Steve Henson] + + *) Fix SEGV in Vector Permutation AES module observed in OpenSSH. + [Andy Polyakov] + + Changes between 1.0.0h and 1.0.1 [14 Mar 2012] + + *) Add compatibility with old MDC2 signatures which use an ASN1 OCTET + STRING form instead of a DigestInfo. + [Steve Henson] + + *) The format used for MDC2 RSA signatures is inconsistent between EVP + and the RSA_sign/RSA_verify functions. This was made more apparent when + OpenSSL used RSA_sign/RSA_verify for some RSA signatures in particular + those which went through EVP_PKEY_METHOD in 1.0.0 and later. Detect + the correct format in RSA_verify so both forms transparently work. + [Steve Henson] + + *) Some servers which support TLS 1.0 can choke if we initially indicate + support for TLS 1.2 and later renegotiate using TLS 1.0 in the RSA + encrypted premaster secret. As a workaround use the maximum pemitted + client version in client hello, this should keep such servers happy + and still work with previous versions of OpenSSL. + [Steve Henson] + + *) Add support for TLS/DTLS heartbeats. + [Robin Seggelmann ] + + *) Add support for SCTP. + [Robin Seggelmann ] + + *) Improved PRNG seeding for VOS. + [Paul Green ] + + *) Extensive assembler packs updates, most notably: + + - x86[_64]: AES-NI, PCLMULQDQ, RDRAND support; + - x86[_64]: SSSE3 support (SHA1, vector-permutation AES); + - x86_64: bit-sliced AES implementation; + - ARM: NEON support, contemporary platforms optimizations; + - s390x: z196 support; + - *: GHASH and GF(2^m) multiplication implementations; + + [Andy Polyakov] + + *) Make TLS-SRP code conformant with RFC 5054 API cleanup + (removal of unnecessary code) + [Peter Sylvester ] + + *) Add TLS key material exporter from RFC 5705. + [Eric Rescorla] + + *) Add DTLS-SRTP negotiation from RFC 5764. + [Eric Rescorla] + + *) Add Next Protocol Negotiation, + http://tools.ietf.org/html/draft-agl-tls-nextprotoneg-00. Can be + disabled with a no-npn flag to config or Configure. Code donated + by Google. + [Adam Langley and Ben Laurie] + + *) Add optional 64-bit optimized implementations of elliptic curves NIST-P224, + NIST-P256, NIST-P521, with constant-time single point multiplication on + typical inputs. Compiler support for the nonstandard type __uint128_t is + required to use this (present in gcc 4.4 and later, for 64-bit builds). + Code made available under Apache License version 2.0. + + Specify "enable-ec_nistp_64_gcc_128" on the Configure (or config) command + line to include this in your build of OpenSSL, and run "make depend" (or + "make update"). This enables the following EC_METHODs: + + EC_GFp_nistp224_method() + EC_GFp_nistp256_method() + EC_GFp_nistp521_method() + + EC_GROUP_new_by_curve_name() will automatically use these (while + EC_GROUP_new_curve_GFp() currently prefers the more flexible + implementations). + [Emilia Käsper, Adam Langley, Bodo Moeller (Google)] + + *) Use type ossl_ssize_t instad of ssize_t which isn't available on + all platforms. Move ssize_t definition from e_os.h to the public + header file e_os2.h as it now appears in public header file cms.h + [Steve Henson] + + *) New -sigopt option to the ca, req and x509 utilities. Additional + signature parameters can be passed using this option and in + particular PSS. + [Steve Henson] + + *) Add RSA PSS signing function. This will generate and set the + appropriate AlgorithmIdentifiers for PSS based on those in the + corresponding EVP_MD_CTX structure. No application support yet. + [Steve Henson] + + *) Support for companion algorithm specific ASN1 signing routines. + New function ASN1_item_sign_ctx() signs a pre-initialised + EVP_MD_CTX structure and sets AlgorithmIdentifiers based on + the appropriate parameters. + [Steve Henson] + + *) Add new algorithm specific ASN1 verification initialisation function + to EVP_PKEY_ASN1_METHOD: this is not in EVP_PKEY_METHOD since the ASN1 + handling will be the same no matter what EVP_PKEY_METHOD is used. + Add a PSS handler to support verification of PSS signatures: checked + against a number of sample certificates. + [Steve Henson] + + *) Add signature printing for PSS. Add PSS OIDs. + [Steve Henson, Martin Kaiser ] + + *) Add algorithm specific signature printing. An individual ASN1 method + can now print out signatures instead of the standard hex dump. + + More complex signatures (e.g. PSS) can print out more meaningful + information. Include DSA version that prints out the signature + parameters r, s. + [Steve Henson] + + *) Password based recipient info support for CMS library: implementing + RFC3211. + [Steve Henson] + + *) Split password based encryption into PBES2 and PBKDF2 functions. This + neatly separates the code into cipher and PBE sections and is required + for some algorithms that split PBES2 into separate pieces (such as + password based CMS). + [Steve Henson] + + *) Session-handling fixes: + - Fix handling of connections that are resuming with a session ID, + but also support Session Tickets. + - Fix a bug that suppressed issuing of a new ticket if the client + presented a ticket with an expired session. + - Try to set the ticket lifetime hint to something reasonable. + - Make tickets shorter by excluding irrelevant information. + - On the client side, don't ignore renewed tickets. + [Adam Langley, Bodo Moeller (Google)] + + *) Fix PSK session representation. + [Bodo Moeller] + + *) Add RC4-MD5 and AESNI-SHA1 "stitched" implementations. + + This work was sponsored by Intel. + [Andy Polyakov] + + *) Add GCM support to TLS library. Some custom code is needed to split + the IV between the fixed (from PRF) and explicit (from TLS record) + portions. This adds all GCM ciphersuites supported by RFC5288 and + RFC5289. Generalise some AES* cipherstrings to inlclude GCM and + add a special AESGCM string for GCM only. + [Steve Henson] + + *) Expand range of ctrls for AES GCM. Permit setting invocation + field on decrypt and retrieval of invocation field only on encrypt. + [Steve Henson] + + *) Add HMAC ECC ciphersuites from RFC5289. Include SHA384 PRF support. + As required by RFC5289 these ciphersuites cannot be used if for + versions of TLS earlier than 1.2. + [Steve Henson] + + *) For FIPS capable OpenSSL interpret a NULL default public key method + as unset and return the appopriate default but do *not* set the default. + This means we can return the appopriate method in applications that + swicth between FIPS and non-FIPS modes. + [Steve Henson] + + *) Redirect HMAC and CMAC operations to FIPS module in FIPS mode. If an + ENGINE is used then we cannot handle that in the FIPS module so we + keep original code iff non-FIPS operations are allowed. + [Steve Henson] + + *) Add -attime option to openssl utilities. + [Peter Eckersley , Ben Laurie and Steve Henson] + + *) Redirect DSA and DH operations to FIPS module in FIPS mode. + [Steve Henson] + + *) Redirect ECDSA and ECDH operations to FIPS module in FIPS mode. Also use + FIPS EC methods unconditionally for now. + [Steve Henson] + + *) New build option no-ec2m to disable characteristic 2 code. + [Steve Henson] + + *) Backport libcrypto audit of return value checking from 1.1.0-dev; not + all cases can be covered as some introduce binary incompatibilities. + [Steve Henson] + + *) Redirect RSA operations to FIPS module including keygen, + encrypt, decrypt, sign and verify. Block use of non FIPS RSA methods. + [Steve Henson] + + *) Add similar low level API blocking to ciphers. + [Steve Henson] + + *) Low level digest APIs are not approved in FIPS mode: any attempt + to use these will cause a fatal error. Applications that *really* want + to use them can use the private_* version instead. + [Steve Henson] + + *) Redirect cipher operations to FIPS module for FIPS builds. + [Steve Henson] + + *) Redirect digest operations to FIPS module for FIPS builds. + [Steve Henson] + + *) Update build system to add "fips" flag which will link in fipscanister.o + for static and shared library builds embedding a signature if needed. + [Steve Henson] + + *) Output TLS supported curves in preference order instead of numerical + order. This is currently hardcoded for the highest order curves first. + This should be configurable so applications can judge speed vs strength. + [Steve Henson] + + *) Add TLS v1.2 server support for client authentication. + [Steve Henson] + + *) Add support for FIPS mode in ssl library: disable SSLv3, non-FIPS ciphers + and enable MD5. + [Steve Henson] + + *) Functions FIPS_mode_set() and FIPS_mode() which call the underlying + FIPS modules versions. + [Steve Henson] + + *) Add TLS v1.2 client side support for client authentication. Keep cache + of handshake records longer as we don't know the hash algorithm to use + until after the certificate request message is received. + [Steve Henson] + + *) Initial TLS v1.2 client support. Add a default signature algorithms + extension including all the algorithms we support. Parse new signature + format in client key exchange. Relax some ECC signing restrictions for + TLS v1.2 as indicated in RFC5246. + [Steve Henson] + + *) Add server support for TLS v1.2 signature algorithms extension. Switch + to new signature format when needed using client digest preference. + All server ciphersuites should now work correctly in TLS v1.2. No client + support yet and no support for client certificates. + [Steve Henson] + + *) Initial TLS v1.2 support. Add new SHA256 digest to ssl code, switch + to SHA256 for PRF when using TLS v1.2 and later. Add new SHA256 based + ciphersuites. At present only RSA key exchange ciphersuites work with + TLS v1.2. Add new option for TLS v1.2 replacing the old and obsolete + SSL_OP_PKCS1_CHECK flags with SSL_OP_NO_TLSv1_2. New TLSv1.2 methods + and version checking. + [Steve Henson] + + *) New option OPENSSL_NO_SSL_INTERN. If an application can be compiled + with this defined it will not be affected by any changes to ssl internal + structures. Add several utility functions to allow openssl application + to work with OPENSSL_NO_SSL_INTERN defined. + [Steve Henson] + + *) Add SRP support. + [Tom Wu and Ben Laurie] + + *) Add functions to copy EVP_PKEY_METHOD and retrieve flags and id. + [Steve Henson] + + *) Permit abbreviated handshakes when renegotiating using the function + SSL_renegotiate_abbreviated(). + [Robin Seggelmann ] + + *) Add call to ENGINE_register_all_complete() to + ENGINE_load_builtin_engines(), so some implementations get used + automatically instead of needing explicit application support. + [Steve Henson] + + *) Add support for TLS key exporter as described in RFC5705. + [Robin Seggelmann , Steve Henson] + + *) Initial TLSv1.1 support. Since TLSv1.1 is very similar to TLS v1.0 only + a few changes are required: + + Add SSL_OP_NO_TLSv1_1 flag. + Add TLSv1_1 methods. + Update version checking logic to handle version 1.1. + Add explicit IV handling (ported from DTLS code). + Add command line options to s_client/s_server. + [Steve Henson] + + Changes between 1.0.0g and 1.0.0h [12 Mar 2012] *) Fix MMA (Bleichenbacher's attack on PKCS #1 v1.5 RSA padding) weakness in CMS and PKCS7 code. When RSA decryption fails use a random key for @@ -53,7 +375,7 @@ Ivan Nestlerode for discovering this bug. [Steve Henson] - Changes between 0.9.8s and 0.9.8t [18 Jan 2012] + Changes between 1.0.0f and 1.0.0g [18 Jan 2012] *) Fix for DTLS DoS issue introduced by fix for CVE-2011-4109. Thanks to Antonio Martin, Enterprise Secure Access Research and @@ -61,6 +383,978 @@ preparing a fix. (CVE-2012-0050) [Antonio Martin] + Changes between 1.0.0e and 1.0.0f [4 Jan 2012] + + *) Nadhem Alfardan and Kenny Paterson have discovered an extension + of the Vaudenay padding oracle attack on CBC mode encryption + which enables an efficient plaintext recovery attack against + the OpenSSL implementation of DTLS. Their attack exploits timing + differences arising during decryption processing. A research + paper describing this attack can be found at: + http://www.isg.rhul.ac.uk/~kp/dtls.pdf + Thanks go to Nadhem Alfardan and Kenny Paterson of the Information + Security Group at Royal Holloway, University of London + (www.isg.rhul.ac.uk) for discovering this flaw and to Robin Seggelmann + and Michael Tuexen + for preparing the fix. (CVE-2011-4108) + [Robin Seggelmann, Michael Tuexen] + + *) Clear bytes used for block padding of SSL 3.0 records. + (CVE-2011-4576) + [Adam Langley (Google)] + + *) Only allow one SGC handshake restart for SSL/TLS. Thanks to George + Kadianakis for discovering this issue and + Adam Langley for preparing the fix. (CVE-2011-4619) + [Adam Langley (Google)] + + *) Check parameters are not NULL in GOST ENGINE. (CVE-2012-0027) + [Andrey Kulikov ] + + *) Prevent malformed RFC3779 data triggering an assertion failure. + Thanks to Andrew Chi, BBN Technologies, for discovering the flaw + and Rob Austein for fixing it. (CVE-2011-4577) + [Rob Austein ] + + *) Improved PRNG seeding for VOS. + [Paul Green ] + + *) Fix ssl_ciph.c set-up race. + [Adam Langley (Google)] + + *) Fix spurious failures in ecdsatest.c. + [Emilia Käsper (Google)] + + *) Fix the BIO_f_buffer() implementation (which was mixing different + interpretations of the '..._len' fields). + [Adam Langley (Google)] + + *) Fix handling of BN_BLINDING: now BN_BLINDING_invert_ex (rather than + BN_BLINDING_invert_ex) calls BN_BLINDING_update, ensuring that concurrent + threads won't reuse the same blinding coefficients. + + This also avoids the need to obtain the CRYPTO_LOCK_RSA_BLINDING + lock to call BN_BLINDING_invert_ex, and avoids one use of + BN_BLINDING_update for each BN_BLINDING structure (previously, + the last update always remained unused). + [Emilia Käsper (Google)] + + *) In ssl3_clear, preserve s3->init_extra along with s3->rbuf. + [Bob Buckholz (Google)] + + Changes between 1.0.0d and 1.0.0e [6 Sep 2011] + + *) Fix bug where CRLs with nextUpdate in the past are sometimes accepted + by initialising X509_STORE_CTX properly. (CVE-2011-3207) + [Kaspar Brand ] + + *) Fix SSL memory handling for (EC)DH ciphersuites, in particular + for multi-threaded use of ECDH. (CVE-2011-3210) + [Adam Langley (Google)] + + *) Fix x509_name_ex_d2i memory leak on bad inputs. + [Bodo Moeller] + + *) Remove hard coded ecdsaWithSHA1 signature tests in ssl code and check + signature public key algorithm by using OID xref utilities instead. + Before this you could only use some ECC ciphersuites with SHA1 only. + [Steve Henson] + + *) Add protection against ECDSA timing attacks as mentioned in the paper + by Billy Bob Brumley and Nicola Tuveri, see: + + http://eprint.iacr.org/2011/232.pdf + + [Billy Bob Brumley and Nicola Tuveri] + + Changes between 1.0.0c and 1.0.0d [8 Feb 2011] + + *) Fix parsing of OCSP stapling ClientHello extension. CVE-2011-0014 + [Neel Mehta, Adam Langley, Bodo Moeller (Google)] + + *) Fix bug in string printing code: if *any* escaping is enabled we must + escape the escape character (backslash) or the resulting string is + ambiguous. + [Steve Henson] + + Changes between 1.0.0b and 1.0.0c [2 Dec 2010] + + *) Disable code workaround for ancient and obsolete Netscape browsers + and servers: an attacker can use it in a ciphersuite downgrade attack. + Thanks to Martin Rex for discovering this bug. CVE-2010-4180 + [Steve Henson] + + *) Fixed J-PAKE implementation error, originally discovered by + Sebastien Martini, further info and confirmation from Stefan + Arentz and Feng Hao. Note that this fix is a security fix. CVE-2010-4252 + [Ben Laurie] + + Changes between 1.0.0a and 1.0.0b [16 Nov 2010] + + *) Fix extension code to avoid race conditions which can result in a buffer + overrun vulnerability: resumed sessions must not be modified as they can + be shared by multiple threads. CVE-2010-3864 + [Steve Henson] + + *) Fix WIN32 build system to correctly link an ENGINE directory into + a DLL. + [Steve Henson] + + Changes between 1.0.0 and 1.0.0a [01 Jun 2010] + + *) Check return value of int_rsa_verify in pkey_rsa_verifyrecover + (CVE-2010-1633) + [Steve Henson, Peter-Michael Hager ] + + Changes between 0.9.8n and 1.0.0 [29 Mar 2010] + + *) Add "missing" function EVP_CIPHER_CTX_copy(). This copies a cipher + context. The operation can be customised via the ctrl mechanism in + case ENGINEs want to include additional functionality. + [Steve Henson] + + *) Tolerate yet another broken PKCS#8 key format: private key value negative. + [Steve Henson] + + *) Add new -subject_hash_old and -issuer_hash_old options to x509 utility to + output hashes compatible with older versions of OpenSSL. + [Willy Weisz ] + + *) Fix compression algorithm handling: if resuming a session use the + compression algorithm of the resumed session instead of determining + it from client hello again. Don't allow server to change algorithm. + [Steve Henson] + + *) Add load_crls() function to apps tidying load_certs() too. Add option + to verify utility to allow additional CRLs to be included. + [Steve Henson] + + *) Update OCSP request code to permit adding custom headers to the request: + some responders need this. + [Steve Henson] + + *) The function EVP_PKEY_sign() returns <=0 on error: check return code + correctly. + [Julia Lawall ] + + *) Update verify callback code in apps/s_cb.c and apps/verify.c, it + needlessly dereferenced structures, used obsolete functions and + didn't handle all updated verify codes correctly. + [Steve Henson] + + *) Disable MD2 in the default configuration. + [Steve Henson] + + *) In BIO_pop() and BIO_push() use the ctrl argument (which was NULL) to + indicate the initial BIO being pushed or popped. This makes it possible + to determine whether the BIO is the one explicitly called or as a result + of the ctrl being passed down the chain. Fix BIO_pop() and SSL BIOs so + it handles reference counts correctly and doesn't zero out the I/O bio + when it is not being explicitly popped. WARNING: applications which + included workarounds for the old buggy behaviour will need to be modified + or they could free up already freed BIOs. + [Steve Henson] + + *) Extend the uni2asc/asc2uni => OPENSSL_uni2asc/OPENSSL_asc2uni + renaming to all platforms (within the 0.9.8 branch, this was + done conditionally on Netware platforms to avoid a name clash). + [Guenter ] + + *) Add ECDHE and PSK support to DTLS. + [Michael Tuexen ] + + *) Add CHECKED_STACK_OF macro to safestack.h, otherwise safestack can't + be used on C++. + [Steve Henson] + + *) Add "missing" function EVP_MD_flags() (without this the only way to + retrieve a digest flags is by accessing the structure directly. Update + EVP_MD_do_all*() and EVP_CIPHER_do_all*() to include the name a digest + or cipher is registered as in the "from" argument. Print out all + registered digests in the dgst usage message instead of manually + attempting to work them out. + [Steve Henson] + + *) If no SSLv2 ciphers are used don't use an SSLv2 compatible client hello: + this allows the use of compression and extensions. Change default cipher + string to remove SSLv2 ciphersuites. This effectively avoids ancient SSLv2 + by default unless an application cipher string requests it. + [Steve Henson] + + *) Alter match criteria in PKCS12_parse(). It used to try to use local + key ids to find matching certificates and keys but some PKCS#12 files + don't follow the (somewhat unwritten) rules and this strategy fails. + Now just gather all certificates together and the first private key + then look for the first certificate that matches the key. + [Steve Henson] + + *) Support use of registered digest and cipher names for dgst and cipher + commands instead of having to add each one as a special case. So now + you can do: + + openssl sha256 foo + + as well as: + + openssl dgst -sha256 foo + + and this works for ENGINE based algorithms too. + + [Steve Henson] + + *) Update Gost ENGINE to support parameter files. + [Victor B. Wagner ] + + *) Support GeneralizedTime in ca utility. + [Oliver Martin , Steve Henson] + + *) Enhance the hash format used for certificate directory links. The new + form uses the canonical encoding (meaning equivalent names will work + even if they aren't identical) and uses SHA1 instead of MD5. This form + is incompatible with the older format and as a result c_rehash should + be used to rebuild symbolic links. + [Steve Henson] + + *) Make PKCS#8 the default write format for private keys, replacing the + traditional format. This form is standardised, more secure and doesn't + include an implicit MD5 dependency. + [Steve Henson] + + *) Add a $gcc_devteam_warn option to Configure. The idea is that any code + committed to OpenSSL should pass this lot as a minimum. + [Steve Henson] + + *) Add session ticket override functionality for use by EAP-FAST. + [Jouni Malinen ] + + *) Modify HMAC functions to return a value. Since these can be implemented + in an ENGINE errors can occur. + [Steve Henson] + + *) Type-checked OBJ_bsearch_ex. + [Ben Laurie] + + *) Type-checked OBJ_bsearch. Also some constification necessitated + by type-checking. Still to come: TXT_DB, bsearch(?), + OBJ_bsearch_ex, qsort, CRYPTO_EX_DATA, ASN1_VALUE, ASN1_STRING, + CONF_VALUE. + [Ben Laurie] + + *) New function OPENSSL_gmtime_adj() to add a specific number of days and + seconds to a tm structure directly, instead of going through OS + specific date routines. This avoids any issues with OS routines such + as the year 2038 bug. New *_adj() functions for ASN1 time structures + and X509_time_adj_ex() to cover the extended range. The existing + X509_time_adj() is still usable and will no longer have any date issues. + [Steve Henson] + + *) Delta CRL support. New use deltas option which will attempt to locate + and search any appropriate delta CRLs available. + + This work was sponsored by Google. + [Steve Henson] + + *) Support for CRLs partitioned by reason code. Reorganise CRL processing + code and add additional score elements. Validate alternate CRL paths + as part of the CRL checking and indicate a new error "CRL path validation + error" in this case. Applications wanting additional details can use + the verify callback and check the new "parent" field. If this is not + NULL CRL path validation is taking place. Existing applications wont + see this because it requires extended CRL support which is off by + default. + + This work was sponsored by Google. + [Steve Henson] + + *) Support for freshest CRL extension. + + This work was sponsored by Google. + [Steve Henson] + + *) Initial indirect CRL support. Currently only supported in the CRLs + passed directly and not via lookup. Process certificate issuer + CRL entry extension and lookup CRL entries by bother issuer name + and serial number. Check and process CRL issuer entry in IDP extension. + + This work was sponsored by Google. + [Steve Henson] + + *) Add support for distinct certificate and CRL paths. The CRL issuer + certificate is validated separately in this case. Only enabled if + an extended CRL support flag is set: this flag will enable additional + CRL functionality in future. + + This work was sponsored by Google. + [Steve Henson] + + *) Add support for policy mappings extension. + + This work was sponsored by Google. + [Steve Henson] + + *) Fixes to pathlength constraint, self issued certificate handling, + policy processing to align with RFC3280 and PKITS tests. + + This work was sponsored by Google. + [Steve Henson] + + *) Support for name constraints certificate extension. DN, email, DNS + and URI types are currently supported. + + This work was sponsored by Google. + [Steve Henson] + + *) To cater for systems that provide a pointer-based thread ID rather + than numeric, deprecate the current numeric thread ID mechanism and + replace it with a structure and associated callback type. This + mechanism allows a numeric "hash" to be extracted from a thread ID in + either case, and on platforms where pointers are larger than 'long', + mixing is done to help ensure the numeric 'hash' is usable even if it + can't be guaranteed unique. The default mechanism is to use "&errno" + as a pointer-based thread ID to distinguish between threads. + + Applications that want to provide their own thread IDs should now use + CRYPTO_THREADID_set_callback() to register a callback that will call + either CRYPTO_THREADID_set_numeric() or CRYPTO_THREADID_set_pointer(). + + Note that ERR_remove_state() is now deprecated, because it is tied + to the assumption that thread IDs are numeric. ERR_remove_state(0) + to free the current thread's error state should be replaced by + ERR_remove_thread_state(NULL). + + (This new approach replaces the functions CRYPTO_set_idptr_callback(), + CRYPTO_get_idptr_callback(), and CRYPTO_thread_idptr() that existed in + OpenSSL 0.9.9-dev between June 2006 and August 2008. Also, if an + application was previously providing a numeric thread callback that + was inappropriate for distinguishing threads, then uniqueness might + have been obtained with &errno that happened immediately in the + intermediate development versions of OpenSSL; this is no longer the + case, the numeric thread callback will now override the automatic use + of &errno.) + [Geoff Thorpe, with help from Bodo Moeller] + + *) Initial support for different CRL issuing certificates. This covers a + simple case where the self issued certificates in the chain exist and + the real CRL issuer is higher in the existing chain. + + This work was sponsored by Google. + [Steve Henson] + + *) Removed effectively defunct crypto/store from the build. + [Ben Laurie] + + *) Revamp of STACK to provide stronger type-checking. Still to come: + TXT_DB, bsearch(?), OBJ_bsearch, qsort, CRYPTO_EX_DATA, ASN1_VALUE, + ASN1_STRING, CONF_VALUE. + [Ben Laurie] + + *) Add a new SSL_MODE_RELEASE_BUFFERS mode flag to release unused buffer + RAM on SSL connections. This option can save about 34k per idle SSL. + [Nick Mathewson] + + *) Revamp of LHASH to provide stronger type-checking. Still to come: + STACK, TXT_DB, bsearch, qsort. + [Ben Laurie] + + *) Initial support for Cryptographic Message Syntax (aka CMS) based + on RFC3850, RFC3851 and RFC3852. New cms directory and cms utility, + support for data, signedData, compressedData, digestedData and + encryptedData, envelopedData types included. Scripts to check against + RFC4134 examples draft and interop and consistency checks of many + content types and variants. + [Steve Henson] + + *) Add options to enc utility to support use of zlib compression BIO. + [Steve Henson] + + *) Extend mk1mf to support importing of options and assembly language + files from Configure script, currently only included in VC-WIN32. + The assembly language rules can now optionally generate the source + files from the associated perl scripts. + [Steve Henson] + + *) Implement remaining functionality needed to support GOST ciphersuites. + Interop testing has been performed using CryptoPro implementations. + [Victor B. Wagner ] + + *) s390x assembler pack. + [Andy Polyakov] + + *) ARMv4 assembler pack. ARMv4 refers to v4 and later ISA, not CPU + "family." + [Andy Polyakov] + + *) Implement Opaque PRF Input TLS extension as specified in + draft-rescorla-tls-opaque-prf-input-00.txt. Since this is not an + official specification yet and no extension type assignment by + IANA exists, this extension (for now) will have to be explicitly + enabled when building OpenSSL by providing the extension number + to use. For example, specify an option + + -DTLSEXT_TYPE_opaque_prf_input=0x9527 + + to the "config" or "Configure" script to enable the extension, + assuming extension number 0x9527 (which is a completely arbitrary + and unofficial assignment based on the MD5 hash of the Internet + Draft). Note that by doing so, you potentially lose + interoperability with other TLS implementations since these might + be using the same extension number for other purposes. + + SSL_set_tlsext_opaque_prf_input(ssl, src, len) is used to set the + opaque PRF input value to use in the handshake. This will create + an interal copy of the length-'len' string at 'src', and will + return non-zero for success. + + To get more control and flexibility, provide a callback function + by using + + SSL_CTX_set_tlsext_opaque_prf_input_callback(ctx, cb) + SSL_CTX_set_tlsext_opaque_prf_input_callback_arg(ctx, arg) + + where + + int (*cb)(SSL *, void *peerinput, size_t len, void *arg); + void *arg; + + Callback function 'cb' will be called in handshakes, and is + expected to use SSL_set_tlsext_opaque_prf_input() as appropriate. + Argument 'arg' is for application purposes (the value as given to + SSL_CTX_set_tlsext_opaque_prf_input_callback_arg() will directly + be provided to the callback function). The callback function + has to return non-zero to report success: usually 1 to use opaque + PRF input just if possible, or 2 to enforce use of the opaque PRF + input. In the latter case, the library will abort the handshake + if opaque PRF input is not successfully negotiated. + + Arguments 'peerinput' and 'len' given to the callback function + will always be NULL and 0 in the case of a client. A server will + see the client's opaque PRF input through these variables if + available (NULL and 0 otherwise). Note that if the server + provides an opaque PRF input, the length must be the same as the + length of the client's opaque PRF input. + + Note that the callback function will only be called when creating + a new session (session resumption can resume whatever was + previously negotiated), and will not be called in SSL 2.0 + handshakes; thus, SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2) or + SSL_set_options(ssl, SSL_OP_NO_SSLv2) is especially recommended + for applications that need to enforce opaque PRF input. + + [Bodo Moeller] + + *) Update ssl code to support digests other than SHA1+MD5 for handshake + MAC. + + [Victor B. Wagner ] + + *) Add RFC4507 support to OpenSSL. This includes the corrections in + RFC4507bis. The encrypted ticket format is an encrypted encoded + SSL_SESSION structure, that way new session features are automatically + supported. + + If a client application caches session in an SSL_SESSION structure + support is transparent because tickets are now stored in the encoded + SSL_SESSION. + + The SSL_CTX structure automatically generates keys for ticket + protection in servers so again support should be possible + with no application modification. + + If a client or server wishes to disable RFC4507 support then the option + SSL_OP_NO_TICKET can be set. + + Add a TLS extension debugging callback to allow the contents of any client + or server extensions to be examined. + + This work was sponsored by Google. + [Steve Henson] + + *) Final changes to avoid use of pointer pointer casts in OpenSSL. + OpenSSL should now compile cleanly on gcc 4.2 + [Peter Hartley , Steve Henson] + + *) Update SSL library to use new EVP_PKEY MAC API. Include generic MAC + support including streaming MAC support: this is required for GOST + ciphersuite support. + [Victor B. Wagner , Steve Henson] + + *) Add option -stream to use PKCS#7 streaming in smime utility. New + function i2d_PKCS7_bio_stream() and PEM_write_PKCS7_bio_stream() + to output in BER and PEM format. + [Steve Henson] + + *) Experimental support for use of HMAC via EVP_PKEY interface. This + allows HMAC to be handled via the EVP_DigestSign*() interface. The + EVP_PKEY "key" in this case is the HMAC key, potentially allowing + ENGINE support for HMAC keys which are unextractable. New -mac and + -macopt options to dgst utility. + [Steve Henson] + + *) New option -sigopt to dgst utility. Update dgst to use + EVP_Digest{Sign,Verify}*. These two changes make it possible to use + alternative signing paramaters such as X9.31 or PSS in the dgst + utility. + [Steve Henson] + + *) Change ssl_cipher_apply_rule(), the internal function that does + the work each time a ciphersuite string requests enabling + ("foo+bar"), moving ("+foo+bar"), disabling ("-foo+bar", or + removing ("!foo+bar") a class of ciphersuites: Now it maintains + the order of disabled ciphersuites such that those ciphersuites + that most recently went from enabled to disabled not only stay + in order with respect to each other, but also have higher priority + than other disabled ciphersuites the next time ciphersuites are + enabled again. + + This means that you can now say, e.g., "PSK:-PSK:HIGH" to enable + the same ciphersuites as with "HIGH" alone, but in a specific + order where the PSK ciphersuites come first (since they are the + most recently disabled ciphersuites when "HIGH" is parsed). + + Also, change ssl_create_cipher_list() (using this new + funcionality) such that between otherwise identical + cihpersuites, ephemeral ECDH is preferred over ephemeral DH in + the default order. + [Bodo Moeller] + + *) Change ssl_create_cipher_list() so that it automatically + arranges the ciphersuites in reasonable order before starting + to process the rule string. Thus, the definition for "DEFAULT" + (SSL_DEFAULT_CIPHER_LIST) now is just "ALL:!aNULL:!eNULL", but + remains equivalent to "AES:ALL:!aNULL:!eNULL:+aECDH:+kRSA:+RC4:@STRENGTH". + This makes it much easier to arrive at a reasonable default order + in applications for which anonymous ciphers are OK (meaning + that you can't actually use DEFAULT). + [Bodo Moeller; suggested by Victor Duchovni] + + *) Split the SSL/TLS algorithm mask (as used for ciphersuite string + processing) into multiple integers instead of setting + "SSL_MKEY_MASK" bits, "SSL_AUTH_MASK" bits, "SSL_ENC_MASK", + "SSL_MAC_MASK", and "SSL_SSL_MASK" bits all in a single integer. + (These masks as well as the individual bit definitions are hidden + away into the non-exported interface ssl/ssl_locl.h, so this + change to the definition of the SSL_CIPHER structure shouldn't + affect applications.) This give us more bits for each of these + categories, so there is no longer a need to coagulate AES128 and + AES256 into a single algorithm bit, and to coagulate Camellia128 + and Camellia256 into a single algorithm bit, which has led to all + kinds of kludges. + + Thus, among other things, the kludge introduced in 0.9.7m and + 0.9.8e for masking out AES256 independently of AES128 or masking + out Camellia256 independently of AES256 is not needed here in 0.9.9. + + With the change, we also introduce new ciphersuite aliases that + so far were missing: "AES128", "AES256", "CAMELLIA128", and + "CAMELLIA256". + [Bodo Moeller] + + *) Add support for dsa-with-SHA224 and dsa-with-SHA256. + Use the leftmost N bytes of the signature input if the input is + larger than the prime q (with N being the size in bytes of q). + [Nils Larsch] + + *) Very *very* experimental PKCS#7 streaming encoder support. Nothing uses + it yet and it is largely untested. + [Steve Henson] + + *) Add support for the ecdsa-with-SHA224/256/384/512 signature types. + [Nils Larsch] + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Jul 12 19:44:42 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81C01106566C for ; Thu, 12 Jul 2012 19:44:42 +0000 (UTC) (envelope-from dougb@dougbarton.us) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 0E7548FC12 for ; Thu, 12 Jul 2012 19:44:41 +0000 (UTC) Received: (qmail 11446 invoked by uid 399); 12 Jul 2012 19:44:27 -0000 Received: from unknown (HELO ?172.17.194.139?) (dougb@dougbarton.us@12.207.105.210) by mail2.fluidhosting.com with ESMTPAM; 12 Jul 2012 19:44:27 -0000 X-Originating-IP: 12.207.105.210 X-Sender: dougb@dougbarton.us Message-ID: <4FFF291E.4040104@dougbarton.us> Date: Thu, 12 Jul 2012 12:44:30 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: Jung-uk Kim References: <201207121930.q6CJUu97025034@svn.freebsd.org> In-Reply-To: <201207121930.q6CJUu97025034@svn.freebsd.org> X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238405 - in head: . crypto/openssl crypto/openssl/apps crypto/openssl/apps/demoCA crypto/openssl/bugs crypto/openssl/certs/demo crypto/openssl/crypto crypto/openssl/crypto/aes crypto/o... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 19:44:42 -0000 On 07/12/2012 12:30 PM, Jung-uk Kim wrote: > Log: > Merge OpenSSL 1.0.1c. Can you describe how you did the merge? There are numerous red flags in the log. From owner-svn-src-head@FreeBSD.ORG Thu Jul 12 19:52:45 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7BF711065676; Thu, 12 Jul 2012 19:52:45 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EF7B78FC19; Thu, 12 Jul 2012 19:52:44 +0000 (UTC) Message-ID: <4FFF2B0C.3040400@FreeBSD.org> Date: Thu, 12 Jul 2012 15:52:44 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120626 Thunderbird/13.0.1 MIME-Version: 1.0 To: Doug Barton References: <201207121930.q6CJUu97025034@svn.freebsd.org> <4FFF291E.4040104@dougbarton.us> In-Reply-To: <4FFF291E.4040104@dougbarton.us> X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r238405 - in head: . crypto/openssl crypto/openssl/apps crypto/openssl/apps/demoCA crypto/openssl/bugs crypto/openssl/certs/demo crypto/openssl/crypto crypto/openssl/crypto/aes crypto/o... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 19:52:45 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2012-07-12 15:44:30 -0400, Doug Barton wrote: > On 07/12/2012 12:30 PM, Jung-uk Kim wrote: >> Log: Merge OpenSSL 1.0.1c. > > Can you describe how you did the merge? There are numerous red > flags in the log. It is mostly described here: http://svnweb.freebsd.org/base/vendor-crypto/openssl/dist/FREEBSD-upgrade?view=markup&pathrev=238384 Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk//KwwACgkQmlay1b9qnVMBaQCgwDGmJZoYob4uZQnvAZtI+fS2 xLUAnRcALk3ncpdZcOoktkuSikiKFgx4 =bm/l -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Thu Jul 12 21:31:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 552F6106566B; Thu, 12 Jul 2012 21:31:54 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FB628FC16; Thu, 12 Jul 2012 21:31:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6CLVs9j030191; Thu, 12 Jul 2012 21:31:54 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6CLVsij030189; Thu, 12 Jul 2012 21:31:54 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201207122131.q6CLVsij030189@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 12 Jul 2012 21:31:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238407 - head/secure/lib/libcrypto X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 21:31:54 -0000 Author: jkim Date: Thu Jul 12 21:31:53 2012 New Revision: 238407 URL: http://svn.freebsd.org/changeset/base/238407 Log: Sort ASM definitions by crypto module for slightly easier maintenance. Specifically, GHASH_ASM belongs to crypto/modes. Modified: head/secure/lib/libcrypto/Makefile.inc Modified: head/secure/lib/libcrypto/Makefile.inc ============================================================================== --- head/secure/lib/libcrypto/Makefile.inc Thu Jul 12 19:34:30 2012 (r238406) +++ head/secure/lib/libcrypto/Makefile.inc Thu Jul 12 21:31:53 2012 (r238407) @@ -22,16 +22,18 @@ CFLAGS+=-DL_ENDIAN -DOPENSSL_IA32_SSE2 CFLAGS+=-DAES_ASM -DBSAES_ASM -DVPAES_ASM CFLAGS+=-DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m CFLAGS+=-DMD5_ASM +CFLAGS+=-DGHASH_ASM CFLAGS+=-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+=-DWHIRLPOOL_ASM -DGHASH_ASM +CFLAGS+=-DWHIRLPOOL_ASM .elif ${MACHINE_CPUARCH} == "i386" CFLAGS+=-DL_ENDIAN -DOPENSSL_IA32_SSE2 CFLAGS+=-DAES_ASM -DVPAES_ASM CFLAGS+=-DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m CFLAGS+=-DMD5_ASM +CFLAGS+=-DGHASH_ASM CFLAGS+=-DRMD160_ASM CFLAGS+=-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+=-DWHIRLPOOL_ASM -DGHASH_ASM +CFLAGS+=-DWHIRLPOOL_ASM .endif MANDIR= ${SHAREDIR}/openssl/man/man From owner-svn-src-head@FreeBSD.ORG Thu Jul 12 23:11:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A67A01065673; Thu, 12 Jul 2012 23:11:30 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 926AB8FC20; Thu, 12 Jul 2012 23:11:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6CNBUSa034371; Thu, 12 Jul 2012 23:11:30 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6CNBUUS034369; Thu, 12 Jul 2012 23:11:30 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201207122311.q6CNBUUS034369@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 12 Jul 2012 23:11:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238412 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 23:11:30 -0000 Author: jkim Date: Thu Jul 12 23:11:30 2012 New Revision: 238412 URL: http://svn.freebsd.org/changeset/base/238412 Log: Fix the previous commit. Obsolete libraries must be added to OLD_LIBS. Pointyhat to: me Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Jul 12 23:00:35 2012 (r238411) +++ head/ObsoleteFiles.inc Thu Jul 12 23:11:30 2012 (r238412) @@ -39,7 +39,10 @@ # done # 20120712: OpenSSL 1.0.1c import -OLD_FILES+=lib/libcrypto.so.6 +OLD_LIBS+=lib/libcrypto.so.6 +OLD_LIBS+=usr/lib/libssl.so.6 +OLD_LIBS+=usr/lib32/libcrypto.so.6 +OLD_LIBS+=usr/lib32/libssl.so.6 OLD_FILES+=usr/include/openssl/aes_locl.h OLD_FILES+=usr/include/openssl/bio_lcl.h OLD_FILES+=usr/include/openssl/e_os.h @@ -50,9 +53,6 @@ OLD_FILES+=usr/include/openssl/pq_compat OLD_FILES+=usr/include/openssl/store.h OLD_FILES+=usr/include/openssl/tmdiff.h OLD_FILES+=usr/include/openssl/ui_locl.h -OLD_FILES+=usr/lib/libssl.so.6 -OLD_FILES+=usr/lib32/libcrypto.so.6 -OLD_FILES+=usr/lib32/libssl.so.6 OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_set_id_callback.3.gz # 20120621: remove old man page OLD_FILES+=usr/share/man/man8/vnconfig.8.gz From owner-svn-src-head@FreeBSD.ORG Fri Jul 13 04:10:42 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F0DC11065670; Fri, 13 Jul 2012 04:10:41 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBC448FC0A; Fri, 13 Jul 2012 04:10:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6D4AfNh046498; Fri, 13 Jul 2012 04:10:41 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6D4AfFa046496; Fri, 13 Jul 2012 04:10:41 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207130410.q6D4AfFa046496@svn.freebsd.org> From: Alan Cox Date: Fri, 13 Jul 2012 04:10:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238414 - head/sys/amd64/amd64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2012 04:10:42 -0000 Author: alc Date: Fri Jul 13 04:10:41 2012 New Revision: 238414 URL: http://svn.freebsd.org/changeset/base/238414 Log: Wring a few cycles out of pmap_enter(). In particular, on a user-space pmap, avoid walking the page table twice. Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Jul 13 01:25:11 2012 (r238413) +++ head/sys/amd64/amd64/pmap.c Fri Jul 13 04:10:41 2012 (r238414) @@ -3454,8 +3454,6 @@ pmap_enter(pmap_t pmap, vm_offset_t va, ("pmap_enter: page %p is not busy", m)); pa = VM_PAGE_TO_PHYS(m); newpte = (pt_entry_t)(pa | pmap_cache_bits(m->md.pat_mode, 0) | PG_V); - if ((m->oflags & VPO_UNMANAGED) == 0) - newpte |= PG_MANAGED; if ((prot & VM_PROT_WRITE) != 0) newpte |= PG_RW; if ((prot & VM_PROT_EXECUTE) == 0) @@ -3477,14 +3475,22 @@ pmap_enter(pmap_t pmap, vm_offset_t va, * In the case that a page table page is not * resident, we are creating it here. */ - if (va < VM_MAXUSER_ADDRESS) - mpte = pmap_allocpte(pmap, va, &lock); - +retry: pde = pmap_pde(pmap, va); - if (pde != NULL && (*pde & PG_V) != 0) { - if ((*pde & PG_PS) != 0) - panic("pmap_enter: attempted pmap_enter on 2MB page"); + if (pde != NULL && (*pde & PG_V) != 0 && ((*pde & PG_PS) == 0 || + pmap_demote_pde_locked(pmap, pde, va, &lock))) { pte = pmap_pde_to_pte(pde, va); + if (va < VM_MAXUSER_ADDRESS && mpte == NULL) { + mpte = PHYS_TO_VM_PAGE(*pde & PG_FRAME); + mpte->wire_count++; + } + } else if (va < VM_MAXUSER_ADDRESS) { + /* + * Here if the pte page isn't mapped, or if it has been + * deallocated. + */ + mpte = _pmap_allocpte(pmap, pmap_pde_pindex(va), &lock); + goto retry; } else panic("pmap_enter: invalid page directory va=%#lx", va); @@ -3492,59 +3498,65 @@ pmap_enter(pmap_t pmap, vm_offset_t va, opa = origpte & PG_FRAME; /* - * Mapping has not changed, must be protection or wiring change. + * Is the specified virtual address already mapped? */ - if (origpte && (opa == pa)) { + if ((origpte & PG_V) != 0) { /* * Wiring change, just update stats. We don't worry about * wiring PT pages as they remain resident as long as there * are valid mappings in them. Hence, if a user page is wired, * the PT page will be also. */ - if (wired && ((origpte & PG_W) == 0)) + if (wired && (origpte & PG_W) == 0) pmap->pm_stats.wired_count++; else if (!wired && (origpte & PG_W)) pmap->pm_stats.wired_count--; /* - * Remove extra pte reference + * Remove the extra PT page reference. */ - if (mpte) - mpte->wire_count--; - - if ((origpte & PG_MANAGED) != 0) - om = m; - goto validate; - } - - /* - * Mapping has changed, invalidate old range and fall through to - * handle validating new mapping. - */ - if (opa) { - if (origpte & PG_W) - pmap->pm_stats.wired_count--; - if ((origpte & PG_MANAGED) != 0) - om = PHYS_TO_VM_PAGE(opa); if (mpte != NULL) { mpte->wire_count--; KASSERT(mpte->wire_count > 0, ("pmap_enter: missing reference to page table page," " va: 0x%lx", va)); } - } else - pmap_resident_count_inc(pmap, 1); - /* - * Increment the counters. - */ - if (wired) - pmap->pm_stats.wired_count++; + /* + * Has the mapping changed? + */ + if (opa == pa) { + /* + * No, might be a protection or wiring change. + */ + if ((origpte & PG_MANAGED) != 0) { + newpte |= PG_MANAGED; + om = m; + } + if ((origpte & ~(PG_M | PG_A)) == newpte) + goto unchanged; + goto validate; + } else { + /* + * Yes, fall through to validate the new mapping. + */ + if ((origpte & PG_MANAGED) != 0) + om = PHYS_TO_VM_PAGE(opa); + } + } else { + /* + * Increment the counters. + */ + if (wired) + pmap->pm_stats.wired_count++; + pmap_resident_count_inc(pmap, 1); + } /* * Enter on the PV list if part of our managed memory. */ - if ((newpte & PG_MANAGED) != 0) { + if ((m->oflags & VPO_UNMANAGED) == 0) { + newpte |= PG_MANAGED; pv = get_pv_entry(pmap, &lock); pv->pv_va = va; CHANGE_PV_LIST_LOCK_TO_PHYS(&lock, pa); @@ -3554,45 +3566,44 @@ pmap_enter(pmap_t pmap, vm_offset_t va, validate: /* - * Update the PTE only if the mapping or protection/wiring bits are - * different. + * Update the PTE. */ - if ((origpte & ~(PG_M | PG_A)) != newpte) { - newpte |= PG_A; - if ((access & VM_PROT_WRITE) != 0) - newpte |= PG_M; - if ((newpte & (PG_MANAGED | PG_RW)) == (PG_MANAGED | PG_RW)) - vm_page_aflag_set(m, PGA_WRITEABLE); - if (origpte & PG_V) { - invlva = FALSE; - origpte = pte_load_store(pte, newpte); - if (origpte & PG_A) { - if (origpte & PG_MANAGED) - vm_page_aflag_set(om, PGA_REFERENCED); - if (opa != pa || ((origpte & PG_NX) == 0 && - (newpte & PG_NX) != 0)) - invlva = TRUE; - } - if ((origpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) { - if ((origpte & PG_MANAGED) != 0) - vm_page_dirty(om); - if ((newpte & PG_RW) == 0) - invlva = TRUE; - } - if (opa != pa && (origpte & PG_MANAGED) != 0) { - CHANGE_PV_LIST_LOCK_TO_PHYS(&lock, opa); - pmap_pvh_free(&om->md, pmap, va); - if ((om->aflags & PGA_WRITEABLE) != 0 && - TAILQ_EMPTY(&om->md.pv_list) && - ((om->flags & PG_FICTITIOUS) != 0 || - TAILQ_EMPTY(&pa_to_pvh(opa)->pv_list))) - vm_page_aflag_clear(om, PGA_WRITEABLE); - } - if (invlva) - pmap_invalidate_page(pmap, va); - } else - pte_store(pte, newpte); - } + newpte |= PG_A; + if ((access & VM_PROT_WRITE) != 0) + newpte |= PG_M; + if ((newpte & (PG_MANAGED | PG_RW)) == (PG_MANAGED | PG_RW)) + vm_page_aflag_set(m, PGA_WRITEABLE); + if ((origpte & PG_V) != 0) { + invlva = FALSE; + origpte = pte_load_store(pte, newpte); + if ((origpte & PG_A) != 0) { + if ((origpte & PG_MANAGED) != 0) + vm_page_aflag_set(om, PGA_REFERENCED); + if (opa != pa || ((origpte & PG_NX) == 0 && + (newpte & PG_NX) != 0)) + invlva = TRUE; + } + if ((origpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) { + if ((origpte & PG_MANAGED) != 0) + vm_page_dirty(om); + if ((newpte & PG_RW) == 0) + invlva = TRUE; + } + if (opa != pa && (origpte & PG_MANAGED) != 0) { + CHANGE_PV_LIST_LOCK_TO_PHYS(&lock, opa); + pmap_pvh_free(&om->md, pmap, va); + if ((om->aflags & PGA_WRITEABLE) != 0 && + TAILQ_EMPTY(&om->md.pv_list) && + ((om->flags & PG_FICTITIOUS) != 0 || + TAILQ_EMPTY(&pa_to_pvh(opa)->pv_list))) + vm_page_aflag_clear(om, PGA_WRITEABLE); + } + if (invlva) + pmap_invalidate_page(pmap, va); + } else + pte_store(pte, newpte); + +unchanged: /* * If both the page table page and the reservation are fully From owner-svn-src-head@FreeBSD.ORG Fri Jul 13 04:22:08 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B31A51065679; Fri, 13 Jul 2012 04:22:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C20B8FC1A; Fri, 13 Jul 2012 04:22:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6D4M8LD046993; Fri, 13 Jul 2012 04:22:08 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6D4M8nC046986; Fri, 13 Jul 2012 04:22:08 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207130422.q6D4M8nC046986@svn.freebsd.org> From: Warner Losh Date: Fri, 13 Jul 2012 04:22:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238415 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2012 04:22:08 -0000 Author: imp Date: Fri Jul 13 04:22:08 2012 New Revision: 238415 URL: http://svn.freebsd.org/changeset/base/238415 Log: For our at91rm9200 boards, register which subtype of SoC is on the board. We'll use this later to control the differences between these two variants' pins. Added: head/sys/arm/at91/at91rm9200_devices.c (contents, props changed) head/sys/arm/at91/at91rm9200var.h (contents, props changed) Modified: head/sys/arm/at91/board_bwct.c head/sys/arm/at91/board_hl200.c head/sys/arm/at91/board_kb920x.c head/sys/arm/at91/board_tsc4370.c head/sys/arm/at91/files.at91 Added: head/sys/arm/at91/at91rm9200_devices.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/at91rm9200_devices.c Fri Jul 13 04:22:08 2012 (r238415) @@ -0,0 +1,62 @@ +/*- + * Copyright (c) 2012 M. Warner Losh. 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 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 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 + +#define _ARM32_BUS_DMA_PRIVATE +#include + +#include +#include + +/* + * The AT91RM9200 uses the same silicon for both the BGA and PQFP + * packages. There's no documented way to detect this at runtime, + * so we require the board code to register what type of SoC is on the + * board in question. The pinouts are not quite compatible, and we + * use this information to cope with the slight differences. + */ +void +at91rm9200_set_subtype(enum at91_soc_subtype st) +{ + + switch (st) { + case AT91_ST_RM9200_BGA: + case AT91_ST_RM9200_PQFP: + soc_info.subtype = st; + break; + default: + panic("Bad SoC subtype %d for at91rm9200_set_subtype.", st); + break; + } +} Added: head/sys/arm/at91/at91rm9200var.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/at91rm9200var.h Fri Jul 13 04:22:08 2012 (r238415) @@ -0,0 +1,33 @@ +/*- + * Copyright (c) 2012 M. Warner Losh. 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 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 AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* $FreeBSD$ */ + +#ifndef ARM_AT91_AT91RM9200VAR_H +#define ARM_AT91_AT91RM9200VAR_H + +void at91rm9200_set_subtype(enum at91_soc_subtype st); + +#endif /* ARM_AT91_AT91RM9200VAR_H */ Modified: head/sys/arm/at91/board_bwct.c ============================================================================== --- head/sys/arm/at91/board_bwct.c Fri Jul 13 04:10:41 2012 (r238414) +++ head/sys/arm/at91/board_bwct.c Fri Jul 13 04:22:08 2012 (r238415) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2005-2008 Olivier Houchard. All rights reserved. - * Copyright (c) 2005-2008 Warner Losh. All rights reserved. + * Copyright (c) 2005-2012 Warner Losh. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -31,13 +31,18 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include #include #include BOARD_INIT long board_init(void) { + + at91rm9200_set_subtype(AT91_ST_RM9200_BGA); + /* * Since the USART supports RS-485 multidrop mode, it allows the * TX pins to float. However, for RS-232 operations, we don't want Modified: head/sys/arm/at91/board_hl200.c ============================================================================== --- head/sys/arm/at91/board_hl200.c Fri Jul 13 04:10:41 2012 (r238414) +++ head/sys/arm/at91/board_hl200.c Fri Jul 13 04:22:08 2012 (r238415) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2005-2008 Olivier Houchard. All rights reserved. - * Copyright (c) 2005-2008 Warner Losh. All rights reserved. + * Copyright (c) 2005-2012 Warner Losh. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -31,13 +31,18 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include #include #include BOARD_INIT long board_init(void) { + + at91rm9200_set_subtype(AT91_ST_RM9200_BGA); + /* * Since the USART supports RS-485 multidrop mode, it allows the * TX pins to float. However, for RS-232 operations, we don't want Modified: head/sys/arm/at91/board_kb920x.c ============================================================================== --- head/sys/arm/at91/board_kb920x.c Fri Jul 13 04:10:41 2012 (r238414) +++ head/sys/arm/at91/board_kb920x.c Fri Jul 13 04:22:08 2012 (r238415) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2005-2008 Olivier Houchard. All rights reserved. - * Copyright (c) 2005-2008 Warner Losh. All rights reserved. + * Copyright (c) 2005-2012 Warner Losh. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,15 +30,19 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include +#include #include +#include #include #include BOARD_INIT long board_init(void) { + + at91rm9200_set_subtype(AT91_ST_RM9200_PQFP); + /* * Since the USART supports RS-485 multidrop mode, it allows the * TX pins to float. However, for RS-232 operations, we don't want Modified: head/sys/arm/at91/board_tsc4370.c ============================================================================== --- head/sys/arm/at91/board_tsc4370.c Fri Jul 13 04:10:41 2012 (r238414) +++ head/sys/arm/at91/board_tsc4370.c Fri Jul 13 04:22:08 2012 (r238415) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2005-2008 Olivier Houchard. All rights reserved. - * Copyright (c) 2005-2008 Warner Losh. All rights reserved. + * Copyright (c) 2005-2012 Warner Losh. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -31,13 +31,18 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include #include #include BOARD_INIT long board_init(void) { + + at91rm9200_set_subtype(AT91_ST_RM9200_PQFP); + /* * Since the USART supports RS-485 multidrop mode, it allows the * TX pins to float. However, for RS-232 operations, we don't want Modified: head/sys/arm/at91/files.at91 ============================================================================== --- head/sys/arm/at91/files.at91 Fri Jul 13 04:10:41 2012 (r238414) +++ head/sys/arm/at91/files.at91 Fri Jul 13 04:22:08 2012 (r238415) @@ -29,6 +29,7 @@ arm/at91/uart_dev_at91usart.c optional u # arm/at91/at91soc.c standard arm/at91/at91rm9200.c optional at91rm9200 +arm/at91/at91rm9200_devices.c optional at91rm9200 arm/at91/at91sam9260.c optional at91sam9260 arm/at91/at91sam9g20.c optional at91sam9g20 arm/at91/at91sam9x25.c optional at91sam9x25 From owner-svn-src-head@FreeBSD.ORG Fri Jul 13 04:39:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A9F57106564A for ; Fri, 13 Jul 2012 04:39:58 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 61E8A8FC0C for ; Fri, 13 Jul 2012 04:39:58 +0000 (UTC) Received: by obbun3 with SMTP id un3so5258223obb.13 for ; Thu, 12 Jul 2012 21:39:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=rpgd5nlmd29XoKTdf7e8rUkyOVcr0M0sX3lpG5JwkQM=; b=rw60Knt+4RkYKeT8KQC73bO4iz8sFpoUw9Gnx1jYqqDIRO+OVEN8lHLtKrmXkezdA/ jf2OJH9W5S5z82p/sExZpLmJXcBdYTVLvksbeIZoDaYOqlVTiGnl9/BJZVuaoVmmOYaM Byvnoqbf4J29rFwXvUFa/hdHIT1DdT7mx+0/s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=rpgd5nlmd29XoKTdf7e8rUkyOVcr0M0sX3lpG5JwkQM=; b=ayDgPmMVr/GtPuHKyeSSRvV2icLruMPWcKPHPKBLKdG8sKN10mTenvhbsHu+Krxiq5 h0BkTmezesMRVKHcH2803A8W/VVAPpP8fgKkAKBw58dKLNySrdNgNYoMWvYPHz19GaOM tHkfAi3FeIBH7QOfEuCgrqsOeHoC8+8IJ0DhFrEvWIEi0LEJG0ecwaEqKSQmNR0RkMXp 0igyeuGRVUkXnYUC+FQeGTMkM5akL1HiC8uFEf8SL8tLWNvIsVjRho2IQki3AVl6CjVI 8S86MBwz8Vpx14w6vg2FBAf0MoIV5f0TjuA3JZQFYvONOrPsekdDH7/60q3iXsFGDGOP eloQ== Received: by 10.60.22.71 with SMTP id b7mr1103088oef.44.1342154397922; Thu, 12 Jul 2012 21:39:57 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.182.125.70 with HTTP; Thu, 12 Jul 2012 21:39:27 -0700 (PDT) In-Reply-To: <201207121211.q6CCBWTD006484@svn.freebsd.org> References: <201207121211.q6CCBWTD006484@svn.freebsd.org> From: Eitan Adler Date: Thu, 12 Jul 2012 21:39:27 -0700 X-Google-Sender-Auth: 0NzyCZgcaqZs_xVAqO7Emuu5Wjo Message-ID: To: Gavin Atkinson Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQn6/EVs9zxYw3cUN8Eph73bXyGrB+YgB16YVlkomtnwKY2nWy2uODSBcYEMUVi/NSRRukNr Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238396 - head/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2012 04:39:58 -0000 On 12 July 2012 05:11, Gavin Atkinson wrote: > Author: gavin > Date: Thu Jul 12 12:11:32 2012 > New Revision: 238396 > URL: http://svn.freebsd.org/changeset/base/238396 > > Log: > Update for new core team. Looks like this file was not updated two years > ago for the last core team. Perhaps we can make a wiki page of "pages that need to change on core team change?" ? -- Eitan Adler Source & Ports committer X11, Bugbusting teams From owner-svn-src-head@FreeBSD.ORG Fri Jul 13 06:46:10 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F38A106566B; Fri, 13 Jul 2012 06:46:10 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39F528FC0C; Fri, 13 Jul 2012 06:46:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6D6kAIW052786; Fri, 13 Jul 2012 06:46:10 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6D6k9n6052773; Fri, 13 Jul 2012 06:46:09 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201207130646.q6D6k9n6052773@svn.freebsd.org> From: Kevin Lo Date: Fri, 13 Jul 2012 06:46:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238416 - in head/etc: . defaults rc.d X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2012 06:46:10 -0000 Author: kevlo Date: Fri Jul 13 06:46:09 2012 New Revision: 238416 URL: http://svn.freebsd.org/changeset/base/238416 Log: Whitespace nit Modified: head/etc/defaults/periodic.conf head/etc/defaults/rc.conf head/etc/rc.d/bgfsck head/etc/rc.d/bridge head/etc/rc.d/cleanvar head/etc/rc.d/devd head/etc/rc.d/kldxref head/etc/rc.d/named head/etc/rc.d/power_profile head/etc/rc.d/tmp head/etc/rc.firewall head/etc/rc.subr Modified: head/etc/defaults/periodic.conf ============================================================================== --- head/etc/defaults/periodic.conf Fri Jul 13 04:22:08 2012 (r238415) +++ head/etc/defaults/periodic.conf Fri Jul 13 06:46:09 2012 (r238416) @@ -275,7 +275,7 @@ monthly_local="/etc/monthly.local" # L if [ -z "${source_periodic_confs_defined}" ]; then source_periodic_confs_defined=yes - source_periodic_confs () { + source_periodic_confs() { local i sourced_files for i in ${periodic_conf_files}; do Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Fri Jul 13 04:22:08 2012 (r238415) +++ head/etc/defaults/rc.conf Fri Jul 13 06:46:09 2012 (r238416) @@ -713,7 +713,7 @@ jail_sysvipc_allow="NO" # Allow SystemV if [ -z "${source_rc_confs_defined}" ]; then source_rc_confs_defined=yes - source_rc_confs () { + source_rc_confs() { local i sourced_files for i in ${rc_conf_files}; do case ${sourced_files} in Modified: head/etc/rc.d/bgfsck ============================================================================== --- head/etc/rc.d/bgfsck Fri Jul 13 04:22:08 2012 (r238415) +++ head/etc/rc.d/bgfsck Fri Jul 13 06:46:09 2012 (r238416) @@ -14,7 +14,7 @@ rcvar="background_fsck" start_cmd="bgfsck_start" stop_cmd=":" -bgfsck_start () +bgfsck_start() { if [ -z "${rc_force}" ]; then background_fsck_delay=${background_fsck_delay:=0} Modified: head/etc/rc.d/bridge ============================================================================== --- head/etc/rc.d/bridge Fri Jul 13 04:22:08 2012 (r238415) +++ head/etc/rc.d/bridge Fri Jul 13 06:46:09 2012 (r238416) @@ -37,14 +37,14 @@ start_cmd="bridge_start" stop_cmd="bridge_stop" cmd="" -glob_int () { +glob_int() { case "$1" in $2 ) true ;; * ) false ;; esac } -bridge_test () { +bridge_test() { bridge=$1 iface=$2 Modified: head/etc/rc.d/cleanvar ============================================================================== --- head/etc/rc.d/cleanvar Fri Jul 13 04:22:08 2012 (r238415) +++ head/etc/rc.d/cleanvar Fri Jul 13 06:46:09 2012 (r238416) @@ -54,7 +54,7 @@ cleanvar_prestart() rm -f /var/run/clean_var /var/spool/lock/clean_var } -cleanvar_start () +cleanvar_start() { if [ -d /var/run -a ! -f /var/run/clean_var ]; then purgedir /var/run Modified: head/etc/rc.d/devd ============================================================================== --- head/etc/rc.d/devd Fri Jul 13 04:22:08 2012 (r238415) +++ head/etc/rc.d/devd Fri Jul 13 06:46:09 2012 (r238416) @@ -26,7 +26,7 @@ find_pidfile() fi } -devd_prestart () +devd_prestart() { find_pidfile Modified: head/etc/rc.d/kldxref ============================================================================== --- head/etc/rc.d/kldxref Fri Jul 13 04:22:08 2012 (r238415) +++ head/etc/rc.d/kldxref Fri Jul 13 06:46:09 2012 (r238416) @@ -15,7 +15,7 @@ name="kldxref" stop_cmd=":" start_cmd="kldxref_start" -kldxref_start () { +kldxref_start() { if [ -n "$kldxref_module_path" ]; then MODULE_PATHS="$kldxref_module_path" else Modified: head/etc/rc.d/named ============================================================================== --- head/etc/rc.d/named Fri Jul 13 04:22:08 2012 (r238415) +++ head/etc/rc.d/named Fri Jul 13 06:46:09 2012 (r238416) @@ -96,7 +96,7 @@ make_symlinks() ln -fs "${named_chrootdir}${pidfile}" ${pidfile} } -named_poststart () { +named_poststart() { make_symlinks if checkyesno named_wait; then @@ -156,7 +156,7 @@ named_poststop() fi } -create_file () { +create_file() { if [ -e "$1" ]; then unlink $1 fi Modified: head/etc/rc.d/power_profile ============================================================================== --- head/etc/rc.d/power_profile Fri Jul 13 04:22:08 2012 (r238415) +++ head/etc/rc.d/power_profile Fri Jul 13 06:46:09 2012 (r238416) @@ -27,7 +27,7 @@ LOGGER="logger -t power_profile -p daemo # $highest_value: maximum value for this sysctl, when $value is "HIGH" # $lowest_value: minimum value for this sysctl, when $value is "LOW" # -sysctl_set () +sysctl_set() { # Check if the node exists if [ -z "$(sysctl -n ${node} 2> /dev/null)" ]; then Modified: head/etc/rc.d/tmp ============================================================================== --- head/etc/rc.d/tmp Fri Jul 13 04:22:08 2012 (r238415) +++ head/etc/rc.d/tmp Fri Jul 13 06:46:09 2012 (r238416) @@ -37,7 +37,7 @@ stop_cmd=':' load_rc_config $name -mount_tmpmfs () +mount_tmpmfs() { if ! /bin/df /tmp | grep -q "^/dev/md[0-9]"; then mount_md ${tmpsize} /tmp "${tmpmfs_flags}" Modified: head/etc/rc.firewall ============================================================================== --- head/etc/rc.firewall Fri Jul 13 04:22:08 2012 (r238415) +++ head/etc/rc.firewall Fri Jul 13 06:46:09 2012 (r238416) @@ -78,7 +78,7 @@ fi # http://www.pearsonhighered.com/educator/academic/product/0,3110,020163466X,00.html # -setup_loopback () { +setup_loopback() { ############ # Only in rare cases do you want to change these rules # @@ -91,7 +91,7 @@ setup_loopback () { fi } -setup_ipv6_mandatory () { +setup_ipv6_mandatory() { [ $ipv6_available -eq 0 ] || return 0 ############ Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Fri Jul 13 04:22:08 2012 (r238415) +++ head/etc/rc.subr Fri Jul 13 06:46:09 2012 (r238416) @@ -1593,7 +1593,7 @@ geli_make_list() # Find scripts in local_startup directories that use the old syntax # -find_local_scripts_old () { +find_local_scripts_old() { zlist='' slist='' for dir in ${local_startup}; do @@ -1612,7 +1612,7 @@ find_local_scripts_old () { done } -find_local_scripts_new () { +find_local_scripts_new() { local_rc='' for dir in ${local_startup}; do if [ -d "${dir}" ]; then From owner-svn-src-head@FreeBSD.ORG Fri Jul 13 08:11:56 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F5F41065674; Fri, 13 Jul 2012 08:11:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85B748FC12; Fri, 13 Jul 2012 08:11:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6D8Bu4v056395; Fri, 13 Jul 2012 08:11:56 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6D8BuqI056393; Fri, 13 Jul 2012 08:11:56 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201207130811.q6D8BuqI056393@svn.freebsd.org> From: Andriy Gapon Date: Fri, 13 Jul 2012 08:11:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238418 - head/sys/dev/acpica X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2012 08:11:56 -0000 Author: avg Date: Fri Jul 13 08:11:55 2012 New Revision: 238418 URL: http://svn.freebsd.org/changeset/base/238418 Log: acpi_cpu: separate a notion of current deepest allowed+available Cx level ... from a user-set persistent limit on the said level. Allow to set the user-imposed limit below current deepest available level as the available levels may be dynamically changed by ACPI platform in both directions. Allow "Cmax" as an input value for cx_lowest sysctls to mean that there is not limit and OS can use all available C-states. Retire global cpu_cx_count as it no longer serves any meaningful purpose. Reviewed by: jhb, gianni, sbruno Tested by: sbruno, Vitaly Magerya MFC after: 2 weeks Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Fri Jul 13 08:02:58 2012 (r238417) +++ head/sys/dev/acpica/acpi_cpu.c Fri Jul 13 08:11:55 2012 (r238418) @@ -89,6 +89,7 @@ struct acpi_cpu_softc { struct sysctl_ctx_list cpu_sysctl_ctx; struct sysctl_oid *cpu_sysctl_tree; int cpu_cx_lowest; + int cpu_cx_lowest_lim; char cpu_cx_supported[64]; int cpu_rid; }; @@ -138,13 +139,12 @@ static int cpu_quirks; /* Indicate any /* Runtime state. */ static int cpu_disable_idle; /* Disable entry to idle function */ -static int cpu_cx_count; /* Number of valid Cx states */ /* Values for sysctl. */ static struct sysctl_ctx_list cpu_sysctl_ctx; static struct sysctl_oid *cpu_sysctl_tree; static int cpu_cx_generic; -static int cpu_cx_lowest; +static int cpu_cx_lowest_lim; static device_t *cpu_devices; static int cpu_ndevices; @@ -173,7 +173,7 @@ static void acpi_cpu_idle(void); static void acpi_cpu_notify(ACPI_HANDLE h, UINT32 notify, void *context); static int acpi_cpu_quirks(void); static int acpi_cpu_usage_sysctl(SYSCTL_HANDLER_ARGS); -static int acpi_cpu_set_cx_lowest(struct acpi_cpu_softc *sc, int val); +static int acpi_cpu_set_cx_lowest(struct acpi_cpu_softc *sc); static int acpi_cpu_cx_lowest_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_cpu_global_cx_lowest_sysctl(SYSCTL_HANDLER_ARGS); @@ -590,6 +590,7 @@ acpi_cpu_cx_probe(struct acpi_cpu_softc /* Use initial sleep value of 1 sec. to start with lowest idle state. */ sc->cpu_prev_sleep = 1000000; sc->cpu_cx_lowest = 0; + sc->cpu_cx_lowest_lim = 0; /* * Check for the ACPI 2.0 _CST sleep states object. If we can't find @@ -820,7 +821,6 @@ acpi_cpu_startup(void *arg) */ acpi_cpu_quirks(); - cpu_cx_count = 0; if (cpu_cx_generic) { /* * We are using generic Cx mode, probe for available Cx states @@ -829,24 +829,10 @@ acpi_cpu_startup(void *arg) for (i = 0; i < cpu_ndevices; i++) { sc = device_get_softc(cpu_devices[i]); acpi_cpu_generic_cx_probe(sc); - if (sc->cpu_cx_count > cpu_cx_count) - cpu_cx_count = sc->cpu_cx_count; - } - - /* - * Find the highest Cx state common to all CPUs - * in the system, taking quirks into account. - */ - for (i = 0; i < cpu_ndevices; i++) { - sc = device_get_softc(cpu_devices[i]); - if (sc->cpu_cx_count < cpu_cx_count) - cpu_cx_count = sc->cpu_cx_count; } } else { /* * We are using _CST mode, remove C3 state if necessary. - * Update the largest Cx state supported in the global cpu_cx_count. - * It will be used in the global Cx sysctl handler. * As we now know for sure that we will be using _CST mode * install our notify handler. */ @@ -855,8 +841,6 @@ acpi_cpu_startup(void *arg) if (cpu_quirks & CPU_QUIRK_NO_C3) { sc->cpu_cx_count = sc->cpu_non_c3 + 1; } - if (sc->cpu_cx_count > cpu_cx_count) - cpu_cx_count = sc->cpu_cx_count; AcpiInstallNotifyHandler(sc->cpu_handle, ACPI_DEVICE_NOTIFY, acpi_cpu_notify, sc); } @@ -875,7 +859,7 @@ acpi_cpu_startup(void *arg) "Global lowest Cx sleep state to use"); /* Take over idling from cpu_idle_default(). */ - cpu_cx_lowest = 0; + cpu_cx_lowest_lim = 0; cpu_disable_idle = FALSE; cpu_idle_hook = acpi_cpu_idle; } @@ -1058,8 +1042,6 @@ static void acpi_cpu_notify(ACPI_HANDLE h, UINT32 notify, void *context) { struct acpi_cpu_softc *sc = (struct acpi_cpu_softc *)context; - struct acpi_cpu_softc *isc; - int i; if (notify != ACPI_NOTIFY_CX_STATES) return; @@ -1068,16 +1050,8 @@ acpi_cpu_notify(ACPI_HANDLE h, UINT32 no acpi_cpu_cx_cst(sc); acpi_cpu_cx_list(sc); - /* Update the new lowest useable Cx state for all CPUs. */ ACPI_SERIAL_BEGIN(cpu); - cpu_cx_count = 0; - for (i = 0; i < cpu_ndevices; i++) { - isc = device_get_softc(cpu_devices[i]); - if (isc->cpu_cx_count > cpu_cx_count) - cpu_cx_count = isc->cpu_cx_count; - } - if (sc->cpu_cx_lowest < cpu_cx_lowest) - acpi_cpu_set_cx_lowest(sc, min(cpu_cx_lowest, sc->cpu_cx_count - 1)); + acpi_cpu_set_cx_lowest(sc); ACPI_SERIAL_END(cpu); } @@ -1205,12 +1179,12 @@ acpi_cpu_usage_sysctl(SYSCTL_HANDLER_ARG } static int -acpi_cpu_set_cx_lowest(struct acpi_cpu_softc *sc, int val) +acpi_cpu_set_cx_lowest(struct acpi_cpu_softc *sc) { int i; ACPI_SERIAL_ASSERT(cpu); - sc->cpu_cx_lowest = val; + sc->cpu_cx_lowest = min(sc->cpu_cx_lowest_lim, sc->cpu_cx_count - 1); /* If not disabling, cache the new lowest non-C3 state. */ sc->cpu_non_c3 = 0; @@ -1234,18 +1208,23 @@ acpi_cpu_cx_lowest_sysctl(SYSCTL_HANDLER int val, error; sc = (struct acpi_cpu_softc *) arg1; - snprintf(state, sizeof(state), "C%d", sc->cpu_cx_lowest + 1); + snprintf(state, sizeof(state), "C%d", sc->cpu_cx_lowest_lim + 1); error = sysctl_handle_string(oidp, state, sizeof(state), req); if (error != 0 || req->newptr == NULL) return (error); if (strlen(state) < 2 || toupper(state[0]) != 'C') return (EINVAL); - val = (int) strtol(state + 1, NULL, 10) - 1; - if (val < 0 || val > sc->cpu_cx_count - 1) - return (EINVAL); + if (strcasecmp(state, "Cmax") == 0) + val = MAX_CX_STATES; + else { + val = (int) strtol(state + 1, NULL, 10); + if (val < 1 || val > MAX_CX_STATES) + return (EINVAL); + } ACPI_SERIAL_BEGIN(cpu); - acpi_cpu_set_cx_lowest(sc, val); + sc->cpu_cx_lowest_lim = val - 1; + acpi_cpu_set_cx_lowest(sc); ACPI_SERIAL_END(cpu); return (0); @@ -1258,22 +1237,27 @@ acpi_cpu_global_cx_lowest_sysctl(SYSCTL_ char state[8]; int val, error, i; - snprintf(state, sizeof(state), "C%d", cpu_cx_lowest + 1); + snprintf(state, sizeof(state), "C%d", cpu_cx_lowest_lim + 1); error = sysctl_handle_string(oidp, state, sizeof(state), req); if (error != 0 || req->newptr == NULL) return (error); if (strlen(state) < 2 || toupper(state[0]) != 'C') return (EINVAL); - val = (int) strtol(state + 1, NULL, 10) - 1; - if (val < 0 || val > cpu_cx_count - 1) - return (EINVAL); - cpu_cx_lowest = val; + if (strcasecmp(state, "Cmax") == 0) + val = MAX_CX_STATES; + else { + val = (int) strtol(state + 1, NULL, 10); + if (val < 1 || val > MAX_CX_STATES) + return (EINVAL); + } /* Update the new lowest useable Cx state for all CPUs. */ ACPI_SERIAL_BEGIN(cpu); + cpu_cx_lowest_lim = val - 1; for (i = 0; i < cpu_ndevices; i++) { sc = device_get_softc(cpu_devices[i]); - acpi_cpu_set_cx_lowest(sc, min(val, sc->cpu_cx_count - 1)); + sc->cpu_cx_lowest_lim = cpu_cx_lowest_lim; + acpi_cpu_set_cx_lowest(sc); } ACPI_SERIAL_END(cpu); From owner-svn-src-head@FreeBSD.ORG Fri Jul 13 12:37:35 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2D8B9106564A; Fri, 13 Jul 2012 12:37:35 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 16CC38FC0A; Fri, 13 Jul 2012 12:37:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6DCbYfg069233; Fri, 13 Jul 2012 12:37:34 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6DCbYDt069228; Fri, 13 Jul 2012 12:37:34 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201207131237.q6DCbYDt069228@svn.freebsd.org> From: Martin Matuska Date: Fri, 13 Jul 2012 12:37:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238422 - in head/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2012 12:37:35 -0000 Author: mm Date: Fri Jul 13 12:37:34 2012 New Revision: 238422 URL: http://svn.freebsd.org/changeset/base/238422 Log: Merge illumos commit 13749:df4cd82e2b60 1796 "ZFS HOLD" should not be used when doing "ZFS SEND" froma read-only pool 2871 support for __ZFS_POOL_RESTRICT used by ZFS test suite 2903 zfs destroy -d does not work 2957 zfs destroy -R/r sometimes fails when removing defer-destroyed snapshot References: https://www.illumos.org/issues/1796 https://www.illumos.org/issues/2871 https://www.illumos.org/issues/2903 https://www.illumos.org/issues/2957 MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_config.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Directory Properties: head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Fri Jul 13 11:08:37 2012 (r238421) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Fri Jul 13 12:37:34 2012 (r238422) @@ -1092,7 +1092,7 @@ snapshot_to_nvl_cb(zfs_handle_t *zhp, vo int err = 0; /* Check for clones. */ - if (!cb->cb_doclones) { + if (!cb->cb_doclones && !cb->cb_defer_destroy) { cb->cb_target = zhp; cb->cb_first = B_TRUE; err = zfs_iter_dependents(zhp, B_TRUE, Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_config.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_config.c Fri Jul 13 11:08:37 2012 (r238421) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_config.c Fri Jul 13 12:37:34 2012 (r238422) @@ -337,6 +337,48 @@ zpool_refresh_stats(zpool_handle_t *zhp, } /* + * If the __ZFS_POOL_RESTRICT environment variable is set we only iterate over + * pools it lists. + * + * This is an undocumented feature for use during testing only. + * + * This function returns B_TRUE if the pool should be skipped + * during iteration. + */ +static boolean_t +check_restricted(const char *poolname) +{ + static boolean_t initialized = B_FALSE; + static char *restricted = NULL; + + const char *cur, *end; + int len, namelen; + + if (!initialized) { + initialized = B_TRUE; + restricted = getenv("__ZFS_POOL_RESTRICT"); + } + + if (NULL == restricted) + return (B_FALSE); + + cur = restricted; + namelen = strlen(poolname); + do { + end = strchr(cur, ' '); + len = (NULL == end) ? strlen(cur) : (end - cur); + + if (len == namelen && 0 == strncmp(cur, poolname, len)) { + return (B_FALSE); + } + + cur += (len + 1); + } while (NULL != end); + + return (B_TRUE); +} + +/* * Iterate over all pools in the system. */ int @@ -359,6 +401,9 @@ zpool_iter(libzfs_handle_t *hdl, zpool_i for (cn = uu_avl_first(hdl->libzfs_ns_avl); cn != NULL; cn = uu_avl_next(hdl->libzfs_ns_avl, cn)) { + if (check_restricted(cn->cn_name)) + continue; + if (zpool_open_silent(hdl, cn->cn_name, &zhp) != 0) { hdl->libzfs_pool_iter--; return (-1); @@ -394,6 +439,9 @@ zfs_iter_root(libzfs_handle_t *hdl, zfs_ for (cn = uu_avl_first(hdl->libzfs_ns_avl); cn != NULL; cn = uu_avl_next(hdl->libzfs_ns_avl, cn)) { + if (check_restricted(cn->cn_name)) + continue; + if ((zhp = make_dataset_handle(hdl, cn->cn_name)) == NULL) continue; Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Fri Jul 13 11:08:37 2012 (r238421) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Fri Jul 13 12:37:34 2012 (r238422) @@ -3138,7 +3138,8 @@ zfs_create(libzfs_handle_t *hdl, const c /* * Destroys the given dataset. The caller must make sure that the filesystem - * isn't mounted, and that there are no active dependents. + * isn't mounted, and that there are no active dependents. If the file system + * does not exist this function does nothing. */ int zfs_destroy(zfs_handle_t *zhp, boolean_t defer) @@ -3154,7 +3155,8 @@ zfs_destroy(zfs_handle_t *zhp, boolean_t } zc.zc_defer_destroy = defer; - if (zfs_ioctl(zhp->zfs_hdl, ZFS_IOC_DESTROY, &zc) != 0) { + if (zfs_ioctl(zhp->zfs_hdl, ZFS_IOC_DESTROY, &zc) != 0 && + errno != ENOENT) { return (zfs_standard_error_fmt(zhp->zfs_hdl, errno, dgettext(TEXT_DOMAIN, "cannot destroy '%s'"), zhp->zfs_name)); Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Fri Jul 13 11:08:37 2012 (r238421) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Fri Jul 13 12:37:34 2012 (r238422) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2012 Pawel Jakub Dawidek . * All rights reserved. @@ -1387,7 +1387,6 @@ zfs_send(zfs_handle_t *zhp, const char * avl_tree_t *fsavl = NULL; static uint64_t holdseq; int spa_version; - boolean_t holdsnaps = B_FALSE; pthread_t tid; int pipefd[2]; dedup_arg_t dda = { 0 }; @@ -1410,11 +1409,6 @@ zfs_send(zfs_handle_t *zhp, const char * } } - if (!flags->dryrun && zfs_spa_version(zhp, &spa_version) == 0 && - spa_version >= SPA_VERSION_USERREFS && - (flags->doall || flags->replicate)) - holdsnaps = B_TRUE; - if (flags->dedup && !flags->dryrun) { featureflags |= (DMU_BACKUP_FEATURE_DEDUP | DMU_BACKUP_FEATURE_DEDUPPROPS); @@ -1536,7 +1530,18 @@ zfs_send(zfs_handle_t *zhp, const char * sdd.filter_cb_arg = cb_arg; if (debugnvp) sdd.debugnv = *debugnvp; - if (holdsnaps || flags->progress) { + + /* + * Some flags require that we place user holds on the datasets that are + * being sent so they don't get destroyed during the send. We can skip + * this step if the pool is imported read-only since the datasets cannot + * be destroyed. + */ + if (!flags->dryrun && !zpool_get_prop_int(zfs_get_pool_handle(zhp), + ZPOOL_PROP_READONLY, NULL) && + zfs_spa_version(zhp, &spa_version) == 0 && + spa_version >= SPA_VERSION_USERREFS && + (flags->doall || flags->replicate)) { ++holdseq; (void) snprintf(sdd.holdtag, sizeof (sdd.holdtag), ".send-%d-%llu", getpid(), (u_longlong_t)holdseq); From owner-svn-src-head@FreeBSD.ORG Fri Jul 13 13:23:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 442A8106566C; Fri, 13 Jul 2012 13:23:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CF4A8FC18; Fri, 13 Jul 2012 13:23:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6DDNnHb071130; Fri, 13 Jul 2012 13:23:49 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6DDNnFK071126; Fri, 13 Jul 2012 13:23:49 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201207131323.q6DDNnFK071126@svn.freebsd.org> From: John Baldwin Date: Fri, 13 Jul 2012 13:23:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238423 - in head: tools/regression/usr.sbin/etcupdate usr.sbin usr.sbin/etcupdate X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2012 13:23:49 -0000 Author: jhb Date: Fri Jul 13 13:23:48 2012 New Revision: 238423 URL: http://svn.freebsd.org/changeset/base/238423 Log: The etcupdate utility is a tool for managing updates to files that are not updated as part of `make installworld' such as files in /etc. It manages updates by doing a three-way merge of changes made to these files against the local versions. It is also designed to minimize the amount of user intervention with the goal of simplifying upgrades for clusters of machines. The primary difference from mergemaster is that etcupdate requires less manual work. The primary difference from etcmerge is that etcupdate updates files in-place similar to mergemaster rather than building a separate /etc tree. Requested by: obrien, kib, theraven, joeld (among others) Added: head/tools/regression/usr.sbin/etcupdate/ head/tools/regression/usr.sbin/etcupdate/always.sh (contents, props changed) head/tools/regression/usr.sbin/etcupdate/conflicts.sh (contents, props changed) head/tools/regression/usr.sbin/etcupdate/fbsdid.sh (contents, props changed) head/tools/regression/usr.sbin/etcupdate/ignore.sh (contents, props changed) head/tools/regression/usr.sbin/etcupdate/tests.sh (contents, props changed) head/usr.sbin/etcupdate/ head/usr.sbin/etcupdate/Makefile (contents, props changed) head/usr.sbin/etcupdate/etcupdate.8 (contents, props changed) head/usr.sbin/etcupdate/etcupdate.sh (contents, props changed) Modified: head/usr.sbin/Makefile Added: head/tools/regression/usr.sbin/etcupdate/always.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.sbin/etcupdate/always.sh Fri Jul 13 13:23:48 2012 (r238423) @@ -0,0 +1,608 @@ +#!/bin/sh +# +# Copyright (c) 2010 Advanced Computing Technologies LLC +# Written by: John H. Baldwin +# 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$ + +# Various regression tests to test the -A flag to the 'update' command. + +WORKDIR=work + +usage() +{ + echo "Usage: always.sh [-w workdir]" + exit 1 +} + +# Allow the user to specify an alternate work directory. +while getopts "w:" option; do + case $option in + w) + WORKDIR=$OPTARG + ;; + *) + echo + usage + ;; + esac +done +shift $((OPTIND - 1)) +if [ $# -ne 0 ]; then + usage +fi + +CONFLICTS=$WORKDIR/conflicts +OLD=$WORKDIR/old +NEW=$WORKDIR/current +TEST=$WORKDIR/test + +# The various states of the comparison of a file between two trees. +states="equal first second difftype difflinks difffiles" + +# These tests deal with ignoring certain patterns of files. We run +# the test multiple times forcing the install of different patterns. +build_trees() +{ + local i + + rm -rf $OLD $NEW $TEST $CONFLICTS + + for i in $states; do + for j in $states; do + for k in $states; do + mkdir -p $OLD/$i/$j/$k $NEW/$i/$j/$k \ + $TEST/$i/$j/$k + done + done + done + + # What follows are the various warning/conflict cases from the + # larger regression tests. These results of many of these + # tests should be changed when installation is forced. The + # cases when these updates should still fail even when forced + # are: 1) it should not force the removal of a modified file + # and 2) it should not remove a subdirectory that contains a + # modified or added file. + + # /first/difftype/second: File with different local type + # removed. Should generate a warning. + mkfifo $OLD/first/difftype/second/fifo + mkdir $TEST/first/difftype/second/fifo + + # /first/difflinks/second: Modified link removed. Should + # generate a warning. + ln -s "old link" $OLD/first/difflinks/second/link + ln -s "test link" $TEST/first/difflinks/second/link + + # /first/difffiles/second: Modified file removed. Should + # generate a warning. + echo "foo" > $OLD/first/difffiles/second/file + echo "bar" > $TEST/first/difffiles/second/file + + # /second/second/difftype: Newly added file conflicts with + # existing file in test tree of a different type. Should + # generate a warning. + mkdir $NEW/second/second/difftype/dir + mkfifo $TEST/second/second/difftype/dir + + # /second/second/difflinks: Newly added link conflicts with + # existing link in test tree. Should generate a warning. + ln -s "new link" $NEW/second/second/difflinks/link + ln -s "test link" $TEST/second/second/difflinks/link + + # /second/second/difffiles: Newly added file conflicts with + # existing file in test tree. Should generate a warning. + echo "new" > $NEW/second/second/difffiles/file + echo "test" > $TEST/second/second/difffiles/file + + # /difftype/first/first: A removed file has changed type. + # This should generate a warning. + mkfifo $OLD/difftype/first/first/fifo + mkdir $NEW/difftype/first/first/fifo + + # /difftype/difftype/difftype: All three files (old, new, and + # test) are different types from each other. This should + # generate a warning. + mkfifo $OLD/difftype/difftype/difftype/one + mkdir $NEW/difftype/difftype/difftype/one + echo "foo" > $TEST/difftype/difftype/difftype/one + mkdir $OLD/difftype/difftype/difftype/two + echo "baz" > $NEW/difftype/difftype/difftype/two + ln -s "bar" $TEST/difftype/difftype/difftype/two + + # /difftype/difftype/difflinks: A file has changed from a + # non-link to a link in both the new and test trees, but the + # target of the new and test links differ. This should + # generate a new link conflict. + mkfifo $OLD/difftype/difftype/difflinks/link + ln -s "new" $NEW/difftype/difftype/difflinks/link + ln -s "test" $TEST/difftype/difftype/difflinks/link + + # /difftype/difftype/difffile: A file has changed from a + # non-regular file to a regular file in both the new and test + # trees, but the contents in the new and test files differ. + # This should generate a new file conflict. + ln -s "old" $OLD/difftype/difftype/difffiles/file + echo "foo" > $NEW/difftype/difftype/difffiles/file + echo "bar" > $TEST/difftype/difftype/difffiles/file + + # /difflinks/first/first: A modified link is missing in the + # test tree. This should generate a warning. + ln -s "old" $OLD/difflinks/first/first/link + ln -s "new" $NEW/difflinks/first/first/link + + # /difflinks/difftype/difftype: An updated link has been + # changed to a different file type in the test tree. This + # should generate a warning. + ln -s "old" $OLD/difflinks/difftype/difftype/link + ln -s "new" $NEW/difflinks/difftype/difftype/link + echo "test" > $TEST/difflinks/difftype/difftype/link + + # /difflinks/difflinks/difflinks: An updated link has been + # modified in the test tree and doesn't match either the old + # or new links. This should generate a warning. + ln -s "old" $OLD/difflinks/difflinks/difflinks/link + ln -s "new" $NEW/difflinks/difflinks/difflinks/link + ln -s "test" $TEST/difflinks/difflinks/difflinks/link + + # /difffiles/first/first: A removed file has been changed in + # the new tree. This should generate a warning. + echo "foo" > $OLD/difffiles/first/first/file + echo "bar" > $NEW/difffiles/first/first/file + + # /difffiles/difftype/difftype: An updated regular file has + # been changed to a different file type in the test tree. + # This should generate a warning. + echo "old" > $OLD/difffiles/difftype/difftype/file + echo "new" > $NEW/difffiles/difftype/difftype/file + mkfifo $TEST/difffiles/difftype/difftype/file + + # /difffiles/difffiles/difffiles: A modified regular file was + # updated in the new tree. The changes should be merged into + # to the new file if possible. If the merge fails, a conflict + # should be generated. For this test we just include the + # conflict case. + cat > $OLD/difffiles/difffiles/difffiles/conflict < $NEW/difffiles/difffiles/difffiles/conflict < $TEST/difffiles/difffiles/difffiles/conflict < $TEST/rmdir/extra/localfile.txt + + # /rmdir/conflict: Do not remove a directory with a conflicted + # remove file. This should generate a warning. + for i in $OLD $TEST; do + mkdir $i/rmdir/conflict + done + mkfifo $OLD/rmdir/conflict/difftype + mkdir $TEST/rmdir/conflict/difftype + + ## Tests for converting files to directories and vice versa + for i in $OLD $NEW $TEST; do + for j in already old fromdir todir; do + mkdir -p $i/dirchange/$j + done + done + + # /dirchange/fromdir/extradir: Convert a directory tree to a + # file. The test tree includes an extra file in the directory + # that is not present in the old tree. This should generate a + # warning. + for i in $OLD $TEST; do + mkdir $i/dirchange/fromdir/extradir + echo "foo" > $i/dirchange/fromdir/extradir/file + done + mkfifo $TEST/dirchange/fromdir/extradir/fifo + ln -s "bar" $NEW/dirchange/fromdir/extradir + + # /dirchange/fromdir/conflict: Convert a directory tree to a + # file. The test tree includes a local change that generates + # a warning and prevents the removal of the directory. + for i in $OLD $TEST; do + mkdir $i/dirchange/fromdir/conflict + done + echo "foo" > $OLD/dirchange/fromdir/conflict/somefile + echo "bar" > $TEST/dirchange/fromdir/conflict/somefile + mkfifo $NEW/dirchange/fromdir/conflict + + # /dirchange/todir/difffile: Convert a file to a directory + # tree. The test tree has a locally modified version of the + # file so that the conversion fails with a warning. + echo "foo" > $OLD/dirchange/todir/difffile + mkdir $NEW/dirchange/todir/difffile + echo "baz" > $NEW/dirchange/todir/difffile/file + echo "bar" > $TEST/dirchange/todir/difffile + + # /dirchange/todir/difftype: Similar to the previous test, but + # the conflict is due to a change in the file type. + echo "foo" > $OLD/dirchange/todir/difftype + mkdir $NEW/dirchange/todir/difftype + echo "baz" > $NEW/dirchange/todir/difftype/file + mkfifo $TEST/dirchange/todir/difftype +} + +# $1 - relative path to file that should be missing from TEST +missing() +{ + if [ -e $TEST/$1 -o -L $TEST/$1 ]; then + echo "File $1 should be missing" + fi +} + +# $1 - relative path to file that should be present in TEST +present() +{ + if ! [ -e $TEST/$1 -o -L $TEST/$1 ]; then + echo "File $1 should be present" + fi +} + +# $1 - relative path to file that should be a fifo in TEST +fifo() +{ + if ! [ -p $TEST/$1 ]; then + echo "File $1 should be a FIFO" + fi +} + +# $1 - relative path to file that should be a directory in TEST +dir() +{ + if ! [ -d $TEST/$1 ]; then + echo "File $1 should be a directory" + fi +} + +# $1 - relative path to file that should be a symlink in TEST +# $2 - optional value of the link +link() +{ + local val + + if ! [ -L $TEST/$1 ]; then + echo "File $1 should be a link" + elif [ $# -gt 1 ]; then + val=`readlink $TEST/$1` + if [ "$val" != "$2" ]; then + echo "Link $1 should link to \"$2\"" + fi + fi +} + +# $1 - relative path to regular file that should be present in TEST +# $2 - optional string that should match file contents +# $3 - optional MD5 of the flie contents, overrides $2 if present +file() +{ + local contents sum + + if ! [ -f $TEST/$1 ]; then + echo "File $1 should be a regular file" + elif [ $# -eq 2 ]; then + contents=`cat $TEST/$1` + if [ "$contents" != "$2" ]; then + echo "File $1 has wrong contents" + fi + elif [ $# -eq 3 ]; then + sum=`md5 -q $TEST/$1` + if [ "$sum" != "$3" ]; then + echo "File $1 has wrong contents" + fi + fi +} + +# $1 - relative path to a regular file that should have a conflict +# $2 - optional MD5 of the conflict file contents +conflict() +{ + local sum + + if ! [ -f $CONFLICTS/$1 ]; then + echo "File $1 missing conflict" + elif [ $# -gt 1 ]; then + sum=`md5 -q $CONFLICTS/$1` + if [ "$sum" != "$2" ]; then + echo "Conflict $1 has wrong contents" + fi + fi +} + +# $1 - relative path to a regular file that should not have a conflict +noconflict() +{ + if [ -f $CONFLICTS/$1 ]; then + echo "File $1 should not have a conflict" + fi +} + +if [ `id -u` -ne 0 ]; then + echo "must be root" +fi + +if [ -r /etc/etcupdate.conf ]; then + echo "WARNING: /etc/etcupdate.conf settings may break some tests." +fi + +# First run the test ignoring no patterns. + +build_trees + +etcupdate -r -d $WORKDIR -D $TEST > $WORKDIR/test.out + +cat > $WORKDIR/correct.out < \ + $WORKDIR/test1.out + +cat > $WORKDIR/correct1.out < +# 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$ + +# Various regression tests to run for the 'resolve' command. + +WORKDIR=work + +usage() +{ + echo "Usage: tests.sh [-w workdir]" + exit 1 +} + +# Allow the user to specify an alternate work directory. +while getopts "w:" option; do + case $option in + w) + WORKDIR=$OPTARG + ;; + *) + echo + usage + ;; + esac +done +shift $((OPTIND - 1)) +if [ $# -ne 0 ]; then + usage +fi + +CONFLICTS=$WORKDIR/conflicts +OLD=$WORKDIR/old +NEW=$WORKDIR/current +TEST=$WORKDIR/test + +# These tests deal with conflicts to a single file. For each test, we +# generate a conflict in /etc/login.conf. Each resolve option is tested +# to ensure it DTRT. +build_login_conflict() +{ + + rm -rf $OLD $NEW $TEST $CONFLICTS + mkdir -p $OLD/etc $NEW/etc $TEST/etc + + # Generate a conflict in /etc/login.conf. + cat > $OLD/etc/login.conf < $NEW/etc/login.conf < $TEST/etc/login.conf </dev/null +} + +# This is used to verify special handling for /etc/mail/aliases and +# the newaliases warning. +build_aliases_conflict() +{ + + rm -rf $OLD $NEW $TEST $CONFLICTS + mkdir -p $OLD/etc/mail $NEW/etc/mail $TEST/etc/mail + + # Generate a conflict in /etc/mail/aliases + cat > $OLD/etc/mail/aliases < $NEW/etc/mail/aliases < $TEST/etc/mail/aliases </dev/null +} + +# $1 - relative path to file that should be missing from TEST +missing() +{ + if [ -e $TEST/$1 -o -L $TEST/$1 ]; then + echo "File $1 should be missing" + fi +} + +# $1 - relative path to file that should be present in TEST +present() +{ + if ! [ -e $TEST/$1 -o -L $TEST/$1 ]; then + echo "File $1 should be present" + fi +} + +# $1 - relative path to regular file that should be present in TEST +# $2 - optional string that should match file contents +# $3 - optional MD5 of the flie contents, overrides $2 if present +file() +{ + local contents sum + + if ! [ -f $TEST/$1 ]; then + echo "File $1 should be a regular file" + elif [ $# -eq 2 ]; then + contents=`cat $TEST/$1` + if [ "$contents" != "$2" ]; then + echo "File $1 has wrong contents" + fi + elif [ $# -eq 3 ]; then + sum=`md5 -q $TEST/$1` + if [ "$sum" != "$3" ]; then + echo "File $1 has wrong contents" + fi + fi +} + +# $1 - relative path to a regular file that should have a conflict +# $2 - optional MD5 of the conflict file contents +conflict() +{ + local sum + + if ! [ -f $CONFLICTS/$1 ]; then + echo "File $1 missing conflict" + elif [ $# -gt 1 ]; then + sum=`md5 -q $CONFLICTS/$1` + if [ "$sum" != "$2" ]; then + echo "Conflict $1 has wrong contents" + fi + fi +} + +# $1 - relative path to a regular file that should no longer have a conflict +resolved() +{ + if [ -f $CONFLICTS/$1 ]; then + echo "Conflict $1 should be resolved" + fi +} + +if [ `id -u` -ne 0 ]; then + echo "must be root" +fi + +if [ -r /etc/etcupdate.conf ]; then + echo "WARNING: /etc/etcupdate.conf settings may break some tests." +fi + +# Test each of the following resolve options: 'p', 'mf', 'tf', 'r'. + +build_login_conflict + +# Verify that 'p' doesn't do anything. +echo "Checking 'p':" +echo 'p' | etcupdate resolve -d $WORKDIR -D $TEST >/dev/null + +file /etc/login.conf "" 95de92ea3f1bb1bf4f612a8b5908cddd +missing /etc/login.conf.db +conflict /etc/login.conf + +# Verify that 'mf' removes the conflict, but does nothing else. +echo "Checking 'mf':" +echo 'mf' | etcupdate resolve -d $WORKDIR -D $TEST >/dev/null + +file /etc/login.conf "" 95de92ea3f1bb1bf4f612a8b5908cddd +missing /etc/login.conf.db +resolved /etc/login.conf + +build_login_conflict + +# Verify that 'tf' installs the new version of the file. +echo "Checking 'tf':" +echo 'tf' | etcupdate resolve -d $WORKDIR -D $TEST >/dev/null + +file /etc/login.conf "" 7774a0f9a3a372c7c109c32fd31c4b6b +file /etc/login.conf.db +resolved /etc/login.conf + +build_login_conflict + +# Verify that 'r' installs the resolved version of the file. To +# simulate this, manually edit the merged file so that it doesn't +# contain conflict markers. +echo "Checking 'r':" +cat > $CONFLICTS/etc/login.conf </dev/null + +file /etc/login.conf "" 966e25984b9b63da8eaac8479dcb0d4d +file /etc/login.conf.db +resolved /etc/login.conf + +build_aliases_conflict + +# Verify that 'p' and 'mf' do not generate the newaliases warning. +echo "Checking newalias warning for 'p'": +echo 'p' | etcupdate resolve -d $WORKDIR -D $TEST | grep -q newalias +if [ $? -eq 0 ]; then + echo "+ Extra warning" +fi +echo "Checking newalias warning for 'mf'": +echo 'mf' | etcupdate resolve -d $WORKDIR -D $TEST | grep -q newalias +if [ $? -eq 0 ]; then + echo "+ Extra warning" +fi + +# Verify that 'tf' and 'r' do generate the newaliases warning. +build_aliases_conflict +echo "Checking newalias warning for 'tf'": +echo 'tf' | etcupdate resolve -d $WORKDIR -D $TEST | grep -q newalias +if [ $? -ne 0 ]; then + echo "- Missing warning" +fi + +build_aliases_conflict +cp $TEST/etc/mail/aliases $CONFLICTS/etc/mail/aliases +echo 'r' | etcupdate resolve -d $WORKDIR -D $TEST | grep -q newalias +if [ $? -ne 0 ]; then + echo "- Missing warning" +fi Added: head/tools/regression/usr.sbin/etcupdate/fbsdid.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.sbin/etcupdate/fbsdid.sh Fri Jul 13 13:23:48 2012 (r238423) @@ -0,0 +1,327 @@ +#!/bin/sh +# +# Copyright (c) 2010 Advanced Computing Technologies LLC +# Written by: John H. Baldwin +# 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$ + +# Various regression tests to test the -F flag to the 'update' command. + +WORKDIR=work + +usage() +{ + echo "Usage: fbsdid.sh [-w workdir]" + exit 1 +} + +# Allow the user to specify an alternate work directory. +while getopts "w:" option; do + case $option in + w) + WORKDIR=$OPTARG + ;; + *) + echo + usage + ;; + esac +done +shift $((OPTIND - 1)) +if [ $# -ne 0 ]; then + usage +fi + +CONFLICTS=$WORKDIR/conflicts +OLD=$WORKDIR/old +NEW=$WORKDIR/current +TEST=$WORKDIR/test + +# Store a FreeBSD ID string in a specified file. The first argument +# is the file, the remaining arguments are the comment to use. +store_id() +{ + local file + + file=$1 + shift + + echo -n '# $FreeBSD' >> $file + echo -n "$@" >> $file + echo '$' >> $file +} + +# These tests deal with FreeBSD ID string conflicts. We run the test +# twice, once without -F and once with -F. +build_trees() +{ + local i + + rm -rf $OLD $NEW $TEST $CONFLICTS + mkdir -p $OLD $NEW $TEST + + # remove: Remove a file where the only local difference is a + # change in the FreeBSD ID string. + store_id $OLD/remove + store_id $TEST/remove ": head/remove 12345 jhb " + + # old: Modify a file where the only local difference between + # the old and test files is a change in the FreeBSD ID string. + store_id $OLD/old ": src/old,v 1.1 jhb Exp " + store_id $NEW/old ": head/old 12345 jhb " + store_id $TEST/old ": head/old 12000 jhb " + for i in $OLD $TEST; do + cat >> $i/old <> $NEW/old < Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9CB811065755; Fri, 13 Jul 2012 13:24:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E73C8FC14; Fri, 13 Jul 2012 13:24:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6DDOYQS071197; Fri, 13 Jul 2012 13:24:34 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6DDOYeC071195; Fri, 13 Jul 2012 13:24:34 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201207131324.q6DDOYeC071195@svn.freebsd.org> From: John Baldwin Date: Fri, 13 Jul 2012 13:24:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238424 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2012 13:24:34 -0000 Author: jhb Date: Fri Jul 13 13:24:33 2012 New Revision: 238424 URL: http://svn.freebsd.org/changeset/base/238424 Log: Make the interval timings for EVFILT_TIMER more accurate. tvtohz() always adds an extra tick to account for the current partial clock tick. However, that is not appropriate for a repeating timer when the exact tvtohz() value should be used for subsequent intervals. Fix repeating callouts for EVFILT_TIMER by subtracting 1 tick from the tvtohz() result similar to the fix used in realitexpire() for interval timers. While here, update a few comments to note that if the EVFILT_TIMER code were to move out of kern_event.c, it should move to kern_time.c (where the interval timer code it mimics lives) rather than kern_timeout.c. MFC after: 1 month Modified: head/sys/kern/kern_event.c Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Fri Jul 13 13:23:48 2012 (r238423) +++ head/sys/kern/kern_event.c Fri Jul 13 13:24:33 2012 (r238424) @@ -513,6 +513,10 @@ knote_fork(struct knlist *list, int pid) list->kl_unlock(list->kl_lockarg); } +/* + * XXX: EVFILT_TIMER should perhaps live in kern_time.c beside the + * interval timer support code. + */ static int timertoticks(intptr_t data) { @@ -526,7 +530,6 @@ timertoticks(intptr_t data) return tticks; } -/* XXX - move to kern_timeout.c? */ static void filt_timerexpire(void *knx) { @@ -536,9 +539,16 @@ filt_timerexpire(void *knx) kn->kn_data++; KNOTE_ACTIVATE(kn, 0); /* XXX - handle locking */ + /* + * timertoticks() uses tvtohz() which always adds 1 to allow + * for the time until the next clock interrupt being strictly + * less than 1 clock tick. We don't want that here since we + * want to appear to be in sync with the clock interrupt even + * when we're delayed. + */ if ((kn->kn_flags & EV_ONESHOT) != EV_ONESHOT) { calloutp = (struct callout *)kn->kn_hook; - callout_reset_curcpu(calloutp, timertoticks(kn->kn_sdata), + callout_reset_curcpu(calloutp, timertoticks(kn->kn_sdata) - 1, filt_timerexpire, kn); } } @@ -546,7 +556,6 @@ filt_timerexpire(void *knx) /* * data contains amount of time to sleep, in milliseconds */ -/* XXX - move to kern_timeout.c? */ static int filt_timerattach(struct knote *kn) { @@ -570,7 +579,6 @@ filt_timerattach(struct knote *kn) return (0); } -/* XXX - move to kern_timeout.c? */ static void filt_timerdetach(struct knote *kn) { @@ -583,7 +591,6 @@ filt_timerdetach(struct knote *kn) kn->kn_status |= KN_DETACHED; /* knlist_remove usually clears it */ } -/* XXX - move to kern_timeout.c? */ static int filt_timer(struct knote *kn, long hint) { From owner-svn-src-head@FreeBSD.ORG Fri Jul 13 13:33:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7C071065675; Fri, 13 Jul 2012 13:33:23 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from mail.vnode.se (mail.vnode.se [62.119.52.80]) by mx1.freebsd.org (Postfix) with ESMTP id 6A0D88FC15; Fri, 13 Jul 2012 13:33:23 +0000 (UTC) Received: from mail.vnode.se (localhost [127.0.0.1]) by mail.vnode.se (Postfix) with ESMTP id AD376E3F07A; Fri, 13 Jul 2012 15:33:15 +0200 (CEST) X-Virus-Scanned: amavisd-new at vnode.se Received: from mail.vnode.se ([127.0.0.1]) by mail.vnode.se (mail.vnode.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iuSW80ZK8OVR; Fri, 13 Jul 2012 15:33:10 +0200 (CEST) Received: from jd.benders.se (jd.benders.se [212.247.52.12]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.vnode.se (Postfix) with ESMTPSA id A4C1CE3F079; Fri, 13 Jul 2012 15:33:09 +0200 (CEST) Date: Fri, 13 Jul 2012 15:33:07 +0200 From: Joel Dahl To: John Baldwin Message-ID: <20120713133307.GG92334@jd.benders.se> References: <201207131323.q6DDNnFK071126@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201207131323.q6DDNnFK071126@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238423 - in head: tools/regression/usr.sbin/etcupdate usr.sbin usr.sbin/etcupdate X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2012 13:33:23 -0000 On 13-07-2012 13:23, John Baldwin wrote: > Author: jhb > Date: Fri Jul 13 13:23:48 2012 > New Revision: 238423 > URL: http://svn.freebsd.org/changeset/base/238423 > > Log: > The etcupdate utility is a tool for managing updates to files that are > not updated as part of `make installworld' such as files in /etc. It > manages updates by doing a three-way merge of changes made to these files > against the local versions. It is also designed to minimize the amount > of user intervention with the goal of simplifying upgrades for clusters > of machines. Thanks! -- Joel From owner-svn-src-head@FreeBSD.ORG Fri Jul 13 14:42:08 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE8EA106566B; Fri, 13 Jul 2012 14:42:08 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 82F9B8FC16; Fri, 13 Jul 2012 14:42:08 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 030D6B94A; Fri, 13 Jul 2012 10:42:08 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Fri, 13 Jul 2012 09:30:15 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201207131323.q6DDNnFK071126@svn.freebsd.org> In-Reply-To: <201207131323.q6DDNnFK071126@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201207130930.15964.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 13 Jul 2012 10:42:08 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r238423 - in head: tools/regression/usr.sbin/etcupdate usr.sbin usr.sbin/etcupdate X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2012 14:42:08 -0000 On Friday, July 13, 2012 9:23:48 am John Baldwin wrote: > Author: jhb > Date: Fri Jul 13 13:23:48 2012 > New Revision: 238423 > URL: http://svn.freebsd.org/changeset/base/238423 > > Log: > The etcupdate utility is a tool for managing updates to files that are > not updated as part of `make installworld' such as files in /etc. It > manages updates by doing a three-way merge of changes made to these files > against the local versions. It is also designed to minimize the amount > of user intervention with the goal of simplifying upgrades for clusters > of machines. > > The primary difference from mergemaster is that etcupdate requires less > manual work. The primary difference from etcmerge is that etcupdate > updates files in-place similar to mergemaster rather than building a > separate /etc tree. > > Requested by: obrien, kib, theraven, joeld (among others) A primary reason for importing this is to make it easier for folks to use out of the box. I have an (untested) patch to update the release build to include a bootstrap of etcupdate out-of-the-box. Once that is tested I'll commit it. I have been using a similar patch for old-style releases on 7 and 8 for many years now at work. Index: release/Makefile =================================================================== --- Makefile (revision 238365) +++ Makefile (working copy) @@ -71,6 +71,9 @@ base.txz: # Set up mergemaster root database sh ${.CURDIR}/scripts/mm-mtree.sh -m ${WORLDDIR} -F \ "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" -D "${.OBJDIR}/${DISTDIR}/base" +# Bootstrap etcupdate + etcupdate extract -B -d "${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate" \ + -M "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" # Package all components cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR} mv ${DISTDIR}/*.txz . -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Jul 13 15:25:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 88CD5106564A; Fri, 13 Jul 2012 15:25:11 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 748DF8FC15; Fri, 13 Jul 2012 15:25:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6DFPBV8076139; Fri, 13 Jul 2012 15:25:11 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6DFPBDD076137; Fri, 13 Jul 2012 15:25:11 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201207131525.q6DFPBDD076137@svn.freebsd.org> From: Joel Dahl Date: Fri, 13 Jul 2012 15:25:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238426 - head/usr.sbin/etcupdate X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2012 15:25:11 -0000 Author: joel (doc committer) Date: Fri Jul 13 15:25:10 2012 New Revision: 238426 URL: http://svn.freebsd.org/changeset/base/238426 Log: Minor mdoc, spelling and end of line whitespace fixes. Modified: head/usr.sbin/etcupdate/etcupdate.8 Modified: head/usr.sbin/etcupdate/etcupdate.8 ============================================================================== --- head/usr.sbin/etcupdate/etcupdate.8 Fri Jul 13 14:02:05 2012 (r238425) +++ head/usr.sbin/etcupdate/etcupdate.8 Fri Jul 13 15:25:10 2012 (r238426) @@ -112,7 +112,6 @@ The utility will not perform a new merge until all conflicts from an earlier merge are resolved. .Sh MODES -.Pp The .Nm utility supports several modes of operation. @@ -150,7 +149,7 @@ tree. An older .Dq previous tree is removed if it exists. -By default the new +By default the new .Dq current tree is built from a source tree. However, @@ -349,7 +348,9 @@ Do not build generated files in a privat Instead, reuse the generated files from a previously built object tree that matches the source tree. -This can be useful to avoid gratuitous conflicts in sendmail configuration +This can be useful to avoid gratuitous conflicts in +.Xr sendmail 8 +configuration files when bootstrapping. It can also be useful for building a tarball that matches a specific world build. @@ -379,7 +380,7 @@ variable or the option will not be installed. .It Fl D Ar destdir Specify an alternate destination directory as the target of a merge. -This is analagous to the +This is analogous to the .Dv DESTDIR variable used with .Sq make installworld . @@ -739,12 +740,11 @@ but it has been removed in the destinati .El .Sh SEE ALSO .Xr cap_mkdb 1 , -.Xr diff 1 , +.Xr diff 1 , .Xr make 1 , .Xr newaliases 1 , .Xr sh 1 , .Xr pwd_mkdb 8 -.\".Sh HISTORY .Sh AUTHORS The .Nm From owner-svn-src-head@FreeBSD.ORG Fri Jul 13 20:11:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6AB881065676; Fri, 13 Jul 2012 20:11:00 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 55C638FC17; Fri, 13 Jul 2012 20:11:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6DKB0ns087536; Fri, 13 Jul 2012 20:11:00 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6DKB0El087534; Fri, 13 Jul 2012 20:11:00 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201207132011.q6DKB0El087534@svn.freebsd.org> From: Brooks Davis Date: Fri, 13 Jul 2012 20:11:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238427 - head/etc/rc.d X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2012 20:11:00 -0000 Author: brooks Date: Fri Jul 13 20:10:59 2012 New Revision: 238427 URL: http://svn.freebsd.org/changeset/base/238427 Log: MFP4 214344: Tighten the regular expression that checks for an md /tmp such that no /tmp mount and an md / isn't improperly matched. Sponsored by: DARPA/AFRL Modified: head/etc/rc.d/tmp Modified: head/etc/rc.d/tmp ============================================================================== --- head/etc/rc.d/tmp Fri Jul 13 15:25:10 2012 (r238426) +++ head/etc/rc.d/tmp Fri Jul 13 20:10:59 2012 (r238427) @@ -39,7 +39,7 @@ load_rc_config $name mount_tmpmfs() { - if ! /bin/df /tmp | grep -q "^/dev/md[0-9]"; then + if ! /bin/df /tmp | grep -q "^/dev/md[0-9].* /tmp"; then mount_md ${tmpsize} /tmp "${tmpmfs_flags}" chmod 01777 /tmp fi From owner-svn-src-head@FreeBSD.ORG Fri Jul 13 21:27:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3E76D106564A; Fri, 13 Jul 2012 21:27:19 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 297888FC08; Fri, 13 Jul 2012 21:27:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6DLRJds090627; Fri, 13 Jul 2012 21:27:19 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6DLRIXF090625; Fri, 13 Jul 2012 21:27:18 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201207132127.q6DLRIXF090625@svn.freebsd.org> From: Joel Dahl Date: Fri, 13 Jul 2012 21:27:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238428 - head/usr.sbin/etcupdate X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2012 21:27:19 -0000 Author: joel (doc committer) Date: Fri Jul 13 21:27:18 2012 New Revision: 238428 URL: http://svn.freebsd.org/changeset/base/238428 Log: Add HISTORY section. Modified: head/usr.sbin/etcupdate/etcupdate.8 Modified: head/usr.sbin/etcupdate/etcupdate.8 ============================================================================== --- head/usr.sbin/etcupdate/etcupdate.8 Fri Jul 13 20:10:59 2012 (r238427) +++ head/usr.sbin/etcupdate/etcupdate.8 Fri Jul 13 21:27:18 2012 (r238428) @@ -745,6 +745,11 @@ but it has been removed in the destinati .Xr newaliases 1 , .Xr sh 1 , .Xr pwd_mkdb 8 +.Sh HISTORY +The +.Nm +utility first appeared in +.Fx 10.0 . .Sh AUTHORS The .Nm From owner-svn-src-head@FreeBSD.ORG Fri Jul 13 21:48:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CED15106566C; Fri, 13 Jul 2012 21:48:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 648DC8FC12; Fri, 13 Jul 2012 21:48:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6DLm2QQ091508; Fri, 13 Jul 2012 21:48:02 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6DLm2Bl091505; Fri, 13 Jul 2012 21:48:02 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201207132148.q6DLm2Bl091505@svn.freebsd.org> From: Dimitry Andric Date: Fri, 13 Jul 2012 21:48:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238429 - head/contrib/llvm/tools/clang/lib/Sema X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2012 21:48:02 -0000 Author: dim Date: Fri Jul 13 21:48:01 2012 New Revision: 238429 URL: http://svn.freebsd.org/changeset/base/238429 Log: Pull in r159895 from upstream clang trunk: When marking virtual functions as used for a class' vtable, mark all functions which will appear in the vtable as used, not just those ones which were declared within the class itself. Fixes an issue reported as comment#3 in PR12763 -- we sometimes assert in codegen if we try to emit a reference to a function declaration which we've not marked as referenced. This also matches gcc's observed behavior. This should fix clang assertions when building certain components of the LibreOffice port. MFC after: 3 days Modified: head/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp Modified: head/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp Fri Jul 13 21:27:18 2012 (r238428) +++ head/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp Fri Jul 13 21:48:01 2012 (r238429) @@ -10937,14 +10937,23 @@ bool Sema::DefineUsedVTables() { void Sema::MarkVirtualMembersReferenced(SourceLocation Loc, const CXXRecordDecl *RD) { - for (CXXRecordDecl::method_iterator i = RD->method_begin(), - e = RD->method_end(); i != e; ++i) { - CXXMethodDecl *MD = *i; - - // C++ [basic.def.odr]p2: - // [...] A virtual member function is used if it is not pure. [...] - if (MD->isVirtual() && !MD->isPure()) - MarkFunctionReferenced(Loc, MD); + // Mark all functions which will appear in RD's vtable as used. + CXXFinalOverriderMap FinalOverriders; + RD->getFinalOverriders(FinalOverriders); + for (CXXFinalOverriderMap::const_iterator I = FinalOverriders.begin(), + E = FinalOverriders.end(); + I != E; ++I) { + for (OverridingMethods::const_iterator OI = I->second.begin(), + OE = I->second.end(); + OI != OE; ++OI) { + assert(OI->second.size() > 0 && "no final overrider"); + CXXMethodDecl *Overrider = OI->second.front().Method; + + // C++ [basic.def.odr]p2: + // [...] A virtual member function is used if it is not pure. [...] + if (!Overrider->isPure()) + MarkFunctionReferenced(Loc, Overrider); + } } // Only classes that have virtual bases need a VTT. From owner-svn-src-head@FreeBSD.ORG Fri Jul 13 22:29:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C269C106566B; Fri, 13 Jul 2012 22:29:02 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD43E8FC12; Fri, 13 Jul 2012 22:29:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6DMT2kw093244; Fri, 13 Jul 2012 22:29:02 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6DMT2Qd093242; Fri, 13 Jul 2012 22:29:02 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201207132229.q6DMT2Qd093242@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 13 Jul 2012 22:29:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238430 - head/tools/regression/bin/sh/expansion X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2012 22:29:02 -0000 Author: jilles Date: Fri Jul 13 22:29:02 2012 New Revision: 238430 URL: http://svn.freebsd.org/changeset/base/238430 Log: sh: Add tests where "export" does not parse differently. It is planned to expand variable assignments as assignments (no word splitting, different tilde expansion) when they follow a "declaration utility" (export, readonly or local). However, a quoted character cannot be part of a "name" so things like \v=~ are not assignments, and the existing behaviour applies. Added: head/tools/regression/bin/sh/expansion/export1.0 (contents, props changed) Added: head/tools/regression/bin/sh/expansion/export1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/export1.0 Fri Jul 13 22:29:02 2012 (r238430) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +w='@ vv=6' + +v=0 vv=0 +export \v=$w +[ "$v" = "@" ] || echo "Expected @ got $v" +[ "$vv" = "6" ] || echo "Expected 6 got $vv" + +HOME=/known/value + +export \v=~ +[ "$v" = \~ ] || echo "Expected ~ got $v" From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 01:45:35 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E00EA1065677; Sat, 14 Jul 2012 01:45:35 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C984E8FC08; Sat, 14 Jul 2012 01:45:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6E1jZgZ001309; Sat, 14 Jul 2012 01:45:35 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6E1jZd4001292; Sat, 14 Jul 2012 01:45:35 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201207140145.q6E1jZd4001292@svn.freebsd.org> From: Devin Teske Date: Sat, 14 Jul 2012 01:45:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238431 - head/sys/boot/forth X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 01:45:36 -0000 Author: dteske Date: Sat Jul 14 01:45:35 2012 New Revision: 238431 URL: http://svn.freebsd.org/changeset/base/238431 Log: Fix domain. Approved by: emaste Modified: head/sys/boot/forth/beastie.4th head/sys/boot/forth/beastie.4th.8 head/sys/boot/forth/brand.4th head/sys/boot/forth/brand.4th.8 head/sys/boot/forth/check-password.4th head/sys/boot/forth/check-password.4th.8 head/sys/boot/forth/color.4th head/sys/boot/forth/color.4th.8 head/sys/boot/forth/delay.4th head/sys/boot/forth/delay.4th.8 head/sys/boot/forth/menu-commands.4th head/sys/boot/forth/menu.4th head/sys/boot/forth/menu.4th.8 head/sys/boot/forth/shortcuts.4th head/sys/boot/forth/version.4th head/sys/boot/forth/version.4th.8 Modified: head/sys/boot/forth/beastie.4th ============================================================================== --- head/sys/boot/forth/beastie.4th Fri Jul 13 22:29:02 2012 (r238430) +++ head/sys/boot/forth/beastie.4th Sat Jul 14 01:45:35 2012 (r238431) @@ -1,6 +1,6 @@ \ Copyright (c) 2003 Scott Long \ Copyright (c) 2003 Aleksander Fafula -\ Copyright (c) 2006-2011 Devin Teske +\ Copyright (c) 2006-2011 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without Modified: head/sys/boot/forth/beastie.4th.8 ============================================================================== --- head/sys/boot/forth/beastie.4th.8 Fri Jul 13 22:29:02 2012 (r238430) +++ head/sys/boot/forth/beastie.4th.8 Sat Jul 14 01:45:35 2012 (r238431) @@ -168,4 +168,4 @@ set of commands was written by .An Scott Long Aq scottl@FreeBSD.org , .An Aleksander Fafula Aq alex@fafula.com and -.An Devin Teske Aq dteske@freebsd.org . +.An Devin Teske Aq dteske@FreeBSD.org . Modified: head/sys/boot/forth/brand.4th ============================================================================== --- head/sys/boot/forth/brand.4th Fri Jul 13 22:29:02 2012 (r238430) +++ head/sys/boot/forth/brand.4th Sat Jul 14 01:45:35 2012 (r238431) @@ -1,4 +1,4 @@ -\ Copyright (c) 2006-2011 Devin Teske +\ Copyright (c) 2006-2011 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without Modified: head/sys/boot/forth/brand.4th.8 ============================================================================== --- head/sys/boot/forth/brand.4th.8 Fri Jul 13 22:29:02 2012 (r238430) +++ head/sys/boot/forth/brand.4th.8 Sat Jul 14 01:45:35 2012 (r238431) @@ -122,4 +122,4 @@ The .Nm set of commands was written by .An -nosplit -.An Devin Teske Aq dteske@freebsd.org . +.An Devin Teske Aq dteske@FreeBSD.org . Modified: head/sys/boot/forth/check-password.4th ============================================================================== --- head/sys/boot/forth/check-password.4th Fri Jul 13 22:29:02 2012 (r238430) +++ head/sys/boot/forth/check-password.4th Sat Jul 14 01:45:35 2012 (r238431) @@ -1,4 +1,4 @@ -\ Copyright (c) 2006-2011 Devin Teske +\ Copyright (c) 2006-2011 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without Modified: head/sys/boot/forth/check-password.4th.8 ============================================================================== --- head/sys/boot/forth/check-password.4th.8 Fri Jul 13 22:29:02 2012 (r238430) +++ head/sys/boot/forth/check-password.4th.8 Sat Jul 14 01:45:35 2012 (r238431) @@ -120,4 +120,4 @@ The .Nm set of commands was written by .An -nosplit -.An Devin Teske Aq dteske@freebsd.org . +.An Devin Teske Aq dteske@FreeBSD.org . Modified: head/sys/boot/forth/color.4th ============================================================================== --- head/sys/boot/forth/color.4th Fri Jul 13 22:29:02 2012 (r238430) +++ head/sys/boot/forth/color.4th Sat Jul 14 01:45:35 2012 (r238431) @@ -1,4 +1,4 @@ -\ Copyright (c) 2011 Devin Teske +\ Copyright (c) 2011 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without Modified: head/sys/boot/forth/color.4th.8 ============================================================================== --- head/sys/boot/forth/color.4th.8 Fri Jul 13 22:29:02 2012 (r238430) +++ head/sys/boot/forth/color.4th.8 Sat Jul 14 01:45:35 2012 (r238431) @@ -114,4 +114,4 @@ The .Nm set of commands was written by .An -nosplit -.An Devin Teske Aq dteske@freebsd.org . +.An Devin Teske Aq dteske@FreeBSD.org . Modified: head/sys/boot/forth/delay.4th ============================================================================== --- head/sys/boot/forth/delay.4th Fri Jul 13 22:29:02 2012 (r238430) +++ head/sys/boot/forth/delay.4th Sat Jul 14 01:45:35 2012 (r238431) @@ -1,4 +1,4 @@ -\ Copyright (c) 2008-2011 Devin Teske +\ Copyright (c) 2008-2011 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without Modified: head/sys/boot/forth/delay.4th.8 ============================================================================== --- head/sys/boot/forth/delay.4th.8 Fri Jul 13 22:29:02 2012 (r238430) +++ head/sys/boot/forth/delay.4th.8 Sat Jul 14 01:45:35 2012 (r238431) @@ -123,4 +123,4 @@ The .Nm set of commands was written by .An -nosplit -.An Devin Teske Aq dteske@freebsd.org . +.An Devin Teske Aq dteske@FreeBSD.org . Modified: head/sys/boot/forth/menu-commands.4th ============================================================================== --- head/sys/boot/forth/menu-commands.4th Fri Jul 13 22:29:02 2012 (r238430) +++ head/sys/boot/forth/menu-commands.4th Sat Jul 14 01:45:35 2012 (r238431) @@ -1,4 +1,4 @@ -\ Copyright (c) 2006-2011 Devin Teske +\ Copyright (c) 2006-2011 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without Modified: head/sys/boot/forth/menu.4th ============================================================================== --- head/sys/boot/forth/menu.4th Fri Jul 13 22:29:02 2012 (r238430) +++ head/sys/boot/forth/menu.4th Sat Jul 14 01:45:35 2012 (r238431) @@ -1,6 +1,6 @@ \ Copyright (c) 2003 Scott Long \ Copyright (c) 2003 Aleksander Fafula -\ Copyright (c) 2006-2011 Devin Teske +\ Copyright (c) 2006-2011 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without Modified: head/sys/boot/forth/menu.4th.8 ============================================================================== --- head/sys/boot/forth/menu.4th.8 Fri Jul 13 22:29:02 2012 (r238430) +++ head/sys/boot/forth/menu.4th.8 Sat Jul 14 01:45:35 2012 (r238431) @@ -320,4 +320,4 @@ The .Nm set of commands was written by .An -nosplit -.An Devin Teske Aq dteske@freebsd.org . +.An Devin Teske Aq dteske@FreeBSD.org . Modified: head/sys/boot/forth/shortcuts.4th ============================================================================== --- head/sys/boot/forth/shortcuts.4th Fri Jul 13 22:29:02 2012 (r238430) +++ head/sys/boot/forth/shortcuts.4th Sat Jul 14 01:45:35 2012 (r238431) @@ -1,4 +1,4 @@ -\ Copyright (c) 2008-2011 Devin Teske +\ Copyright (c) 2008-2011 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without Modified: head/sys/boot/forth/version.4th ============================================================================== --- head/sys/boot/forth/version.4th Fri Jul 13 22:29:02 2012 (r238430) +++ head/sys/boot/forth/version.4th Sat Jul 14 01:45:35 2012 (r238431) @@ -1,4 +1,4 @@ -\ Copyright (c) 2006-2011 Devin Teske +\ Copyright (c) 2006-2011 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without Modified: head/sys/boot/forth/version.4th.8 ============================================================================== --- head/sys/boot/forth/version.4th.8 Fri Jul 13 22:29:02 2012 (r238430) +++ head/sys/boot/forth/version.4th.8 Sat Jul 14 01:45:35 2012 (r238431) @@ -123,4 +123,4 @@ The .Nm set of commands was written by .An -nosplit -.An Devin Teske Aq dteske@freebsd.org . +.An Devin Teske Aq dteske@FreeBSD.org . From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 02:07:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67414106564A; Sat, 14 Jul 2012 02:07:52 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 48D8F8FC14; Sat, 14 Jul 2012 02:07:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6E27qVf002238; Sat, 14 Jul 2012 02:07:52 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6E27q80002234; Sat, 14 Jul 2012 02:07:52 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207140207.q6E27q80002234@svn.freebsd.org> From: Adrian Chadd Date: Sat, 14 Jul 2012 02:07:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238432 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 02:07:52 -0000 Author: adrian Date: Sat Jul 14 02:07:51 2012 New Revision: 238432 URL: http://svn.freebsd.org/changeset/base/238432 Log: Fix EDMA RX to actually work without panicing the machine. I was setting up the RX EDMA buffer to be 4096 bytes rather than the RX data buffer portion. The hardware was likely getting very confused and DMAing descriptor portions into places it shouldn't, leading to memory corruption and occasional panics. Whilst here, don't bother allocating descriptors for the RX EDMA case. We don't use those descriptors. Instead, just allocate ath_buf entries. Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_misc.h head/sys/dev/ath/if_ath_rx_edma.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sat Jul 14 01:45:35 2012 (r238431) +++ head/sys/dev/ath/if_ath.c Sat Jul 14 02:07:51 2012 (r238432) @@ -2888,6 +2888,67 @@ fail0: #undef ATH_DESC_4KB_BOUND_CHECK } +/* + * Allocate ath_buf entries but no descriptor contents. + * + * This is for RX EDMA where the descriptors are the header part of + * the RX buffer. + */ +int +ath_descdma_setup_rx_edma(struct ath_softc *sc, + struct ath_descdma *dd, ath_bufhead *head, + const char *name, int nbuf, int rx_status_len) +{ + struct ifnet *ifp = sc->sc_ifp; + struct ath_buf *bf; + int i, bsize, error; + + DPRINTF(sc, ATH_DEBUG_RESET, "%s: %s DMA: %u buffers\n", + __func__, name, nbuf); + + dd->dd_name = name; + /* + * This is (mostly) purely for show. We're not allocating any actual + * descriptors here as EDMA RX has the descriptor be part + * of the RX buffer. + * + * However, dd_desc_len is used by ath_descdma_free() to determine + * whether we have already freed this DMA mapping. + */ + dd->dd_desc_len = rx_status_len; + + /* allocate rx buffers */ + bsize = sizeof(struct ath_buf) * nbuf; + bf = malloc(bsize, M_ATHDEV, M_NOWAIT | M_ZERO); + if (bf == NULL) { + if_printf(ifp, "malloc of %s buffers failed, size %u\n", + dd->dd_name, bsize); + goto fail3; + } + dd->dd_bufptr = bf; + + TAILQ_INIT(head); + for (i = 0; i < nbuf; i++, bf++) { + bf->bf_desc = NULL; + bf->bf_daddr = 0; + bf->bf_lastds = NULL; /* Just an initial value */ + + error = bus_dmamap_create(sc->sc_dmat, BUS_DMA_NOWAIT, + &bf->bf_dmamap); + if (error != 0) { + if_printf(ifp, "unable to create dmamap for %s " + "buffer %u, error %u\n", dd->dd_name, i, error); + ath_descdma_cleanup(sc, dd, head); + return error; + } + TAILQ_INSERT_TAIL(head, bf, bf_list); + } + return 0; +fail3: + memset(dd, 0, sizeof(*dd)); + return error; +} + void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd, ath_bufhead *head) Modified: head/sys/dev/ath/if_ath_misc.h ============================================================================== --- head/sys/dev/ath/if_ath_misc.h Sat Jul 14 01:45:35 2012 (r238431) +++ head/sys/dev/ath/if_ath_misc.h Sat Jul 14 02:07:51 2012 (r238432) @@ -86,6 +86,9 @@ extern void ath_setslottime(struct ath_s extern int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd, ath_bufhead *head, const char *name, int nbuf, int ndesc); +extern int ath_descdma_setup_rx_edma(struct ath_softc *sc, + struct ath_descdma *dd, ath_bufhead *head, const char *name, + int nbuf, int desclen); extern void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd, ath_bufhead *head); Modified: head/sys/dev/ath/if_ath_rx_edma.c ============================================================================== --- head/sys/dev/ath/if_ath_rx_edma.c Sat Jul 14 01:45:35 2012 (r238431) +++ head/sys/dev/ath/if_ath_rx_edma.c Sat Jul 14 02:07:51 2012 (r238432) @@ -696,11 +696,11 @@ ath_edma_dma_rxsetup(struct ath_softc *s { int error; - /* Create RX DMA tag */ - /* Create RX ath_buf array */ - - error = ath_descdma_setup(sc, &sc->sc_rxdma, &sc->sc_rxbuf, - "rx", ath_rxbuf, 1); + /* + * Create RX DMA tag and buffers. + */ + error = ath_descdma_setup_rx_edma(sc, &sc->sc_rxdma, &sc->sc_rxbuf, + "rx", ath_rxbuf, sc->sc_rx_statuslen); if (error != 0) return error; @@ -739,15 +739,16 @@ ath_recv_setup_edma(struct ath_softc *sc /* Set buffer size to 4k */ sc->sc_edma_bufsize = 4096; - /* Configure the hardware with this */ - (void) ath_hal_setrxbufsize(sc->sc_ah, sc->sc_edma_bufsize); - /* Fetch EDMA field and buffer sizes */ (void) ath_hal_getrxstatuslen(sc->sc_ah, &sc->sc_rx_statuslen); (void) ath_hal_gettxdesclen(sc->sc_ah, &sc->sc_tx_desclen); (void) ath_hal_gettxstatuslen(sc->sc_ah, &sc->sc_tx_statuslen); (void) ath_hal_getntxmaps(sc->sc_ah, &sc->sc_tx_nmaps); + /* Configure the hardware with the RX buffer size */ + (void) ath_hal_setrxbufsize(sc->sc_ah, sc->sc_edma_bufsize - + sc->sc_rx_statuslen); + device_printf(sc->sc_dev, "RX status length: %d\n", sc->sc_rx_statuslen); device_printf(sc->sc_dev, "TX descriptor length: %d\n", From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 02:22:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ACFC0106566B; Sat, 14 Jul 2012 02:22:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 97DD28FC08; Sat, 14 Jul 2012 02:22:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6E2MHGw002879; Sat, 14 Jul 2012 02:22:17 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6E2MHam002875; Sat, 14 Jul 2012 02:22:17 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207140222.q6E2MHam002875@svn.freebsd.org> From: Adrian Chadd Date: Sat, 14 Jul 2012 02:22:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238433 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 02:22:17 -0000 Author: adrian Date: Sat Jul 14 02:22:17 2012 New Revision: 238433 URL: http://svn.freebsd.org/changeset/base/238433 Log: Create an RX queue lock. Ideally these locks would go away and there'd be a single driver lock, like what iwn(4) does. I'll worry about that later. Modified: head/sys/dev/ath/if_ath_ahb.c head/sys/dev/ath/if_ath_pci.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath_ahb.c ============================================================================== --- head/sys/dev/ath/if_ath_ahb.c Sat Jul 14 02:07:51 2012 (r238432) +++ head/sys/dev/ath/if_ath_ahb.c Sat Jul 14 02:22:17 2012 (r238433) @@ -193,11 +193,13 @@ ath_ahb_attach(device_t dev) ATH_LOCK_INIT(sc); ATH_PCU_LOCK_INIT(sc); + ATH_RX_LOCK_INIT(sc); error = ath_attach(AR9130_DEVID, sc); if (error == 0) /* success */ return 0; + ATH_RX_LOCK_DESTROY(sc); ATH_PCU_LOCK_DESTROY(sc); ATH_LOCK_DESTROY(sc); bus_dma_tag_destroy(sc->sc_dmat); @@ -238,6 +240,7 @@ ath_ahb_detach(device_t dev) if (sc->sc_eepromdata) free(sc->sc_eepromdata, M_TEMP); + ATH_RX_LOCK_DESTROY(sc); ATH_PCU_LOCK_DESTROY(sc); ATH_LOCK_DESTROY(sc); Modified: head/sys/dev/ath/if_ath_pci.c ============================================================================== --- head/sys/dev/ath/if_ath_pci.c Sat Jul 14 02:07:51 2012 (r238432) +++ head/sys/dev/ath/if_ath_pci.c Sat Jul 14 02:22:17 2012 (r238433) @@ -249,12 +249,14 @@ ath_pci_attach(device_t dev) ATH_LOCK_INIT(sc); ATH_PCU_LOCK_INIT(sc); + ATH_RX_LOCK_INIT(sc); error = ath_attach(pci_get_device(dev), sc); if (error == 0) /* success */ return 0; ATH_PCU_LOCK_DESTROY(sc); + ATH_RX_LOCK_DESTROY(sc); ATH_LOCK_DESTROY(sc); bus_dma_tag_destroy(sc->sc_dmat); bad3: @@ -294,6 +296,7 @@ ath_pci_detach(device_t dev) free(sc->sc_eepromdata, M_TEMP); ATH_PCU_LOCK_DESTROY(sc); + ATH_RX_LOCK_DESTROY(sc); ATH_LOCK_DESTROY(sc); return (0); Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Sat Jul 14 02:07:51 2012 (r238432) +++ head/sys/dev/ath/if_athvar.h Sat Jul 14 02:22:17 2012 (r238433) @@ -425,6 +425,8 @@ struct ath_softc { struct mtx sc_mtx; /* master lock (recursive) */ struct mtx sc_pcu_mtx; /* PCU access mutex */ char sc_pcu_mtx_name[32]; + struct mtx sc_rx_mtx; /* RX access mutex */ + char sc_rx_mtx_name[32]; struct taskqueue *sc_tq; /* private task queue */ struct ath_hal *sc_ah; /* Atheros HAL */ struct ath_ratectrl *sc_rc; /* tx rate control support */ @@ -696,6 +698,28 @@ struct ath_softc { #define ATH_PCU_UNLOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_pcu_mtx, \ MA_NOTOWNED) +/* + * The RX lock is primarily a(nother) workaround to ensure that the + * RX FIFO/list isn't modified by various execution paths. + * Even though RX occurs in a single context (the ath taskqueue), the + * RX path can be executed via various reset/channel change paths. + */ +#define ATH_RX_LOCK_INIT(_sc) do {\ + snprintf((_sc)->sc_rx_mtx_name, \ + sizeof((_sc)->sc_rx_mtx_name), \ + "%s RX lock", \ + device_get_nameunit((_sc)->sc_dev)); \ + mtx_init(&(_sc)->sc_rx_mtx, (_sc)->sc_rx_mtx_name, \ + NULL, MTX_DEF); \ + } while (0) +#define ATH_RX_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_rx_mtx) +#define ATH_RX_LOCK(_sc) mtx_lock(&(_sc)->sc_rx_mtx) +#define ATH_RX_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_rx_mtx) +#define ATH_RX_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_rx_mtx, \ + MA_OWNED) +#define ATH_RX_UNLOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_rx_mtx, \ + MA_NOTOWNED) + #define ATH_TXQ_SETUP(sc, i) ((sc)->sc_txqsetup & (1< Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2FD4106566B; Sat, 14 Jul 2012 02:47:16 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE5AA8FC16; Sat, 14 Jul 2012 02:47:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6E2lG7D003936; Sat, 14 Jul 2012 02:47:16 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6E2lGRd003934; Sat, 14 Jul 2012 02:47:16 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207140247.q6E2lGRd003934@svn.freebsd.org> From: Adrian Chadd Date: Sat, 14 Jul 2012 02:47:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238435 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 02:47:17 -0000 Author: adrian Date: Sat Jul 14 02:47:16 2012 New Revision: 238435 URL: http://svn.freebsd.org/changeset/base/238435 Log: Don't free the descriptor allocation/map if it doesn't exist. I missed this in my previous commit. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sat Jul 14 02:45:44 2012 (r238434) +++ head/sys/dev/ath/if_ath.c Sat Jul 14 02:47:16 2012 (r238435) @@ -2956,10 +2956,12 @@ ath_descdma_cleanup(struct ath_softc *sc struct ath_buf *bf; struct ieee80211_node *ni; - bus_dmamap_unload(dd->dd_dmat, dd->dd_dmamap); - bus_dmamem_free(dd->dd_dmat, dd->dd_desc, dd->dd_dmamap); - bus_dmamap_destroy(dd->dd_dmat, dd->dd_dmamap); - bus_dma_tag_destroy(dd->dd_dmat); + if (dd->dd_dmamap != 0) { + bus_dmamap_unload(dd->dd_dmat, dd->dd_dmamap); + bus_dmamem_free(dd->dd_dmat, dd->dd_desc, dd->dd_dmamap); + bus_dmamap_destroy(dd->dd_dmat, dd->dd_dmamap); + bus_dma_tag_destroy(dd->dd_dmat); + } TAILQ_FOREACH(bf, head, bf_list) { if (bf->bf_m) { From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 02:52:48 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D861D106566B; Sat, 14 Jul 2012 02:52:48 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C340E8FC08; Sat, 14 Jul 2012 02:52:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6E2qmjY004180; Sat, 14 Jul 2012 02:52:48 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6E2qmqj004177; Sat, 14 Jul 2012 02:52:48 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207140252.q6E2qmqj004177@svn.freebsd.org> From: Adrian Chadd Date: Sat, 14 Jul 2012 02:52:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238436 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 02:52:48 -0000 Author: adrian Date: Sat Jul 14 02:52:48 2012 New Revision: 238436 URL: http://svn.freebsd.org/changeset/base/238436 Log: Change the RX EDMA path to first complete the FIFO, then re-populate it with fresh descriptors, before handling the frames. Wrap it all in the RX locks. Since the FIFO is very shallow (16 for HP, 128 for LP) it needs to be drained and replenished very quickly. Ideally, I'll eventually move this RX FIFO drain/fill into the interrupt handler, only deferring the actual frame completion. Modified: head/sys/dev/ath/if_ath_rx_edma.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath_rx_edma.c ============================================================================== --- head/sys/dev/ath/if_ath_rx_edma.c Sat Jul 14 02:47:16 2012 (r238435) +++ head/sys/dev/ath/if_ath_rx_edma.c Sat Jul 14 02:52:48 2012 (r238436) @@ -156,6 +156,7 @@ ath_edma_stoprecv(struct ath_softc *sc, { struct ath_hal *ah = sc->sc_ah; + ATH_RX_LOCK(sc); ath_hal_stoppcurecv(ah); ath_hal_setrxfilter(ah, 0); ath_hal_stopdmarecv(ah); @@ -173,6 +174,7 @@ ath_edma_stoprecv(struct ath_softc *sc, m_freem(sc->sc_rxedma[HAL_RX_QUEUE_LP].m_rxpending); sc->sc_rxedma[HAL_RX_QUEUE_LP].m_rxpending = NULL; } + ATH_RX_UNLOCK(sc); } /* @@ -187,6 +189,8 @@ ath_edma_reinit_fifo(struct ath_softc *s struct ath_buf *bf; int i, j; + ATH_RX_LOCK_ASSERT(sc); + i = re->m_fifo_head; for (j = 0; j < re->m_fifo_depth; j++) { bf = re->m_fifo[i]; @@ -221,6 +225,8 @@ ath_edma_startrecv(struct ath_softc *sc) { struct ath_hal *ah = sc->sc_ah; + ATH_RX_LOCK(sc); + /* Enable RX FIFO */ ath_hal_rxena(ah); @@ -266,6 +272,9 @@ ath_edma_startrecv(struct ath_softc *sc) ath_mode_init(sc); ath_hal_startpcurecv(ah); + + ATH_RX_UNLOCK(sc); + return (0); } @@ -300,16 +309,21 @@ ath_edma_recv_proc_queue(struct ath_soft struct ath_desc *ds; struct ath_buf *bf; struct mbuf *m; - HAL_STATUS status; struct ath_hal *ah = sc->sc_ah; uint64_t tsf; int16_t nf; int ngood = 0; + ath_bufhead rxlist; + struct ath_buf *next; + + TAILQ_INIT(&rxlist); tsf = ath_hal_gettsf64(ah); nf = ath_hal_getchannoise(ah, sc->sc_curchan); sc->sc_stats.ast_rx_noise = nf; + ATH_RX_LOCK(sc); + do { bf = re->m_fifo[re->m_fifo_head]; /* This shouldn't occur! */ @@ -330,12 +344,13 @@ ath_edma_recv_proc_queue(struct ath_soft bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, BUS_DMASYNC_POSTREAD); rs = &bf->bf_status.ds_rxstat; - status = ath_hal_rxprocdesc(ah, ds, bf->bf_daddr, NULL, rs); + bf->bf_rxstatus = ath_hal_rxprocdesc(ah, ds, bf->bf_daddr, + NULL, rs); #ifdef ATH_DEBUG if (sc->sc_debug & ATH_DEBUG_RECV_DESC) - ath_printrxbuf(sc, bf, 0, status == HAL_OK); + ath_printrxbuf(sc, bf, 0, bf->bf_rxstatus == HAL_OK); #endif - if (status == HAL_EINPROGRESS) + if (bf->bf_rxstatus == HAL_EINPROGRESS) break; /* @@ -349,27 +364,47 @@ ath_edma_recv_proc_queue(struct ath_soft "%s: Q%d: completed!\n", __func__, qtype); /* - * Remove the FIFO entry! + * Remove the FIFO entry and place it on the completion + * queue. */ re->m_fifo[re->m_fifo_head] = NULL; + TAILQ_INSERT_TAIL(&rxlist, bf, bf_list); + /* Bump the descriptor FIFO stats */ + INCR(re->m_fifo_head, re->m_fifolen); + re->m_fifo_depth--; + /* XXX check it doesn't fall below 0 */ + } while (re->m_fifo_depth > 0); + + /* Append some more fresh frames to the FIFO */ + if (dosched) + ath_edma_rxfifo_alloc(sc, qtype, re->m_fifolen); + + ATH_RX_UNLOCK(sc); + + /* Handle the completed descriptors */ + TAILQ_FOREACH_SAFE(bf, &rxlist, bf_list, next) { /* * Skip the RX descriptor status - start at the data offset */ - m_adj(m, sc->sc_rx_statuslen); + m_adj(bf->bf_m, sc->sc_rx_statuslen); /* Handle the frame */ - if (ath_rx_pkt(sc, rs, status, tsf, nf, qtype, bf)) + /* + * Note: this may or may not free bf->bf_m and sync/unmap + * the frame. + */ + if (ath_rx_pkt(sc, rs, bf->bf_rxstatus, tsf, nf, qtype, bf)) ngood++; + } + /* Free in one set, inside the lock */ + ATH_RX_LOCK(sc); + TAILQ_FOREACH_SAFE(bf, &rxlist, bf_list, next) { /* Free the buffer/mbuf */ ath_edma_rxbuf_free(sc, bf); - - /* Bump the descriptor FIFO stats */ - INCR(re->m_fifo_head, re->m_fifolen); - re->m_fifo_depth--; - /* XXX check it doesn't fall below 0 */ - } while (re->m_fifo_depth > 0); + } + ATH_RX_UNLOCK(sc); /* Handle resched and kickpcu appropriately */ ATH_PCU_LOCK(sc); @@ -386,10 +421,6 @@ ath_edma_recv_proc_queue(struct ath_soft } ATH_PCU_UNLOCK(sc); - /* Append some more fresh frames to the FIFO */ - if (dosched) - ath_edma_rxfifo_alloc(sc, qtype, re->m_fifolen); - return (ngood); } @@ -435,6 +466,8 @@ ath_edma_rxbuf_init(struct ath_softc *sc int error; int len; + ATH_RX_LOCK_ASSERT(sc); + // device_printf(sc->sc_dev, "%s: called; bf=%p\n", __func__, bf); m = m_getm(NULL, sc->sc_edma_bufsize, M_DONTWAIT, MT_DATA); @@ -498,6 +531,8 @@ ath_edma_rxbuf_alloc(struct ath_softc *s struct ath_buf *bf; int error; + ATH_RX_LOCK_ASSERT(sc); + /* Allocate buffer */ bf = TAILQ_FIRST(&sc->sc_rxbuf); /* XXX shouldn't happen upon startup? */ @@ -526,6 +561,9 @@ static void ath_edma_rxbuf_free(struct ath_softc *sc, struct ath_buf *bf) { + ATH_RX_LOCK_ASSERT(sc); + + /* We're doing this multiple times? */ bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); if (bf->bf_m) { @@ -550,6 +588,8 @@ ath_edma_rxfifo_alloc(struct ath_softc * struct ath_buf *bf; int i; + ATH_RX_LOCK_ASSERT(sc); + /* * Allocate buffers until the FIFO is full or nbufs is reached. */ @@ -616,6 +656,8 @@ ath_edma_rxfifo_flush(struct ath_softc * struct ath_rx_edma *re = &sc->sc_rxedma[qtype]; int i; + ATH_RX_LOCK_ASSERT(sc); + for (i = 0; i < re->m_fifolen; i++) { if (re->m_fifo[i] != NULL) { #ifdef ATH_DEBUG @@ -647,6 +689,8 @@ ath_edma_setup_rxfifo(struct ath_softc * { struct ath_rx_edma *re = &sc->sc_rxedma[qtype]; + ATH_RX_LOCK_ASSERT(sc); + if (! ath_hal_getrxfifodepth(sc->sc_ah, qtype, &re->m_fifolen)) { device_printf(sc->sc_dev, "%s: qtype=%d, failed\n", __func__, @@ -704,8 +748,10 @@ ath_edma_dma_rxsetup(struct ath_softc *s if (error != 0) return error; + ATH_RX_LOCK(sc); (void) ath_edma_setup_rxfifo(sc, HAL_RX_QUEUE_HP); (void) ath_edma_setup_rxfifo(sc, HAL_RX_QUEUE_LP); + ATH_RX_UNLOCK(sc); return (0); } @@ -716,11 +762,13 @@ ath_edma_dma_rxteardown(struct ath_softc device_printf(sc->sc_dev, "%s: called\n", __func__); + ATH_RX_LOCK(sc); ath_edma_rxfifo_flush(sc, HAL_RX_QUEUE_HP); ath_edma_rxfifo_free(sc, HAL_RX_QUEUE_HP); ath_edma_rxfifo_flush(sc, HAL_RX_QUEUE_LP); ath_edma_rxfifo_free(sc, HAL_RX_QUEUE_LP); + ATH_RX_UNLOCK(sc); /* Free RX ath_buf */ /* Free RX DMA tag */ Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Sat Jul 14 02:47:16 2012 (r238435) +++ head/sys/dev/ath/if_athvar.h Sat Jul 14 02:52:48 2012 (r238436) @@ -189,6 +189,7 @@ struct ath_buf { TAILQ_ENTRY(ath_buf) bf_list; struct ath_buf * bf_next; /* next buffer in the aggregate */ int bf_nseg; + HAL_STATUS bf_rxstatus; uint16_t bf_flags; /* status flags (below) */ struct ath_desc *bf_desc; /* virtual addr of desc */ struct ath_desc_status bf_status; /* tx/rx status */ From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 02:59:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7AAE5106566B; Sat, 14 Jul 2012 02:59:12 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 66A6E8FC08; Sat, 14 Jul 2012 02:59:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6E2xCuL004526; Sat, 14 Jul 2012 02:59:12 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6E2xCX4004524; Sat, 14 Jul 2012 02:59:12 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201207140259.q6E2xCX4004524@svn.freebsd.org> From: Matt Jacob Date: Sat, 14 Jul 2012 02:59:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238437 - head/sys/cam/scsi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 02:59:12 -0000 Author: mjacob Date: Sat Jul 14 02:59:11 2012 New Revision: 238437 URL: http://svn.freebsd.org/changeset/base/238437 Log: The call to disk_resize causes a panic if DIAGNOSTIC is set. Coping with that while the finest minds of our generation figure out why. Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Sat Jul 14 02:52:48 2012 (r238436) +++ head/sys/cam/scsi/scsi_da.c Sat Jul 14 02:59:11 2012 (r238437) @@ -2645,7 +2645,10 @@ dasetgeom(struct cam_periph *periph, uin else softc->disk->d_flags &= ~DISKFLAG_CANDELETE; +/* Currently as of 6/13/2012, panics if DIAGNOSTIC is set */ +#ifndef DIAGNOSTIC disk_resize(softc->disk); +#endif } static void From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 03:16:59 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 316F6106566C; Sat, 14 Jul 2012 03:16:59 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 16B288FC14; Sat, 14 Jul 2012 03:16:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6E3GwBX005631; Sat, 14 Jul 2012 03:16:58 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6E3Gw7C005617; Sat, 14 Jul 2012 03:16:58 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201207140316.q6E3Gw7C005617@svn.freebsd.org> From: Devin Teske Date: Sat, 14 Jul 2012 03:16:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238438 - in head: share/mk tools/build/options usr.sbin usr.sbin/bsdconfig usr.sbin/bsdconfig/console usr.sbin/bsdconfig/console/include usr.sbin/bsdconfig/diskmgmt usr.sbin/bsdconfig/... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 03:16:59 -0000 Author: dteske Date: Sat Jul 14 03:16:57 2012 New Revision: 238438 URL: http://svn.freebsd.org/changeset/base/238438 Log: Import bsdconfig(8) as a replacement for the post-install abilities of deprecated sysinstall(8). NOTE: WITH_BSDCONFIG is currently required. Submitted by: Devin Teske (dteske), Ron McDowell Reviewed by: Ron McDowell Approved by: Ed Maste (emaste) Added: head/tools/build/options/WITH_BSDCONFIG (contents, props changed) head/usr.sbin/bsdconfig/ head/usr.sbin/bsdconfig/Makefile (contents, props changed) head/usr.sbin/bsdconfig/USAGE (contents, props changed) head/usr.sbin/bsdconfig/bsdconfig (contents, props changed) head/usr.sbin/bsdconfig/bsdconfig.8 (contents, props changed) head/usr.sbin/bsdconfig/console/ head/usr.sbin/bsdconfig/console/INDEX (contents, props changed) head/usr.sbin/bsdconfig/console/Makefile (contents, props changed) head/usr.sbin/bsdconfig/console/USAGE (contents, props changed) head/usr.sbin/bsdconfig/console/console (contents, props changed) head/usr.sbin/bsdconfig/console/font (contents, props changed) head/usr.sbin/bsdconfig/console/include/ head/usr.sbin/bsdconfig/console/include/Makefile (contents, props changed) head/usr.sbin/bsdconfig/console/include/messages.subr (contents, props changed) head/usr.sbin/bsdconfig/console/keymap (contents, props changed) head/usr.sbin/bsdconfig/console/repeat (contents, props changed) head/usr.sbin/bsdconfig/console/saver (contents, props changed) head/usr.sbin/bsdconfig/console/screenmap (contents, props changed) head/usr.sbin/bsdconfig/console/ttys (contents, props changed) head/usr.sbin/bsdconfig/diskmgmt/ head/usr.sbin/bsdconfig/diskmgmt/INDEX (contents, props changed) head/usr.sbin/bsdconfig/diskmgmt/Makefile (contents, props changed) head/usr.sbin/bsdconfig/diskmgmt/USAGE (contents, props changed) head/usr.sbin/bsdconfig/diskmgmt/diskmgmt (contents, props changed) head/usr.sbin/bsdconfig/diskmgmt/include/ head/usr.sbin/bsdconfig/diskmgmt/include/Makefile (contents, props changed) head/usr.sbin/bsdconfig/diskmgmt/include/messages.subr (contents, props changed) head/usr.sbin/bsdconfig/docsinstall/ head/usr.sbin/bsdconfig/docsinstall/INDEX (contents, props changed) head/usr.sbin/bsdconfig/docsinstall/Makefile (contents, props changed) head/usr.sbin/bsdconfig/docsinstall/USAGE (contents, props changed) head/usr.sbin/bsdconfig/docsinstall/docsinstall (contents, props changed) head/usr.sbin/bsdconfig/docsinstall/include/ head/usr.sbin/bsdconfig/docsinstall/include/Makefile (contents, props changed) head/usr.sbin/bsdconfig/docsinstall/include/messages.subr (contents, props changed) head/usr.sbin/bsdconfig/dot/ head/usr.sbin/bsdconfig/dot/INDEX (contents, props changed) head/usr.sbin/bsdconfig/dot/Makefile (contents, props changed) head/usr.sbin/bsdconfig/dot/USAGE (contents, props changed) head/usr.sbin/bsdconfig/dot/dot (contents, props changed) head/usr.sbin/bsdconfig/dot/include/ head/usr.sbin/bsdconfig/dot/include/Makefile (contents, props changed) head/usr.sbin/bsdconfig/dot/include/messages.subr (contents, props changed) head/usr.sbin/bsdconfig/examples/ head/usr.sbin/bsdconfig/examples/Makefile (contents, props changed) head/usr.sbin/bsdconfig/examples/bsdconfigrc (contents, props changed) head/usr.sbin/bsdconfig/fdisk/ head/usr.sbin/bsdconfig/include/ head/usr.sbin/bsdconfig/include/Makefile (contents, props changed) head/usr.sbin/bsdconfig/include/common.subr (contents, props changed) head/usr.sbin/bsdconfig/include/dialog.subr (contents, props changed) head/usr.sbin/bsdconfig/include/messages.subr (contents, props changed) head/usr.sbin/bsdconfig/include/mustberoot.subr (contents, props changed) head/usr.sbin/bsdconfig/include/strings.subr (contents, props changed) head/usr.sbin/bsdconfig/include/sysrc.subr (contents, props changed) head/usr.sbin/bsdconfig/mouse/ head/usr.sbin/bsdconfig/mouse/INDEX (contents, props changed) head/usr.sbin/bsdconfig/mouse/Makefile (contents, props changed) head/usr.sbin/bsdconfig/mouse/USAGE (contents, props changed) head/usr.sbin/bsdconfig/mouse/disable (contents, props changed) head/usr.sbin/bsdconfig/mouse/enable (contents, props changed) head/usr.sbin/bsdconfig/mouse/flags (contents, props changed) head/usr.sbin/bsdconfig/mouse/include/ head/usr.sbin/bsdconfig/mouse/include/Makefile (contents, props changed) head/usr.sbin/bsdconfig/mouse/include/messages.subr (contents, props changed) head/usr.sbin/bsdconfig/mouse/mouse (contents, props changed) head/usr.sbin/bsdconfig/mouse/port (contents, props changed) head/usr.sbin/bsdconfig/mouse/type (contents, props changed) head/usr.sbin/bsdconfig/networking/ head/usr.sbin/bsdconfig/networking/INDEX (contents, props changed) head/usr.sbin/bsdconfig/networking/Makefile (contents, props changed) head/usr.sbin/bsdconfig/networking/USAGE (contents, props changed) head/usr.sbin/bsdconfig/networking/defaultrouter (contents, props changed) head/usr.sbin/bsdconfig/networking/devices (contents, props changed) head/usr.sbin/bsdconfig/networking/hostname (contents, props changed) head/usr.sbin/bsdconfig/networking/include/ head/usr.sbin/bsdconfig/networking/include/Makefile (contents, props changed) head/usr.sbin/bsdconfig/networking/include/common.subr (contents, props changed) head/usr.sbin/bsdconfig/networking/include/device.subr (contents, props changed) head/usr.sbin/bsdconfig/networking/include/hostname.subr (contents, props changed) head/usr.sbin/bsdconfig/networking/include/ipaddr.subr (contents, props changed) head/usr.sbin/bsdconfig/networking/include/media.subr (contents, props changed) head/usr.sbin/bsdconfig/networking/include/messages.subr (contents, props changed) head/usr.sbin/bsdconfig/networking/include/netmask.subr (contents, props changed) head/usr.sbin/bsdconfig/networking/include/resolv.subr (contents, props changed) head/usr.sbin/bsdconfig/networking/include/routing.subr (contents, props changed) head/usr.sbin/bsdconfig/networking/nameservers (contents, props changed) head/usr.sbin/bsdconfig/networking/networking (contents, props changed) head/usr.sbin/bsdconfig/password/ head/usr.sbin/bsdconfig/password/INDEX (contents, props changed) head/usr.sbin/bsdconfig/password/Makefile (contents, props changed) head/usr.sbin/bsdconfig/password/USAGE (contents, props changed) head/usr.sbin/bsdconfig/password/include/ head/usr.sbin/bsdconfig/password/include/Makefile (contents, props changed) head/usr.sbin/bsdconfig/password/include/messages.subr (contents, props changed) head/usr.sbin/bsdconfig/password/include/password.subr (contents, props changed) head/usr.sbin/bsdconfig/password/password (contents, props changed) head/usr.sbin/bsdconfig/security/ head/usr.sbin/bsdconfig/security/INDEX (contents, props changed) head/usr.sbin/bsdconfig/security/Makefile (contents, props changed) head/usr.sbin/bsdconfig/security/USAGE (contents, props changed) head/usr.sbin/bsdconfig/security/include/ head/usr.sbin/bsdconfig/security/include/Makefile (contents, props changed) head/usr.sbin/bsdconfig/security/include/messages.subr (contents, props changed) head/usr.sbin/bsdconfig/security/kern_securelevel (contents, props changed) head/usr.sbin/bsdconfig/security/security (contents, props changed) head/usr.sbin/bsdconfig/startup/ head/usr.sbin/bsdconfig/startup/INDEX (contents, props changed) head/usr.sbin/bsdconfig/startup/Makefile (contents, props changed) head/usr.sbin/bsdconfig/startup/USAGE (contents, props changed) head/usr.sbin/bsdconfig/startup/include/ head/usr.sbin/bsdconfig/startup/include/Makefile (contents, props changed) head/usr.sbin/bsdconfig/startup/include/messages.subr (contents, props changed) head/usr.sbin/bsdconfig/startup/include/rcconf.subr (contents, props changed) head/usr.sbin/bsdconfig/startup/include/rcedit.subr (contents, props changed) head/usr.sbin/bsdconfig/startup/include/rcvar.subr (contents, props changed) head/usr.sbin/bsdconfig/startup/misc (contents, props changed) head/usr.sbin/bsdconfig/startup/rcadd (contents, props changed) head/usr.sbin/bsdconfig/startup/rcconf (contents, props changed) head/usr.sbin/bsdconfig/startup/rcdelete (contents, props changed) head/usr.sbin/bsdconfig/startup/rcedit (contents, props changed) head/usr.sbin/bsdconfig/startup/rcvar (contents, props changed) head/usr.sbin/bsdconfig/startup/startup (contents, props changed) head/usr.sbin/bsdconfig/timezone/ head/usr.sbin/bsdconfig/timezone/INDEX (contents, props changed) head/usr.sbin/bsdconfig/timezone/Makefile (contents, props changed) head/usr.sbin/bsdconfig/timezone/USAGE (contents, props changed) head/usr.sbin/bsdconfig/timezone/include/ head/usr.sbin/bsdconfig/timezone/include/Makefile (contents, props changed) head/usr.sbin/bsdconfig/timezone/include/continents.subr (contents, props changed) head/usr.sbin/bsdconfig/timezone/include/countries.subr (contents, props changed) head/usr.sbin/bsdconfig/timezone/include/iso3166.subr (contents, props changed) head/usr.sbin/bsdconfig/timezone/include/menus.subr (contents, props changed) head/usr.sbin/bsdconfig/timezone/include/messages.subr (contents, props changed) head/usr.sbin/bsdconfig/timezone/include/zones.subr (contents, props changed) head/usr.sbin/bsdconfig/timezone/timezone (contents, props changed) head/usr.sbin/bsdconfig/ttys/ head/usr.sbin/bsdconfig/ttys/INDEX (contents, props changed) head/usr.sbin/bsdconfig/ttys/Makefile (contents, props changed) head/usr.sbin/bsdconfig/ttys/USAGE (contents, props changed) head/usr.sbin/bsdconfig/ttys/include/ head/usr.sbin/bsdconfig/ttys/include/Makefile (contents, props changed) head/usr.sbin/bsdconfig/ttys/include/messages.subr (contents, props changed) head/usr.sbin/bsdconfig/ttys/ttys (contents, props changed) head/usr.sbin/bsdconfig/usermgmt/ head/usr.sbin/bsdconfig/usermgmt/INDEX (contents, props changed) head/usr.sbin/bsdconfig/usermgmt/Makefile (contents, props changed) head/usr.sbin/bsdconfig/usermgmt/USAGE (contents, props changed) head/usr.sbin/bsdconfig/usermgmt/groupadd (contents, props changed) head/usr.sbin/bsdconfig/usermgmt/groupdel (contents, props changed) head/usr.sbin/bsdconfig/usermgmt/groupedit (contents, props changed) head/usr.sbin/bsdconfig/usermgmt/groupinput (contents, props changed) head/usr.sbin/bsdconfig/usermgmt/include/ head/usr.sbin/bsdconfig/usermgmt/include/Makefile (contents, props changed) head/usr.sbin/bsdconfig/usermgmt/include/group_input.subr (contents, props changed) head/usr.sbin/bsdconfig/usermgmt/include/messages.subr (contents, props changed) head/usr.sbin/bsdconfig/usermgmt/include/user_input.subr (contents, props changed) head/usr.sbin/bsdconfig/usermgmt/useradd (contents, props changed) head/usr.sbin/bsdconfig/usermgmt/userdel (contents, props changed) head/usr.sbin/bsdconfig/usermgmt/useredit (contents, props changed) head/usr.sbin/bsdconfig/usermgmt/userinput (contents, props changed) head/usr.sbin/bsdconfig/usermgmt/usermgmt (contents, props changed) Modified: head/share/mk/bsd.own.mk head/usr.sbin/Makefile Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Sat Jul 14 02:59:11 2012 (r238437) +++ head/share/mk/bsd.own.mk Sat Jul 14 03:16:57 2012 (r238438) @@ -421,6 +421,7 @@ __DEFAULT_NO_OPTIONS = \ BIND_LIBS \ BIND_SIGCHASE \ BIND_XML \ + BSDCONFIG \ CLANG_EXTRAS \ CLANG_IS_CC \ CTF \ Added: head/tools/build/options/WITH_BSDCONFIG ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_BSDCONFIG Sat Jul 14 03:16:57 2012 (r238438) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Install bsdconfig(8), a BSD-licensed configuration/management utility. Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Sat Jul 14 02:59:11 2012 (r238437) +++ head/usr.sbin/Makefile Sat Jul 14 03:16:57 2012 (r238438) @@ -144,6 +144,10 @@ SUBDIR+= rndc-confgen SUBDIR+= bluetooth .endif +.if ${MK_BSDCONFIG} != "no" +SUBDIR+= bsdconfig +.endif + .if ${MK_BSNMP} != "no" SUBDIR+= bsnmpd .endif Added: head/usr.sbin/bsdconfig/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bsdconfig/Makefile Sat Jul 14 03:16:57 2012 (r238438) @@ -0,0 +1,32 @@ +# $FreeBSD$ + +NO_OBJ= + +SUBDIR= console \ + diskmgmt \ + docsinstall \ + dot \ + examples \ + include \ + mouse \ + networking \ + password \ + security \ + startup \ + timezone \ + ttys \ + usermgmt + +FILESDIR= ${LIBEXECDIR}/bsdconfig +FILES= USAGE + +SCRIPTS= bsdconfig + +MAN= bsdconfig.8 + +beforeinstall: + mkdir -p ${DESTDIR}${FILESDIR} + mkdir -p ${DESTDIR}${SCRIPTSDIR} + mkdir -p ${DESTDIR}${MANDIR}8 + +.include Added: head/usr.sbin/bsdconfig/USAGE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bsdconfig/USAGE Sat Jul 14 03:16:57 2012 (r238438) @@ -0,0 +1,40 @@ +# Copyright (c) 2012 Ron McDowell +# Copyright (c) 2012 Devin Teske +# 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 (INLUDING, 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$ + +Usage: + @PROGRAM_NAME@ [-h] + @PROGRAM_NAME@ command [-h] + @PROGRAM_NAME@ [OPTIONS] [command [OPTIONS]] + +OPTIONS: + -h Print usage statement and exit. + -S Secure X11 mode (implies `-X'). As root, always prompt-for + and validate sudo(8) username/password before starting. + -X Use Xdialog(1) in place of dialog(1). + +COMMANDS: +@COMMAND_LIST@ Added: head/usr.sbin/bsdconfig/bsdconfig ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bsdconfig/bsdconfig Sat Jul 14 03:16:57 2012 (r238438) @@ -0,0 +1,313 @@ +#!/bin/sh +#- +# Copyright (c) 2012 Ron McDowell +# Copyright (c) 2012 Devin Teske +# 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$ +# +############################################################ INCLUDES + +BSDCFG_LIBE="/usr/libexec/bsdconfig" +. $BSDCFG_LIBE/include/common.subr || exit 1 +f_include $BSDCFG_LIBE/include/dialog.subr +f_include $BSDCFG_LIBE/include/mustberoot.subr +f_include $BSDCFG_LIBE/include/strings.subr +f_include_lang $BSDCFG_LIBE/include/messages.subr + +############################################################ FUNCTIONS + +# usage +# +# display usage and exit +# +usage() +{ + local index="INDEX" cmd_list="" + + cd $BSDCFG_LIBE + + # Test for language-specific indices + f_quietly ls */"$index.${LANG:-$LC_ALL}" && + index="$index.${LANG:-$LC_ALL}" + + cmd_list=$( + awk '/^menu_selection="/ { + sub(/\|.*/, "") + sub(/^menu_selection="/, "") + print + }' */$index | sort + ) + + # + # Determine the longest command-length (in characters) + # + local longest_cmd + longest_cmd=$( echo "$cmd_list" | f_longest_line_length ) + f_dprintf "longest_cmd=[$longest_cmd]" + + # + # Determine the maximum width of terminal/console + # + local max_size max_width + max_size=$( stty size 2> /dev/null ) + : ${max_size:="24 80"} + max_width="${max_size#*[$IFS]}" + f_dprintf "max_width=[$max_width]" + + # + # Using the longest command-length as the width of a single column, + # determine if we can use more than one column to display commands. + # + local x=$longest_cmd ncols=1 + x=$(( $x + 8 )) # Accomodate leading tab character + x=$(( $x + 3 + $longest_cmd )) # Preload end of next column + while [ $x -lt $max_width ]; do + ncols=$(( $ncols + 1 )) + x=$(( $x + 3 + $longest_cmd )) + done + f_dprintf "ncols=[$ncols] x=[$x]" + + # + # Re-format the command-list into multiple columns + # + cmd_list=$( eval "$( echo "$cmd_list" | + awk -v ncols=$ncols -v size=$longest_cmd ' + BEGIN { + n = 0 + row_item[1] = "" + } + function print_row() + { + fmt = "printf \"\\t%-" size "s" + for (i = 1; i < cur_col; i++) + fmt = fmt " %-" size "s" + fmt = fmt "\\n\"" + printf "%s", fmt + for (i = 1; i <= cur_col; i++) + printf " \"%s\"", row_item[i] + print "" + } + { + n++ + cur_col = (( n - 1 ) % ncols ) + 1 + printf "f_dprintf \"row_item[%u]=[%s]\"\n", cur_col, $0 + row_item[cur_col] = $0 + if ( cur_col == ncols ) print_row() + } + END { + if ( cur_col < ncols ) print_row() + }' )" + ) + + f_usage $BSDCFG_LIBE/USAGE \ + "PROGRAM_NAME" "$pgm" \ + "COMMAND_LIST" "$cmd_list" +} + +# dialog_menu_main +# +# Display the dialog(1)-based application main menu. +# +dialog_menu_main() +{ + local title="$DIALOG_TITLE" + local btitle="$DIALOG_BACKTITLE" + local prompt="$msg_menu_text" + local menu_list size + + menu_list=" + 'X' '$msg_exit' '$msg_exit_bsdconfig' + " # END-QUOTE + + local sanitize_awk="{ gsub(/'/, \"'\\\\''\"); print }" + + local menuitem menu_title menu_help menu_selection index=1 + for menuitem in $( ls -d [0-9][0-9][0-9].* ); do + [ $index -lt ${#DIALOG_MENU_TAGS} ] || break + tag=$( f_substr "$DIALOG_MENU_TAGS" $index 1 ) + + menu_program= + menu_title= + menu_help= + f_include_lang $menuitem/INDEX + [ "$menu_program" ] || continue + + case "$menu_program" in + /*) : already fully qualified ;; + *) + menu_program="$menuitem/$menu_program" + esac + + menu_title=$( echo "$menu_title" | awk "$sanitize_awk" ) + menu_help=$( echo "$menu_help" | awk "$sanitize_awk" ) + setvar "menu_program$tag" "$menu_program" + menu_list="$menu_list '$tag' '$menu_title' '$menu_help'" + + index=$(( $index + 1 )) + done + + size=$( eval f_dialog_menu_with_help_size \ + \"\$title\" \ + \"\$btitle\" \ + \"\$prompt\" \ + \"\" \ + $menu_list ) + + eval $DIALOG \ + --clear \ + --title \"\$title\" \ + --backtitle \"\$btitle\" \ + --item-help \ + --ok-label \"\$msg_ok\" \ + --cancel-label \"\$msg_exit_bsdconfig\" \ + --menu \"\$prompt\" $size $menu_list \ + 2> "$DIALOG_TMPDIR/dialog.menu.$$" +} + +############################################################ MAIN + +# +# Process command-line arguments +# +while getopts hSX flag; do + case "$flag" in + h|\?) usage;; + esac +done +shift $(( $OPTIND -1 )) + +# +# Initialize +# +f_dialog_init +f_dialog_title "$msg_main_menu" + +[ "$SECURE" ] && f_mustberoot_init + +# Incorporate rc-file if it exists +[ -f "$HOME/.bsdconfigrc" ] && f_include "$HOME/.bsdconfigrc" + +# +# Log our operating environment for debugging purposes +# +export UNAME_S="$(uname -s)" # Operating System (i.e. FreeBSD) +export UNAME_P="$(uname -p)" # Processor Architecture (i.e. i386) +export UNAME_R="$(uname -r)" # Release Level (i.e. X.Y-RELEASE) +f_dprintf "UNAME_S=[$UNAME_S] UNAME_P=[$UNAME_P] UNAME_R=[$UNAME_R]" + +cd $BSDCFG_LIBE || f_die 1 "$msg_directory_not_found" "$BSDCFG_LIBE" + +# +# If a non-option argument was passed, process it as a menuitem selection... +# +if [ "$1" ]; then + # + # ...unless it's a long-option for usage. + # + case "$1" in + -help|--help|-\?) usage;; + esac + + # + # Find the INDEX (possibly i18n) claiming this keyword + # + lang="${LANG:-$LC_ALL}" + if [ "$lang" ]; then + sel=$( grep "^menu_selection=\"$1|" */INDEX.$lang \ + 2> /dev/null | tail -1 ) + + # Fall-back to non-i18n sources if nothing was found + [ "$sel" ] || + sel=$( grep "^menu_selection=\"$1|" */INDEX | tail -1 ) + else + sel=$( grep "^menu_selection=\"$1|" */INDEX | tail -1 ) + fi + + # + # If no matches, display usage (which shows valid keywords) + # + if [ ! "$sel" ]; then + f_err "%s: %s: $msg_not_found\n" "$pgm" "$1" + usage + fi + + # + # The command to execute is after the pipe-character (|) in the + # menu_selection property of the INDEX file for the menuitem. + # + cmd="${sel#*|}" + cmd="${cmd%\"}" + if [ ! "$cmd" ]; then + echo "$pgm: $1: $msg_not_found" + usage + fi + shift + + # + # If the command pathname is not fully qualified fix-up/force to be + # relative to the menuitem directory. + # + case "$cmd" in + /*) : already fully qualified ;; + *) + dir="${sel%%/*}" + cmd="$dir/$cmd" + esac + + exec $cmd ${USE_XDIALOG:+-X} "$@" || exit 1 +fi + +[ -f "$HOME/.bsdconfigrc" ] || f_dialog_msgbox "$msg_help_text" + +# +# Launch application main menu +# +while :; do + dialog_menu_main + retval=$? + mtag=$( f_dialog_menutag ) + f_dprintf "retval=$retval mtag=[$mtag]" + + [ $retval -eq 0 ] || f_die + + case "$mtag" in + X) # Exit + break + ;; + + *) # Dynamically loaded menuitem + cmd=$( eval echo \"\$menu_program$mtag\" ) + f_dprintf "cmd=[$cmd]" + $cmd ${USE_XDIALOG:+-X} + ;; + + esac +done + +exit $SUCCESS + +################################################################################ +# END +################################################################################ Added: head/usr.sbin/bsdconfig/bsdconfig.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bsdconfig/bsdconfig.8 Sat Jul 14 03:16:57 2012 (r238438) @@ -0,0 +1,240 @@ +.\" Copyright (c) 2012 Ron McDowell +.\" Copyright (c) 2012 Devin Teske +.\" 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 ``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 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. +.\" +.\" docsinstall +.\" password +.\" diskmgmt +.\" usermgmt +.\" useradd +.\" useredit +.\" userdel +.\" groupmgmt +.\" groupadd +.\" groupedit +.\" groupdel +.\" console +.\" syscons_font +.\" syscons_keymap +.\" syscons_repeat +.\" syscons_saver +.\" syscons_screenmap +.\" syscons_ttys +.\" timezone +.\" mouse +.\" mouse_enable +.\" mouse_type +.\" mouse_port +.\" mouse_flags +.\" mouse_disable +.\" networking +.\" defaultrouter +.\" hostname +.\" nameservers +.\" netdev +.\" security +.\" ttys +.\" [dot] +.\" +.\" $FreeBSD$ +.\" +.Dd Mar 20, 2012 +.Dt BSDCONFIG 8 +.Os +.Sh NAME +.Nm bsdconfig +.Nd system configuration utility +.Sh SYNOPSIS +.Nm +.Op Fl h +.Nm +.Ar command +.Op Fl h +.Nm +.Op OPTIONS +.Op command Op OPTIONS +.Sh DESCRIPTION +.Nm +is used to set up many system configuration settings, both for new systems, as +well as changing configuration settings of existing systems. +.Pp +.Nm +takes a command as an argument. If invoked with no arguments, it will bring up +a master menu listing the available commands. +.Pp +The following options are available: +.Bl -tag -width indent+ +.It Fl h +Print usage statement and exit. +.It Fl S +Secure X11 mode +.Pq implies Fl X . +As root, always prompt-for and validate +.Xr sudo 8 +username/password before starting. +.It Fl X +Use +.Xr Xdialog 1 +in place of +.Xr dialog 1 . + +.Sh COMMANDS +The following commands +.Pq sorted alphabetically +are currently included in the base +.Nm +program, with more to be added soon. Other commands can be added, as detailed +below in the +.Cm ADDING COMMANDS +section, and once added, will appear in the master menu as well as in the +.Cm -h +listing. +.Bl -tag -width ".Cm syscons_screenmap" +.It Cm console +Utilities to customize the behavior of the system console. +.It Cm defaultrouter +Shortcut to the Default Router/Gateway menu under networking. +.It Cm diskmgmt +Manage disk partitions and/or labels. Executes +.Xr sade 8 . +.It Cm docsinstall +Executes the +.Cm bsdinstall docsinstall +sub-utility to allow installation/re-installation of the FreeBSD Documentation +set(s). +.It Cm dot +Generate a graphviz +.Xr dot 1 +language file +.Pq printed on stdout +visualizing the +.Xr bsdconfig 8 +menu, include, and shortcut structure and relationships. See +.Dq bsdconfig dot -h +for more details. +.It Cm groupadd +Shortcut to the Add Groups menu under groupmgmt. +.It Cm groupdel +Shortcut to the Delete Groups menu under groupmgmt. +.It Cm groupedit +Shortcut to the Edit/View Groups menu under groupmgmt. +.It Cm groupmgmt +Utilities to Add/Change/View/Delete Group Accounts. +.It Cm hostname +Shortcut to the Hostname/Domain menu under networking. +.It Cm mouse +Utilities for configuring, exploring, and enabling console mouse support. +.It Cm mouse_disable +Shortcut to the Disable menu under mouse. +.It Cm mouse_enable +Shortcut to the Enable menu under mouse. +.It Cm mouse_flags +Shortcut to the Flags menu under mouse. +.It Cm mouse_port +Shortcut to the Port menu under mouse. +.It Cm mouse_type +Shortcut to the Type menu under mouse. +.It Cm nameservers +Shortcut to the DNS Nameservers menu under networking. +.It Cm netdev +Shortcut to the Network Interfaces menu under networking. +.It Cm networking +Utilities to set/change Hostname/Domain, Network Interfaces, Default +Router/Gateway, and DNS Nameservers. +.It Cm password +Set the system administrator +.Pq root +password. +.It Cm security +Configure various system security settings. +.It Cm syscons_font +Shortcut to the Font menu under console. +.It Cm syscons_keymap +Shortcut to the Keymap menu under console. +.It Cm syscons_repeat +Shortcut to the Repeat menu under console. +.It Cm syscons_saver +Shortcut to the Saver menu under console. +.It Cm syscons_screenmap +Shortcut to the Screenmap menu under console. +.It Cm syscons_ttys +Shortcut to the Ttys menu under console. +.It Cm timezone +Set the regional timezone of the local machine. +.It Cm useradd +Shortcut to the Add Users menu under usermgmt. +.It Cm userdel +Shortcut to the Delete Users menu under usermgmt. +.It Cm useredit +Shortcut to the Edit/View Users menu under usermgmt. +.It Cm usermgmt +Utilities to Add/Edit/View/Delete User Accounts. + +.Sh INTERNATIONALIZATION +i18n features are built into +.Nm +and language-specific translation files will be added as they become available. +In the absence of language-specific translation files, the default +.Pq en_US.ISO8859-1 +files will be used. + +.Sh ADDING COMMANDS +To be documented later. Document menu_selection="command|*" syntax of INDEX +files. + +.Sh ENVIRONMENT VARIABLES +The following environment variables affect the execution of +.Nm : +.Bl -tag -width ".Ev LC_ALL" +.It Ev LANG +If LANG is set, messages and index information will be read from files named +messages.$LANG and INDEX.$LANG and fall back to files named messages and INDEX if +messages.$LANG and INDEX.$LANG do not exist. LANG takes precedence over LC_ALL. +.It Ev LC_ALL +If LC_ALL is set, messages and index information will be read from files named +messages.$LC_ALL and INDEX.$LC_ALL and fall back to files named messages and INDEX if +messages.$LC_ALL and INDEX.$LC_ALL do not exist. + +.Sh FILES +/usr/share/examples/bsdconfig/bsdconfigrc can be copied to $HOME/.bsdconfigrc and +customized as needed. + +.Sh EXIT STATUS +.Ex -std + +.Sh SEE ALSO +.Xr host-setup 8 + +.Sh HISTORY +.Nm +first appeared in +.Fx 10.0 . + +.Sh AUTHORS +.\" An -nosplit +.An Ron McDowell Aq rcm@FuzzWad.ORG +.An Devin Teske Aq devinteske@hotmail.com + +.Sh BUGS +Undoubtedly. Added: head/usr.sbin/bsdconfig/console/INDEX ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bsdconfig/console/INDEX Sat Jul 14 03:16:57 2012 (r238438) @@ -0,0 +1,59 @@ +# Copyright (c) 2012 Ron McDowell +# Copyright (c) 2012 Devin Teske +# 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$ + +# +# Title that will be shown on the bsdconfig menu +menu_title="Console" +# +# a short descriptive line shown at the bottom of the bsdconfig menu. +# keep it short because any line longer than the terminal width will +# be truncated. +menu_help="Customize system console behavior" +# +# two-part variable that defines an action to take when 'keyword' +# is passed on a bsdconfig command line. variable takes the form +# "keyword|command" and multiple occurrences of the variable +# (with different 'keyword's, or different 'keyword's AND 'command's) +# are allowed. If 'command' begins with a '/' then the full +# path to the program is needed. If 'command' begins with anything +# else it is a path relative to the directory this INDEX file is in. +# 'keyword' can be i18n'ed but 'command' is the name of a script. +menu_selection="console|console" +menu_selection="syscons_font|font" +menu_selection="syscons_keymap|keymap" +menu_selection="syscons_repeat|repeat" +menu_selection="syscons_saver|saver" +menu_selection="syscons_screenmap|screenmap" +menu_selection="syscons_ttys|ttys" +# +# Items below this line do NOT need i18n translation---------------------- +# +# Name of the program to be run when this menu choice is selected. +# if it begins with a '/' then the full path to the program is needed. +# if it begins with anything else it is a path relative to the directory +# this INDEX file is in. +menu_program="console" Added: head/usr.sbin/bsdconfig/console/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bsdconfig/console/Makefile Sat Jul 14 03:16:57 2012 (r238438) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +NO_OBJ= + +SUBDIR= include + +FILESDIR= ${LIBEXECDIR}/bsdconfig/080.console +FILES= INDEX USAGE + +SCRIPTSDIR= ${FILESDIR} +SCRIPTS= console font keymap repeat saver screenmap ttys + +beforeinstall: + mkdir -p ${DESTDIR}${FILESDIR} + +.include Added: head/usr.sbin/bsdconfig/console/USAGE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bsdconfig/console/USAGE Sat Jul 14 03:16:57 2012 (r238438) @@ -0,0 +1,33 @@ +# Copyright (c) 2012 Devin Teske +# 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 (INLUDING, 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$ + +Usage: bsdconfig @PROGRAM_NAME@ [OPTIONS] + +OPTIONS: + -h Print usage statement and exit. + -S Secure X11 mode (implies `-X'). As root, always prompt-for + and validate sudo(8) username/password before starting. + -X Use Xdialog(1) in place of dialog(1). Added: head/usr.sbin/bsdconfig/console/console ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bsdconfig/console/console Sat Jul 14 03:16:57 2012 (r238438) @@ -0,0 +1,137 @@ +#!/bin/sh +#- +# Copyright (c) 2012 Devin Teske +# 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 (INLUDING, 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$ +# +############################################################ INCLUDES + +BSDCFG_LIBE="/usr/libexec/bsdconfig" +. $BSDCFG_LIBE/include/common.subr || exit 1 +f_include $BSDCFG_LIBE/include/dialog.subr +f_include $BSDCFG_LIBE/include/mustberoot.subr + +APP_DIR="080.console" +f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr + +ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" + +############################################################ FUNCTIONS + +# dialog_menu_main +# +# Display the dialog(1)-based application main menu. +# +dialog_menu_main() +{ + local menu_list size + local hline="$hline_configure_system_console_settings" + local prompt="$msg_console_menu_text" + + menu_list=" + 'X $msg_exit' '$msg_exit_this_menu' + '2 $msg_font' '$msg_choose_alternate_screen_font' + '3 $msg_keymap' '$msg_choose_alternate_keyboard_map' + '4 $msg_repeat' '$msg_set_repeat_rate' + '5 $msg_saver' '$msg_configure_screen_saver' + '6 $msg_screenmap' '$msg_choose_alternate_screenmap' + '7 $msg_ttys' '$msg_choose_console_terminal_type' + " # END-QUOTE + + size=$( eval f_dialog_menu_size \ + \"\$DIALOG_TITLE\" \ + \"\$DIALOG_BACKTITLE\" \ + \"\$prompt\" \ + \"\$hline\" \ + $menu_list ) + + eval $DIALOG \ + --clear --title \"\$DIALOG_TITLE\" \ + --backtitle \"\$DIALOG_BACKTITLE\" \ + --hline \"\$hline\" \ + --ok-label \"\$msg_ok\" \ + --cancel-label \"\$msg_cancel\" \ + --menu \"\$prompt\" $size \ + $menu_list \ + 2> "$DIALOG_TMPDIR/dialog.menu.$$" +} + +############################################################ MAIN + +# Incorporate rc-file if it exists +[ -f "$HOME/.bsdconfigrc" ] && f_include "$HOME/.bsdconfigrc" + +# +# Process command-line arguments +# +while getopts hSX flag; do + case "$flag" in + h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";; + esac +done +shift $(( $OPTIND - 1 )) + +# +# Initialize +# +f_dialog_init +f_dialog_title "$msg_system_console_configuration" +f_dialog_backtitle "${ipgm:+bsdconfig }$pgm" +f_mustberoot_init + +# +# Launch application main menu +# +while :; do + dialog_menu_main + retval=$? + mtag=$( f_dialog_menutag ) + + [ $retval -eq 0 ] || f_die + + case "$mtag" in + "X $msg_exit") break ;; + "2 $msg_font") # Choose an alternate screen font + $BSDCFG_LIBE/$APP_DIR/font ${USE_XDIALOG:+-X} ;; + "3 $msg_keymap") # Choose an alternate keyboard map + $BSDCFG_LIBE/$APP_DIR/keymap ${USE_XDIALOG:+-X} ;; + "4 $msg_repeat") # Set the rate at which keys repeat + $BSDCFG_LIBE/$APP_DIR/repeat ${USE_XDIALOG:+-X} ;; + "5 $msg_saver") # Configure the screen saver + $BSDCFG_LIBE/$APP_DIR/saver ${USE_XDIALOG:+-X} ;; + "6 $msg_screenmap") # Choose an alternate screenmap + $BSDCFG_LIBE/$APP_DIR/screenmap ${USE_XDIALOG:+-X} ;; + "7 $msg_ttys") # Choose console terminal type + $BSDCFG_LIBE/$APP_DIR/ttys ${USE_XDIALOG:+-X} ;; + esac + +done + +exit $SUCCESS + +################################################################################ +# END +################################################################################ Added: head/usr.sbin/bsdconfig/console/font ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bsdconfig/console/font Sat Jul 14 03:16:57 2012 (r238438) @@ -0,0 +1,205 @@ +#!/bin/sh +#- +# Copyright (c) 2012 Devin Teske +# 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 (INLUDING, 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$ +# +############################################################ INCLUDES + +BSDCFG_LIBE="/usr/libexec/bsdconfig" +. $BSDCFG_LIBE/include/common.subr || exit 1 +f_include $BSDCFG_LIBE/include/dialog.subr +f_include $BSDCFG_LIBE/include/mustberoot.subr +f_include $BSDCFG_LIBE/include/sysrc.subr + +APP_DIR="080.console" +f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr + +ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" + +############################################################ FUNCTIONS + +# dialog_menu_main +# +# Display the dialog(1)-based application main menu. +# +dialog_menu_main() +{ + local menu_list size + local hline="$hline_choose_a_font" + local prompt="$msg_font_menu_text" + + menu_list=" + '1 $msg_none' '$msg_use_hardware_default_font' + '2 $msg_ibm_437' '$msg_ibm_437_desc' + '3 $msg_ibm_850' '$msg_ibm_850_desc' + '4 $msg_ibm_865' '$msg_ibm_865_desc' + '5 $msg_ibm_866' '$msg_ibm_866_desc' + '6 $msg_ibm_866u' '$msg_ibm_866u_desc' + '7 $msg_ibm_1251' '$msg_ibm_1251_desc' + '8 $msg_iso_8859_1' '$msg_iso_8859_1_desc' + '9 $msg_iso_8859_2' '$msg_iso_8859_2_desc' + 'a $msg_iso_8859_4' '$msg_iso_8859_4_desc' + 'b $msg_iso_8859_7' '$msg_iso_8859_7_desc' + 'c $msg_iso_8859_8' '$msg_iso_8859_8_desc' + 'd $msg_iso_8859_15' '$msg_iso_8859_15_desc' + 'e $msg_swiss' '$msg_swiss_desc' + " # END-QUOTE + + size=$( eval f_dialog_menu_size \ + \"\$DIALOG_TITLE\" \ + \"\$DIALOG_BACKTITLE\" \ + \"\$prompt\" \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 05:46:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DB0C1065673; Sat, 14 Jul 2012 05:46:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37BE98FC0A; Sat, 14 Jul 2012 05:46:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6E5krrx011678; Sat, 14 Jul 2012 05:46:53 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6E5kqHC011671; Sat, 14 Jul 2012 05:46:52 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207140546.q6E5kqHC011671@svn.freebsd.org> From: Warner Losh Date: Sat, 14 Jul 2012 05:46:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238439 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 05:46:53 -0000 Author: imp Date: Sat Jul 14 05:46:52 2012 New Revision: 238439 URL: http://svn.freebsd.org/changeset/base/238439 Log: Create common routines for configuring the serial ports and use them on all the at91rm9200 boards. Modified: head/sys/arm/at91/at91rm9200_devices.c head/sys/arm/at91/at91rm9200var.h head/sys/arm/at91/board_bwct.c head/sys/arm/at91/board_hl200.c head/sys/arm/at91/board_kb920x.c head/sys/arm/at91/board_tsc4370.c Modified: head/sys/arm/at91/at91rm9200_devices.c ============================================================================== --- head/sys/arm/at91/at91rm9200_devices.c Sat Jul 14 03:16:57 2012 (r238438) +++ head/sys/arm/at91/at91rm9200_devices.c Sat Jul 14 05:46:52 2012 (r238439) @@ -37,7 +37,11 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include +#include +#include /* * The AT91RM9200 uses the same silicon for both the BGA and PQFP @@ -60,3 +64,61 @@ at91rm9200_set_subtype(enum at91_soc_sub break; } } + +void +at91rm9200_config_uart(unsigned devid, unsigned unit, unsigned pinmask) +{ + + /* + * Since the USART supports RS-485 multidrop mode, it allows the + * TX pins to float. However, for RS-232 operations, we don't want + * these pins to float. Instead, they should be pulled up to avoid + * mismatches. Linux does something similar when it configures the + * TX lines. This implies that we also allow the RX lines to float + * rather than be in the state they are left in by the boot loader. + * Since they are input pins, I think that this is the right thing + * to do. + */ + + switch (devid) { + case AT91_ID_DBGU: + at91_pio_use_periph_a(AT91RM92_PIOA_BASE, AT91C_PIO_PA30, 0); /* DRXD */ + at91_pio_use_periph_a(AT91RM92_PIOA_BASE, AT91C_PIO_PA31, 1); /* DTXD */ + break; + + case AT91RM9200_ID_USART0: + at91_pio_use_periph_a(AT91RM92_PIOA_BASE, AT91C_PIO_PA17, 1); /* TXD0 */ + at91_pio_use_periph_a(AT91RM92_PIOA_BASE, AT91C_PIO_PA19, 0); /* RXD0 */ + /* CTS PA20 */ + /* RTS -- errata #39 PA21 */ + break; + + case AT91RM9200_ID_USART1: + at91_pio_use_periph_a(AT91RM92_PIOB_BASE, AT91C_PIO_PB20, 1); /* TXD1 */ + at91_pio_use_periph_a(AT91RM92_PIOB_BASE, AT91C_PIO_PB21, 0); /* RXD1 */ + /* RI - PB18 */ + /* DTR - PB19 */ + /* DCD - PB23 */ + /* CTS - PB24 */ + /* DSR - PB25 */ + /* RTS - PB26 */ + break; + + case AT91RM9200_ID_USART2: + at91_pio_use_periph_a(AT91RM92_PIOA_BASE, AT91C_PIO_PA22, 0); /* RXD2 */ + at91_pio_use_periph_a(AT91RM92_PIOA_BASE, AT91C_PIO_PA23, 1); /* TXD2 */ + /* CTS - PA30 B periph */ + /* RTS - PA31 B periph */ + break; + + case AT91RM9200_ID_USART3: + at91_pio_use_periph_b(AT91RM92_PIOA_BASE, AT91C_PIO_PA5, 1); /* TXD3 */ + at91_pio_use_periph_b(AT91RM92_PIOA_BASE, AT91C_PIO_PA6, 0); /* RXD3 */ + /* CTS - PB0 B periph */ + /* RTS - PB1 B periph */ + break; + + default: + break; + } +} Modified: head/sys/arm/at91/at91rm9200var.h ============================================================================== --- head/sys/arm/at91/at91rm9200var.h Sat Jul 14 03:16:57 2012 (r238438) +++ head/sys/arm/at91/at91rm9200var.h Sat Jul 14 05:46:52 2012 (r238439) @@ -30,4 +30,24 @@ void at91rm9200_set_subtype(enum at91_soc_subtype st); +#define AT91RM9200_ID_USART0 1 +#define AT91RM9200_ID_USART1 2 +#define AT91RM9200_ID_USART2 3 +#define AT91RM9200_ID_USART3 4 + +/* + * Serial port convenience routines + */ +/* uart pins that are wired... */ +#define AT91_UART_CTS 0x01 +#define AT91_UART_RTS 0x02 +#define AT91_UART_RI 0x04 +#define AT91_UART_DTR 0x08 +#define AT91_UART_DCD 0x10 +#define AT91_UART_DSR 0x20 + +#define AT91_ID_DBGU 0 + +void at91rm9200_config_uart(unsigned devid, unsigned unit, unsigned pinmask); + #endif /* ARM_AT91_AT91RM9200VAR_H */ Modified: head/sys/arm/at91/board_bwct.c ============================================================================== --- head/sys/arm/at91/board_bwct.c Sat Jul 14 03:16:57 2012 (r238438) +++ head/sys/arm/at91/board_bwct.c Sat Jul 14 05:46:52 2012 (r238439) @@ -32,10 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include -#include BOARD_INIT long board_init(void) @@ -44,29 +41,9 @@ board_init(void) at91rm9200_set_subtype(AT91_ST_RM9200_BGA); /* - * Since the USART supports RS-485 multidrop mode, it allows the - * TX pins to float. However, for RS-232 operations, we don't want - * these pins to float. Instead, they should be pulled up to avoid - * mismatches. Linux does something similar when it configures the - * TX lines. This implies that we also allow the RX lines to float - * rather than be in the state they are left in by the boot loader. - * Since they are input pins, I think that this is the right thing - * to do. + * I don't know anything at all about this board. */ - - /* PIOA's A periph: Turn USART 0 and 2's TX/RX pins */ - at91_pio_use_periph_a(AT91RM92_PIOA_BASE, - AT91C_PA18_RXD0 | AT91C_PA22_RXD2, 0); - at91_pio_use_periph_a(AT91RM92_PIOA_BASE, - AT91C_PA17_TXD0 | AT91C_PA23_TXD2, 1); - /* PIOA's B periph: Turn USART 3's TX/RX pins */ - at91_pio_use_periph_b(AT91RM92_PIOA_BASE, AT91C_PA6_RXD3, 0); - at91_pio_use_periph_b(AT91RM92_PIOA_BASE, AT91C_PA5_TXD3, 1); - /* PIOB's A periph: Turn USART 1's TX/RX pins */ - at91_pio_use_periph_a(AT91RM92_PIOB_BASE, AT91C_PB21_RXD1, 0); - at91_pio_use_periph_a(AT91RM92_PIOB_BASE, AT91C_PB20_TXD1, 1); - - /* Pin assignment */ + at91rm9200_config_uart(AT91_ID_DBGU, 0, 0); /* DBGU just Tx and Rx */ return (at91_ramsize()); } Modified: head/sys/arm/at91/board_hl200.c ============================================================================== --- head/sys/arm/at91/board_hl200.c Sat Jul 14 03:16:57 2012 (r238438) +++ head/sys/arm/at91/board_hl200.c Sat Jul 14 05:46:52 2012 (r238439) @@ -44,26 +44,12 @@ board_init(void) at91rm9200_set_subtype(AT91_ST_RM9200_BGA); /* - * Since the USART supports RS-485 multidrop mode, it allows the - * TX pins to float. However, for RS-232 operations, we don't want - * these pins to float. Instead, they should be pulled up to avoid - * mismatches. Linux does something similar when it configures the - * TX lines. This implies that we also allow the RX lines to float - * rather than be in the state they are left in by the boot loader. - * Since they are input pins, I think that this is the right thing - * to do. + * Unsure what all is in the HOTe HL200, but I do know there's + * one serial port that isn't DBGU. There's many other peripherals + * that need to be configured here. */ - /* PIOA's A periph: Turn USART 0 and 2's TX/RX pins */ - at91_pio_use_periph_a(AT91RM92_PIOA_BASE, - AT91C_PA18_RXD0 | AT91C_PA22_RXD2, 0); - at91_pio_use_periph_a(AT91RM92_PIOA_BASE, - AT91C_PA17_TXD0 | AT91C_PA23_TXD2, 1); - /* PIOA's B periph: Turn USART 3's TX/RX pins */ - at91_pio_use_periph_b(AT91RM92_PIOA_BASE, AT91C_PA6_RXD3, 0); - at91_pio_use_periph_b(AT91RM92_PIOA_BASE, AT91C_PA5_TXD3, 1); - /* PIOB's A periph: Turn USART 1's TX/RX pins */ - at91_pio_use_periph_a(AT91RM92_PIOB_BASE, AT91C_PB21_RXD1, 0); - at91_pio_use_periph_a(AT91RM92_PIOB_BASE, AT91C_PB20_TXD1, 1); + at91rm9200_config_uart(AT91_ID_DBGU, 0, 0); /* DBGU just Tx and Rx */ + at91rm9200_config_uart(AT91RM9200_ID_USART0, 1, 0); /* Tx and Rx */ return (at91_ramsize()); } Modified: head/sys/arm/at91/board_kb920x.c ============================================================================== --- head/sys/arm/at91/board_kb920x.c Sat Jul 14 03:16:57 2012 (r238438) +++ head/sys/arm/at91/board_kb920x.c Sat Jul 14 05:46:52 2012 (r238439) @@ -44,26 +44,15 @@ board_init(void) at91rm9200_set_subtype(AT91_ST_RM9200_PQFP); /* - * Since the USART supports RS-485 multidrop mode, it allows the - * TX pins to float. However, for RS-232 operations, we don't want - * these pins to float. Instead, they should be pulled up to avoid - * mismatches. Linux does something similar when it configures the - * TX lines. This implies that we also allow the RX lines to float - * rather than be in the state they are left in by the boot loader. - * Since they are input pins, I think that this is the right thing - * to do. + * Setup the serial ports. + * DBGU is the main one, although jumpers can make USART0 default. + * USART1 is IrDA, and USART3 is optional RS485. */ - /* PIOA's A periph: Turn USART 0 and 2's TX/RX pins */ - at91_pio_use_periph_a(AT91RM92_PIOA_BASE, - AT91C_PA18_RXD0 | AT91C_PA22_RXD2, 0); - at91_pio_use_periph_a(AT91RM92_PIOA_BASE, - AT91C_PA17_TXD0 | AT91C_PA23_TXD2, 1); - /* PIOA's B periph: Turn USART 3's TX/RX pins */ - at91_pio_use_periph_b(AT91RM92_PIOA_BASE, AT91C_PA6_RXD3, 0); - at91_pio_use_periph_b(AT91RM92_PIOA_BASE, AT91C_PA5_TXD3, 1); - /* PIOB's A periph: Turn USART 1's TX/RX pins */ - at91_pio_use_periph_a(AT91RM92_PIOB_BASE, AT91C_PB21_RXD1, 0); - at91_pio_use_periph_a(AT91RM92_PIOB_BASE, AT91C_PB20_TXD1, 1); + at91rm9200_config_uart(AT91_ID_DBGU, 0, 0); /* DBGU just Tx and Rx */ + at91rm9200_config_uart(AT91RM9200_ID_USART0, 1, 0); /* Tx and Rx */ + at91rm9200_config_uart(AT91RM9200_ID_USART1, 2, 0); /* Tx and Rx - IRDA */ + at91rm9200_config_uart(AT91RM9200_ID_USART3, 3, /* Tx, Rx, CTS, RTS - RS485 */ + AT91_UART_CTS | AT91_UART_RTS); /* MMC/SD Interface */ at91_pio_use_periph_a(AT91RM92_PIOA_BASE,AT91C_PA27_MCCK, 0); Modified: head/sys/arm/at91/board_tsc4370.c ============================================================================== --- head/sys/arm/at91/board_tsc4370.c Sat Jul 14 03:16:57 2012 (r238438) +++ head/sys/arm/at91/board_tsc4370.c Sat Jul 14 05:46:52 2012 (r238439) @@ -43,31 +43,11 @@ board_init(void) at91rm9200_set_subtype(AT91_ST_RM9200_PQFP); - /* - * Since the USART supports RS-485 multidrop mode, it allows the - * TX pins to float. However, for RS-232 operations, we don't want - * these pins to float. Instead, they should be pulled up to avoid - * mismatches. Linux does something similar when it configures the - * TX lines. This implies that we also allow the RX lines to float - * rather than be in the state they are left in by the boot loader. - * Since they are input pins, I think that this is the right thing - * to do. - */ - - /* PIOA's A periph: Turn USART 0 and 2's TX/RX pins */ - at91_pio_use_periph_a(AT91RM92_PIOA_BASE, - AT91C_PA18_RXD0 | AT91C_PA22_RXD2, 0); - at91_pio_use_periph_a(AT91RM92_PIOA_BASE, - AT91C_PA17_TXD0 | AT91C_PA23_TXD2, 1); - /* PIOA's B periph: Turn USART 3's TX/RX pins */ - at91_pio_use_periph_b(AT91RM92_PIOA_BASE, AT91C_PA6_RXD3, 0); - at91_pio_use_periph_b(AT91RM92_PIOA_BASE, AT91C_PA5_TXD3, 1); - /* We're using TC0's A1 and A2 input */ - at91_pio_use_periph_b(AT91RM92_PIOA_BASE, - AT91C_PA19_TIOA1 | AT91C_PA21_TIOA2, 0); - /* PIOB's A periph: Turn USART 1's TX/RX pins */ - at91_pio_use_periph_a(AT91RM92_PIOB_BASE, AT91C_PB21_RXD1, 0); - at91_pio_use_periph_a(AT91RM92_PIOB_BASE, AT91C_PB20_TXD1, 1); + at91rm9200_config_uart(AT91_ID_DBGU, 0, 0); /* DBGU just Tx and Rx */ + at91rm9200_config_uart(AT91RM9200_ID_USART0, 1, 0); /* Tx and Rx */ + at91rm9200_config_uart(AT91RM9200_ID_USART1, 2, 0); /* Tx and Rx */ + at91rm9200_config_uart(AT91RM9200_ID_USART2, 3, 0); /* Tx and Rx */ + at91rm9200_config_uart(AT91RM9200_ID_USART3, 4, 0); /* Tx and Rx */ /* Pin assignment */ /* Assert PA24 low -- talk to rubidium */ From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 05:51:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ECFBB106566B; Sat, 14 Jul 2012 05:51:54 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D81F78FC14; Sat, 14 Jul 2012 05:51:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6E5psGV011914; Sat, 14 Jul 2012 05:51:54 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6E5ps1i011912; Sat, 14 Jul 2012 05:51:54 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207140551.q6E5ps1i011912@svn.freebsd.org> From: Adrian Chadd Date: Sat, 14 Jul 2012 05:51:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238440 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 05:51:55 -0000 Author: adrian Date: Sat Jul 14 05:51:54 2012 New Revision: 238440 URL: http://svn.freebsd.org/changeset/base/238440 Log: Ensure that error is set. Noticed by: rui Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sat Jul 14 05:46:52 2012 (r238439) +++ head/sys/dev/ath/if_ath.c Sat Jul 14 05:51:54 2012 (r238440) @@ -2923,6 +2923,7 @@ ath_descdma_setup_rx_edma(struct ath_sof if (bf == NULL) { if_printf(ifp, "malloc of %s buffers failed, size %u\n", dd->dd_name, bsize); + error = ENOMEM; goto fail3; } dd->dd_bufptr = bf; From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 05:53:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 88EF8106566B; Sat, 14 Jul 2012 05:53:04 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 742D38FC0A; Sat, 14 Jul 2012 05:53:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6E5r4tW011996; Sat, 14 Jul 2012 05:53:04 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6E5r4EX011994; Sat, 14 Jul 2012 05:53:04 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207140553.q6E5r4EX011994@svn.freebsd.org> From: Adrian Chadd Date: Sat, 14 Jul 2012 05:53:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238441 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 05:53:04 -0000 Author: adrian Date: Sat Jul 14 05:53:03 2012 New Revision: 238441 URL: http://svn.freebsd.org/changeset/base/238441 Log: Make sure that 'rs' is pointing to the correct RX status. Modified: head/sys/dev/ath/if_ath_rx_edma.c Modified: head/sys/dev/ath/if_ath_rx_edma.c ============================================================================== --- head/sys/dev/ath/if_ath_rx_edma.c Sat Jul 14 05:51:54 2012 (r238440) +++ head/sys/dev/ath/if_ath_rx_edma.c Sat Jul 14 05:53:03 2012 (r238441) @@ -394,6 +394,7 @@ ath_edma_recv_proc_queue(struct ath_soft * Note: this may or may not free bf->bf_m and sync/unmap * the frame. */ + rs = &bf->bf_status.ds_rxstat; if (ath_rx_pkt(sc, rs, bf->bf_rxstatus, tsf, nf, qtype, bf)) ngood++; } From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 06:00:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 47BD21065672; Sat, 14 Jul 2012 06:00:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 334D98FC1D; Sat, 14 Jul 2012 06:00:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6E60c7K012345; Sat, 14 Jul 2012 06:00:38 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6E60c9G012343; Sat, 14 Jul 2012 06:00:38 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207140600.q6E60c9G012343@svn.freebsd.org> From: Warner Losh Date: Sat, 14 Jul 2012 06:00:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238442 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 06:00:38 -0000 Author: imp Date: Sat Jul 14 06:00:37 2012 New Revision: 238442 URL: http://svn.freebsd.org/changeset/base/238442 Log: uboot should be telling us it is an ETHERNUT5 for this board. Tag it as such. Modified: head/sys/arm/at91/board_ethernut5.c Modified: head/sys/arm/at91/board_ethernut5.c ============================================================================== --- head/sys/arm/at91/board_ethernut5.c Sat Jul 14 05:53:03 2012 (r238441) +++ head/sys/arm/at91/board_ethernut5.c Sat Jul 14 06:00:37 2012 (r238442) @@ -146,4 +146,4 @@ board_init(void) return (at91_ramsize()); } -ARM_BOARD(NONE, "Ethernut 5") +ARM_BOARD(ETHERNUT5, "Ethernut 5") From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 06:13:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E245F106564A; Sat, 14 Jul 2012 06:13:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CCF918FC08; Sat, 14 Jul 2012 06:13:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6E6DN6R012895; Sat, 14 Jul 2012 06:13:23 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6E6DNOb012888; Sat, 14 Jul 2012 06:13:23 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207140613.q6E6DNOb012888@svn.freebsd.org> From: Warner Losh Date: Sat, 14 Jul 2012 06:13:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238443 - in head/sys/arm: at91 conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 06:13:24 -0000 Author: imp Date: Sat Jul 14 06:13:23 2012 New Revision: 238443 URL: http://svn.freebsd.org/changeset/base/238443 Log: Add preliminary support for Atmel SAM9260-EK evaluation kit. Initially identical to the Ethernut5, but will diverge shortly before I refactor... Added: head/sys/arm/at91/board_sam9260ek.c - copied, changed from r238321, head/sys/arm/at91/board_ethernut5.c head/sys/arm/at91/std.sam9260ek - copied, changed from r238321, head/sys/arm/at91/std.ethernut5 head/sys/arm/conf/SAM9260EK - copied unchanged from r238321, head/sys/arm/conf/ETHERNUT5 head/sys/arm/conf/SAM9260EK.hints - copied unchanged from r238321, head/sys/arm/conf/ETHERNUT5.hints Modified: head/sys/arm/at91/files.at91 head/sys/arm/conf/ATMEL Copied and modified: head/sys/arm/at91/board_sam9260ek.c (from r238321, head/sys/arm/at91/board_ethernut5.c) ============================================================================== --- head/sys/arm/at91/board_ethernut5.c Tue Jul 10 00:31:06 2012 (r238321, copy source) +++ head/sys/arm/at91/board_sam9260ek.c Sat Jul 14 06:13:23 2012 (r238443) @@ -146,4 +146,4 @@ board_init(void) return (at91_ramsize()); } -ARM_BOARD(NONE, "Ethernut 5") +ARM_BOARD(AT91SAM9260EK, "Atmel SMA9260-EK") Modified: head/sys/arm/at91/files.at91 ============================================================================== --- head/sys/arm/at91/files.at91 Sat Jul 14 06:00:37 2012 (r238442) +++ head/sys/arm/at91/files.at91 Sat Jul 14 06:13:23 2012 (r238443) @@ -42,6 +42,7 @@ arm/at91/board_hl200.c optional at91_bo arm/at91/board_hl201.c optional at91_board_hl201 arm/at91/board_kb920x.c optional at91_board_kb920x arm/at91/board_qila9g20.c optional at91_board_qila9g20 +arm/at91/board_sam9260ek.c optional at91_board_sam9260ek arm/at91/board_sam9g20ek.c optional at91_board_sam9g20ek arm/at91/board_sam9x25ek.c optional at91_board_sam9x25ek arm/at91/board_tsc4370.c optional at91_board_tsc4370 Copied and modified: head/sys/arm/at91/std.sam9260ek (from r238321, head/sys/arm/at91/std.ethernut5) ============================================================================== --- head/sys/arm/at91/std.ethernut5 Tue Jul 10 00:31:06 2012 (r238321, copy source) +++ head/sys/arm/at91/std.sam9260ek Sat Jul 14 06:13:23 2012 (r238443) @@ -7,5 +7,5 @@ makeoptions KERNVIRTADDR=0xc0000000 options KERNPHYSADDR=0x20000000 options KERNVIRTADDR=0xc0000000 -device at91_board_ethernut5 +device at91_board_sam9260ek device at91sam9260 Modified: head/sys/arm/conf/ATMEL ============================================================================== --- head/sys/arm/conf/ATMEL Sat Jul 14 06:00:37 2012 (r238442) +++ head/sys/arm/conf/ATMEL Sat Jul 14 06:13:23 2012 (r238443) @@ -25,6 +25,7 @@ device at91_board_hl200 device at91_board_hl201 device at91_board_kb920x device at91_board_qila9g20 +device at91_board_sam9260ek device at91_board_sam9g20ek device at91_board_sam9x25ek device at91_board_tsc4370 Copied: head/sys/arm/conf/SAM9260EK (from r238321, head/sys/arm/conf/ETHERNUT5) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/SAM9260EK Sat Jul 14 06:13:23 2012 (r238443, copy of r238321, head/sys/arm/conf/ETHERNUT5) @@ -0,0 +1,158 @@ +# Kernel configuration for Ethernut 5 boards +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +ident ETHERNUT5 + +include "../at91/std.ethernut5" + +# To statically compile in device wiring instead of /boot/device.hints +hints "ETHERNUT5.hints" + +#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols + +options SCHED_4BSD # 4BSD scheduler +#options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +#options INET6 # IPv6 communications protocols +#options SCTP # Stream Control Transmission Protocol +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +#options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +#options UFS_GJOURNAL # Enable gjournal-based UFS journaling +#options MD_ROOT # MD is a potential root device +options NFSCL # New Network Filesystem Client +#options NFSD # New Network Filesystem Server +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL +#options MSDOSFS # MSDOS Filesystem +#options CD9660 # ISO 9660 Filesystem +#options PROCFS # Process filesystem (requires PSEUDOFS) +#options PSEUDOFS # Pseudo-filesystem framework +#options GEOM_PART_GPT # GUID Partition Tables. +#options GEOM_LABEL # Provides labelization +#options COMPAT_FREEBSD5 # Compatible with FreeBSD5 +#options COMPAT_FREEBSD6 # Compatible with FreeBSD6 +#options COMPAT_FREEBSD7 # Compatible with FreeBSD7 +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +#options STACK # stack(9) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. +#options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) +#options AUDIT # Security event auditing +#options CAPABILITY_MODE # Capsicum capability mode +#options CAPABILITIES # Capsicum capabilities +#options MAC # TrustedBSD MAC Framework +#options INCLUDE_CONFIG_FILE # Include this file in kernel + +# required for netbooting +options BOOTP +options BOOTP_COMPAT +options BOOTP_NFSROOT +options BOOTP_NFSV3 +options BOOTP_WIRED_TO=ate0 + +# alternatively, boot from a MMC/SD memory card +#options ROOTDEVNAME=\"ufs:/dev/mmcsd0a\" + +# kernel/memory size reduction +options MUTEX_NOINLINE +options NO_FFS_SNAPSHOT +options NO_SWAPPING +options NO_SYSCTL_DESCR +options RWLOCK_NOINLINE + +# Debugging support. Always need this: +#options KDB # Enable kernel debugger support. +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic. +# For full debugger support use this instead: +#options DDB # Support DDB. +#options GDB # Support remote GDB. +#options DEADLKRES # Enable the deadlock resolver +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones + +# The `bpf' device enables the Berkeley Packet Filter. +# Be aware of the administrative consequences of enabling this! +# Note that 'bpf' is required for DHCP. +device bpf # Berkeley packet filter + +# Ethernet +device mii # Minimal MII support +device ate # Atmel AT91 Ethernet friver + +# I2C +device at91_twi # Atmel AT91 Two-wire Interface +device iic # I2C generic I/O device driver +device iicbus # I2C bus system +device pcf8563 # NXP PCF8563 clock/calendar + +# MMC/SD +device at91_mci # Atmel AT91 Multimedia Card Interface +options AT91_MCI_HAS_4WIRE +device mmc # MMC/SD bus +device mmcsd # MMC/SD memory card + +# DataFlash +device at91_spi # Atmel AT91 Serial Peripheral Interface +device spibus # SPI bus +device at45d # Atmel AT45D +device geom_map # GEOM partition mapping + +# Pseudo devices. +device loop # Network loopback +device random # Entropy device +device ether # Ethernet support +#device vlan # 802.1Q VLAN support +#device tun # Packet tunnel. +#device md # Memory "disks" +#device gif # IPv6 and IPv4 tunneling +#device faith # IPv6-to-IPv4 relaying (translation) +#device firmware # firmware assist module + +# SCSI peripherals +#device scbus # SCSI bus (required for ATA/SCSI) +#device ch # SCSI media changers +#device da # Direct Access (disks) +#device sa # Sequential Access (tape etc) +#device cd # CD +#device pass # Passthrough device (direct ATA/SCSI access) +#device ses # Enclosure Services (SES and SAF-TE) +#device ctl # CAM Target Layer + +# Serial (COM) ports +device uart # Multi-uart driver +options ALT_BREAK_TO_DEBUGGER + +# USB support +#options USB_DEBUG # enable debug msgs +device ohci # OHCI PCI->USB interface +device usb # USB Bus (required) +#device umass # Disks/Mass storage - Requires scbus and da + +# watchdog +device at91_wdt # Atmel AT91 Watchdog Timer Copied: head/sys/arm/conf/SAM9260EK.hints (from r238321, head/sys/arm/conf/ETHERNUT5.hints) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/SAM9260EK.hints Sat Jul 14 06:13:23 2012 (r238443, copy of r238321, head/sys/arm/conf/ETHERNUT5.hints) @@ -0,0 +1,51 @@ +# $FreeBSD$ + +# Atmel AT45DB21D +hint.at45d.0.at="spibus0" +hint.at45d.0.addr=0x00 +# user 132 kbytes +hint.map.0.at="flash/spi0" +hint.map.0.start=0x00000000 +hint.map.0.end=0x00020fff +hint.map.0.name="user" +hint.map.0.readonly=1 +# setup 132 kbytes +hint.map.1.at="flash/spi0" +hint.map.1.start=0x00021000 +hint.map.1.end=0x00041fff +hint.map.1.name="setup" +hint.map.1.readonly=1 +# uboot 528 kbytes +hint.map.2.at="flash/spi0" +hint.map.2.start=0x00042000 +hint.map.2.end=0x000c5fff +hint.map.2.name="uboot" +hint.map.2.readonly=1 +# kernel 2640 kbytes +hint.map.3.at="flash/spi0" +hint.map.3.start=0x000c6000 +hint.map.3.end=0x00359fff +hint.map.3.name="kernel" +#hint.map.3.readonly=1 +# nutos 528 kbytes +hint.map.4.at="flash/spi0" +hint.map.4.start=0x0035a000 +hint.map.4.end=0x003ddfff +hint.map.4.name="nutos" +hint.map.4.readonly=1 +# env 132 kbytes +hint.map.5.at="flash/spi0" +hint.map.5.start=0x003de000 +hint.map.5.end=0x003fefff +hint.map.5.name="env" +hint.map.5.readonly=1 +# env 132 kbytes +hint.map.6.at="flash/spi0" +hint.map.6.start=0x003ff000 +hint.map.6.end=0x0041ffff +hint.map.6.name="nutoscfg" +hint.map.6.readonly=1 + +# NXP PCF8563 clock/calendar +hint.pcf8563_rtc.0.at="iicbus0" +hint.pcf8563_rtc.0.addr=0xa2 From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 06:17:18 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 08F02106564A; Sat, 14 Jul 2012 06:17:18 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF7D18FC08; Sat, 14 Jul 2012 06:17:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6E6HHxZ013091; Sat, 14 Jul 2012 06:17:17 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6E6HHa4013089; Sat, 14 Jul 2012 06:17:17 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201207140617.q6E6HHa4013089@svn.freebsd.org> From: Joel Dahl Date: Sat, 14 Jul 2012 06:17:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238444 - head/usr.sbin/bsdconfig X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 06:17:18 -0000 Author: joel (doc committer) Date: Sat Jul 14 06:17:17 2012 New Revision: 238444 URL: http://svn.freebsd.org/changeset/base/238444 Log: Mdoc and whitespace fixes. Modified: head/usr.sbin/bsdconfig/bsdconfig.8 Modified: head/usr.sbin/bsdconfig/bsdconfig.8 ============================================================================== --- head/usr.sbin/bsdconfig/bsdconfig.8 Sat Jul 14 06:13:23 2012 (r238443) +++ head/usr.sbin/bsdconfig/bsdconfig.8 Sat Jul 14 06:17:17 2012 (r238444) @@ -98,16 +98,16 @@ Use .Xr Xdialog 1 in place of .Xr dialog 1 . - +.El .Sh COMMANDS The following commands .Pq sorted alphabetically are currently included in the base .Nm program, with more to be added soon. Other commands can be added, as detailed -below in the +below in the .Cm ADDING COMMANDS -section, and once added, will appear in the master menu as well as in the +section, and once added, will appear in the master menu as well as in the .Cm -h listing. .Bl -tag -width ".Cm syscons_screenmap" @@ -119,7 +119,7 @@ Shortcut to the Default Router/Gateway m Manage disk partitions and/or labels. Executes .Xr sade 8 . .It Cm docsinstall -Executes the +Executes the .Cm bsdinstall docsinstall sub-utility to allow installation/re-installation of the FreeBSD Documentation set(s). @@ -190,19 +190,17 @@ Shortcut to the Delete Users menu under Shortcut to the Edit/View Users menu under usermgmt. .It Cm usermgmt Utilities to Add/Edit/View/Delete User Accounts. - +.El .Sh INTERNATIONALIZATION -i18n features are built into +i18n features are built into .Nm and language-specific translation files will be added as they become available. In the absence of language-specific translation files, the default .Pq en_US.ISO8859-1 files will be used. - .Sh ADDING COMMANDS To be documented later. Document menu_selection="command|*" syntax of INDEX files. - .Sh ENVIRONMENT VARIABLES The following environment variables affect the execution of .Nm : @@ -215,26 +213,21 @@ messages.$LANG and INDEX.$LANG do not ex If LC_ALL is set, messages and index information will be read from files named messages.$LC_ALL and INDEX.$LC_ALL and fall back to files named messages and INDEX if messages.$LC_ALL and INDEX.$LC_ALL do not exist. - +.El .Sh FILES /usr/share/examples/bsdconfig/bsdconfigrc can be copied to $HOME/.bsdconfigrc and customized as needed. - .Sh EXIT STATUS .Ex -std - .Sh SEE ALSO -.Xr host-setup 8 - +.Xr host-setup 8 , +.Xr sade 8 .Sh HISTORY .Nm first appeared in .Fx 10.0 . - .Sh AUTHORS -.\" An -nosplit .An Ron McDowell Aq rcm@FuzzWad.ORG .An Devin Teske Aq devinteske@hotmail.com - .Sh BUGS Undoubtedly. From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 07:56:48 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49EEE106566C; Sat, 14 Jul 2012 07:56:48 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C4008FC08; Sat, 14 Jul 2012 07:56:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6E7ulMF017062; Sat, 14 Jul 2012 07:56:47 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6E7ulb2017060; Sat, 14 Jul 2012 07:56:47 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207140756.q6E7ulb2017060@svn.freebsd.org> From: Adrian Chadd Date: Sat, 14 Jul 2012 07:56:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238445 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 07:56:48 -0000 Author: adrian Date: Sat Jul 14 07:56:47 2012 New Revision: 238445 URL: http://svn.freebsd.org/changeset/base/238445 Log: Merge in some other features from the legacy RX path: * wrap the RX proc calls in the RX refcount; * call the DFS checking, fast frames staging and TX rescheduling if required. TODO: * figure out if I can just make "do TX rescheduling" mean "schedule TX taskqueue" ? Modified: head/sys/dev/ath/if_ath_rx_edma.c Modified: head/sys/dev/ath/if_ath_rx_edma.c ============================================================================== --- head/sys/dev/ath/if_ath_rx_edma.c Sat Jul 14 06:17:17 2012 (r238444) +++ head/sys/dev/ath/if_ath_rx_edma.c Sat Jul 14 07:56:47 2012 (r238445) @@ -284,8 +284,16 @@ ath_edma_recv_flush(struct ath_softc *sc device_printf(sc->sc_dev, "%s: called\n", __func__); + ATH_PCU_LOCK(sc); + sc->sc_rxproc_cnt++; + ATH_PCU_UNLOCK(sc); + ath_edma_recv_proc_queue(sc, HAL_RX_QUEUE_HP, 0); ath_edma_recv_proc_queue(sc, HAL_RX_QUEUE_LP, 0); + + ATH_PCU_LOCK(sc); + sc->sc_rxproc_cnt--; + ATH_PCU_UNLOCK(sc); } /* @@ -312,7 +320,7 @@ ath_edma_recv_proc_queue(struct ath_soft struct ath_hal *ah = sc->sc_ah; uint64_t tsf; int16_t nf; - int ngood = 0; + int ngood = 0, npkts = 0; ath_bufhead rxlist; struct ath_buf *next; @@ -362,6 +370,7 @@ ath_edma_recv_proc_queue(struct ath_soft */ DPRINTF(sc, ATH_DEBUG_EDMA_RX, "%s: Q%d: completed!\n", __func__, qtype); + npkts++; /* * Remove the FIFO entry and place it on the completion @@ -407,6 +416,14 @@ ath_edma_recv_proc_queue(struct ath_soft } ATH_RX_UNLOCK(sc); + /* rx signal state monitoring */ + ath_hal_rxmonitor(ah, &sc->sc_halstats, sc->sc_curchan); + if (ngood) + sc->sc_lastrx = tsf; + + CTR2(ATH_KTR_INTR, "ath edma rx proc: npkts=%d, ngood=%d", + npkts, ngood); + /* Handle resched and kickpcu appropriately */ ATH_PCU_LOCK(sc); if (dosched && sc->sc_kickpcu) { @@ -429,6 +446,8 @@ static void ath_edma_recv_tasklet(void *arg, int npending) { struct ath_softc *sc = (struct ath_softc *) arg; + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; DPRINTF(sc, ATH_DEBUG_EDMA_RX, "%s: called; npending=%d\n", __func__, @@ -441,10 +460,26 @@ ath_edma_recv_tasklet(void *arg, int npe ATH_PCU_UNLOCK(sc); return; } + sc->sc_rxproc_cnt++; ATH_PCU_UNLOCK(sc); ath_edma_recv_proc_queue(sc, HAL_RX_QUEUE_HP, 1); ath_edma_recv_proc_queue(sc, HAL_RX_QUEUE_LP, 1); + + /* XXX inside IF_LOCK ? */ + if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0) { +#ifdef IEEE80211_SUPPORT_SUPERG + ieee80211_ff_age_all(ic, 100); +#endif + if (! IFQ_IS_EMPTY(&ifp->if_snd)) + ath_tx_kick(sc); + } + if (ath_dfs_tasklet_needed(sc, sc->sc_curchan)) + taskqueue_enqueue(sc->sc_tq, &sc->sc_dfstask); + + ATH_PCU_LOCK(sc); + sc->sc_rxproc_cnt--; + ATH_PCU_UNLOCK(sc); } /* From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 10:17:48 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 838161065675; Sat, 14 Jul 2012 10:17:48 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DD698FC15; Sat, 14 Jul 2012 10:17:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6EAHmYZ022918; Sat, 14 Jul 2012 10:17:48 GMT (envelope-from zeising@svn.freebsd.org) Received: (from zeising@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6EAHmsF022915; Sat, 14 Jul 2012 10:17:48 GMT (envelope-from zeising@svn.freebsd.org) Message-Id: <201207141017.q6EAHmsF022915@svn.freebsd.org> From: Niclas Zeising Date: Sat, 14 Jul 2012 10:17:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238448 - in head: share/man/man5 tools/build/options X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 10:17:48 -0000 Author: zeising (ports committer) Date: Sat Jul 14 10:17:47 2012 New Revision: 238448 URL: http://svn.freebsd.org/changeset/base/238448 Log: Change language in WITH_BSDCONFIG to match other options, and regen src.conf(5), which was missed in r238438. Approved by: joel (mentor) Modified: head/share/man/man5/src.conf.5 head/tools/build/options/WITH_BSDCONFIG Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sat Jul 14 08:54:42 2012 (r238447) +++ head/share/man/man5/src.conf.5 Sat Jul 14 10:17:47 2012 (r238448) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb .\" $FreeBSD$ -.Dd July 2, 2012 +.Dd July 14, 2012 .Dt SRC.CONF 5 .Os .Sh NAME @@ -220,6 +220,9 @@ Set to not build Bluetooth related kerne .It Va WITHOUT_BOOT .\" from FreeBSD: head/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru Set to not build the boot blocks and loader. +.It Va WITH_BSDCONFIG +.\" from FreeBSD: head/tools/build/options/WITH_BSDCONFIG 238438 2012-07-14 03:16:57Z dteske +Set to install bsdconfig(8), a BSD-licensed configuration/management utility. .It Va WITHOUT_BSD_CPIO .\" from FreeBSD: head/tools/build/options/WITHOUT_BSD_CPIO 179813 2008-06-16 05:48:15Z dougb Set to not build the BSD licensed version of cpio based on Modified: head/tools/build/options/WITH_BSDCONFIG ============================================================================== --- head/tools/build/options/WITH_BSDCONFIG Sat Jul 14 08:54:42 2012 (r238447) +++ head/tools/build/options/WITH_BSDCONFIG Sat Jul 14 10:17:47 2012 (r238448) @@ -1,2 +1,2 @@ .\" $FreeBSD$ -Install bsdconfig(8), a BSD-licensed configuration/management utility. +Set to install bsdconfig(8), a BSD-licensed configuration/management utility. From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 12:15:21 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3F421065672; Sat, 14 Jul 2012 12:15:21 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EFA78FC08; Sat, 14 Jul 2012 12:15:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6ECFLE7032322; Sat, 14 Jul 2012 12:15:21 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6ECFLeN032320; Sat, 14 Jul 2012 12:15:21 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207141215.q6ECFLeN032320@svn.freebsd.org> From: Adrian Chadd Date: Sat, 14 Jul 2012 12:15:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238449 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 12:15:21 -0000 Author: adrian Date: Sat Jul 14 12:15:20 2012 New Revision: 238449 URL: http://svn.freebsd.org/changeset/base/238449 Log: Fix build breakage when one isn't building with IEEE80211_SUPPORT_SUPERG. Noticed by: mav Modified: head/sys/dev/ath/if_ath_rx_edma.c Modified: head/sys/dev/ath/if_ath_rx_edma.c ============================================================================== --- head/sys/dev/ath/if_ath_rx_edma.c Sat Jul 14 10:17:47 2012 (r238448) +++ head/sys/dev/ath/if_ath_rx_edma.c Sat Jul 14 12:15:20 2012 (r238449) @@ -447,7 +447,9 @@ ath_edma_recv_tasklet(void *arg, int npe { struct ath_softc *sc = (struct ath_softc *) arg; struct ifnet *ifp = sc->sc_ifp; +#ifdef IEEE80211_SUPPORT_SUPERG struct ieee80211com *ic = ifp->if_l2com; +#endif DPRINTF(sc, ATH_DEBUG_EDMA_RX, "%s: called; npending=%d\n", __func__, From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 15:48:31 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 253B6106566B; Sat, 14 Jul 2012 15:48:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E80F8FC08; Sat, 14 Jul 2012 15:48:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6EFmUUU093500; Sat, 14 Jul 2012 15:48:30 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6EFmUIU093495; Sat, 14 Jul 2012 15:48:30 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207141548.q6EFmUIU093495@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 14 Jul 2012 15:48:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238450 - in head/sys: amd64/amd64 amd64/include x86/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 15:48:31 -0000 Author: kib Date: Sat Jul 14 15:48:30 2012 New Revision: 238450 URL: http://svn.freebsd.org/changeset/base/238450 Log: Add support for the XSAVEOPT instruction use. Our XSAVE/XRSTOR usage mostly meets the guidelines set by the Intel SDM: 1. We use XRSTOR and XSAVE from the same CPL using the same linear address for the store area 2. Contrary to the recommendations, we cannot zero the FPU save area for a new thread, since fork semantic requires the copy of the previous state. This advice seemingly contradicts to the advice from the item 6. 3. We do use XSAVEOPT in the context switch code only, and the area for XSAVEOPT already always contains the data saved by XSAVE. 4. We do not modify the save area between XRSTOR, when the area is loaded into FPU context, and XSAVE. We always spit the fpu context into save area and start emulation when directly writing into FPU context. 5. We do not use segmented addressing to access save area, or rather, always address it using %ds basing. 6. XSAVEOPT can be only executed in the area which was previously loaded with XRSTOR, since context switch code checks for FPU use by outgoing thread before saving, and thread which stopped emulation forcibly get context loaded with XRSTOR. 7. The PCB cannot be paged out while FPU emulation is turned off, since stack of the executing thread is never swapped out. The context switch code is patched to issue XSAVEOPT instead of XSAVE if supported. This approach eliminates one conditional in the context switch code, which would be needed otherwise. For user-visible machine context to have proper data, fpugetregs() checks for unsaved extension blocks and manually copies pristine FPU state into them, according to the description provided by CPUID leaf 0xd. MFC after: 1 month Modified: head/sys/amd64/amd64/cpu_switch.S head/sys/amd64/amd64/fpu.c head/sys/amd64/include/md_var.h head/sys/x86/include/specialreg.h Modified: head/sys/amd64/amd64/cpu_switch.S ============================================================================== --- head/sys/amd64/amd64/cpu_switch.S Sat Jul 14 12:15:20 2012 (r238449) +++ head/sys/amd64/amd64/cpu_switch.S Sat Jul 14 15:48:30 2012 (r238450) @@ -122,6 +122,9 @@ done_store_dr: 1: movq %rdx,%rcx movl xsave_mask,%eax movl xsave_mask+4,%edx + .globl ctx_switch_xsave +ctx_switch_xsave: + /* This is patched to xsaveopt if supported, see fpuinit_bsp1() */ xsave (%r8) movq %rcx,%rdx 2: smsw %ax Modified: head/sys/amd64/amd64/fpu.c ============================================================================== --- head/sys/amd64/amd64/fpu.c Sat Jul 14 12:15:20 2012 (r238449) +++ head/sys/amd64/amd64/fpu.c Sat Jul 14 15:48:30 2012 (r238450) @@ -132,10 +132,16 @@ static void fpu_clean_state(void); SYSCTL_INT(_hw, HW_FLOATINGPT, floatingpoint, CTLFLAG_RD, NULL, 1, "Floating point instructions executed in hardware"); +static int use_xsaveopt; int use_xsave; /* non-static for cpu_switch.S */ uint64_t xsave_mask; /* the same */ static struct savefpu *fpu_initialstate; +struct xsave_area_elm_descr { + u_int offset; + u_int size; +} *xsave_area_desc; + void fpusave(void *addr) { @@ -182,6 +188,17 @@ fpuinit_bsp1(void) TUNABLE_ULONG_FETCH("hw.xsave_mask", &xsave_mask_user); xsave_mask_user |= XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE; xsave_mask &= xsave_mask_user; + + cpuid_count(0xd, 0x1, cp); + if ((cp[0] & CPUID_EXTSTATE_XSAVEOPT) != 0) { + /* + * Patch the XSAVE instruction in the cpu_switch code + * to XSAVEOPT. We assume that XSAVE encoding used + * REX byte, and set the bit 4 of the r/m byte. + */ + ctx_switch_xsave[3] |= 0x10; + use_xsaveopt = 1; + } } /* @@ -252,6 +269,7 @@ static void fpuinitstate(void *arg __unused) { register_t saveintr; + int cp[4], i, max_ext_n; fpu_initialstate = malloc(cpu_max_ext_state_size, M_DEVBUF, M_WAITOK | M_ZERO); @@ -273,6 +291,28 @@ fpuinitstate(void *arg __unused) */ bzero(&fpu_initialstate->sv_xmm[0], sizeof(struct xmmacc)); + /* + * Create a table describing the layout of the CPU Extended + * Save Area. + */ + if (use_xsaveopt) { + max_ext_n = flsl(xsave_mask); + xsave_area_desc = malloc(max_ext_n * sizeof(struct + xsave_area_elm_descr), M_DEVBUF, M_WAITOK | M_ZERO); + /* x87 state */ + xsave_area_desc[0].offset = 0; + xsave_area_desc[0].size = 160; + /* XMM */ + xsave_area_desc[1].offset = 160; + xsave_area_desc[1].size = 288 - 160; + + for (i = 2; i < max_ext_n; i++) { + cpuid_count(0xd, i, cp); + xsave_area_desc[i].offset = cp[1]; + xsave_area_desc[i].size = cp[0]; + } + } + start_emulating(); intr_restore(saveintr); } @@ -560,8 +600,14 @@ fpudna(void) * This is the first time this thread has used the FPU or * the PCB doesn't contain a clean FPU state. Explicitly * load an initial state. + * + * We prefer to restore the state from the actual save + * area in PCB instead of directly loading from + * fpu_initialstate, to ignite the XSAVEOPT + * tracking engine. */ - fpurestore(fpu_initialstate); + bcopy(fpu_initialstate, pcb->pcb_save, cpu_max_ext_state_size); + fpurestore(pcb->pcb_save); if (pcb->pcb_initial_fpucw != __INITIAL_FPUCW__) fldcw(pcb->pcb_initial_fpucw); if (PCB_USER_FPU(pcb)) @@ -596,6 +642,9 @@ int fpugetregs(struct thread *td) { struct pcb *pcb; + uint64_t *xstate_bv, bit; + char *sa; + int max_ext_n, i; pcb = td->td_pcb; if ((pcb->pcb_flags & PCB_USERFPUINITDONE) == 0) { @@ -613,6 +662,25 @@ fpugetregs(struct thread *td) return (_MC_FPOWNED_FPU); } else { critical_exit(); + if (use_xsaveopt) { + /* + * Handle partially saved state. + */ + sa = (char *)get_pcb_user_save_pcb(pcb); + xstate_bv = (uint64_t *)(sa + sizeof(struct savefpu) + + offsetof(struct xstate_hdr, xstate_bv)); + max_ext_n = flsl(xsave_mask); + for (i = 0; i < max_ext_n; i++) { + bit = 1 << i; + if ((*xstate_bv & bit) != 0) + continue; + bcopy((char *)fpu_initialstate + + xsave_area_desc[i].offset, + sa + xsave_area_desc[i].offset, + xsave_area_desc[i].size); + *xstate_bv |= bit; + } + } return (_MC_FPOWNED_PCB); } } Modified: head/sys/amd64/include/md_var.h ============================================================================== --- head/sys/amd64/include/md_var.h Sat Jul 14 12:15:20 2012 (r238449) +++ head/sys/amd64/include/md_var.h Sat Jul 14 15:48:30 2012 (r238450) @@ -57,6 +57,7 @@ extern u_int cpu_procinfo; extern u_int cpu_procinfo2; extern char cpu_vendor[]; extern u_int cpu_vendor_id; +extern char ctx_switch_xsave[]; extern char kstack[]; extern char sigcode[]; extern int szsigcode; Modified: head/sys/x86/include/specialreg.h ============================================================================== --- head/sys/x86/include/specialreg.h Sat Jul 14 12:15:20 2012 (r238449) +++ head/sys/x86/include/specialreg.h Sat Jul 14 15:48:30 2012 (r238450) @@ -247,6 +247,11 @@ #define CPUID_TYPE_CORE 2 /* + * CPUID instruction 0xd Processor Extended State Enumeration Sub-leaf 1 + */ +#define CPUID_EXTSTATE_XSAVEOPT 0x00000001 + +/* * AMD extended function 8000_0007h edx info */ #define AMDPM_TS 0x00000001 From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 18:10:45 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D5F2106564A; Sat, 14 Jul 2012 18:10:45 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0812E8FC1B; Sat, 14 Jul 2012 18:10:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6EIAiMu099902; Sat, 14 Jul 2012 18:10:44 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6EIAipC099899; Sat, 14 Jul 2012 18:10:44 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207141810.q6EIAipC099899@svn.freebsd.org> From: Alan Cox Date: Sat, 14 Jul 2012 18:10:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238452 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 18:10:45 -0000 Author: alc Date: Sat Jul 14 18:10:44 2012 New Revision: 238452 URL: http://svn.freebsd.org/changeset/base/238452 Log: Move kmem_alloc_{attr,contig}() to vm/vm_kern.c, where similarly named functions reside. Correct the comment describing kmem_alloc_contig(). Modified: head/sys/vm/vm_contig.c head/sys/vm/vm_kern.c Modified: head/sys/vm/vm_contig.c ============================================================================== --- head/sys/vm/vm_contig.c Sat Jul 14 16:34:17 2012 (r238451) +++ head/sys/vm/vm_contig.c Sat Jul 14 18:10:44 2012 (r238452) @@ -75,14 +75,11 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include -#include #include #include #include #include -#include static int vm_contig_launder_page(vm_page_t m, vm_page_t *next) @@ -208,144 +205,3 @@ again: } vm_page_unlock_queues(); } - -/* - * Allocates a region from the kernel address map and pages within the - * specified physical address range to the kernel object, creates a wired - * mapping from the region to these pages, and returns the region's starting - * virtual address. The allocated pages are not necessarily physically - * contiguous. If M_ZERO is specified through the given flags, then the pages - * are zeroed before they are mapped. - */ -vm_offset_t -kmem_alloc_attr(vm_map_t map, vm_size_t size, int flags, vm_paddr_t low, - vm_paddr_t high, vm_memattr_t memattr) -{ - vm_object_t object = kernel_object; - vm_offset_t addr; - vm_ooffset_t end_offset, offset; - vm_page_t m; - int pflags, tries; - - size = round_page(size); - vm_map_lock(map); - if (vm_map_findspace(map, vm_map_min(map), size, &addr)) { - vm_map_unlock(map); - return (0); - } - offset = addr - VM_MIN_KERNEL_ADDRESS; - vm_object_reference(object); - vm_map_insert(map, object, offset, addr, addr + size, VM_PROT_ALL, - VM_PROT_ALL, 0); - if ((flags & (M_NOWAIT | M_USE_RESERVE)) == M_NOWAIT) - pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_NOBUSY; - else - pflags = VM_ALLOC_SYSTEM | VM_ALLOC_NOBUSY; - if (flags & M_ZERO) - pflags |= VM_ALLOC_ZERO; - VM_OBJECT_LOCK(object); - end_offset = offset + size; - for (; offset < end_offset; offset += PAGE_SIZE) { - tries = 0; -retry: - m = vm_page_alloc_contig(object, OFF_TO_IDX(offset), pflags, 1, - low, high, PAGE_SIZE, 0, memattr); - if (m == NULL) { - VM_OBJECT_UNLOCK(object); - if (tries < ((flags & M_NOWAIT) != 0 ? 1 : 3)) { - vm_map_unlock(map); - vm_contig_grow_cache(tries, low, high); - vm_map_lock(map); - VM_OBJECT_LOCK(object); - tries++; - goto retry; - } - /* - * Since the pages that were allocated by any previous - * iterations of this loop are not busy, they can be - * freed by vm_object_page_remove(), which is called - * by vm_map_delete(). - */ - vm_map_delete(map, addr, addr + size); - vm_map_unlock(map); - return (0); - } - if ((flags & M_ZERO) && (m->flags & PG_ZERO) == 0) - pmap_zero_page(m); - m->valid = VM_PAGE_BITS_ALL; - } - VM_OBJECT_UNLOCK(object); - vm_map_unlock(map); - vm_map_wire(map, addr, addr + size, VM_MAP_WIRE_SYSTEM | - VM_MAP_WIRE_NOHOLES); - return (addr); -} - -/* - * Allocates a region from the kernel address map, inserts the - * given physically contiguous pages into the kernel object, - * creates a wired mapping from the region to the pages, and - * returns the region's starting virtual address. If M_ZERO is - * specified through the given flags, then the pages are zeroed - * before they are mapped. - */ -vm_offset_t -kmem_alloc_contig(vm_map_t map, vm_size_t size, int flags, vm_paddr_t low, - vm_paddr_t high, u_long alignment, vm_paddr_t boundary, - vm_memattr_t memattr) -{ - vm_object_t object = kernel_object; - vm_offset_t addr; - vm_ooffset_t offset; - vm_page_t end_m, m; - int pflags, tries; - - size = round_page(size); - vm_map_lock(map); - if (vm_map_findspace(map, vm_map_min(map), size, &addr)) { - vm_map_unlock(map); - return (0); - } - offset = addr - VM_MIN_KERNEL_ADDRESS; - vm_object_reference(object); - vm_map_insert(map, object, offset, addr, addr + size, VM_PROT_ALL, - VM_PROT_ALL, 0); - if ((flags & (M_NOWAIT | M_USE_RESERVE)) == M_NOWAIT) - pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_NOBUSY; - else - pflags = VM_ALLOC_SYSTEM | VM_ALLOC_NOBUSY; - if (flags & M_ZERO) - pflags |= VM_ALLOC_ZERO; - if (flags & M_NODUMP) - pflags |= VM_ALLOC_NODUMP; - VM_OBJECT_LOCK(object); - tries = 0; -retry: - m = vm_page_alloc_contig(object, OFF_TO_IDX(offset), pflags, - atop(size), low, high, alignment, boundary, memattr); - if (m == NULL) { - VM_OBJECT_UNLOCK(object); - if (tries < ((flags & M_NOWAIT) != 0 ? 1 : 3)) { - vm_map_unlock(map); - vm_contig_grow_cache(tries, low, high); - vm_map_lock(map); - VM_OBJECT_LOCK(object); - tries++; - goto retry; - } - vm_map_delete(map, addr, addr + size); - vm_map_unlock(map); - return (0); - } - end_m = m + atop(size); - for (; m < end_m; m++) { - if ((flags & M_ZERO) && (m->flags & PG_ZERO) == 0) - pmap_zero_page(m); - m->valid = VM_PAGE_BITS_ALL; - } - VM_OBJECT_UNLOCK(object); - vm_map_unlock(map); - vm_map_wire(map, addr, addr + size, VM_MAP_WIRE_SYSTEM | - VM_MAP_WIRE_NOHOLES); - return (addr); -} Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Sat Jul 14 16:34:17 2012 (r238451) +++ head/sys/vm/vm_kern.c Sat Jul 14 18:10:44 2012 (r238452) @@ -195,6 +195,148 @@ kmem_alloc(map, size) } /* + * Allocates a region from the kernel address map and physical pages + * within the specified address range to the kernel object. Creates a + * wired mapping from this region to these pages, and returns the + * region's starting virtual address. The allocated pages are not + * necessarily physically contiguous. If M_ZERO is specified through the + * given flags, then the pages are zeroed before they are mapped. + */ +vm_offset_t +kmem_alloc_attr(vm_map_t map, vm_size_t size, int flags, vm_paddr_t low, + vm_paddr_t high, vm_memattr_t memattr) +{ + vm_object_t object = kernel_object; + vm_offset_t addr; + vm_ooffset_t end_offset, offset; + vm_page_t m; + int pflags, tries; + + size = round_page(size); + vm_map_lock(map); + if (vm_map_findspace(map, vm_map_min(map), size, &addr)) { + vm_map_unlock(map); + return (0); + } + offset = addr - VM_MIN_KERNEL_ADDRESS; + vm_object_reference(object); + vm_map_insert(map, object, offset, addr, addr + size, VM_PROT_ALL, + VM_PROT_ALL, 0); + if ((flags & (M_NOWAIT | M_USE_RESERVE)) == M_NOWAIT) + pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_NOBUSY; + else + pflags = VM_ALLOC_SYSTEM | VM_ALLOC_NOBUSY; + if (flags & M_ZERO) + pflags |= VM_ALLOC_ZERO; + VM_OBJECT_LOCK(object); + end_offset = offset + size; + for (; offset < end_offset; offset += PAGE_SIZE) { + tries = 0; +retry: + m = vm_page_alloc_contig(object, OFF_TO_IDX(offset), pflags, 1, + low, high, PAGE_SIZE, 0, memattr); + if (m == NULL) { + VM_OBJECT_UNLOCK(object); + if (tries < ((flags & M_NOWAIT) != 0 ? 1 : 3)) { + vm_map_unlock(map); + vm_contig_grow_cache(tries, low, high); + vm_map_lock(map); + VM_OBJECT_LOCK(object); + tries++; + goto retry; + } + + /* + * Since the pages that were allocated by any previous + * iterations of this loop are not busy, they can be + * freed by vm_object_page_remove(), which is called + * by vm_map_delete(). + */ + vm_map_delete(map, addr, addr + size); + vm_map_unlock(map); + return (0); + } + if ((flags & M_ZERO) && (m->flags & PG_ZERO) == 0) + pmap_zero_page(m); + m->valid = VM_PAGE_BITS_ALL; + } + VM_OBJECT_UNLOCK(object); + vm_map_unlock(map); + vm_map_wire(map, addr, addr + size, VM_MAP_WIRE_SYSTEM | + VM_MAP_WIRE_NOHOLES); + return (addr); +} + +/* + * Allocates a region from the kernel address map and physically + * contiguous pages within the specified address range to the kernel + * object. Creates a wired mapping from this region to these pages, and + * returns the region's starting virtual address. If M_ZERO is specified + * through the given flags, then the pages are zeroed before they are + * mapped. + */ +vm_offset_t +kmem_alloc_contig(vm_map_t map, vm_size_t size, int flags, vm_paddr_t low, + vm_paddr_t high, u_long alignment, vm_paddr_t boundary, + vm_memattr_t memattr) +{ + vm_object_t object = kernel_object; + vm_offset_t addr; + vm_ooffset_t offset; + vm_page_t end_m, m; + int pflags, tries; + + size = round_page(size); + vm_map_lock(map); + if (vm_map_findspace(map, vm_map_min(map), size, &addr)) { + vm_map_unlock(map); + return (0); + } + offset = addr - VM_MIN_KERNEL_ADDRESS; + vm_object_reference(object); + vm_map_insert(map, object, offset, addr, addr + size, VM_PROT_ALL, + VM_PROT_ALL, 0); + if ((flags & (M_NOWAIT | M_USE_RESERVE)) == M_NOWAIT) + pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_NOBUSY; + else + pflags = VM_ALLOC_SYSTEM | VM_ALLOC_NOBUSY; + if (flags & M_ZERO) + pflags |= VM_ALLOC_ZERO; + if (flags & M_NODUMP) + pflags |= VM_ALLOC_NODUMP; + VM_OBJECT_LOCK(object); + tries = 0; +retry: + m = vm_page_alloc_contig(object, OFF_TO_IDX(offset), pflags, + atop(size), low, high, alignment, boundary, memattr); + if (m == NULL) { + VM_OBJECT_UNLOCK(object); + if (tries < ((flags & M_NOWAIT) != 0 ? 1 : 3)) { + vm_map_unlock(map); + vm_contig_grow_cache(tries, low, high); + vm_map_lock(map); + VM_OBJECT_LOCK(object); + tries++; + goto retry; + } + vm_map_delete(map, addr, addr + size); + vm_map_unlock(map); + return (0); + } + end_m = m + atop(size); + for (; m < end_m; m++) { + if ((flags & M_ZERO) && (m->flags & PG_ZERO) == 0) + pmap_zero_page(m); + m->valid = VM_PAGE_BITS_ALL; + } + VM_OBJECT_UNLOCK(object); + vm_map_unlock(map); + vm_map_wire(map, addr, addr + size, VM_MAP_WIRE_SYSTEM | + VM_MAP_WIRE_NOHOLES); + return (addr); +} + +/* * kmem_free: * * Release a region of kernel virtual memory allocated From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 19:44:39 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD34C106566C; Sat, 14 Jul 2012 19:44:39 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C8B818FC0A; Sat, 14 Jul 2012 19:44:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6EJid8d003843; Sat, 14 Jul 2012 19:44:39 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6EJidFx003841; Sat, 14 Jul 2012 19:44:39 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207141944.q6EJidFx003841@svn.freebsd.org> From: Michael Tuexen Date: Sat, 14 Jul 2012 19:44:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238454 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 19:44:40 -0000 Author: tuexen Date: Sat Jul 14 19:44:39 2012 New Revision: 238454 URL: http://svn.freebsd.org/changeset/base/238454 Log: Use case for selecting the address family (as in other places). MFC after: 3 days Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sat Jul 14 19:39:53 2012 (r238453) +++ head/sys/netinet/sctp_input.c Sat Jul 14 19:44:39 2012 (r238454) @@ -2874,14 +2874,12 @@ sctp_handle_cookie_echo(struct mbuf *m, return (m); } } - if ((*inp_p)->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) { - if (notification) { - sctp_ulp_notify(notification, *stcb, 0, NULL, SCTP_SO_NOT_LOCKED); - } - if (send_int_conf) { - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_CONFIRMED, - (*stcb), 0, (void *)netl, SCTP_SO_NOT_LOCKED); - } + if (notification) { + sctp_ulp_notify(notification, *stcb, 0, NULL, SCTP_SO_NOT_LOCKED); + } + if (send_int_conf) { + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_CONFIRMED, + (*stcb), 0, (void *)netl, SCTP_SO_NOT_LOCKED); } return (m); } From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 20:08:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EFD01065676; Sat, 14 Jul 2012 20:08:04 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A66D8FC12; Sat, 14 Jul 2012 20:08:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6EK83Jj004935; Sat, 14 Jul 2012 20:08:03 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6EK83GG004933; Sat, 14 Jul 2012 20:08:03 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207142008.q6EK83GG004933@svn.freebsd.org> From: Michael Tuexen Date: Sat, 14 Jul 2012 20:08:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238455 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 20:08:04 -0000 Author: tuexen Date: Sat Jul 14 20:08:03 2012 New Revision: 238455 URL: http://svn.freebsd.org/changeset/base/238455 Log: Use case for selecting the address family (as in other places). MFC after: 3 days Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sat Jul 14 19:44:39 2012 (r238454) +++ head/sys/netinet/sctp_pcb.c Sat Jul 14 20:08:03 2012 (r238455) @@ -1203,11 +1203,18 @@ sctp_findassociation_ep_addr(struct sctp uint16_t rport; inp = *inp_p; - if (remote->sa_family == AF_INET) { + switch (remote->sa_family) { +#ifdef INET + case AF_INET: rport = (((struct sockaddr_in *)remote)->sin_port); - } else if (remote->sa_family == AF_INET6) { + break; +#endif +#ifdef INET6 + case AF_INET6: rport = (((struct sockaddr_in6 *)remote)->sin6_port); - } else { + break; +#endif + default: return (NULL); } if (locked_tcb) { From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 20:10:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E3F9D106566C; Sat, 14 Jul 2012 20:10:06 +0000 (UTC) (envelope-from tuexen@fh-muenster.de) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) by mx1.freebsd.org (Postfix) with ESMTP id 76C928FC12; Sat, 14 Jul 2012 20:10:06 +0000 (UTC) Received: from [192.168.1.103] (p5481B529.dip.t-dialin.net [84.129.181.41]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id CDFD61C0C0BD8; Sat, 14 Jul 2012 22:10:04 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1278) From: Michael Tuexen In-Reply-To: <201207141944.q6EJidFx003841@svn.freebsd.org> Date: Sat, 14 Jul 2012 22:10:03 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201207141944.q6EJidFx003841@svn.freebsd.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Mailer: Apple Mail (2.1278) Cc: Subject: Re: svn commit: r238454 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 20:10:07 -0000 On Jul 14, 2012, at 9:44 PM, Michael Tuexen wrote: > Author: tuexen > Date: Sat Jul 14 19:44:39 2012 > New Revision: 238454 > URL: http://svn.freebsd.org/changeset/base/238454 >=20 > Log: > Use case for selecting the address family (as in other places). Wrong commit message. It should have been: Bugfix: Send up a COMM UP notification for active 1-to-1 style sockets also in the case where the assoc comes up due to a remotely started handshake (collision case). >=20 > MFC after: 3 days >=20 > Modified: > head/sys/netinet/sctp_input.c >=20 > Modified: head/sys/netinet/sctp_input.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/netinet/sctp_input.c Sat Jul 14 19:39:53 2012 = (r238453) > +++ head/sys/netinet/sctp_input.c Sat Jul 14 19:44:39 2012 = (r238454) > @@ -2874,14 +2874,12 @@ sctp_handle_cookie_echo(struct mbuf *m,=20 > return (m); > } > } > - if ((*inp_p)->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) { > - if (notification) { > - sctp_ulp_notify(notification, *stcb, 0, NULL, = SCTP_SO_NOT_LOCKED); > - } > - if (send_int_conf) { > - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_CONFIRMED, > - (*stcb), 0, (void *)netl, = SCTP_SO_NOT_LOCKED); > - } > + if (notification) { > + sctp_ulp_notify(notification, *stcb, 0, NULL, = SCTP_SO_NOT_LOCKED); > + } > + if (send_int_conf) { > + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_CONFIRMED, > + (*stcb), 0, (void *)netl, SCTP_SO_NOT_LOCKED); > } > return (m); > } >=20 From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 20:14:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 674691065672; Sat, 14 Jul 2012 20:14:04 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 524188FC12; Sat, 14 Jul 2012 20:14:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6EKE46e005214; Sat, 14 Jul 2012 20:14:04 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6EKE44O005212; Sat, 14 Jul 2012 20:14:04 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207142014.q6EKE44O005212@svn.freebsd.org> From: Alan Cox Date: Sat, 14 Jul 2012 20:14:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238456 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 20:14:04 -0000 Author: alc Date: Sat Jul 14 20:14:03 2012 New Revision: 238456 URL: http://svn.freebsd.org/changeset/base/238456 Log: If vm_contig_grow_cache() is allowed to sleep, then invoke the vm_lowmem handlers. Modified: head/sys/vm/vm_contig.c Modified: head/sys/vm/vm_contig.c ============================================================================== --- head/sys/vm/vm_contig.c Sat Jul 14 20:08:03 2012 (r238455) +++ head/sys/vm/vm_contig.c Sat Jul 14 20:14:03 2012 (r238456) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -189,6 +190,20 @@ vm_contig_grow_cache(int tries, vm_paddr { int actl, actmax, inactl, inactmax; + if (tries > 0) { + /* + * Decrease registered cache sizes. The vm_lowmem handlers + * may acquire locks and/or sleep, so they can only be invoked + * when "tries" is greater than zero. + */ + EVENTHANDLER_INVOKE(vm_lowmem, 0); + + /* + * We do this explicitly after the caches have been drained + * above. + */ + uma_reclaim(); + } vm_page_lock_queues(); inactl = 0; inactmax = tries < 1 ? 0 : cnt.v_inactive_count; From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 20:24:01 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 67969106566B; Sat, 14 Jul 2012 20:24:01 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 498158FC19; Sat, 14 Jul 2012 20:24:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6EKO1B2005828; Sat, 14 Jul 2012 20:24:01 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6EKO1Cu005826; Sat, 14 Jul 2012 20:24:01 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201207142024.q6EKO1Cu005826@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sat, 14 Jul 2012 20:24:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238457 - in head/cddl/contrib/opensolaris: cmd/dtrace/test/tst/common/sizeof lib/libdtrace/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 20:24:01 -0000 Author: pfg Date: Sat Jul 14 20:24:00 2012 New Revision: 238457 URL: http://svn.freebsd.org/changeset/base/238457 Log: Merge illumos commit 13455:7205f7794835 1458 D compiler fails to generate error on sizeof() an undefined struct Reference: https://www.illumos.org/issues/1458 Tested by: Fabian Keil MFC after: 3 weeks Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sizeof/err.D_SIZEOF_TYPE.badstruct.d - copied unchanged from r238456, vendor/illumos/dist/cmd/dtrace/test/tst/common/sizeof/err.D_SIZEOF_TYPE.badstruct.d Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sizeof/err.D_SIZEOF_TYPE.badstruct.d (from r238456, vendor/illumos/dist/cmd/dtrace/test/tst/common/sizeof/err.D_SIZEOF_TYPE.badstruct.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sizeof/err.D_SIZEOF_TYPE.badstruct.d Sat Jul 14 20:24:00 2012 (r238457, copy of r238456, vendor/illumos/dist/cmd/dtrace/test/tst/common/sizeof/err.D_SIZEOF_TYPE.badstruct.d) @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent Inc. All rights reserved. + */ + +BEGIN +{ + trace(sizeof (struct suckitlarry)); + exit(0); +} Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c Sat Jul 14 20:14:03 2012 (r238456) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c Sat Jul 14 20:24:00 2012 (r238457) @@ -22,7 +22,7 @@ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2011, Joyent Inc. All rights reserved. */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -725,12 +725,19 @@ dt_node_type_name(const dt_node_t *dnp, size_t dt_node_type_size(const dt_node_t *dnp) { + ctf_id_t base; + if (dnp->dn_kind == DT_NODE_STRING) return (strlen(dnp->dn_string) + 1); if (dt_node_is_dynamic(dnp) && dnp->dn_ident != NULL) return (dt_ident_size(dnp->dn_ident)); + base = ctf_type_resolve(dnp->dn_ctfp, dnp->dn_type); + + if (ctf_type_kind(dnp->dn_ctfp, base) == CTF_K_FORWARD) + return (0); + return (ctf_type_size(dnp->dn_ctfp, dnp->dn_type)); } From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 21:25:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DA6591065672; Sat, 14 Jul 2012 21:25:14 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C59F98FC12; Sat, 14 Jul 2012 21:25:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6ELPE1A008268; Sat, 14 Jul 2012 21:25:14 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6ELPE4Q008266; Sat, 14 Jul 2012 21:25:14 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207142125.q6ELPE4Q008266@svn.freebsd.org> From: Michael Tuexen Date: Sat, 14 Jul 2012 21:25:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238458 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 21:25:15 -0000 Author: tuexen Date: Sat Jul 14 21:25:14 2012 New Revision: 238458 URL: http://svn.freebsd.org/changeset/base/238458 Log: Provide the correct notification type (SCTP_SEND_FAILED_EVENT) for unsent messages. MFC after: 3 days Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sat Jul 14 20:24:00 2012 (r238457) +++ head/sys/netinet/sctputil.c Sat Jul 14 21:25:14 2012 (r238458) @@ -2951,7 +2951,7 @@ sctp_notify_send_failed2(struct sctp_tcb SCTP_BUF_LEN(m_notify) = 0; if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT)) { ssfe = mtod(m_notify, struct sctp_send_failed_event *); - ssfe->ssfe_type = SCTP_SEND_FAILED; + ssfe->ssfe_type = SCTP_SEND_FAILED_EVENT; ssfe->ssfe_flags = SCTP_DATA_UNSENT; ssfe->ssfe_length = length; ssfe->ssfe_error = error;