From owner-svn-src-all@freebsd.org Sun Jan 31 02:23:32 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25CA0A74B22; Sun, 31 Jan 2016 02:23:32 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB342102B; Sun, 31 Jan 2016 02:23:31 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0V2NUDH065440; Sun, 31 Jan 2016 02:23:30 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0V2NUcp065439; Sun, 31 Jan 2016 02:23:30 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201601310223.u0V2NUcp065439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 31 Jan 2016 02:23:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295088 - stable/10/sys/dev/ixl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 02:23:32 -0000 Author: smh Date: Sun Jan 31 02:23:30 2016 New Revision: 295088 URL: https://svnweb.freebsd.org/changeset/base/295088 Log: MFC r295051: Fix phy interrupts setup for ixl Approved by: re (gjb) Sponsored by: Multiplay Modified: stable/10/sys/dev/ixl/if_ixl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ixl/if_ixl.c ============================================================================== --- stable/10/sys/dev/ixl/if_ixl.c Sat Jan 30 22:48:06 2016 (r295087) +++ stable/10/sys/dev/ixl/if_ixl.c Sun Jan 31 02:23:30 2016 (r295088) @@ -673,9 +673,9 @@ ixl_attach(device_t dev) } /* Limit phy interrupts to link and modules failure */ - error = i40e_aq_set_phy_int_mask(hw, - I40E_AQ_EVENT_LINK_UPDOWN | I40E_AQ_EVENT_MODULE_QUAL_FAIL, NULL); - if (error) + error = i40e_aq_set_phy_int_mask(hw, ~(I40E_AQ_EVENT_LINK_UPDOWN | + I40E_AQ_EVENT_MODULE_QUAL_FAIL), NULL); + if (error) device_printf(dev, "set phy mask failed: %d\n", error); /* Get the bus configuration and set the shared code */ From owner-svn-src-all@freebsd.org Sun Jan 31 08:06:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE52CA74E86; Sun, 31 Jan 2016 08:06:23 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5CE61474; Sun, 31 Jan 2016 08:06:23 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0V86MUY064526; Sun, 31 Jan 2016 08:06:22 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0V86MbU064524; Sun, 31 Jan 2016 08:06:22 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201601310806.u0V86MbU064524@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sun, 31 Jan 2016 08:06:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295089 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 08:06:24 -0000 Author: mmel Date: Sun Jan 31 08:06:22 2016 New Revision: 295089 URL: https://svnweb.freebsd.org/changeset/base/295089 Log: ARM: Next round of cleanup in swtch-v*.S. - remove now useless #if __ARM_ARCH conditional - use macro for accessing CP15 registers - remove unused PCPU_SIZE Pointed by: kib Modified: head/sys/arm/arm/swtch-v4.S head/sys/arm/arm/swtch-v6.S Modified: head/sys/arm/arm/swtch-v4.S ============================================================================== --- head/sys/arm/arm/swtch-v4.S Sun Jan 31 02:23:30 2016 (r295088) +++ head/sys/arm/arm/swtch-v4.S Sun Jan 31 08:06:22 2016 (r295089) @@ -99,7 +99,6 @@ __FBSDID("$FreeBSD$"); .Lcurpcpu: .word _C_LABEL(__pcpu) - .word PCPU_SIZE .Lblocked_lock: .word _C_LABEL(blocked_lock) Modified: head/sys/arm/arm/swtch-v6.S ============================================================================== --- head/sys/arm/arm/swtch-v6.S Sun Jan 31 02:23:30 2016 (r295088) +++ head/sys/arm/arm/swtch-v6.S Sun Jan 31 08:06:22 2016 (r295089) @@ -85,13 +85,14 @@ #include #include #include +#include #include __FBSDID("$FreeBSD$"); -#if __ARM_ARCH >= 6 && defined(SMP) +#if defined(SMP) #define GET_PCPU(tmp, tmp2) \ - mrc p15, 0, tmp, c0, c0, 5; \ + mrc CP15_MPIDR(tmp); \ and tmp, tmp, #0xf; \ ldr tmp2, .Lcurpcpu+4; \ mul tmp, tmp, tmp2; \ @@ -113,9 +114,6 @@ __FBSDID("$FreeBSD$"); .Lblocked_lock: .word _C_LABEL(blocked_lock) - -#include - ENTRY(cpu_context_switch) /* QQQ: What about macro instead of function? */ DSB mcr CP15_TTBR0(r0) /* set the new TTB */ From owner-svn-src-all@freebsd.org Sun Jan 31 08:53:55 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32A03A74031; Sun, 31 Jan 2016 08:53:55 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E430913A9; Sun, 31 Jan 2016 08:53:54 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0V8rrJs080177; Sun, 31 Jan 2016 08:53:53 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0V8rrHI080175; Sun, 31 Jan 2016 08:53:53 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201601310853.u0V8rrHI080175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sun, 31 Jan 2016 08:53:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295090 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 08:53:55 -0000 Author: mmel Date: Sun Jan 31 08:53:53 2016 New Revision: 295090 URL: https://svnweb.freebsd.org/changeset/base/295090 Log: ARM: Convert spaces to tabs, fix formatting. Not a functional change. Modified: head/sys/arm/arm/swtch-v4.S head/sys/arm/arm/swtch-v6.S Modified: head/sys/arm/arm/swtch-v4.S ============================================================================== --- head/sys/arm/arm/swtch-v4.S Sun Jan 31 08:06:22 2016 (r295089) +++ head/sys/arm/arm/swtch-v4.S Sun Jan 31 08:53:53 2016 (r295090) @@ -98,7 +98,7 @@ __FBSDID("$FreeBSD$"); #endif .Lcurpcpu: - .word _C_LABEL(__pcpu) + .word _C_LABEL(__pcpu) .Lblocked_lock: .word _C_LABEL(blocked_lock) @@ -129,7 +129,7 @@ ENTRY(cpu_throw) #endif GET_PCPU(r7, r9) - ldr r7, [r5, #(TD_PCB)] /* r7 = new thread's PCB */ + ldr r7, [r5, #(TD_PCB)] /* r7 = new thread's PCB */ /* Switch to lwp0 context */ @@ -275,25 +275,25 @@ ENTRY(cpu_switch) /* rem: r2 = old PCB */ /* rem: r9 = new PCB */ - ldr r5, [r9, #(PCB_DACR)] /* r5 = new DACR */ + ldr r5, [r9, #(PCB_DACR)] /* r5 = new DACR */ mov r2, #DOMAIN_CLIENT - cmp r5, r2, lsl #(PMAP_DOMAIN_KERNEL * 2) /* Sw to kernel thread? */ - beq .Lcs_context_switched /* Yup. Don't flush cache */ - mrc p15, 0, r0, c3, c0, 0 /* r0 = old DACR */ + cmp r5, r2, lsl #(PMAP_DOMAIN_KERNEL * 2) /* Sw to kernel thread? */ + beq .Lcs_context_switched /* Yup. Don't flush cache */ + mrc p15, 0, r0, c3, c0, 0 /* r0 = old DACR */ /* - * Get the new L1 table pointer into r11. If we're switching to + * Get the new L1 table pointer into r11. If we're switching to * an LWP with the same address space as the outgoing one, we can * skip the cache purge and the TTB load. * * To avoid data dep stalls that would happen anyway, we try * and get some useful work done in the mean time. */ - mrc p15, 0, r10, c2, c0, 0 /* r10 = old L1 */ - ldr r11, [r9, #(PCB_PAGEDIR)] /* r11 = new L1 */ + mrc p15, 0, r10, c2, c0, 0 /* r10 = old L1 */ + ldr r11, [r9, #(PCB_PAGEDIR)] /* r11 = new L1 */ - teq r10, r11 /* Same L1? */ - cmpeq r0, r5 /* Same DACR? */ - beq .Lcs_context_switched /* yes! */ + teq r10, r11 /* Same L1? */ + cmpeq r0, r5 /* Same DACR? */ + beq .Lcs_context_switched /* yes! */ /* * Definately need to flush the cache. @@ -375,6 +375,3 @@ ENTRY(cpu_switch) add r3, r9, #PCB_R4 ldmia r3, {r4-r12, sp, pc} END(cpu_switch) - - - Modified: head/sys/arm/arm/swtch-v6.S ============================================================================== --- head/sys/arm/arm/swtch-v6.S Sun Jan 31 08:06:22 2016 (r295089) +++ head/sys/arm/arm/swtch-v6.S Sun Jan 31 08:53:53 2016 (r295090) @@ -109,7 +109,7 @@ __FBSDID("$FreeBSD$"); #endif .Lcurpcpu: - .word _C_LABEL(__pcpu) + .word _C_LABEL(__pcpu) .word PCPU_SIZE .Lblocked_lock: .word _C_LABEL(blocked_lock) @@ -134,7 +134,7 @@ ENTRY(cpu_context_switch) /* QQQ: What a * it's the only place where standalone predictor flush must be * executed in kernel (except self modifying code case). */ - mcr CP15_BPIALL /* and flush entire Branch Target Cache */ + mcr CP15_BPIALL /* flush entire Branch Target Cache */ DSB mov pc, lr END(cpu_context_switch) @@ -155,9 +155,9 @@ ENTRY(cpu_throw) bl _C_LABEL(vfp_discard) /* VFP without preserving state. */ #endif GET_PCPU(r8, r9) /* r8 = current pcpu */ - ldr r4, [r8, #PC_CPUID] /* r4 = current cpu id */ + ldr r4, [r8, #PC_CPUID] /* r4 = current cpu id */ - cmp r10, #0 /* old thread? */ + cmp r10, #0 /* old thread? */ beq 2f /* no, skip */ /* Remove this CPU from the active list. */ @@ -206,7 +206,7 @@ ENTRY(cpu_throw) */ /* MMU switch to new thread. */ - ldr r0, [r7, #(PCB_PAGEDIR)] + ldr r0, [r7, #(PCB_PAGEDIR)] #ifdef INVARIANTS cmp r0, #0 /* new thread? */ beq badsw4 /* no, panic */ @@ -290,11 +290,11 @@ ENTRY(cpu_switch) * it is time to restore them for the new thread. However, * some registers are not safe over function call. */ - mov r9, r2 /* r9 = lock */ + mov r9, r2 /* r9 = lock */ mov r10, r0 /* r10 = oldtd */ mov r11, r1 /* r11 = newtd */ - GET_PCPU(r8, r3) /* r8 = current PCPU */ + GET_PCPU(r8, r3) /* r8 = current PCPU */ ldr r7, [r11, #(TD_PCB)] /* r7 = newtd->td_pcb */ @@ -341,8 +341,8 @@ ENTRY(cpu_switch) ldr r6, [r6, #P_VMSPACE] /* newtd->proc->vmspace */ add r6, #VM_PMAP /* newtd->proc->vmspace->pmap */ - ldr r5, [r8, #PC_CURPMAP] /* get old curpmap */ - str r6, [r8, #PC_CURPMAP] /* and save new one */ + ldr r5, [r8, #PC_CURPMAP] /* get old curpmap */ + str r6, [r8, #PC_CURPMAP] /* and save new one */ mov r0, #PM_ACTIVE add r5, r0 /* r5 = old pm_active */ @@ -376,7 +376,7 @@ ENTRY(cpu_switch) #endif /* Set cpu to new active list. */ #ifdef SMP -1: ldrex r0, [r6] +1: ldrex r0, [r6] orr r0, r2 strex r1, r0, [r6] teq r1, #0 @@ -427,7 +427,7 @@ sw1: beq 1b #endif /* Set the new tls */ - ldr r0, [r11, #(TD_MD + MD_TP)] + ldr r0, [r11, #(TD_MD + MD_TP)] mcr CP15_TPIDRURO(r0) /* write tls thread reg 2 */ /* We have a new curthread now so make a note it */ @@ -450,7 +450,7 @@ badsw1: ldr r0, =sw1_panic_str bl _C_LABEL(panic) 1: nop - b 1b + b 1b badsw2: ldr r0, =sw2_panic_str From owner-svn-src-all@freebsd.org Sun Jan 31 09:16:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76CD1A74846; Sun, 31 Jan 2016 09:16:21 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 440EB1F1D; Sun, 31 Jan 2016 09:16:21 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0V9GKAR086383; Sun, 31 Jan 2016 09:16:20 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0V9GKIZ086382; Sun, 31 Jan 2016 09:16:20 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201601310916.u0V9GKIZ086382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sun, 31 Jan 2016 09:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295091 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 09:16:21 -0000 Author: mmel Date: Sun Jan 31 09:16:20 2016 New Revision: 295091 URL: https://svnweb.freebsd.org/changeset/base/295091 Log: ARM: Rename ARM specific VM_MEMATTR_WT memory attribute to standard one. Modified: head/sys/arm/include/vm.h Modified: head/sys/arm/include/vm.h ============================================================================== --- head/sys/arm/include/vm.h Sun Jan 31 08:53:53 2016 (r295090) +++ head/sys/arm/include/vm.h Sun Jan 31 09:16:20 2016 (r295091) @@ -38,13 +38,13 @@ #define VM_MEMATTR_NOCACHE ((vm_memattr_t)PTE2_ATTR_NOCACHE) #define VM_MEMATTR_DEVICE ((vm_memattr_t)PTE2_ATTR_DEVICE) #define VM_MEMATTR_SO ((vm_memattr_t)PTE2_ATTR_SO) -#define VM_MEMATTR_WT ((vm_memattr_t)PTE2_ATTR_WT) +#define VM_MEMATTR_WRITE_THROUGH ((vm_memattr_t)PTE2_ATTR_WT) #define VM_MEMATTR_DEFAULT VM_MEMATTR_WB_WA #define VM_MEMATTR_UNCACHEABLE VM_MEMATTR_SO /* misused by DMA */ #ifdef _KERNEL /* Don't export aliased VM_MEMATTR to userland */ -#define VM_MEMATTR_WRITE_COMBINING VM_MEMATTR_WT /* for DRM */ +#define VM_MEMATTR_WRITE_COMBINING VM_MEMATTR_WRITE_THROUGH /* for DRM */ #define VM_MEMATTR_WRITE_BACK VM_MEMATTR_WB_WA /* for DRM */ #endif #else From owner-svn-src-all@freebsd.org Sun Jan 31 13:59:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07632A73524; Sun, 31 Jan 2016 13:59:18 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BABC510E0; Sun, 31 Jan 2016 13:59:17 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0VDxGt1071595; Sun, 31 Jan 2016 13:59:16 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0VDxGgC071593; Sun, 31 Jan 2016 13:59:16 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201601311359.u0VDxGgC071593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sun, 31 Jan 2016 13:59:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295092 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 13:59:18 -0000 Author: mmel Date: Sun Jan 31 13:59:16 2016 New Revision: 295092 URL: https://svnweb.freebsd.org/changeset/base/295092 Log: ARM: First round of cpufunc.* cleaning. All abort_fixup functions are not currently used or defined. Delete them. Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/include/cpufunc.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Sun Jan 31 09:16:20 2016 (r295091) +++ head/sys/arm/arm/cpufunc.c Sun Jan 31 13:59:16 2016 (r295092) @@ -155,9 +155,6 @@ struct cpu_functions arm9_cpufuncs = { /* Soft functions */ - cpufunc_null_fixup, /* dataabt_fixup */ - cpufunc_null_fixup, /* prefetchabt_fixup */ - arm9_context_switch, /* context_switch */ arm9_setup /* cpu setup */ @@ -220,9 +217,6 @@ struct cpu_functions armv5_ec_cpufuncs = /* Soft functions */ - cpufunc_null_fixup, /* dataabt_fixup */ - cpufunc_null_fixup, /* prefetchabt_fixup */ - arm10_context_switch, /* context_switch */ arm10_setup /* cpu setup */ @@ -283,9 +277,6 @@ struct cpu_functions sheeva_cpufuncs = { /* Soft functions */ - cpufunc_null_fixup, /* dataabt_fixup */ - cpufunc_null_fixup, /* prefetchabt_fixup */ - arm10_context_switch, /* context_switch */ arm10_setup /* cpu setup */ @@ -345,10 +336,6 @@ struct cpu_functions pj4bv7_cpufuncs = { (void *)cpufunc_nullop, /* sleep */ /* Soft functions */ - - cpufunc_null_fixup, /* dataabt_fixup */ - cpufunc_null_fixup, /* prefetchabt_fixup */ - armv7_context_switch, /* context_switch */ pj4bv7_setup /* cpu setup */ @@ -412,9 +399,6 @@ struct cpu_functions xscale_cpufuncs = { /* Soft functions */ - cpufunc_null_fixup, /* dataabt_fixup */ - cpufunc_null_fixup, /* prefetchabt_fixup */ - xscale_context_switch, /* context_switch */ xscale_setup /* cpu setup */ @@ -477,9 +461,6 @@ struct cpu_functions xscalec3_cpufuncs = /* Soft functions */ - cpufunc_null_fixup, /* dataabt_fixup */ - cpufunc_null_fixup, /* prefetchabt_fixup */ - xscalec3_context_switch, /* context_switch */ xscale_setup /* cpu setup */ @@ -541,8 +522,6 @@ struct cpu_functions fa526_cpufuncs = { /* Soft functions */ - cpufunc_null_fixup, /* dataabt_fixup */ - cpufunc_null_fixup, /* prefetchabt_fixup */ fa526_context_switch, /* context_switch */ @@ -605,9 +584,6 @@ struct cpu_functions arm1176_cpufuncs = /* Soft functions */ - cpufunc_null_fixup, /* dataabt_fixup */ - cpufunc_null_fixup, /* prefetchabt_fixup */ - arm11_context_switch, /* context_switch */ arm11x6_setup /* cpu setup */ @@ -677,9 +653,6 @@ struct cpu_functions cortexa_cpufuncs = /* Soft functions */ - cpufunc_null_fixup, /* dataabt_fixup */ - cpufunc_null_fixup, /* prefetchabt_fixup */ - armv7_context_switch, /* context_switch */ cortexa_setup /* cpu setup */ @@ -995,27 +968,6 @@ out: } /* - * Fixup routines for data and prefetch aborts. - * - * Several compile time symbols are used - * - * DEBUG_FAULT_CORRECTION - Print debugging information during the - * correction of registers after a fault. - */ - - -/* - * Null abort fixup routine. - * For use when no fixup is required. - */ -int -cpufunc_null_fixup(arg) - void *arg; -{ - return(ABORT_FIXUP_OK); -} - -/* * CPU Setup code */ Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Sun Jan 31 09:16:20 2016 (r295091) +++ head/sys/arm/include/cpufunc.h Sun Jan 31 13:59:16 2016 (r295092) @@ -164,9 +164,6 @@ struct cpu_functions { /* Soft functions */ - int (*cf_dataabt_fixup) (void *arg); - int (*cf_prefetchabt_fixup) (void *arg); - void (*cf_context_switch) (void); void (*cf_setup) (void); @@ -215,12 +212,6 @@ extern u_int cputype; #define cpu_sleep(m) cpufuncs.cf_sleep(m) -#define cpu_dataabt_fixup(a) cpufuncs.cf_dataabt_fixup(a) -#define cpu_prefetchabt_fixup(a) cpufuncs.cf_prefetchabt_fixup(a) -#define ABORT_FIXUP_OK 0 /* fixup succeeded */ -#define ABORT_FIXUP_FAILED 1 /* fixup failed */ -#define ABORT_FIXUP_RETURN 2 /* abort handler should return */ - #define cpu_setup() cpufuncs.cf_setup() int set_cpufuncs (void); @@ -228,9 +219,6 @@ int set_cpufuncs (void); #define ARCHITECTURE_NOT_SUPPORTED 2 /* not known */ void cpufunc_nullop (void); -int cpufunc_null_fixup (void *); -int early_abort_fixup (void *); -int late_abort_fixup (void *); u_int cpufunc_id (void); u_int cpufunc_cpuid (void); u_int cpufunc_control (u_int clear, u_int bic); From owner-svn-src-all@freebsd.org Sun Jan 31 15:14:25 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96E46A73AA8; Sun, 31 Jan 2016 15:14:25 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58CDC1ED7; Sun, 31 Jan 2016 15:14:25 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0VFEOEO095405; Sun, 31 Jan 2016 15:14:24 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0VFENiD095400; Sun, 31 Jan 2016 15:14:23 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201601311514.u0VFENiD095400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 31 Jan 2016 15:14:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295093 - head/sys/dev/ixgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 15:14:25 -0000 Author: smh Date: Sun Jan 31 15:14:23 2016 New Revision: 295093 URL: https://svnweb.freebsd.org/changeset/base/295093 Log: Configure ixgbe phy & gbic power Setup phy and gbic power as per Linux 4.3.13 driver. This fixes link not detected on X540-AT2 after booting to Linux which turns the phy power off on detach. Reviewed by: sbruno MFC after: 2 days Sponsored by: Multiplay Differential Revision: https://reviews.freebsd.org/D5107 Modified: head/sys/dev/ixgbe/if_ix.c head/sys/dev/ixgbe/ixgbe_phy.c head/sys/dev/ixgbe/ixgbe_type.h head/sys/dev/ixgbe/ixgbe_x540.c head/sys/dev/ixgbe/ixgbe_x550.c Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Sun Jan 31 13:59:16 2016 (r295092) +++ head/sys/dev/ixgbe/if_ix.c Sun Jan 31 15:14:23 2016 (r295093) @@ -592,6 +592,12 @@ ixgbe_attach(device_t dev) if (error) goto err_late; + /* Enable the optics for 82599 SFP+ fiber */ + ixgbe_enable_tx_laser(hw); + + /* Enable power to the phy. */ + ixgbe_set_phy_power(hw, TRUE); + /* Setup OS specific network interface */ if (ixgbe_setup_interface(dev, adapter) != 0) goto err_late; @@ -1260,6 +1266,9 @@ ixgbe_init_locked(struct adapter *adapte device_printf(dev, "Error setting up EEE: %d\n", err); } + /* Enable power to the phy. */ + ixgbe_set_phy_power(hw, TRUE); + /* Config/Enable Link */ ixgbe_config_link(adapter); @@ -3980,6 +3989,9 @@ ixgbe_setup_low_power_mode(struct adapte mtx_assert(&adapter->core_mtx, MA_OWNED); + if (!hw->wol_enabled) + ixgbe_set_phy_power(hw, FALSE); + /* Limit power management flow to X550EM baseT */ if (hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T && hw->phy.ops.enter_lplu) { Modified: head/sys/dev/ixgbe/ixgbe_phy.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe_phy.c Sun Jan 31 13:59:16 2016 (r295092) +++ head/sys/dev/ixgbe/ixgbe_phy.c Sun Jan 31 15:14:23 2016 (r295093) @@ -2734,6 +2734,9 @@ s32 ixgbe_set_copper_phy_power(struct ix u32 status; u16 reg; + if (!on && ixgbe_mng_present(hw)) + return 0; + status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_VENDOR_SPECIFIC_1_CONTROL, IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE, ®); Modified: head/sys/dev/ixgbe/ixgbe_type.h ============================================================================== --- head/sys/dev/ixgbe/ixgbe_type.h Sun Jan 31 13:59:16 2016 (r295092) +++ head/sys/dev/ixgbe/ixgbe_type.h Sun Jan 31 15:14:23 2016 (r295093) @@ -1479,7 +1479,10 @@ struct ixgbe_dmac_config { #define IXGBE_MDIO_GLOBAL_INT_CHIP_VEN_MASK 0xFF01 /* int chip-wide mask */ #define IXGBE_MDIO_GLOBAL_INT_CHIP_VEN_FLAG 0xFC01 /* int chip-wide mask */ #define IXGBE_MDIO_GLOBAL_ALARM_1 0xCC00 /* Global alarm 1 */ +#define IXGBE_MDIO_GLOBAL_ALM_1_DEV_FAULT 0x0010 /* device fault */ #define IXGBE_MDIO_GLOBAL_ALM_1_HI_TMP_FAIL 0x4000 /* high temp failure */ +#define IXGBE_MDIO_GLOBAL_FAULT_MSG 0xC850 /* Global Fault Message */ +#define IXGBE_MDIO_GLOBAL_FAULT_MSG_HI_TMP 0x8007 /* high temp failure */ #define IXGBE_MDIO_GLOBAL_INT_MASK 0xD400 /* Global int mask */ #define IXGBE_MDIO_GLOBAL_AN_VEN_ALM_INT_EN 0x1000 /* autoneg vendor alarm int enable */ #define IXGBE_MDIO_GLOBAL_ALARM_1_INT 0x4 /* int in Global alarm 1 */ Modified: head/sys/dev/ixgbe/ixgbe_x540.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe_x540.c Sun Jan 31 13:59:16 2016 (r295092) +++ head/sys/dev/ixgbe/ixgbe_x540.c Sun Jan 31 15:14:23 2016 (r295093) @@ -82,8 +82,7 @@ s32 ixgbe_init_ops_X540(struct ixgbe_hw /* PHY */ phy->ops.init = ixgbe_init_phy_ops_generic; phy->ops.reset = NULL; - if (!ixgbe_mng_present(hw)) - phy->ops.set_phy_power = ixgbe_set_copper_phy_power; + phy->ops.set_phy_power = ixgbe_set_copper_phy_power; /* MAC */ mac->ops.reset_hw = ixgbe_reset_hw_X540; Modified: head/sys/dev/ixgbe/ixgbe_x550.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe_x550.c Sun Jan 31 13:59:16 2016 (r295092) +++ head/sys/dev/ixgbe/ixgbe_x550.c Sun Jan 31 15:14:23 2016 (r295093) @@ -965,7 +965,7 @@ void ixgbe_restore_mdd_vf_X550(struct ix num_qs = 4; /* 32 VFs / pools */ bitmask = 0x0000000F; break; - default: /* 64 VFs / pools */ + default: /* 64 VFs / pools */ num_qs = 2; bitmask = 0x00000003; break; @@ -1264,7 +1264,7 @@ static s32 ixgbe_get_lasi_ext_t_x550em(s IXGBE_MDIO_GLOBAL_ALARM_1_INT))) return status; - /* High temperature failure alarm triggered */ + /* Global alarm triggered */ status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_GLOBAL_ALARM_1, IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE, ®); @@ -1277,6 +1277,21 @@ static s32 ixgbe_get_lasi_ext_t_x550em(s /* power down the PHY in case the PHY FW didn't already */ ixgbe_set_copper_phy_power(hw, FALSE); return IXGBE_ERR_OVERTEMP; + } else if (reg & IXGBE_MDIO_GLOBAL_ALM_1_DEV_FAULT) { + /* device fault alarm triggered */ + status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_GLOBAL_FAULT_MSG, + IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE, + ®); + + if (status != IXGBE_SUCCESS) + return status; + + /* if device fault was due to high temp alarm handle and exit */ + if (reg == IXGBE_MDIO_GLOBAL_FAULT_MSG_HI_TMP) { + /* power down the PHY in case the PHY FW didn't */ + ixgbe_set_copper_phy_power(hw, FALSE); + return IXGBE_ERR_OVERTEMP; + } } /* Vendor alarm 2 triggered */ From owner-svn-src-all@freebsd.org Sun Jan 31 15:18:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB0C3A73BA9; Sun, 31 Jan 2016 15:18:04 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B909EDD; Sun, 31 Jan 2016 15:18:04 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0VFI3wi095559; Sun, 31 Jan 2016 15:18:03 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0VFI3DV095558; Sun, 31 Jan 2016 15:18:03 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201601311518.u0VFI3DV095558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 31 Jan 2016 15:18:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295094 - head/sys/dev/ixgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 15:18:05 -0000 Author: smh Date: Sun Jan 31 15:18:03 2016 New Revision: 295094 URL: https://svnweb.freebsd.org/changeset/base/295094 Log: Fix ixgbe flow control autoneg reporting Fix ixgbe reporting of flow control autoneg when running under DBG 1 Reviewed by: erj MFC after: 2 days Sponsored by: Multiplay Differential Revision: https://reviews.freebsd.org/D5089 Modified: head/sys/dev/ixgbe/ixgbe_common.c Modified: head/sys/dev/ixgbe/ixgbe_common.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe_common.c Sun Jan 31 15:14:23 2016 (r295093) +++ head/sys/dev/ixgbe/ixgbe_common.c Sun Jan 31 15:18:03 2016 (r295094) @@ -199,9 +199,12 @@ bool ixgbe_device_supports_autoneg_fc(st break; } - ERROR_REPORT2(IXGBE_ERROR_UNSUPPORTED, + if (!supported) { + ERROR_REPORT2(IXGBE_ERROR_UNSUPPORTED, "Device %x does not support flow control autoneg", hw->device_id); + } + return supported; } From owner-svn-src-all@freebsd.org Sun Jan 31 15:36:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A1FAA74318; Sun, 31 Jan 2016 15:36:15 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C38CDEC; Sun, 31 Jan 2016 15:36:15 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0VFaEqA001472; Sun, 31 Jan 2016 15:36:14 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0VFaEZT001469; Sun, 31 Jan 2016 15:36:14 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201601311536.u0VFaEZT001469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sun, 31 Jan 2016 15:36:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295095 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 15:36:15 -0000 Author: mmel Date: Sun Jan 31 15:36:13 2016 New Revision: 295095 URL: https://svnweb.freebsd.org/changeset/base/295095 Log: ARM: Next round of cpufunc.* cleaning. Nobody uses flush_brnchtgt* functions, delete them. Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/cpufunc_asm_fa526.S head/sys/arm/include/cpufunc.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Sun Jan 31 15:18:03 2016 (r295094) +++ head/sys/arm/arm/cpufunc.c Sun Jan 31 15:36:13 2016 (r295095) @@ -148,8 +148,6 @@ struct cpu_functions arm9_cpufuncs = { cpufunc_nullop, /* flush_prefetchbuf */ armv4_drain_writebuf, /* drain_writebuf */ - cpufunc_nullop, /* flush_brnchtgt_C */ - (void *)cpufunc_nullop, /* flush_brnchtgt_E */ (void *)cpufunc_nullop, /* sleep */ @@ -210,8 +208,6 @@ struct cpu_functions armv5_ec_cpufuncs = cpufunc_nullop, /* flush_prefetchbuf */ armv4_drain_writebuf, /* drain_writebuf */ - cpufunc_nullop, /* flush_brnchtgt_C */ - (void *)cpufunc_nullop, /* flush_brnchtgt_E */ (void *)cpufunc_nullop, /* sleep */ @@ -270,8 +266,6 @@ struct cpu_functions sheeva_cpufuncs = { cpufunc_nullop, /* flush_prefetchbuf */ armv4_drain_writebuf, /* drain_writebuf */ - cpufunc_nullop, /* flush_brnchtgt_C */ - (void *)cpufunc_nullop, /* flush_brnchtgt_E */ sheeva_cpu_sleep, /* sleep */ @@ -330,8 +324,6 @@ struct cpu_functions pj4bv7_cpufuncs = { cpufunc_nullop, /* flush_prefetchbuf */ armv7_drain_writebuf, /* drain_writebuf */ - cpufunc_nullop, /* flush_brnchtgt_C */ - (void *)cpufunc_nullop, /* flush_brnchtgt_E */ (void *)cpufunc_nullop, /* sleep */ @@ -392,8 +384,6 @@ struct cpu_functions xscale_cpufuncs = { cpufunc_nullop, /* flush_prefetchbuf */ armv4_drain_writebuf, /* drain_writebuf */ - cpufunc_nullop, /* flush_brnchtgt_C */ - (void *)cpufunc_nullop, /* flush_brnchtgt_E */ xscale_cpu_sleep, /* sleep */ @@ -454,8 +444,6 @@ struct cpu_functions xscalec3_cpufuncs = cpufunc_nullop, /* flush_prefetchbuf */ armv4_drain_writebuf, /* drain_writebuf */ - cpufunc_nullop, /* flush_brnchtgt_C */ - (void *)cpufunc_nullop, /* flush_brnchtgt_E */ xscale_cpu_sleep, /* sleep */ @@ -515,8 +503,6 @@ struct cpu_functions fa526_cpufuncs = { fa526_flush_prefetchbuf, /* flush_prefetchbuf */ armv4_drain_writebuf, /* drain_writebuf */ - cpufunc_nullop, /* flush_brnchtgt_C */ - fa526_flush_brnchtgt_E, /* flush_brnchtgt_E */ fa526_cpu_sleep, /* sleep */ @@ -577,8 +563,6 @@ struct cpu_functions arm1176_cpufuncs = arm11x6_flush_prefetchbuf, /* flush_prefetchbuf */ arm11_drain_writebuf, /* drain_writebuf */ - cpufunc_nullop, /* flush_brnchtgt_C */ - (void *)cpufunc_nullop, /* flush_brnchtgt_E */ arm11x6_sleep, /* sleep */ @@ -646,8 +630,6 @@ struct cpu_functions cortexa_cpufuncs = cpufunc_nullop, /* flush_prefetchbuf */ armv7_drain_writebuf, /* drain_writebuf */ - cpufunc_nullop, /* flush_brnchtgt_C */ - (void *)cpufunc_nullop, /* flush_brnchtgt_E */ armv7_cpu_sleep, /* sleep */ Modified: head/sys/arm/arm/cpufunc_asm_fa526.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_fa526.S Sun Jan 31 15:18:03 2016 (r295094) +++ head/sys/arm/arm/cpufunc_asm_fa526.S Sun Jan 31 15:36:13 2016 (r295095) @@ -200,12 +200,6 @@ ENTRY(fa526_icache_sync_range) mov pc, lr END(fa526_icache_sync_range) -ENTRY(fa526_flush_brnchtgt_E) - mov r0, #0 - mcr p15, 0, r0, c7, c5, 6 /* invalidate BTB cache */ - mov pc, lr -END(fa526_flush_brnchtgt_E) - ENTRY(fa526_context_switch) /* * CF_CACHE_PURGE_ID will *ALWAYS* be called prior to this. Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Sun Jan 31 15:18:03 2016 (r295094) +++ head/sys/arm/include/cpufunc.h Sun Jan 31 15:36:13 2016 (r295095) @@ -157,8 +157,6 @@ struct cpu_functions { void (*cf_flush_prefetchbuf) (void); void (*cf_drain_writebuf) (void); - void (*cf_flush_brnchtgt_C) (void); - void (*cf_flush_brnchtgt_E) (u_int va); void (*cf_sleep) (int mode); @@ -207,9 +205,6 @@ extern u_int cputype; #define cpu_flush_prefetchbuf() cpufuncs.cf_flush_prefetchbuf() #define cpu_drain_writebuf() cpufuncs.cf_drain_writebuf() -#define cpu_flush_brnchtgt_C() cpufuncs.cf_flush_brnchtgt_C() -#define cpu_flush_brnchtgt_E(e) cpufuncs.cf_flush_brnchtgt_E(e) - #define cpu_sleep(m) cpufuncs.cf_sleep(m) #define cpu_setup() cpufuncs.cf_setup() @@ -235,7 +230,6 @@ void fa526_cpu_sleep (int); void fa526_tlb_flushI_SE (u_int); void fa526_tlb_flushID_SE (u_int); void fa526_flush_prefetchbuf (void); -void fa526_flush_brnchtgt_E (u_int); void fa526_icache_sync_all (void); void fa526_icache_sync_range(vm_offset_t start, vm_size_t end); From owner-svn-src-all@freebsd.org Sun Jan 31 16:34:07 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5B59A7368B; Sun, 31 Jan 2016 16:34:07 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63EFDB43; Sun, 31 Jan 2016 16:34:07 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0VGY6fH018971; Sun, 31 Jan 2016 16:34:06 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0VGY6JG018968; Sun, 31 Jan 2016 16:34:06 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201601311634.u0VGY6JG018968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sun, 31 Jan 2016 16:34:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295096 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 16:34:07 -0000 Author: mmel Date: Sun Jan 31 16:34:06 2016 New Revision: 295096 URL: https://svnweb.freebsd.org/changeset/base/295096 Log: ARM: cpufunc_domains, cpufunc_faultstatus and cpufunc_faultaddress functions are equal for all ARM variants. Remove them from cpu_functions table. Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/cpufunc_asm.S head/sys/arm/include/cpufunc.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Sun Jan 31 15:36:13 2016 (r295095) +++ head/sys/arm/arm/cpufunc.c Sun Jan 31 16:34:06 2016 (r295096) @@ -105,16 +105,12 @@ int ctrl; struct cpu_functions arm9_cpufuncs = { /* CPU functions */ - cpufunc_id, /* id */ cpufunc_nullop, /* cpwait */ /* MMU functions */ cpufunc_control, /* control */ - cpufunc_domains, /* Domain */ arm9_setttb, /* Setttb */ - cpufunc_faultstatus, /* Faultstatus */ - cpufunc_faultaddress, /* Faultaddress */ /* TLB functions */ @@ -164,16 +160,12 @@ struct cpu_functions arm9_cpufuncs = { struct cpu_functions armv5_ec_cpufuncs = { /* CPU functions */ - cpufunc_id, /* id */ cpufunc_nullop, /* cpwait */ /* MMU functions */ cpufunc_control, /* control */ - cpufunc_domains, /* Domain */ armv5_ec_setttb, /* Setttb */ - cpufunc_faultstatus, /* Faultstatus */ - cpufunc_faultaddress, /* Faultaddress */ /* TLB functions */ @@ -222,16 +214,12 @@ struct cpu_functions armv5_ec_cpufuncs = struct cpu_functions sheeva_cpufuncs = { /* CPU functions */ - cpufunc_id, /* id */ cpufunc_nullop, /* cpwait */ /* MMU functions */ cpufunc_control, /* control */ - cpufunc_domains, /* Domain */ sheeva_setttb, /* Setttb */ - cpufunc_faultstatus, /* Faultstatus */ - cpufunc_faultaddress, /* Faultaddress */ /* TLB functions */ @@ -281,16 +269,12 @@ struct cpu_functions sheeva_cpufuncs = { struct cpu_functions pj4bv7_cpufuncs = { /* CPU functions */ - cpufunc_id, /* id */ armv7_drain_writebuf, /* cpwait */ /* MMU functions */ cpufunc_control, /* control */ - cpufunc_domains, /* Domain */ armv7_setttb, /* Setttb */ - cpufunc_faultstatus, /* Faultstatus */ - cpufunc_faultaddress, /* Faultaddress */ /* TLB functions */ @@ -341,16 +325,12 @@ struct cpu_functions pj4bv7_cpufuncs = { struct cpu_functions xscale_cpufuncs = { /* CPU functions */ - cpufunc_id, /* id */ xscale_cpwait, /* cpwait */ /* MMU functions */ xscale_control, /* control */ - cpufunc_domains, /* domain */ xscale_setttb, /* setttb */ - cpufunc_faultstatus, /* faultstatus */ - cpufunc_faultaddress, /* faultaddress */ /* TLB functions */ @@ -401,16 +381,12 @@ struct cpu_functions xscale_cpufuncs = { struct cpu_functions xscalec3_cpufuncs = { /* CPU functions */ - cpufunc_id, /* id */ xscale_cpwait, /* cpwait */ /* MMU functions */ xscale_control, /* control */ - cpufunc_domains, /* domain */ xscalec3_setttb, /* setttb */ - cpufunc_faultstatus, /* faultstatus */ - cpufunc_faultaddress, /* faultaddress */ /* TLB functions */ @@ -460,16 +436,12 @@ struct cpu_functions xscalec3_cpufuncs = struct cpu_functions fa526_cpufuncs = { /* CPU functions */ - cpufunc_id, /* id */ cpufunc_nullop, /* cpwait */ /* MMU functions */ cpufunc_control, /* control */ - cpufunc_domains, /* domain */ fa526_setttb, /* setttb */ - cpufunc_faultstatus, /* faultstatus */ - cpufunc_faultaddress, /* faultaddress */ /* TLB functions */ @@ -519,16 +491,12 @@ struct cpu_functions fa526_cpufuncs = { struct cpu_functions arm1176_cpufuncs = { /* CPU functions */ - cpufunc_id, /* id */ cpufunc_nullop, /* cpwait */ /* MMU functions */ cpufunc_control, /* control */ - cpufunc_domains, /* Domain */ arm11x6_setttb, /* Setttb */ - cpufunc_faultstatus, /* Faultstatus */ - cpufunc_faultaddress, /* Faultaddress */ /* TLB functions */ @@ -578,16 +546,12 @@ struct cpu_functions arm1176_cpufuncs = struct cpu_functions cortexa_cpufuncs = { /* CPU functions */ - cpufunc_id, /* id */ cpufunc_nullop, /* cpwait */ /* MMU functions */ cpufunc_control, /* control */ - cpufunc_domains, /* Domain */ armv7_setttb, /* Setttb */ - cpufunc_faultstatus, /* Faultstatus */ - cpufunc_faultaddress, /* Faultaddress */ /* * TLB functions. ARMv7 does all TLB ops based on a unified TLB model @@ -681,7 +645,7 @@ get_cachetype_cp15() __asm __volatile("mrc p15, 0, %0, c0, c0, 1" : "=r" (ctype)); - cpuid = cpufunc_id(); + cpuid = cpu_ident(); /* * ...and thus spake the ARM ARM: * @@ -788,7 +752,7 @@ get_cachetype_cp15() int set_cpufuncs() { - cputype = cpufunc_id(); + cputype = cpu_ident(); cputype &= CPU_ID_CPU_MASK; #ifdef CPU_ARM9 @@ -1074,7 +1038,7 @@ arm11x6_setup(void) uint32_t sbz=0; uint32_t cpuid; - cpuid = cpufunc_id(); + cpuid = cpu_ident(); cpuctrl = CPU_CONTROL_MMU_ENABLE | Modified: head/sys/arm/arm/cpufunc_asm.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm.S Sun Jan 31 15:36:13 2016 (r295095) +++ head/sys/arm/arm/cpufunc_asm.S Sun Jan 31 16:34:06 2016 (r295096) @@ -62,16 +62,11 @@ END(cpufunc_nullop) * */ -ENTRY(cpufunc_id) +ENTRY(cpu_ident) mrc p15, 0, r0, c0, c0, 0 RET END(cpufunc_id) -ENTRY(cpufunc_cpuid) - mrc p15, 0, r0, c0, c0, 0 - RET -END(cpufunc_cpuid) - ENTRY(cpu_get_control) mrc p15, 0, r0, c1, c0, 0 RET @@ -82,15 +77,15 @@ ENTRY(cpu_read_cache_config) RET END(cpu_read_cache_config) -ENTRY(cpufunc_faultstatus) +ENTRY(cpu_faultstatus) mrc p15, 0, r0, c5, c0, 0 RET -END(cpufunc_faultstatus) +END(cpu_faultstatus) -ENTRY(cpufunc_faultaddress) +ENTRY(cpu_faultaddress) mrc p15, 0, r0, c6, c0, 0 RET -END(cpufunc_faultaddress) +END(cpu_faultaddress) /* * Generic functions to write the internal coprocessor registers @@ -110,10 +105,10 @@ ENTRY(cpufunc_control) END(cpufunc_control) #endif -ENTRY(cpufunc_domains) +ENTRY(cpu_domains) mcr p15, 0, r0, c3, c0, 0 RET -END(cpufunc_domains) +END(cpu_domains) /* * Generic functions to read/modify/write the internal coprocessor registers Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Sun Jan 31 15:36:13 2016 (r295095) +++ head/sys/arm/include/cpufunc.h Sun Jan 31 16:34:06 2016 (r295096) @@ -60,16 +60,12 @@ struct cpu_functions { /* CPU functions */ - u_int (*cf_id) (void); void (*cf_cpwait) (void); /* MMU functions */ u_int (*cf_control) (u_int bic, u_int eor); - void (*cf_domains) (u_int domains); void (*cf_setttb) (u_int ttb); - u_int (*cf_faultstatus) (void); - u_int (*cf_faultaddress) (void); /* TLB functions */ @@ -170,14 +166,10 @@ struct cpu_functions { extern struct cpu_functions cpufuncs; extern u_int cputype; -#define cpu_ident() cpufuncs.cf_id() #define cpu_cpwait() cpufuncs.cf_cpwait() #define cpu_control(c, e) cpufuncs.cf_control(c, e) -#define cpu_domains(d) cpufuncs.cf_domains(d) #define cpu_setttb(t) cpufuncs.cf_setttb(t) -#define cpu_faultstatus() cpufuncs.cf_faultstatus() -#define cpu_faultaddress() cpufuncs.cf_faultaddress() #define cpu_tlb_flushID() cpufuncs.cf_tlb_flushID() #define cpu_tlb_flushID_SE(e) cpufuncs.cf_tlb_flushID_SE(e) @@ -214,12 +206,11 @@ int set_cpufuncs (void); #define ARCHITECTURE_NOT_SUPPORTED 2 /* not known */ void cpufunc_nullop (void); -u_int cpufunc_id (void); -u_int cpufunc_cpuid (void); +u_int cpu_ident (void); u_int cpufunc_control (u_int clear, u_int bic); -void cpufunc_domains (u_int domains); -u_int cpufunc_faultstatus (void); -u_int cpufunc_faultaddress (void); +void cpu_domains (u_int domains); +u_int cpu_faultstatus (void); +u_int cpu_faultaddress (void); u_int cpu_pfr (int); #if defined(CPU_FA526) From owner-svn-src-all@freebsd.org Sun Jan 31 16:55:54 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D9EEA73D17; Sun, 31 Jan 2016 16:55:54 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 104831234; Sun, 31 Jan 2016 16:55:53 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0VGtr1A024734; Sun, 31 Jan 2016 16:55:53 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0VGtrYf024733; Sun, 31 Jan 2016 16:55:53 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201601311655.u0VGtrYf024733@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sun, 31 Jan 2016 16:55:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295097 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 16:55:54 -0000 Author: mmel Date: Sun Jan 31 16:55:52 2016 New Revision: 295097 URL: https://svnweb.freebsd.org/changeset/base/295097 Log: ARM: Fix END() symbol for cpu_ident function. I forgot to rename it in r295096. Modified: head/sys/arm/arm/cpufunc_asm.S Modified: head/sys/arm/arm/cpufunc_asm.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm.S Sun Jan 31 16:34:06 2016 (r295096) +++ head/sys/arm/arm/cpufunc_asm.S Sun Jan 31 16:55:52 2016 (r295097) @@ -65,7 +65,7 @@ END(cpufunc_nullop) ENTRY(cpu_ident) mrc p15, 0, r0, c0, c0, 0 RET -END(cpufunc_id) +END(cpu_ident) ENTRY(cpu_get_control) mrc p15, 0, r0, c1, c0, 0 From owner-svn-src-all@freebsd.org Sun Jan 31 17:32:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BF34A74CEB; Sun, 31 Jan 2016 17:32:22 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1B9C812; Sun, 31 Jan 2016 17:32:21 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0VHWKU1036630; Sun, 31 Jan 2016 17:32:20 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0VHWKuN036629; Sun, 31 Jan 2016 17:32:20 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201601311732.u0VHWKuN036629@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 31 Jan 2016 17:32:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295098 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 17:32:22 -0000 Author: andrew Date: Sun Jan 31 17:32:20 2016 New Revision: 295098 URL: https://svnweb.freebsd.org/changeset/base/295098 Log: Fix the logic in the ddb command 'show ktr /a'. Prior to r118269 it would print until cncheckc returned a non -1, i.e. a character had been entered. After this change it would print only if cncheckc returned a character. As this was before each call to db_mach_vtrace the normal outcome was nothing was printed. With this change 'show ktr /a' will now keep printing until the user stops the command with a key press, or there is no more entries to print. Modified: head/sys/kern/kern_ktr.c Modified: head/sys/kern/kern_ktr.c ============================================================================== --- head/sys/kern/kern_ktr.c Sun Jan 31 16:55:52 2016 (r295097) +++ head/sys/kern/kern_ktr.c Sun Jan 31 17:32:20 2016 (r295098) @@ -419,7 +419,7 @@ DB_SHOW_COMMAND(ktr, db_ktr_all) db_ktr_verbose |= (strchr(modif, 'V') != NULL) ? 1 : 0; /* just timestap please */ if (strchr(modif, 'a') != NULL) { db_disable_pager(); - while (cncheckc() != -1) + while (cncheckc() == -1) if (db_mach_vtrace() == 0) break; } else { From owner-svn-src-all@freebsd.org Sun Jan 31 17:33:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40678A74D52; Sun, 31 Jan 2016 17:33:00 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11C3F990; Sun, 31 Jan 2016 17:33:00 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0VHWxK0036693; Sun, 31 Jan 2016 17:32:59 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0VHWxlR036692; Sun, 31 Jan 2016 17:32:59 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201601311732.u0VHWxlR036692@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 31 Jan 2016 17:32:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295099 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 17:33:00 -0000 Author: ian Date: Sun Jan 31 17:32:58 2016 New Revision: 295099 URL: https://svnweb.freebsd.org/changeset/base/295099 Log: Add make universe targets "kernels" and "worlds". "make kernels" is now shorthand for "make universe -DMAKE_JUST_KERNELS" "make worlds" is now shorthand for "make universe -DMAKE_JUST_WORLDS" The kernels target includes modules (unless you add -DNO_MODULES). And of course you can still add all the other universe options, such as "make kernels TARGETS=arm" to build kernels for all arm arches, or TARGET_ARCH=armv6 to build all armv6 kernels, etc. Reviewed by: imp Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Sun Jan 31 17:32:20 2016 (r295098) +++ head/Makefile Sun Jan 31 17:32:58 2016 (r295099) @@ -328,7 +328,7 @@ bmake: .PHONY ${MMAKE} all; \ ${MMAKE} install DESTDIR=${MYMAKE:H} BINDIR= -tinderbox toolchains kernel-toolchains: upgrade_checks +tinderbox toolchains kernel-toolchains kernels worlds: upgrade_checks tinderbox: @cd ${.CURDIR}; ${SUB_MAKE} DOING_TINDERBOX=YES universe @@ -339,6 +339,12 @@ toolchains: kernel-toolchains: @cd ${.CURDIR}; ${SUB_MAKE} UNIVERSE_TARGET=kernel-toolchain universe +kernels: + @cd ${.CURDIR}; ${SUB_MAKE} UNIVERSE_TARGET=buildkernel universe + +worlds: + @cd ${.CURDIR}; ${SUB_MAKE} UNIVERSE_TARGET=buildworld universe + # # universe # From owner-svn-src-all@freebsd.org Sun Jan 31 18:03:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBE7BA6F678 for ; Sun, 31 Jan 2016 18:03:03 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D99315B2 for ; Sun, 31 Jan 2016 18:03:03 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: by mail-wm0-x22b.google.com with SMTP id r129so41271391wmr.0 for ; Sun, 31 Jan 2016 10:03:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=667TF5Bn9S/Woki86/B/pTcQ7SBqcQLjQ4yzHncdH0w=; b=b6wceM3pdnozTuYbFJYCpzrbS6XgkiVWqT6vK32HfwKscrDcKrxn3JgAQGo7eoqcsL 0BW8GKDS1KNqxt5OWnt08cpA/qFfzsEhsxc2A0VFNZdMFEb9BF2virKtUwKEeGl168So is7xq0O7wH2M5OHDxN7JOSBxDDOs2tzPX6AvsLQkd6mB9RMGEVdA9CUI+rqHOtatSmL7 kxUyLe0bpbtj9fKu7JRh6jclFWVmgOYki3L3RfLfCR47jFdCWo6C887r1PyLMrP5cO2y DJjPl9ypWXX79sPcgBa63+Z+bdW0vODrv1XQcbOZIvUbTWzavjCj9WSuXufKtv2xMOwZ UfHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=667TF5Bn9S/Woki86/B/pTcQ7SBqcQLjQ4yzHncdH0w=; b=fvIX7Itkob5O+oEmac+Nrw1iGiW00lOuEYFaBZvz/SADSZ9wXzQ4m/EnjnBbf6Ohwj rnCcL4qtXsE4frVj601vF8enw9/Ngl/yna1bgNaVsSk6Bn1MY30rF4f0CXu3r/90eZqk 8gx6Ql+XMK7TMSQont+yO79w3aw0DEOtp7SZCWGb5DtjO2EuUGmO75/ZS+ofqBwqqOsL BLPyiKLqoEXY2/eOEYqPYZeRUTl+RlWeiEHzmgYiLUBbKjJKwEiLC8HOiLGp+kLmFtyF ivfdBog9K4C23bCrtDtsXTWc7PvH3AETglOcTFI75JDZVQuFtVoEBsDB6gsHmQPg/Hne /vsg== X-Gm-Message-State: AG10YOQDUrX/Lcth4tTonKLmFEqvp+x/c/J7EIEn6lTXcfomtXx2owZj7ZRSEOucrUlrU2v+ X-Received: by 10.194.19.138 with SMTP id f10mr18354058wje.108.1454263382008; Sun, 31 Jan 2016 10:03:02 -0800 (PST) Received: from [10.10.1.58] (liv3d.labs.multiplay.co.uk. [82.69.141.171]) by smtp.gmail.com with ESMTPSA id i5sm25277873wja.23.2016.01.31.10.03.00 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 31 Jan 2016 10:03:00 -0800 (PST) Subject: Re: svn commit: r295099 - head To: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201601311732.u0VHWxlR036692@repo.freebsd.org> From: Steven Hartland Message-ID: <56AE4C67.6020404@multiplay.co.uk> Date: Sun, 31 Jan 2016 18:03:19 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <201601311732.u0VHWxlR036692@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 18:03:04 -0000 Nice addition Ian, could we get information on this added to build(7) please? Regards Steve On 31/01/2016 17:32, Ian Lepore wrote: > Author: ian > Date: Sun Jan 31 17:32:58 2016 > New Revision: 295099 > URL: https://svnweb.freebsd.org/changeset/base/295099 > > Log: > Add make universe targets "kernels" and "worlds". > > "make kernels" is now shorthand for "make universe -DMAKE_JUST_KERNELS" > "make worlds" is now shorthand for "make universe -DMAKE_JUST_WORLDS" > > The kernels target includes modules (unless you add -DNO_MODULES). > > And of course you can still add all the other universe options, such as > "make kernels TARGETS=arm" to build kernels for all arm arches, or > TARGET_ARCH=armv6 to build all armv6 kernels, etc. > > Reviewed by: imp > > Modified: > head/Makefile > > Modified: head/Makefile > ============================================================================== > --- head/Makefile Sun Jan 31 17:32:20 2016 (r295098) > +++ head/Makefile Sun Jan 31 17:32:58 2016 (r295099) > @@ -328,7 +328,7 @@ bmake: .PHONY > ${MMAKE} all; \ > ${MMAKE} install DESTDIR=${MYMAKE:H} BINDIR= > > -tinderbox toolchains kernel-toolchains: upgrade_checks > +tinderbox toolchains kernel-toolchains kernels worlds: upgrade_checks > > tinderbox: > @cd ${.CURDIR}; ${SUB_MAKE} DOING_TINDERBOX=YES universe > @@ -339,6 +339,12 @@ toolchains: > kernel-toolchains: > @cd ${.CURDIR}; ${SUB_MAKE} UNIVERSE_TARGET=kernel-toolchain universe > > +kernels: > + @cd ${.CURDIR}; ${SUB_MAKE} UNIVERSE_TARGET=buildkernel universe > + > +worlds: > + @cd ${.CURDIR}; ${SUB_MAKE} UNIVERSE_TARGET=buildworld universe > + > # > # universe > # > From owner-svn-src-all@freebsd.org Sun Jan 31 21:14:32 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88ED7A73B11; Sun, 31 Jan 2016 21:14:32 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59FFAA74; Sun, 31 Jan 2016 21:14:32 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0VLEVb3000926; Sun, 31 Jan 2016 21:14:31 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0VLEVIo000925; Sun, 31 Jan 2016 21:14:31 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201601312114.u0VLEVIo000925@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Sun, 31 Jan 2016 21:14:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295100 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 21:14:32 -0000 Author: dteske Date: Sun Jan 31 21:14:31 2016 New Revision: 295100 URL: https://svnweb.freebsd.org/changeset/base/295100 Log: Reset OPTIND to 1 in f_device_find() Modified: head/usr.sbin/bsdconfig/share/device.subr Modified: head/usr.sbin/bsdconfig/share/device.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/device.subr Sun Jan 31 17:32:58 2016 (r295099) +++ head/usr.sbin/bsdconfig/share/device.subr Sun Jan 31 21:14:31 2016 (r295100) @@ -1,6 +1,6 @@ if [ ! "$_DEVICE_SUBR" ]; then _DEVICE_SUBR=1 # -# Copyright (c) 2012-2014 Devin Teske +# Copyright (c) 2012-2016 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -1032,7 +1032,7 @@ f_device_is_active() # f_device_find() { - local OPTIND OPTARG flag only_one= + local OPTIND=1 OPTARG flag only_one= while getopts 1 flag; do case "$flag" in 1) only_one=1 ;; From owner-svn-src-all@freebsd.org Sun Jan 31 21:22:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D89EA73CAA; Sun, 31 Jan 2016 21:22:11 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 671AFD03; Sun, 31 Jan 2016 21:22:11 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0VLMAcU003682; Sun, 31 Jan 2016 21:22:10 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0VLMAOC003681; Sun, 31 Jan 2016 21:22:10 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201601312122.u0VLMAOC003681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Sun, 31 Jan 2016 21:22:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295101 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 21:22:11 -0000 Author: dteske Date: Sun Jan 31 21:22:10 2016 New Revision: 295101 URL: https://svnweb.freebsd.org/changeset/base/295101 Log: Optimize f_sprintf() for bash bash lacks the ksh93 optimization that makes sub-shells fast if they do not alter io. bash 3.1-alpha1 introduced printf -v var_to_set which is not as fast but is still significantly faster than var_to_set=$( printf ) when using any version of bash. If we find our interpreter to somehow be bash by invocation or inclusion, use the feature that provides fastest results. Modified: head/usr.sbin/bsdconfig/share/strings.subr Modified: head/usr.sbin/bsdconfig/share/strings.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/strings.subr Sun Jan 31 21:14:31 2016 (r295100) +++ head/usr.sbin/bsdconfig/share/strings.subr Sun Jan 31 21:22:10 2016 (r295101) @@ -138,7 +138,15 @@ f_sprintf() { local __var_to_set="$1" shift 1 # var_to_set - eval "$__var_to_set"=\$\( printf -- \"\$@\" \) + + case "$BASH_VERSION" in + 3.1*|4.*) + local __tmp + printf -v __tmp "$@" + eval "$__var_to_set"=\"\${__tmp%\$NL}\" + ;; + *) eval "$__var_to_set"=\$\( printf -- \"\$@\" \) + esac } # f_vsnprintf $var_to_set $size $format $format_args From owner-svn-src-all@freebsd.org Sun Jan 31 21:28:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B03EA73EE6; Sun, 31 Jan 2016 21:28:43 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBBB9F94; Sun, 31 Jan 2016 21:28:42 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0VLSgiJ003916; Sun, 31 Jan 2016 21:28:42 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0VLSgpZ003915; Sun, 31 Jan 2016 21:28:42 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201601312128.u0VLSgpZ003915@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Sun, 31 Jan 2016 21:28:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295102 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 21:28:43 -0000 Author: dteske Date: Sun Jan 31 21:28:41 2016 New Revision: 295102 URL: https://svnweb.freebsd.org/changeset/base/295102 Log: Optimize f_substr() to use built-ins only Change f_snprintf() to use optimzed f_substr() Modified: head/usr.sbin/bsdconfig/share/strings.subr Modified: head/usr.sbin/bsdconfig/share/strings.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/strings.subr Sun Jan 31 21:22:10 2016 (r295101) +++ head/usr.sbin/bsdconfig/share/strings.subr Sun Jan 31 21:28:41 2016 (r295102) @@ -1,6 +1,6 @@ if [ ! "$_STRINGS_SUBR" ]; then _STRINGS_SUBR=1 # -# Copyright (c) 2006-2013 Devin Teske +# Copyright (c) 2006-2016 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -52,44 +52,53 @@ VALID_VARNAME_CHARS="0-9ABCDEFGHIJKLMNOP ############################################################ FUNCTIONS -# f_substr "$string" $start [$length] +# f_substr [-v $var_to_set] $string $start [$length] # -# Simple wrapper to awk(1)'s `substr' function. +# Similar to awk(1)'s substr(), return length substring of string that begins +# at start position counted from 1. # f_substr() { - local string="$1" start="${2:-0}" len="${3:-0}" - echo "$string" | awk "{ print substr(\$0, $start, $len) }" -} - -# f_snprintf $var_to_set $size $format [$arguments ...] -# -# Similar to snprintf(3), write at most $size number of bytes into $var_to_set -# using printf(1) syntax (`$format [$arguments ...]'). The value of $var_to_set -# is NULL unless at-least one byte is stored from the output. -# -f_snprintf() -{ - local __funcname=f_snprintf - local __var_to_set="$1" __size="$2" - shift 2 # var_to_set size + local OPTIND=1 OPTARG __flag __var_to_set= + while getopts v: __flag; do + case "$__flag" in + v) __var_to_set="$OPTARG" ;; + esac + done + shift $(( $OPTIND - 1 )) + + local __tmp="$1" __start="${2:-1}" __size="$3" + local __tbuf __tbuf_len __trim __trimq - if [ "$__size" -eq 0 ] 2> /dev/null; then - setvar "$__var_to_set" "" + if [ ! "$__tmp" ]; then + [ "$__var_to_set" ] && setvar "$__var_to_set" "" return ${SUCCESS:-0} - elif [ $? -ge 2 ] || [ $__size -lt 0 ]; then - setvar "$__var_to_set" "" - echo "$__funcname: invalid size argument \`__size'" >&2 + fi + [ "$__start" -ge 1 ] 2> /dev/null || __start=1 + if ! [ "${__size:-1}" -ge 1 ] 2> /dev/null; then + [ "$__var_to_set" ] && setvar "$__var_to_set" "" return ${FAILURE:-1} fi - local __f_snprintf_tmp - f_sprintf __f_snprintf_tmp "$@" + __trim=$(( $__start - 1 )) + while [ $__trim -gt 0 ]; do + __tbuf="?" + __tbuf_len=1 + while [ $__tbuf_len -lt $(( $__trim / $__tbuf_len )) ]; do + __tbuf="$__tbuf?" + __tbuf_len=$(( $__tbuf_len + 1 )) + done + __trimq=$(( $__trim / $__tbuf_len )) + __trim=$(( $__trim - $__tbuf_len * $__trimq )) + while [ $__trimq -gt 0 ]; do + __tmp="${__tmp#$__tbuf}" + __trimq=$(( $__trimq - 1 )) + done + done - local __tmp_size=${#__f_snprintf_tmp} - local __trim=$(( $__tmp_size - $__size )) __trimq - local __tbuf __tbuf_len + local __tmp_size=${#__tmp} local __mask __mask_len + __trim=$(( $__tmp_size - ${__size:-$__tmp_size} )) while [ $__trim -gt 0 ]; do __tbuf="?" __tbuf_len=1 @@ -102,11 +111,11 @@ f_snprintf() __trimq=$(( $__trim / $__tbuf_len )) __trim=$(( $__trim - $__tbuf_len * $__trimq )) while [ $__trimq -gt 0 ]; do - __f_snprintf_tmp="${__f_snprintf_tmp%$__tbuf}" + __tmp="${__tmp%$__tbuf}" __trimq=$(( $__trimq - 1 )) done else - __mask="$__f_snprintf_tmp" + __mask="$__tmp" while [ $__tbuf_len -lt $(( $__size / $__tbuf_len )) ] do __tbuf="$__tbuf?" @@ -123,10 +132,26 @@ f_snprintf() __mask="${__mask#$__tbuf}" __trimq=$(( $__trimq - 1 )) done - __f_snprintf_tmp="${__f_snprintf_tmp%"$__mask"}" + __tmp="${__tmp%"$__mask"}" fi done - setvar "$__var_to_set" "$__f_snprintf_tmp" + + setvar "$__var_to_set" "$__tmp" +} + +# f_snprintf $var_to_set $size $format [$arguments ...] +# +# Similar to snprintf(3), write at most $size number of bytes into $var_to_set +# using printf(1) syntax (`$format [$arguments ...]'). +# +f_snprintf() +{ + local __var_to_set="$1" __size="$2" + shift 2 # var_to_set size + + local __f_snprintf_tmp + f_sprintf __f_snprintf_tmp "$@" + f_substr "$__var_to_set" "$__f_snprintf_tmp" 1 "$__size" } # f_sprintf $var_to_set $format [$arguments ...] From owner-svn-src-all@freebsd.org Sun Jan 31 21:30:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B7E4A73F73; Sun, 31 Jan 2016 21:30:04 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F170710F3; Sun, 31 Jan 2016 21:30:03 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0VLU3hH004022; Sun, 31 Jan 2016 21:30:03 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0VLU3Hb004021; Sun, 31 Jan 2016 21:30:03 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201601312130.u0VLU3Hb004021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Sun, 31 Jan 2016 21:30:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295103 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 21:30:04 -0000 Author: dteske Date: Sun Jan 31 21:30:02 2016 New Revision: 295103 URL: https://svnweb.freebsd.org/changeset/base/295103 Log: Move f_sprintf() above f_snprintf() Ordering functions by appearance of use Modified: head/usr.sbin/bsdconfig/share/strings.subr Modified: head/usr.sbin/bsdconfig/share/strings.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/strings.subr Sun Jan 31 21:28:41 2016 (r295102) +++ head/usr.sbin/bsdconfig/share/strings.subr Sun Jan 31 21:30:02 2016 (r295103) @@ -139,21 +139,6 @@ f_substr() setvar "$__var_to_set" "$__tmp" } -# f_snprintf $var_to_set $size $format [$arguments ...] -# -# Similar to snprintf(3), write at most $size number of bytes into $var_to_set -# using printf(1) syntax (`$format [$arguments ...]'). -# -f_snprintf() -{ - local __var_to_set="$1" __size="$2" - shift 2 # var_to_set size - - local __f_snprintf_tmp - f_sprintf __f_snprintf_tmp "$@" - f_substr "$__var_to_set" "$__f_snprintf_tmp" 1 "$__size" -} - # f_sprintf $var_to_set $format [$arguments ...] # # Similar to sprintf(3), write a string into $var_to_set using printf(1) syntax @@ -174,6 +159,21 @@ f_sprintf() esac } +# f_snprintf $var_to_set $size $format [$arguments ...] +# +# Similar to snprintf(3), write at most $size number of bytes into $var_to_set +# using printf(1) syntax (`$format [$arguments ...]'). +# +f_snprintf() +{ + local __var_to_set="$1" __size="$2" + shift 2 # var_to_set size + + local __f_snprintf_tmp + f_sprintf __f_snprintf_tmp "$@" + f_substr "$__var_to_set" "$__f_snprintf_tmp" 1 "$__size" +} + # f_vsnprintf $var_to_set $size $format $format_args # # Similar to vsnprintf(3), write at most $size number of bytes into $var_to_set From owner-svn-src-all@freebsd.org Sun Jan 31 21:31:25 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC714A7402B; Sun, 31 Jan 2016 21:31:25 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD6E4135F; Sun, 31 Jan 2016 21:31:25 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0VLVOtR006043; Sun, 31 Jan 2016 21:31:24 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0VLVOKV006042; Sun, 31 Jan 2016 21:31:24 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201601312131.u0VLVOKV006042@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Sun, 31 Jan 2016 21:31:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295104 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 21:31:26 -0000 Author: dteske Date: Sun Jan 31 21:31:24 2016 New Revision: 295104 URL: https://svnweb.freebsd.org/changeset/base/295104 Log: Move f_vsprintf() below f_sprintf() Variable argument versions grouped with standard versions Modified: head/usr.sbin/bsdconfig/share/strings.subr Modified: head/usr.sbin/bsdconfig/share/strings.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/strings.subr Sun Jan 31 21:30:02 2016 (r295103) +++ head/usr.sbin/bsdconfig/share/strings.subr Sun Jan 31 21:31:24 2016 (r295104) @@ -159,6 +159,16 @@ f_sprintf() esac } +# f_vsprintf $var_to_set $format $format_args +# +# Similar to vsprintf(3), write a string into $var_to_set using printf(1) +# syntax (`$format $format_args'). +# +f_vsprintf() +{ + eval f_sprintf \"\$1\" \"\$2\" $3 +} + # f_snprintf $var_to_set $size $format [$arguments ...] # # Similar to snprintf(3), write at most $size number of bytes into $var_to_set @@ -209,16 +219,6 @@ f_vsnprintf() eval f_snprintf \"\$1\" \"\$2\" \"\$3\" $4 } -# f_vsprintf $var_to_set $format $format_args -# -# Similar to vsprintf(3), write a string into $var_to_set using printf(1) -# syntax (`$format $format_args'). -# -f_vsprintf() -{ - eval f_sprintf \"\$1\" \"\$2\" $3 -} - # f_longest_line_length # # Simple wrapper to an awk(1) script to print the length of the longest line of From owner-svn-src-all@freebsd.org Sun Jan 31 21:33:25 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81D3CA741E0; Sun, 31 Jan 2016 21:33:25 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F6CD17FC; Sun, 31 Jan 2016 21:33:25 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0VLXO3t006780; Sun, 31 Jan 2016 21:33:24 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0VLXOZB006779; Sun, 31 Jan 2016 21:33:24 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201601312133.u0VLXOZB006779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Sun, 31 Jan 2016 21:33:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295105 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 21:33:25 -0000 Author: dteske Date: Sun Jan 31 21:33:24 2016 New Revision: 295105 URL: https://svnweb.freebsd.org/changeset/base/295105 Log: Move f_isinteger() to the top Grouping builtins-only algos together Modified: head/usr.sbin/bsdconfig/share/strings.subr Modified: head/usr.sbin/bsdconfig/share/strings.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/strings.subr Sun Jan 31 21:31:24 2016 (r295104) +++ head/usr.sbin/bsdconfig/share/strings.subr Sun Jan 31 21:33:24 2016 (r295105) @@ -52,6 +52,16 @@ VALID_VARNAME_CHARS="0-9ABCDEFGHIJKLMNOP ############################################################ FUNCTIONS +# f_isinteger $arg +# +# Returns true if argument is a positive/negative whole integer. +# +f_isinteger() +{ + local arg="${1#-}" + [ "${arg:-x}" = "${arg%[!0-9]*}" ] +} + # f_substr [-v $var_to_set] $string $start [$length] # # Similar to awk(1)'s substr(), return length substring of string that begins @@ -267,16 +277,6 @@ f_number_of_lines() awk "$f_number_of_lines_awk" } -# f_isinteger $arg -# -# Returns true if argument is a positive/negative whole integer. -# -f_isinteger() -{ - local arg="${1#-}" - [ "${arg:-x}" = "${arg%[!0-9]*}" ] -} - # f_uriencode [$text] # # Encode $text for the purpose of embedding safely into a URL. Non-alphanumeric From owner-svn-src-all@freebsd.org Sun Jan 31 21:34:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD510A74242; Sun, 31 Jan 2016 21:34:26 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AB2219AD; Sun, 31 Jan 2016 21:34:26 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0VLYPVl006865; Sun, 31 Jan 2016 21:34:25 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0VLYPt8006864; Sun, 31 Jan 2016 21:34:25 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201601312134.u0VLYPt8006864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Sun, 31 Jan 2016 21:34:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295106 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 21:34:26 -0000 Author: dteske Date: Sun Jan 31 21:34:25 2016 New Revision: 295106 URL: https://svnweb.freebsd.org/changeset/base/295106 Log: Move awk(1)-dependent recipes to the bottom Modified: head/usr.sbin/bsdconfig/share/strings.subr Modified: head/usr.sbin/bsdconfig/share/strings.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/strings.subr Sun Jan 31 21:33:24 2016 (r295105) +++ head/usr.sbin/bsdconfig/share/strings.subr Sun Jan 31 21:34:25 2016 (r295106) @@ -229,120 +229,6 @@ f_vsnprintf() eval f_snprintf \"\$1\" \"\$2\" \"\$3\" $4 } -# f_longest_line_length -# -# Simple wrapper to an awk(1) script to print the length of the longest line of -# input (read from stdin). Supports the newline escape-sequence `\n' for -# splitting a single line into multiple lines. -# -f_longest_line_length_awk=' -BEGIN { longest = 0 } -{ - if (split($0, lines, /\\n/) > 1) - { - for (n in lines) - { - len = length(lines[n]) - longest = ( len > longest ? len : longest ) - } - } - else - { - len = length($0) - longest = ( len > longest ? len : longest ) - } -} -END { print longest } -' -f_longest_line_length() -{ - awk "$f_longest_line_length_awk" -} - -# f_number_of_lines -# -# Simple wrapper to an awk(1) script to print the number of lines read from -# stdin. Supports newline escape-sequence `\n' for splitting a single line into -# multiple lines. -# -f_number_of_lines_awk=' -BEGIN { num_lines = 0 } -{ - num_lines += split(" "$0, unused, /\\n/) -} -END { print num_lines } -' -f_number_of_lines() -{ - awk "$f_number_of_lines_awk" -} - -# f_uriencode [$text] -# -# Encode $text for the purpose of embedding safely into a URL. Non-alphanumeric -# characters are converted to `%XX' sequence where XX represents the hexa- -# decimal ordinal of the non-alphanumeric character. If $text is missing, data -# is instead read from standard input. -# -f_uriencode_awk=' -BEGIN { - output = "" - for (n = 0; n < 256; n++) pack[sprintf("%c", n)] = sprintf("%%%02x", n) -} -{ - sline = "" - slen = length($0) - for (n = 1; n <= slen; n++) { - char = substr($0, n, 1) - if ( char !~ /^[[:alnum:]_]$/ ) char = pack[char] - sline = sline char - } - output = output ( output ? "%0a" : "" ) sline -} -END { print output } -' -f_uriencode() -{ - if [ $# -gt 0 ]; then - echo "$1" | awk "$f_uriencode_awk" - else - awk "$f_uriencode_awk" - fi -} - -# f_uridecode [$text] -# -# Decode $text from a URI. Encoded characters are converted from their `%XX' -# sequence into original unencoded ASCII sequences. If $text is missing, data -# is instead read from standard input. -# -f_uridecode_awk=' -BEGIN { for (n = 0; n < 256; n++) chr[n] = sprintf("%c", n) } -{ - sline = "" - slen = length($0) - for (n = 1; n <= slen; n++) - { - seq = substr($0, n, 3) - if ( seq ~ /^%[[:xdigit:]][[:xdigit:]]$/ ) { - hex = substr(seq, 2, 2) - sline = sline chr[sprintf("%u", "0x"hex)] - n += 2 - } else - sline = sline substr(seq, 1, 1) - } - print sline -} -' -f_uridecode() -{ - if [ $# -gt 0 ]; then - echo "$1" | awk "$f_uridecode_awk" - else - awk "$f_uridecode_awk" - fi -} - # f_replaceall $string $find $replace [$var_to_set] # # Replace all occurrences of $find in $string with $replace. If $var_to_set is @@ -526,6 +412,120 @@ f_expand_number() fi } +# f_longest_line_length +# +# Simple wrapper to an awk(1) script to print the length of the longest line of +# input (read from stdin). Supports the newline escape-sequence `\n' for +# splitting a single line into multiple lines. +# +f_longest_line_length_awk=' +BEGIN { longest = 0 } +{ + if (split($0, lines, /\\n/) > 1) + { + for (n in lines) + { + len = length(lines[n]) + longest = ( len > longest ? len : longest ) + } + } + else + { + len = length($0) + longest = ( len > longest ? len : longest ) + } +} +END { print longest } +' +f_longest_line_length() +{ + awk "$f_longest_line_length_awk" +} + +# f_number_of_lines +# +# Simple wrapper to an awk(1) script to print the number of lines read from +# stdin. Supports newline escape-sequence `\n' for splitting a single line into +# multiple lines. +# +f_number_of_lines_awk=' +BEGIN { num_lines = 0 } +{ + num_lines += split(" "$0, unused, /\\n/) +} +END { print num_lines } +' +f_number_of_lines() +{ + awk "$f_number_of_lines_awk" +} + +# f_uriencode [$text] +# +# Encode $text for the purpose of embedding safely into a URL. Non-alphanumeric +# characters are converted to `%XX' sequence where XX represents the hexa- +# decimal ordinal of the non-alphanumeric character. If $text is missing, data +# is instead read from standard input. +# +f_uriencode_awk=' +BEGIN { + output = "" + for (n = 0; n < 256; n++) pack[sprintf("%c", n)] = sprintf("%%%02x", n) +} +{ + sline = "" + slen = length($0) + for (n = 1; n <= slen; n++) { + char = substr($0, n, 1) + if ( char !~ /^[[:alnum:]_]$/ ) char = pack[char] + sline = sline char + } + output = output ( output ? "%0a" : "" ) sline +} +END { print output } +' +f_uriencode() +{ + if [ $# -gt 0 ]; then + echo "$1" | awk "$f_uriencode_awk" + else + awk "$f_uriencode_awk" + fi +} + +# f_uridecode [$text] +# +# Decode $text from a URI. Encoded characters are converted from their `%XX' +# sequence into original unencoded ASCII sequences. If $text is missing, data +# is instead read from standard input. +# +f_uridecode_awk=' +BEGIN { for (n = 0; n < 256; n++) chr[n] = sprintf("%c", n) } +{ + sline = "" + slen = length($0) + for (n = 1; n <= slen; n++) + { + seq = substr($0, n, 3) + if ( seq ~ /^%[[:xdigit:]][[:xdigit:]]$/ ) { + hex = substr(seq, 2, 2) + sline = sline chr[sprintf("%u", "0x"hex)] + n += 2 + } else + sline = sline substr(seq, 1, 1) + } + print sline +} +' +f_uridecode() +{ + if [ $# -gt 0 ]; then + echo "$1" | awk "$f_uridecode_awk" + else + awk "$f_uridecode_awk" + fi +} + ############################################################ MAIN f_dprintf "%s: Successfully loaded." strings.subr From owner-svn-src-all@freebsd.org Mon Feb 1 00:44:31 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49111A74E6E; Mon, 1 Feb 2016 00:44:31 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21BAEB68; Mon, 1 Feb 2016 00:44:31 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u110iUju062869; Mon, 1 Feb 2016 00:44:30 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u110iTg9062862; Mon, 1 Feb 2016 00:44:29 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201602010044.u110iTg9062862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 1 Feb 2016 00:44:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295107 - in stable/10: lib/libdpv sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 00:44:31 -0000 Author: dteske Date: Mon Feb 1 00:44:29 2016 New Revision: 295107 URL: https://svnweb.freebsd.org/changeset/base/295107 Log: MFC revisions 294860,294862,294892-294893,294922 r294860: Add keep_tite configuration option r294862: Bump copyrights r294892: Remove unused function prototype r294893: Fix a crash if `-D' is used without `-t title' r294922: Fix fatal warn when compiling under GCC 5.2.0 Approved by: re (marius) Modified: stable/10/lib/libdpv/dialog_util.c stable/10/lib/libdpv/dialog_util.h stable/10/lib/libdpv/dpv.3 stable/10/lib/libdpv/dpv.c stable/10/lib/libdpv/dpv.h stable/10/lib/libdpv/dpv_private.h stable/10/sys/sys/param.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libdpv/dialog_util.c ============================================================================== --- stable/10/lib/libdpv/dialog_util.c Sun Jan 31 21:34:25 2016 (r295106) +++ stable/10/lib/libdpv/dialog_util.c Mon Feb 1 00:44:29 2016 (r295107) @@ -261,6 +261,13 @@ dialog_spawn_gauge(char *init_prompt, pi errx(EXIT_FAILURE, "Out of memory?!"); sprintf(dargv[n++], "--title"); dargv[n++] = title; + } else { + if ((dargv[n] = malloc(8)) == NULL) + errx(EXIT_FAILURE, "Out of memory?!"); + sprintf(dargv[n++], "--title"); + if ((dargv[n] = malloc(1)) == NULL) + errx(EXIT_FAILURE, "Out of memory?!"); + *dargv[n++] = '\0'; } if (backtitle != NULL) { if ((dargv[n] = malloc(12)) == NULL) Modified: stable/10/lib/libdpv/dialog_util.h ============================================================================== --- stable/10/lib/libdpv/dialog_util.h Sun Jan 31 21:34:25 2016 (r295106) +++ stable/10/lib/libdpv/dialog_util.h Mon Feb 1 00:44:29 2016 (r295107) @@ -55,7 +55,6 @@ extern int dheight, dwidth; __BEGIN_DECLS uint8_t dialog_prompt_nlstate(const char *_prompt); -void dialog_gauge_free(void); void dialog_maxsize_free(void); char *dialog_prompt_lastline(char *_prompt, uint8_t _nlstate); int dialog_maxcols(void); Modified: stable/10/lib/libdpv/dpv.3 ============================================================================== --- stable/10/lib/libdpv/dpv.3 Sun Jan 31 21:34:25 2016 (r295106) +++ stable/10/lib/libdpv/dpv.3 Mon Feb 1 00:44:29 2016 (r295107) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013-2015 Devin Teske +.\" Copyright (c) 2013-2016 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Oct 22, 2015 +.Dd Jan 26, 2016 .Dt DPV 3 .Os .Sh NAME @@ -64,6 +64,7 @@ argument contains the following properti features: .Bd -literal -offset indent struct dpv_config { + uint8_t keep_tite; /* Cleaner exit for scripts */ enum dpv_display display_type; /* Def. DPV_DISPLAY_LIBDIALOG */ enum dpv_output output_type; /* Default DPV_OUTPUT_NONE */ int debug; /* Enable debug on stderr */ Modified: stable/10/lib/libdpv/dpv.c ============================================================================== --- stable/10/lib/libdpv/dpv.c Sun Jan 31 21:34:25 2016 (r295106) +++ stable/10/lib/libdpv/dpv.c Mon Feb 1 00:44:29 2016 (r295107) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2014 Devin Teske + * Copyright (c) 2013-2016 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -69,6 +69,7 @@ long long dpv_overall_read = 0; static char pathbuf[PATH_MAX]; /* Extra display information */ +uint8_t keep_tite = FALSE; /* dpv_config.keep_tite */ uint8_t no_labels = FALSE; /* dpv_config.options & DPV_NO_LABELS */ uint8_t wide = FALSE; /* dpv_config.options & DPV_WIDE_MODE */ char *aprompt = NULL; /* dpv_config.aprompt */ @@ -150,6 +151,7 @@ dpv(struct dpv_config *config, struct dp dialog_updates_per_second = DIALOG_UPDATES_PER_SEC; display_limit = DISPLAY_LIMIT_DEFAULT; display_type = DPV_DISPLAY_LIBDIALOG; + keep_tite = FALSE; label_size = LABEL_SIZE_DEFAULT; msg_done = NULL; msg_fail = NULL; @@ -193,6 +195,7 @@ dpv(struct dpv_config *config, struct dp dialog_updates_per_second = config->dialog_updates_per_second; display_limit = config->display_limit; display_type = config->display_type; + keep_tite = config->keep_tite; label_size = config->label_size; msg_done = (char *)config->msg_done; msg_fail = (char *)config->msg_fail; @@ -695,7 +698,7 @@ dpv(struct dpv_config *config, struct dp close(dialog_out); waitpid(pid, (int *)NULL, 0); } - if (!dpv_interrupt) + if (!keep_tite && !dpv_interrupt) printf("\n"); } else warnx("%s: %lli overall read", __func__, dpv_overall_read); Modified: stable/10/lib/libdpv/dpv.h ============================================================================== --- stable/10/lib/libdpv/dpv.h Sun Jan 31 21:34:25 2016 (r295106) +++ stable/10/lib/libdpv/dpv.h Mon Feb 1 00:44:29 2016 (r295107) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2014 Devin Teske + * Copyright (c) 2013-2016 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -97,6 +97,7 @@ struct dpv_file_node { * Anatomy of config option to pass as dpv() config argument */ struct dpv_config { + uint8_t keep_tite; /* Prevent visually distracting exit */ enum dpv_display display_type; /* Display (default TYPE_LIBDIALOG) */ enum dpv_output output_type; /* Output (default TYPE_NONE) */ int debug; /* Enable debugging output on stderr */ Modified: stable/10/lib/libdpv/dpv_private.h ============================================================================== --- stable/10/lib/libdpv/dpv_private.h Sun Jan 31 21:34:25 2016 (r295106) +++ stable/10/lib/libdpv/dpv_private.h Mon Feb 1 00:44:29 2016 (r295107) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2014 Devin Teske + * Copyright (c) 2013-2016 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,6 +38,7 @@ extern uint8_t debug; extern unsigned int dpv_nfiles; /* Extra display information */ +extern uint8_t keep_tite; extern uint8_t no_labels; extern uint8_t wide; extern char *msg_done, *msg_fail, *msg_pending; Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Sun Jan 31 21:34:25 2016 (r295106) +++ stable/10/sys/sys/param.h Mon Feb 1 00:44:29 2016 (r295107) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1002508 /* Master, propagated to newvers */ +#define __FreeBSD_version 1002509 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Mon Feb 1 00:54:28 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20DE2A7323D; Mon, 1 Feb 2016 00:54:28 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D04CDF27; Mon, 1 Feb 2016 00:54:27 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u110sQrh065825; Mon, 1 Feb 2016 00:54:26 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u110sQ83065822; Mon, 1 Feb 2016 00:54:26 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201602010054.u110sQ83065822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 1 Feb 2016 00:54:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295108 - in head/usr.sbin/bsdconfig: . networking/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 00:54:28 -0000 Author: dteske Date: Mon Feb 1 00:54:26 2016 New Revision: 295108 URL: https://svnweb.freebsd.org/changeset/base/295108 Log: Utilize new `-v var_to_set' of f_snprintf() Modified: head/usr.sbin/bsdconfig/bsdconfig head/usr.sbin/bsdconfig/networking/share/media.subr head/usr.sbin/bsdconfig/networking/share/resolv.subr Modified: head/usr.sbin/bsdconfig/bsdconfig ============================================================================== --- head/usr.sbin/bsdconfig/bsdconfig Mon Feb 1 00:44:29 2016 (r295107) +++ head/usr.sbin/bsdconfig/bsdconfig Mon Feb 1 00:54:26 2016 (r295108) @@ -212,7 +212,7 @@ dialog_menu_main() *) menu_program="$menuitem/$menu_program" esac - tag=$( f_substr "$DIALOG_MENU_TAGS" $index 1 ) + f_substr -v tag "$DIALOG_MENU_TAGS" $index 1 setvar "menu_program$tag" "$menu_program" f_shell_escape "$menu_title" menu_title @@ -256,7 +256,7 @@ dialog_menu_main() *) menu_program="$BSDCFG_LOCAL_LIBE/$menuitem/$menu_program" esac - tag=$( f_substr "$DIALOG_MENU_TAGS" $index 1 ) + f_substr -v tag "$DIALOG_MENU_TAGS" $index 1 setvar "menu_program$tag" "$menu_program" f_shell_escape "$menu_title" menu_title Modified: head/usr.sbin/bsdconfig/networking/share/media.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/media.subr Mon Feb 1 00:44:29 2016 (r295107) +++ head/usr.sbin/bsdconfig/networking/share/media.subr Mon Feb 1 00:54:26 2016 (r295108) @@ -180,18 +180,18 @@ f_dialog_menu_media_options() f_ifconfig_media $interface | \ ( index=1 - echo "'$( f_substr "$DIALOG_MENU_TAGS" $index 1 )'" - echo "'$opt_none'" + f_substr -v tagn "$DIALOG_MENU_TAGS" $index 1 + echo "'$tagn' '$opt_none'" index=$(( $index + 1 )) - echo "'$( f_substr "$DIALOG_MENU_TAGS" $index 1 )'" - echo "'$opt_cust'" + f_substr -v tagn "$DIALOG_MENU_TAGS" $index 1 + echo "'$tagn' '$opt_cust'" index=$(( $index + 1 )) while read media_options; do [ $index -lt ${#DIALOG_MENU_TAGS} ] || break - echo "'$( f_substr "$DIALOG_MENU_TAGS" $index 1 )'" - echo "'$media_options'" + f_substr -v tagn "$DIALOG_MENU_TAGS" $index 1 + echo "'$tagn' '$media_options'" index=$(( $index + 1 )) done ) Modified: head/usr.sbin/bsdconfig/networking/share/resolv.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/resolv.subr Mon Feb 1 00:44:29 2016 (r295107) +++ head/usr.sbin/bsdconfig/networking/share/resolv.subr Mon Feb 1 00:54:26 2016 (r295108) @@ -441,7 +441,7 @@ f_dialog_menu_nameservers() for ns in $nameservers; do [ $index -lt ${#DIALOG_MENU_TAGS} ] || break - tag=$( f_substr "$DIALOG_MENU_TAGS" $index 1 ) + f_substr -v tag "$DIALOG_MENU_TAGS" $index 1 echo "'$tag nameserver' '$ns'" index=$(( $index + 1 )) done From owner-svn-src-all@freebsd.org Mon Feb 1 00:55:17 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B343DA732C7; Mon, 1 Feb 2016 00:55:17 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75D341082; Mon, 1 Feb 2016 00:55:17 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u110tGOe065919; Mon, 1 Feb 2016 00:55:16 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u110tGM7065914; Mon, 1 Feb 2016 00:55:16 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201602010055.u110tGM7065914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 1 Feb 2016 00:55:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r295109 - vendor/openresolv/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 00:55:17 -0000 Author: pfg Date: Mon Feb 1 00:55:15 2016 New Revision: 295109 URL: https://svnweb.freebsd.org/changeset/base/295109 Log: Import openresolv 3.7.2 Obtained from: http://roy.marples.name/projects/openresolv Modified: vendor/openresolv/dist/Makefile vendor/openresolv/dist/resolvconf.8.in vendor/openresolv/dist/resolvconf.conf.5.in vendor/openresolv/dist/resolvconf.in vendor/openresolv/dist/unbound.in Modified: vendor/openresolv/dist/Makefile ============================================================================== --- vendor/openresolv/dist/Makefile Mon Feb 1 00:54:26 2016 (r295108) +++ vendor/openresolv/dist/Makefile Mon Feb 1 00:55:15 2016 (r295109) @@ -1,5 +1,5 @@ PKG= openresolv -VERSION= 3.7.0 +VERSION= 3.7.1 # Nasty hack so that make clean works without configure being run _CONFIG_MK!= test -e config.mk && echo config.mk || echo config-null.mk @@ -37,7 +37,7 @@ SED_RESTARTCMD= -e 's:@RESTARTCMD \(.*\ DISTPREFIX?= ${PKG}-${VERSION} DISTFILEGZ?= ${DISTPREFIX}.tar.gz -DISTFILE?= ${DISTPREFIX}.tar.bz2 +DISTFILE?= ${DISTPREFIX}.tar.xz FOSSILID?= current .SUFFIXES: .in @@ -77,9 +77,9 @@ install: proginstall maninstall import: rm -rf /tmp/${DISTPREFIX} ${INSTALL} -d /tmp/${DISTPREFIX} - cp README ${SRCS} /tmp/${DISPREFIX} + cp README ${SRCS} /tmp/${DISTPREFIX} dist: fossil tarball --name ${DISTPREFIX} ${FOSSILID} ${DISTFILEGZ} - gunzip -c ${DISTFILEGZ} | bzip2 >${DISTFILE} + gunzip -c ${DISTFILEGZ} | xz >${DISTFILE} rm ${DISTFILEGZ} Modified: vendor/openresolv/dist/resolvconf.8.in ============================================================================== --- vendor/openresolv/dist/resolvconf.8.in Mon Feb 1 00:54:26 2016 (r295108) +++ vendor/openresolv/dist/resolvconf.8.in Mon Feb 1 00:55:15 2016 (r295109) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 27, 2014 +.Dd April 27, 2015 .Dt RESOLVCONF 8 .Os .Sh NAME Modified: vendor/openresolv/dist/resolvconf.conf.5.in ============================================================================== --- vendor/openresolv/dist/resolvconf.conf.5.in Mon Feb 1 00:54:26 2016 (r295108) +++ vendor/openresolv/dist/resolvconf.conf.5.in Mon Feb 1 00:55:15 2016 (r295109) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 20, 2015 +.Dd May 14, 2015 .Dt RESOLVCONF.CONF 5 .Os .Sh NAME @@ -91,6 +91,11 @@ To remove a block, you can use 192.168.* These interfaces name servers will only be queried for the domains listed in their resolv.conf. Useful for VPN domains. +Setting +.Sy private_interfaces Ns ="*" +will stop the forwarding of the root zone and allows the local resolver to +recursively query the root servers directly. +Requires a local nameserver other than libc. This is equivalent to the .Nm resolvconf -p option. @@ -149,7 +154,7 @@ When set to /dev/null or NULL, .Sy resolv_conf_local_only is defaulted to NO, .Sy local_nameservers -is unset unless overriden and only the information set in +is unset unless overridden and only the information set in .Nm is written to .Sy resolv_conf . @@ -271,7 +276,7 @@ Each subscriber attempts to automaticall distribution has been catered for. Also, users could equally want to use a different version from the one installed by default, such as bind8 and bind9. -To accomodate this, the subscribers have these files in configurable +To accommodate this, the subscribers have these files in configurable variables, documented below. .Pp .Bl -tag -width indent Modified: vendor/openresolv/dist/resolvconf.in ============================================================================== --- vendor/openresolv/dist/resolvconf.in Mon Feb 1 00:54:26 2016 (r295108) +++ vendor/openresolv/dist/resolvconf.in Mon Feb 1 00:55:15 2016 (r295109) @@ -50,7 +50,6 @@ elif [ -d "$SYSCONFDIR/resolvconf" ]; th interface_order="$(cat "$SYSCONFDIR"/interface-order)" fi fi -TMPDIR="$VARDIR/tmp" IFACEDIR="$VARDIR/interfaces" METRICDIR="$VARDIR/metrics" PRIVATEDIR="$VARDIR/private" Modified: vendor/openresolv/dist/unbound.in ============================================================================== --- vendor/openresolv/dist/unbound.in Mon Feb 1 00:54:26 2016 (r295108) +++ vendor/openresolv/dist/unbound.in Mon Feb 1 00:55:15 2016 (r295109) @@ -45,7 +45,8 @@ for d in $DOMAINS; do ns="${d#*:}" case "$unbound_insecure" in [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) - newconf="$newconf${NL}domain-insecure: \"$dn\"" + newconf="$newconf${NL}server:$NL" + newconf="$newconf domain-insecure: \"$dn\"$NL" ;; esac newconf="$newconf${NL}forward-zone:$NL name: \"$dn\"$NL" From owner-svn-src-all@freebsd.org Mon Feb 1 00:56:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5253A73337; Mon, 1 Feb 2016 00:56:19 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA89211C4; Mon, 1 Feb 2016 00:56:19 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [64.201.244.132] (port=50934 helo=[10.0.0.113]) by shxd.cx with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1aQ2mx-0001RL-Hv; Sun, 31 Jan 2016 16:56:19 -0800 Message-ID: <1454288179.18007.6.camel@FreeBSD.org> Subject: Re: svn commit: r295108 - in head/usr.sbin/bsdconfig: . networking/share From: Devin Teske To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Cc: dteske@FreeBSD.org Date: Sun, 31 Jan 2016 16:56:19 -0800 In-Reply-To: <201602010054.u110sQ83065822@repo.freebsd.org> References: <201602010054.u110sQ83065822@repo.freebsd.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: devin@shxd.cx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 00:56:20 -0000 Typo in commit this commit message; s/snprintf/substr/ (for record posterity) -- Devin On Mon, 2016-02-01 at 00:54 +0000, Devin Teske wrote: > Author: dteske > Date: Mon Feb 1 00:54:26 2016 > New Revision: 295108 > URL: https://svnweb.freebsd.org/changeset/base/295108 > > Log: > Utilize new `-v var_to_set' of f_snprintf() > > Modified: > head/usr.sbin/bsdconfig/bsdconfig > head/usr.sbin/bsdconfig/networking/share/media.subr > head/usr.sbin/bsdconfig/networking/share/resolv.subr > > Modified: head/usr.sbin/bsdconfig/bsdconfig > ===================================================================== > ========= > --- head/usr.sbin/bsdconfig/bsdconfig Mon Feb 1 00:44:29 2016 > (r295107) > +++ head/usr.sbin/bsdconfig/bsdconfig Mon Feb 1 00:54:26 2016 > (r295108) > @@ -212,7 +212,7 @@ dialog_menu_main() > *) menu_program="$menuitem/$menu_program" > esac > > - tag=$( f_substr "$DIALOG_MENU_TAGS" $index 1 ) > + f_substr -v tag "$DIALOG_MENU_TAGS" $index 1 > setvar "menu_program$tag" "$menu_program" > > f_shell_escape "$menu_title" menu_title > @@ -256,7 +256,7 @@ dialog_menu_main() > *) > menu_program="$BSDCFG_LOCAL_LIBE/$menuitem/$menu_program" > esac > > - tag=$( f_substr "$DIALOG_MENU_TAGS" $index 1 ) > + f_substr -v tag "$DIALOG_MENU_TAGS" $index 1 > setvar "menu_program$tag" "$menu_program" > > f_shell_escape "$menu_title" menu_title > > Modified: head/usr.sbin/bsdconfig/networking/share/media.subr > ===================================================================== > ========= > --- head/usr.sbin/bsdconfig/networking/share/media.subr Mon > Feb 1 00:44:29 2016 (r295107) > +++ head/usr.sbin/bsdconfig/networking/share/media.subr Mon > Feb 1 00:54:26 2016 (r295108) > @@ -180,18 +180,18 @@ f_dialog_menu_media_options() > f_ifconfig_media $interface | \ > ( index=1 > > - echo "'$( f_substr "$DIALOG_MENU_TAGS" $index 1 > )'" > - echo "'$opt_none'" > + f_substr -v tagn "$DIALOG_MENU_TAGS" $index 1 > + echo "'$tagn' '$opt_none'" > index=$(( $index + 1 )) > > - echo "'$( f_substr "$DIALOG_MENU_TAGS" $index 1 > )'" > - echo "'$opt_cust'" > + f_substr -v tagn "$DIALOG_MENU_TAGS" $index 1 > + echo "'$tagn' '$opt_cust'" > index=$(( $index + 1 )) > > while read media_options; do > [ $index -lt ${#DIALOG_MENU_TAGS} ] || > break > - echo "'$( f_substr "$DIALOG_MENU_TAGS" > $index 1 )'" > - echo "'$media_options'" > + f_substr -v tagn "$DIALOG_MENU_TAGS" > $index 1 > + echo "'$tagn' '$media_options'" > index=$(( $index + 1 )) > done > ) > > Modified: head/usr.sbin/bsdconfig/networking/share/resolv.subr > ===================================================================== > ========= > --- head/usr.sbin/bsdconfig/networking/share/resolv.subr Mon > Feb 1 00:44:29 2016 (r295107) > +++ head/usr.sbin/bsdconfig/networking/share/resolv.subr Mon > Feb 1 00:54:26 2016 (r295108) > @@ -441,7 +441,7 @@ f_dialog_menu_nameservers() > > for ns in $nameservers; do > [ $index -lt ${#DIALOG_MENU_TAGS} ] > || break > - tag=$( f_substr "$DIALOG_MENU_TAGS" > $index 1 ) > + f_substr -v tag "$DIALOG_MENU_TAGS" > $index 1 > echo "'$tag nameserver' '$ns'" > index=$(( $index + 1 )) > done > From owner-svn-src-all@freebsd.org Mon Feb 1 00:58:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4632CA73550; Mon, 1 Feb 2016 00:58:09 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0131B13D0; Mon, 1 Feb 2016 00:58:08 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u110w8E8066066; Mon, 1 Feb 2016 00:58:08 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u110w73S066064; Mon, 1 Feb 2016 00:58:07 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201602010058.u110w73S066064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 1 Feb 2016 00:58:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295110 - stable/10/usr.bin/dpv X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 00:58:09 -0000 Author: dteske Date: Mon Feb 1 00:58:07 2016 New Revision: 295110 URL: https://svnweb.freebsd.org/changeset/base/295110 Log: MFC revisions 294861,294863 r294861: Add `-k' for dpv(3) `keep_tite' config option r294863: Bump copyright Approved by: re (gjb) Modified: stable/10/usr.bin/dpv/dpv.1 stable/10/usr.bin/dpv/dpv.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/dpv/dpv.1 ============================================================================== --- stable/10/usr.bin/dpv/dpv.1 Mon Feb 1 00:55:15 2016 (r295109) +++ stable/10/usr.bin/dpv/dpv.1 Mon Feb 1 00:58:07 2016 (r295110) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013-2015 Devin Teske +.\" Copyright (c) 2013-2016 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Oct 22, 2015 +.Dd Jan 26, 2016 .Dt DPV 1 .Os .Sh NAME @@ -138,6 +138,11 @@ Default value is .Dq Li %'10lli bytes read @ %'9.1f bytes/sec. [%i/%i busy/wait] . This format is used when handling more than one file. +.It Fl k +Keep tite. +Prevent visually distracting initialization/exit routines for scripts running +.Xr dialog 1 +several times. .It Fl l Line mode. Read lines from input instead of bytes. .It Fl L Ar size Modified: stable/10/usr.bin/dpv/dpv.c ============================================================================== --- stable/10/usr.bin/dpv/dpv.c Mon Feb 1 00:55:15 2016 (r295109) +++ stable/10/usr.bin/dpv/dpv.c Mon Feb 1 00:58:07 2016 (r295110) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2014 Devin Teske + * Copyright (c) 2013-2016 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -271,7 +271,7 @@ main(int argc, char *argv[]) * Process command-line options */ while ((ch = getopt(argc, argv, - "a:b:dDhi:I:lL:mn:No:p:P:t:TU:wx:X")) != -1) { + "a:b:dDhi:I:klL:mn:No:p:P:t:TU:wx:X")) != -1) { switch(ch) { case 'a': /* additional message text to append */ if (config->aprompt == NULL) { @@ -307,6 +307,9 @@ main(int argc, char *argv[]) case 'I': /* status line format string for many-files */ config->status_many = optarg; break; + case 'k': /* keep tite */ + config->keep_tite = TRUE; + break; case 'l': /* Line mode */ line_mode = TRUE; break; @@ -467,7 +470,8 @@ main(int argc, char *argv[]) if (dpv(config, file_list) != 0 && debug) warnx("dpv(3) returned error!?"); - end_dialog(); + if (!config->keep_tite) + end_dialog(); dpv_free(); exit(EXIT_SUCCESS); From owner-svn-src-all@freebsd.org Mon Feb 1 00:59:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29268A73665; Mon, 1 Feb 2016 00:59:01 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D89F9161D; Mon, 1 Feb 2016 00:59:00 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u110wxUJ066130; Mon, 1 Feb 2016 00:58:59 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u110wxlA066129; Mon, 1 Feb 2016 00:58:59 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201602010058.u110wxlA066129@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 1 Feb 2016 00:58:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r295111 - vendor/openresolv/3.7.2 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 00:59:01 -0000 Author: pfg Date: Mon Feb 1 00:58:59 2016 New Revision: 295111 URL: https://svnweb.freebsd.org/changeset/base/295111 Log: Tag openresolv 3.7.2 Obtained from: http://roy.marples.name/projects/openresolv A + svn+ssh://repo.freebsd.org/base/vendor/openresolv/3.7.2 Added: vendor/openresolv/3.7.2/ - copied from r295109, vendor/openresolv/dist/ From owner-svn-src-all@freebsd.org Mon Feb 1 02:04:41 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E1F8A74CE5; Mon, 1 Feb 2016 02:04:41 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52C4CF3A; Mon, 1 Feb 2016 02:04:41 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1124eM7086782; Mon, 1 Feb 2016 02:04:40 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1124eL7086781; Mon, 1 Feb 2016 02:04:40 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201602010204.u1124eL7086781@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 1 Feb 2016 02:04:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295112 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 02:04:41 -0000 Author: jhibbits Date: Mon Feb 1 02:04:40 2016 New Revision: 295112 URL: https://svnweb.freebsd.org/changeset/base/295112 Log: Use the correct type to pmap_mapdev() in nexus_activate_resource(). pmap_mapdev() takes vm_paddr_t, which may be sized differently from vm_offset_t, as it is in book-e. Sponsored by: Alex Perez/Inertial Computing Modified: head/sys/powerpc/powerpc/nexus.c Modified: head/sys/powerpc/powerpc/nexus.c ============================================================================== --- head/sys/powerpc/powerpc/nexus.c Mon Feb 1 00:58:59 2016 (r295111) +++ head/sys/powerpc/powerpc/nexus.c Mon Feb 1 02:04:40 2016 (r295112) @@ -189,13 +189,13 @@ nexus_activate_resource(device_t bus __u { if (type == SYS_RES_MEMORY) { - vm_offset_t start; + vm_paddr_t start; void *p; - start = (vm_offset_t) rman_get_start(r); + start = (vm_paddr_t) rman_get_start(r); if (bootverbose) - printf("nexus mapdev: start %zx, len %ld\n", start, - rman_get_size(r)); + printf("nexus mapdev: start %jx, len %ld\n", + (uintmax_t)start, rman_get_size(r)); p = pmap_mapdev(start, (vm_size_t) rman_get_size(r)); if (p == NULL) From owner-svn-src-all@freebsd.org Mon Feb 1 02:32:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59EECA7569A; Mon, 1 Feb 2016 02:32:01 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DCDC1C56; Mon, 1 Feb 2016 02:32:00 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u112W0jD095634; Mon, 1 Feb 2016 02:32:00 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u112VxMw095628; Mon, 1 Feb 2016 02:31:59 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201602010231.u112VxMw095628@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Mon, 1 Feb 2016 02:31:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295113 - head/sys/dev/mps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 02:32:01 -0000 Author: araujo Date: Mon Feb 1 02:31:59 2016 New Revision: 295113 URL: https://svnweb.freebsd.org/changeset/base/295113 Log: Clean up unused-but-set-variable spotted by gcc-4.9. Reviewed by: mav, slm Approved by: rodrigc (mentor) MFC after: 2 weeks Sponsored by: gandi.net Modified: head/sys/dev/mps/mps_mapping.c head/sys/dev/mps/mps_sas.c Modified: head/sys/dev/mps/mps_mapping.c ============================================================================== --- head/sys/dev/mps/mps_mapping.c Mon Feb 1 02:04:40 2016 (r295112) +++ head/sys/dev/mps/mps_mapping.c Mon Feb 1 02:31:59 2016 (r295113) @@ -890,7 +890,7 @@ _mapping_get_dev_info(struct mps_softc * u16 ioc_pg8_flags = le16toh(sc->ioc_pg8.Flags); Mpi2ConfigReply_t mpi_reply; Mpi2SasDevicePage0_t sas_device_pg0; - u8 entry, enc_idx, phy_idx, sata_end_device; + u8 entry, enc_idx, phy_idx; u32 map_idx, index, device_info; struct _map_phy_change *phy_change, *tmp_phy_change; uint64_t sas_address; @@ -920,10 +920,8 @@ _mapping_get_dev_info(struct mps_softc * sas_address = sas_device_pg0.SASAddress.High; sas_address = (sas_address << 32) | sas_device_pg0.SASAddress.Low; - sata_end_device = 0; if ((device_info & MPI2_SAS_DEVICE_INFO_END_DEVICE) && (device_info & MPI2_SAS_DEVICE_INFO_SATA_DEVICE)) { - sata_end_device = 1; rc = mpssas_get_sas_address_for_sata_disk(sc, &sas_address, phy_change->dev_handle, device_info, &phy_change->is_SATA_SSD); Modified: head/sys/dev/mps/mps_sas.c ============================================================================== --- head/sys/dev/mps/mps_sas.c Mon Feb 1 02:04:40 2016 (r295112) +++ head/sys/dev/mps/mps_sas.c Mon Feb 1 02:31:59 2016 (r295113) @@ -2797,11 +2797,9 @@ mpssas_send_smpcmd(struct mpssas_softc * uint8_t *request, *response; MPI2_SMP_PASSTHROUGH_REQUEST *req; struct mps_softc *sc; - struct sglist *sg; int error; sc = sassc->sc; - sg = NULL; error = 0; /* From owner-svn-src-all@freebsd.org Mon Feb 1 02:33:55 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACD9AA7578A; Mon, 1 Feb 2016 02:33:55 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-oi0-x232.google.com (mail-oi0-x232.google.com [IPv6:2607:f8b0:4003:c06::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 73D621F55; Mon, 1 Feb 2016 02:33:55 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-oi0-x232.google.com with SMTP id k206so80869910oia.1; Sun, 31 Jan 2016 18:33:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=QIx3hce1c7zXcPJo2+0jw7H3hIRAcjPMS2F00jYjitk=; b=UJywreffu7ozroyBFJl7vjX2TAqdN4fkIfCiVGZHxKYjOtdMz0z3lfYtqApz4L/EVe nNwVAAS1VUhBdJ9r9tJxTAdq4p5n1IbOtDAnrFeJkg2iZ6ft71WwRLCnjNbeDwJVbUq/ /D3V+VveWs3FrFDsoiqHxLjJnPINvpSiyA7ECuW48qG3XBZLdClvzmKZdzv7A3GUBFB5 Af0ufcphKcH/agUswWrTzOuq4iI7ASvU+jhtB0J6gj469me07vfQQDhHYSrL/fDwYI9H vw/q8tJW/hozm1A+M9XbJPJ+SqTREoOIWP44KQuG13qYEr4vr2gN4K7lS2dsvxNolE5o VBXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=QIx3hce1c7zXcPJo2+0jw7H3hIRAcjPMS2F00jYjitk=; b=Dm0eUSoSPVSd0DewZGcg/SnEVRb4E0bLwfvXlI6p/aAYU+2JtHKGJlI//3ZHvG/Qqv CZ7wrKetHvRS2WPmRlsf6fICH9dMLTVhn9IUgoZhDBzi/dn+y/7nxwHMHJtjzy5w4WYX YwshVECuTfDByi+qkDj717BOXJVzsn6XdzAp5uATMKjg3TLlRujT/BQ+5Yw2NookbAwd 8kfSZlJ/WcujXs8t1XFOwnAa3okfu7YhJQcxi+x6I37v6xqAEunZBl5tnNyzieRUQNJU hKggz/+wxC/BIYYHgwhjGFe8WsAWj8IIV/pspkgdJjy2D9krH6+B0LW6JIkxMbMx9z3L pEBA== X-Gm-Message-State: AG10YOSVFrb0UYabDdm9n9cxvNfMf+xQ+4NXhVWni9bTauhxehjv7oET/xFquYAlMUTTB2vcvrxVw5wzvWMQEA== MIME-Version: 1.0 X-Received: by 10.202.210.131 with SMTP id j125mr3063820oig.114.1454294034720; Sun, 31 Jan 2016 18:33:54 -0800 (PST) Received: by 10.182.5.138 with HTTP; Sun, 31 Jan 2016 18:33:54 -0800 (PST) Reply-To: araujo@FreeBSD.org In-Reply-To: <201602010231.u112VxMw095628@repo.freebsd.org> References: <201602010231.u112VxMw095628@repo.freebsd.org> Date: Mon, 1 Feb 2016 10:33:54 +0800 Message-ID: Subject: Re: svn commit: r295113 - head/sys/dev/mps From: Marcelo Araujo To: Marcelo Araujo Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 02:33:55 -0000 Forgotten to add the review: https://reviews.freebsd.org/D5110 Best, 2016-02-01 10:31 GMT+08:00 Marcelo Araujo : > Author: araujo > Date: Mon Feb 1 02:31:59 2016 > New Revision: 295113 > URL: https://svnweb.freebsd.org/changeset/base/295113 > > Log: > Clean up unused-but-set-variable spotted by gcc-4.9. > > Reviewed by: mav, slm > Approved by: rodrigc (mentor) > MFC after: 2 weeks > Sponsored by: gandi.net > > Modified: > head/sys/dev/mps/mps_mapping.c > head/sys/dev/mps/mps_sas.c > > Modified: head/sys/dev/mps/mps_mapping.c > > ============================================================================== > --- head/sys/dev/mps/mps_mapping.c Mon Feb 1 02:04:40 2016 > (r295112) > +++ head/sys/dev/mps/mps_mapping.c Mon Feb 1 02:31:59 2016 > (r295113) > @@ -890,7 +890,7 @@ _mapping_get_dev_info(struct mps_softc * > u16 ioc_pg8_flags = le16toh(sc->ioc_pg8.Flags); > Mpi2ConfigReply_t mpi_reply; > Mpi2SasDevicePage0_t sas_device_pg0; > - u8 entry, enc_idx, phy_idx, sata_end_device; > + u8 entry, enc_idx, phy_idx; > u32 map_idx, index, device_info; > struct _map_phy_change *phy_change, *tmp_phy_change; > uint64_t sas_address; > @@ -920,10 +920,8 @@ _mapping_get_dev_info(struct mps_softc * > sas_address = sas_device_pg0.SASAddress.High; > sas_address = (sas_address << 32) | > sas_device_pg0.SASAddress.Low; > - sata_end_device = 0; > if ((device_info & MPI2_SAS_DEVICE_INFO_END_DEVICE) && > (device_info & MPI2_SAS_DEVICE_INFO_SATA_DEVICE)) { > - sata_end_device = 1; > rc = mpssas_get_sas_address_for_sata_disk(sc, > &sas_address, phy_change->dev_handle, > device_info, > &phy_change->is_SATA_SSD); > > Modified: head/sys/dev/mps/mps_sas.c > > ============================================================================== > --- head/sys/dev/mps/mps_sas.c Mon Feb 1 02:04:40 2016 (r295112) > +++ head/sys/dev/mps/mps_sas.c Mon Feb 1 02:31:59 2016 (r295113) > @@ -2797,11 +2797,9 @@ mpssas_send_smpcmd(struct mpssas_softc * > uint8_t *request, *response; > MPI2_SMP_PASSTHROUGH_REQUEST *req; > struct mps_softc *sc; > - struct sglist *sg; > int error; > > sc = sassc->sc; > - sg = NULL; > error = 0; > > /* > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > -- -- Marcelo Araujo (__)araujo@FreeBSD.org \\\'',)http://www.FreeBSD.org \/ \ ^ Power To Server. .\. /_) From owner-svn-src-all@freebsd.org Mon Feb 1 02:34:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F31DA757B0; Mon, 1 Feb 2016 02:34:00 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 215A21FA2; Mon, 1 Feb 2016 02:34:00 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u112Xx9o095752; Mon, 1 Feb 2016 02:33:59 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u112Xx2o095750; Mon, 1 Feb 2016 02:33:59 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201602010233.u112Xx2o095750@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Mon, 1 Feb 2016 02:33:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295114 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 02:34:00 -0000 Author: araujo Date: Mon Feb 1 02:33:58 2016 New Revision: 295114 URL: https://svnweb.freebsd.org/changeset/base/295114 Log: Clean up unused-but-set-variable spotted by gcc-4.9. Reviewed by: mav Approved by: rodrigc (mentor) MFC after: 2 weeks Sponsored by: gandi.net Differential Revision: https://reviews.freebsd.org/D5109 Modified: head/sys/cam/scsi/scsi_pass.c head/sys/cam/scsi/scsi_sa.c Modified: head/sys/cam/scsi/scsi_pass.c ============================================================================== --- head/sys/cam/scsi/scsi_pass.c Mon Feb 1 02:31:59 2016 (r295113) +++ head/sys/cam/scsi/scsi_pass.c Mon Feb 1 02:33:58 2016 (r295114) @@ -773,9 +773,6 @@ passclose(struct cdev *dev, int flag, in if (softc->open_count == 0) { struct pass_io_req *io_req, *io_req2; - int need_unlock; - - need_unlock = 0; TAILQ_FOREACH_SAFE(io_req, &softc->done_queue, links, io_req2) { TAILQ_REMOVE(&softc->done_queue, io_req, links); Modified: head/sys/cam/scsi/scsi_sa.c ============================================================================== --- head/sys/cam/scsi/scsi_sa.c Mon Feb 1 02:31:59 2016 (r295113) +++ head/sys/cam/scsi/scsi_sa.c Mon Feb 1 02:33:58 2016 (r295114) @@ -4961,10 +4961,6 @@ sasetpos(struct cam_periph *periph, int /*sense_len*/ SSD_FULL_SIZE, /*timeout*/ SPACE_TIMEOUT); } else { - uint32_t blk_pointer; - - blk_pointer = locate_info->logical_id; - scsi_locate_10(&ccb->csio, /*retries*/ 1, /*cbfcnp*/ sadone, From owner-svn-src-all@freebsd.org Mon Feb 1 03:24:39 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3301A748B5; Mon, 1 Feb 2016 03:24:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C39731C34; Mon, 1 Feb 2016 03:24:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u113Ocv2011072; Mon, 1 Feb 2016 03:24:38 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u113Oc6i011071; Mon, 1 Feb 2016 03:24:38 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201602010324.u113Oc6i011071@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 1 Feb 2016 03:24:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295115 - in stable: 10/release/doc/share/xml 9/release/doc/share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 03:24:40 -0000 Author: gjb Date: Mon Feb 1 03:24:38 2016 New Revision: 295115 URL: https://svnweb.freebsd.org/changeset/base/295115 Log: Document SA-16:11. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/9/release/doc/share/xml/security.xml Modified: stable/10/release/doc/share/xml/security.xml ============================================================================== --- stable/10/release/doc/share/xml/security.xml Mon Feb 1 02:33:58 2016 (r295114) +++ stable/10/release/doc/share/xml/security.xml Mon Feb 1 03:24:38 2016 (r295115) @@ -122,6 +122,14 @@ &man.issetugid.2; system call vulnerability. + + + FreeBSD-SA-16:11.openssl + 30 January 2016 + SSLv2 cipher suite downgrade + vulnerability. + From owner-svn-src-all@freebsd.org Mon Feb 1 03:24:40 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 332BCA748B9; Mon, 1 Feb 2016 03:24:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 041EF1C35; Mon, 1 Feb 2016 03:24:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u113Od0F011078; Mon, 1 Feb 2016 03:24:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u113Od8B011077; Mon, 1 Feb 2016 03:24:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201602010324.u113Od8B011077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 1 Feb 2016 03:24:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r295115 - in stable: 10/release/doc/share/xml 9/release/doc/share/xml X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 03:24:40 -0000 Author: gjb Date: Mon Feb 1 03:24:38 2016 New Revision: 295115 URL: https://svnweb.freebsd.org/changeset/base/295115 Log: Document SA-16:11. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/10/release/doc/share/xml/security.xml Modified: stable/9/release/doc/share/xml/security.xml ============================================================================== --- stable/9/release/doc/share/xml/security.xml Mon Feb 1 02:33:58 2016 (r295114) +++ stable/9/release/doc/share/xml/security.xml Mon Feb 1 03:24:38 2016 (r295115) @@ -336,6 +336,14 @@ &man.issetugid.2; system call vulnerability. + + + FreeBSD-SA-16:11.openssl + 30 January 2016 + SSLv2 cipher suite downgrade + vulnerability. + From owner-svn-src-all@freebsd.org Mon Feb 1 06:28:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6237A91108; Mon, 1 Feb 2016 06:28:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E6A71F47; Mon, 1 Feb 2016 06:28:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u116RxDZ064020; Mon, 1 Feb 2016 06:27:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u116RxId064019; Mon, 1 Feb 2016 06:27:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201602010627.u116RxId064019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 1 Feb 2016 06:27:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295117 - head/tests/sys/geom/class/gate X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 06:28:00 -0000 Author: ngie Date: Mon Feb 1 06:27:59 2016 New Revision: 295117 URL: https://svnweb.freebsd.org/changeset/base/295117 Log: Use the pidfile support added to ggated(8) in r294973 to ensure that the ggated(8) daemon used by the tests is the instance specifically invoked by the tests instead of one or more daemon instances running on the system MFC after: 1 month Sponsored by: EMC / Isilon Storage Division Modified: head/tests/sys/geom/class/gate/1_test.sh Modified: head/tests/sys/geom/class/gate/1_test.sh ============================================================================== --- head/tests/sys/geom/class/gate/1_test.sh Mon Feb 1 06:25:16 2016 (r295116) +++ head/tests/sys/geom/class/gate/1_test.sh Mon Feb 1 06:27:59 2016 (r295117) @@ -10,6 +10,7 @@ us=0 while [ -c /dev/ggate${us} ]; do : $(( us += 1 )) done +pidfile=ggated.$$.pid conf=`mktemp $base.XXXXXX` || exit 1 port=33080 @@ -19,7 +20,7 @@ src=$(attach_md -t malloc -s 1M) test_cleanup() { ggatec destroy -f -u $us - killall ggated + pkill -F $pidfile geom_test_cleanup } trap test_cleanup ABRT EXIT INT TERM @@ -30,7 +31,7 @@ src_checksum=$(md5 -q /dev/$src) echo "127.0.0.1 RW /dev/$work" > $conf -if ! ggated -p $port $conf; then +if ! ggated -p $port -F $pidfile $conf; then echo 'ggated failed to start' echo 'Bail out!' exit 1 From owner-svn-src-all@freebsd.org Mon Feb 1 06:25:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04045A96CC3; Mon, 1 Feb 2016 06:25:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C40681E07; Mon, 1 Feb 2016 06:25:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u116PGNd063764; Mon, 1 Feb 2016 06:25:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u116PGe7063763; Mon, 1 Feb 2016 06:25:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201602010625.u116PGe7063763@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 1 Feb 2016 06:25:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295116 - head/tests/sys/geom/class/gate X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 06:25:18 -0000 Author: ngie Date: Mon Feb 1 06:25:16 2016 New Revision: 295116 URL: https://svnweb.freebsd.org/changeset/base/295116 Log: Add an additional 1 second sleep to after calling ggatec before calling dd to defeat a race when writing out to the geom_gate(4) device This will quell the Jenkins failure emails until I come up with a better solution MFC after: 1 month Reported by: Jenkins Sponsored by: EMC / Isilon Storage Division Modified: head/tests/sys/geom/class/gate/1_test.sh Modified: head/tests/sys/geom/class/gate/1_test.sh ============================================================================== --- head/tests/sys/geom/class/gate/1_test.sh Mon Feb 1 03:24:38 2016 (r295115) +++ head/tests/sys/geom/class/gate/1_test.sh Mon Feb 1 06:25:16 2016 (r295116) @@ -41,6 +41,7 @@ if ! ggatec create -p $port -u $us 127.0 echo 'Bail out!' exit 1 fi +sleep 1 dd if=/dev/${src} of=/dev/ggate${us} bs=1m count=1 sleep 1 From owner-svn-src-all@freebsd.org Mon Feb 1 07:09:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC308A74DB1; Mon, 1 Feb 2016 07:09:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89D6D195A; Mon, 1 Feb 2016 07:09:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u117983p075869; Mon, 1 Feb 2016 07:09:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u11798x2075868; Mon, 1 Feb 2016 07:09:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201602010709.u11798x2075868@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 1 Feb 2016 07:09:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295118 - head/contrib/smbfs/smbutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 07:09:09 -0000 Author: ngie Date: Mon Feb 1 07:09:08 2016 New Revision: 295118 URL: https://svnweb.freebsd.org/changeset/base/295118 Log: Add #include to mute warning from clang/gcc about implicitly declaring strcmp(3) MFC after: 1 month Reported by: Jenkins Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/smbfs/smbutil/print.c Modified: head/contrib/smbfs/smbutil/print.c ============================================================================== --- head/contrib/smbfs/smbutil/print.c Mon Feb 1 06:27:59 2016 (r295117) +++ head/contrib/smbfs/smbutil/print.c Mon Feb 1 07:09:08 2016 (r295118) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include From owner-svn-src-all@freebsd.org Mon Feb 1 07:15:32 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6620A9727E; Mon, 1 Feb 2016 07:15:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78A171DEF; Mon, 1 Feb 2016 07:15:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u117FVfY078688; Mon, 1 Feb 2016 07:15:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u117FVMl078687; Mon, 1 Feb 2016 07:15:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201602010715.u117FVMl078687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 1 Feb 2016 07:15:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295119 - head/sbin/rcorder X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 07:15:32 -0000 Author: ngie Date: Mon Feb 1 07:15:31 2016 New Revision: 295119 URL: https://svnweb.freebsd.org/changeset/base/295119 Log: Remove `r_tmp` to fix a -Wunused-but-set-variable warning with gcc 4.9 MFC after: 1 month Sponsored by: EMC / Isilon Storage Division Modified: head/sbin/rcorder/rcorder.c Modified: head/sbin/rcorder/rcorder.c ============================================================================== --- head/sbin/rcorder/rcorder.c Mon Feb 1 07:09:08 2016 (r295118) +++ head/sbin/rcorder/rcorder.c Mon Feb 1 07:15:31 2016 (r295119) @@ -701,7 +701,7 @@ keep_ok(filenode *fnode) static void do_file(filenode *fnode) { - f_reqnode *r, *r_tmp; + f_reqnode *r; f_provnode *p, *p_tmp; provnode *pnode; int was_set; @@ -728,13 +728,8 @@ do_file(filenode *fnode) */ r = fnode->req_list; while (r != NULL) { - r_tmp = r; satisfy_req(r, fnode->filename); r = r->next; -#if 0 - if (was_set == 0) - free(r_tmp); -#endif } fnode->req_list = NULL; From owner-svn-src-all@freebsd.org Mon Feb 1 08:06:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86597A753CF; Mon, 1 Feb 2016 08:06:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5490713AE; Mon, 1 Feb 2016 08:06:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1186HV6093312; Mon, 1 Feb 2016 08:06:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1186Hqc093311; Mon, 1 Feb 2016 08:06:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201602010806.u1186Hqc093311@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 1 Feb 2016 08:06:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295121 - head/sbin/swapon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 08:06:18 -0000 Author: ngie Date: Mon Feb 1 08:06:17 2016 New Revision: 295121 URL: https://svnweb.freebsd.org/changeset/base/295121 Log: Delete argsize to fix a -Wunused-but-set-variable warning with gcc 4.9 The variable isn't actually checked -- just the end result which gets returned from the function Differential Revision: https://reviews.freebsd.org/D5156 Reviewed by: araujo, delphij MFC after: 1 month Sponsored by: EMC / Isilon Storage Division Modified: head/sbin/swapon/swapon.c Modified: head/sbin/swapon/swapon.c ============================================================================== --- head/sbin/swapon/swapon.c Mon Feb 1 07:39:57 2016 (r295120) +++ head/sbin/swapon/swapon.c Mon Feb 1 08:06:17 2016 (r295121) @@ -315,7 +315,7 @@ swap_on_geli_args(const char *mntops) const char *aalgo, *ealgo, *keylen_str, *sectorsize_str; const char *aflag, *eflag, *lflag, *Tflag, *sflag; char *p, *args, *token, *string, *ops; - int argsize, pagesize; + int pagesize; size_t pagesize_len; u_long ul; @@ -389,7 +389,7 @@ swap_on_geli_args(const char *mntops) sectorsize_str = p; } - argsize = asprintf(&args, "%s%s%s%s%s%s%s%s%s -d", + (void)asprintf(&args, "%s%s%s%s%s%s%s%s%s -d", aflag, aalgo, eflag, ealgo, lflag, keylen_str, Tflag, sflag, sectorsize_str); From owner-svn-src-all@freebsd.org Mon Feb 1 13:13:55 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9CE3A74E1D; Mon, 1 Feb 2016 13:13:55 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAAC3EBB; Mon, 1 Feb 2016 13:13:55 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u11DDs2J086783; Mon, 1 Feb 2016 13:13:54 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u11DDst1086777; Mon, 1 Feb 2016 13:13:54 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201602011313.u11DDst1086777@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Mon, 1 Feb 2016 13:13:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295122 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 13:13:56 -0000 Author: mmel Date: Mon Feb 1 13:13:53 2016 New Revision: 295122 URL: https://svnweb.freebsd.org/changeset/base/295122 Log: ARM: Remove never used cpu_tlb_flushI and cpu_tlb_flushI_SE() functions and their implementations. Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/cpufunc_asm_arm10.S head/sys/arm/arm/cpufunc_asm_arm11.S head/sys/arm/arm/cpufunc_asm_armv4.S head/sys/arm/arm/cpufunc_asm_fa526.S head/sys/arm/include/cpufunc.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Mon Feb 1 08:06:17 2016 (r295121) +++ head/sys/arm/arm/cpufunc.c Mon Feb 1 13:13:53 2016 (r295122) @@ -116,8 +116,6 @@ struct cpu_functions arm9_cpufuncs = { armv4_tlb_flushID, /* tlb_flushID */ arm9_tlb_flushID_SE, /* tlb_flushID_SE */ - armv4_tlb_flushI, /* tlb_flushI */ - (void *)armv4_tlb_flushI, /* tlb_flushI_SE */ armv4_tlb_flushD, /* tlb_flushD */ armv4_tlb_flushD_SE, /* tlb_flushD_SE */ @@ -171,8 +169,6 @@ struct cpu_functions armv5_ec_cpufuncs = armv4_tlb_flushID, /* tlb_flushID */ arm10_tlb_flushID_SE, /* tlb_flushID_SE */ - armv4_tlb_flushI, /* tlb_flushI */ - arm10_tlb_flushI_SE, /* tlb_flushI_SE */ armv4_tlb_flushD, /* tlb_flushD */ armv4_tlb_flushD_SE, /* tlb_flushD_SE */ @@ -280,8 +276,6 @@ struct cpu_functions pj4bv7_cpufuncs = { armv7_tlb_flushID, /* tlb_flushID */ armv7_tlb_flushID_SE, /* tlb_flushID_SE */ - armv7_tlb_flushID, /* tlb_flushI */ - armv7_tlb_flushID_SE, /* tlb_flushI_SE */ armv7_tlb_flushID, /* tlb_flushD */ armv7_tlb_flushID_SE, /* tlb_flushD_SE */ @@ -336,8 +330,6 @@ struct cpu_functions xscale_cpufuncs = { armv4_tlb_flushID, /* tlb_flushID */ xscale_tlb_flushID_SE, /* tlb_flushID_SE */ - armv4_tlb_flushI, /* tlb_flushI */ - (void *)armv4_tlb_flushI, /* tlb_flushI_SE */ armv4_tlb_flushD, /* tlb_flushD */ armv4_tlb_flushD_SE, /* tlb_flushD_SE */ @@ -392,8 +384,6 @@ struct cpu_functions xscalec3_cpufuncs = armv4_tlb_flushID, /* tlb_flushID */ xscale_tlb_flushID_SE, /* tlb_flushID_SE */ - armv4_tlb_flushI, /* tlb_flushI */ - (void *)armv4_tlb_flushI, /* tlb_flushI_SE */ armv4_tlb_flushD, /* tlb_flushD */ armv4_tlb_flushD_SE, /* tlb_flushD_SE */ @@ -447,8 +437,6 @@ struct cpu_functions fa526_cpufuncs = { armv4_tlb_flushID, /* tlb_flushID */ fa526_tlb_flushID_SE, /* tlb_flushID_SE */ - armv4_tlb_flushI, /* tlb_flushI */ - fa526_tlb_flushI_SE, /* tlb_flushI_SE */ armv4_tlb_flushD, /* tlb_flushD */ armv4_tlb_flushD_SE, /* tlb_flushD_SE */ @@ -502,8 +490,6 @@ struct cpu_functions arm1176_cpufuncs = arm11_tlb_flushID, /* tlb_flushID */ arm11_tlb_flushID_SE, /* tlb_flushID_SE */ - arm11_tlb_flushI, /* tlb_flushI */ - arm11_tlb_flushI_SE, /* tlb_flushI_SE */ arm11_tlb_flushD, /* tlb_flushD */ arm11_tlb_flushD_SE, /* tlb_flushD_SE */ @@ -561,8 +547,6 @@ struct cpu_functions cortexa_cpufuncs = armv7_tlb_flushID, /* tlb_flushID */ armv7_tlb_flushID_SE, /* tlb_flushID_SE */ - armv7_tlb_flushID, /* tlb_flushI */ - armv7_tlb_flushID_SE, /* tlb_flushI_SE */ armv7_tlb_flushID, /* tlb_flushD */ armv7_tlb_flushID_SE, /* tlb_flushD_SE */ Modified: head/sys/arm/arm/cpufunc_asm_arm10.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_arm10.S Mon Feb 1 08:06:17 2016 (r295121) +++ head/sys/arm/arm/cpufunc_asm_arm10.S Mon Feb 1 13:13:53 2016 (r295122) @@ -44,11 +44,6 @@ ENTRY(arm10_tlb_flushID_SE) bx lr END(arm10_tlb_flushID_SE) -ENTRY(arm10_tlb_flushI_SE) - mcr p15, 0, r0, c8, c5, 1 /* flush I tlb single entry */ - bx lr -END(arm10_tlb_flushI_SE) - /* * Context switch. Modified: head/sys/arm/arm/cpufunc_asm_arm11.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_arm11.S Mon Feb 1 08:06:17 2016 (r295121) +++ head/sys/arm/arm/cpufunc_asm_arm11.S Mon Feb 1 13:13:53 2016 (r295122) @@ -47,12 +47,6 @@ ENTRY(arm11_tlb_flushID_SE) RET END(arm11_tlb_flushID_SE) -ENTRY(arm11_tlb_flushI_SE) - mcr p15, 0, r0, c8, c5, 1 /* flush I tlb single entry */ - mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ - RET -END(arm11_tlb_flushI_SE) - /* * Context switch. * @@ -87,12 +81,6 @@ ENTRY(arm11_tlb_flushID) mov pc, lr END(arm11_tlb_flushID) -ENTRY(arm11_tlb_flushI) - mcr p15, 0, r0, c8, c5, 0 /* flush I tlb */ - mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ - mov pc, lr -END(arm11_tlb_flushI) - ENTRY(arm11_tlb_flushD) mcr p15, 0, r0, c8, c6, 0 /* flush D tlb */ mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ Modified: head/sys/arm/arm/cpufunc_asm_armv4.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_armv4.S Mon Feb 1 08:06:17 2016 (r295121) +++ head/sys/arm/arm/cpufunc_asm_armv4.S Mon Feb 1 13:13:53 2016 (r295122) @@ -48,11 +48,6 @@ ENTRY(armv4_tlb_flushID) RET END(armv4_tlb_flushID) -ENTRY(armv4_tlb_flushI) - mcr p15, 0, r0, c8, c5, 0 /* flush I tlb */ - RET -END(armv4_tlb_flushI) - ENTRY(armv4_tlb_flushD) mcr p15, 0, r0, c8, c6, 0 /* flush D tlb */ RET Modified: head/sys/arm/arm/cpufunc_asm_fa526.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_fa526.S Mon Feb 1 08:06:17 2016 (r295121) +++ head/sys/arm/arm/cpufunc_asm_fa526.S Mon Feb 1 13:13:53 2016 (r295122) @@ -64,14 +64,6 @@ ENTRY(fa526_tlb_flushID_SE) mov pc, lr END(fa526_tlb_flushID_SE) -/* - * TLB functions - */ -ENTRY(fa526_tlb_flushI_SE) - mcr p15, 0, r0, c8, c5, 1 /* flush Itlb single entry */ - mov pc, lr -END(fa526_tlb_flushI_SE) - ENTRY(fa526_cpu_sleep) mov r0, #0 /* nop Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Mon Feb 1 08:06:17 2016 (r295121) +++ head/sys/arm/include/cpufunc.h Mon Feb 1 13:13:53 2016 (r295122) @@ -71,8 +71,6 @@ struct cpu_functions { void (*cf_tlb_flushID) (void); void (*cf_tlb_flushID_SE) (u_int va); - void (*cf_tlb_flushI) (void); - void (*cf_tlb_flushI_SE) (u_int va); void (*cf_tlb_flushD) (void); void (*cf_tlb_flushD_SE) (u_int va); @@ -173,8 +171,6 @@ extern u_int cputype; #define cpu_tlb_flushID() cpufuncs.cf_tlb_flushID() #define cpu_tlb_flushID_SE(e) cpufuncs.cf_tlb_flushID_SE(e) -#define cpu_tlb_flushI() cpufuncs.cf_tlb_flushI() -#define cpu_tlb_flushI_SE(e) cpufuncs.cf_tlb_flushI_SE(e) #define cpu_tlb_flushD() cpufuncs.cf_tlb_flushD() #define cpu_tlb_flushD_SE(e) cpufuncs.cf_tlb_flushD_SE(e) @@ -218,7 +214,6 @@ void fa526_setup (void); void fa526_setttb (u_int ttb); void fa526_context_switch (void); void fa526_cpu_sleep (int); -void fa526_tlb_flushI_SE (u_int); void fa526_tlb_flushID_SE (u_int); void fa526_flush_prefetchbuf (void); @@ -261,7 +256,6 @@ extern unsigned arm9_dcache_index_inc; #if defined(CPU_ARM9E) void arm10_tlb_flushID_SE (u_int); -void arm10_tlb_flushI_SE (u_int); void arm10_context_switch (void); @@ -316,8 +310,6 @@ void pj4bv7_setup (void); #if defined(CPU_ARM1176) void arm11_tlb_flushID (void); void arm11_tlb_flushID_SE (u_int); -void arm11_tlb_flushI (void); -void arm11_tlb_flushI_SE (u_int); void arm11_tlb_flushD (void); void arm11_tlb_flushD_SE (u_int va); @@ -364,7 +356,6 @@ void armv5_ec_idcache_wbinv_range(vm_off defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) void armv4_tlb_flushID (void); -void armv4_tlb_flushI (void); void armv4_tlb_flushD (void); void armv4_tlb_flushD_SE (u_int va); From owner-svn-src-all@freebsd.org Mon Feb 1 14:29:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 987E5A97671; Mon, 1 Feb 2016 14:29:00 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FC1F1431; Mon, 1 Feb 2016 14:29:00 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u11ESxus007638; Mon, 1 Feb 2016 14:28:59 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u11ESwst007632; Mon, 1 Feb 2016 14:28:58 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201602011428.u11ESwst007632@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Mon, 1 Feb 2016 14:28:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295123 - in head/sys/arm: arm mv/armadaxp ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 14:29:00 -0000 Author: mmel Date: Mon Feb 1 14:28:58 2016 New Revision: 295123 URL: https://svnweb.freebsd.org/changeset/base/295123 Log: ARM: Rename remaining instances of cpufunc_id() to cpu_ident(), forgotten in r295096. Remove tlb_flushI/tlb_flushI_SE functions forgotten in r295122. Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/elf_trampoline.c head/sys/arm/arm/pmap.c head/sys/arm/mv/armadaxp/armadaxp.c head/sys/arm/mv/armadaxp/armadaxp_mp.c head/sys/arm/ti/ti_cpuid.c Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Mon Feb 1 13:13:53 2016 (r295122) +++ head/sys/arm/arm/cpufunc.c Mon Feb 1 14:28:58 2016 (r295123) @@ -221,8 +221,6 @@ struct cpu_functions sheeva_cpufuncs = { armv4_tlb_flushID, /* tlb_flushID */ arm10_tlb_flushID_SE, /* tlb_flushID_SE */ - armv4_tlb_flushI, /* tlb_flushI */ - arm10_tlb_flushI_SE, /* tlb_flushI_SE */ armv4_tlb_flushD, /* tlb_flushD */ armv4_tlb_flushD_SE, /* tlb_flushD_SE */ Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Mon Feb 1 13:13:53 2016 (r295122) +++ head/sys/arm/arm/elf_trampoline.c Mon Feb 1 14:28:58 2016 (r295123) @@ -49,7 +49,7 @@ void _start(void); void __start(void); void __startC(void); -extern unsigned int cpufunc_id(void); +extern unsigned int cpu_ident(void); extern void armv6_idcache_wbinv_all(void); extern void armv7_idcache_wbinv_all(void); extern void do_call(void *, void *, void *, int); @@ -248,7 +248,7 @@ _startC(void) #ifndef KZIP #ifdef CPU_ARM9 /* So that idcache_wbinv works; */ - if ((cpufunc_id() & 0x0000f000) == 0x00009000) + if ((cpu_ident() & 0x0000f000) == 0x00009000) arm9_setup(); #endif #endif @@ -266,7 +266,7 @@ get_cachetype_cp15() __asm __volatile("mrc p15, 0, %0, c0, c0, 1" : "=r" (ctype)); - cpuid = cpufunc_id(); + cpuid = cpu_ident(); /* * ...and thus spake the ARM ARM: * @@ -683,7 +683,7 @@ __start(void) #ifdef CPU_ARM9 /* So that idcache_wbinv works; */ - if ((cpufunc_id() & 0x0000f000) == 0x00009000) + if ((cpu_ident() & 0x0000f000) == 0x00009000) arm9_setup(); #endif setup_pagetables(pt_addr, (vm_paddr_t)curaddr, Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Mon Feb 1 13:13:53 2016 (r295122) +++ head/sys/arm/arm/pmap.c Mon Feb 1 14:28:58 2016 (r295123) @@ -561,7 +561,7 @@ pmap_pte_init_xscale(void) { uint32_t id, type; - id = cpufunc_id(); + id = cpu_ident(); type = id & ~(CPU_ID_XSCALE_COREREV_MASK|CPU_ID_REVISION_MASK); if (type == CPU_ID_PXA250 || type == CPU_ID_PXA210) { Modified: head/sys/arm/mv/armadaxp/armadaxp.c ============================================================================== --- head/sys/arm/mv/armadaxp/armadaxp.c Mon Feb 1 13:13:53 2016 (r295122) +++ head/sys/arm/mv/armadaxp/armadaxp.c Mon Feb 1 14:28:58 2016 (r295123) @@ -128,7 +128,7 @@ get_tclk(void) { uint32_t cputype; - cputype = cpufunc_id(); + cputype = cpu_ident(); cputype &= CPU_ID_CPU_MASK; if (cputype == CPU_ID_MV88SV584X_V7) Modified: head/sys/arm/mv/armadaxp/armadaxp_mp.c ============================================================================== --- head/sys/arm/mv/armadaxp/armadaxp_mp.c Mon Feb 1 13:13:53 2016 (r295122) +++ head/sys/arm/mv/armadaxp/armadaxp_mp.c Mon Feb 1 14:28:58 2016 (r295123) @@ -111,7 +111,7 @@ platform_mp_start_ap(void) * Initialization procedure depends on core revision, * in this step CHIP ID is checked to choose proper procedure */ - cputype = cpufunc_id(); + cputype = cpu_ident(); cputype &= CPU_ID_CPU_MASK; /* Modified: head/sys/arm/ti/ti_cpuid.c ============================================================================== --- head/sys/arm/ti/ti_cpuid.c Mon Feb 1 13:13:53 2016 (r295122) +++ head/sys/arm/ti/ti_cpuid.c Mon Feb 1 14:28:58 2016 (r295123) @@ -120,7 +120,7 @@ omap4_get_revision(void) * the ARM cpuid to get the correct revision. */ if (revision == 0) { - id_code = cpufunc_id(); + id_code = cpu_ident(); revision = (id_code & 0xf) - 1; } From owner-svn-src-all@freebsd.org Mon Feb 1 14:56:13 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3603FA75274; Mon, 1 Feb 2016 14:56:13 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02A3E8DF; Mon, 1 Feb 2016 14:56:12 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u11EuCFT016433; Mon, 1 Feb 2016 14:56:12 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u11EuBDE016423; Mon, 1 Feb 2016 14:56:11 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201602011456.u11EuBDE016423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Mon, 1 Feb 2016 14:56:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295124 - in stable/10: lib/libvmmapi share/examples/bhyve sys/amd64/include sys/amd64/vmm sys/amd64/vmm/amd sys/amd64/vmm/intel sys/amd64/vmm/io sys/sys usr.sbin/bhyve usr.sbin/bhyvect... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 14:56:13 -0000 Author: grehan Date: Mon Feb 1 14:56:11 2016 New Revision: 295124 URL: https://svnweb.freebsd.org/changeset/base/295124 Log: MFC r284539, r284630, r284688, r284877, r285217, r285218, r286837, r286838, r288470, r288522, r288524, r288826, r289001 Pull in bhyve bug fixes and changes to allow UEFI booting. This provides Windows support. Tested on Intel and AMD with: - Arch Linux i386+amd64 (kernel 4.3.3) - Ubuntu 15.10 server 64-bit - FreeBSD-CURRENT/amd64 20160127 snap - FreeBSD 10.2 i386+amd64 - OpenBSD 5.8 i386+amd64 - SmartOS latest - Windows 10 build 1511' Huge thanks to Yamagi Burmeister who submitted the patch and did the majority of the testing. r284539 - bootrom mem allocation support r284630 - Add SO_REUSEADDR when starting debug port r284688 - Fix a regression in "movs" emulation r284877 - verify_gla() non-zero segment base fix r285217 - Always assert DCD and DSR in the uart r285218 - devmem nodes moved to /dev/vmm.io/ r286837 - Add define for SATA Check-Power-Mode r286838 - Add simple (no-op) SATA cmd emulations r288470 - Increase virtio-blk indirect descs r288522 - Firmware guest query interface r288524 - Fix post-test typo r288826 - Clean up SATA unimplemented cmd msg r289001 - Add -l option to specify userboot path Submitted by: Yamagi Burmeister Approved by: re (kib) Added: stable/10/usr.sbin/bhyve/bootrom.c - copied unchanged from r284539, head/usr.sbin/bhyve/bootrom.c stable/10/usr.sbin/bhyve/bootrom.h - copied unchanged from r284539, head/usr.sbin/bhyve/bootrom.h stable/10/usr.sbin/bhyve/fwctl.c - copied, changed from r288522, head/usr.sbin/bhyve/fwctl.c stable/10/usr.sbin/bhyve/fwctl.h - copied unchanged from r288522, head/usr.sbin/bhyve/fwctl.h Modified: stable/10/lib/libvmmapi/vmmapi.c stable/10/lib/libvmmapi/vmmapi.h stable/10/share/examples/bhyve/vmrun.sh stable/10/sys/amd64/include/vmm.h stable/10/sys/amd64/include/vmm_dev.h stable/10/sys/amd64/vmm/amd/svm.c stable/10/sys/amd64/vmm/intel/vmx.c stable/10/sys/amd64/vmm/io/ppt.c stable/10/sys/amd64/vmm/vmm.c stable/10/sys/amd64/vmm/vmm_dev.c stable/10/sys/amd64/vmm/vmm_instruction_emul.c stable/10/sys/amd64/vmm/vmm_mem.c stable/10/sys/amd64/vmm/vmm_mem.h stable/10/sys/sys/ata.h stable/10/usr.sbin/bhyve/Makefile stable/10/usr.sbin/bhyve/bhyve.8 stable/10/usr.sbin/bhyve/bhyverun.c stable/10/usr.sbin/bhyve/dbgport.c stable/10/usr.sbin/bhyve/pci_ahci.c stable/10/usr.sbin/bhyve/pci_lpc.c stable/10/usr.sbin/bhyve/pci_lpc.h stable/10/usr.sbin/bhyve/pci_passthru.c stable/10/usr.sbin/bhyve/pci_virtio_net.c stable/10/usr.sbin/bhyve/uart_emul.c stable/10/usr.sbin/bhyvectl/bhyvectl.c stable/10/usr.sbin/bhyveload/bhyveload.8 stable/10/usr.sbin/bhyveload/bhyveload.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libvmmapi/vmmapi.c ============================================================================== --- stable/10/lib/libvmmapi/vmmapi.c Mon Feb 1 14:28:58 2016 (r295123) +++ stable/10/lib/libvmmapi/vmmapi.c Mon Feb 1 14:56:11 2016 (r295124) @@ -58,15 +58,23 @@ __FBSDID("$FreeBSD$"); #define MB (1024 * 1024UL) #define GB (1024 * 1024 * 1024UL) +/* + * Size of the guard region before and after the virtual address space + * mapping the guest physical memory. This must be a multiple of the + * superpage size for performance reasons. + */ +#define VM_MMAP_GUARD_SIZE (4 * MB) + +#define PROT_RW (PROT_READ | PROT_WRITE) +#define PROT_ALL (PROT_READ | PROT_WRITE | PROT_EXEC) + struct vmctx { int fd; uint32_t lowmem_limit; - enum vm_mmap_style vms; int memflags; size_t lowmem; - char *lowmem_addr; size_t highmem; - char *highmem_addr; + char *baseaddr; char *name; }; @@ -157,22 +165,6 @@ vm_parse_memsize(const char *optarg, siz return (error); } -int -vm_get_memory_seg(struct vmctx *ctx, vm_paddr_t gpa, size_t *ret_len, - int *wired) -{ - int error; - struct vm_memory_segment seg; - - bzero(&seg, sizeof(seg)); - seg.gpa = gpa; - error = ioctl(ctx->fd, VM_GET_MEMORY_SEG, &seg); - *ret_len = seg.len; - if (wired != NULL) - *wired = seg.wired; - return (error); -} - uint32_t vm_get_lowmem_limit(struct vmctx *ctx) { @@ -194,39 +186,184 @@ vm_set_memflags(struct vmctx *ctx, int f ctx->memflags = flags; } +int +vm_get_memflags(struct vmctx *ctx) +{ + + return (ctx->memflags); +} + +/* + * Map segment 'segid' starting at 'off' into guest address range [gpa,gpa+len). + */ +int +vm_mmap_memseg(struct vmctx *ctx, vm_paddr_t gpa, int segid, vm_ooffset_t off, + size_t len, int prot) +{ + struct vm_memmap memmap; + int error, flags; + + memmap.gpa = gpa; + memmap.segid = segid; + memmap.segoff = off; + memmap.len = len; + memmap.prot = prot; + memmap.flags = 0; + + if (ctx->memflags & VM_MEM_F_WIRED) + memmap.flags |= VM_MEMMAP_F_WIRED; + + /* + * If this mapping already exists then don't create it again. This + * is the common case for SYSMEM mappings created by bhyveload(8). + */ + error = vm_mmap_getnext(ctx, &gpa, &segid, &off, &len, &prot, &flags); + if (error == 0 && gpa == memmap.gpa) { + if (segid != memmap.segid || off != memmap.segoff || + prot != memmap.prot || flags != memmap.flags) { + errno = EEXIST; + return (-1); + } else { + return (0); + } + } + + error = ioctl(ctx->fd, VM_MMAP_MEMSEG, &memmap); + return (error); +} + +int +vm_mmap_getnext(struct vmctx *ctx, vm_paddr_t *gpa, int *segid, + vm_ooffset_t *segoff, size_t *len, int *prot, int *flags) +{ + struct vm_memmap memmap; + int error; + + bzero(&memmap, sizeof(struct vm_memmap)); + memmap.gpa = *gpa; + error = ioctl(ctx->fd, VM_MMAP_GETNEXT, &memmap); + if (error == 0) { + *gpa = memmap.gpa; + *segid = memmap.segid; + *segoff = memmap.segoff; + *len = memmap.len; + *prot = memmap.prot; + *flags = memmap.flags; + } + return (error); +} + +/* + * Return 0 if the segments are identical and non-zero otherwise. + * + * This is slightly complicated by the fact that only device memory segments + * are named. + */ static int -setup_memory_segment(struct vmctx *ctx, vm_paddr_t gpa, size_t len, char **addr) +cmpseg(size_t len, const char *str, size_t len2, const char *str2) { - int error, mmap_flags; - struct vm_memory_segment seg; + + if (len == len2) { + if ((!str && !str2) || (str && str2 && !strcmp(str, str2))) + return (0); + } + return (-1); +} + +static int +vm_alloc_memseg(struct vmctx *ctx, int segid, size_t len, const char *name) +{ + struct vm_memseg memseg; + size_t n; + int error; /* - * Create and optionally map 'len' bytes of memory at guest - * physical address 'gpa' + * If the memory segment has already been created then just return. + * This is the usual case for the SYSMEM segment created by userspace + * loaders like bhyveload(8). */ - bzero(&seg, sizeof(seg)); - seg.gpa = gpa; - seg.len = len; - error = ioctl(ctx->fd, VM_MAP_MEMORY, &seg); - if (error == 0 && addr != NULL) { - mmap_flags = MAP_SHARED; - if ((ctx->memflags & VM_MEM_F_INCORE) == 0) - mmap_flags |= MAP_NOCORE; - *addr = mmap(NULL, len, PROT_READ | PROT_WRITE, mmap_flags, - ctx->fd, gpa); + error = vm_get_memseg(ctx, segid, &memseg.len, memseg.name, + sizeof(memseg.name)); + if (error) + return (error); + + if (memseg.len != 0) { + if (cmpseg(len, name, memseg.len, VM_MEMSEG_NAME(&memseg))) { + errno = EINVAL; + return (-1); + } else { + return (0); + } + } + + bzero(&memseg, sizeof(struct vm_memseg)); + memseg.segid = segid; + memseg.len = len; + if (name != NULL) { + n = strlcpy(memseg.name, name, sizeof(memseg.name)); + if (n >= sizeof(memseg.name)) { + errno = ENAMETOOLONG; + return (-1); + } + } + + error = ioctl(ctx->fd, VM_ALLOC_MEMSEG, &memseg); + return (error); +} + +int +vm_get_memseg(struct vmctx *ctx, int segid, size_t *lenp, char *namebuf, + size_t bufsize) +{ + struct vm_memseg memseg; + size_t n; + int error; + + memseg.segid = segid; + error = ioctl(ctx->fd, VM_GET_MEMSEG, &memseg); + if (error == 0) { + *lenp = memseg.len; + n = strlcpy(namebuf, memseg.name, bufsize); + if (n >= bufsize) { + errno = ENAMETOOLONG; + error = -1; + } } return (error); } +static int +setup_memory_segment(struct vmctx *ctx, vm_paddr_t gpa, size_t len, char *base) +{ + char *ptr; + int error, flags; + + /* Map 'len' bytes starting at 'gpa' in the guest address space */ + error = vm_mmap_memseg(ctx, gpa, VM_SYSMEM, gpa, len, PROT_ALL); + if (error) + return (error); + + flags = MAP_SHARED | MAP_FIXED; + if ((ctx->memflags & VM_MEM_F_INCORE) == 0) + flags |= MAP_NOCORE; + + /* mmap into the process address space on the host */ + ptr = mmap(base + gpa, len, PROT_RW, flags, ctx->fd, gpa); + if (ptr == MAP_FAILED) + return (-1); + + return (0); +} + int vm_setup_memory(struct vmctx *ctx, size_t memsize, enum vm_mmap_style vms) { - char **addr; - int error; + size_t objsize, len; + vm_paddr_t gpa; + char *baseaddr, *ptr; + int error, flags; - /* XXX VM_MMAP_SPARSE not implemented yet */ - assert(vms == VM_MMAP_NONE || vms == VM_MMAP_ALL); - ctx->vms = vms; + assert(vms == VM_MMAP_ALL); /* * If 'memsize' cannot fit entirely in the 'lowmem' segment then @@ -234,43 +371,69 @@ vm_setup_memory(struct vmctx *ctx, size_ */ if (memsize > ctx->lowmem_limit) { ctx->lowmem = ctx->lowmem_limit; - ctx->highmem = memsize - ctx->lowmem; + ctx->highmem = memsize - ctx->lowmem_limit; + objsize = 4*GB + ctx->highmem; } else { ctx->lowmem = memsize; ctx->highmem = 0; + objsize = ctx->lowmem; } - if (ctx->lowmem > 0) { - addr = (vms == VM_MMAP_ALL) ? &ctx->lowmem_addr : NULL; - error = setup_memory_segment(ctx, 0, ctx->lowmem, addr); + error = vm_alloc_memseg(ctx, VM_SYSMEM, objsize, NULL); + if (error) + return (error); + + /* + * Stake out a contiguous region covering the guest physical memory + * and the adjoining guard regions. + */ + len = VM_MMAP_GUARD_SIZE + objsize + VM_MMAP_GUARD_SIZE; + flags = MAP_PRIVATE | MAP_ANON | MAP_NOCORE | MAP_ALIGNED_SUPER; + ptr = mmap(NULL, len, PROT_NONE, flags, -1, 0); + if (ptr == MAP_FAILED) + return (-1); + + baseaddr = ptr + VM_MMAP_GUARD_SIZE; + if (ctx->highmem > 0) { + gpa = 4*GB; + len = ctx->highmem; + error = setup_memory_segment(ctx, gpa, len, baseaddr); if (error) return (error); } - if (ctx->highmem > 0) { - addr = (vms == VM_MMAP_ALL) ? &ctx->highmem_addr : NULL; - error = setup_memory_segment(ctx, 4*GB, ctx->highmem, addr); + if (ctx->lowmem > 0) { + gpa = 0; + len = ctx->lowmem; + error = setup_memory_segment(ctx, gpa, len, baseaddr); if (error) return (error); } + ctx->baseaddr = baseaddr; + return (0); } +/* + * Returns a non-NULL pointer if [gaddr, gaddr+len) is entirely contained in + * the lowmem or highmem regions. + * + * In particular return NULL if [gaddr, gaddr+len) falls in guest MMIO region. + * The instruction emulation code depends on this behavior. + */ void * vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len) { - /* XXX VM_MMAP_SPARSE not implemented yet */ - assert(ctx->vms == VM_MMAP_ALL); - - if (gaddr < ctx->lowmem && gaddr + len <= ctx->lowmem) - return ((void *)(ctx->lowmem_addr + gaddr)); + if (ctx->lowmem > 0) { + if (gaddr < ctx->lowmem && gaddr + len <= ctx->lowmem) + return (ctx->baseaddr + gaddr); + } - if (gaddr >= 4*GB) { - gaddr -= 4*GB; - if (gaddr < ctx->highmem && gaddr + len <= ctx->highmem) - return ((void *)(ctx->highmem_addr + gaddr)); + if (ctx->highmem > 0) { + if (gaddr >= 4*GB && gaddr + len <= 4*GB + ctx->highmem) + return (ctx->baseaddr + gaddr); } return (NULL); @@ -290,6 +453,56 @@ vm_get_highmem_size(struct vmctx *ctx) return (ctx->highmem); } +void * +vm_create_devmem(struct vmctx *ctx, int segid, const char *name, size_t len) +{ + char pathname[MAXPATHLEN]; + size_t len2; + char *base, *ptr; + int fd, error, flags; + + fd = -1; + ptr = MAP_FAILED; + if (name == NULL || strlen(name) == 0) { + errno = EINVAL; + goto done; + } + + error = vm_alloc_memseg(ctx, segid, len, name); + if (error) + goto done; + + strlcpy(pathname, "/dev/vmm.io/", sizeof(pathname)); + strlcat(pathname, ctx->name, sizeof(pathname)); + strlcat(pathname, ".", sizeof(pathname)); + strlcat(pathname, name, sizeof(pathname)); + + fd = open(pathname, O_RDWR); + if (fd < 0) + goto done; + + /* + * Stake out a contiguous region covering the device memory and the + * adjoining guard regions. + */ + len2 = VM_MMAP_GUARD_SIZE + len + VM_MMAP_GUARD_SIZE; + flags = MAP_PRIVATE | MAP_ANON | MAP_NOCORE | MAP_ALIGNED_SUPER; + base = mmap(NULL, len2, PROT_NONE, flags, -1, 0); + if (base == MAP_FAILED) + goto done; + + flags = MAP_SHARED | MAP_FIXED; + if ((ctx->memflags & VM_MEM_F_INCORE) == 0) + flags |= MAP_NOCORE; + + /* mmap the devmem region in the host address space */ + ptr = mmap(base + VM_MMAP_GUARD_SIZE, len, PROT_RW, flags, fd, 0); +done: + if (fd >= 0) + close(fd); + return (ptr); +} + int vm_set_desc(struct vmctx *ctx, int vcpu, int reg, uint64_t base, uint32_t limit, uint32_t access) Modified: stable/10/lib/libvmmapi/vmmapi.h ============================================================================== --- stable/10/lib/libvmmapi/vmmapi.h Mon Feb 1 14:28:58 2016 (r295123) +++ stable/10/lib/libvmmapi/vmmapi.h Mon Feb 1 14:56:11 2016 (r295124) @@ -36,7 +36,7 @@ * API version for out-of-tree consumers like grub-bhyve for making compile * time decisions. */ -#define VMMAPI_VERSION 0101 /* 2 digit major followed by 2 digit minor */ +#define VMMAPI_VERSION 0102 /* 2 digit major followed by 2 digit minor */ struct iovec; struct vmctx; @@ -52,14 +52,59 @@ enum vm_mmap_style { VM_MMAP_SPARSE, /* mappings created on-demand */ }; +/* + * 'flags' value passed to 'vm_set_memflags()'. + */ #define VM_MEM_F_INCORE 0x01 /* include guest memory in core file */ +#define VM_MEM_F_WIRED 0x02 /* guest memory is wired */ + +/* + * Identifiers for memory segments: + * - vm_setup_memory() uses VM_SYSMEM for the system memory segment. + * - the remaining identifiers can be used to create devmem segments. + */ +enum { + VM_SYSMEM, + VM_BOOTROM, + VM_FRAMEBUFFER, +}; + +/* + * Get the length and name of the memory segment identified by 'segid'. + * Note that system memory segments are identified with a nul name. + * + * Returns 0 on success and non-zero otherwise. + */ +int vm_get_memseg(struct vmctx *ctx, int ident, size_t *lenp, char *name, + size_t namesiz); + +/* + * Iterate over the guest address space. This function finds an address range + * that starts at an address >= *gpa. + * + * Returns 0 if the next address range was found and non-zero otherwise. + */ +int vm_mmap_getnext(struct vmctx *ctx, vm_paddr_t *gpa, int *segid, + vm_ooffset_t *segoff, size_t *len, int *prot, int *flags); +/* + * Create a device memory segment identified by 'segid'. + * + * Returns a pointer to the memory segment on success and MAP_FAILED otherwise. + */ +void *vm_create_devmem(struct vmctx *ctx, int segid, const char *name, + size_t len); + +/* + * Map the memory segment identified by 'segid' into the guest address space + * at [gpa,gpa+len) with protection 'prot'. + */ +int vm_mmap_memseg(struct vmctx *ctx, vm_paddr_t gpa, int segid, + vm_ooffset_t segoff, size_t len, int prot); int vm_create(const char *name); struct vmctx *vm_open(const char *name); void vm_destroy(struct vmctx *ctx); int vm_parse_memsize(const char *optarg, size_t *memsize); -int vm_get_memory_seg(struct vmctx *ctx, vm_paddr_t gpa, size_t *ret_len, - int *wired); int vm_setup_memory(struct vmctx *ctx, size_t len, enum vm_mmap_style s); void *vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len); int vm_get_gpa_pmap(struct vmctx *, uint64_t gpa, uint64_t *pte, int *num); @@ -68,6 +113,7 @@ int vm_gla2gpa(struct vmctx *, int vcpui uint32_t vm_get_lowmem_limit(struct vmctx *ctx); void vm_set_lowmem_limit(struct vmctx *ctx, uint32_t limit); void vm_set_memflags(struct vmctx *ctx, int flags); +int vm_get_memflags(struct vmctx *ctx); size_t vm_get_lowmem_size(struct vmctx *ctx); size_t vm_get_highmem_size(struct vmctx *ctx); int vm_set_desc(struct vmctx *ctx, int vcpu, int reg, Modified: stable/10/share/examples/bhyve/vmrun.sh ============================================================================== --- stable/10/share/examples/bhyve/vmrun.sh Mon Feb 1 14:28:58 2016 (r295123) +++ stable/10/share/examples/bhyve/vmrun.sh Mon Feb 1 14:56:11 2016 (r295124) @@ -48,8 +48,8 @@ usage() { echo "Usage: vmrun.sh [-ahi] [-c ] [-C ] [-d ]" echo " [-e ] [-g ] [-H ]" - echo " [-I ] [-m ]" - echo " [-t ] " + echo " [-I ] [-l ]" + echo " [-m ] [-t ] " echo "" echo " -h: display this help message" echo " -a: force memory mapped local APIC access" @@ -61,6 +61,7 @@ usage() { echo " -H: host filesystem to export to the loader" echo " -i: force boot of the Installation CDROM image" echo " -I: Installation CDROM image location (default is ${DEFAULT_ISOFILE})" + echo " -l: the OS loader to use (default is /boot/userboot.so)" echo " -m: memory size (default is ${DEFAULT_MEMSIZE})" echo " -p: pass-through a host PCI device at bus/slot/func (e.g. 10/0/0)" echo " -t: tap device for virtio-net (default is $DEFAULT_TAPDEV)" @@ -87,15 +88,15 @@ console=${DEFAULT_CONSOLE} cpus=${DEFAULT_CPUS} tap_total=0 disk_total=0 -apic_opt="" gdbport=0 loader_opt="" +bhyverun_opt="-H -A -P" pass_total=0 -while getopts ac:C:d:e:g:hH:iI:m:p:t: c ; do +while getopts ac:C:d:e:g:hH:iI:l:m:p:t: c ; do case $c in a) - apic_opt="-a" + bhyverun_opt="${bhyverun_opt} -a" ;; c) cpus=${OPTARG} @@ -125,6 +126,9 @@ while getopts ac:C:d:e:g:hH:iI:m:p:t: c I) isofile=${OPTARG} ;; + l) + loader_opt="${loader_opt} -l ${OPTARG}" + ;; m) memsize=${OPTARG} ;; @@ -163,6 +167,12 @@ if [ -n "${host_base}" ]; then loader_opt="${loader_opt} -h ${host_base}" fi +# If PCI passthru devices are configured then guest memory must be wired +if [ ${pass_total} -gt 0 ]; then + loader_opt="${loader_opt} -S" + bhyverun_opt="${bhyverun_opt} -S" +fi + make_and_check_diskdev() { local virtio_diskdev="$1" @@ -263,7 +273,7 @@ while [ 1 ]; do i=$(($i + 1)) done - ${FBSDRUN} -c ${cpus} -m ${memsize} ${apic_opt} -A -H -P \ + ${FBSDRUN} -c ${cpus} -m ${memsize} ${bhyverun_opt} \ -g ${gdbport} \ -s 0:0,hostbridge \ -s 1:0,lpc \ Modified: stable/10/sys/amd64/include/vmm.h ============================================================================== --- stable/10/sys/amd64/include/vmm.h Mon Feb 1 14:28:58 2016 (r295123) +++ stable/10/sys/amd64/include/vmm.h Mon Feb 1 14:56:11 2016 (r295124) @@ -108,7 +108,6 @@ enum x2apic_state { struct vm; struct vm_exception; -struct vm_memory_segment; struct seg_desc; struct vm_exit; struct vm_run; @@ -175,17 +174,33 @@ int vm_create(const char *name, struct v void vm_destroy(struct vm *vm); int vm_reinit(struct vm *vm); const char *vm_name(struct vm *vm); -int vm_malloc(struct vm *vm, vm_paddr_t gpa, size_t len); + +/* + * APIs that modify the guest memory map require all vcpus to be frozen. + */ +int vm_mmap_memseg(struct vm *vm, vm_paddr_t gpa, int segid, vm_ooffset_t off, + size_t len, int prot, int flags); +int vm_alloc_memseg(struct vm *vm, int ident, size_t len, bool sysmem); +void vm_free_memseg(struct vm *vm, int ident); int vm_map_mmio(struct vm *vm, vm_paddr_t gpa, size_t len, vm_paddr_t hpa); int vm_unmap_mmio(struct vm *vm, vm_paddr_t gpa, size_t len); -void *vm_gpa_hold(struct vm *, vm_paddr_t gpa, size_t len, int prot, - void **cookie); +int vm_assign_pptdev(struct vm *vm, int bus, int slot, int func); +int vm_unassign_pptdev(struct vm *vm, int bus, int slot, int func); + +/* + * APIs that inspect the guest memory map require only a *single* vcpu to + * be frozen. This acts like a read lock on the guest memory map since any + * modification requires *all* vcpus to be frozen. + */ +int vm_mmap_getnext(struct vm *vm, vm_paddr_t *gpa, int *segid, + vm_ooffset_t *segoff, size_t *len, int *prot, int *flags); +int vm_get_memseg(struct vm *vm, int ident, size_t *len, bool *sysmem, + struct vm_object **objptr); +void *vm_gpa_hold(struct vm *, int vcpuid, vm_paddr_t gpa, size_t len, + int prot, void **cookie); void vm_gpa_release(void *cookie); -int vm_gpabase2memseg(struct vm *vm, vm_paddr_t gpabase, - struct vm_memory_segment *seg); -int vm_get_memobj(struct vm *vm, vm_paddr_t gpa, size_t len, - vm_offset_t *offset, struct vm_object **object); -boolean_t vm_mem_allocated(struct vm *vm, vm_paddr_t gpa); +bool vm_mem_allocated(struct vm *vm, int vcpuid, vm_paddr_t gpa); + int vm_get_register(struct vm *vm, int vcpu, int reg, uint64_t *retval); int vm_set_register(struct vm *vm, int vcpu, int reg, uint64_t val); int vm_get_seg_desc(struct vm *vm, int vcpu, int reg, @@ -302,8 +317,6 @@ vcpu_should_yield(struct vm *vm, int vcp void *vcpu_stats(struct vm *vm, int vcpu); void vcpu_notify_event(struct vm *vm, int vcpuid, bool lapic_intr); struct vmspace *vm_get_vmspace(struct vm *vm); -int vm_assign_pptdev(struct vm *vm, int bus, int slot, int func); -int vm_unassign_pptdev(struct vm *vm, int bus, int slot, int func); struct vatpic *vm_atpic(struct vm *vm); struct vatpit *vm_atpit(struct vm *vm); struct vpmtmr *vm_pmtmr(struct vm *vm); Modified: stable/10/sys/amd64/include/vmm_dev.h ============================================================================== --- stable/10/sys/amd64/include/vmm_dev.h Mon Feb 1 14:28:58 2016 (r295123) +++ stable/10/sys/amd64/include/vmm_dev.h Mon Feb 1 14:56:11 2016 (r295124) @@ -34,10 +34,22 @@ void vmmdev_init(void); int vmmdev_cleanup(void); #endif -struct vm_memory_segment { - vm_paddr_t gpa; /* in */ +struct vm_memmap { + vm_paddr_t gpa; + int segid; /* memory segment */ + vm_ooffset_t segoff; /* offset into memory segment */ + size_t len; /* mmap length */ + int prot; /* RWX */ + int flags; +}; +#define VM_MEMMAP_F_WIRED 0x01 +#define VM_MEMMAP_F_IOMMU 0x02 + +#define VM_MEMSEG_NAME(m) ((m)->name[0] != '\0' ? (m)->name : NULL) +struct vm_memseg { + int segid; size_t len; - int wired; + char name[SPECNAMELEN + 1]; }; struct vm_register { @@ -214,10 +226,14 @@ enum { IOCNUM_REINIT = 5, /* memory apis */ - IOCNUM_MAP_MEMORY = 10, - IOCNUM_GET_MEMORY_SEG = 11, + IOCNUM_MAP_MEMORY = 10, /* deprecated */ + IOCNUM_GET_MEMORY_SEG = 11, /* deprecated */ IOCNUM_GET_GPA_PMAP = 12, IOCNUM_GLA2GPA = 13, + IOCNUM_ALLOC_MEMSEG = 14, + IOCNUM_GET_MEMSEG = 15, + IOCNUM_MMAP_MEMSEG = 16, + IOCNUM_MMAP_GETNEXT = 17, /* register/state accessors */ IOCNUM_SET_REGISTER = 20, @@ -278,10 +294,14 @@ enum { _IOW('v', IOCNUM_SUSPEND, struct vm_suspend) #define VM_REINIT \ _IO('v', IOCNUM_REINIT) -#define VM_MAP_MEMORY \ - _IOWR('v', IOCNUM_MAP_MEMORY, struct vm_memory_segment) -#define VM_GET_MEMORY_SEG \ - _IOWR('v', IOCNUM_GET_MEMORY_SEG, struct vm_memory_segment) +#define VM_ALLOC_MEMSEG \ + _IOW('v', IOCNUM_ALLOC_MEMSEG, struct vm_memseg) +#define VM_GET_MEMSEG \ + _IOWR('v', IOCNUM_GET_MEMSEG, struct vm_memseg) +#define VM_MMAP_MEMSEG \ + _IOW('v', IOCNUM_MMAP_MEMSEG, struct vm_memmap) +#define VM_MMAP_GETNEXT \ + _IOWR('v', IOCNUM_MMAP_GETNEXT, struct vm_memmap) #define VM_SET_REGISTER \ _IOW('v', IOCNUM_SET_REGISTER, struct vm_register) #define VM_GET_REGISTER \ Modified: stable/10/sys/amd64/vmm/amd/svm.c ============================================================================== --- stable/10/sys/amd64/vmm/amd/svm.c Mon Feb 1 14:28:58 2016 (r295123) +++ stable/10/sys/amd64/vmm/amd/svm.c Mon Feb 1 14:56:11 2016 (r295124) @@ -1477,7 +1477,7 @@ svm_vmexit(struct svm_softc *svm_sc, int VCPU_CTR2(svm_sc->vm, vcpu, "nested page fault with " "reserved bits set: info1(%#lx) info2(%#lx)", info1, info2); - } else if (vm_mem_allocated(svm_sc->vm, info2)) { + } else if (vm_mem_allocated(svm_sc->vm, vcpu, info2)) { vmexit->exitcode = VM_EXITCODE_PAGING; vmexit->u.paging.gpa = info2; vmexit->u.paging.fault_type = npf_fault_type(info1); Modified: stable/10/sys/amd64/vmm/intel/vmx.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmx.c Mon Feb 1 14:28:58 2016 (r295123) +++ stable/10/sys/amd64/vmm/intel/vmx.c Mon Feb 1 14:56:11 2016 (r295124) @@ -2426,7 +2426,7 @@ vmx_exit_process(struct vmx *vmx, int vc * this must be an instruction that accesses MMIO space. */ gpa = vmcs_gpa(); - if (vm_mem_allocated(vmx->vm, gpa) || + if (vm_mem_allocated(vmx->vm, vcpu, gpa) || apic_access_fault(vmx, vcpu, gpa)) { vmexit->exitcode = VM_EXITCODE_PAGING; vmexit->inst_length = 0; Modified: stable/10/sys/amd64/vmm/io/ppt.c ============================================================================== --- stable/10/sys/amd64/vmm/io/ppt.c Mon Feb 1 14:28:58 2016 (r295123) +++ stable/10/sys/amd64/vmm/io/ppt.c Mon Feb 1 14:56:11 2016 (r295124) @@ -76,11 +76,17 @@ struct pptintr_arg { /* pptintr(pptin uint64_t msg_data; }; +struct pptseg { + vm_paddr_t gpa; + size_t len; + int wired; +}; + struct pptdev { device_t dev; struct vm *vm; /* owner of this device */ TAILQ_ENTRY(pptdev) next; - struct vm_memory_segment mmio[MAX_MMIOSEGS]; + struct pptseg mmio[MAX_MMIOSEGS]; struct { int num_msgs; /* guest state */ @@ -207,14 +213,14 @@ static void ppt_unmap_mmio(struct vm *vm, struct pptdev *ppt) { int i; - struct vm_memory_segment *seg; + struct pptseg *seg; for (i = 0; i < MAX_MMIOSEGS; i++) { seg = &ppt->mmio[i]; if (seg->len == 0) continue; (void)vm_unmap_mmio(vm, seg->gpa, seg->len); - bzero(seg, sizeof(struct vm_memory_segment)); + bzero(seg, sizeof(struct pptseg)); } } @@ -324,7 +330,7 @@ ppt_is_mmio(struct vm *vm, vm_paddr_t gp { int i; struct pptdev *ppt; - struct vm_memory_segment *seg; + struct pptseg *seg; TAILQ_FOREACH(ppt, &pptdev_list, next) { if (ppt->vm != vm) @@ -410,7 +416,7 @@ ppt_map_mmio(struct vm *vm, int bus, int vm_paddr_t gpa, size_t len, vm_paddr_t hpa) { int i, error; - struct vm_memory_segment *seg; + struct pptseg *seg; struct pptdev *ppt; ppt = ppt_find(bus, slot, func); Modified: stable/10/sys/amd64/vmm/vmm.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm.c Mon Feb 1 14:28:58 2016 (r295123) +++ stable/10/sys/amd64/vmm/vmm.c Mon Feb 1 14:56:11 2016 (r295124) @@ -120,12 +120,21 @@ struct vcpu { #define vcpu_assert_locked(v) mtx_assert(&((v)->mtx), MA_OWNED) struct mem_seg { + size_t len; + bool sysmem; + struct vm_object *object; +}; +#define VM_MAX_MEMSEGS 2 + +struct mem_map { vm_paddr_t gpa; size_t len; - boolean_t wired; - vm_object_t object; + vm_ooffset_t segoff; + int segid; + int prot; + int flags; }; -#define VM_MAX_MEMORY_SEGMENTS 2 +#define VM_MAX_MEMMAPS 4 /* * Initialization: @@ -151,8 +160,8 @@ struct vm { void *rendezvous_arg; /* (x) rendezvous func/arg */ vm_rendezvous_func_t rendezvous_func; struct mtx rendezvous_mtx; /* (o) rendezvous lock */ - int num_mem_segs; /* (o) guest memory segments */ - struct mem_seg mem_segs[VM_MAX_MEMORY_SEGMENTS]; + struct mem_map mem_maps[VM_MAX_MEMMAPS]; /* (i) guest address space */ + struct mem_seg mem_segs[VM_MAX_MEMSEGS]; /* (o) guest memory regions */ struct vmspace *vmspace; /* (o) guest's address space */ char name[VM_MAX_NAMELEN]; /* (o) virtual machine name */ struct vcpu vcpu[VM_MAXCPU]; /* (i) guest vcpus */ @@ -224,6 +233,8 @@ TUNABLE_INT("hw.vmm.force_iommu", &vmm_f SYSCTL_INT(_hw_vmm, OID_AUTO, force_iommu, CTLFLAG_RDTUN, &vmm_force_iommu, 0, "Force use of I/O MMU even if no passthrough devices were found."); +static void vm_free_memmap(struct vm *vm, int ident); +static bool sysmem_mapping(struct vm *vm, struct mem_map *mm); static void vcpu_notify_event_locked(struct vcpu *vcpu, bool lapic_intr); #ifdef KTR @@ -444,7 +455,6 @@ vm_create(const char *name, struct vm ** vm = malloc(sizeof(struct vm), M_VM, M_WAITOK | M_ZERO); strcpy(vm->name, name); - vm->num_mem_segs = 0; vm->vmspace = vmspace; mtx_init(&vm->rendezvous_mtx, "vm rendezvous lock", 0, MTX_DEF); @@ -455,18 +465,9 @@ vm_create(const char *name, struct vm ** } static void -vm_free_mem_seg(struct vm *vm, struct mem_seg *seg) -{ - - if (seg->object != NULL) - vmm_mem_free(vm->vmspace, seg->gpa, seg->len); - - bzero(seg, sizeof(*seg)); -} - -static void vm_cleanup(struct vm *vm, bool destroy) { + struct mem_map *mm; int i; ppt_unassign_all(vm); @@ -489,11 +490,23 @@ vm_cleanup(struct vm *vm, bool destroy) VMCLEANUP(vm->cookie); - if (destroy) { - for (i = 0; i < vm->num_mem_segs; i++) - vm_free_mem_seg(vm, &vm->mem_segs[i]); + /* + * System memory is removed from the guest address space only when + * the VM is destroyed. This is because the mapping remains the same + * across VM reset. + * + * Device memory can be relocated by the guest (e.g. using PCI BARs) + * so those mappings are removed on a VM reset. + */ + for (i = 0; i < VM_MAX_MEMMAPS; i++) { + mm = &vm->mem_maps[i]; + if (destroy || !sysmem_mapping(vm, mm)) + vm_free_memmap(vm, i); + } - vm->num_mem_segs = 0; + if (destroy) { + for (i = 0; i < VM_MAX_MEMSEGS; i++) + vm_free_memseg(vm, i); VMSPACE_FREE(vm->vmspace); vm->vmspace = NULL; @@ -551,146 +564,243 @@ vm_unmap_mmio(struct vm *vm, vm_paddr_t return (0); } -boolean_t -vm_mem_allocated(struct vm *vm, vm_paddr_t gpa) +/* + * Return 'true' if 'gpa' is allocated in the guest address space. + * + * This function is called in the context of a running vcpu which acts as + * an implicit lock on 'vm->mem_maps[]'. + */ +bool +vm_mem_allocated(struct vm *vm, int vcpuid, vm_paddr_t gpa) { + struct mem_map *mm; int i; - vm_paddr_t gpabase, gpalimit; - for (i = 0; i < vm->num_mem_segs; i++) { - gpabase = vm->mem_segs[i].gpa; - gpalimit = gpabase + vm->mem_segs[i].len; - if (gpa >= gpabase && gpa < gpalimit) - return (TRUE); /* 'gpa' is regular memory */ +#ifdef INVARIANTS + int hostcpu, state; + state = vcpu_get_state(vm, vcpuid, &hostcpu); + KASSERT(state == VCPU_RUNNING && hostcpu == curcpu, + ("%s: invalid vcpu state %d/%d", __func__, state, hostcpu)); +#endif + + for (i = 0; i < VM_MAX_MEMMAPS; i++) { + mm = &vm->mem_maps[i]; + if (mm->len != 0 && gpa >= mm->gpa && gpa < mm->gpa + mm->len) + return (true); /* 'gpa' is sysmem or devmem */ } if (ppt_is_mmio(vm, gpa)) - return (TRUE); /* 'gpa' is pci passthru mmio */ + return (true); /* 'gpa' is pci passthru mmio */ - return (FALSE); + return (false); } int -vm_malloc(struct vm *vm, vm_paddr_t gpa, size_t len) +vm_alloc_memseg(struct vm *vm, int ident, size_t len, bool sysmem) { - int available, allocated; struct mem_seg *seg; - vm_object_t object; - vm_paddr_t g; + vm_object_t obj; - if ((gpa & PAGE_MASK) || (len & PAGE_MASK) || len == 0) + if (ident < 0 || ident >= VM_MAX_MEMSEGS) return (EINVAL); - - available = allocated = 0; - g = gpa; - while (g < gpa + len) { - if (vm_mem_allocated(vm, g)) - allocated++; - else - available++; - g += PAGE_SIZE; - } - - /* - * If there are some allocated and some available pages in the address - * range then it is an error. - */ - if (allocated && available) + if (len == 0 || (len & PAGE_MASK)) return (EINVAL); - /* - * If the entire address range being requested has already been - * allocated then there isn't anything more to do. - */ - if (allocated && available == 0) - return (0); - - if (vm->num_mem_segs >= VM_MAX_MEMORY_SEGMENTS) - return (E2BIG); - - seg = &vm->mem_segs[vm->num_mem_segs]; + seg = &vm->mem_segs[ident]; + if (seg->object != NULL) { + if (seg->len == len && seg->sysmem == sysmem) + return (EEXIST); + else + return (EINVAL); + } - if ((object = vmm_mem_alloc(vm->vmspace, gpa, len)) == NULL) + obj = vm_object_allocate(OBJT_DEFAULT, len >> PAGE_SHIFT); + if (obj == NULL) return (ENOMEM); - seg->gpa = gpa; seg->len = len; - seg->object = object; - seg->wired = FALSE; + seg->object = obj; + seg->sysmem = sysmem; + return (0); +} - vm->num_mem_segs++; +int +vm_get_memseg(struct vm *vm, int ident, size_t *len, bool *sysmem, + vm_object_t *objptr) +{ + struct mem_seg *seg; + + if (ident < 0 || ident >= VM_MAX_MEMSEGS) + return (EINVAL); + seg = &vm->mem_segs[ident]; + if (len) + *len = seg->len; + if (sysmem) + *sysmem = seg->sysmem; + if (objptr) + *objptr = seg->object; return (0); } -static vm_paddr_t -vm_maxmem(struct vm *vm) +void +vm_free_memseg(struct vm *vm, int ident) { - int i; - vm_paddr_t gpa, maxmem; + struct mem_seg *seg; - maxmem = 0; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Feb 1 15:40:42 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5CD1CA97330; Mon, 1 Feb 2016 15:40:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 343581C02; Mon, 1 Feb 2016 15:40:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u11FefZr028737; Mon, 1 Feb 2016 15:40:41 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u11FefLs028736; Mon, 1 Feb 2016 15:40:41 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201602011540.u11FefLs028736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 1 Feb 2016 15:40:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295125 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 15:40:42 -0000 Author: avg Date: Mon Feb 1 15:40:40 2016 New Revision: 295125 URL: https://svnweb.freebsd.org/changeset/base/295125 Log: MFV r294821: 6529 Properly handle updates of variably-sized SA entries. Reviewed by: Brian Behlendorf Reviewed by: Matthew Ahrens Reviewed by: Ned Bass Reviewed by: Tim Chase Approved by: Gordon Ross Author: Andriy Gapon illumos/illumos-gate@e7e978b1f75353cb29673af9b35453c20c2827bf During the update process in sa_modify_attrs(), the sizes of existing variably-sized SA entries are obtained from sa_lengths[]. The case where a variably-sized SA was being replaced neglected to increment the index into sa_lengths[], so subsequent variable-length SAs would be rewritten with the wrong length. This patch adds the missing increment operation so all variably-sized SA entries are stored with their correct lengths. Another problem was that index into attr_desc[] was increased even when an attribute was removed. If that attribute was not the last attribute, then the last attribute was lost. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Mon Feb 1 14:56:11 2016 (r295124) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Mon Feb 1 15:40:40 2016 (r295125) @@ -1652,7 +1652,7 @@ sa_modify_attrs(sa_handle_t *hdl, sa_att int spill_data_size = 0; int spill_attr_count = 0; int error; - uint16_t length; + uint16_t length, reg_length; int i, j, k, length_idx; sa_hdr_phys_t *hdr; sa_idx_tab_t *idx_tab; @@ -1712,34 +1712,50 @@ sa_modify_attrs(sa_handle_t *hdl, sa_att hdr = SA_GET_HDR(hdl, SA_BONUS); idx_tab = SA_IDX_TAB_GET(hdl, SA_BONUS); for (; k != 2; k++) { - /* iterate over each attribute in layout */ + /* + * Iterate over each attribute in layout. Fetch the + * size of variable-length attributes needing rewrite + * from sa_lengths[]. + */ for (i = 0, length_idx = 0; i != count; i++) { sa_attr_type_t attr; attr = idx_tab->sa_layout->lot_attrs[i]; + reg_length = SA_REGISTERED_LEN(sa, attr); + if (reg_length == 0) { + length = hdr->sa_lengths[length_idx]; + length_idx++; + } else { + length = reg_length; + } if (attr == newattr) { - /* duplicate attributes are not allowed */ - ASSERT(action == SA_REPLACE || - action == SA_REMOVE); - /* must be variable-sized to be replaced here */ - if (action == SA_REPLACE) { - ASSERT(SA_REGISTERED_LEN(sa, attr) == 0); - SA_ADD_BULK_ATTR(attr_desc, j, attr, - locator, datastart, buflen); - } + /* + * There is nothing to do for SA_REMOVE, + * so it is just skipped. + */ + if (action == SA_REMOVE) + continue; + + /* + * Duplicate attributes are not allowed, so the + * action can not be SA_ADD here. + */ + ASSERT3S(action, ==, SA_REPLACE); + + /* + * Only a variable-sized attribute can be + * replaced here, and its size must be changing. + */ + ASSERT3U(reg_length, ==, 0); + ASSERT3U(length, !=, buflen); + SA_ADD_BULK_ATTR(attr_desc, j, attr, + locator, datastart, buflen); } else { - length = SA_REGISTERED_LEN(sa, attr); - if (length == 0) { - length = hdr->sa_lengths[length_idx]; - } - SA_ADD_BULK_ATTR(attr_desc, j, attr, NULL, (void *) (TOC_OFF(idx_tab->sa_idx_tab[attr]) + (uintptr_t)old_data[k]), length); } - if (SA_REGISTERED_LEN(sa, attr) == 0) - length_idx++; } if (k == 0 && hdl->sa_spill) { hdr = SA_GET_HDR(hdl, SA_SPILL); @@ -1750,10 +1766,8 @@ sa_modify_attrs(sa_handle_t *hdl, sa_att } } if (action == SA_ADD) { - length = SA_REGISTERED_LEN(sa, newattr); - if (length == 0) { - length = buflen; - } + reg_length = SA_REGISTERED_LEN(sa, newattr); + IMPLY(reg_length != 0, reg_length == buflen); SA_ADD_BULK_ATTR(attr_desc, j, newattr, locator, datastart, buflen); } From owner-svn-src-all@freebsd.org Mon Feb 1 17:41:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9897CA97C95; Mon, 1 Feb 2016 17:41:29 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6343E176; Mon, 1 Feb 2016 17:41:29 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u11HfSwa065846; Mon, 1 Feb 2016 17:41:28 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u11HfL9b065169; Mon, 1 Feb 2016 17:41:21 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201602011741.u11HfL9b065169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 1 Feb 2016 17:41:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295126 - in head/sys: contrib/ipfilter/netinet dev/bwn dev/ed dev/ep dev/fe dev/fxp dev/iscsi_initiator dev/le dev/malo dev/netmap dev/oce dev/otus dev/sfxge dev/sn dev/tx dev/usb/wlan... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 17:41:29 -0000 Author: glebius Date: Mon Feb 1 17:41:21 2016 New Revision: 295126 URL: https://svnweb.freebsd.org/changeset/base/295126 Log: These files were getting sys/malloc.h and vm/uma.h with header pollution via sys/mbuf.h Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c head/sys/dev/bwn/if_bwn.c head/sys/dev/ed/if_ed.c head/sys/dev/ep/if_ep.c head/sys/dev/fe/if_fe.c head/sys/dev/fxp/if_fxp.c head/sys/dev/iscsi_initiator/isc_cam.c head/sys/dev/iscsi_initiator/isc_sm.c head/sys/dev/iscsi_initiator/isc_soc.c head/sys/dev/iscsi_initiator/isc_subr.c head/sys/dev/iscsi_initiator/iscsi_subr.c head/sys/dev/le/lance.c head/sys/dev/malo/if_malo.c head/sys/dev/netmap/netmap_offloadings.c head/sys/dev/oce/oce_if.h head/sys/dev/otus/if_otus.c head/sys/dev/sfxge/sfxge_rx.c head/sys/dev/sfxge/sfxge_tx.c head/sys/dev/sn/if_sn.c head/sys/dev/tx/if_tx.c head/sys/dev/usb/wlan/if_rsu.c head/sys/dev/wi/if_wi.c head/sys/dev/wi/if_wi_pci.c head/sys/dev/xe/if_xe.c head/sys/dev/xl/if_xl.c head/sys/kern/subr_mchain.c head/sys/kern/uipc_sockbuf.c head/sys/net/bridgestp.c head/sys/net/if_epair.c head/sys/net/if_mib.c head/sys/net/netisr.c head/sys/net/pfvar.h head/sys/net80211/ieee80211.c head/sys/net80211/ieee80211_acl.c head/sys/net80211/ieee80211_action.c head/sys/net80211/ieee80211_ageq.c head/sys/net80211/ieee80211_amrr.c head/sys/net80211/ieee80211_crypto_none.c head/sys/net80211/ieee80211_ddb.c head/sys/net80211/ieee80211_freebsd.c head/sys/net80211/ieee80211_ht.c head/sys/net80211/ieee80211_ioctl.c head/sys/net80211/ieee80211_output.c head/sys/net80211/ieee80211_power.c head/sys/net80211/ieee80211_proto.c head/sys/net80211/ieee80211_scan.c head/sys/net80211/ieee80211_scan_sta.c head/sys/net80211/ieee80211_scan_sw.c head/sys/net80211/ieee80211_xauth.c head/sys/netgraph/netflow/netflow.c head/sys/netgraph/netflow/netflow_v9.c head/sys/netgraph/netflow/ng_netflow.c head/sys/netgraph/ng_base.c head/sys/netinet/in_proto.c head/sys/netinet/tcp_lro.c head/sys/netinet/toecore.c head/sys/netinet6/in6_proto.c head/sys/netinet6/send.c head/sys/netipsec/ipsec_mbuf.c head/sys/netipsec/key_debug.c head/sys/netpfil/ipfw/ip_fw_log.c head/sys/rpc/replay.c Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_compat.h Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Mon Feb 1 17:41:21 2016 (r295126) @@ -147,6 +147,7 @@ struct ether_addr { # include # include +# include # include # define KRWLOCK_FILL_SZ 56 # define KMUTEX_FILL_SZ 56 Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Mon Feb 1 17:41:21 2016 (r295126) @@ -36,6 +36,7 @@ static const char rcsid[] = "@(#)$Id$"; #if defined(__FreeBSD_version) && (__FreeBSD_version >= 800000) #include #endif +# include # include # include #if !defined(__hpux) Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/bwn/if_bwn.c Mon Feb 1 17:41:21 2016 (r295126) @@ -36,8 +36,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include +#include +#include #include #include #include Modified: head/sys/dev/ed/if_ed.c ============================================================================== --- head/sys/dev/ed/if_ed.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/ed/if_ed.c Mon Feb 1 17:41:21 2016 (r295126) @@ -43,8 +43,9 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include +#include +#include #include #include #include Modified: head/sys/dev/ep/if_ep.c ============================================================================== --- head/sys/dev/ep/if_ep.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/ep/if_ep.c Mon Feb 1 17:41:21 2016 (r295126) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/dev/fe/if_fe.c ============================================================================== --- head/sys/dev/fe/if_fe.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/fe/if_fe.c Mon Feb 1 17:41:21 2016 (r295126) @@ -72,6 +72,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/fxp/if_fxp.c Mon Feb 1 17:41:21 2016 (r295126) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/dev/iscsi_initiator/isc_cam.c ============================================================================== --- head/sys/dev/iscsi_initiator/isc_cam.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/iscsi_initiator/isc_cam.c Mon Feb 1 17:41:21 2016 (r295126) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/dev/iscsi_initiator/isc_sm.c ============================================================================== --- head/sys/dev/iscsi_initiator/isc_sm.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/iscsi_initiator/isc_sm.c Mon Feb 1 17:41:21 2016 (r295126) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/dev/iscsi_initiator/isc_soc.c ============================================================================== --- head/sys/dev/iscsi_initiator/isc_soc.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/iscsi_initiator/isc_soc.c Mon Feb 1 17:41:21 2016 (r295126) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/dev/iscsi_initiator/isc_subr.c ============================================================================== --- head/sys/dev/iscsi_initiator/isc_subr.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/iscsi_initiator/isc_subr.c Mon Feb 1 17:41:21 2016 (r295126) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/dev/iscsi_initiator/iscsi_subr.c ============================================================================== --- head/sys/dev/iscsi_initiator/iscsi_subr.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/iscsi_initiator/iscsi_subr.c Mon Feb 1 17:41:21 2016 (r295126) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/dev/le/lance.c ============================================================================== --- head/sys/dev/le/lance.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/le/lance.c Mon Feb 1 17:41:21 2016 (r295126) @@ -72,6 +72,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/dev/malo/if_malo.c ============================================================================== --- head/sys/dev/malo/if_malo.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/malo/if_malo.c Mon Feb 1 17:41:21 2016 (r295126) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/dev/netmap/netmap_offloadings.c ============================================================================== --- head/sys/dev/netmap/netmap_offloadings.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/netmap/netmap_offloadings.c Mon Feb 1 17:41:21 2016 (r295126) @@ -31,6 +31,7 @@ #include #include #include /* defines used in kernel.h */ +#include /* types used in module initialization */ #include /* types used in module initialization */ #include #include /* struct socket */ Modified: head/sys/dev/oce/oce_if.h ============================================================================== --- head/sys/dev/oce/oce_if.h Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/oce/oce_if.h Mon Feb 1 17:41:21 2016 (r295126) @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include Modified: head/sys/dev/otus/if_otus.c ============================================================================== --- head/sys/dev/otus/if_otus.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/otus/if_otus.c Mon Feb 1 17:41:21 2016 (r295126) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_rx.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/sfxge/sfxge_rx.c Mon Feb 1 17:41:21 2016 (r295126) @@ -34,7 +34,8 @@ #include __FBSDID("$FreeBSD$"); -#include +#include +#include #include #include #include Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/sfxge/sfxge_tx.c Mon Feb 1 17:41:21 2016 (r295126) @@ -49,7 +49,8 @@ #include __FBSDID("$FreeBSD$"); -#include +#include +#include #include #include #include Modified: head/sys/dev/sn/if_sn.c ============================================================================== --- head/sys/dev/sn/if_sn.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/sn/if_sn.c Mon Feb 1 17:41:21 2016 (r295126) @@ -84,6 +84,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/dev/tx/if_tx.c ============================================================================== --- head/sys/dev/tx/if_tx.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/tx/if_tx.c Mon Feb 1 17:41:21 2016 (r295126) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/usb/wlan/if_rsu.c Mon Feb 1 17:41:21 2016 (r295126) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/dev/wi/if_wi.c ============================================================================== --- head/sys/dev/wi/if_wi.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/wi/if_wi.c Mon Feb 1 17:41:21 2016 (r295126) @@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/dev/wi/if_wi_pci.c ============================================================================== --- head/sys/dev/wi/if_wi_pci.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/wi/if_wi_pci.c Mon Feb 1 17:41:21 2016 (r295126) @@ -42,6 +42,7 @@ #include #include +#include #include #include #include Modified: head/sys/dev/xe/if_xe.c ============================================================================== --- head/sys/dev/xe/if_xe.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/xe/if_xe.c Mon Feb 1 17:41:21 2016 (r295126) @@ -96,6 +96,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/dev/xl/if_xl.c ============================================================================== --- head/sys/dev/xl/if_xl.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/dev/xl/if_xl.c Mon Feb 1 17:41:21 2016 (r295126) @@ -106,8 +106,9 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include +#include +#include #include #include #include Modified: head/sys/kern/subr_mchain.c ============================================================================== --- head/sys/kern/subr_mchain.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/kern/subr_mchain.c Mon Feb 1 17:41:21 2016 (r295126) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/kern/uipc_sockbuf.c ============================================================================== --- head/sys/kern/uipc_sockbuf.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/kern/uipc_sockbuf.c Mon Feb 1 17:41:21 2016 (r295126) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include /* for aio_swake proto */ #include #include +#include #include #include #include Modified: head/sys/net/bridgestp.c ============================================================================== --- head/sys/net/bridgestp.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/net/bridgestp.c Mon Feb 1 17:41:21 2016 (r295126) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/net/if_epair.c ============================================================================== --- head/sys/net/if_epair.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/net/if_epair.c Mon Feb 1 17:41:21 2016 (r295126) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: head/sys/net/if_mib.c ============================================================================== --- head/sys/net/if_mib.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/net/if_mib.c Mon Feb 1 17:41:21 2016 (r295126) @@ -32,6 +32,7 @@ #include #include #include +#include #include #include Modified: head/sys/net/netisr.c ============================================================================== --- head/sys/net/netisr.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/net/netisr.c Mon Feb 1 17:41:21 2016 (r295126) @@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/net/pfvar.h ============================================================================== --- head/sys/net/pfvar.h Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/net/pfvar.h Mon Feb 1 17:41:21 2016 (r295126) @@ -36,8 +36,10 @@ #include #include #include +#include #include #include +#include #include #include Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/net80211/ieee80211.c Mon Feb 1 17:41:21 2016 (r295126) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/net80211/ieee80211_acl.c ============================================================================== --- head/sys/net80211/ieee80211_acl.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/net80211/ieee80211_acl.c Mon Feb 1 17:41:21 2016 (r295126) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/net80211/ieee80211_action.c ============================================================================== --- head/sys/net80211/ieee80211_action.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/net80211/ieee80211_action.c Mon Feb 1 17:41:21 2016 (r295126) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: head/sys/net80211/ieee80211_ageq.c ============================================================================== --- head/sys/net80211/ieee80211_ageq.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/net80211/ieee80211_ageq.c Mon Feb 1 17:41:21 2016 (r295126) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include Modified: head/sys/net80211/ieee80211_amrr.c ============================================================================== --- head/sys/net80211/ieee80211_amrr.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/net80211/ieee80211_amrr.c Mon Feb 1 17:41:21 2016 (r295126) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: head/sys/net80211/ieee80211_crypto_none.c ============================================================================== --- head/sys/net80211/ieee80211_crypto_none.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/net80211/ieee80211_crypto_none.c Mon Feb 1 17:41:21 2016 (r295126) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: head/sys/net80211/ieee80211_ddb.c ============================================================================== --- head/sys/net80211/ieee80211_ddb.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/net80211/ieee80211_ddb.c Mon Feb 1 17:41:21 2016 (r295126) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/net80211/ieee80211_freebsd.c ============================================================================== --- head/sys/net80211/ieee80211_freebsd.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/net80211/ieee80211_freebsd.c Mon Feb 1 17:41:21 2016 (r295126) @@ -32,10 +32,11 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" #include -#include #include #include +#include #include +#include #include #include #include Modified: head/sys/net80211/ieee80211_ht.c ============================================================================== --- head/sys/net80211/ieee80211_ht.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/net80211/ieee80211_ht.c Mon Feb 1 17:41:21 2016 (r295126) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: head/sys/net80211/ieee80211_ioctl.c ============================================================================== --- head/sys/net80211/ieee80211_ioctl.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/net80211/ieee80211_ioctl.c Mon Feb 1 17:41:21 2016 (r295126) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/net80211/ieee80211_output.c Mon Feb 1 17:41:21 2016 (r295126) @@ -33,8 +33,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include +#include +#include #include #include Modified: head/sys/net80211/ieee80211_power.c ============================================================================== --- head/sys/net80211/ieee80211_power.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/net80211/ieee80211_power.c Mon Feb 1 17:41:21 2016 (r295126) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include Modified: head/sys/net80211/ieee80211_proto.c ============================================================================== --- head/sys/net80211/ieee80211_proto.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/net80211/ieee80211_proto.c Mon Feb 1 17:41:21 2016 (r295126) @@ -35,8 +35,9 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" #include -#include #include +#include +#include #include #include Modified: head/sys/net80211/ieee80211_scan.c ============================================================================== --- head/sys/net80211/ieee80211_scan.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/net80211/ieee80211_scan.c Mon Feb 1 17:41:21 2016 (r295126) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/net80211/ieee80211_scan_sta.c ============================================================================== --- head/sys/net80211/ieee80211_scan_sta.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/net80211/ieee80211_scan_sta.c Mon Feb 1 17:41:21 2016 (r295126) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/net80211/ieee80211_scan_sw.c ============================================================================== --- head/sys/net80211/ieee80211_scan_sw.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/net80211/ieee80211_scan_sw.c Mon Feb 1 17:41:21 2016 (r295126) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/net80211/ieee80211_xauth.c ============================================================================== --- head/sys/net80211/ieee80211_xauth.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/net80211/ieee80211_xauth.c Mon Feb 1 17:41:21 2016 (r295126) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/netgraph/netflow/netflow.c ============================================================================== --- head/sys/netgraph/netflow/netflow.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/netgraph/netflow/netflow.c Mon Feb 1 17:41:21 2016 (r295126) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/netgraph/netflow/netflow_v9.c ============================================================================== --- head/sys/netgraph/netflow/netflow_v9.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/netgraph/netflow/netflow_v9.c Mon Feb 1 17:41:21 2016 (r295126) @@ -37,9 +37,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include +#include #include #include Modified: head/sys/netgraph/netflow/ng_netflow.c ============================================================================== --- head/sys/netgraph/netflow/ng_netflow.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/netgraph/netflow/ng_netflow.c Mon Feb 1 17:41:21 2016 (r295126) @@ -40,10 +40,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include +#include #include #include Modified: head/sys/netgraph/ng_base.c ============================================================================== --- head/sys/netgraph/ng_base.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/netgraph/ng_base.c Mon Feb 1 17:41:21 2016 (r295126) @@ -63,6 +63,7 @@ #include #include #include +#include #include #include Modified: head/sys/netinet/in_proto.c ============================================================================== --- head/sys/netinet/in_proto.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/netinet/in_proto.c Mon Feb 1 17:41:21 2016 (r295126) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/netinet/tcp_lro.c ============================================================================== --- head/sys/netinet/tcp_lro.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/netinet/tcp_lro.c Mon Feb 1 17:41:21 2016 (r295126) @@ -38,8 +38,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include +#include +#include #include #include Modified: head/sys/netinet/toecore.c ============================================================================== --- head/sys/netinet/toecore.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/netinet/toecore.c Mon Feb 1 17:41:21 2016 (r295126) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/netinet6/in6_proto.c ============================================================================== --- head/sys/netinet6/in6_proto.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/netinet6/in6_proto.c Mon Feb 1 17:41:21 2016 (r295126) @@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/netinet6/send.c ============================================================================== --- head/sys/netinet6/send.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/netinet6/send.c Mon Feb 1 17:41:21 2016 (r295126) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: head/sys/netipsec/ipsec_mbuf.c ============================================================================== --- head/sys/netipsec/ipsec_mbuf.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/netipsec/ipsec_mbuf.c Mon Feb 1 17:41:21 2016 (r295126) @@ -34,6 +34,7 @@ #include #include +#include #include #include Modified: head/sys/netipsec/key_debug.c ============================================================================== --- head/sys/netipsec/key_debug.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/netipsec/key_debug.c Mon Feb 1 17:41:21 2016 (r295126) @@ -36,10 +36,10 @@ #include "opt_ipsec.h" #endif -#include #include #ifdef _KERNEL #include +#include #include #include #endif Modified: head/sys/netpfil/ipfw/ip_fw_log.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_log.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/netpfil/ipfw/ip_fw_log.c Mon Feb 1 17:41:21 2016 (r295126) @@ -39,8 +39,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include +#include +#include #include #include #include Modified: head/sys/rpc/replay.c ============================================================================== --- head/sys/rpc/replay.c Mon Feb 1 15:40:40 2016 (r295125) +++ head/sys/rpc/replay.c Mon Feb 1 17:41:21 2016 (r295126) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include From owner-svn-src-all@freebsd.org Mon Feb 1 18:16:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60812A9778D; Mon, 1 Feb 2016 18:16:44 +0000 (UTC) (envelope-from lists@yamagi.org) Received: from mail1.yamagi.org (yugo.yamagi.org [212.48.122.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F363A1242; Mon, 1 Feb 2016 18:16:43 +0000 (UTC) (envelope-from lists@yamagi.org) Received: from p5485a317.dip0.t-ipconnect.de ([84.133.163.23] helo=kosei.home.yamagi.org.dhcp.yamagi.org) by mail1.yamagi.org with esmtpsa (TLSv1:ECDHE-RSA-AES256-SHA:256) (Exim 4.86 (FreeBSD)) (envelope-from ) id 1aQJ1Z-000AQM-NN; Mon, 01 Feb 2016 19:16:32 +0100 Date: Mon, 1 Feb 2016 19:16:24 +0100 From: Yamagi Burmeister To: grehan@FreeBSD.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r295124 - in stable/10: lib/libvmmapi share/examples/bhyve sys/amd64/include sys/amd64/vmm sys/amd64/vmm/amd sys/amd64/vmm/intel sys/amd64/vmm/io sys/sys usr.sbin/bhyve usr.sbin/bhyvect... Message-Id: <20160201191624.ade2d7a19f6eb7921603133c@yamagi.org> In-Reply-To: <201602011456.u11EuBDE016423@repo.freebsd.org> References: <201602011456.u11EuBDE016423@repo.freebsd.org> X-Mailer: Sylpheed 3.4.3 (GTK+ 2.24.29; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 18:16:44 -0000 And huge thanks to you for committing this. On Mon, 1 Feb 2016 14:56:11 +0000 (UTC) Peter Grehan wrote: > Author: grehan > Date: Mon Feb 1 14:56:11 2016 > New Revision: 295124 > URL: https://svnweb.freebsd.org/changeset/base/295124 > > Log: > MFC r284539, r284630, r284688, r284877, r285217, r285218, > r286837, r286838, r288470, r288522, r288524, r288826, > r289001 > > Pull in bhyve bug fixes and changes to allow UEFI booting. > This provides Windows support. > > Tested on Intel and AMD with: > - Arch Linux i386+amd64 (kernel 4.3.3) > - Ubuntu 15.10 server 64-bit > - FreeBSD-CURRENT/amd64 20160127 snap > - FreeBSD 10.2 i386+amd64 > - OpenBSD 5.8 i386+amd64 > - SmartOS latest > - Windows 10 build 1511' > > Huge thanks to Yamagi Burmeister who submitted the patch > and did the majority of the testing. > > r284539 - bootrom mem allocation support > r284630 - Add SO_REUSEADDR when starting debug port > r284688 - Fix a regression in "movs" emulation > r284877 - verify_gla() non-zero segment base fix > r285217 - Always assert DCD and DSR in the uart > r285218 - devmem nodes moved to /dev/vmm.io/ > r286837 - Add define for SATA Check-Power-Mode > r286838 - Add simple (no-op) SATA cmd emulations > r288470 - Increase virtio-blk indirect descs > r288522 - Firmware guest query interface > r288524 - Fix post-test typo > r288826 - Clean up SATA unimplemented cmd msg > r289001 - Add -l option to specify userboot path > > Submitted by: Yamagi Burmeister > Approved by: re (kib) > > Added: > stable/10/usr.sbin/bhyve/bootrom.c > - copied unchanged from r284539, head/usr.sbin/bhyve/bootrom.c > stable/10/usr.sbin/bhyve/bootrom.h > - copied unchanged from r284539, head/usr.sbin/bhyve/bootrom.h > stable/10/usr.sbin/bhyve/fwctl.c > - copied, changed from r288522, head/usr.sbin/bhyve/fwctl.c > stable/10/usr.sbin/bhyve/fwctl.h > - copied unchanged from r288522, head/usr.sbin/bhyve/fwctl.h > Modified: > stable/10/lib/libvmmapi/vmmapi.c > stable/10/lib/libvmmapi/vmmapi.h > stable/10/share/examples/bhyve/vmrun.sh > stable/10/sys/amd64/include/vmm.h > stable/10/sys/amd64/include/vmm_dev.h > stable/10/sys/amd64/vmm/amd/svm.c > stable/10/sys/amd64/vmm/intel/vmx.c > stable/10/sys/amd64/vmm/io/ppt.c > stable/10/sys/amd64/vmm/vmm.c > stable/10/sys/amd64/vmm/vmm_dev.c > stable/10/sys/amd64/vmm/vmm_instruction_emul.c > stable/10/sys/amd64/vmm/vmm_mem.c > stable/10/sys/amd64/vmm/vmm_mem.h > stable/10/sys/sys/ata.h > stable/10/usr.sbin/bhyve/Makefile > stable/10/usr.sbin/bhyve/bhyve.8 > stable/10/usr.sbin/bhyve/bhyverun.c > stable/10/usr.sbin/bhyve/dbgport.c > stable/10/usr.sbin/bhyve/pci_ahci.c > stable/10/usr.sbin/bhyve/pci_lpc.c > stable/10/usr.sbin/bhyve/pci_lpc.h > stable/10/usr.sbin/bhyve/pci_passthru.c > stable/10/usr.sbin/bhyve/pci_virtio_net.c > stable/10/usr.sbin/bhyve/uart_emul.c > stable/10/usr.sbin/bhyvectl/bhyvectl.c > stable/10/usr.sbin/bhyveload/bhyveload.8 > stable/10/usr.sbin/bhyveload/bhyveload.c > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/lib/libvmmapi/vmmapi.c > ============================================================================== > --- stable/10/lib/libvmmapi/vmmapi.c Mon Feb 1 14:28:58 2016 (r295123) > +++ stable/10/lib/libvmmapi/vmmapi.c Mon Feb 1 14:56:11 2016 (r295124) > @@ -58,15 +58,23 @@ __FBSDID("$FreeBSD$"); > #define MB (1024 * 1024UL) > #define GB (1024 * 1024 * 1024UL) > > +/* > + * Size of the guard region before and after the virtual address space > + * mapping the guest physical memory. This must be a multiple of the > + * superpage size for performance reasons. > + */ > +#define VM_MMAP_GUARD_SIZE (4 * MB) > + > +#define PROT_RW (PROT_READ | PROT_WRITE) > +#define PROT_ALL (PROT_READ | PROT_WRITE | PROT_EXEC) > + > struct vmctx { > int fd; > uint32_t lowmem_limit; > - enum vm_mmap_style vms; > int memflags; > size_t lowmem; > - char *lowmem_addr; > size_t highmem; > - char *highmem_addr; > + char *baseaddr; > char *name; > }; > > @@ -157,22 +165,6 @@ vm_parse_memsize(const char *optarg, siz > return (error); > } > > -int > -vm_get_memory_seg(struct vmctx *ctx, vm_paddr_t gpa, size_t *ret_len, > - int *wired) > -{ > - int error; > - struct vm_memory_segment seg; > - > - bzero(&seg, sizeof(seg)); > - seg.gpa = gpa; > - error = ioctl(ctx->fd, VM_GET_MEMORY_SEG, &seg); > - *ret_len = seg.len; > - if (wired != NULL) > - *wired = seg.wired; > - return (error); > -} > - > uint32_t > vm_get_lowmem_limit(struct vmctx *ctx) > { > @@ -194,39 +186,184 @@ vm_set_memflags(struct vmctx *ctx, int f > ctx->memflags = flags; > } > > +int > +vm_get_memflags(struct vmctx *ctx) > +{ > + > + return (ctx->memflags); > +} > + > +/* > + * Map segment 'segid' starting at 'off' into guest address range [gpa,gpa+len). > + */ > +int > +vm_mmap_memseg(struct vmctx *ctx, vm_paddr_t gpa, int segid, vm_ooffset_t off, > + size_t len, int prot) > +{ > + struct vm_memmap memmap; > + int error, flags; > + > + memmap.gpa = gpa; > + memmap.segid = segid; > + memmap.segoff = off; > + memmap.len = len; > + memmap.prot = prot; > + memmap.flags = 0; > + > + if (ctx->memflags & VM_MEM_F_WIRED) > + memmap.flags |= VM_MEMMAP_F_WIRED; > + > + /* > + * If this mapping already exists then don't create it again. This > + * is the common case for SYSMEM mappings created by bhyveload(8). > + */ > + error = vm_mmap_getnext(ctx, &gpa, &segid, &off, &len, &prot, &flags); > + if (error == 0 && gpa == memmap.gpa) { > + if (segid != memmap.segid || off != memmap.segoff || > + prot != memmap.prot || flags != memmap.flags) { > + errno = EEXIST; > + return (-1); > + } else { > + return (0); > + } > + } > + > + error = ioctl(ctx->fd, VM_MMAP_MEMSEG, &memmap); > + return (error); > +} > + > +int > +vm_mmap_getnext(struct vmctx *ctx, vm_paddr_t *gpa, int *segid, > + vm_ooffset_t *segoff, size_t *len, int *prot, int *flags) > +{ > + struct vm_memmap memmap; > + int error; > + > + bzero(&memmap, sizeof(struct vm_memmap)); > + memmap.gpa = *gpa; > + error = ioctl(ctx->fd, VM_MMAP_GETNEXT, &memmap); > + if (error == 0) { > + *gpa = memmap.gpa; > + *segid = memmap.segid; > + *segoff = memmap.segoff; > + *len = memmap.len; > + *prot = memmap.prot; > + *flags = memmap.flags; > + } > + return (error); > +} > + > +/* > + * Return 0 if the segments are identical and non-zero otherwise. > + * > + * This is slightly complicated by the fact that only device memory segments > + * are named. > + */ > static int > -setup_memory_segment(struct vmctx *ctx, vm_paddr_t gpa, size_t len, char **addr) > +cmpseg(size_t len, const char *str, size_t len2, const char *str2) > { > - int error, mmap_flags; > - struct vm_memory_segment seg; > + > + if (len == len2) { > + if ((!str && !str2) || (str && str2 && !strcmp(str, str2))) > + return (0); > + } > + return (-1); > +} > + > +static int > +vm_alloc_memseg(struct vmctx *ctx, int segid, size_t len, const char *name) > +{ > + struct vm_memseg memseg; > + size_t n; > + int error; > > /* > - * Create and optionally map 'len' bytes of memory at guest > - * physical address 'gpa' > + * If the memory segment has already been created then just return. > + * This is the usual case for the SYSMEM segment created by userspace > + * loaders like bhyveload(8). > */ > - bzero(&seg, sizeof(seg)); > - seg.gpa = gpa; > - seg.len = len; > - error = ioctl(ctx->fd, VM_MAP_MEMORY, &seg); > - if (error == 0 && addr != NULL) { > - mmap_flags = MAP_SHARED; > - if ((ctx->memflags & VM_MEM_F_INCORE) == 0) > - mmap_flags |= MAP_NOCORE; > - *addr = mmap(NULL, len, PROT_READ | PROT_WRITE, mmap_flags, > - ctx->fd, gpa); > + error = vm_get_memseg(ctx, segid, &memseg.len, memseg.name, > + sizeof(memseg.name)); > + if (error) > + return (error); > + > + if (memseg.len != 0) { > + if (cmpseg(len, name, memseg.len, VM_MEMSEG_NAME(&memseg))) { > + errno = EINVAL; > + return (-1); > + } else { > + return (0); > + } > + } > + > + bzero(&memseg, sizeof(struct vm_memseg)); > + memseg.segid = segid; > + memseg.len = len; > + if (name != NULL) { > + n = strlcpy(memseg.name, name, sizeof(memseg.name)); > + if (n >= sizeof(memseg.name)) { > + errno = ENAMETOOLONG; > + return (-1); > + } > + } > + > + error = ioctl(ctx->fd, VM_ALLOC_MEMSEG, &memseg); > + return (error); > +} > + > +int > +vm_get_memseg(struct vmctx *ctx, int segid, size_t *lenp, char *namebuf, > + size_t bufsize) > +{ > + struct vm_memseg memseg; > + size_t n; > + int error; > + > + memseg.segid = segid; > + error = ioctl(ctx->fd, VM_GET_MEMSEG, &memseg); > + if (error == 0) { > + *lenp = memseg.len; > + n = strlcpy(namebuf, memseg.name, bufsize); > + if (n >= bufsize) { > + errno = ENAMETOOLONG; > + error = -1; > + } > } > return (error); > } > > +static int > +setup_memory_segment(struct vmctx *ctx, vm_paddr_t gpa, size_t len, char *base) > +{ > + char *ptr; > + int error, flags; > + > + /* Map 'len' bytes starting at 'gpa' in the guest address space */ > + error = vm_mmap_memseg(ctx, gpa, VM_SYSMEM, gpa, len, PROT_ALL); > + if (error) > + return (error); > + > + flags = MAP_SHARED | MAP_FIXED; > + if ((ctx->memflags & VM_MEM_F_INCORE) == 0) > + flags |= MAP_NOCORE; > + > + /* mmap into the process address space on the host */ > + ptr = mmap(base + gpa, len, PROT_RW, flags, ctx->fd, gpa); > + if (ptr == MAP_FAILED) > + return (-1); > + > + return (0); > +} > + > int > vm_setup_memory(struct vmctx *ctx, size_t memsize, enum vm_mmap_style vms) > { > - char **addr; > - int error; > + size_t objsize, len; > + vm_paddr_t gpa; > + char *baseaddr, *ptr; > + int error, flags; > > - /* XXX VM_MMAP_SPARSE not implemented yet */ > - assert(vms == VM_MMAP_NONE || vms == VM_MMAP_ALL); > - ctx->vms = vms; > + assert(vms == VM_MMAP_ALL); > > /* > * If 'memsize' cannot fit entirely in the 'lowmem' segment then > @@ -234,43 +371,69 @@ vm_setup_memory(struct vmctx *ctx, size_ > */ > if (memsize > ctx->lowmem_limit) { > ctx->lowmem = ctx->lowmem_limit; > - ctx->highmem = memsize - ctx->lowmem; > + ctx->highmem = memsize - ctx->lowmem_limit; > + objsize = 4*GB + ctx->highmem; > } else { > ctx->lowmem = memsize; > ctx->highmem = 0; > + objsize = ctx->lowmem; > } > > - if (ctx->lowmem > 0) { > - addr = (vms == VM_MMAP_ALL) ? &ctx->lowmem_addr : NULL; > - error = setup_memory_segment(ctx, 0, ctx->lowmem, addr); > + error = vm_alloc_memseg(ctx, VM_SYSMEM, objsize, NULL); > + if (error) > + return (error); > + > + /* > + * Stake out a contiguous region covering the guest physical memory > + * and the adjoining guard regions. > + */ > + len = VM_MMAP_GUARD_SIZE + objsize + VM_MMAP_GUARD_SIZE; > + flags = MAP_PRIVATE | MAP_ANON | MAP_NOCORE | MAP_ALIGNED_SUPER; > + ptr = mmap(NULL, len, PROT_NONE, flags, -1, 0); > + if (ptr == MAP_FAILED) > + return (-1); > + > + baseaddr = ptr + VM_MMAP_GUARD_SIZE; > + if (ctx->highmem > 0) { > + gpa = 4*GB; > + len = ctx->highmem; > + error = setup_memory_segment(ctx, gpa, len, baseaddr); > if (error) > return (error); > } > > - if (ctx->highmem > 0) { > - addr = (vms == VM_MMAP_ALL) ? &ctx->highmem_addr : NULL; > - error = setup_memory_segment(ctx, 4*GB, ctx->highmem, addr); > + if (ctx->lowmem > 0) { > + gpa = 0; > + len = ctx->lowmem; > + error = setup_memory_segment(ctx, gpa, len, baseaddr); > if (error) > return (error); > } > > + ctx->baseaddr = baseaddr; > + > return (0); > } > > +/* > + * Returns a non-NULL pointer if [gaddr, gaddr+len) is entirely contained in > + * the lowmem or highmem regions. > + * > + * In particular return NULL if [gaddr, gaddr+len) falls in guest MMIO region. > + * The instruction emulation code depends on this behavior. > + */ > void * > vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len) > { > > - /* XXX VM_MMAP_SPARSE not implemented yet */ > - assert(ctx->vms == VM_MMAP_ALL); > - > - if (gaddr < ctx->lowmem && gaddr + len <= ctx->lowmem) > - return ((void *)(ctx->lowmem_addr + gaddr)); > + if (ctx->lowmem > 0) { > + if (gaddr < ctx->lowmem && gaddr + len <= ctx->lowmem) > + return (ctx->baseaddr + gaddr); > + } > > - if (gaddr >= 4*GB) { > - gaddr -= 4*GB; > - if (gaddr < ctx->highmem && gaddr + len <= ctx->highmem) > - return ((void *)(ctx->highmem_addr + gaddr)); > + if (ctx->highmem > 0) { > + if (gaddr >= 4*GB && gaddr + len <= 4*GB + ctx->highmem) > + return (ctx->baseaddr + gaddr); > } > > return (NULL); > @@ -290,6 +453,56 @@ vm_get_highmem_size(struct vmctx *ctx) > return (ctx->highmem); > } > > +void * > +vm_create_devmem(struct vmctx *ctx, int segid, const char *name, size_t len) > +{ > + char pathname[MAXPATHLEN]; > + size_t len2; > + char *base, *ptr; > + int fd, error, flags; > + > + fd = -1; > + ptr = MAP_FAILED; > + if (name == NULL || strlen(name) == 0) { > + errno = EINVAL; > + goto done; > + } > + > + error = vm_alloc_memseg(ctx, segid, len, name); > + if (error) > + goto done; > + > + strlcpy(pathname, "/dev/vmm.io/", sizeof(pathname)); > + strlcat(pathname, ctx->name, sizeof(pathname)); > + strlcat(pathname, ".", sizeof(pathname)); > + strlcat(pathname, name, sizeof(pathname)); > + > + fd = open(pathname, O_RDWR); > + if (fd < 0) > + goto done; > + > + /* > + * Stake out a contiguous region covering the device memory and the > + * adjoining guard regions. > + */ > + len2 = VM_MMAP_GUARD_SIZE + len + VM_MMAP_GUARD_SIZE; > + flags = MAP_PRIVATE | MAP_ANON | MAP_NOCORE | MAP_ALIGNED_SUPER; > + base = mmap(NULL, len2, PROT_NONE, flags, -1, 0); > + if (base == MAP_FAILED) > + goto done; > + > + flags = MAP_SHARED | MAP_FIXED; > + if ((ctx->memflags & VM_MEM_F_INCORE) == 0) > + flags |= MAP_NOCORE; > + > + /* mmap the devmem region in the host address space */ > + ptr = mmap(base + VM_MMAP_GUARD_SIZE, len, PROT_RW, flags, fd, 0); > +done: > + if (fd >= 0) > + close(fd); > + return (ptr); > +} > + > int > vm_set_desc(struct vmctx *ctx, int vcpu, int reg, > uint64_t base, uint32_t limit, uint32_t access) > > Modified: stable/10/lib/libvmmapi/vmmapi.h > ============================================================================== > --- stable/10/lib/libvmmapi/vmmapi.h Mon Feb 1 14:28:58 2016 (r295123) > +++ stable/10/lib/libvmmapi/vmmapi.h Mon Feb 1 14:56:11 2016 (r295124) > @@ -36,7 +36,7 @@ > * API version for out-of-tree consumers like grub-bhyve for making compile > * time decisions. > */ > -#define VMMAPI_VERSION 0101 /* 2 digit major followed by 2 digit minor */ > +#define VMMAPI_VERSION 0102 /* 2 digit major followed by 2 digit minor */ > > struct iovec; > struct vmctx; > @@ -52,14 +52,59 @@ enum vm_mmap_style { > VM_MMAP_SPARSE, /* mappings created on-demand */ > }; > > +/* > + * 'flags' value passed to 'vm_set_memflags()'. > + */ > #define VM_MEM_F_INCORE 0x01 /* include guest memory in core file */ > +#define VM_MEM_F_WIRED 0x02 /* guest memory is wired */ > + > +/* > + * Identifiers for memory segments: > + * - vm_setup_memory() uses VM_SYSMEM for the system memory segment. > + * - the remaining identifiers can be used to create devmem segments. > + */ > +enum { > + VM_SYSMEM, > + VM_BOOTROM, > + VM_FRAMEBUFFER, > +}; > + > +/* > + * Get the length and name of the memory segment identified by 'segid'. > + * Note that system memory segments are identified with a nul name. > + * > + * Returns 0 on success and non-zero otherwise. > + */ > +int vm_get_memseg(struct vmctx *ctx, int ident, size_t *lenp, char *name, > + size_t namesiz); > + > +/* > + * Iterate over the guest address space. This function finds an address range > + * that starts at an address >= *gpa. > + * > + * Returns 0 if the next address range was found and non-zero otherwise. > + */ > +int vm_mmap_getnext(struct vmctx *ctx, vm_paddr_t *gpa, int *segid, > + vm_ooffset_t *segoff, size_t *len, int *prot, int *flags); > +/* > + * Create a device memory segment identified by 'segid'. > + * > + * Returns a pointer to the memory segment on success and MAP_FAILED otherwise. > + */ > +void *vm_create_devmem(struct vmctx *ctx, int segid, const char *name, > + size_t len); > + > +/* > + * Map the memory segment identified by 'segid' into the guest address space > + * at [gpa,gpa+len) with protection 'prot'. > + */ > +int vm_mmap_memseg(struct vmctx *ctx, vm_paddr_t gpa, int segid, > + vm_ooffset_t segoff, size_t len, int prot); > > int vm_create(const char *name); > struct vmctx *vm_open(const char *name); > void vm_destroy(struct vmctx *ctx); > int vm_parse_memsize(const char *optarg, size_t *memsize); > -int vm_get_memory_seg(struct vmctx *ctx, vm_paddr_t gpa, size_t *ret_len, > - int *wired); > int vm_setup_memory(struct vmctx *ctx, size_t len, enum vm_mmap_style s); > void *vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len); > int vm_get_gpa_pmap(struct vmctx *, uint64_t gpa, uint64_t *pte, int *num); > @@ -68,6 +113,7 @@ int vm_gla2gpa(struct vmctx *, int vcpui > uint32_t vm_get_lowmem_limit(struct vmctx *ctx); > void vm_set_lowmem_limit(struct vmctx *ctx, uint32_t limit); > void vm_set_memflags(struct vmctx *ctx, int flags); > +int vm_get_memflags(struct vmctx *ctx); > size_t vm_get_lowmem_size(struct vmctx *ctx); > size_t vm_get_highmem_size(struct vmctx *ctx); > int vm_set_desc(struct vmctx *ctx, int vcpu, int reg, > > Modified: stable/10/share/examples/bhyve/vmrun.sh > ============================================================================== > --- stable/10/share/examples/bhyve/vmrun.sh Mon Feb 1 14:28:58 2016 (r295123) > +++ stable/10/share/examples/bhyve/vmrun.sh Mon Feb 1 14:56:11 2016 (r295124) > @@ -48,8 +48,8 @@ usage() { > > echo "Usage: vmrun.sh [-ahi] [-c ] [-C ] [-d ]" > echo " [-e ] [-g ] [-H ]" > - echo " [-I ] [-m ]" > - echo " [-t ] " > + echo " [-I ] [-l ]" > + echo " [-m ] [-t ] " > echo "" > echo " -h: display this help message" > echo " -a: force memory mapped local APIC access" > @@ -61,6 +61,7 @@ usage() { > echo " -H: host filesystem to export to the loader" > echo " -i: force boot of the Installation CDROM image" > echo " -I: Installation CDROM image location (default is ${DEFAULT_ISOFILE})" > + echo " -l: the OS loader to use (default is /boot/userboot.so)" > echo " -m: memory size (default is ${DEFAULT_MEMSIZE})" > echo " -p: pass-through a host PCI device at bus/slot/func (e.g. 10/0/0)" > echo " -t: tap device for virtio-net (default is $DEFAULT_TAPDEV)" > @@ -87,15 +88,15 @@ console=${DEFAULT_CONSOLE} > cpus=${DEFAULT_CPUS} > tap_total=0 > disk_total=0 > -apic_opt="" > gdbport=0 > loader_opt="" > +bhyverun_opt="-H -A -P" > pass_total=0 > > -while getopts ac:C:d:e:g:hH:iI:m:p:t: c ; do > +while getopts ac:C:d:e:g:hH:iI:l:m:p:t: c ; do > case $c in > a) > - apic_opt="-a" > + bhyverun_opt="${bhyverun_opt} -a" > ;; > c) > cpus=${OPTARG} > @@ -125,6 +126,9 @@ while getopts ac:C:d:e:g:hH:iI:m:p:t: c > I) > isofile=${OPTARG} > ;; > + l) > + loader_opt="${loader_opt} -l ${OPTARG}" > + ;; > m) > memsize=${OPTARG} > ;; > @@ -163,6 +167,12 @@ if [ -n "${host_base}" ]; then > loader_opt="${loader_opt} -h ${host_base}" > fi > > +# If PCI passthru devices are configured then guest memory must be wired > +if [ ${pass_total} -gt 0 ]; then > + loader_opt="${loader_opt} -S" > + bhyverun_opt="${bhyverun_opt} -S" > +fi > + > make_and_check_diskdev() > { > local virtio_diskdev="$1" > @@ -263,7 +273,7 @@ while [ 1 ]; do > i=$(($i + 1)) > done > > - ${FBSDRUN} -c ${cpus} -m ${memsize} ${apic_opt} -A -H -P \ > + ${FBSDRUN} -c ${cpus} -m ${memsize} ${bhyverun_opt} \ > -g ${gdbport} \ > -s 0:0,hostbridge \ > -s 1:0,lpc \ > > Modified: stable/10/sys/amd64/include/vmm.h > ============================================================================== > --- stable/10/sys/amd64/include/vmm.h Mon Feb 1 14:28:58 2016 (r295123) > +++ stable/10/sys/amd64/include/vmm.h Mon Feb 1 14:56:11 2016 (r295124) > @@ -108,7 +108,6 @@ enum x2apic_state { > > struct vm; > struct vm_exception; > -struct vm_memory_segment; > struct seg_desc; > struct vm_exit; > struct vm_run; > @@ -175,17 +174,33 @@ int vm_create(const char *name, struct v > void vm_destroy(struct vm *vm); > int vm_reinit(struct vm *vm); > const char *vm_name(struct vm *vm); > -int vm_malloc(struct vm *vm, vm_paddr_t gpa, size_t len); > + > +/* > + * APIs that modify the guest memory map require all vcpus to be frozen. > + */ > +int vm_mmap_memseg(struct vm *vm, vm_paddr_t gpa, int segid, vm_ooffset_t off, > + size_t len, int prot, int flags); > +int vm_alloc_memseg(struct vm *vm, int ident, size_t len, bool sysmem); > +void vm_free_memseg(struct vm *vm, int ident); > int vm_map_mmio(struct vm *vm, vm_paddr_t gpa, size_t len, vm_paddr_t hpa); > int vm_unmap_mmio(struct vm *vm, vm_paddr_t gpa, size_t len); > -void *vm_gpa_hold(struct vm *, vm_paddr_t gpa, size_t len, int prot, > - void **cookie); > +int vm_assign_pptdev(struct vm *vm, int bus, int slot, int func); > +int vm_unassign_pptdev(struct vm *vm, int bus, int slot, int func); > + > +/* > + * APIs that inspect the guest memory map require only a *single* vcpu to > + * be frozen. This acts like a read lock on the guest memory map since any > + * modification requires *all* vcpus to be frozen. > + */ > +int vm_mmap_getnext(struct vm *vm, vm_paddr_t *gpa, int *segid, > + vm_ooffset_t *segoff, size_t *len, int *prot, int *flags); > +int vm_get_memseg(struct vm *vm, int ident, size_t *len, bool *sysmem, > + struct vm_object **objptr); > +void *vm_gpa_hold(struct vm *, int vcpuid, vm_paddr_t gpa, size_t len, > + int prot, void **cookie); > void vm_gpa_release(void *cookie); > -int vm_gpabase2memseg(struct vm *vm, vm_paddr_t gpabase, > - struct vm_memory_segment *seg); > -int vm_get_memobj(struct vm *vm, vm_paddr_t gpa, size_t len, > - vm_offset_t *offset, struct vm_object **object); > -boolean_t vm_mem_allocated(struct vm *vm, vm_paddr_t gpa); > +bool vm_mem_allocated(struct vm *vm, int vcpuid, vm_paddr_t gpa); > + > int vm_get_register(struct vm *vm, int vcpu, int reg, uint64_t *retval); > int vm_set_register(struct vm *vm, int vcpu, int reg, uint64_t val); > int vm_get_seg_desc(struct vm *vm, int vcpu, int reg, > @@ -302,8 +317,6 @@ vcpu_should_yield(struct vm *vm, int vcp > void *vcpu_stats(struct vm *vm, int vcpu); > void vcpu_notify_event(struct vm *vm, int vcpuid, bool lapic_intr); > struct vmspace *vm_get_vmspace(struct vm *vm); > -int vm_assign_pptdev(struct vm *vm, int bus, int slot, int func); > -int vm_unassign_pptdev(struct vm *vm, int bus, int slot, int func); > struct vatpic *vm_atpic(struct vm *vm); > struct vatpit *vm_atpit(struct vm *vm); > struct vpmtmr *vm_pmtmr(struct vm *vm); > > Modified: stable/10/sys/amd64/include/vmm_dev.h > ============================================================================== > --- stable/10/sys/amd64/include/vmm_dev.h Mon Feb 1 14:28:58 2016 (r295123) > +++ stable/10/sys/amd64/include/vmm_dev.h Mon Feb 1 14:56:11 2016 (r295124) > @@ -34,10 +34,22 @@ void vmmdev_init(void); > int vmmdev_cleanup(void); > #endif > > -struct vm_memory_segment { > - vm_paddr_t gpa; /* in */ > +struct vm_memmap { > + vm_paddr_t gpa; > + int segid; /* memory segment */ > + vm_ooffset_t segoff; /* offset into memory segment */ > + size_t len; /* mmap length */ > + int prot; /* RWX */ > + int flags; > +}; > +#define VM_MEMMAP_F_WIRED 0x01 > +#define VM_MEMMAP_F_IOMMU 0x02 > + > +#define VM_MEMSEG_NAME(m) ((m)->name[0] != '\0' ? (m)->name : NULL) > +struct vm_memseg { > + int segid; > size_t len; > - int wired; > + char name[SPECNAMELEN + 1]; > }; > > struct vm_register { > @@ -214,10 +226,14 @@ enum { > IOCNUM_REINIT = 5, > > /* memory apis */ > - IOCNUM_MAP_MEMORY = 10, > - IOCNUM_GET_MEMORY_SEG = 11, > + IOCNUM_MAP_MEMORY = 10, /* deprecated */ > + IOCNUM_GET_MEMORY_SEG = 11, /* deprecated */ > IOCNUM_GET_GPA_PMAP = 12, > IOCNUM_GLA2GPA = 13, > + IOCNUM_ALLOC_MEMSEG = 14, > + IOCNUM_GET_MEMSEG = 15, > + IOCNUM_MMAP_MEMSEG = 16, > + IOCNUM_MMAP_GETNEXT = 17, > > /* register/state accessors */ > IOCNUM_SET_REGISTER = 20, > @@ -278,10 +294,14 @@ enum { > _IOW('v', IOCNUM_SUSPEND, struct vm_suspend) > #define VM_REINIT \ > _IO('v', IOCNUM_REINIT) > -#define VM_MAP_MEMORY \ > - _IOWR('v', IOCNUM_MAP_MEMORY, struct vm_memory_segment) > -#define VM_GET_MEMORY_SEG \ > - _IOWR('v', IOCNUM_GET_MEMORY_SEG, struct vm_memory_segment) > +#define VM_ALLOC_MEMSEG \ > + _IOW('v', IOCNUM_ALLOC_MEMSEG, struct vm_memseg) > +#define VM_GET_MEMSEG \ > + _IOWR('v', IOCNUM_GET_MEMSEG, struct vm_memseg) > +#define VM_MMAP_MEMSEG \ > + _IOW('v', IOCNUM_MMAP_MEMSEG, struct vm_memmap) > +#define VM_MMAP_GETNEXT \ > + _IOWR('v', IOCNUM_MMAP_GETNEXT, struct vm_memmap) > #define VM_SET_REGISTER \ > _IOW('v', IOCNUM_SET_REGISTER, struct vm_register) > #define VM_GET_REGISTER \ > > Modified: stable/10/sys/amd64/vmm/amd/svm.c > ============================================================================== > --- stable/10/sys/amd64/vmm/amd/svm.c Mon Feb 1 14:28:58 2016 (r295123) > +++ stable/10/sys/amd64/vmm/amd/svm.c Mon Feb 1 14:56:11 2016 (r295124) > @@ -1477,7 +1477,7 @@ svm_vmexit(struct svm_softc *svm_sc, int > VCPU_CTR2(svm_sc->vm, vcpu, "nested page fault with " > "reserved bits set: info1(%#lx) info2(%#lx)", > info1, info2); > - } else if (vm_mem_allocated(svm_sc->vm, info2)) { > + } else if (vm_mem_allocated(svm_sc->vm, vcpu, info2)) { > vmexit->exitcode = VM_EXITCODE_PAGING; > vmexit->u.paging.gpa = info2; > vmexit->u.paging.fault_type = npf_fault_type(info1); > > Modified: stable/10/sys/amd64/vmm/intel/vmx.c > ============================================================================== > --- stable/10/sys/amd64/vmm/intel/vmx.c Mon Feb 1 14:28:58 2016 (r295123) > +++ stable/10/sys/amd64/vmm/intel/vmx.c Mon Feb 1 14:56:11 2016 (r295124) > @@ -2426,7 +2426,7 @@ vmx_exit_process(struct vmx *vmx, int vc > * this must be an instruction that accesses MMIO space. > */ > gpa = vmcs_gpa(); > - if (vm_mem_allocated(vmx->vm, gpa) || > + if (vm_mem_allocated(vmx->vm, vcpu, gpa) || > apic_access_fault(vmx, vcpu, gpa)) { > vmexit->exitcode = VM_EXITCODE_PAGING; > vmexit->inst_length = 0; > > Modified: stable/10/sys/amd64/vmm/io/ppt.c > ============================================================================== > --- stable/10/sys/amd64/vmm/io/ppt.c Mon Feb 1 14:28:58 2016 (r295123) > +++ stable/10/sys/amd64/vmm/io/ppt.c Mon Feb 1 14:56:11 2016 (r295124) > @@ -76,11 +76,17 @@ struct pptintr_arg { /* pptintr(pptin > uint64_t msg_data; > }; > > +struct pptseg { > + vm_paddr_t gpa; > + size_t len; > + int wired; > +}; > + > struct pptdev { > device_t dev; > struct vm *vm; /* owner of this device */ > TAILQ_ENTRY(pptdev) next; > - struct vm_memory_segment mmio[MAX_MMIOSEGS]; > + struct pptseg mmio[MAX_MMIOSEGS]; > struct { > int num_msgs; /* guest state */ > > @@ -207,14 +213,14 @@ static void > ppt_unmap_mmio(struct vm *vm, struct pptdev *ppt) > { > int i; > - struct vm_memory_segment *seg; > + struct pptseg *seg; > > for (i = 0; i < MAX_MMIOSEGS; i++) { > seg = &ppt->mmio[i]; > if (seg->len == 0) > continue; > (void)vm_unmap_mmio(vm, seg->gpa, seg->len); > - bzero(seg, sizeof(struct vm_memory_segment)); > + bzero(seg, sizeof(struct pptseg)); > } > } > > @@ -324,7 +330,7 @@ ppt_is_mmio(struct vm *vm, vm_paddr_t gp > { > int i; > struct pptdev *ppt; > - struct vm_memory_segment *seg; > + struct pptseg *seg; > > TAILQ_FOREACH(ppt, &pptdev_list, next) { > if (ppt->vm != vm) > @@ -410,7 +416,7 @@ ppt_map_mmio(struct vm *vm, int bus, int > vm_paddr_t gpa, size_t len, vm_paddr_t hpa) > { > int i, error; > - struct vm_memory_segment *seg; > + struct pptseg *seg; > struct pptdev *ppt; > > ppt = ppt_find(bus, slot, func); > > Modified: stable/10/sys/amd64/vmm/vmm.c > ============================================================================== > --- stable/10/sys/amd64/vmm/vmm.c Mon Feb 1 14:28:58 2016 (r295123) > +++ stable/10/sys/amd64/vmm/vmm.c Mon Feb 1 14:56:11 2016 (r295124) > @@ -120,12 +120,21 @@ struct vcpu { > #define vcpu_assert_locked(v) mtx_assert(&((v)->mtx), MA_OWNED) > > struct mem_seg { > + size_t len; > + bool sysmem; > + struct vm_object *object; > +}; > +#define VM_MAX_MEMSEGS 2 > + > +struct mem_map { > vm_paddr_t gpa; > size_t len; > - boolean_t wired; > - vm_object_t object; > + vm_ooffset_t segoff; > + int segid; > + int prot; > + int flags; > }; > -#define VM_MAX_MEMORY_SEGMENTS 2 > +#define VM_MAX_MEMMAPS 4 > > /* > * Initialization: > @@ -151,8 +160,8 @@ struct vm { > void *rendezvous_arg; /* (x) rendezvous func/arg */ > vm_rendezvous_func_t rendezvous_func; > struct mtx rendezvous_mtx; /* (o) rendezvous lock */ > - int num_mem_segs; /* (o) guest memory segments */ > - struct mem_seg mem_segs[VM_MAX_MEMORY_SEGMENTS]; > + struct mem_map mem_maps[VM_MAX_MEMMAPS]; /* (i) guest address space */ > + struct mem_seg mem_segs[VM_MAX_MEMSEGS]; /* (o) guest memory regions */ > struct vmspace *vmspace; /* (o) guest's address space */ > char name[VM_MAX_NAMELEN]; /* (o) virtual machine name */ > struct vcpu vcpu[VM_MAXCPU]; /* (i) guest vcpus */ > @@ -224,6 +233,8 @@ TUNABLE_INT("hw.vmm.force_iommu", &vmm_f > SYSCTL_INT(_hw_vmm, OID_AUTO, force_iommu, CTLFLAG_RDTUN, &vmm_force_iommu, 0, > "Force use of I/O MMU even if no passthrough devices were found."); > > +static void vm_free_memmap(struct vm *vm, int ident); > +static bool sysmem_mapping(struct vm *vm, struct mem_map *mm); > static void vcpu_notify_event_locked(struct vcpu *vcpu, bool lapic_intr); > > #ifdef KTR > @@ -444,7 +455,6 @@ vm_create(const char *name, struct vm ** > > vm = malloc(sizeof(struct vm), M_VM, M_WAITOK | M_ZERO); > strcpy(vm->name, name); > - vm->num_mem_segs = 0; > vm->vmspace = vmspace; > mtx_init(&vm->rendezvous_mtx, "vm rendezvous lock", 0, MTX_DEF); > > @@ -455,18 +465,9 @@ vm_create(const char *name, struct vm ** > } > > static void > -vm_free_mem_seg(struct vm *vm, struct mem_seg *seg) > -{ > - > - if (seg->object != NULL) > - vmm_mem_free(vm->vmspace, seg->gpa, seg->len); > - > - bzero(seg, sizeof(*seg)); > -} > - > -static void > vm_cleanup(struct vm *vm, bool destroy) > { > + struct mem_map *mm; > int i; > > ppt_unassign_all(vm); > @@ -489,11 +490,23 @@ vm_cleanup(struct vm *vm, bool destroy) > > VMCLEANUP(vm->cookie); > > - if (destroy) { > - for (i = 0; i < vm->num_mem_segs; i++) > - vm_free_mem_seg(vm, &vm->mem_segs[i]); > + /* > + * System memory is removed from the guest address space only when > + * the VM is destroyed. This is because the mapping remains the same > + * across VM reset. > + * > + * Device memory can be relocated by the guest (e.g. using PCI BARs) > + * so those mappings are removed on a VM reset. > + */ > + for (i = 0; i < VM_MAX_MEMMAPS; i++) { > + mm = &vm->mem_maps[i]; > + if (destroy || !sysmem_mapping(vm, mm)) > + vm_free_memmap(vm, i); > + } > > - vm->num_mem_segs = 0; > + if (destroy) { > + for (i = 0; i < VM_MAX_MEMSEGS; i++) > + vm_free_memseg(vm, i); > > VMSPACE_FREE(vm->vmspace); > vm->vmspace = NULL; > @@ -551,146 +564,243 @@ vm_unmap_mmio(struct vm *vm, vm_paddr_t > return (0); > } > > -boolean_t > -vm_mem_allocated(struct vm *vm, vm_paddr_t gpa) > +/* > + * Return 'true' if 'gpa' is allocated in the guest address space. > + * > + * This function is called in the context of a running vcpu which acts as > + * an implicit lock on 'vm->mem_maps[]'. > + */ > +bool > +vm_mem_allocated(struct vm *vm, int vcpuid, vm_paddr_t gpa) > { > + struct mem_map *mm; > int i; > - vm_paddr_t gpabase, gpalimit; > > - for (i = 0; i < vm->num_mem_segs; i++) { > - gpabase = vm->mem_segs[i].gpa; > - gpalimit = gpabase + vm->mem_segs[i].len; > - if (gpa >= gpabase && gpa < gpalimit) > - return (TRUE); /* 'gpa' is regular memory */ > +#ifdef INVARIANTS > + int hostcpu, state; > + state = vcpu_get_state(vm, vcpuid, &hostcpu); > + KASSERT(state == VCPU_RUNNING && hostcpu == curcpu, > + ("%s: invalid vcpu state %d/%d", __func__, state, hostcpu)); > +#endif > + > + for (i = 0; i < VM_MAX_MEMMAPS; i++) { > + mm = &vm->mem_maps[i]; > + if (mm->len != 0 && gpa >= mm->gpa && gpa < mm->gpa + mm->len) > + return (true); /* 'gpa' is sysmem or devmem */ > } > > if (ppt_is_mmio(vm, gpa)) > - return (TRUE); /* 'gpa' is pci passthru mmio */ > + return (true); /* 'gpa' is pci passthru mmio */ > > - return (FALSE); > + return (false); > } > > int > -vm_malloc(struct vm *vm, vm_paddr_t gpa, size_t len) > +vm_alloc_memseg(struct vm *vm, int ident, size_t len, bool sysmem) > { > - int available, allocated; > struct mem_seg *seg; > - vm_object_t object; > - vm_paddr_t g; > + vm_object_t obj; > > - if ((gpa & PAGE_MASK) || (len & PAGE_MASK) || len == 0) > + if (ident < 0 || ident >= VM_MAX_MEMSEGS) > return (EINVAL); > - > - available = allocated = 0; > - g = gpa; > - while (g < gpa + len) { > - if (vm_mem_allocated(vm, g)) > - allocated++; > - else > - available++; > > - g += PAGE_SIZE; > - } > - > - /* > - * If there are some allocated and some available pages in the address > - * range then it is an error. > - */ > - if (allocated && available) > + if (len == 0 || (len & PAGE_MASK)) > return (EINVAL); > > - /* > - * If the entire address range being requested has already been > - * allocated then there isn't anything more to do. > - */ > - if (allocated && available == 0) > - return (0); > - > - if (vm->num_mem_segs >= VM_MAX_MEMORY_SEGMENTS) > - return (E2BIG); > - > - seg = &vm->mem_segs[vm->num_mem_segs]; > + seg = &vm->mem_segs[ident]; > + if (seg->object != NULL) { > + if (seg->len == len && seg->sysmem == sysmem) > + return (EEXIST); > + else > + return (EINVAL); > + } > > - if ((object = vmm_mem_alloc(vm->vmspace, gpa, len)) == NULL) > + obj = vm_object_allocate(OBJT_DEFAULT, len >> PAGE_SHIFT); > + if (obj == NULL) > return (ENOMEM); > > - seg->gpa = gpa; > seg->len = len; > - seg->object = object; > - seg->wired = FALSE; > + seg->object = obj; > + seg->sysmem = sysmem; > + return (0); > +} > > - vm->num_mem_segs++; > +int > +vm_get_memseg(struct vm *vm, int ident, size_t *len, bool *sysmem, > + vm_object_t *objptr) > +{ > + struct mem_seg *seg; > + > + if (ident < 0 || ident >= VM_MAX_MEMSEGS) > + return (EINVAL); > > + seg = &vm->mem_segs[ident]; > + if (len) > + *len = seg->len; > + if (sysmem) > + *sysmem = seg->sysmem; > + if (objptr) > + *objptr = seg->object; > return (0); > } > > -static vm_paddr_t > -vm_maxmem(struct vm *vm) > +void > +vm_free_memseg(struct vm *vm, int ident) > { > - int i; > - vm_paddr_t gpa, maxmem; > + struct mem_seg *seg; > > - maxmem = 0; > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- Homepage: www.yamagi.org XMPP: yamagi@yamagi.org GnuPG/GPG: 0xEFBCCBCB From owner-svn-src-all@freebsd.org Mon Feb 1 19:36:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F07BBA970A5; Mon, 1 Feb 2016 19:36:34 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A832B15D0; Mon, 1 Feb 2016 19:36:34 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u11JaXAr097864; Mon, 1 Feb 2016 19:36:33 GMT (envelope-from skra@FreeBSD.org) Received: (from skra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u11JaXYD097860; Mon, 1 Feb 2016 19:36:33 GMT (envelope-from skra@FreeBSD.org) Message-Id: <201602011936.u11JaXYD097860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skra set sender to skra@FreeBSD.org using -f From: Svatopluk Kraus Date: Mon, 1 Feb 2016 19:36:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295128 - in head/sys/arm: arm mv/orion ti/omap4/pandaboard X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 19:36:35 -0000 Author: skra Date: Mon Feb 1 19:36:33 2016 New Revision: 295128 URL: https://svnweb.freebsd.org/changeset/base/295128 Log: Remove not needed includes. Modified: head/sys/arm/arm/genassym.c head/sys/arm/arm/mp_machdep.c head/sys/arm/mv/orion/db88f5xxx.c head/sys/arm/ti/omap4/pandaboard/pandaboard.c Modified: head/sys/arm/arm/genassym.c ============================================================================== --- head/sys/arm/arm/genassym.c Mon Feb 1 18:50:52 2016 (r295127) +++ head/sys/arm/arm/genassym.c Mon Feb 1 19:36:33 2016 (r295128) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/arm/arm/mp_machdep.c ============================================================================== --- head/sys/arm/arm/mp_machdep.c Mon Feb 1 18:50:52 2016 (r295127) +++ head/sys/arm/arm/mp_machdep.c Mon Feb 1 19:36:33 2016 (r295128) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/arm/mv/orion/db88f5xxx.c ============================================================================== --- head/sys/arm/mv/orion/db88f5xxx.c Mon Feb 1 18:50:52 2016 (r295127) +++ head/sys/arm/mv/orion/db88f5xxx.c Mon Feb 1 19:36:33 2016 (r295128) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/ti/omap4/pandaboard/pandaboard.c ============================================================================== --- head/sys/arm/ti/omap4/pandaboard/pandaboard.c Mon Feb 1 18:50:52 2016 (r295127) +++ head/sys/arm/ti/omap4/pandaboard/pandaboard.c Mon Feb 1 19:36:33 2016 (r295128) @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include From owner-svn-src-all@freebsd.org Mon Feb 1 19:43:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1BFBA97441; Mon, 1 Feb 2016 19:43:05 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAC1B1BC7; Mon, 1 Feb 2016 19:43:05 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u11Jh4Al000783; Mon, 1 Feb 2016 19:43:04 GMT (envelope-from skra@FreeBSD.org) Received: (from skra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u11Jh4Pi000782; Mon, 1 Feb 2016 19:43:04 GMT (envelope-from skra@FreeBSD.org) Message-Id: <201602011943.u11Jh4Pi000782@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skra set sender to skra@FreeBSD.org using -f From: Svatopluk Kraus Date: Mon, 1 Feb 2016 19:43:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295129 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 19:43:06 -0000 Author: skra Date: Mon Feb 1 19:43:04 2016 New Revision: 295129 URL: https://svnweb.freebsd.org/changeset/base/295129 Log: Remove all stuff related to __ARM_ARCH >= 6 from pmap.h header except for include. It was used by old pmap-v6 code. Modified: head/sys/arm/include/pmap.h Modified: head/sys/arm/include/pmap.h ============================================================================== --- head/sys/arm/include/pmap.h Mon Feb 1 19:36:33 2016 (r295128) +++ head/sys/arm/include/pmap.h Mon Feb 1 19:43:04 2016 (r295129) @@ -60,21 +60,10 @@ /* * Pte related macros */ -#if ARM_ARCH_6 || ARM_ARCH_7A -#ifdef SMP -#define PTE_NOCACHE 2 -#else -#define PTE_NOCACHE 1 -#endif -#define PTE_CACHE 6 -#define PTE_DEVICE 2 -#define PTE_PAGETABLE 6 -#else #define PTE_NOCACHE 1 #define PTE_CACHE 2 #define PTE_DEVICE PTE_NOCACHE #define PTE_PAGETABLE 3 -#endif enum mem_type { STRONG_ORD = 0, @@ -104,11 +93,7 @@ enum mem_type { #define pmap_page_get_memattr(m) ((m)->md.pv_memattr) #define pmap_page_is_write_mapped(m) (((m)->aflags & PGA_WRITEABLE) != 0) -#if (ARM_MMU_V6 + ARM_MMU_V7) > 0 -boolean_t pmap_page_is_mapped(vm_page_t); -#else #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) -#endif void pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma); /* @@ -131,9 +116,7 @@ struct pv_chunk; struct md_page { int pvh_attrs; vm_memattr_t pv_memattr; -#if (ARM_MMU_V6 + ARM_MMU_V7) == 0 vm_offset_t pv_kva; /* first kernel VA mapping */ -#endif TAILQ_HEAD(,pv_entry) pv_list; }; @@ -164,11 +147,7 @@ struct pmap { struct l2_dtable *pm_l2[L2_SIZE]; cpuset_t pm_active; /* active on cpus */ struct pmap_statistics pm_stats; /* pmap statictics */ -#if (ARM_MMU_V6 + ARM_MMU_V7) != 0 - TAILQ_HEAD(,pv_chunk) pm_pvchunk; /* list of mappings in pmap */ -#else TAILQ_HEAD(,pv_entry) pm_pvlist; /* list of mappings in pmap */ -#endif }; typedef struct pmap *pmap_t; @@ -198,10 +177,8 @@ typedef struct pv_entry { vm_offset_t pv_va; /* virtual address for mapping */ TAILQ_ENTRY(pv_entry) pv_list; int pv_flags; /* flags (wired, etc...) */ -#if (ARM_MMU_V6 + ARM_MMU_V7) == 0 pmap_t pv_pmap; /* pmap where mapping lies */ TAILQ_ENTRY(pv_entry) pv_plist; -#endif } *pv_entry_t; /* @@ -270,9 +247,7 @@ void *pmap_mapdev(vm_offset_t, vm_size_t void pmap_unmapdev(vm_offset_t, vm_size_t); vm_page_t pmap_use_pt(pmap_t, vm_offset_t); void pmap_debug(int); -#if (ARM_MMU_V6 + ARM_MMU_V7) == 0 void pmap_map_section(vm_offset_t, vm_offset_t, vm_offset_t, int, int); -#endif void pmap_link_l2pt(vm_offset_t, vm_offset_t, struct pv_addr *); vm_size_t pmap_map_chunk(vm_offset_t, vm_offset_t, vm_offset_t, vm_size_t, int, int); void @@ -340,119 +315,9 @@ extern int pmap_needs_pte_sync; /* * User-visible names for the ones that vary with MMU class. */ -#if (ARM_MMU_V6 + ARM_MMU_V7) != 0 -#define L2_AP(x) (L2_AP0(x)) -#else #define L2_AP(x) (L2_AP0(x) | L2_AP1(x) | L2_AP2(x) | L2_AP3(x)) -#endif -#if (ARM_MMU_V6 + ARM_MMU_V7) != 0 -/* - * AP[2:1] access permissions model: - * - * AP[2](APX) - Write Disable - * AP[1] - User Enable - * AP[0] - Reference Flag - * - * AP[2] AP[1] Kernel User - * 0 0 R/W N - * 0 1 R/W R/W - * 1 0 R N - * 1 1 R R - * - */ -#define L2_S_PROT_R (0) /* kernel read */ -#define L2_S_PROT_U (L2_AP0(2)) /* user read */ -#define L2_S_REF (L2_AP0(1)) /* reference flag */ - -#define L2_S_PROT_MASK (L2_S_PROT_U|L2_S_PROT_R|L2_APX) -#define L2_S_EXECUTABLE(pte) (!(pte & L2_XN)) -#define L2_S_WRITABLE(pte) (!(pte & L2_APX)) -#define L2_S_REFERENCED(pte) (!!(pte & L2_S_REF)) - -#ifndef SMP -#define L1_S_CACHE_MASK (L1_S_TEX_MASK|L1_S_B|L1_S_C) -#define L2_L_CACHE_MASK (L2_L_TEX_MASK|L2_B|L2_C) -#define L2_S_CACHE_MASK (L2_S_TEX_MASK|L2_B|L2_C) -#else -#define L1_S_CACHE_MASK (L1_S_TEX_MASK|L1_S_B|L1_S_C|L1_SHARED) -#define L2_L_CACHE_MASK (L2_L_TEX_MASK|L2_B|L2_C|L2_SHARED) -#define L2_S_CACHE_MASK (L2_S_TEX_MASK|L2_B|L2_C|L2_SHARED) -#endif /* SMP */ - -#define L1_S_PROTO (L1_TYPE_S) -#define L1_C_PROTO (L1_TYPE_C) -#define L2_S_PROTO (L2_TYPE_S) - -/* - * Promotion to a 1MB (SECTION) mapping requires that the corresponding - * 4KB (SMALL) page mappings have identical settings for the following fields: - */ -#define L2_S_PROMOTE (L2_S_REF | L2_SHARED | L2_S_PROT_MASK | \ - L2_XN | L2_S_PROTO) - -/* - * In order to compare 1MB (SECTION) entry settings with the 4KB (SMALL) - * page mapping it is necessary to read and shift appropriate bits from - * L1 entry to positions of the corresponding bits in the L2 entry. - */ -#define L1_S_DEMOTE(l1pd) ((((l1pd) & L1_S_PROTO) >> 0) | \ - (((l1pd) & L1_SHARED) >> 6) | \ - (((l1pd) & L1_S_REF) >> 6) | \ - (((l1pd) & L1_S_PROT_MASK) >> 6) | \ - (((l1pd) & L1_S_XN) >> 4)) - -#ifndef SMP -#define ARM_L1S_STRONG_ORD (0) -#define ARM_L1S_DEVICE_NOSHARE (L1_S_TEX(2)) -#define ARM_L1S_DEVICE_SHARE (L1_S_B) -#define ARM_L1S_NRML_NOCACHE (L1_S_TEX(1)) -#define ARM_L1S_NRML_IWT_OWT (L1_S_C) -#define ARM_L1S_NRML_IWB_OWB (L1_S_C|L1_S_B) -#define ARM_L1S_NRML_IWBA_OWBA (L1_S_TEX(1)|L1_S_C|L1_S_B) - -#define ARM_L2L_STRONG_ORD (0) -#define ARM_L2L_DEVICE_NOSHARE (L2_L_TEX(2)) -#define ARM_L2L_DEVICE_SHARE (L2_B) -#define ARM_L2L_NRML_NOCACHE (L2_L_TEX(1)) -#define ARM_L2L_NRML_IWT_OWT (L2_C) -#define ARM_L2L_NRML_IWB_OWB (L2_C|L2_B) -#define ARM_L2L_NRML_IWBA_OWBA (L2_L_TEX(1)|L2_C|L2_B) - -#define ARM_L2S_STRONG_ORD (0) -#define ARM_L2S_DEVICE_NOSHARE (L2_S_TEX(2)) -#define ARM_L2S_DEVICE_SHARE (L2_B) -#define ARM_L2S_NRML_NOCACHE (L2_S_TEX(1)) -#define ARM_L2S_NRML_IWT_OWT (L2_C) -#define ARM_L2S_NRML_IWB_OWB (L2_C|L2_B) -#define ARM_L2S_NRML_IWBA_OWBA (L2_S_TEX(1)|L2_C|L2_B) -#else -#define ARM_L1S_STRONG_ORD (0) -#define ARM_L1S_DEVICE_NOSHARE (L1_S_TEX(2)) -#define ARM_L1S_DEVICE_SHARE (L1_S_B) -#define ARM_L1S_NRML_NOCACHE (L1_S_TEX(1)|L1_SHARED) -#define ARM_L1S_NRML_IWT_OWT (L1_S_C|L1_SHARED) -#define ARM_L1S_NRML_IWB_OWB (L1_S_C|L1_S_B|L1_SHARED) -#define ARM_L1S_NRML_IWBA_OWBA (L1_S_TEX(1)|L1_S_C|L1_S_B|L1_SHARED) - -#define ARM_L2L_STRONG_ORD (0) -#define ARM_L2L_DEVICE_NOSHARE (L2_L_TEX(2)) -#define ARM_L2L_DEVICE_SHARE (L2_B) -#define ARM_L2L_NRML_NOCACHE (L2_L_TEX(1)|L2_SHARED) -#define ARM_L2L_NRML_IWT_OWT (L2_C|L2_SHARED) -#define ARM_L2L_NRML_IWB_OWB (L2_C|L2_B|L2_SHARED) -#define ARM_L2L_NRML_IWBA_OWBA (L2_L_TEX(1)|L2_C|L2_B|L2_SHARED) - -#define ARM_L2S_STRONG_ORD (0) -#define ARM_L2S_DEVICE_NOSHARE (L2_S_TEX(2)) -#define ARM_L2S_DEVICE_SHARE (L2_B) -#define ARM_L2S_NRML_NOCACHE (L2_S_TEX(1)|L2_SHARED) -#define ARM_L2S_NRML_IWT_OWT (L2_C|L2_SHARED) -#define ARM_L2S_NRML_IWB_OWB (L2_C|L2_B|L2_SHARED) -#define ARM_L2S_NRML_IWBA_OWBA (L2_S_TEX(1)|L2_C|L2_B|L2_SHARED) -#endif /* SMP */ - -#elif ARM_NMMUS > 1 +#if ARM_NMMUS > 1 /* More than one MMU class configured; use variables. */ #define L2_S_PROT_U pte_l2_s_prot_u #define L2_S_PROT_W pte_l2_s_prot_w @@ -494,7 +359,7 @@ extern int pmap_needs_pte_sync; #endif /* ARM_NMMUS > 1 */ -#if defined(CPU_XSCALE_81342) || ARM_ARCH_6 || ARM_ARCH_7A +#if defined(CPU_XSCALE_81342) #define PMAP_NEEDS_PTE_SYNC 1 #define PMAP_INCLUDE_PTE_SYNC #else @@ -505,8 +370,6 @@ extern int pmap_needs_pte_sync; * These macros return various bits based on kernel/user and protection. * Note that the compiler will usually fold these at compile time. */ -#if (ARM_MMU_V6 + ARM_MMU_V7) == 0 - #define L1_S_PROT_U (L1_S_AP(AP_U)) #define L1_S_PROT_W (L1_S_AP(AP_W)) #define L1_S_PROT_MASK (L1_S_PROT_U|L1_S_PROT_W) @@ -524,27 +387,6 @@ extern int pmap_needs_pte_sync; #define L2_S_PROT(ku, pr) ((((ku) == PTE_USER) ? L2_S_PROT_U : 0) | \ (((pr) & VM_PROT_WRITE) ? L2_S_PROT_W : 0)) -#else -#define L1_S_PROT_U (L1_S_AP(AP_U)) -#define L1_S_PROT_W (L1_S_APX) /* Write disable */ -#define L1_S_PROT_MASK (L1_S_PROT_W|L1_S_PROT_U) -#define L1_S_REF (L1_S_AP(AP_REF)) /* Reference flag */ -#define L1_S_WRITABLE(pd) (!((pd) & L1_S_PROT_W)) -#define L1_S_EXECUTABLE(pd) (!((pd) & L1_S_XN)) -#define L1_S_REFERENCED(pd) ((pd) & L1_S_REF) - -#define L1_S_PROT(ku, pr) (((((ku) == PTE_KERNEL) ? 0 : L1_S_PROT_U) | \ - (((pr) & VM_PROT_WRITE) ? 0 : L1_S_PROT_W) | \ - (((pr) & VM_PROT_EXECUTE) ? 0 : L1_S_XN))) - -#define L2_L_PROT_MASK (L2_APX|L2_AP0(0x3)) -#define L2_L_PROT(ku, pr) (L2_L_PROT_MASK & ~((((ku) == PTE_KERNEL) ? L2_S_PROT_U : 0) | \ - (((pr) & VM_PROT_WRITE) ? L2_APX : 0))) - -#define L2_S_PROT(ku, pr) (L2_S_PROT_MASK & ~((((ku) == PTE_KERNEL) ? L2_S_PROT_U : 0) | \ - (((pr) & VM_PROT_WRITE) ? L2_APX : 0))) - -#endif /* * Macros to test if a mapping is mappable with an L1 Section mapping @@ -619,12 +461,12 @@ extern void (*pmap_copy_page_offs_func)( vm_offset_t a_offs, vm_paddr_t b_phys, vm_offset_t b_offs, int cnt); extern void (*pmap_zero_page_func)(vm_paddr_t, int, int); -#if (ARM_MMU_GENERIC + ARM_MMU_V6 + ARM_MMU_V7) != 0 || defined(CPU_XSCALE_81342) +#if ARM_MMU_GENERIC != 0 || defined(CPU_XSCALE_81342) void pmap_copy_page_generic(vm_paddr_t, vm_paddr_t); void pmap_zero_page_generic(vm_paddr_t, int, int); void pmap_pte_init_generic(void); -#endif /* (ARM_MMU_GENERIC + ARM_MMU_V6 + ARM_MMU_V7) != 0 */ +#endif /* ARM_MMU_GENERIC != 0 */ #if ARM_MMU_XSCALE == 1 void pmap_copy_page_xscale(vm_paddr_t, vm_paddr_t); From owner-svn-src-all@freebsd.org Mon Feb 1 20:29:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A9D7A989BA; Mon, 1 Feb 2016 20:29:53 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 6DE3F1C11; Mon, 1 Feb 2016 20:29:53 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 61C0F1885; Mon, 1 Feb 2016 20:29:53 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id AC4551A29F; Mon, 1 Feb 2016 20:29:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id FLTnAc5lTB7H; Mon, 1 Feb 2016 20:29:45 +0000 (UTC) Subject: Re: svn commit: r294464 - in head: crypto/openssh crypto/openssh/contrib/redhat crypto/openssh/contrib/suse crypto/openssh/openbsd-compat crypto/openssh/regress crypto/openssh/regress/unittests crypto/... DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 787641A294 To: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201601202257.u0KMvA89056089@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <56AFC036.6080508@FreeBSD.org> Date: Mon, 1 Feb 2016 12:29:42 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <201601202257.u0KMvA89056089@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="G03gruP8aV9OtCrwFcegJ2x7u81GokLpO" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 20:29:53 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --G03gruP8aV9OtCrwFcegJ2x7u81GokLpO Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 1/20/2016 2:57 PM, Dag-Erling Sm=C3=B8rgrav wrote: > Author: des > Date: Wed Jan 20 22:57:10 2016 > New Revision: 294464 > URL: https://svnweb.freebsd.org/changeset/base/294464 >=20 > Log: > Upgrade to OpenSSH 7.0p1. =2E.. > Index: crypto/openssh/sshd_config > =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 > --- crypto/openssh/sshd_config (revision 294463) > +++ crypto/openssh/sshd_config (revision 294464) > @@ -1,4 +1,4 @@ > -# $OpenBSD: sshd_config,v 1.95 2015/04/27 21:42:48 djm Exp $ > +# $OpenBSD: sshd_config,v 1.97 2015/08/06 14:53:21 deraadt Exp $ > # $FreeBSD$ >=20 > # This is the sshd server system-wide configuration file. See > @@ -45,7 +45,7 @@ > # Authentication: >=20 > #LoginGraceTime 2m > -#PermitRootLogin no > +#PermitRootLogin prohibit-password > #StrictModes yes > #MaxAuthTries 6 > #MaxSessions 10 Shouldn't the comments note the default? The default here is still 'no'. Upstream 7.1p2 does use PERMIT_NO_PASSWD rather than PERMIT_NO that we have. I think we should make this change: > Index: crypto/openssh/servconf.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 > --- crypto/openssh/servconf.c (revision 294275) > +++ crypto/openssh/servconf.c (working copy) > @@ -202,7 +202,7 @@ > if (options->key_regeneration_time =3D=3D -1) > options->key_regeneration_time =3D 3600; > if (options->permit_root_login =3D=3D PERMIT_NOT_SET) > - options->permit_root_login =3D PERMIT_NO; > + options->permit_root_login =3D PERMIT_NO_PASSWD; > if (options->ignore_rhosts =3D=3D -1) > options->ignore_rhosts =3D 1; > if (options->ignore_user_known_hosts =3D=3D -1) --=20 Regards, Bryan Drewery --G03gruP8aV9OtCrwFcegJ2x7u81GokLpO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWr8BBAAoJEDXXcbtuRpfPJUEH/jCp2P0zdoqXT8R9lySoMJx1 Lfa8+v4U2ZuPiclEitHxZj0C0mugx0p6I5PC60vd7XX4//WNqNNANTxc6gIey/7I aQqlxI3/7AzNpi3Q6zlEemAOV9GWxQxbWwlArZVUJAkWj5GoMRx7ZRmch6ebosO3 4iSE8zZwVCIFq53V6J6MLEfyRLF0I17OkffyF85VbUiLS61TeAN6PWk04CQz9Xdl QyV5YVNpL6cvpPyYG/Vv9nl321YYv7nrYeRLnFnCH1jRtW7bgQGJuViSDYQk+Q7Y qTFQWlSZ9ngjlMdl2gYUQAnT4mAySfE11JNOeSC1gys6JLbPhTp4N+yXzKgzOtE= =fcFM -----END PGP SIGNATURE----- --G03gruP8aV9OtCrwFcegJ2x7u81GokLpO-- From owner-svn-src-all@freebsd.org Mon Feb 1 22:16:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45A4DA98D3A; Mon, 1 Feb 2016 22:16:43 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16A271756; Mon, 1 Feb 2016 22:16:43 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u11MGgQu049922; Mon, 1 Feb 2016 22:16:42 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u11MGgEp049921; Mon, 1 Feb 2016 22:16:42 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201602012216.u11MGgEp049921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Mon, 1 Feb 2016 22:16:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295130 - stable/10/etc/periodic/security X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 22:16:43 -0000 Author: marius Date: Mon Feb 1 22:16:41 2016 New Revision: 295130 URL: https://svnweb.freebsd.org/changeset/base/295130 Log: MFC: r295032 Use '^[>+][^+]' instead of '^[>+]' with grep(1) when filtering the diff(1) output between two files in "new_only"-mode. Otherwise, with the default of using unified format a remnant of the header in the output is the result. This is especially irritating when the two files differ but the second one is empty, amounting to the vestige of the header being the only readout. Reported by: Stefan Haemmerl Approved by: re (delphij) Modified: stable/10/etc/periodic/security/security.functions Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/periodic/security/security.functions ============================================================================== --- stable/10/etc/periodic/security/security.functions Mon Feb 1 19:43:04 2016 (r295129) +++ stable/10/etc/periodic/security/security.functions Mon Feb 1 22:16:41 2016 (r295130) @@ -51,7 +51,7 @@ check_diff() { rc=0 if [ "$1" = "new_only" ]; then shift - filter="grep '^[>+]'" + filter="grep '^[>+][^+]'" else filter="cat" fi From owner-svn-src-all@freebsd.org Mon Feb 1 23:07:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B25EA970EC; Mon, 1 Feb 2016 23:07:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3ADF71396; Mon, 1 Feb 2016 23:07:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u11N7X5r064614; Mon, 1 Feb 2016 23:07:33 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u11N7Vom064597; Mon, 1 Feb 2016 23:07:31 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201602012307.u11N7Vom064597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 1 Feb 2016 23:07:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295131 - in stable/10: contrib/mdocml lib lib/libdevctl share/mk sys/conf sys/dev/acpica sys/dev/pci sys/kern sys/sys usr.sbin usr.sbin/devctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 23:07:34 -0000 Author: jhb Date: Mon Feb 1 23:07:31 2016 New Revision: 295131 URL: https://svnweb.freebsd.org/changeset/base/295131 Log: MFC 278320,278336,278830,285621: Add devctl(8): a utility for manipulating new-bus devices. Note that this version does not include the 'suspend' and 'resume' commands present in HEAD as those depend on larger changes to the suspend and resume code in the kernel. 278320: Add a new device control utility for new-bus devices called devctl. This allows the user to request administrative changes to individual devices such as attach or detaching drivers or disabling and re-enabling devices. - Add a new /dev/devctl2 character device which uses ioctls for device requests. The ioctls use a common 'struct devreq' which is somewhat similar to 'struct ifreq'. - The ioctls identify the device to operate on via a string. This string can either by the device's name, or it can be a bus-specific address. (For unattached devices, a bus address is the only way to locate a device.) Bus drivers register an eventhandler to claim unrecognized device names that the driver recognizes as a valid address. Two buses currently support addresses: ACPI recognizes any device in the ACPI namespace via its full path starting with "\" and the PCI bus driver recognizes an address specification of 'pci[:]::' (identical to the PCI selector strings supported by pciconf). - To make it easier to cut and paste, change the PnP location string in the PCI bus driver to output a full PCI selector string rather than 'slot= function='. - Add a devctl(3) interface in libdevctl which provides a wrapper around the ioctls and is the preferred interface for other userland code. - Add a devctl(8) program which is a simple wrapper around the requests supported by devctl(3). - Add a resource_unset_value() function that can be used to remove a hint from the kernel environment. This is used to clear a hint...disabled hint when re-enabling a boot-time disabled device. 278336: Unbreak the build (memchr is explicitly required by devctl(9) after r278320) 278830: install the man page... 285621: Fix formatting. Approved by: re (marius) Added: stable/10/lib/libdevctl/ - copied from r278320, head/lib/libdevctl/ stable/10/usr.sbin/devctl/ - copied from r278320, head/usr.sbin/devctl/ Modified: stable/10/contrib/mdocml/lib.in stable/10/lib/Makefile stable/10/lib/libdevctl/devctl.3 stable/10/lib/libdevctl/devctl.c stable/10/lib/libdevctl/devctl.h stable/10/share/mk/bsd.libnames.mk stable/10/sys/conf/files stable/10/sys/dev/acpica/acpi.c stable/10/sys/dev/pci/pci.c stable/10/sys/kern/subr_bus.c stable/10/sys/kern/subr_hints.c stable/10/sys/sys/bus.h stable/10/usr.sbin/Makefile stable/10/usr.sbin/devctl/Makefile stable/10/usr.sbin/devctl/devctl.8 stable/10/usr.sbin/devctl/devctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/mdocml/lib.in ============================================================================== --- stable/10/contrib/mdocml/lib.in Mon Feb 1 22:16:41 2016 (r295130) +++ stable/10/contrib/mdocml/lib.in Mon Feb 1 23:07:31 2016 (r295131) @@ -37,6 +37,7 @@ LINE("libcipher", "FreeSec Crypt Library LINE("libcompat", "Compatibility Library (libcompat, \\-lcompat)") LINE("libcrypt", "Crypt Library (libcrypt, \\-lcrypt)") LINE("libcurses", "Curses Library (libcurses, \\-lcurses)") +LINE("libdevctl", "Device Control Library (libdevctl, \\-ldevctl)") LINE("libdevinfo", "Device and Resource Information Utility Library (libdevinfo, \\-ldevinfo)") LINE("libdevstat", "Device Statistics Library (libdevstat, \\-ldevstat)") LINE("libdisk", "Interface to Slice and Partition Labels Library (libdisk, \\-ldisk)") Modified: stable/10/lib/Makefile ============================================================================== --- stable/10/lib/Makefile Mon Feb 1 22:16:41 2016 (r295130) +++ stable/10/lib/Makefile Mon Feb 1 23:07:31 2016 (r295131) @@ -37,6 +37,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libcom_err} \ libcompat \ libcrypt \ + libdevctl \ libdevinfo \ libdevstat \ libdpv \ Modified: stable/10/lib/libdevctl/devctl.3 ============================================================================== --- head/lib/libdevctl/devctl.3 Fri Feb 6 16:09:01 2015 (r278320) +++ stable/10/lib/libdevctl/devctl.3 Mon Feb 1 23:07:31 2016 (r295131) @@ -33,9 +33,7 @@ .Nm devctl_attach , .Nm devctl_detach , .Nm devctl_disable , -.Nm devctl_enable , -.Nm devctl_resume , -.Nm devctl_suspend +.Nm devctl_enable .Nd device control library .Sh LIBRARY .Lb libdevctl @@ -50,10 +48,6 @@ .Ft int .Fn devctl_enable "const char *device" .Ft int -.Fn devctl_resume "const char *device" -.Ft int -.Fn devctl_suspend "const char *device" -.Ft int .Fn devctl_set_driver "const char *device" "const char *driver" "bool force" .Sh DESCRIPTION The @@ -125,16 +119,6 @@ function re-enables a disabled device. The device will probe and attach if a suitable device driver is found. .Pp The -.Fn devctl_suspend -function suspends a device. -This may include placing the device in a reduced power state, -but any device driver currently attached to the device will remain attached. -.Pp -The -.Fn devctl_resume -function resumes a suspended device to a fully working state. -.Pp -The .Fn devctl_set_driver function attaches a device driver named .Fa driver @@ -150,7 +134,7 @@ the device will be detached from its cur attached to the new device driver. .Sh RETURN VALUES .Rv -std devctl_attach devctl_detach devctl_disable devctl_enable \ -devctl_suspend devctl_resume devctl_set_driver +devctl_set_driver .Sh ERRORS In addition to specific errors noted below, all of the @@ -235,26 +219,6 @@ does not support detaching. .El .Pp The -.Fn devctl_suspend -function may fail if: -.Bl -tag -width Er -.It Bq Er EBUSY -The device is already suspended. -.It Bq Er EINVAL -The device to be suspended is the root bus device. -.El -.Pp -The -.Fn devctl_resume -function may fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The device is not suspended. -.It Bq Er EINVAL -The device to be resumed is the root bus device. -.El -.Pp -The .Fn devctl_set_driver function may fail if: .Bl -tag -width Er @@ -288,8 +252,3 @@ The .Nm library first appeared in .Fx 11.0 . -.Sh BUGS -If a device is suspended individually via -.Fn devctl_suspend -and the entire machine is subsequently suspended, -the device will be resumed when the machine resumes. Modified: stable/10/lib/libdevctl/devctl.c ============================================================================== --- head/lib/libdevctl/devctl.c Fri Feb 6 16:09:01 2015 (r278320) +++ stable/10/lib/libdevctl/devctl.c Mon Feb 1 23:07:31 2016 (r295131) @@ -93,20 +93,6 @@ devctl_disable(const char *device, bool } int -devctl_suspend(const char *device) -{ - - return (devctl_simple_request(DEV_SUSPEND, device, 0)); -} - -int -devctl_resume(const char *device) -{ - - return (devctl_simple_request(DEV_RESUME, device, 0)); -} - -int devctl_set_driver(const char *device, const char *driver, bool force) { struct devreq req; Modified: stable/10/lib/libdevctl/devctl.h ============================================================================== --- head/lib/libdevctl/devctl.h Fri Feb 6 16:09:01 2015 (r278320) +++ stable/10/lib/libdevctl/devctl.h Mon Feb 1 23:07:31 2016 (r295131) @@ -35,8 +35,6 @@ int devctl_attach(const char *device); int devctl_detach(const char *device, bool force); int devctl_enable(const char *device); int devctl_disable(const char *device, bool force_detach); -int devctl_suspend(const char *device); -int devctl_resume(const char *device); int devctl_set_driver(const char *device, const char *driver, bool force); #endif /* !__DEVCTL_H__ */ Modified: stable/10/share/mk/bsd.libnames.mk ============================================================================== --- stable/10/share/mk/bsd.libnames.mk Mon Feb 1 22:16:41 2016 (r295130) +++ stable/10/share/mk/bsd.libnames.mk Mon Feb 1 23:07:31 2016 (r295131) @@ -38,6 +38,7 @@ LIBCRYPT?= ${DESTDIR}${LIBDIR}/libcrypt. LIBCRYPTO?= ${DESTDIR}${LIBDIR}/libcrypto.a LIBCTF?= ${DESTDIR}${LIBDIR}/libctf.a LIBCURSES?= ${DESTDIR}${LIBDIR}/libcurses.a +LIBDEVCTL?= ${DESTDIR}${LIBDIR}/libdevctl.a LIBDEVINFO?= ${DESTDIR}${LIBDIR}/libdevinfo.a LIBDEVSTAT?= ${DESTDIR}${LIBDIR}/libdevstat.a LIBDIALOG?= ${DESTDIR}${LIBDIR}/libdialog.a Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Mon Feb 1 22:16:41 2016 (r295130) +++ stable/10/sys/conf/files Mon Feb 1 23:07:31 2016 (r295131) @@ -3238,7 +3238,7 @@ libkern/jenkins_hash.c standard libkern/murmur3_32.c standard libkern/mcount.c optional profiling-routine libkern/memcchr.c standard -libkern/memchr.c optional fdt +libkern/memchr.c standard libkern/memcmp.c standard libkern/qsort.c standard libkern/qsort_r.c standard Modified: stable/10/sys/dev/acpica/acpi.c ============================================================================== --- stable/10/sys/dev/acpica/acpi.c Mon Feb 1 22:16:41 2016 (r295130) +++ stable/10/sys/dev/acpica/acpi.c Mon Feb 1 23:07:31 2016 (r295131) @@ -100,6 +100,7 @@ int acpi_quirks; /* Supported sleep states. */ static BOOLEAN acpi_sleep_states[ACPI_S_STATE_COUNT]; +static void acpi_lookup(void *arg, const char *name, device_t *dev); static int acpi_modevent(struct module *mod, int event, void *junk); static int acpi_probe(device_t dev); static int acpi_attach(device_t dev); @@ -670,8 +671,10 @@ acpi_attach(device_t dev) /* Register ACPI again to pass the correct argument of pm_func. */ power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, sc); - if (!acpi_disabled("bus")) + if (!acpi_disabled("bus")) { + EVENTHANDLER_REGISTER(dev_lookup, acpi_lookup, NULL, 1000); acpi_probe_children(dev); + } /* Update all GPEs and enable runtime GPEs. */ status = AcpiUpdateAllGpes(); @@ -3404,6 +3407,31 @@ acpi_disabled(char *subsys) return (0); } +static void +acpi_lookup(void *arg, const char *name, device_t *dev) +{ + ACPI_HANDLE handle; + + if (*dev != NULL) + return; + + /* + * Allow any handle name that is specified as an absolute path and + * starts with '\'. We could restrict this to \_SB and friends, + * but see acpi_probe_children() for notes on why we scan the entire + * namespace for devices. + * + * XXX: The pathname argument to AcpiGetHandle() should be fixed to + * be const. + */ + if (name[0] != '\\') + return; + if (ACPI_FAILURE(AcpiGetHandle(ACPI_ROOT_OBJECT, __DECONST(char *, name), + &handle))) + return; + *dev = acpi_get_device(handle); +} + /* * Control interface. * Modified: stable/10/sys/dev/pci/pci.c ============================================================================== --- stable/10/sys/dev/pci/pci.c Mon Feb 1 22:16:41 2016 (r295130) +++ stable/10/sys/dev/pci/pci.c Mon Feb 1 23:07:31 2016 (r295131) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -4924,8 +4925,8 @@ pci_child_location_str_method(device_t d size_t buflen) { - snprintf(buf, buflen, "slot=%d function=%d", pci_get_slot(child), - pci_get_function(child)); + snprintf(buf, buflen, "pci%d:%d:%d:%d", pci_get_domain(child), + pci_get_bus(child), pci_get_slot(child), pci_get_function(child)); return (0); } @@ -4955,10 +4956,60 @@ pci_assign_interrupt_method(device_t dev cfg->intpin)); } +static void +pci_lookup(void *arg, const char *name, device_t *dev) +{ + long val; + char *end; + int domain, bus, slot, func; + + if (*dev != NULL) + return; + + /* + * Accept pciconf-style selectors of either pciD:B:S:F or + * pciB:S:F. In the latter case, the domain is assumed to + * be zero. + */ + if (strncmp(name, "pci", 3) != 0) + return; + val = strtol(name + 3, &end, 10); + if (val < 0 || val > INT_MAX || *end != ':') + return; + domain = val; + val = strtol(end + 1, &end, 10); + if (val < 0 || val > INT_MAX || *end != ':') + return; + bus = val; + val = strtol(end + 1, &end, 10); + if (val < 0 || val > INT_MAX) + return; + slot = val; + if (*end == ':') { + val = strtol(end + 1, &end, 10); + if (val < 0 || val > INT_MAX || *end != '\0') + return; + func = val; + } else if (*end == '\0') { + func = slot; + slot = bus; + bus = domain; + domain = 0; + } else + return; + + if (domain > PCI_DOMAINMAX || bus > PCI_BUSMAX || slot > PCI_SLOTMAX || + func > PCIE_ARI_FUNCMAX || (slot != 0 && func > PCI_FUNCMAX)) + return; + + *dev = pci_find_dbsf(domain, bus, slot, func); +} + static int pci_modevent(module_t mod, int what, void *arg) { static struct cdev *pci_cdev; + static eventhandler_tag tag; switch (what) { case MOD_LOAD: @@ -4967,9 +5018,13 @@ pci_modevent(module_t mod, int what, voi pci_cdev = make_dev(&pcicdev, 0, UID_ROOT, GID_WHEEL, 0644, "pci"); pci_load_vendor_data(); + tag = EVENTHANDLER_REGISTER(dev_lookup, pci_lookup, NULL, + 1000); break; case MOD_UNLOAD: + if (tag != NULL) + EVENTHANDLER_DEREGISTER(dev_lookup, tag); destroy_dev(pci_cdev); break; } Modified: stable/10/sys/kern/subr_bus.c ============================================================================== --- stable/10/sys/kern/subr_bus.c Mon Feb 1 22:16:41 2016 (r295130) +++ stable/10/sys/kern/subr_bus.c Mon Feb 1 23:07:31 2016 (r295131) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -147,6 +148,8 @@ struct device { static MALLOC_DEFINE(M_BUS, "bus", "Bus data structures"); static MALLOC_DEFINE(M_BUS_SC, "bus-sc", "Bus data structures, softc"); +static void devctl2_init(void); + #ifdef BUS_DEBUG static int bus_debug = 1; @@ -434,6 +437,7 @@ devinit(void) cv_init(&devsoftc.cv, "dev cv"); TAILQ_INIT(&devsoftc.devq); knlist_init_mtx(&devsoftc.sel.si_note, &devsoftc.mtx); + devctl2_init(); } static int @@ -4998,3 +5002,229 @@ bus_free_resource(device_t dev, int type return (0); return (bus_release_resource(dev, type, rman_get_rid(r), r)); } + +/* + * /dev/devctl2 implementation. The existing /dev/devctl device has + * implicit semantics on open, so it could not be reused for this. + * Another option would be to call this /dev/bus? + */ +static int +find_device(struct devreq *req, device_t *devp) +{ + device_t dev; + + /* + * First, ensure that the name is nul terminated. + */ + if (memchr(req->dr_name, '\0', sizeof(req->dr_name)) == NULL) + return (EINVAL); + + /* + * Second, try to find an attached device whose name matches + * 'name'. + */ + TAILQ_FOREACH(dev, &bus_data_devices, devlink) { + if (dev->nameunit != NULL && + strcmp(dev->nameunit, req->dr_name) == 0) { + *devp = dev; + return (0); + } + } + + /* Finally, give device enumerators a chance. */ + dev = NULL; + EVENTHANDLER_INVOKE(dev_lookup, req->dr_name, &dev); + if (dev == NULL) + return (ENOENT); + *devp = dev; + return (0); +} + +static bool +driver_exists(struct device *bus, const char *driver) +{ + devclass_t dc; + + for (dc = bus->devclass; dc != NULL; dc = dc->parent) { + if (devclass_find_driver_internal(dc, driver) != NULL) + return (true); + } + return (false); +} + +static int +devctl2_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int fflag, + struct thread *td) +{ + struct devreq *req; + device_t dev; + int error, old; + + /* Locate the device to control. */ + mtx_lock(&Giant); + req = (struct devreq *)data; + switch (cmd) { + case DEV_ATTACH: + case DEV_DETACH: + case DEV_ENABLE: + case DEV_DISABLE: + case DEV_SET_DRIVER: + error = priv_check(td, PRIV_DRIVER); + if (error == 0) + error = find_device(req, &dev); + break; + default: + error = ENOTTY; + break; + } + if (error) { + mtx_unlock(&Giant); + return (error); + } + + /* Perform the requested operation. */ + switch (cmd) { + case DEV_ATTACH: + if (device_is_attached(dev) && (dev->flags & DF_REBID) == 0) + error = EBUSY; + else if (!device_is_enabled(dev)) + error = ENXIO; + else + error = device_probe_and_attach(dev); + break; + case DEV_DETACH: + if (!device_is_attached(dev)) { + error = ENXIO; + break; + } + if (!(req->dr_flags & DEVF_FORCE_DETACH)) { + error = device_quiesce(dev); + if (error) + break; + } + error = device_detach(dev); + break; + case DEV_ENABLE: + if (device_is_enabled(dev)) { + error = EBUSY; + break; + } + + /* + * If the device has been probed but not attached (e.g. + * when it has been disabled by a loader hint), just + * attach the device rather than doing a full probe. + */ + device_enable(dev); + if (device_is_alive(dev)) { + /* + * If the device was disabled via a hint, clear + * the hint. + */ + if (resource_disabled(dev->driver->name, dev->unit)) + resource_unset_value(dev->driver->name, + dev->unit, "disabled"); + error = device_attach(dev); + } else + error = device_probe_and_attach(dev); + break; + case DEV_DISABLE: + if (!device_is_enabled(dev)) { + error = ENXIO; + break; + } + + if (!(req->dr_flags & DEVF_FORCE_DETACH)) { + error = device_quiesce(dev); + if (error) + break; + } + + /* + * Force DF_FIXEDCLASS on around detach to preserve + * the existing name. + */ + old = dev->flags; + dev->flags |= DF_FIXEDCLASS; + error = device_detach(dev); + if (!(old & DF_FIXEDCLASS)) + dev->flags &= ~DF_FIXEDCLASS; + if (error == 0) + device_disable(dev); + break; + case DEV_SET_DRIVER: { + devclass_t dc; + char driver[128]; + + error = copyinstr(req->dr_data, driver, sizeof(driver), NULL); + if (error) + break; + if (driver[0] == '\0') { + error = EINVAL; + break; + } + if (dev->devclass != NULL && + strcmp(driver, dev->devclass->name) == 0) + /* XXX: Could possibly force DF_FIXEDCLASS on? */ + break; + + /* + * Scan drivers for this device's bus looking for at + * least one matching driver. + */ + if (dev->parent == NULL) { + error = EINVAL; + break; + } + if (!driver_exists(dev->parent, driver)) { + error = ENOENT; + break; + } + dc = devclass_create(driver); + if (dc == NULL) { + error = ENOMEM; + break; + } + + /* Detach device if necessary. */ + if (device_is_attached(dev)) { + if (req->dr_flags & DEVF_SET_DRIVER_DETACH) + error = device_detach(dev); + else + error = EBUSY; + if (error) + break; + } + + /* Clear any previously-fixed device class and unit. */ + if (dev->flags & DF_FIXEDCLASS) + devclass_delete_device(dev->devclass, dev); + dev->flags |= DF_WILDCARD; + dev->unit = -1; + + /* Force the new device class. */ + error = devclass_add_device(dc, dev); + if (error) + break; + dev->flags |= DF_FIXEDCLASS; + error = device_probe_and_attach(dev); + break; + } + } + mtx_unlock(&Giant); + return (error); +} + +static struct cdevsw devctl2_cdevsw = { + .d_version = D_VERSION, + .d_ioctl = devctl2_ioctl, + .d_name = "devctl2", +}; + +static void +devctl2_init(void) +{ + + make_dev_credf(MAKEDEV_ETERNAL, &devctl2_cdevsw, 0, NULL, + UID_ROOT, GID_WHEEL, 0600, "devctl2"); +} Modified: stable/10/sys/kern/subr_hints.c ============================================================================== --- stable/10/sys/kern/subr_hints.c Mon Feb 1 22:16:41 2016 (r295130) +++ stable/10/sys/kern/subr_hints.c Mon Feb 1 23:07:31 2016 (r295131) @@ -461,3 +461,31 @@ resource_disabled(const char *name, int return (0); return (value); } + +/* + * Clear a value associated with a device by removing it from + * the kernel environment. This only removes a hint for an + * exact unit. + */ +int +resource_unset_value(const char *name, int unit, const char *resname) +{ + char varname[128]; + const char *retname, *retvalue; + int error, line; + size_t len; + + line = 0; + error = resource_find(&line, NULL, name, &unit, resname, NULL, + &retname, NULL, NULL, NULL, NULL, &retvalue); + if (error) + return (error); + + retname -= strlen("hint."); + len = retvalue - retname - 1; + if (len > sizeof(varname) - 1) + return (ENAMETOOLONG); + memcpy(varname, retname, len); + varname[len] = '\0'; + return (unsetenv(varname)); +} Modified: stable/10/sys/sys/bus.h ============================================================================== --- stable/10/sys/sys/bus.h Mon Feb 1 22:16:41 2016 (r295130) +++ stable/10/sys/sys/bus.h Mon Feb 1 23:07:31 2016 (r295131) @@ -31,6 +31,7 @@ #include #include +#include /** * @defgroup NEWBUS newbus - a generic framework for managing devices @@ -75,9 +76,43 @@ struct u_device { /* XXX more driver info? */ }; +/** + * @brief Device request structure used for ioctl's. + * + * Used for ioctl's on /dev/devctl2. All device ioctl's + * must have parameter definitions which begin with dr_name. + */ +struct devreq_buffer { + void *buffer; + size_t length; +}; + +struct devreq { + char dr_name[128]; + int dr_flags; /* request-specific flags */ + union { + struct devreq_buffer dru_buffer; + void *dru_data; + } dr_dru; +#define dr_buffer dr_dru.dru_buffer /* variable-sized buffer */ +#define dr_data dr_dru.dru_data /* fixed-size buffer */ +}; + +#define DEV_ATTACH _IOW('D', 1, struct devreq) +#define DEV_DETACH _IOW('D', 2, struct devreq) +#define DEV_ENABLE _IOW('D', 3, struct devreq) +#define DEV_DISABLE _IOW('D', 4, struct devreq) +#define DEV_SET_DRIVER _IOW('D', 7, struct devreq) + +/* Flags for DEV_DETACH and DEV_DISABLE. */ +#define DEVF_FORCE_DETACH 0x0000001 + +/* Flags for DEV_SET_DRIVER. */ +#define DEVF_SET_DRIVER_DETACH 0x0000001 /* Detach existing driver. */ + #ifdef _KERNEL -#include +#include #include /** @@ -94,6 +129,14 @@ void devctl_queue_data_f(char *__data, i void devctl_queue_data(char *__data); /** + * Device name parsers. Hook to allow device enumerators to map + * scheme-specific names to a device. + */ +typedef void (*dev_lookup_fn)(void *arg, const char *name, + device_t *result); +EVENTHANDLER_DECLARE(dev_lookup, dev_lookup_fn); + +/** * @brief A device driver (included mainly for compatibility with * FreeBSD 4.x). */ @@ -454,6 +497,7 @@ struct sysctl_oid *device_get_sysctl_tre int device_is_alive(device_t dev); /* did probe succeed? */ int device_is_attached(device_t dev); /* did attach succeed? */ int device_is_enabled(device_t dev); +int device_is_suspended(device_t dev); int device_is_quiet(device_t dev); int device_print_prettyname(device_t dev); int device_printf(device_t dev, const char *, ...) __printflike(2, 3); @@ -517,6 +561,8 @@ int resource_set_long(const char *name, long value); int resource_set_string(const char *name, int unit, const char *resname, const char *value); +int resource_unset_value(const char *name, int unit, const char *resname); + /* * Functions for maintaining and checking consistency of * bus information exported to userspace. Modified: stable/10/usr.sbin/Makefile ============================================================================== --- stable/10/usr.sbin/Makefile Mon Feb 1 22:16:41 2016 (r295130) +++ stable/10/usr.sbin/Makefile Mon Feb 1 23:07:31 2016 (r295131) @@ -20,6 +20,7 @@ SUBDIR= adduser \ ctld \ daemon \ dconschat \ + devctl \ devinfo \ digictl \ diskinfo \ Modified: stable/10/usr.sbin/devctl/Makefile ============================================================================== --- head/usr.sbin/devctl/Makefile Fri Feb 6 16:09:01 2015 (r278320) +++ stable/10/usr.sbin/devctl/Makefile Mon Feb 1 23:07:31 2016 (r295131) @@ -2,8 +2,8 @@ PROG= devctl MAN= devctl.8 -MAN= -LIBADD= devctl +DPADD= ${LIBDEVCTL} +LDADD= -ldevctl .include Modified: stable/10/usr.sbin/devctl/devctl.8 ============================================================================== --- head/usr.sbin/devctl/devctl.8 Fri Feb 6 16:09:01 2015 (r278320) +++ stable/10/usr.sbin/devctl/devctl.8 Mon Feb 1 23:07:31 2016 (r295131) @@ -47,12 +47,6 @@ .Cm enable .Ar device .Nm -.Cm suspend -.Ar device -.Nm -.Cm resume -.Ar device -.Nm .Cm set driver .Op Fl f .Ar device driver @@ -106,11 +100,6 @@ Enable a device. The device will probe and attach if a suitable device driver is found. Note that this can re-enable a device disabled at boot time via a loader tunable. -.It Cm suspend Ar device -Suspend a device. -This may include placing the device in a reduced power state. -.It Cm resume device -Resume a suspended device to a fully working state. .It Xo Cm set driver .Op Fl f .Ar device driver Modified: stable/10/usr.sbin/devctl/devctl.c ============================================================================== --- head/usr.sbin/devctl/devctl.c Fri Feb 6 16:09:01 2015 (r278320) +++ stable/10/usr.sbin/devctl/devctl.c Mon Feb 1 23:07:31 2016 (r295131) @@ -70,13 +70,11 @@ DEVCTL_TABLE(top, set); static void usage(void) { - fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n", + fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n", "usage: devctl attach device", " devctl detach [-f] device", " devctl disable [-f] device", " devctl enable device", - " devctl suspend device", - " devctl resume device", " devctl set driver [-f] device driver"); exit(1); } @@ -201,30 +199,6 @@ enable(int ac, char **av) } DEVCTL_COMMAND(top, enable, enable); -static int -suspend(int ac, char **av) -{ - - if (ac != 2) - usage(); - if (devctl_suspend(av[1]) < 0) - err(1, "Failed to suspend %s", av[1]); - return (0); -} -DEVCTL_COMMAND(top, suspend, suspend); - -static int -resume(int ac, char **av) -{ - - if (ac != 2) - usage(); - if (devctl_resume(av[1]) < 0) - err(1, "Failed to resume %s", av[1]); - return (0); -} -DEVCTL_COMMAND(top, resume, resume); - static void set_driver_usage(void) { From owner-svn-src-all@freebsd.org Mon Feb 1 23:12:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4CCDA9724D; Mon, 1 Feb 2016 23:12:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9930617DC; Mon, 1 Feb 2016 23:12:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u11NC5GP064833; Mon, 1 Feb 2016 23:12:05 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u11NC5JF064828; Mon, 1 Feb 2016 23:12:05 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201602012312.u11NC5JF064828@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 1 Feb 2016 23:12:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295132 - in head/sys/powerpc: fpu include powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 23:12:06 -0000 Author: jhb Date: Mon Feb 1 23:12:04 2016 New Revision: 295132 URL: https://svnweb.freebsd.org/changeset/base/295132 Log: Restore the ABI of 'struct fpreg' on powerpc. The PT_{GET,SET}FPREGS requests use 'struct fpreg' and the NT_FPREGSET core note stores a copy of 'struct fpreg'. As with x86 and the floating point state there compared to the extended state in XSAVE, struct fpreg on powerpc now only holds the 'base' FP state, and setting it via PT_SETFPREGS leaves the extended vector state in a thread unchanged. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D5004 Modified: head/sys/powerpc/fpu/fpu_emu.c head/sys/powerpc/fpu/fpu_emu.h head/sys/powerpc/fpu/fpu_extern.h head/sys/powerpc/include/reg.h head/sys/powerpc/powerpc/exec_machdep.c Modified: head/sys/powerpc/fpu/fpu_emu.c ============================================================================== --- head/sys/powerpc/fpu/fpu_emu.c Mon Feb 1 23:07:31 2016 (r295131) +++ head/sys/powerpc/fpu/fpu_emu.c Mon Feb 1 23:12:04 2016 (r295132) @@ -183,7 +183,7 @@ fpu_dumpfpn(struct fpn *fp) * (Typically: zero, SIGFPE, SIGILL, SIGSEGV) */ int -fpu_emulate(struct trapframe *frame, struct fpreg *fpf) +fpu_emulate(struct trapframe *frame, struct fpu *fpf) { static union instr insn; static struct fpemu fe; Modified: head/sys/powerpc/fpu/fpu_emu.h ============================================================================== --- head/sys/powerpc/fpu/fpu_emu.h Mon Feb 1 23:07:31 2016 (r295131) +++ head/sys/powerpc/fpu/fpu_emu.h Mon Feb 1 23:12:04 2016 (r295132) @@ -138,7 +138,7 @@ struct fpn { * Emulator state. */ struct fpemu { - struct fpreg *fe_fpstate; /* registers, etc */ + struct fpu *fe_fpstate; /* registers, etc */ int fe_fpscr; /* fpscr copy (modified during op) */ int fe_cx; /* keep track of exceptions */ struct fpn fe_f1; /* operand 1 */ Modified: head/sys/powerpc/fpu/fpu_extern.h ============================================================================== --- head/sys/powerpc/fpu/fpu_extern.h Mon Feb 1 23:07:31 2016 (r295131) +++ head/sys/powerpc/fpu/fpu_extern.h Mon Feb 1 23:12:04 2016 (r295132) @@ -31,14 +31,14 @@ */ struct proc; -struct fpreg; +struct fpu; struct trapframe; union instr; struct fpemu; struct fpn; /* fpu.c */ -int fpu_emulate(struct trapframe *, struct fpreg *); +int fpu_emulate(struct trapframe *, struct fpu *); int fpu_execute(struct trapframe *, struct fpemu *, union instr *); /* fpu_explode.c */ Modified: head/sys/powerpc/include/reg.h ============================================================================== --- head/sys/powerpc/include/reg.h Mon Feb 1 23:07:31 2016 (r295131) +++ head/sys/powerpc/include/reg.h Mon Feb 1 23:12:04 2016 (r295132) @@ -18,12 +18,8 @@ struct reg { register_t pc; }; -/* Must match pcb.pcb_fpu */ struct fpreg { - union { - double fpr; - uint64_t vsr[2]; - } fpreg[32]; + double fpreg[32]; double fpscr; }; Modified: head/sys/powerpc/powerpc/exec_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/exec_machdep.c Mon Feb 1 23:07:31 2016 (r295131) +++ head/sys/powerpc/powerpc/exec_machdep.c Mon Feb 1 23:12:04 2016 (r295132) @@ -608,13 +608,18 @@ int fill_fpregs(struct thread *td, struct fpreg *fpregs) { struct pcb *pcb; + int i; pcb = td->td_pcb; if ((pcb->pcb_flags & PCB_FPREGS) == 0) memset(fpregs, 0, sizeof(struct fpreg)); - else - memcpy(fpregs, &pcb->pcb_fpu, sizeof(struct fpreg)); + else { + memcpy(&fpregs->fpscr, &pcb->pcb_fpu.fpscr, sizeof(double)); + for (i = 0; i < 32; i++) + memcpy(&fpregs->fpreg[i], &pcb->pcb_fpu.fpr[i].fpr, + sizeof(double)); + } return (0); } @@ -641,10 +646,15 @@ int set_fpregs(struct thread *td, struct fpreg *fpregs) { struct pcb *pcb; + int i; pcb = td->td_pcb; pcb->pcb_flags |= PCB_FPREGS; - memcpy(&pcb->pcb_fpu, fpregs, sizeof(struct fpreg)); + memcpy(&pcb->pcb_fpu.fpscr, &fpregs->fpscr, sizeof(double)); + for (i = 0; i < 32; i++) { + memcpy(&pcb->pcb_fpu.fpr[i].fpr, &fpregs->fpreg[i], + sizeof(double)); + } return (0); } @@ -1060,7 +1070,7 @@ ppc_instr_emulate(struct trapframe *fram bzero(&pcb->pcb_fpu, sizeof(pcb->pcb_fpu)); pcb->pcb_flags |= PCB_FPREGS; } - sig = fpu_emulate(frame, (struct fpreg *)&pcb->pcb_fpu); + sig = fpu_emulate(frame, &pcb->pcb_fpu); #endif return (sig); From owner-svn-src-all@freebsd.org Mon Feb 1 23:51:31 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CAA8A980FA; Mon, 1 Feb 2016 23:51:31 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C729C3E; Mon, 1 Feb 2016 23:51:31 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u11NpUhM076515; Mon, 1 Feb 2016 23:51:30 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u11NpUFO076514; Mon, 1 Feb 2016 23:51:30 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201602012351.u11NpUFO076514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Mon, 1 Feb 2016 23:51:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295133 - head/sys/dev/e1000 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 23:51:31 -0000 Author: marius Date: Mon Feb 1 23:51:30 2016 New Revision: 295133 URL: https://svnweb.freebsd.org/changeset/base/295133 Log: As it turns out, one of the more or less recent changes to em(4) causes watchdog timeouts when using TSO4 at link speeds below Gigabit, at least with 82573E. So disable the assist automatically when at lower speeds. Submitted by: jfv Approved by: erj Obtained from: D3162 MFC after: 3 days Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Mon Feb 1 23:12:04 2016 (r295132) +++ head/sys/dev/e1000/if_em.c Mon Feb 1 23:51:30 2016 (r295133) @@ -1371,8 +1371,15 @@ em_init_locked(struct adapter *adapter) if_clearhwassist(ifp); if (if_getcapenable(ifp) & IFCAP_TXCSUM) if_sethwassistbits(ifp, CSUM_TCP | CSUM_UDP, 0); - if (if_getcapenable(ifp) & IFCAP_TSO4) - if_sethwassistbits(ifp, CSUM_TSO, 0); + /* + ** There have proven to be problems with TSO when not + ** at full gigabit speed, so disable the assist automatically + ** when at lower speeds. -jfv + */ + if (if_getcapenable(ifp) & IFCAP_TSO4) { + if (adapter->link_speed == SPEED_1000) + if_sethwassistbits(ifp, CSUM_TSO, 0); + } /* Configure for OS presence */ em_init_manageability(adapter); From owner-svn-src-all@freebsd.org Tue Feb 2 00:14:52 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85635A98A0E; Tue, 2 Feb 2016 00:14:52 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E34B1894; Tue, 2 Feb 2016 00:14:52 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u120EpiH084909; Tue, 2 Feb 2016 00:14:51 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u120Ep7e084908; Tue, 2 Feb 2016 00:14:51 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201602020014.u120Ep7e084908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 2 Feb 2016 00:14:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295134 - head/sys/kgssapi/krb5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 00:14:52 -0000 Author: cem Date: Tue Feb 2 00:14:51 2016 New Revision: 295134 URL: https://svnweb.freebsd.org/changeset/base/295134 Log: kcrypto_aes: Use separate sessions for AES and SHA1 Some hardware supports AES acceleration but not SHA1, e.g., AES-NI extensions. It is useful to have accelerated AES even if SHA1 must be software. Suggested by: asomers Reviewed by: asomers, dfr Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D5146 Modified: head/sys/kgssapi/krb5/kcrypto_aes.c Modified: head/sys/kgssapi/krb5/kcrypto_aes.c ============================================================================== --- head/sys/kgssapi/krb5/kcrypto_aes.c Mon Feb 1 23:51:30 2016 (r295133) +++ head/sys/kgssapi/krb5/kcrypto_aes.c Tue Feb 2 00:14:51 2016 (r295134) @@ -43,7 +43,8 @@ __FBSDID("$FreeBSD$"); struct aes_state { struct mtx as_lock; - uint64_t as_session; + uint64_t as_session_aes; + uint64_t as_session_sha1; }; static void @@ -61,8 +62,10 @@ aes_destroy(struct krb5_key_state *ks) { struct aes_state *as = ks->ks_priv; - if (as->as_session) - crypto_freesession(as->as_session); + if (as->as_session_aes != 0) + crypto_freesession(as->as_session_aes); + if (as->as_session_sha1 != 0) + crypto_freesession(as->as_session_sha1); mtx_destroy(&as->as_lock); free(ks->ks_priv, M_GSSAPI); } @@ -72,32 +75,35 @@ aes_set_key(struct krb5_key_state *ks, c { void *kp = ks->ks_key; struct aes_state *as = ks->ks_priv; - struct cryptoini cri[2]; + struct cryptoini cri; if (kp != in) bcopy(in, kp, ks->ks_class->ec_keylen); - if (as->as_session) - crypto_freesession(as->as_session); - - bzero(cri, sizeof(cri)); + if (as->as_session_aes != 0) + crypto_freesession(as->as_session_aes); + if (as->as_session_sha1 != 0) + crypto_freesession(as->as_session_sha1); /* * We only want the first 96 bits of the HMAC. */ - cri[0].cri_alg = CRYPTO_SHA1_HMAC; - cri[0].cri_klen = ks->ks_class->ec_keybits; - cri[0].cri_mlen = 12; - cri[0].cri_key = ks->ks_key; - cri[0].cri_next = &cri[1]; - - cri[1].cri_alg = CRYPTO_AES_CBC; - cri[1].cri_klen = ks->ks_class->ec_keybits; - cri[1].cri_mlen = 0; - cri[1].cri_key = ks->ks_key; - cri[1].cri_next = NULL; + bzero(&cri, sizeof(cri)); + cri.cri_alg = CRYPTO_SHA1_HMAC; + cri.cri_klen = ks->ks_class->ec_keybits; + cri.cri_mlen = 12; + cri.cri_key = ks->ks_key; + cri.cri_next = NULL; + crypto_newsession(&as->as_session_sha1, &cri, + CRYPTOCAP_F_HARDWARE | CRYPTOCAP_F_SOFTWARE); - crypto_newsession(&as->as_session, cri, + bzero(&cri, sizeof(cri)); + cri.cri_alg = CRYPTO_AES_CBC; + cri.cri_klen = ks->ks_class->ec_keybits; + cri.cri_mlen = 0; + cri.cri_key = ks->ks_key; + cri.cri_next = NULL; + crypto_newsession(&as->as_session_aes, &cri, CRYPTOCAP_F_HARDWARE | CRYPTOCAP_F_SOFTWARE); } @@ -114,7 +120,7 @@ aes_crypto_cb(struct cryptop *crp) int error; struct aes_state *as = (struct aes_state *) crp->crp_opaque; - if (CRYPTO_SESID2CAPS(as->as_session) & CRYPTOCAP_F_SYNC) + if (CRYPTO_SESID2CAPS(crp->crp_sid) & CRYPTOCAP_F_SYNC) return (0); error = crp->crp_etype; @@ -151,7 +157,7 @@ aes_encrypt_1(const struct krb5_key_stat crd->crd_next = NULL; crd->crd_alg = CRYPTO_AES_CBC; - crp->crp_sid = as->as_session; + crp->crp_sid = as->as_session_aes; crp->crp_flags = buftype | CRYPTO_F_CBIFSYNC; crp->crp_buf = buf; crp->crp_opaque = (void *) as; @@ -159,7 +165,7 @@ aes_encrypt_1(const struct krb5_key_stat error = crypto_dispatch(crp); - if ((CRYPTO_SESID2CAPS(as->as_session) & CRYPTOCAP_F_SYNC) == 0) { + if ((CRYPTO_SESID2CAPS(as->as_session_aes) & CRYPTOCAP_F_SYNC) == 0) { mtx_lock(&as->as_lock); if (!error && !(crp->crp_flags & CRYPTO_F_DONE)) error = msleep(crp, &as->as_lock, 0, "gssaes", 0); @@ -326,7 +332,7 @@ aes_checksum(const struct krb5_key_state crd->crd_next = NULL; crd->crd_alg = CRYPTO_SHA1_HMAC; - crp->crp_sid = as->as_session; + crp->crp_sid = as->as_session_sha1; crp->crp_ilen = inlen; crp->crp_olen = 12; crp->crp_etype = 0; @@ -337,7 +343,7 @@ aes_checksum(const struct krb5_key_state error = crypto_dispatch(crp); - if ((CRYPTO_SESID2CAPS(as->as_session) & CRYPTOCAP_F_SYNC) == 0) { + if ((CRYPTO_SESID2CAPS(as->as_session_sha1) & CRYPTOCAP_F_SYNC) == 0) { mtx_lock(&as->as_lock); if (!error && !(crp->crp_flags & CRYPTO_F_DONE)) error = msleep(crp, &as->as_lock, 0, "gssaes", 0); From owner-svn-src-all@freebsd.org Tue Feb 2 01:23:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0715A98190 for ; Tue, 2 Feb 2016 01:23:06 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA3171480 for ; Tue, 2 Feb 2016 01:23:05 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-wm0-x22f.google.com with SMTP id p63so711103wmp.1 for ; Mon, 01 Feb 2016 17:23:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sippysoft-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=UBpXhxHRALj8uksailVoJI9znOuWJn0z0HOM4P+X6iI=; b=xVj4YnPwLw2GJObZHDKwUA7z0709Oed9y34z4xYwKnfnGi4pqeIMgrjxILrtww8qEC Bqn+/pxw3D91oLaSooSROXew8ctbmAPGgkky5kzlzxTUBo4N9Y5CLbbx2xRaMWs8S4+9 wdcy+Z29HrtEAKZ7OI9ECw/EvS2Ypppy2Hz+hX1osz6frzY56oY1G4S+rA4/jmvdFjrp Rc9lTYWO9zK8A4B1OCkNU3y1n/YaJQX725HWsWaemynJUvhMck6MDADL/HJjJa2yMdAT RARlBeIn1coFTD3gUWKkwrU2Y/k03VUYvXOxXh6J1e/TUvW3gzCo4WKOdDiNh8dP9n1E ucMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=UBpXhxHRALj8uksailVoJI9znOuWJn0z0HOM4P+X6iI=; b=Y7IZLvXLVQOvtMqwN1JwaSSbEDOjA+uoJPP0qp4mTxx+bfnKP/2Pd7zknL51F35YfI y7L+YLJHJtdOW9qbJcUHxPNAbPpvlAnFtUQt67jkGmqlImwBYswUoaPqTSkme2qbJbku bDU0rVdZq6rb+wtD3sG8Uhry4Z9sznYeRmGOUhJUoOrlJrxpfL9KL/eveodlIGYYj1sa 790rmNBaJa9B+35mcpak97HUEe/fWYixlIIizPL2caxyif3EOeSlFtjf9FNCEPe5bdqi ecub7/393BLHB19+C4wmxX+lq+mEe1ZtGQrTeJ8FyqyrFjDrxovzfM7m1cMolr7g56XG +P/g== X-Gm-Message-State: AG10YOQZsbUlh91b3LN+dnjxKAkmGkUFQepCpZh0ylERWELvV7pHX42eGrBAOunhE5rv3+WLhA5uRMxddC6xGDK4 MIME-Version: 1.0 X-Received: by 10.194.174.36 with SMTP id bp4mr25141243wjc.137.1454376183183; Mon, 01 Feb 2016 17:23:03 -0800 (PST) Sender: sobomax@sippysoft.com Received: by 10.27.39.195 with HTTP; Mon, 1 Feb 2016 17:23:03 -0800 (PST) In-Reply-To: <201601161906.u0GJ6Cid076259@repo.freebsd.org> References: <201601161906.u0GJ6Cid076259@repo.freebsd.org> Date: Mon, 1 Feb 2016 17:23:03 -0800 X-Google-Sender-Auth: ZTjnZUjr2I4xIWc5YV78Ce7xUn0 Message-ID: Subject: Re: svn: stable/10/contrib/unbound: . compat daemon dns64 dnstap doc iterator libunbound libunbound/python libunbound/python/doc libunbound/python/doc/modules libunbound/python/exam... From: Maxim Sobolev To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 01:23:06 -0000 > Added: > stable/10/contrib/unbound/.gitignore Please remove this from both HEAD and stable. It "ignores" config.h, which is actually needed for the FreeBSD build. But in general, those files don't need to be in FreeBSD tree. Thanks! -Max On Sat, Jan 16, 2016 at 11:06 AM, Dag-Erling Sm=C3=B8rgrav wrote: > Author: des > Date: Sat Jan 16 19:06:12 2016 > New Revision: 294190 > URL: https://svnweb.freebsd.org/changeset/base/294190 > > Log: > MFH (r292206): upgrade to Unbound 1.5.7 > MFH (r292135): run configure script with correct compiler > > Added: > stable/10/contrib/unbound/.gitignore > - copied unchanged from r292206, head/contrib/unbound/.gitignore > stable/10/contrib/unbound/compat/isblank.c > - copied unchanged from r292206, head/contrib/unbound/compat/isblank= .c > Modified: > stable/10/contrib/unbound/Makefile.in > stable/10/contrib/unbound/acx_nlnetlabs.m4 > stable/10/contrib/unbound/compat/arc4random.c > stable/10/contrib/unbound/compat/getentropy_linux.c > stable/10/contrib/unbound/compat/getentropy_solaris.c > stable/10/contrib/unbound/compat/reallocarray.c > stable/10/contrib/unbound/compat/sha512.c > stable/10/contrib/unbound/compat/snprintf.c > stable/10/contrib/unbound/config.h > stable/10/contrib/unbound/config.h.in > stable/10/contrib/unbound/configure > stable/10/contrib/unbound/configure.ac > stable/10/contrib/unbound/daemon/remote.c > stable/10/contrib/unbound/daemon/unbound.c > stable/10/contrib/unbound/daemon/worker.c > stable/10/contrib/unbound/dns64/dns64.c > stable/10/contrib/unbound/dnstap/dnstap.proto > stable/10/contrib/unbound/doc/Changelog > stable/10/contrib/unbound/doc/README > stable/10/contrib/unbound/doc/example.conf > stable/10/contrib/unbound/doc/example.conf.in > stable/10/contrib/unbound/doc/libunbound.3 > stable/10/contrib/unbound/doc/libunbound.3.in > stable/10/contrib/unbound/doc/unbound-anchor.8 > stable/10/contrib/unbound/doc/unbound-anchor.8.in > stable/10/contrib/unbound/doc/unbound-checkconf.8 > stable/10/contrib/unbound/doc/unbound-checkconf.8.in > stable/10/contrib/unbound/doc/unbound-control.8 > stable/10/contrib/unbound/doc/unbound-control.8.in > stable/10/contrib/unbound/doc/unbound-host.1 > stable/10/contrib/unbound/doc/unbound-host.1.in > stable/10/contrib/unbound/doc/unbound.8 > stable/10/contrib/unbound/doc/unbound.8.in > stable/10/contrib/unbound/doc/unbound.conf.5 > stable/10/contrib/unbound/doc/unbound.conf.5.in > stable/10/contrib/unbound/freebsd-configure.sh > stable/10/contrib/unbound/iterator/iter_scrub.c > stable/10/contrib/unbound/iterator/iter_utils.c > stable/10/contrib/unbound/iterator/iterator.c > stable/10/contrib/unbound/iterator/iterator.h > stable/10/contrib/unbound/libunbound/libunbound.c > stable/10/contrib/unbound/libunbound/python/Makefile > stable/10/contrib/unbound/libunbound/python/doc/install.rst > stable/10/contrib/unbound/libunbound/python/doc/modules/unbound.rst > stable/10/contrib/unbound/libunbound/python/examples/dnssec-valid.py > stable/10/contrib/unbound/libunbound/python/libunbound.i > stable/10/contrib/unbound/ltmain.sh > stable/10/contrib/unbound/services/cache/dns.c > stable/10/contrib/unbound/services/cache/rrset.c > stable/10/contrib/unbound/sldns/parseutil.h > stable/10/contrib/unbound/sldns/wire2str.c > stable/10/contrib/unbound/smallapp/unbound-anchor.c > stable/10/contrib/unbound/smallapp/unbound-checkconf.c > stable/10/contrib/unbound/smallapp/unbound-control-setup.sh > stable/10/contrib/unbound/smallapp/unbound-control-setup.sh.in > stable/10/contrib/unbound/smallapp/unbound-control.c > stable/10/contrib/unbound/util/config_file.c > stable/10/contrib/unbound/util/config_file.h > stable/10/contrib/unbound/util/configlexer.lex > stable/10/contrib/unbound/util/configparser.y > stable/10/contrib/unbound/util/iana_ports.inc > stable/10/contrib/unbound/util/locks.c > stable/10/contrib/unbound/util/net_help.c > stable/10/contrib/unbound/util/random.c > stable/10/contrib/unbound/util/rbtree.c > stable/10/contrib/unbound/util/rtt.h > stable/10/contrib/unbound/util/storage/lookup3.c > stable/10/contrib/unbound/util/tube.h > stable/10/contrib/unbound/util/winsock_event.h > stable/10/contrib/unbound/validator/autotrust.c > stable/10/contrib/unbound/validator/val_neg.c > stable/10/contrib/unbound/validator/val_neg.h > stable/10/contrib/unbound/validator/val_nsec.c > stable/10/contrib/unbound/validator/val_nsec.h > stable/10/contrib/unbound/validator/val_nsec3.c > stable/10/contrib/unbound/validator/val_nsec3.h > stable/10/contrib/unbound/validator/val_secalgo.c > stable/10/contrib/unbound/validator/val_secalgo.h > stable/10/contrib/unbound/validator/val_sigcrypt.c > stable/10/contrib/unbound/validator/val_utils.h > stable/10/contrib/unbound/validator/validator.c > Directory Properties: > stable/10/ (props changed) > > Copied: stable/10/contrib/unbound/.gitignore (from r292206, > head/contrib/unbound/.gitignore) > > =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 > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ stable/10/contrib/unbound/.gitignore Sat Jan 16 19:06:12 2016 > (r294190, copy of r292206, head/contrib/unbound/.gitignore) > @@ -0,0 +1,38 @@ > +*.lo > +*.o > +/.libs/ > +/Makefile > +/autom4te.cache/ > +/config.h > +/config.log > +/config.status > +/dnstap/dnstap_config.h > +/doc/example.conf > +/doc/libunbound.3 > +/doc/unbound-anchor.8 > +/doc/unbound-checkconf.8 > +/doc/unbound-control.8 > +/doc/unbound-host.1 > +/doc/unbound.8 > +/doc/unbound.conf.5 > +/libtool > +/libunbound.la > +/smallapp/unbound-control-setup.sh > +/unbound > +/unbound-anchor > +/unbound-checkconf > +/unbound-control > +/unbound-control-setup > +/unbound-host > +/unbound.h > +/asynclook > +/delayer > +/lock-verify > +/memstats > +/perf > +/petal > +/pktview > +/streamtcp > +/testbound > +/unittest > + > > Modified: stable/10/contrib/unbound/Makefile.in > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/contrib/unbound/Makefile.in Sat Jan 16 18:59:10 2016 > (r294189) > +++ stable/10/contrib/unbound/Makefile.in Sat Jan 16 19:06:12 2016 > (r294190) > @@ -38,6 +38,7 @@ UNBOUND_VERSION_MINOR=3D@UNBOUND_VERSION_M > UNBOUND_VERSION_MICRO=3D@UNBOUND_VERSION_MICRO@ > ALLTARGET=3D@ALLTARGET@ > INSTALLTARGET=3D@INSTALLTARGET@ > +SSLLIB=3D@SSLLIB@ > > # _unbound.la if pyunbound enabled. > PYUNBOUND_TARGET=3D@PYUNBOUND_TARGET@ > @@ -132,7 +133,7 @@ compat/memcmp.c compat/memmove.c compat/ > compat/strlcpy.c compat/strptime.c compat/getentropy_linux.c \ > compat/getentropy_osx.c compat/getentropy_solaris.c > compat/getentropy_win.c \ > compat/explicit_bzero.c compat/arc4random.c compat/arc4random_uniform.c = \ > -compat/arc4_lock.c compat/sha512.c compat/reallocarray.c > +compat/arc4_lock.c compat/sha512.c compat/reallocarray.c compat/isblank.= c > COMPAT_OBJ=3D$(LIBOBJS:.o=3D.lo) > COMPAT_OBJ_WITHOUT_CTIME=3D$(LIBOBJ_WITHOUT_CTIME:.o=3D.lo) > COMPAT_OBJ_WITHOUT_CTIMEARC4=3D$(LIBOBJ_WITHOUT_CTIMEARC4:.o=3D.lo) > @@ -295,22 +296,22 @@ longtest: tests > lib: libunbound.la unbound.h > > libunbound.la: $(LIBUNBOUND_OBJ_LINK) > - $(LINK_LIB) $(UBSYMS) -o $@ $(LIBUNBOUND_OBJ_LINK) -rpath > $(libdir) -lssl $(LIBS) > + $(LINK_LIB) $(UBSYMS) -o $@ $(LIBUNBOUND_OBJ_LINK) -rpath > $(libdir) $(SSLLIB) $(LIBS) > > unbound$(EXEEXT): $(DAEMON_OBJ_LINK) libunbound.la > - $(LINK) -o $@ $(DAEMON_OBJ_LINK) $(EXTRALINK) -lssl $(LIBS) > + $(LINK) -o $@ $(DAEMON_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS) > > unbound-checkconf$(EXEEXT): $(CHECKCONF_OBJ_LINK) libunbound.la > - $(LINK) -o $@ $(CHECKCONF_OBJ_LINK) $(EXTRALINK) -lssl $(LIBS) > + $(LINK) -o $@ $(CHECKCONF_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS= ) > > unbound-control$(EXEEXT): $(CONTROL_OBJ_LINK) libunbound.la > - $(LINK) -o $@ $(CONTROL_OBJ_LINK) $(EXTRALINK) -lssl $(LIBS) > + $(LINK) -o $@ $(CONTROL_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS) > > unbound-host$(EXEEXT): $(HOST_OBJ_LINK) libunbound.la > $(LINK) -o $@ $(HOST_OBJ_LINK) -L. -L.libs -lunbound $(LIBS) > > unbound-anchor$(EXEEXT): $(UBANCHOR_OBJ_LINK) libunbound.la > - $(LINK) -o $@ $(UBANCHOR_OBJ_LINK) -L. -L.libs -lunbound -lexpat > -lssl $(LIBS) > + $(LINK) -o $@ $(UBANCHOR_OBJ_LINK) -L. -L.libs -lunbound -lexpat > $(SSLLIB) $(LIBS) > > unbound-service-install$(EXEEXT): $(SVCINST_OBJ_LINK) > $(LINK) -o $@ $(SVCINST_OBJ_LINK) $(LIBS) > @@ -322,37 +323,37 @@ anchor-update$(EXEEXT): $(ANCHORUPD_OBJ > $(LINK) -o $@ $(ANCHORUPD_OBJ_LINK) -L. -L.libs -lunbound $(LIBS) > > unittest$(EXEEXT): $(UNITTEST_OBJ_LINK) > - $(LINK) -o $@ $(UNITTEST_OBJ_LINK) -lssl $(LIBS) > + $(LINK) -o $@ $(UNITTEST_OBJ_LINK) $(SSLLIB) $(LIBS) > > testbound$(EXEEXT): $(TESTBOUND_OBJ_LINK) > - $(LINK) -o $@ $(TESTBOUND_OBJ_LINK) -lssl $(LIBS) > + $(LINK) -o $@ $(TESTBOUND_OBJ_LINK) $(SSLLIB) $(LIBS) > > lock-verify$(EXEEXT): $(LOCKVERIFY_OBJ_LINK) > - $(LINK) -o $@ $(LOCKVERIFY_OBJ_LINK) -lssl $(LIBS) > + $(LINK) -o $@ $(LOCKVERIFY_OBJ_LINK) $(SSLLIB) $(LIBS) > > petal$(EXEEXT): $(PETAL_OBJ_LINK) > - $(LINK) -o $@ $(PETAL_OBJ_LINK) -lssl $(LIBS) > + $(LINK) -o $@ $(PETAL_OBJ_LINK) $(SSLLIB) $(LIBS) > > pktview$(EXEEXT): $(PKTVIEW_OBJ_LINK) > - $(LINK) -o $@ $(PKTVIEW_OBJ_LINK) -lssl $(LIBS) > + $(LINK) -o $@ $(PKTVIEW_OBJ_LINK) $(SSLLIB) $(LIBS) > > memstats$(EXEEXT): $(MEMSTATS_OBJ_LINK) > - $(LINK) -o $@ $(MEMSTATS_OBJ_LINK) -lssl $(LIBS) > + $(LINK) -o $@ $(MEMSTATS_OBJ_LINK) $(SSLLIB) $(LIBS) > > asynclook$(EXEEXT): $(ASYNCLOOK_OBJ_LINK) libunbound.la > $(LINK) -o $@ $(ASYNCLOOK_OBJ_LINK) $(LIBS) -L. -L.libs -lunbound > > streamtcp$(EXEEXT): $(STREAMTCP_OBJ_LINK) > - $(LINK) -o $@ $(STREAMTCP_OBJ_LINK) -lssl $(LIBS) > + $(LINK) -o $@ $(STREAMTCP_OBJ_LINK) $(SSLLIB) $(LIBS) > > perf$(EXEEXT): $(PERF_OBJ_LINK) > - $(LINK) -o $@ $(PERF_OBJ_LINK) -lssl $(LIBS) > + $(LINK) -o $@ $(PERF_OBJ_LINK) $(SSLLIB) $(LIBS) > > delayer$(EXEEXT): $(DELAYER_OBJ_LINK) > - $(LINK) -o $@ $(DELAYER_OBJ_LINK) -lssl $(LIBS) > + $(LINK) -o $@ $(DELAYER_OBJ_LINK) $(SSLLIB) $(LIBS) > > signit$(EXEEXT): testcode/signit.c > - $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ testcode/signit.c $(LDFLAGS) > -lldns -lssl $(LIBS) > + $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ testcode/signit.c $(LDFLAGS) > -lldns $(SSLLIB) $(LIBS) > > unbound.h: $(srcdir)/libunbound/unbound.h > sed -e 's/@''UNBOUND_VERSION_MAJOR@/$(UNBOUND_VERSION_MAJOR)/' -e > 's/@''UNBOUND_VERSION_MINOR@/$(UNBOUND_VERSION_MINOR)/' -e > 's/@''UNBOUND_VERSION_MICRO@/$(UNBOUND_VERSION_MICRO)/' < > $(srcdir)/libunbound/unbound.h > $@ > @@ -644,7 +645,7 @@ iterator.lo iterator.o: $(srcdir)/iterat > $(srcdir)/util/rtt.h $(srcdir)/util/netevent.h $(srcdir)/util/net_help.= h > $(srcdir)/util/regional.h \ > $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgencode.h > $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h \ > $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h > $(srcdir)/util/config_file.h $(srcdir)/util/random.h \ > - $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/parseutil.h > $(srcdir)/sldns/sbuffer.h > + $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h > $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/sbuffer.h > iter_delegpt.lo iter_delegpt.o: $(srcdir)/iterator/iter_delegpt.c > config.h $(srcdir)/iterator/iter_delegpt.h \ > $(srcdir)/util/log.h $(srcdir)/services/cache/dns.h > $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ > $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/regional.h \ > @@ -727,8 +728,7 @@ outside_network.lo outside_network.o: $( > $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/data/msgencode.h \ > $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h > $(srcdir)/util/random.h $(srcdir)/util/fptr_wlist.h \ > $(srcdir)/util/module.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h > $(srcdir)/services/modstack.h \ > - $(srcdir)/sldns/sbuffer.h $(srcdir)/dnstap/dnstap.h \ > - > + $(srcdir)/sldns/sbuffer.h $(srcdir)/dnstap/dnstap.h > alloc.lo alloc.o: $(srcdir)/util/alloc.c config.h $(srcdir)/util/alloc.h > $(srcdir)/util/locks.h $(srcdir)/util/log.h \ > $(srcdir)/util/regional.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/storage/lruhash.h \ > $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h > $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ > @@ -776,14 +776,12 @@ netevent.lo netevent.o: $(srcdir)/util/n > $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h > $(srcdir)/util/data/packed_rrset.h \ > $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h > $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ > $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h > $(srcdir)/services/modstack.h $(srcdir)/sldns/sbuffer.h \ > - $(srcdir)/dnstap/dnstap.h \ > - $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h > + $(srcdir)/dnstap/dnstap.h $(srcdir)/util/mini_event.h > $(srcdir)/util/rbtree.h > net_help.lo net_help.o: $(srcdir)/util/net_help.c config.h > $(srcdir)/util/net_help.h $(srcdir)/util/log.h \ > $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h > $(srcdir)/util/locks.h $(srcdir)/util/module.h \ > $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/data/msgparse.h \ > $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h > $(srcdir)/util/regional.h $(srcdir)/sldns/parseutil.h \ > - $(srcdir)/sldns/wire2str.h \ > - > + $(srcdir)/sldns/wire2str.h > random.lo random.o: $(srcdir)/util/random.c config.h > $(srcdir)/util/random.h $(srcdir)/util/log.h > rbtree.lo rbtree.o: $(srcdir)/util/rbtree.c config.h $(srcdir)/util/log.= h > $(srcdir)/util/fptr_wlist.h \ > $(srcdir)/util/netevent.h $(srcdir)/util/storage/lruhash.h > $(srcdir)/util/locks.h $(srcdir)/util/log.h \ > @@ -818,8 +816,7 @@ autotrust.lo autotrust.o: $(srcdir)/vali > $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h > $(srcdir)/util/regional.h $(srcdir)/util/random.h \ > $(srcdir)/services/mesh.h $(srcdir)/util/netevent.h > $(srcdir)/services/modstack.h \ > $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h > $(srcdir)/validator/val_kcache.h \ > - $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h > $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/keyraw.h \ > - > + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h > $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/keyraw.h > val_anchor.lo val_anchor.o: $(srcdir)/validator/val_anchor.c config.h > $(srcdir)/validator/val_anchor.h \ > $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h > $(srcdir)/validator/val_sigcrypt.h \ > $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h > $(srcdir)/validator/autotrust.h \ > @@ -844,18 +841,16 @@ val_kcache.lo val_kcache.o: $(srcdir)/va > val_kentry.lo val_kentry.o: $(srcdir)/validator/val_kentry.c config.h > $(srcdir)/validator/val_kentry.h \ > $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h > $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ > $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h > $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ > - $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h \ > - > -val_neg.lo val_neg.o: $(srcdir)/validator/val_neg.c config.h \ > - $(srcdir)/validator/val_neg.h $(srcdir)/util/locks.h > $(srcdir)/util/log.h $(srcdir)/util/rbtree.h \ > - $(srcdir)/validator/val_nsec.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/storage/lruhash.h \ > - $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_utils.h > $(srcdir)/util/data/dname.h \ > - $(srcdir)/util/data/msgreply.h $(srcdir)/util/net_help.h > $(srcdir)/util/config_file.h \ > - $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h > $(srcdir)/services/cache/dns.h \ > - $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/sbuffer.h > -val_nsec3.lo val_nsec3.o: $(srcdir)/validator/val_nsec3.c config.h \ > - $(srcdir)/validator/val_nsec3.h $(srcdir)/util/rbtree.h > $(srcdir)/util/data/packed_rrset.h \ > - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h > $(srcdir)/util/log.h $(srcdir)/validator/validator.h \ > + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h > +val_neg.lo val_neg.o: $(srcdir)/validator/val_neg.c config.h > $(srcdir)/validator/val_neg.h $(srcdir)/util/locks.h \ > + $(srcdir)/util/log.h $(srcdir)/util/rbtree.h > $(srcdir)/validator/val_nsec.h $(srcdir)/util/data/packed_rrset.h \ > + $(srcdir)/util/storage/lruhash.h $(srcdir)/validator/val_nsec3.h > $(srcdir)/validator/val_utils.h \ > + $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgreply.h > $(srcdir)/util/net_help.h \ > + $(srcdir)/util/config_file.h $(srcdir)/services/cache/rrset.h > $(srcdir)/util/storage/slabhash.h \ > + $(srcdir)/services/cache/dns.h $(srcdir)/sldns/rrdef.h > $(srcdir)/sldns/sbuffer.h > +val_nsec3.lo val_nsec3.o: $(srcdir)/validator/val_nsec3.c config.h > $(srcdir)/validator/val_nsec3.h \ > + $(srcdir)/util/rbtree.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/storage/lruhash.h \ > + $(srcdir)/util/locks.h $(srcdir)/util/log.h > $(srcdir)/validator/val_secalgo.h $(srcdir)/validator/validator.h \ > $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h > $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ > $(srcdir)/sldns/rrdef.h $(srcdir)/validator/val_utils.h > $(srcdir)/validator/val_kentry.h \ > $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h > $(srcdir)/util/regional.h \ > @@ -867,17 +862,15 @@ val_nsec.lo val_nsec.o: $(srcdir)/valida > $(srcdir)/sldns/rrdef.h $(srcdir)/services/cache/rrset.h > $(srcdir)/util/storage/slabhash.h > val_secalgo.lo val_secalgo.o: $(srcdir)/validator/val_secalgo.c config.h > $(srcdir)/util/data/packed_rrset.h \ > $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h > $(srcdir)/util/log.h $(srcdir)/validator/val_secalgo.h \ > - $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h \ > - $(srcdir)/sldns/sbuffer.h \ > - > + $(srcdir)/validator/val_nsec3.h $(srcdir)/util/rbtree.h > $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h \ > + $(srcdir)/sldns/sbuffer.h > val_sigcrypt.lo val_sigcrypt.o: $(srcdir)/validator/val_sigcrypt.c > config.h \ > $(srcdir)/validator/val_sigcrypt.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/storage/lruhash.h \ > $(srcdir)/util/locks.h $(srcdir)/util/log.h > $(srcdir)/validator/val_secalgo.h $(srcdir)/validator/validator.h \ > $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h > $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ > $(srcdir)/sldns/rrdef.h $(srcdir)/validator/val_utils.h > $(srcdir)/util/data/dname.h $(srcdir)/util/rbtree.h \ > - $(srcdir)/util/net_help.h $(srcdir)/util/regional.h > $(srcdir)/sldns/keyraw.h \ > - $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/parseutil.h > $(srcdir)/sldns/wire2str.h \ > - > + $(srcdir)/util/net_help.h $(srcdir)/util/regional.h > $(srcdir)/sldns/keyraw.h $(srcdir)/sldns/sbuffer.h \ > + $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/wire2str.h > val_utils.lo val_utils.o: $(srcdir)/validator/val_utils.c config.h > $(srcdir)/validator/val_utils.h \ > $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h > $(srcdir)/util/locks.h $(srcdir)/util/log.h \ > $(srcdir)/validator/validator.h $(srcdir)/util/module.h > $(srcdir)/util/data/msgreply.h \ > @@ -895,11 +888,6 @@ dns64.lo dns64.o: $(srcdir)/dns64/dns64. > $(srcdir)/services/modstack.h $(srcdir)/util/net_help.h > $(srcdir)/util/regional.h > checklocks.lo checklocks.o: $(srcdir)/testcode/checklocks.c config.h > $(srcdir)/util/locks.h $(srcdir)/util/log.h \ > $(srcdir)/testcode/checklocks.h > -dnstap.lo dnstap.o: $(srcdir)/dnstap/dnstap.c config.h > $(srcdir)/sldns/sbuffer.h \ > - $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h > $(srcdir)/util/log.h $(srcdir)/util/netevent.h \ > - $(srcdir)/dnstap/dnstap.h \ > - $(srcdir)/dnstap/dnstap.pb-c.h > -dnstap.pb-c.lo dnstap.pb-c.o: $(srcdir)/dnstap/dnstap.pb-c.c > $(srcdir)/dnstap/dnstap.pb-c.h > unitanchor.lo unitanchor.o: $(srcdir)/testcode/unitanchor.c config.h > $(srcdir)/util/log.h $(srcdir)/util/data/dname.h \ > $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h > $(srcdir)/testcode/unitmain.h \ > $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h > $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/rrdef.h > @@ -908,8 +896,7 @@ unitdname.lo unitdname.o: $(srcdir)/test > $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h > unitlruhash.lo unitlruhash.o: $(srcdir)/testcode/unitlruhash.c config.h > $(srcdir)/testcode/unitmain.h \ > $(srcdir)/util/log.h $(srcdir)/util/storage/lruhash.h > $(srcdir)/util/locks.h $(srcdir)/util/storage/slabhash.h > -unitmain.lo unitmain.o: $(srcdir)/testcode/unitmain.c config.h \ > - $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h \ > +unitmain.lo unitmain.o: $(srcdir)/testcode/unitmain.c config.h > $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h \ > $(srcdir)/util/log.h $(srcdir)/testcode/unitmain.h > $(srcdir)/util/alloc.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h \ > $(srcdir)/util/config_file.h $(srcdir)/util/rtt.h > $(srcdir)/services/cache/infra.h \ > $(srcdir)/util/storage/lruhash.h $(srcdir)/util/storage/dnstree.h > $(srcdir)/util/rbtree.h \ > @@ -947,38 +934,35 @@ unitldns.lo unitldns.o: $(srcdir)/testco > acl_list.lo acl_list.o: $(srcdir)/daemon/acl_list.c config.h > $(srcdir)/daemon/acl_list.h \ > $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h > $(srcdir)/util/regional.h $(srcdir)/util/log.h \ > $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h > -cachedump.lo cachedump.o: $(srcdir)/daemon/cachedump.c config.h \ > - $(srcdir)/daemon/cachedump.h $(srcdir)/daemon/remote.h > $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h \ > - $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/storage/lruhash.h \ > - $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/netevent.h > $(srcdir)/util/alloc.h \ > +cachedump.lo cachedump.o: $(srcdir)/daemon/cachedump.c config.h > $(srcdir)/daemon/cachedump.h \ > + $(srcdir)/daemon/remote.h $(srcdir)/daemon/worker.h > $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ > + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h > $(srcdir)/util/locks.h $(srcdir)/util/log.h \ > + $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h > $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ > + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h > $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ > + $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ > + $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h > $(srcdir)/services/cache/dns.h \ > + $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h > $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h \ > + $(srcdir)/util/regional.h $(srcdir)/util/net_help.h > $(srcdir)/util/data/dname.h $(srcdir)/iterator/iterator.h \ > + $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_delegpt.h > $(srcdir)/iterator/iter_utils.h \ > + $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iter_fwd.h > $(srcdir)/iterator/iter_hints.h \ > + $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h > +daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h > $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h \ > + $(srcdir)/util/log.h $(srcdir)/util/alloc.h > $(srcdir)/services/modstack.h \ > + $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h > $(srcdir)/sldns/sbuffer.h \ > + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h > $(srcdir)/util/netevent.h \ > $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h > $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ > $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h > $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ > - $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ > - $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/infra.h > $(srcdir)/util/storage/dnstree.h \ > - $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/util/regional.h > $(srcdir)/util/net_help.h \ > - $(srcdir)/util/data/dname.h $(srcdir)/iterator/iterator.h > $(srcdir)/services/outbound_list.h \ > - $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_utils.h > $(srcdir)/iterator/iter_resptype.h \ > - $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h > $(srcdir)/sldns/wire2str.h \ > - $(srcdir)/sldns/str2wire.h > -daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h \ > - $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h > $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ > - $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h \ > - $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/storage/lruhash.h \ > - $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h > $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ > - $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h > $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ > - $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h \ > - $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h > $(srcdir)/util/rbtree.h \ > + $(srcdir)/daemon/remote.h $(srcdir)/daemon/acl_list.h > $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ > $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h > $(srcdir)/util/storage/slabhash.h \ > $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h > $(srcdir)/services/cache/infra.h \ > $(srcdir)/util/rtt.h $(srcdir)/services/localzone.h > $(srcdir)/util/random.h $(srcdir)/util/tube.h \ > $(srcdir)/util/net_help.h $(srcdir)/sldns/keyraw.h > -remote.lo remote.o: $(srcdir)/daemon/remote.c config.h \ > - $(srcdir)/daemon/remote.h \ > - $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h > $(srcdir)/sldns/sbuffer.h \ > - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h > $(srcdir)/util/locks.h $(srcdir)/util/log.h \ > - $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h > $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ > - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h > $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ > - $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h > $(srcdir)/daemon/daemon.h \ > +remote.lo remote.o: $(srcdir)/daemon/remote.c config.h > $(srcdir)/daemon/remote.h $(srcdir)/daemon/worker.h \ > + $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h > $(srcdir)/util/data/packed_rrset.h \ > + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h > $(srcdir)/util/log.h $(srcdir)/util/netevent.h \ > + $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h > $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ > + $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h > $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ > + $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ > $(srcdir)/services/modstack.h $(srcdir)/daemon/cachedump.h > $(srcdir)/util/config_file.h \ > $(srcdir)/util/net_help.h $(srcdir)/services/listen_dnsport.h > $(srcdir)/services/cache/rrset.h \ > $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h > $(srcdir)/util/storage/dnstree.h \ > @@ -1002,35 +986,33 @@ stats.lo stats.o: $(srcdir)/daemon/stats > $(srcdir)/util/rtt.h $(srcdir)/validator/val_kcache.h > unbound.lo unbound.o: $(srcdir)/daemon/unbound.c config.h > $(srcdir)/util/log.h $(srcdir)/daemon/daemon.h \ > $(srcdir)/util/locks.h $(srcdir)/util/alloc.h > $(srcdir)/services/modstack.h \ > - $(srcdir)/daemon/remote.h \ > - $(srcdir)/util/config_file.h $(srcdir)/util/storage/slabhash.h > $(srcdir)/util/storage/lruhash.h \ > - $(srcdir)/services/listen_dnsport.h $(srcdir)/util/netevent.h > $(srcdir)/services/cache/rrset.h \ > - $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h > $(srcdir)/util/storage/dnstree.h \ > - $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/util/fptr_wlist.= h > $(srcdir)/util/module.h \ > - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h > $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ > - $(srcdir)/util/tube.h $(srcdir)/services/mesh.h > $(srcdir)/util/net_help.h $(srcdir)/util/mini_event.h \ > - $(srcdir)/util/rbtree.h > + $(srcdir)/daemon/remote.h $(srcdir)/util/config_file.h > $(srcdir)/util/storage/slabhash.h \ > + $(srcdir)/util/storage/lruhash.h $(srcdir)/services/listen_dnsport.h > $(srcdir)/util/netevent.h \ > + $(srcdir)/services/cache/rrset.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/services/cache/infra.h \ > + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h > $(srcdir)/util/rtt.h $(srcdir)/util/fptr_wlist.h \ > + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h > $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ > + $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h > $(srcdir)/util/net_help.h \ > + $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h > worker.lo worker.o: $(srcdir)/daemon/worker.c config.h > $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ > $(srcdir)/util/random.h $(srcdir)/daemon/worker.h > $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ > $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h > $(srcdir)/util/locks.h \ > $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h > $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ > $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h > $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ > $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h > $(srcdir)/daemon/daemon.h \ > - $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h \ > - $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h > $(srcdir)/util/rbtree.h \ > - $(srcdir)/util/config_file.h $(srcdir)/util/regional.h > $(srcdir)/util/storage/slabhash.h \ > - $(srcdir)/services/listen_dnsport.h $(srcdir)/services/outside_network.= h > \ > - $(srcdir)/services/outbound_list.h $(srcdir)/services/cache/rrset.h > $(srcdir)/services/cache/infra.h \ > - $(srcdir)/util/rtt.h $(srcdir)/services/cache/dns.h > $(srcdir)/services/mesh.h $(srcdir)/services/localzone.h \ > + $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h > $(srcdir)/daemon/acl_list.h \ > + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h > $(srcdir)/util/config_file.h $(srcdir)/util/regional.h \ > + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h \ > + $(srcdir)/services/outside_network.h $(srcdir)/services/outbound_list.h= \ > + $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h > $(srcdir)/util/rtt.h \ > + $(srcdir)/services/cache/dns.h $(srcdir)/services/mesh.h > $(srcdir)/services/localzone.h \ > $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h > $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h \ > $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h > $(srcdir)/validator/autotrust.h \ > $(srcdir)/validator/val_anchor.h $(srcdir)/libunbound/context.h > $(srcdir)/libunbound/unbound.h \ > $(srcdir)/libunbound/libworker.h > testbound.lo testbound.o: $(srcdir)/testcode/testbound.c config.h > $(srcdir)/testcode/testpkts.h \ > $(srcdir)/testcode/replay.h $(srcdir)/util/netevent.h > $(srcdir)/util/rbtree.h $(srcdir)/testcode/fake_event.h \ > - $(srcdir)/daemon/remote.h \ > - $(srcdir)/util/config_file.h $(srcdir)/sldns/keyraw.h > $(srcdir)/daemon/unbound.c $(srcdir)/util/log.h \ > - $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/alloc.h > $(srcdir)/services/modstack.h \ > + $(srcdir)/daemon/remote.h $(srcdir)/util/config_file.h > $(srcdir)/sldns/keyraw.h $(srcdir)/daemon/unbound.c \ > + $(srcdir)/util/log.h $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h > $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ > $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h \ > $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ > $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h > $(srcdir)/util/storage/dnstree.h \ > @@ -1046,12 +1028,12 @@ worker.lo worker.o: $(srcdir)/daemon/wor > $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h > $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ > $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h > $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ > $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h > $(srcdir)/daemon/daemon.h \ > - $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h \ > - $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h > $(srcdir)/util/rbtree.h \ > - $(srcdir)/util/config_file.h $(srcdir)/util/regional.h > $(srcdir)/util/storage/slabhash.h \ > - $(srcdir)/services/listen_dnsport.h $(srcdir)/services/outside_network.= h > \ > - $(srcdir)/services/outbound_list.h $(srcdir)/services/cache/rrset.h > $(srcdir)/services/cache/infra.h \ > - $(srcdir)/util/rtt.h $(srcdir)/services/cache/dns.h > $(srcdir)/services/mesh.h $(srcdir)/services/localzone.h \ > + $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h > $(srcdir)/daemon/acl_list.h \ > + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h > $(srcdir)/util/config_file.h $(srcdir)/util/regional.h \ > + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h \ > + $(srcdir)/services/outside_network.h $(srcdir)/services/outbound_list.h= \ > + $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h > $(srcdir)/util/rtt.h \ > + $(srcdir)/services/cache/dns.h $(srcdir)/services/mesh.h > $(srcdir)/services/localzone.h \ > $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h > $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h \ > $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h > $(srcdir)/validator/autotrust.h \ > $(srcdir)/validator/val_anchor.h $(srcdir)/libunbound/context.h > $(srcdir)/libunbound/unbound.h \ > @@ -1059,14 +1041,13 @@ worker.lo worker.o: $(srcdir)/daemon/wor > acl_list.lo acl_list.o: $(srcdir)/daemon/acl_list.c config.h > $(srcdir)/daemon/acl_list.h \ > $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h > $(srcdir)/util/regional.h $(srcdir)/util/log.h \ > $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h > -daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h \ > - $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h > $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ > - $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h \ > - $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/storage/lruhash.h \ > - $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h > $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ > - $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h > $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ > - $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h \ > - $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h > $(srcdir)/util/rbtree.h \ > +daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h > $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h \ > + $(srcdir)/util/log.h $(srcdir)/util/alloc.h > $(srcdir)/services/modstack.h \ > + $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h > $(srcdir)/sldns/sbuffer.h \ > + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h > $(srcdir)/util/netevent.h \ > + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h > $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ > + $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h > $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ > + $(srcdir)/daemon/remote.h $(srcdir)/daemon/acl_list.h > $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ > $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h > $(srcdir)/util/storage/slabhash.h \ > $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h > $(srcdir)/services/cache/infra.h \ > $(srcdir)/util/rtt.h $(srcdir)/services/localzone.h > $(srcdir)/util/random.h $(srcdir)/util/tube.h \ > @@ -1141,19 +1122,18 @@ libunbound.lo libunbound.o: $(srcdir)/li > $(srcdir)/util/random.h $(srcdir)/util/net_help.h $(srcdir)/util/tube.h > $(srcdir)/services/localzone.h \ > $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h > $(srcdir)/util/rtt.h \ > $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h > $(srcdir)/sldns/sbuffer.h > -libworker.lo libworker.o: $(srcdir)/libunbound/libworker.c config.h \ > - $(srcdir)/libunbound/libworker.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/storage/lruhash.h \ > - $(srcdir)/util/locks.h $(srcdir)/util/log.h > $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h > $(srcdir)/util/rbtree.h \ > - $(srcdir)/services/modstack.h $(srcdir)/libunbound/unbound.h > $(srcdir)/libunbound/worker.h \ > - $(srcdir)/sldns/sbuffer.h $(srcdir)/libunbound/unbound-event.h > $(srcdir)/services/outside_network.h \ > - $(srcdir)/util/netevent.h $(srcdir)/services/mesh.h \ > - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h > $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h \ > - $(srcdir)/util/data/msgreply.h $(srcdir)/services/localzone.h > $(srcdir)/services/cache/rrset.h \ > - $(srcdir)/util/storage/slabhash.h $(srcdir)/services/outbound_list.h > $(srcdir)/util/fptr_wlist.h \ > - $(srcdir)/util/tube.h $(srcdir)/util/regional.h $(srcdir)/util/random.h > $(srcdir)/util/config_file.h \ > - $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h > $(srcdir)/util/data/dname.h \ > - $(srcdir)/util/data/msgencode.h $(srcdir)/iterator/iter_fwd.h > $(srcdir)/iterator/iter_hints.h \ > - $(srcdir)/util/storage/dnstree.h $(srcdir)/sldns/str2wire.h > +libworker.lo libworker.o: $(srcdir)/libunbound/libworker.c config.h > $(srcdir)/libunbound/libworker.h \ > + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h > $(srcdir)/util/locks.h $(srcdir)/util/log.h \ > + $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h > $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ > + $(srcdir)/libunbound/unbound.h $(srcdir)/libunbound/worker.h > $(srcdir)/sldns/sbuffer.h \ > + $(srcdir)/libunbound/unbound-event.h > $(srcdir)/services/outside_network.h $(srcdir)/util/netevent.h \ > + $(srcdir)/services/mesh.h $(srcdir)/util/data/msgparse.h \ > + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.= h > $(srcdir)/util/data/msgreply.h \ > + $(srcdir)/services/localzone.h $(srcdir)/services/cache/rrset.h > $(srcdir)/util/storage/slabhash.h \ > + $(srcdir)/services/outbound_list.h $(srcdir)/util/fptr_wlist.h > $(srcdir)/util/tube.h $(srcdir)/util/regional.h \ > + $(srcdir)/util/random.h $(srcdir)/util/config_file.h > $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h \ > + $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgencode.h > $(srcdir)/iterator/iter_fwd.h \ > + $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h > $(srcdir)/sldns/str2wire.h > unbound-host.lo unbound-host.o: $(srcdir)/smallapp/unbound-host.c > config.h $(srcdir)/libunbound/unbound.h \ > $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h > asynclook.lo asynclook.o: $(srcdir)/testcode/asynclook.c config.h > $(srcdir)/libunbound/unbound.h \ > @@ -1164,21 +1144,18 @@ streamtcp.lo streamtcp.o: $(srcdir)/test > $(srcdir)/util/net_help.h $(srcdir)/util/data/msgencode.h > $(srcdir)/util/data/msgparse.h \ > $(srcdir)/util/storage/lruhash.h $(srcdir)/sldns/pkthdr.h > $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h \ > $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/dname.h > $(srcdir)/sldns/sbuffer.h \ > - $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h \ > - > + $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h > perf.lo perf.o: $(srcdir)/testcode/perf.c config.h $(srcdir)/util/log.h > $(srcdir)/util/locks.h $(srcdir)/util/net_help.h \ > $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/msgreply.h > $(srcdir)/util/storage/lruhash.h \ > $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h > $(srcdir)/sldns/pkthdr.h \ > $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/sbuffer.h > $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h > delayer.lo delayer.o: $(srcdir)/testcode/delayer.c config.h > $(srcdir)/util/net_help.h $(srcdir)/util/log.h \ > $(srcdir)/util/config_file.h $(srcdir)/sldns/sbuffer.h > -unbound-control.lo unbound-control.o: > $(srcdir)/smallapp/unbound-control.c config.h \ > - $(srcdir)/util/log.h $(srcdir)/util/config_file.h $(srcdir)/util/locks.= h > $(srcdir)/util/net_help.h > +unbound-control.lo unbound-control.o: > $(srcdir)/smallapp/unbound-control.c config.h $(srcdir)/util/log.h \ > + $(srcdir)/util/config_file.h $(srcdir)/util/locks.h > $(srcdir)/util/net_help.h > unbound-anchor.lo unbound-anchor.o: $(srcdir)/smallapp/unbound-anchor.c > config.h $(srcdir)/libunbound/unbound.h \ > - $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/parseutil.h \ > - > -petal.lo petal.o: $(srcdir)/testcode/petal.c config.h \ > - > + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/parseutil.h > +petal.lo petal.o: $(srcdir)/testcode/petal.c config.h > pythonmod_utils.lo pythonmod_utils.o: > $(srcdir)/pythonmod/pythonmod_utils.c config.h $(srcdir)/util/module.h \ > $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h > $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h \ > $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h > $(srcdir)/sldns/pkthdr.h \ > @@ -1191,8 +1168,7 @@ win_svc.lo win_svc.o: $(srcdir)/winrc/wi > $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h > $(srcdir)/util/storage/lruhash.h \ > $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h > $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ > $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h > $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ > - $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h \ > - $(srcdir)/util/config_file.h $(srcdir)/util/winsock_event.h > + $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h > $(srcdir)/util/config_file.h $(srcdir)/util/winsock_event.h > w_inst.lo w_inst.o: $(srcdir)/winrc/w_inst.c config.h > $(srcdir)/winrc/w_inst.h $(srcdir)/winrc/win_svc.h > unbound-service-install.lo unbound-service-install.o: > $(srcdir)/winrc/unbound-service-install.c config.h \ > $(srcdir)/winrc/w_inst.h > @@ -1200,14 +1176,11 @@ unbound-service-remove.lo unbound-servic > $(srcdir)/winrc/w_inst.h > anchor-update.lo anchor-update.o: $(srcdir)/winrc/anchor-update.c > config.h $(srcdir)/libunbound/unbound.h \ > $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h > $(srcdir)/sldns/wire2str.h > -keyraw.lo keyraw.o: $(srcdir)/sldns/keyraw.c config.h > $(srcdir)/sldns/keyraw.h \ > - $(srcdir)/sldns/rrdef.h \ > - > +keyraw.lo keyraw.o: $(srcdir)/sldns/keyraw.c config.h > $(srcdir)/sldns/keyraw.h $(srcdir)/sldns/rrdef.h > sbuffer.lo sbuffer.o: $(srcdir)/sldns/sbuffer.c config.h > $(srcdir)/sldns/sbuffer.h > wire2str.lo wire2str.o: $(srcdir)/sldns/wire2str.c config.h > $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h \ > $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h > $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/sbuffer.h \ > - $(srcdir)/sldns/keyraw.h \ > - > + $(srcdir)/sldns/keyraw.h > parse.lo parse.o: $(srcdir)/sldns/parse.c config.h > $(srcdir)/sldns/parse.h $(srcdir)/sldns/parseutil.h \ > $(srcdir)/sldns/sbuffer.h > parseutil.lo parseutil.o: $(srcdir)/sldns/parseutil.c config.h > $(srcdir)/sldns/parseutil.h > @@ -1227,8 +1200,7 @@ snprintf.lo snprintf.o: $(srcdir)/compat > strlcat.lo strlcat.o: $(srcdir)/compat/strlcat.c config.h > strlcpy.lo strlcpy.o: $(srcdir)/compat/strlcpy.c config.h > strptime.lo strptime.o: $(srcdir)/compat/strptime.c config.h > -getentropy_linux.lo getentropy_linux.o: > $(srcdir)/compat/getentropy_linux.c config.h \ > - > +getentropy_linux.lo getentropy_linux.o: > $(srcdir)/compat/getentropy_linux.c config.h > getentropy_osx.lo getentropy_osx.o: $(srcdir)/compat/getentropy_osx.c > config.h > getentropy_solaris.lo getentropy_solaris.o: > $(srcdir)/compat/getentropy_solaris.c config.h > getentropy_win.lo getentropy_win.o: $(srcdir)/compat/getentropy_win.c > @@ -1238,3 +1210,4 @@ arc4random_uniform.lo arc4random_uniform > arc4_lock.lo arc4_lock.o: $(srcdir)/compat/arc4_lock.c config.h > $(srcdir)/util/locks.h > sha512.lo sha512.o: $(srcdir)/compat/sha512.c config.h > reallocarray.lo reallocarray.o: $(srcdir)/compat/reallocarray.c config.h > +isblank.lo isblank.o: $(srcdir)/compat/isblank.c config.h > > Modified: stable/10/contrib/unbound/acx_nlnetlabs.m4 > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/contrib/unbound/acx_nlnetlabs.m4 Sat Jan 16 18:59:10 2016 > (r294189) > +++ stable/10/contrib/unbound/acx_nlnetlabs.m4 Sat Jan 16 19:06:12 2016 > (r294190) > @@ -2,7 +2,9 @@ > # Copyright 2009, Wouter Wijngaards, NLnet Labs. > # BSD licensed. > # > -# Version 28 > +# Version 30 > +# 2015-11-18 spelling check fix. > +# 2015-11-05 ACX_SSL_CHECKS no longer adds -ldl needlessly. > # 2015-08-28 ACX_CHECK_PIE and ACX_CHECK_RELRO_NOW added. > # 2015-03-17 AHX_CONFIG_REALLOCARRAY added > # 2013-09-19 FLTO help text improved. > @@ -24,7 +26,7 @@ > # 2010-07-02 Add check for ss_family (for minix). > # 2010-04-26 Fix to use CPPFLAGS for CHECK_COMPILER_FLAGS. > # 2010-03-01 Fix RPATH using CONFIG_COMMANDS to run at the very end. > -# 2010-02-18 WITH_SSL outputs the LIBSSL_LDFLAGS, LIBS, CPPFLAGS > seperate, -ldl > +# 2010-02-18 WITH_SSL outputs the LIBSSL_LDFLAGS, LIBS, CPPFLAGS > separate, -ldl > # 2010-02-01 added ACX_CHECK_MEMCMP_SIGNED, AHX_MEMCMP_BROKEN > # 2010-01-20 added AHX_COONFIG_STRLCAT > # 2009-07-14 U_CHAR detection improved for windows crosscompile. > @@ -715,12 +717,6 @@ AC_DEFUN([ACX_SSL_CHECKS], [ > fi > AC_SUBST(HAVE_SSL) > AC_SUBST(RUNTIME_PATH) > - # openssl engine functionality needs dlopen(). > - BAKLIBS=3D"$LIBS" > - AC_SEARCH_LIBS([dlopen], [dl]) > - if test "$LIBS" !=3D "$BAKLIBS"; then > - LIBSSL_LIBS=3D"$LIBSSL_LIBS -ldl" > - fi > fi > AC_CHECK_HEADERS([openssl/ssl.h],,, [AC_INCLUDES_DEFAULT]) > AC_CHECK_HEADERS([openssl/err.h],,, [AC_INCLUDES_DEFAULT]) > > Modified: stable/10/contrib/unbound/compat/arc4random.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 > --- stable/10/contrib/unbound/compat/arc4random.c Sat Jan 16 > 18:59:10 2016 (r294189) > +++ stable/10/contrib/unbound/compat/arc4random.c Sat Jan 16 > 19:06:12 2016 (r294190) > @@ -26,7 +26,9 @@ > #include > #include > #include > +#ifdef HAVE_STDINT_H > #include > +#endif > #include > #include > #include > > Modified: stable/10/contrib/unbound/compat/getentropy_linux.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 > --- stable/10/contrib/unbound/compat/getentropy_linux.c Sat Jan 16 > 18:59:10 2016 (r294189) > +++ stable/10/contrib/unbound/compat/getentropy_linux.c Sat Jan 16 > 19:06:12 2016 (r294190) > @@ -46,7 +46,12 @@ > #include > #include > #include > + > +#if defined(HAVE_SSL) > #include > +#elif defined(HAVE_NETTLE) > +#include > +#endif > > #include > #include > @@ -67,9 +72,21 @@ > HD(b); \ > } while (0) > > +#if defined(HAVE_SSL) > +#define CRYPTO_SHA512_CTX SHA512_CTX > +#define CRYPTO_SHA512_INIT(x) SHA512_Init(x) > +#define CRYPTO_SHA512_FINAL(r, c) SHA512_Final(r, c) > #define HR(x, l) (SHA512_Update(&ctx, (char *)(x), (l))) > #define HD(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (x))) > #define HF(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (void*))) > +#elif defined(HAVE_NETTLE) > +#define CRYPTO_SHA512_CTX struct sha512_ctx > +#define CRYPTO_SHA512_INIT(x) sha512_init(x) > +#define CRYPTO_SHA512_FINAL(r, c) sha512_digest(c, > SHA512_DIGEST_SIZE, r) > +#define HR(x, l) (sha512_update(&ctx, (l), (uint8_t *)(x))) > +#define HD(x) (sha512_update(&ctx, sizeof (x), (uint8_t *)&(x))) > +#define HF(x) (sha512_update(&ctx, sizeof (void*), (uint8_t *)&(x))) > +#endif > > int getentropy(void *buf, size_t len); > > @@ -122,7 +139,7 @@ getentropy(void *buf, size_t len) > * Try to use sysctl CTL_KERN, KERN_RANDOM, RANDOM_UUID. > * sysctl is a failsafe API, so it guarantees a result. This > * should work inside a chroot, or when file descriptors are > - * exhuasted. > + * exhausted. > * > * However this can fail if the Linux kernel removes support > * for sysctl. Starting in 2007, there have been efforts to > @@ -337,7 +354,7 @@ getentropy_fallback(void *buf, size_t le > struct rusage ru; > sigset_t sigset; > struct stat st; > - SHA512_CTX ctx; > + CRYPTO_SHA512_CTX ctx; > static pid_t lastpid; > pid_t pid; > size_t i, ii, m; > @@ -354,7 +371,7 @@ getentropy_fallback(void *buf, size_t le > } > for (i =3D 0; i < len; ) { > int j; > - SHA512_Init(&ctx); > + CRYPTO_SHA512_INIT(&ctx); > for (j =3D 0; j < repeat; j++) { > HX((e =3D gettimeofday(&tv, NULL)) =3D=3D -1, tv)= ; > if (e !=3D -1) { > @@ -526,7 +543,7 @@ getentropy_fallback(void *buf, size_t le > # endif > #endif /* HAVE_GETAUXVAL */ > > - SHA512_Final(results, &ctx); > + CRYPTO_SHA512_FINAL(results, &ctx); > memcpy((char*)buf + i, results, min(sizeof(results), len = - > i)); > i +=3D min(sizeof(results), len - i); > } > > Modified: stable/10/contrib/unbound/compat/getentropy_solaris.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 > --- stable/10/contrib/unbound/compat/getentropy_solaris.c Sat Jan 1= 6 > 18:59:10 2016 (r294189) > +++ stable/10/contrib/unbound/compat/getentropy_solaris.c Sat Jan 1= 6 > 19:06:12 2016 (r294190) > @@ -30,7 +30,9 @@ > #include > #include > #include > +#ifdef HAVE_STDINT_H > #include > +#endif > #include > #include > #include > @@ -39,10 +41,14 @@ > #include > #include > #include > +#ifdef HAVE_SYS_SHA2_H > #include > #define SHA512_Init SHA512Init > #define SHA512_Update SHA512Update > #define SHA512_Final SHA512Final > +#else > +#include "openssl/sha.h" > +#endif > > #include > #include > > Copied: stable/10/contrib/unbound/compat/isblank.c (from r292206, > head/contrib/unbound/compat/isblank.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 > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ stable/10/contrib/unbound/compat/isblank.c Sat Jan 16 19:06:12 2016 > (r294190, copy of r292206, head/contrib/unbound/compat/isblank.c) > @@ -0,0 +1,45 @@ > +/* isblank - compatibility implementation of isblank > + * > + * Copyright (c) 2015, NLnet Labs. All rights reserved. > + * > + * This software is open source. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * > + * Redistributions of source code must retain the above copyright notice= , > + * this list of conditions and the following disclaimer. > + * > + * 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. > + * > + * Neither the name of the NLNET LABS nor the names of its contributors > may > + * be used to endorse or promote products derived from this software > without > + * specific prior written permission. > + * > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT > + * HOLDER 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, O= R > + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY O= F > + * 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 "config.h" > + > +/* return true for a blank character: space or tab */ > +int isblank(int c); > + > +/* implementation of isblank. unsigned char is the argument */ > +int > +isblank(int c) > +{ > + return (c=3D=3D' ' || c=3D=3D'\t'); > +} > > Modified: stable/10/contrib/unbound/compat/reallocarray.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 > --- stable/10/contrib/unbound/compat/reallocarray.c Sat Jan 16 > 18:59:10 2016 (r294189) > +++ stable/10/contrib/unbound/compat/reallocarray.c Sat Jan 16 > 19:06:12 2016 (r294190) > @@ -18,7 +18,10 @@ > #include "config.h" > #include > #include > +#ifdef HAVE_STDINT_H > #include > +#endif > +#include > #include > > /* > > Modified: stable/10/contrib/unbound/compat/sha512.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 > --- stable/10/contrib/unbound/compat/sha512.c Sat Jan 16 18:59:10 2016 > (r294189) > +++ stable/10/contrib/unbound/compat/sha512.c Sat Jan 16 19:06:12 2016 > (r294190) > @@ -70,7 +70,7 @@ unsigned char *SHA512(void *data, unsign > * Please make sure that your system defines BYTE_ORDER. If your > * architecture is little-endian, make sure it also defines > * LITTLE_ENDIAN and that the two (BYTE_ORDER and LITTLE_ENDIAN) are > - * equivilent. > + * equivalent. > * > * If your system does not define the above, then you can do so by > * hand like this: > > Modified: stable/10/contrib/unbound/compat/snprintf.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 > --- stable/10/contrib/unbound/compat/snprintf.c Sat Jan 16 18:59:10 2016 > (r294189) > +++ stable/10/contrib/unbound/compat/snprintf.c Sat Jan 16 19:06:12 2016 > (r294190) > @@ -42,6 +42,7 @@ > #ifdef HAVE_STDINT_H > #include > #endif > +#include > > /* for test */ > /* #define SNPRINTF_TEST 1 */ > @@ -428,7 +429,7 @@ print_num_llp(char** at, size_t* left, i > char buf[PRINT_DEC_BUFSZ]; > int negative =3D 0; > int zero =3D (value =3D=3D 0); > -#if defined(UINTPTR_MAX) && defined(UINT32_MAX) && (UINTPTR_MAX =3D=3D > UINT32_MAX) > +#if defined(SIZE_MAX) && defined(UINT32_MAX) && (UINT32_MAX =3D=3D SIZE_= MAX > || INT32_MAX =3D=3D SIZE_MAX) > /* avoid warning about upcast on 32bit systems */ > unsigned long long llvalue =3D (unsigned long)value; > #else > > Modified: stable/10/contrib/unbound/config.h > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/contrib/unbound/config.h Sat Jan 16 18:59:10 2016 > (r294189) > +++ stable/10/contrib/unbound/config.h Sat Jan 16 19:06:12 2016 > (r294190) > @@ -95,6 +95,10 @@ > don't. */ > /* #undef HAVE_DECL_STRLCPY */ > > +/* Define to 1 if you have the declaration of `XML_StopParser', and to 0 > if > + you don't. */ > +#define HAVE_DECL_XML_STOPPARSER 1 > + > /* Define to 1 if you have the header file. */ > #define HAVE_DLFCN_H 1 > > @@ -152,6 +156,9 @@ > /* Define to 1 if fseeko (and presumably ftello) exists and is declared. > */ > #define HAVE_FSEEKO 1 > > +/* Define to 1 if you have the `fsync' function. */ > +#define HAVE_FSYNC 1 > + > /* Whether getaddrinfo is available */ > #define HAVE_GETADDRINFO 1 > > @@ -206,6 +213,9 @@ > /* Define to 1 if you have the header file. */ > /* #undef HAVE_IPHLPAPI_H */ > > +/* Define to 1 if you have the `isblank' function. */ > +#define HAVE_ISBLANK 1 > + > /* Define to 1 if you have the `kill' function. */ > #define HAVE_KILL 1 > > @@ -233,6 +243,9 @@ > /* Define to 1 if you have the header file. */ > #define HAVE_NETINET_IN_H 1 > > +/* Use libnettle for crypto */ > +/* #undef HAVE_NETTLE */ > + > /* Use libnss for crypto */ > /* #undef HAVE_NSS */ > > @@ -497,7 +510,7 @@ > #define PACKAGE_NAME "unbound" > > /* Define to the full name and version of this package. */ > -#define PACKAGE_STRING "unbound 1.5.5" > +#define PACKAGE_STRING "unbound 1.5.7" > > /* Define to the one symbol short name of this package. */ > #define PACKAGE_TARNAME "unbound" > @@ -506,7 +519,7 @@ > #define PACKAGE_URL "" > > /* Define to the version of this package. */ > -#define PACKAGE_VERSION "1.5.5" > +#define PACKAGE_VERSION "1.5.7" > > /* default pidfile location */ > #define PIDFILE "/var/unbound/unbound.pid" > @@ -525,7 +538,7 @@ > #define ROOT_CERT_FILE "/var/unbound/icannbundle.pem" > > /* version number for resource files */ > -#define RSRC_PACKAGE_VERSION 1,5,5,0 > +#define RSRC_PACKAGE_VERSION 1,5,7,0 > > /* Directory to chdir to */ > #define RUN_DIR "/var/unbound" > @@ -536,6 +549,9 @@ > /* The size of `time_t', as computed by sizeof. */ > #define SIZEOF_TIME_T 8 > > +/* define if (v)snprintf does not return length needed, (but length used= ) > */ > +/* #undef SNPRINTF_RET_BROKEN */ > + > /* Define to 1 if you have the ANSI C header files. */ > #define STDC_HEADERS 1 > > @@ -570,7 +586,7 @@ > /* #undef USE_ECDSA_EVP_WORKAROUND */ > > /* Define this to enable GOST support. */ > -/* #undef USE_GOST */ > +#define USE_GOST 1 > > /* Define if you want to use internal select based events */ > #define USE_MINI_EVENT 1 > @@ -849,15 +865,13 @@ > #define MAXHOSTNAMELEN 256 > #endif > > - > -#ifndef HAVE_SNPRINTF > +#if !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN) > #define snprintf snprintf_unbound > #define vsnprintf vsnprintf_unbound > #include > int snprintf (char *str, size_t count, const char *fmt, ...); > int vsnprintf (char *str, size_t count, const char *fmt, va_list arg); > -#endif /* HAVE_SNPRINTF */ > - > +#endif /* HAVE_SNPRINTF or SNPRINTF_RET_BROKEN */ > > #ifndef HAVE_INET_PTON > #define inet_pton inet_pton_unbound > @@ -953,6 +967,11 @@ int memcmp(const void *x, const void *y, > char *ctime_r(const time_t *timep, char *buf); > #endif > > +#ifndef HAVE_ISBLANK > +#define isblank unbound_isblank > +int isblank(int c); > +#endif > + > #if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS) > #define strptime unbound_strptime > struct tm; > > Modified: stable/10/contrib/unbound/config.h.in > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/contrib/unbound/config.h.in Sat Jan 16 18:59:10 2016 > (r294189) > +++ stable/10/contrib/unbound/config.h.in Sat Jan 16 19:06:12 2016 > (r294190) > @@ -94,6 +94,10 @@ > don't. */ > #undef HAVE_DECL_STRLCPY > > +/* Define to 1 if you have the declaration of `XML_StopParser', and to 0 > if > + you don't. */ > +#undef HAVE_DECL_XML_STOPPARSER > + > /* Define to 1 if you have the header file. */ > #undef HAVE_DLFCN_H > > @@ -151,6 +155,9 @@ > /* Define to 1 if fseeko (and presumably ftello) exists and is declared. > */ > #undef HAVE_FSEEKO > > +/* Define to 1 if you have the `fsync' function. */ > +#undef HAVE_FSYNC > + > /* Whether getaddrinfo is available */ > #undef HAVE_GETADDRINFO > > @@ -205,6 +212,9 @@ > /* Define to 1 if you have the header file. */ > #undef HAVE_IPHLPAPI_H > > +/* Define to 1 if you have the `isblank' function. */ > +#undef HAVE_ISBLANK > + > /* Define to 1 if you have the `kill' function. */ > #undef HAVE_KILL > > @@ -232,6 +242,9 @@ > /* Define to 1 if you have the header file. */ > #undef HAVE_NETINET_IN_H > > +/* Use libnettle for crypto */ > +#undef HAVE_NETTLE > + > /* Use libnss for crypto */ > #undef HAVE_NSS > > @@ -535,6 +548,9 @@ > /* The size of `time_t', as computed by sizeof. */ > #undef SIZEOF_TIME_T > > +/* define if (v)snprintf does not return length needed, (but length used= ) > */ > +#undef SNPRINTF_RET_BROKEN > + > /* Define to 1 if you have the ANSI C header files. */ > #undef STDC_HEADERS > > @@ -848,15 +864,13 @@ > #define MAXHOSTNAMELEN 256 > #endif > > - > -#ifndef HAVE_SNPRINTF > +#if !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN) > #define snprintf snprintf_unbound > #define vsnprintf vsnprintf_unbound > #include > int snprintf (char *str, size_t count, const char *fmt, ...); > int vsnprintf (char *str, size_t count, const char *fmt, va_list arg); > -#endif /* HAVE_SNPRINTF */ > - > +#endif /* HAVE_SNPRINTF or SNPRINTF_RET_BROKEN */ > > #ifndef HAVE_INET_PTON > #define inet_pton inet_pton_unbound > @@ -952,6 +966,11 @@ int memcmp(const void *x, const void *y, > char *ctime_r(const time_t *timep, char *buf); > #endif > > +#ifndef HAVE_ISBLANK > +#define isblank unbound_isblank > +int isblank(int c); > +#endif > + > #if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS) > #define strptime unbound_strptime > struct tm; > > Modified: stable/10/contrib/unbound/configure > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/contrib/unbound/configure Sat Jan 16 18:59:10 2016 > (r294189) > +++ stable/10/contrib/unbound/configure Sat Jan 16 19:06:12 2016 > (r294190) > @@ -1,6 +1,6 @@ > #! /bin/sh > # Guess values for system-dependent variables and create Makefiles. > -# Generated by GNU Autoconf 2.69 for unbound 1.5.5. > +# Generated by GNU Autoconf 2.69 for unbound 1.5.7. > # > # Report bugs to . > # > @@ -590,8 +590,8 @@ MAKEFLAGS=3D > # Identity of this package. > PACKAGE_NAME=3D'unbound' > PACKAGE_TARNAME=3D'unbound' > -PACKAGE_VERSION=3D'1.5.5' > -PACKAGE_STRING=3D'unbound 1.5.5' > +PACKAGE_VERSION=3D'1.5.7' > +PACKAGE_STRING=3D'unbound 1.5.7' > PACKAGE_BUGREPORT=3D'unbound-bugs@nlnetlabs.nl' > PACKAGE_URL=3D'' > > @@ -661,6 +661,7 @@ CHECKLOCK_OBJ > staticexe > UNBOUND_EVENT_UNINSTALL > UNBOUND_EVENT_INSTALL > +SSLLIB > HAVE_SSL > CONFIG_DATE > NETBSD_LINTFLAGS > @@ -823,6 +824,7 @@ with_solaris_threads > with_pyunbound > with_pythonmodule > with_nss > +with_nettle > with_ssl > enable_sha2 > enable_gost > @@ -1391,7 +1393,7 @@ if test "$ac_init_help" =3D "long"; then > # Omit some internal or obsolete options to make the list less imposin= g. > # This message is too long to be a string in the A/UX 3.1 sh. > cat <<_ACEOF > -\`configure' configures unbound 1.5.5 to adapt to many kinds of systems. > +\`configure' configures unbound 1.5.7 to adapt to many kinds of systems. > > Usage: $0 [OPTION]... [VAR=3DVALUE]... > > @@ -1456,7 +1458,7 @@ fi > > if test -n "$ac_init_help"; then > case $ac_init_help in > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > > From owner-svn-src-all@freebsd.org Tue Feb 2 03:08:38 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 806BCA737B5; Tue, 2 Feb 2016 03:08:38 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 530AA78E; Tue, 2 Feb 2016 03:08:38 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1238bTv035560; Tue, 2 Feb 2016 03:08:37 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1238bR5035559; Tue, 2 Feb 2016 03:08:37 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201602020308.u1238bR5035559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 2 Feb 2016 03:08:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295135 - stable/10/sys/boot/ficl/i386 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 03:08:38 -0000 Author: allanjude Date: Tue Feb 2 03:08:37 2016 New Revision: 295135 URL: https://svnweb.freebsd.org/changeset/base/295135 Log: MFC: r294926 ficl on i386 should cast to unsigned char output to support efi i386 Submitted by: Toomas Soome Approved by: re (gjb) Modified: stable/10/sys/boot/ficl/i386/sysdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/ficl/i386/sysdep.c ============================================================================== --- stable/10/sys/boot/ficl/i386/sysdep.c Tue Feb 2 00:14:51 2016 (r295134) +++ stable/10/sys/boot/ficl/i386/sysdep.c Tue Feb 2 03:08:37 2016 (r295135) @@ -58,7 +58,7 @@ void ficlTextOut(FICL_VM *pVM, char *ms IGNORE(pVM); while(*msg != 0) - putchar(*(msg++)); + putchar((unsigned char)*(msg++)); if (fNewline) putchar('\n'); From owner-svn-src-all@freebsd.org Tue Feb 2 05:58:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98F66A97F9F; Tue, 2 Feb 2016 05:58:01 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 598721112; Tue, 2 Feb 2016 05:58:01 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u125w00D084731; Tue, 2 Feb 2016 05:58:00 GMT (envelope-from alfred@FreeBSD.org) Received: (from alfred@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u125vxCP084718; Tue, 2 Feb 2016 05:57:59 GMT (envelope-from alfred@FreeBSD.org) Message-Id: <201602020557.u125vxCP084718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alfred set sender to alfred@FreeBSD.org using -f From: Alfred Perlstein Date: Tue, 2 Feb 2016 05:57:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295136 - in head: sys/kern sys/netinet sys/sys usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 05:58:01 -0000 Author: alfred Date: Tue Feb 2 05:57:59 2016 New Revision: 295136 URL: https://svnweb.freebsd.org/changeset/base/295136 Log: Increase max allowed backlog for listen sockets from short to int. PR: 203922 Submitted by: White Knight MFC After: 4 weeks Modified: head/sys/kern/uipc_debug.c head/sys/kern/uipc_socket.c head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_uio.h head/sys/sys/socketvar.h head/usr.bin/netstat/inet.c head/usr.bin/netstat/sctp.c head/usr.bin/netstat/unix.c Modified: head/sys/kern/uipc_debug.c ============================================================================== --- head/sys/kern/uipc_debug.c Tue Feb 2 03:08:37 2016 (r295135) +++ head/sys/kern/uipc_debug.c Tue Feb 2 05:57:59 2016 (r295136) @@ -461,9 +461,9 @@ db_print_socket(struct socket *so, const db_print_indent(indent); /* so_list skipped */ - db_printf("so_qlen: %d ", so->so_qlen); - db_printf("so_incqlen: %d ", so->so_incqlen); - db_printf("so_qlimit: %d ", so->so_qlimit); + db_printf("so_qlen: %u ", so->so_qlen); + db_printf("so_incqlen: %u ", so->so_incqlen); + db_printf("so_qlimit: %u ", so->so_qlimit); db_printf("so_timeo: %d ", so->so_timeo); db_printf("so_error: %d\n", so->so_error); Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Tue Feb 2 03:08:37 2016 (r295135) +++ head/sys/kern/uipc_socket.c Tue Feb 2 05:57:59 2016 (r295136) @@ -196,7 +196,7 @@ VNET_DEFINE(struct hhook_head *, socket_ * NB: The orginal sysctl somaxconn is still available but hidden * to prevent confusion about the actual purpose of this number. */ -static int somaxconn = SOMAXCONN; +static u_int somaxconn = SOMAXCONN; static int sysctl_somaxconn(SYSCTL_HANDLER_ARGS) @@ -209,7 +209,13 @@ sysctl_somaxconn(SYSCTL_HANDLER_ARGS) if (error || !req->newptr ) return (error); - if (val < 1 || val > USHRT_MAX) + /* + * The purpose of the UINT_MAX / 3 limit, is so that the formula + * 3 * so_qlimit / 2 + * below, will not overflow. + */ + + if (val < 1 || val > UINT_MAX / 3) return (EINVAL); somaxconn = val; Modified: head/sys/netinet/sctp_sysctl.c ============================================================================== --- head/sys/netinet/sctp_sysctl.c Tue Feb 2 03:08:37 2016 (r295135) +++ head/sys/netinet/sctp_sysctl.c Tue Feb 2 05:57:59 2016 (r295136) @@ -426,7 +426,11 @@ sctp_sysctl_handle_assoclist(SYSCTL_HAND xinpcb.maxqlen = 0; } else { xinpcb.qlen = so->so_qlen; + xinpcb.qlen_old = so->so_qlen > USHRT_MAX ? + USHRT_MAX : (uint16_t) so->so_qlen; xinpcb.maxqlen = so->so_qlimit; + xinpcb.maxqlen_old = so->so_qlimit > USHRT_MAX ? + USHRT_MAX : (uint16_t) so->so_qlimit; } SCTP_INP_INCR_REF(inp); SCTP_INP_RUNLOCK(inp); Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Tue Feb 2 03:08:37 2016 (r295135) +++ head/sys/netinet/sctp_uio.h Tue Feb 2 05:57:59 2016 (r295136) @@ -1170,13 +1170,15 @@ struct xsctp_inpcb { uint32_t total_nospaces; uint32_t fragmentation_point; uint16_t local_port; - uint16_t qlen; - uint16_t maxqlen; + uint16_t qlen_old; + uint16_t maxqlen_old; void *socket; + uint32_t qlen; + uint32_t maxqlen; #if defined(__LP64__) - uint32_t extra_padding[29]; /* future */ + uint32_t extra_padding[27]; /* future */ #else - uint32_t extra_padding[30]; /* future */ + uint32_t extra_padding[28]; /* future */ #endif }; Modified: head/sys/sys/socketvar.h ============================================================================== --- head/sys/sys/socketvar.h Tue Feb 2 03:08:37 2016 (r295135) +++ head/sys/sys/socketvar.h Tue Feb 2 05:57:59 2016 (r295136) @@ -95,10 +95,10 @@ struct socket { TAILQ_HEAD(, socket) so_incomp; /* (e) queue of partial unaccepted connections */ TAILQ_HEAD(, socket) so_comp; /* (e) queue of complete unaccepted connections */ TAILQ_ENTRY(socket) so_list; /* (e) list of unaccepted connections */ - u_short so_qlen; /* (e) number of unaccepted connections */ - u_short so_incqlen; /* (e) number of unaccepted incomplete + u_int so_qlen; /* (e) number of unaccepted connections */ + u_int so_incqlen; /* (e) number of unaccepted incomplete connections */ - u_short so_qlimit; /* (e) max number queued connections */ + u_int so_qlimit; /* (e) max number queued connections */ short so_timeo; /* (g) connection timeout */ u_short so_error; /* (f) error affecting connection */ struct sigio *so_sigio; /* [sg] information for async I/O or @@ -172,9 +172,9 @@ struct xsocket { caddr_t so_pcb; /* another convenient handle */ int xso_protocol; int xso_family; - u_short so_qlen; - u_short so_incqlen; - u_short so_qlimit; + u_int so_qlen; + u_int so_incqlen; + u_int so_qlimit; short so_timeo; u_short so_error; pid_t so_pgid; Modified: head/usr.bin/netstat/inet.c ============================================================================== --- head/usr.bin/netstat/inet.c Tue Feb 2 03:08:37 2016 (r295135) +++ head/usr.bin/netstat/inet.c Tue Feb 2 05:57:59 2016 (r295136) @@ -486,11 +486,11 @@ protopr(u_long off, const char *name, in else xo_emit("{:protocol/%-3.3s%-2.2s/%s%s} ", name, vchar); if (Lflag) { - char buf1[15]; + char buf1[33]; - snprintf(buf1, 15, "%d/%d/%d", so->so_qlen, + snprintf(buf1, sizeof buf1, "%u/%u/%u", so->so_qlen, so->so_incqlen, so->so_qlimit); - xo_emit("{:listen-queue-sizes/%-14.14s} ", buf1); + xo_emit("{:listen-queue-sizes/%-32.32s} ", buf1); } else if (Tflag) { if (istcp) xo_emit("{:sent-retransmit-packets/%6u} " Modified: head/usr.bin/netstat/sctp.c ============================================================================== --- head/usr.bin/netstat/sctp.c Tue Feb 2 03:08:37 2016 (r295135) +++ head/usr.bin/netstat/sctp.c Tue Feb 2 05:57:59 2016 (r295136) @@ -467,9 +467,10 @@ sctp_process_inpcb(struct xsctp_inpcb *x tname = "????"; if (Lflag) { - char buf1[9]; + char buf1[22]; - snprintf(buf1, 9, "%hu/%hu", xinpcb->qlen, xinpcb->maxqlen); + snprintf(buf1, sizeof buf1, "%u/%u", + xinpcb->qlen, xinpcb->maxqlen); xo_emit("{:protocol/%-6.6s/%s} {:type/%-5.5s/%s} ", pname, tname); xo_emit("{d:queues/%-8.8s}{e:queue-len/%hu}" Modified: head/usr.bin/netstat/unix.c ============================================================================== --- head/usr.bin/netstat/unix.c Tue Feb 2 03:08:37 2016 (r295135) +++ head/usr.bin/netstat/unix.c Tue Feb 2 05:57:59 2016 (r295136) @@ -271,7 +271,7 @@ unixdomainpr(struct xunpcb *xunp, struct struct unpcb *unp; struct sockaddr_un *sa; static int first = 1; - char buf1[15]; + char buf1[33]; static const char *titles[2] = { "{T:/%-8.8s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-6.6s} {T:/%8.8s} " "{T:/%8.8s} {T:/%8.8s} {T:/%8.8s} {T:Addr}\n", @@ -310,10 +310,10 @@ unixdomainpr(struct xunpcb *xunp, struct return; if (Lflag) { - snprintf(buf1, 15, "%d/%d/%d", so->so_qlen, + snprintf(buf1, sizeof buf1, "%u/%u/%u", so->so_qlen, so->so_incqlen, so->so_qlimit); - xo_emit("unix {d:socket/%-14.14s}{e:queue-length/%d}" - "{e:incomplete-queue-length/%d}{e:queue-limit/%d}", + xo_emit("unix {d:socket/%-32.32s}{e:queue-length/%u}" + "{e:incomplete-queue-length/%u}{e:queue-limit/%u}", buf1, so->so_qlen, so->so_incqlen, so->so_qlimit); } else { xo_emit(format[fmt], From owner-svn-src-all@freebsd.org Tue Feb 2 07:02:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13592A975AD; Tue, 2 Feb 2016 07:02:53 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8D9DD4D; Tue, 2 Feb 2016 07:02:52 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1272pxH004868; Tue, 2 Feb 2016 07:02:51 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1272pUZ004863; Tue, 2 Feb 2016 07:02:51 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201602020702.u1272pUZ004863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 2 Feb 2016 07:02:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295137 - in head/sys: conf dev/md tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 07:02:53 -0000 Author: adrian Date: Tue Feb 2 07:02:51 2016 New Revision: 295137 URL: https://svnweb.freebsd.org/changeset/base/295137 Log: Fix MFS builds when both MD_ROOT_SIZE and MFS_IMAGE are specified MD_ROOT_SIZE and embed_mfs.sh were basically retired as part of https://reviews.freebsd.org/D2903 . However, when building a kernel with 'options MD_ROOT_SIZE' specified, this results in a non-working MFS, as within sys/dev/md/md.c we fall within the wrong # ifdef. This patch implements the following: * Allow kernels to be built without the MD_ROOT_SIZE option, which results in a kernel built as per D2903. * Allow kernels to be built with the MD_ROOT_SIZE option, which results in a kernel built similarly to the pre-D2903 way, with the following differences: * The MFS is now put in a separate section within the kernel (oldmfs, so it differs from the mfs section introduced by D2903). * embed_mfs.sh is changed, so it looks up the oldmfs section within the kernel, gets its size and offset, sees if the MFS will fit within the allocated oldmfs section and only if all is well does a dd of the MFS image into the kernel. Submitted by: Stanislav Galabov Reviewed by: brooks, imp Differential Revision: https://reviews.freebsd.org/D5093 Modified: head/sys/conf/NOTES head/sys/conf/kern.post.mk head/sys/conf/kern.pre.mk head/sys/dev/md/md.c head/sys/tools/embed_mfs.sh Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Feb 2 05:57:59 2016 (r295136) +++ head/sys/conf/NOTES Tue Feb 2 07:02:51 2016 (r295137) @@ -1078,6 +1078,14 @@ options UFS_GJOURNAL # Make space in the kernel for a root filesystem on a md device. # Define to the number of kilobytes to reserve for the filesystem. +# This is now optional. +# If not defined, the root filesystem passed in as the MFS_IMAGE makeoption +# will be automatically embedded in the kernel during linking. Its exact size +# will be consumed within the kernel. +# If defined, the old way of embedding the filesystem in the kernel will be +# used. That is to say MD_ROOT_SIZE KB will be allocated in the kernel and +# later, the filesystem image passed in as the MFS_IMAGE makeoption will be +# dd'd into the reserved space if it fits. options MD_ROOT_SIZE=10 # Make the md device a potential root device, either with preloaded Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Tue Feb 2 05:57:59 2016 (r295136) +++ head/sys/conf/kern.post.mk Tue Feb 2 07:02:51 2016 (r295137) @@ -130,6 +130,9 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o @rm -f ${.TARGET} @echo linking ${.TARGET} ${SYSTEM_LD} +.if !empty(MD_ROOT_SIZE_CONFIGURED) && defined(MFS_IMAGE) + @sh ${S}/tools/embed_mfs.sh ${.TARGET} ${MFS_IMAGE} +.endif .if ${MK_CTF} != "no" @echo ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ... @${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o @@ -353,6 +356,7 @@ vnode_if_typedef.h: ${AWK} -f $S/tools/vnode_if.awk $S/kern/vnode_if.src -q .if ${MFS_IMAGE:Uno} != "no" +.if empty(MD_ROOT_SIZE_CONFIGURED) # Generate an object file from the file system image to embed in the kernel # via linking. Make sure the contents are in the mfs section and rename the # start/end/size variables to __start_mfs, __stop_mfs, and mfs_size, @@ -372,6 +376,7 @@ embedfs_${MFS_IMAGE:T:R}.o: ${MFS_IMAGE} _binary_${MFS_IMAGE:C,[^[:alnum:]],_,g}_end=mfs_root_end \ ${.TARGET} .endif +.endif # XXX strictly, everything depends on Makefile because changes to ${PROF} # only appear there, but we don't handle that. Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Tue Feb 2 05:57:59 2016 (r295136) +++ head/sys/conf/kern.pre.mk Tue Feb 2 07:02:51 2016 (r295137) @@ -195,9 +195,13 @@ SYSTEM_DEP= Makefile ${SYSTEM_OBJS} SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS} SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o} SYSTEM_OBJS+= hack.So + +MD_ROOT_SIZE_CONFIGURED!= grep MD_ROOT_SIZE opt_md.h || true ; echo .if ${MFS_IMAGE:Uno} != "no" +.if empty(MD_ROOT_SIZE_CONFIGURED) SYSTEM_OBJS+= embedfs_${MFS_IMAGE:T:R}.o .endif +.endif SYSTEM_LD= @${LD} -Bdynamic -T ${LDSCRIPT} ${_LDFLAGS} --no-warn-mismatch \ --warn-common --export-dynamic --dynamic-linker /red/herring \ -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o @@ -230,8 +234,9 @@ MKMODULESENV+= __MPATH="${__MPATH}" # Architecture and output format arguments for objdump to convert image to # object file -.if ${MFS_IMAGE:Uno} != "no" +.if ${MFS_IMAGE:Uno} != "no" +.if empty(MD_ROOT_SIZE_CONFIGURED) .if !defined(EMBEDFS_FORMAT.${MACHINE_ARCH}) EMBEDFS_FORMAT.${MACHINE_ARCH}!= awk -F'"' '/OUTPUT_FORMAT/ {print $$2}' ${LDSCRIPT} .if empty(EMBEDFS_FORMAT.${MACHINE_ARCH}) @@ -254,6 +259,7 @@ EMBEDFS_FORMAT.mips64?= elf64-tradbigmi EMBEDFS_FORMAT.mips64el?= elf64-tradlittlemips EMBEDFS_FORMAT.riscv?= elf64-littleriscv .endif +.endif # Detect kernel config options that force stack frames to be turned on. DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Tue Feb 2 05:57:59 2016 (r295136) +++ head/sys/dev/md/md.c Tue Feb 2 07:02:51 2016 (r295137) @@ -130,18 +130,12 @@ SYSCTL_INT(_vm, OID_AUTO, md_malloc_wait */ #if defined(MD_ROOT_SIZE) /* + * We put the mfs_root symbol into the oldmfs section of the kernel object file. * Applications that patch the object with the image can determine - * the size looking at the start and end markers (strings), - * so we want them contiguous. + * the size looking at the oldmfs section size within the kernel. */ -static struct { - u_char start[MD_ROOT_SIZE*1024]; - u_char end[128]; -} mfs_root = { - .start = "MFS Filesystem goes here", - .end = "MFS Filesystem had better STOP here", -}; -const int mfs_root_size = sizeof(mfs_root.start); +u_char mfs_root[MD_ROOT_SIZE*1024] __attribute__ ((section ("oldmfs"))); +const int mfs_root_size = sizeof(mfs_root); #else extern volatile u_char __weak_symbol mfs_root; extern volatile u_char __weak_symbol mfs_root_end; Modified: head/sys/tools/embed_mfs.sh ============================================================================== --- head/sys/tools/embed_mfs.sh Tue Feb 2 05:57:59 2016 (r295136) +++ head/sys/tools/embed_mfs.sh Tue Feb 2 07:02:51 2016 (r295137) @@ -32,8 +32,20 @@ # $2: MFS image filename # -obs=`strings -at d $1 | grep "MFS Filesystem goes here" | awk '{print $1}'` -dd if=$2 ibs=8192 of=$1 obs=${obs} oseek=1 conv=notrunc 2> /dev/null +mfs_size=`stat -f '%z' $2 2> /dev/null` +# If we can't determine MFS image size - bail. +[ -z ${mfs_size} ] && echo "Can't determine MFS image size" && exit 1 -strings $1 | grep 'MFS Filesystem had better STOP here' > /dev/null || \ - (rm $1 && echo "MFS image too large" && false) +sec_info=`objdump -h $1 2> /dev/null | grep " oldmfs "` +# If we can't find the mfs section within the given kernel - bail. +[ -z "${sec_info}" ] && echo "Can't locate mfs section within kernel" && exit 1 + +sec_size=`echo ${sec_info} | awk '{printf("%d", "0x" $3)}' 2> /dev/null` +sec_start=`echo ${sec_info} | awk '{printf("%d", "0x" $6)}' 2> /dev/null` + +# If the mfs section size is smaller than the mfs image - bail. +[ ${sec_size} -lt ${mfs_size} ] && echo "MFS image too large" && exit 1 + +# Dump the mfs image into the mfs section +dd if=$2 ibs=8192 of=$1 obs=${sec_start} oseek=1 conv=notrunc 2> /dev/null && \ + echo "MFS image embedded into kernel" && exit 0 From owner-svn-src-all@freebsd.org Tue Feb 2 07:47:40 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2431A98799; Tue, 2 Feb 2016 07:47:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 958E3354; Tue, 2 Feb 2016 07:47:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u127ldXq017185; Tue, 2 Feb 2016 07:47:39 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u127ld3p017178; Tue, 2 Feb 2016 07:47:39 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201602020747.u127ld3p017178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 2 Feb 2016 07:47:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295138 - in head/sys: conf mips/conf mips/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 07:47:40 -0000 Author: adrian Date: Tue Feb 2 07:47:38 2016 New Revision: 295138 URL: https://svnweb.freebsd.org/changeset/base/295138 Log: Rename some CPU_MIPSxxx options and add new CPU_MIPSxxx options This revision does the following renames: CPU_MIPS24KC -> CPU_MIPS24K CPU_MIPS74KC -> CPU_MIPS74K CPU_MIPS1004KC -> CPU_MIPS1004K It also adds the following new CPU_MIPSxxx options: CPU_MIPS24KE, CPU_MIPS34K, CPU_MIPS1074K, CPU_INTERAPTIV, CPU_PROAPTIV CPU_MIPSxxxxKC is limiting and possibly misleading as it implies the MIPSxxxxK CPU has no FPU. It would be better if the CPUs are named after their standard functionalities only and the presence or absence of FPU can then be controlled via the CPU_HAVEFPU option. I will send out another dependent revision that moves MIPS 32 r2 and r3 CPUs to use the EHB instruction for clearing hazards instead of NOP/SSNOP. Submitted by: Stanislav Galabov Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D5077 Modified: head/sys/conf/options.mips head/sys/mips/conf/AR934X_BASE head/sys/mips/conf/QCA955X_BASE head/sys/mips/include/asm.h head/sys/mips/include/cpufunc.h head/sys/mips/include/cpuregs.h Modified: head/sys/conf/options.mips ============================================================================== --- head/sys/conf/options.mips Tue Feb 2 07:02:51 2016 (r295137) +++ head/sys/conf/options.mips Tue Feb 2 07:47:38 2016 (r295138) @@ -29,9 +29,13 @@ # $FreeBSD$ CPU_MIPS4KC opt_global.h -CPU_MIPS24KC opt_global.h -CPU_MIPS74KC opt_global.h -CPU_MIPS1004KC opt_global.h +CPU_MIPS24K opt_global.h +CPU_MIPS34K opt_global.h +CPU_MIPS74K opt_global.h +CPU_MIPS1004K opt_global.h +CPU_MIPS1074K opt_global.h +CPU_INTERAPTIV opt_global.h +CPU_PROAPTIV opt_global.h CPU_MIPS32 opt_global.h CPU_MIPS64 opt_global.h CPU_SENTRY5 opt_global.h Modified: head/sys/mips/conf/AR934X_BASE ============================================================================== --- head/sys/mips/conf/AR934X_BASE Tue Feb 2 07:02:51 2016 (r295137) +++ head/sys/mips/conf/AR934X_BASE Tue Feb 2 07:47:38 2016 (r295138) @@ -12,7 +12,7 @@ machine mips mips ident AR934X_BASE -cpu CPU_MIPS74KC +cpu CPU_MIPS74K makeoptions KERNLOADADDR=0x80050000 options HZ=1000 Modified: head/sys/mips/conf/QCA955X_BASE ============================================================================== --- head/sys/mips/conf/QCA955X_BASE Tue Feb 2 07:02:51 2016 (r295137) +++ head/sys/mips/conf/QCA955X_BASE Tue Feb 2 07:47:38 2016 (r295138) @@ -13,7 +13,7 @@ machine mips mips ident QCA955X_BASE -cpu CPU_MIPS74KC +cpu CPU_MIPS74K makeoptions KERNLOADADDR=0x80050000 options HZ=1000 Modified: head/sys/mips/include/asm.h ============================================================================== --- head/sys/mips/include/asm.h Tue Feb 2 07:02:51 2016 (r295137) +++ head/sys/mips/include/asm.h Tue Feb 2 07:47:38 2016 (r295138) @@ -700,7 +700,7 @@ _C_LABEL(x): #elif defined(CPU_RMI) #define HAZARD_DELAY #define ITLBNOPFIX -#elif defined(CPU_MIPS74KC) +#elif defined(CPU_MIPS74K) #define HAZARD_DELAY sll $0,$0,3 #define ITLBNOPFIX sll $0,$0,3 #else Modified: head/sys/mips/include/cpufunc.h ============================================================================== --- head/sys/mips/include/cpufunc.h Tue Feb 2 07:02:51 2016 (r295137) +++ head/sys/mips/include/cpufunc.h Tue Feb 2 07:47:38 2016 (r295138) @@ -248,7 +248,7 @@ MIPS_RW32_COP0_SEL(config5, MIPS_COP_0_C #if defined(CPU_NLM) || defined(BERI_LARGE_TLB) MIPS_RW32_COP0_SEL(config6, MIPS_COP_0_CONFIG, 6); #endif -#if defined(CPU_NLM) || defined(CPU_MIPS1004KC) +#if defined(CPU_NLM) || defined(CPU_MIPS1004K) MIPS_RW32_COP0_SEL(config7, MIPS_COP_0_CONFIG, 7); #endif MIPS_RW32_COP0(count, MIPS_COP_0_COUNT); Modified: head/sys/mips/include/cpuregs.h ============================================================================== --- head/sys/mips/include/cpuregs.h Tue Feb 2 07:02:51 2016 (r295137) +++ head/sys/mips/include/cpuregs.h Tue Feb 2 07:47:38 2016 (r295138) @@ -149,12 +149,12 @@ #define MIPS_CCA_CC 0x05 /* Cacheable Coherent. */ #endif -#if defined(CPU_MIPS74KC) +#if defined(CPU_MIPS74K) #define MIPS_CCA_UNCACHED 0x02 #define MIPS_CCA_CACHED 0x03 #endif -#if defined(CPU_MIPS1004KC) +#if defined(CPU_MIPS1004K) #define MIPS_CCA_UNCACHED 0x02 #define MIPS_CCA_CACHED 0x05 #endif @@ -214,7 +214,7 @@ #define COP0_SYNC .word 0xc0 /* ehb */ #elif defined(CPU_SB1) #define COP0_SYNC ssnop; ssnop; ssnop; ssnop; ssnop; ssnop; ssnop; ssnop; ssnop -#elif defined(CPU_MIPS74KC) || defined(CPU_MIPS1004KC) +#elif defined(CPU_MIPS74K) || defined(CPU_MIPS1004K) #define COP0_SYNC .word 0xc0 /* ehb */ #else /* From owner-svn-src-all@freebsd.org Tue Feb 2 09:58:55 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3EBDFA98948; Tue, 2 Feb 2016 09:58:55 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 0A03D1FF5; Tue, 2 Feb 2016 09:58:54 +0000 (UTC) (envelope-from des@des.no) Received: from desk.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id DFEDCAE5E; Tue, 2 Feb 2016 09:58:53 +0000 (UTC) Received: by desk.des.no (Postfix, from userid 1001) id CF9C64655C; Tue, 2 Feb 2016 10:58:48 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Bryan Drewery Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r294464 - in head: crypto/openssh crypto/openssh/contrib/redhat crypto/openssh/contrib/suse crypto/openssh/openbsd-compat crypto/openssh/regress crypto/openssh/regress/unittests crypto/... References: <201601202257.u0KMvA89056089@repo.freebsd.org> <56AFC036.6080508@FreeBSD.org> Date: Tue, 02 Feb 2016 10:58:48 +0100 In-Reply-To: <56AFC036.6080508@FreeBSD.org> (Bryan Drewery's message of "Mon, 1 Feb 2016 12:29:42 -0800") Message-ID: <86r3gvwi07.fsf@desk.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 09:58:55 -0000 Bryan Drewery writes: > Dag-Erling Sm=C3=B8rgrav wrote: > > -#PermitRootLogin no > > +#PermitRootLogin prohibit-password > Shouldn't the comments note the default? The default here is still > 'no'. Yes, I kept our local modification but somehow either didn't notice the comment or resolved the conflict incorrectly. > Upstream 7.1p2 does use PERMIT_NO_PASSWD rather than PERMIT_NO that we > have. I think we should make this change: We've always had this turned off, while upstream had it on by default. The new default doesn't work correctly with PAM, and the fix is not trivial. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@freebsd.org Tue Feb 2 09:59:42 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 523C5A989B3; Tue, 2 Feb 2016 09:59:42 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 1B428224; Tue, 2 Feb 2016 09:59:41 +0000 (UTC) (envelope-from des@des.no) Received: from desk.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 41CFAAE64; Tue, 2 Feb 2016 09:59:41 +0000 (UTC) Received: by desk.des.no (Postfix, from userid 1001) id EBF584655E; Tue, 2 Feb 2016 10:59:35 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Maxim Sobolev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn: stable/10/contrib/unbound: . compat daemon dns64 dnstap doc iterator libunbound libunbound/python libunbound/python/doc libunbound/python/doc/modules libunbound/python/exam... References: <201601161906.u0GJ6Cid076259@repo.freebsd.org> Date: Tue, 02 Feb 2016 10:59:35 +0100 In-Reply-To: (Maxim Sobolev's message of "Mon, 1 Feb 2016 17:23:03 -0800") Message-ID: <86mvrjwhyw.fsf@desk.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 09:59:42 -0000 Maxim Sobolev writes: > Please remove this from both HEAD and stable. Feel free. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@freebsd.org Tue Feb 2 10:02:40 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4041AA98BA8; Tue, 2 Feb 2016 10:02:40 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E532815; Tue, 2 Feb 2016 10:02:39 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12A2cwl057067; Tue, 2 Feb 2016 10:02:38 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12A2cUT057065; Tue, 2 Feb 2016 10:02:38 GMT (envelope-from des@FreeBSD.org) Message-Id: <201602021002.u12A2cUT057065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Tue, 2 Feb 2016 10:02:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295139 - head/crypto/openssh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 10:02:40 -0000 Author: des Date: Tue Feb 2 10:02:38 2016 New Revision: 295139 URL: https://svnweb.freebsd.org/changeset/base/295139 Log: Document our modified default value for PermitRootLogin. Modified: head/crypto/openssh/sshd_config head/crypto/openssh/sshd_config.5 Modified: head/crypto/openssh/sshd_config ============================================================================== --- head/crypto/openssh/sshd_config Tue Feb 2 07:47:38 2016 (r295138) +++ head/crypto/openssh/sshd_config Tue Feb 2 10:02:38 2016 (r295139) @@ -45,7 +45,7 @@ # Authentication: #LoginGraceTime 2m -#PermitRootLogin prohibit-password +#PermitRootLogin no #StrictModes yes #MaxAuthTries 6 #MaxSessions 10 Modified: head/crypto/openssh/sshd_config.5 ============================================================================== --- head/crypto/openssh/sshd_config.5 Tue Feb 2 07:47:38 2016 (r295138) +++ head/crypto/openssh/sshd_config.5 Tue Feb 2 10:02:38 2016 (r295139) @@ -1217,7 +1217,7 @@ The argument must be or .Dq no . The default is -.Dq prohibit-password . +.Dq no . Note that if .Cm ChallengeResponseAuthentication is From owner-svn-src-all@freebsd.org Tue Feb 2 10:11:58 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F9A6A9805A; Tue, 2 Feb 2016 10:11:58 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFC6DBB8; Tue, 2 Feb 2016 10:11:57 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12ABuZO059981; Tue, 2 Feb 2016 10:11:56 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12ABuxf059980; Tue, 2 Feb 2016 10:11:56 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201602021011.u12ABuxf059980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 2 Feb 2016 10:11:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295140 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 10:11:58 -0000 Author: andrew Date: Tue Feb 2 10:11:56 2016 New Revision: 295140 URL: https://svnweb.freebsd.org/changeset/base/295140 Log: Correctly handle the case where copystr(9) is given a string longer than the passed in length. In this case we need to return ENAMETOOLONG. Modified: head/sys/arm64/arm64/copystr.c Modified: head/sys/arm64/arm64/copystr.c ============================================================================== --- head/sys/arm64/arm64/copystr.c Tue Feb 2 10:02:38 2016 (r295139) +++ head/sys/arm64/arm64/copystr.c Tue Feb 2 10:11:56 2016 (r295140) @@ -56,6 +56,6 @@ copystr(const void * __restrict kfaddr, if (lencopied != NULL) *lencopied = pos; - return (0); + return (error); } From owner-svn-src-all@freebsd.org Tue Feb 2 10:17:52 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78515A98237; Tue, 2 Feb 2016 10:17:52 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A8E9F27; Tue, 2 Feb 2016 10:17:52 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12AHpSv060208; Tue, 2 Feb 2016 10:17:51 GMT (envelope-from skra@FreeBSD.org) Received: (from skra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12AHp9f060207; Tue, 2 Feb 2016 10:17:51 GMT (envelope-from skra@FreeBSD.org) Message-Id: <201602021017.u12AHp9f060207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skra set sender to skra@FreeBSD.org using -f From: Svatopluk Kraus Date: Tue, 2 Feb 2016 10:17:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295141 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 10:17:52 -0000 Author: skra Date: Tue Feb 2 10:17:51 2016 New Revision: 295141 URL: https://svnweb.freebsd.org/changeset/base/295141 Log: Fix setting of protection bits for page table entries in pmap_map(). This function is only called from vm_page_startup() and vm_reserv_startup(). I.e. during vm subsystem initialization. As VM_PROT_WRITE is always used in these calls, the typo did not have any effect. Likely, it's the reason why it wasn't discovered so long. Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Tue Feb 2 10:11:56 2016 (r295140) +++ head/sys/arm/arm/pmap-v6.c Tue Feb 2 10:17:51 2016 (r295141) @@ -1325,7 +1325,7 @@ pmap_map(vm_offset_t *virt, vm_paddr_t s PDEBUG(1, printf("%s: virt = %#x, start = %#x, end = %#x (size = %#x)," " prot = %d\n", __func__, *virt, start, end, end - start, prot)); - l2prot = (prot & VM_PROT_WRITE) ? PTE2_AP_KRW : PTE1_AP_KR; + l2prot = (prot & VM_PROT_WRITE) ? PTE2_AP_KRW : PTE2_AP_KR; l2prot |= (prot & VM_PROT_EXECUTE) ? PTE2_X : PTE2_NX; l1prot = ATTR_TO_L1(l2prot); From owner-svn-src-all@freebsd.org Tue Feb 2 10:28:58 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02BE0A9884B; Tue, 2 Feb 2016 10:28:58 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D22F91625; Tue, 2 Feb 2016 10:28:57 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12ASuMO063165; Tue, 2 Feb 2016 10:28:56 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12ASuWc063158; Tue, 2 Feb 2016 10:28:56 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201602021028.u12ASuWc063158@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 2 Feb 2016 10:28:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295142 - in head/sys/arm64: arm64 include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 10:28:58 -0000 Author: andrew Date: Tue Feb 2 10:28:56 2016 New Revision: 295142 URL: https://svnweb.freebsd.org/changeset/base/295142 Log: Implement single stepping on arm64. We need to set the single step bits in the processor and debug state registers. A flag has been added to the pcb to tell us when to enable single stepping for a given thread. Reviewed by: kib Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D4730 Modified: head/sys/arm64/arm64/genassym.c head/sys/arm64/arm64/machdep.c head/sys/arm64/arm64/mp_machdep.c head/sys/arm64/arm64/swtch.S head/sys/arm64/arm64/trap.c head/sys/arm64/include/armreg.h head/sys/arm64/include/pcb.h Modified: head/sys/arm64/arm64/genassym.c ============================================================================== --- head/sys/arm64/arm64/genassym.c Tue Feb 2 10:17:51 2016 (r295141) +++ head/sys/arm64/arm64/genassym.c Tue Feb 2 10:28:56 2016 (r295142) @@ -49,10 +49,12 @@ ASSYM(PC_CURTHREAD, offsetof(struct pcpu /* Size of pcb, rounded to keep stack alignment */ ASSYM(PCB_SIZE, roundup2(sizeof(struct pcb), STACKALIGNBYTES + 1)); +ASSYM(PCB_SINGLE_STEP_SHIFT, PCB_SINGLE_STEP_SHIFT); ASSYM(PCB_REGS, offsetof(struct pcb, pcb_x)); ASSYM(PCB_SP, offsetof(struct pcb, pcb_sp)); ASSYM(PCB_L1ADDR, offsetof(struct pcb, pcb_l1addr)); ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault)); +ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags)); ASSYM(SF_UC, offsetof(struct sigframe, sf_uc)); Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Tue Feb 2 10:17:51 2016 (r295141) +++ head/sys/arm64/arm64/machdep.c Tue Feb 2 10:28:56 2016 (r295142) @@ -233,7 +233,8 @@ int ptrace_single_step(struct thread *td) { - /* TODO; */ + td->td_frame->tf_spsr |= PSR_SS; + td->td_pcb->pcb_flags |= PCB_SINGLE_STEP; return (0); } @@ -241,7 +242,8 @@ int ptrace_clear_single_step(struct thread *td) { - /* TODO; */ + td->td_frame->tf_spsr &= ~PSR_SS; + td->td_pcb->pcb_flags &= ~PCB_SINGLE_STEP; return (0); } Modified: head/sys/arm64/arm64/mp_machdep.c ============================================================================== --- head/sys/arm64/arm64/mp_machdep.c Tue Feb 2 10:17:51 2016 (r295141) +++ head/sys/arm64/arm64/mp_machdep.c Tue Feb 2 10:28:56 2016 (r295142) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #ifdef VFP @@ -247,6 +248,8 @@ init_secondary(uint64_t cpu) vfp_init(); #endif + dbg_monitor_init(); + /* Enable interrupts */ intr_enable(); Modified: head/sys/arm64/arm64/swtch.S ============================================================================== --- head/sys/arm64/arm64/swtch.S Tue Feb 2 10:17:51 2016 (r295141) +++ head/sys/arm64/arm64/swtch.S Tue Feb 2 10:28:56 2016 (r295142) @@ -37,10 +37,37 @@ __FBSDID("$FreeBSD$"); +.macro clear_step_flag pcbflags, tmp + tbz \pcbflags, #PCB_SINGLE_STEP_SHIFT, 999f + mrs \tmp, mdscr_el1 + bic \tmp, \tmp, #1 + msr mdscr_el1, \tmp + isb +999: +.endm + +.macro set_step_flag pcbflags, tmp + tbz \pcbflags, #PCB_SINGLE_STEP_SHIFT, 999f + mrs \tmp, mdscr_el1 + orr \tmp, \tmp, #1 + msr mdscr_el1, \tmp + isb +999: +.endm + /* * void cpu_throw(struct thread *old, struct thread *new) */ ENTRY(cpu_throw) + /* Of old == NULL skip disabling stepping */ + cbz x0, 1f + + /* If we were single stepping, disable it */ + ldr x4, [x0, #TD_PCB] + ldr w5, [x4, #PCB_FLAGS] + clear_step_flag w5, x6 +1: + #ifdef VFP /* Backup the new thread pointer around a call to C code */ mov x19, x1 @@ -69,6 +96,10 @@ ENTRY(cpu_throw) dsb sy isb + /* If we are single stepping, enable it */ + ldr w5, [x4, #PCB_FLAGS] + set_step_flag w5, x6 + /* Restore the registers */ ldp x5, x6, [x4, #PCB_SP] mov sp, x5 @@ -127,6 +158,10 @@ ENTRY(cpu_switch) mrs x6, tpidr_el0 stp x5, x6, [x4, #PCB_SP] + /* If we were single stepping, disable it */ + ldr w5, [x4, #PCB_FLAGS] + clear_step_flag w5, x6 + #ifdef VFP mov x19, x0 mov x20, x1 @@ -174,6 +209,10 @@ ENTRY(cpu_switch) b.eq 1b #endif + /* If we are single stepping, enable it */ + ldr w5, [x4, #PCB_FLAGS] + set_step_flag w5, x6 + /* Restore the registers */ ldp x5, x6, [x4, #PCB_SP] mov sp, x5 Modified: head/sys/arm64/arm64/trap.c ============================================================================== --- head/sys/arm64/arm64/trap.c Tue Feb 2 10:17:51 2016 (r295141) +++ head/sys/arm64/arm64/trap.c Tue Feb 2 10:28:56 2016 (r295142) @@ -138,7 +138,6 @@ svc_handler(struct trapframe *frame) int error; td = curthread; - td->td_frame = frame; error = syscallenter(td, &sa); syscallret(td, error, &sa); @@ -338,6 +337,9 @@ do_el0_sync(struct trapframe *frame) ("Invalid pcpu address from userland: %p (tpidr %lx)", get_pcpu(), READ_SPECIALREG(tpidr_el1))); + td = curthread; + td->td_frame = frame; + esr = READ_SPECIALREG(esr_el1); exception = ESR_ELx_EXCEPTION(esr); switch (exception) { @@ -373,15 +375,22 @@ do_el0_sync(struct trapframe *frame) el0_excp_unknown(frame); break; case EXCP_PC_ALIGN: - td = curthread; call_trapsignal(td, SIGBUS, BUS_ADRALN, (void *)frame->tf_elr); userret(td, frame); break; case EXCP_BRK: - td = curthread; call_trapsignal(td, SIGTRAP, TRAP_BRKPT, (void *)frame->tf_elr); userret(td, frame); break; + case EXCP_SOFTSTP_EL0: + td->td_frame->tf_spsr &= ~PSR_SS; + td->td_pcb->pcb_flags &= ~PCB_SINGLE_STEP; + WRITE_SPECIALREG(MDSCR_EL1, + READ_SPECIALREG(MDSCR_EL1) & ~DBG_MDSCR_SS); + call_trapsignal(td, SIGTRAP, TRAP_TRACE, + (void *)frame->tf_elr); + userret(td, frame); + break; default: print_registers(frame); panic("Unknown userland exception %x esr_el1 %lx\n", exception, Modified: head/sys/arm64/include/armreg.h ============================================================================== --- head/sys/arm64/include/armreg.h Tue Feb 2 10:17:51 2016 (r295141) +++ head/sys/arm64/include/armreg.h Tue Feb 2 10:28:56 2016 (r295142) @@ -101,6 +101,7 @@ #define EXCP_SP_ALIGN 0x26 /* SP slignment fault */ #define EXCP_TRAP_FP 0x2c /* Trapped FP exception */ #define EXCP_SERROR 0x2f /* SError interrupt */ +#define EXCP_SOFTSTP_EL0 0x32 /* Software Step, from lower EL */ #define EXCP_SOFTSTP_EL1 0x33 /* Software Step, from same EL */ #define EXCP_WATCHPT_EL1 0x35 /* Watchpoint, from same EL */ #define EXCP_BRK 0x3c /* Breakpoint */ Modified: head/sys/arm64/include/pcb.h ============================================================================== --- head/sys/arm64/include/pcb.h Tue Feb 2 10:17:51 2016 (r295141) +++ head/sys/arm64/include/pcb.h Tue Feb 2 10:28:56 2016 (r295142) @@ -45,6 +45,10 @@ struct pcb { /* Fault handler, the error value is passed in x0 */ vm_offset_t pcb_onfault; + u_int pcb_flags; +#define PCB_SINGLE_STEP_SHIFT 0 +#define PCB_SINGLE_STEP (1 << PCB_SINGLE_STEP_SHIFT) + /* Place last to simplify the asm to access the rest if the struct */ __uint128_t pcb_vfp[32]; uint32_t pcb_fpcr; From owner-svn-src-all@freebsd.org Tue Feb 2 10:32:47 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D5D3A98A1B; Tue, 2 Feb 2016 10:32:47 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AFB41AD4; Tue, 2 Feb 2016 10:32:47 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12AWkGl065669; Tue, 2 Feb 2016 10:32:46 GMT (envelope-from skra@FreeBSD.org) Received: (from skra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12AWjTm065663; Tue, 2 Feb 2016 10:32:45 GMT (envelope-from skra@FreeBSD.org) Message-Id: <201602021032.u12AWjTm065663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skra set sender to skra@FreeBSD.org using -f From: Svatopluk Kraus Date: Tue, 2 Feb 2016 10:32:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295143 - in head/sys/arm: annapurna/alpine include mv mv/orion versatile X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 10:32:47 -0000 Author: skra Date: Tue Feb 2 10:32:45 2016 New Revision: 295143 URL: https://svnweb.freebsd.org/changeset/base/295143 Log: Remove all remaining references to old and not more used struct pmap_devmap, pmap_devmap_bootstrap() and pmap_devmap[]. It was replaced in r257660. Modified: head/sys/arm/annapurna/alpine/alpine_machdep.c head/sys/arm/include/pmap-v6.h head/sys/arm/mv/mv_common.c head/sys/arm/mv/mv_machdep.c head/sys/arm/mv/orion/db88f5xxx.c head/sys/arm/versatile/versatile_machdep.c Modified: head/sys/arm/annapurna/alpine/alpine_machdep.c ============================================================================== --- head/sys/arm/annapurna/alpine/alpine_machdep.c Tue Feb 2 10:28:56 2016 (r295142) +++ head/sys/arm/annapurna/alpine/alpine_machdep.c Tue Feb 2 10:32:45 2016 (r295143) @@ -123,7 +123,7 @@ platform_late_init(void) } /* - * Construct pmap_devmap[] with DT-derived config data. + * Construct devmap table with DT-derived config data. */ int platform_devmap_init(void) Modified: head/sys/arm/include/pmap-v6.h ============================================================================== --- head/sys/arm/include/pmap-v6.h Tue Feb 2 10:28:56 2016 (r295142) +++ head/sys/arm/include/pmap-v6.h Tue Feb 2 10:32:45 2016 (r295143) @@ -225,20 +225,6 @@ pmap_map_chunk(vm_offset_t l1pt, vm_offs pmap_preboot_map_attr(pa, va, size, prot, cache); } -/* - * This structure is used by machine-dependent code to describe - * static mappings of devices, created at bootstrap time. - */ -struct pmap_devmap { - vm_offset_t pd_va; /* virtual address */ - vm_paddr_t pd_pa; /* physical address */ - vm_size_t pd_size; /* size of region */ - vm_prot_t pd_prot; /* protection code */ - int pd_cache; /* cache attributes */ -}; - -void pmap_devmap_bootstrap(const struct pmap_devmap *); - #endif /* _KERNEL */ // ----------------- TO BE DELETED --------------------------------------------- Modified: head/sys/arm/mv/mv_common.c ============================================================================== --- head/sys/arm/mv/mv_common.c Tue Feb 2 10:28:56 2016 (r295142) +++ head/sys/arm/mv/mv_common.c Tue Feb 2 10:32:45 2016 (r295143) @@ -377,7 +377,7 @@ soc_id(uint32_t *dev, uint32_t *rev) * Notice: system identifiers are available in the registers range of * PCIE controller, so using this function is only allowed (and * possible) after the internal registers range has been mapped in via - * pmap_devmap_bootstrap(). + * arm_devmap_bootstrap(). */ *dev = bus_space_read_4(fdtbus_bs_tag, MV_PCIE_BASE, 0) >> 16; *rev = bus_space_read_4(fdtbus_bs_tag, MV_PCIE_BASE, 8) & 0xff; Modified: head/sys/arm/mv/mv_machdep.c ============================================================================== --- head/sys/arm/mv/mv_machdep.c Tue Feb 2 10:28:56 2016 (r295142) +++ head/sys/arm/mv/mv_machdep.c Tue Feb 2 10:32:45 2016 (r295143) @@ -337,7 +337,7 @@ __weak_reference(mv_default_fdt_pci_devm */ /* - * Construct pmap_devmap[] with DT-derived config data. + * Construct devmap table with DT-derived config data. */ int platform_devmap_init(void) Modified: head/sys/arm/mv/orion/db88f5xxx.c ============================================================================== --- head/sys/arm/mv/orion/db88f5xxx.c Tue Feb 2 10:28:56 2016 (r295142) +++ head/sys/arm/mv/orion/db88f5xxx.c Tue Feb 2 10:32:45 2016 (r295143) @@ -73,7 +73,7 @@ __FBSDID("$FreeBSD$"); int platform_pci_get_irq(u_int bus, u_int slot, u_int func, u_int pin); /* Static device mappings. */ -const struct pmap_devmap pmap_devmap[] = { +const struct arm_devmap_entry db88f5xxx_devmap[] = { /* * Map the on-board devices VA == PA so that we can access them * with the MMU on or off. Modified: head/sys/arm/versatile/versatile_machdep.c ============================================================================== --- head/sys/arm/versatile/versatile_machdep.c Tue Feb 2 10:28:56 2016 (r295142) +++ head/sys/arm/versatile/versatile_machdep.c Tue Feb 2 10:32:45 2016 (r295143) @@ -88,7 +88,7 @@ static struct arm_devmap_entry fdt_devma /* - * Construct pmap_devmap[] with DT-derived config data. + * Construct devmap table with DT-derived config data. */ int platform_devmap_init(void) From owner-svn-src-all@freebsd.org Tue Feb 2 10:39:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 837A6A98D41; Tue, 2 Feb 2016 10:39:20 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 375611DC8; Tue, 2 Feb 2016 10:39:20 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12AdJ9e066073; Tue, 2 Feb 2016 10:39:19 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12AdJxt066072; Tue, 2 Feb 2016 10:39:19 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201602021039.u12AdJxt066072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 2 Feb 2016 10:39:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295144 - head/sys/boot/efi/libefi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 10:39:20 -0000 Author: andrew Date: Tue Feb 2 10:39:18 2016 New Revision: 295144 URL: https://svnweb.freebsd.org/changeset/base/295144 Log: Add suppor to loader.efi to load files off hte network. For this we need to open the device in exclusive mode as, without this, the firmware may also be reading packets off the interface leading to a race. Reviewed by: emaste Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D4132 Modified: head/sys/boot/efi/libefi/efinet.c Modified: head/sys/boot/efi/libefi/efinet.c ============================================================================== --- head/sys/boot/efi/libefi/efinet.c Tue Feb 2 10:32:45 2016 (r295143) +++ head/sys/boot/efi/libefi/efinet.c Tue Feb 2 10:39:18 2016 (r295144) @@ -184,11 +184,16 @@ efinet_init(struct iodesc *desc, void *m EFI_HANDLE h; EFI_STATUS status; + if (nif->nif_driver->netif_ifs[nif->nif_unit].dif_unit < 0) { + printf("Invalid network interface %d\n", nif->nif_unit); + return; + } + h = nif->nif_driver->netif_ifs[nif->nif_unit].dif_private; status = BS->HandleProtocol(h, &sn_guid, (VOID **)&nif->nif_devdata); if (status != EFI_SUCCESS) { - printf("net%d: cannot start interface (status=%ld)\n", - nif->nif_unit, (long)status); + printf("net%d: cannot start interface (status=%lu)\n", + nif->nif_unit, EFI_ERROR_CODE(status)); return; } @@ -288,11 +293,30 @@ efinet_dev_init() stats = calloc(nifs, sizeof(struct netif_stats)); for (i = 0; i < nifs; i++) { + EFI_SIMPLE_NETWORK *net; + EFI_HANDLE h; + dif = &efinetif.netif_ifs[i]; + dif->dif_unit = -1; + + h = efi_find_handle(&efinet_dev, i); + + /* + * Open the network device in exclusive mode. Without this + * we will be racing with the UEFI network stack. It will + * pull packets off the network leading to lost packets. + */ + status = BS->OpenProtocol(h, &sn_guid, (void **)&net, + IH, 0, EFI_OPEN_PROTOCOL_EXCLUSIVE); + if (status != EFI_SUCCESS) { + printf("Unable to open network interface %d\n", i); + continue; + } + dif->dif_unit = i; dif->dif_nsel = 1; dif->dif_stats = &stats[i]; - dif->dif_private = efi_find_handle(&efinet_dev, i); + dif->dif_private = h; } return (0); From owner-svn-src-all@freebsd.org Tue Feb 2 10:50:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99589A990FF; Tue, 2 Feb 2016 10:50:34 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 530695E4; Tue, 2 Feb 2016 10:50:34 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12AoXIE069201; Tue, 2 Feb 2016 10:50:33 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12AoXgf069196; Tue, 2 Feb 2016 10:50:33 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201602021050.u12AoXgf069196@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Tue, 2 Feb 2016 10:50:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295145 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 10:50:34 -0000 Author: mmel Date: Tue Feb 2 10:50:32 2016 New Revision: 295145 URL: https://svnweb.freebsd.org/changeset/base/295145 Log: ARM: Remove last unused function, cpu_flush_prefetchbuf(), from cpu_functions table. Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/cpufunc_asm_arm11x6.S head/sys/arm/arm/cpufunc_asm_fa526.S head/sys/arm/include/cpufunc.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Tue Feb 2 10:39:18 2016 (r295144) +++ head/sys/arm/arm/cpufunc.c Tue Feb 2 10:50:32 2016 (r295145) @@ -140,7 +140,6 @@ struct cpu_functions arm9_cpufuncs = { /* Other functions */ - cpufunc_nullop, /* flush_prefetchbuf */ armv4_drain_writebuf, /* drain_writebuf */ (void *)cpufunc_nullop, /* sleep */ @@ -194,7 +193,6 @@ struct cpu_functions armv5_ec_cpufuncs = /* Other functions */ - cpufunc_nullop, /* flush_prefetchbuf */ armv4_drain_writebuf, /* drain_writebuf */ (void *)cpufunc_nullop, /* sleep */ @@ -246,7 +244,6 @@ struct cpu_functions sheeva_cpufuncs = { /* Other functions */ - cpufunc_nullop, /* flush_prefetchbuf */ armv4_drain_writebuf, /* drain_writebuf */ sheeva_cpu_sleep, /* sleep */ @@ -298,7 +295,6 @@ struct cpu_functions pj4bv7_cpufuncs = { /* Other functions */ - cpufunc_nullop, /* flush_prefetchbuf */ armv7_drain_writebuf, /* drain_writebuf */ (void *)cpufunc_nullop, /* sleep */ @@ -352,7 +348,6 @@ struct cpu_functions xscale_cpufuncs = { /* Other functions */ - cpufunc_nullop, /* flush_prefetchbuf */ armv4_drain_writebuf, /* drain_writebuf */ xscale_cpu_sleep, /* sleep */ @@ -406,7 +401,6 @@ struct cpu_functions xscalec3_cpufuncs = /* Other functions */ - cpufunc_nullop, /* flush_prefetchbuf */ armv4_drain_writebuf, /* drain_writebuf */ xscale_cpu_sleep, /* sleep */ @@ -459,7 +453,6 @@ struct cpu_functions fa526_cpufuncs = { /* Other functions */ - fa526_flush_prefetchbuf, /* flush_prefetchbuf */ armv4_drain_writebuf, /* drain_writebuf */ fa526_cpu_sleep, /* sleep */ @@ -513,7 +506,6 @@ struct cpu_functions arm1176_cpufuncs = /* Other functions */ - arm11x6_flush_prefetchbuf, /* flush_prefetchbuf */ arm11_drain_writebuf, /* drain_writebuf */ arm11x6_sleep, /* sleep */ @@ -574,7 +566,6 @@ struct cpu_functions cortexa_cpufuncs = /* Other functions */ - cpufunc_nullop, /* flush_prefetchbuf */ armv7_drain_writebuf, /* drain_writebuf */ armv7_cpu_sleep, /* sleep */ Modified: head/sys/arm/arm/cpufunc_asm_arm11x6.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_arm11x6.S Tue Feb 2 10:39:18 2016 (r295144) +++ head/sys/arm/arm/cpufunc_asm_arm11x6.S Tue Feb 2 10:50:32 2016 (r295145) @@ -138,11 +138,6 @@ ENTRY_NP(arm11x6_icache_sync_all) RET END(arm11x6_icache_sync_all) -ENTRY_NP(arm11x6_flush_prefetchbuf) - mcr p15, 0, r0, c7, c5, 4 /* Flush Prefetch Buffer */ - RET -END(arm11x6_flush_prefetchbuf) - ENTRY_NP(arm11x6_icache_sync_range) add r1, r1, r0 sub r1, r1, #1 Modified: head/sys/arm/arm/cpufunc_asm_fa526.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_fa526.S Tue Feb 2 10:39:18 2016 (r295144) +++ head/sys/arm/arm/cpufunc_asm_fa526.S Tue Feb 2 10:50:32 2016 (r295145) @@ -72,12 +72,6 @@ ENTRY(fa526_cpu_sleep) mov pc, lr END(fa526_cpu_sleep) -ENTRY(fa526_flush_prefetchbuf) - mov r0, #0 - mcr p15, 0, r0, c7, c5, 4 /* Pre-fetch flush */ - mov pc, lr -END(fa526_flush_prefetchbuf) - /* * Cache functions */ Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Tue Feb 2 10:39:18 2016 (r295144) +++ head/sys/arm/include/cpufunc.h Tue Feb 2 10:50:32 2016 (r295145) @@ -149,7 +149,6 @@ struct cpu_functions { /* Other functions */ - void (*cf_flush_prefetchbuf) (void); void (*cf_drain_writebuf) (void); void (*cf_sleep) (int mode); @@ -191,7 +190,6 @@ extern u_int cputype; #define cpu_l2cache_wbinv_range(a, s) cpufuncs.cf_l2cache_wbinv_range((a), (s)) #define cpu_l2cache_drain_writebuf() cpufuncs.cf_l2cache_drain_writebuf() -#define cpu_flush_prefetchbuf() cpufuncs.cf_flush_prefetchbuf() #define cpu_drain_writebuf() cpufuncs.cf_drain_writebuf() #define cpu_sleep(m) cpufuncs.cf_sleep(m) @@ -215,7 +213,6 @@ void fa526_setttb (u_int ttb); void fa526_context_switch (void); void fa526_cpu_sleep (int); void fa526_tlb_flushID_SE (u_int); -void fa526_flush_prefetchbuf (void); void fa526_icache_sync_all (void); void fa526_icache_sync_range(vm_offset_t start, vm_size_t end); @@ -327,7 +324,6 @@ void arm11x6_setttb void arm11x6_idcache_wbinv_all (void); void arm11x6_dcache_wbinv_all (void); void arm11x6_icache_sync_all (void); -void arm11x6_flush_prefetchbuf (void); void arm11x6_icache_sync_range (vm_offset_t, vm_size_t); void arm11x6_idcache_wbinv_range (vm_offset_t, vm_size_t); void arm11x6_setup (void); From owner-svn-src-all@freebsd.org Tue Feb 2 11:36:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5EF8A98051; Tue, 2 Feb 2016 11:36:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 811E11D2C; Tue, 2 Feb 2016 11:36:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12BawrQ084091; Tue, 2 Feb 2016 11:36:58 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12BawA9084088; Tue, 2 Feb 2016 11:36:58 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201602021136.u12BawA9084088@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 2 Feb 2016 11:36:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295146 - in head/contrib/ofed/librdmacm/examples/build: cmatose mckey udaddy X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 11:36:59 -0000 Author: hselasky Date: Tue Feb 2 11:36:58 2016 New Revision: 295146 URL: https://svnweb.freebsd.org/changeset/base/295146 Log: Use LIBADD instead of LDADD. Sponsored by: Mellanox Technologies Modified: head/contrib/ofed/librdmacm/examples/build/cmatose/Makefile head/contrib/ofed/librdmacm/examples/build/mckey/Makefile head/contrib/ofed/librdmacm/examples/build/udaddy/Makefile Modified: head/contrib/ofed/librdmacm/examples/build/cmatose/Makefile ============================================================================== --- head/contrib/ofed/librdmacm/examples/build/cmatose/Makefile Tue Feb 2 10:50:32 2016 (r295145) +++ head/contrib/ofed/librdmacm/examples/build/cmatose/Makefile Tue Feb 2 11:36:58 2016 (r295146) @@ -5,7 +5,6 @@ PROG= cmatose MAN= SRCS= cmatose.c -LDADD+= -libverbs -lrdmacm -lpthread -LDADD+= -lmlx4 +LIBADD= ibverbs rdmacm pthread mlx4 .include Modified: head/contrib/ofed/librdmacm/examples/build/mckey/Makefile ============================================================================== --- head/contrib/ofed/librdmacm/examples/build/mckey/Makefile Tue Feb 2 10:50:32 2016 (r295145) +++ head/contrib/ofed/librdmacm/examples/build/mckey/Makefile Tue Feb 2 11:36:58 2016 (r295146) @@ -5,7 +5,6 @@ PROG= mckey MAN= SRCS= mckey.c -LDADD+= -libverbs -lrdmacm -lpthread -LDADD+= -lmlx4 +LIBADD= ibverbs rdmacm pthread mlx4 .include Modified: head/contrib/ofed/librdmacm/examples/build/udaddy/Makefile ============================================================================== --- head/contrib/ofed/librdmacm/examples/build/udaddy/Makefile Tue Feb 2 10:50:32 2016 (r295145) +++ head/contrib/ofed/librdmacm/examples/build/udaddy/Makefile Tue Feb 2 11:36:58 2016 (r295146) @@ -5,7 +5,6 @@ PROG= udaddy MAN= SRCS= udaddy.c -LDADD+= -libverbs -lrdmacm -lpthread -LDADD+= -lmlx4 +LIBADD= ibverbs rdmacm pthread mlx4 .include From owner-svn-src-all@freebsd.org Tue Feb 2 11:51:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5ED22A986C0; Tue, 2 Feb 2016 11:51:20 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2946490B; Tue, 2 Feb 2016 11:51:20 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12BpJWV087809; Tue, 2 Feb 2016 11:51:19 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12BpJY7087808; Tue, 2 Feb 2016 11:51:19 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201602021151.u12BpJY7087808@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Tue, 2 Feb 2016 11:51:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295147 - head/bin/csh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 11:51:20 -0000 Author: ume Date: Tue Feb 2 11:51:18 2016 New Revision: 295147 URL: https://svnweb.freebsd.org/changeset/base/295147 Log: Make dynamic link of libiconv from ports work again. The symbols of libiconv from ports were changed to have prefixed. Since we have iconv in our libc these days, we don't need it on 10.X and later. However, 9.X still need this. Spotted by: Yoshihiko Sarumaru MFC after: 1 days Modified: head/bin/csh/iconv_stub.c Modified: head/bin/csh/iconv_stub.c ============================================================================== --- head/bin/csh/iconv_stub.c Tue Feb 2 11:36:58 2016 (r295146) +++ head/bin/csh/iconv_stub.c Tue Feb 2 11:51:18 2016 (r295147) @@ -36,9 +36,9 @@ #undef iconv_close #define ICONVLIB "libiconv.so" -#define ICONV_ENGINE "iconv" -#define ICONV_OPEN "iconv_open" -#define ICONV_CLOSE "iconv_close" +#define ICONV_ENGINE "libiconv" +#define ICONV_OPEN "libiconv_open" +#define ICONV_CLOSE "libiconv_close" typedef iconv_t iconv_open_t(const char *, const char *); From owner-svn-src-all@freebsd.org Tue Feb 2 12:42:42 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC048A76ABA; Tue, 2 Feb 2016 12:42:41 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B49EBEAC; Tue, 2 Feb 2016 12:42:40 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id d2bc563e; Tue, 2 Feb 2016 13:35:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=eG35VYTCw+FydPDqC1e9xcFyN2g=; b=OJn8SvNHDX8gGi80ncYvn1MDr4ss mhvZF2s8/vzvv6jl708mMjdHg0a+J6DvfVQBeoqoGdSFqJXPGM3JVzvoLtimZtj5 aVah1e6xvQ2JSDwOWTmWluwoTparFT8jZvNG2cs3NoOzMwVTmBsXqray/la9/bdW JU8gXrd9C8M5ZlA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=X2mbftO4nQNZc+1BXcXlJViaIianT2j4d9TfYCYU2osJbqSCKbw1Kk61 IbZupcZl05nrz4FTO46NHfrPrgVccIGLFd1MPZAgIA1X3D04GE9g5vN7kzqVLp4Y GUJrCzIhYEn4lp3r50Kp8XzQLGqfj510F9NQCkQ+GZ4Xal66X8c= Received: from atlantis.staff.bocal.org (163.5.250.138 [163.5.250.138]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 02cb9a33 TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO; Tue, 2 Feb 2016 13:35:56 +0100 (CET) Date: Tue, 2 Feb 2016 13:35:56 +0100 From: Emmanuel Vadot To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r295144 - head/sys/boot/efi/libefi Message-Id: <20160202133556.72ca80c30c159ce5c7b54116@bidouilliste.com> In-Reply-To: <201602021039.u12AdJxt066072@repo.freebsd.org> References: <201602021039.u12AdJxt066072@repo.freebsd.org> X-Mailer: Sylpheed 3.4.3 (GTK+ 2.24.29; amd64-portbld-freebsd10.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 12:42:42 -0000 I cannot netboot loader.efi anymore now. Consoles: EFI console Unable to open network interface 1 Unable to open network interface 2 ... panic: netboot: no interfaces left untried Netboot loader.efi works before even if loading the kernel was really really slow. On Tue, 2 Feb 2016 10:39:19 +0000 (UTC) Andrew Turner wrote: > Author: andrew > Date: Tue Feb 2 10:39:18 2016 > New Revision: 295144 > URL: https://svnweb.freebsd.org/changeset/base/295144 > > Log: > Add suppor to loader.efi to load files off hte network. For this we need > to open the device in exclusive mode as, without this, the firmware may > also be reading packets off the interface leading to a race. > > Reviewed by: emaste > Sponsored by: ABT Systems Ltd > Differential Revision: https://reviews.freebsd.org/D4132 > > Modified: > head/sys/boot/efi/libefi/efinet.c > > Modified: head/sys/boot/efi/libefi/efinet.c > ============================================================================== > --- head/sys/boot/efi/libefi/efinet.c Tue Feb 2 10:32:45 2016 (r295143) > +++ head/sys/boot/efi/libefi/efinet.c Tue Feb 2 10:39:18 2016 (r295144) > @@ -184,11 +184,16 @@ efinet_init(struct iodesc *desc, void *m > EFI_HANDLE h; > EFI_STATUS status; > > + if (nif->nif_driver->netif_ifs[nif->nif_unit].dif_unit < 0) { > + printf("Invalid network interface %d\n", nif->nif_unit); > + return; > + } > + > h = nif->nif_driver->netif_ifs[nif->nif_unit].dif_private; > status = BS->HandleProtocol(h, &sn_guid, (VOID **)&nif->nif_devdata); > if (status != EFI_SUCCESS) { > - printf("net%d: cannot start interface (status=%ld)\n", > - nif->nif_unit, (long)status); > + printf("net%d: cannot start interface (status=%lu)\n", > + nif->nif_unit, EFI_ERROR_CODE(status)); > return; > } > > @@ -288,11 +293,30 @@ efinet_dev_init() > stats = calloc(nifs, sizeof(struct netif_stats)); > > for (i = 0; i < nifs; i++) { > + EFI_SIMPLE_NETWORK *net; > + EFI_HANDLE h; > + > dif = &efinetif.netif_ifs[i]; > + dif->dif_unit = -1; > + > + h = efi_find_handle(&efinet_dev, i); > + > + /* > + * Open the network device in exclusive mode. Without this > + * we will be racing with the UEFI network stack. It will > + * pull packets off the network leading to lost packets. > + */ > + status = BS->OpenProtocol(h, &sn_guid, (void **)&net, > + IH, 0, EFI_OPEN_PROTOCOL_EXCLUSIVE); > + if (status != EFI_SUCCESS) { > + printf("Unable to open network interface %d\n", i); > + continue; > + } > + > dif->dif_unit = i; > dif->dif_nsel = 1; > dif->dif_stats = &stats[i]; > - dif->dif_private = efi_find_handle(&efinet_dev, i); > + dif->dif_private = h; > } > > return (0); > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" -- Emmanuel Vadot From owner-svn-src-all@freebsd.org Tue Feb 2 14:16:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C49CA9931D; Tue, 2 Feb 2016 14:16:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD224973; Tue, 2 Feb 2016 14:16:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12EG7Wf030899; Tue, 2 Feb 2016 14:16:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12EG7SJ030897; Tue, 2 Feb 2016 14:16:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201602021416.u12EG7SJ030897@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 2 Feb 2016 14:16:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295148 - in stable/10/sys: amd64/amd64 i386/isa X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 14:16:09 -0000 Author: kib Date: Tue Feb 2 14:16:07 2016 New Revision: 295148 URL: https://svnweb.freebsd.org/changeset/base/295148 Log: MFC r294311: Clear whole XMM register file instead of only XMM0. Also clear x87 registers. This brings amd64 on par with i386, providing consistent initial FPU state. PR: 206370 MFC r294312: Use ANSI definitions. Wrap long line. MFC r294313: Adjust i386 comment to match amd64 one after r294311. Approved by: re (gjb) Modified: stable/10/sys/amd64/amd64/fpu.c stable/10/sys/i386/isa/npx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/fpu.c ============================================================================== --- stable/10/sys/amd64/amd64/fpu.c Tue Feb 2 11:51:18 2016 (r295147) +++ stable/10/sys/amd64/amd64/fpu.c Tue Feb 2 14:16:07 2016 (r295148) @@ -318,13 +318,15 @@ fpuinitstate(void *arg __unused) cpu_mxcsr_mask = 0xFFBF; /* - * The fninit instruction does not modify XMM registers. The - * fpusave call dumped the garbage contained in the registers - * after reset to the initial state saved. Clear XMM - * registers file image to make the startup program state and - * signal handler XMM register content predictable. + * The fninit instruction does not modify XMM registers or x87 + * registers (MM/ST). The fpusave call dumped the garbage + * contained in the registers after reset to the initial state + * saved. Clear XMM and x87 registers file image to make the + * startup program state and signal handler XMM/x87 register + * content predictable. */ - bzero(&fpu_initialstate->sv_xmm[0], sizeof(struct xmmacc)); + bzero(fpu_initialstate->sv_fp, sizeof(fpu_initialstate->sv_fp)); + bzero(fpu_initialstate->sv_xmm, sizeof(fpu_initialstate->sv_xmm)); /* * Create a table describing the layout of the CPU Extended @@ -375,7 +377,7 @@ fpuexit(struct thread *td) } int -fpuformat() +fpuformat(void) { return (_MC_FPFMT_XMM); @@ -661,7 +663,8 @@ fpudna(void) * fpu_initialstate, to ignite the XSAVEOPT * tracking engine. */ - bcopy(fpu_initialstate, curpcb->pcb_save, cpu_max_ext_state_size); + bcopy(fpu_initialstate, curpcb->pcb_save, + cpu_max_ext_state_size); fpurestore(curpcb->pcb_save); if (curpcb->pcb_initial_fpucw != __INITIAL_FPUCW__) fldcw(curpcb->pcb_initial_fpucw); @@ -676,7 +679,7 @@ fpudna(void) } void -fpudrop() +fpudrop(void) { struct thread *td; Modified: stable/10/sys/i386/isa/npx.c ============================================================================== --- stable/10/sys/i386/isa/npx.c Tue Feb 2 11:51:18 2016 (r295147) +++ stable/10/sys/i386/isa/npx.c Tue Feb 2 14:16:07 2016 (r295148) @@ -503,11 +503,12 @@ npxinitstate(void *arg __unused) /* * The fninit instruction does not modify XMM - * registers. The fpusave call dumped the garbage - * contained in the registers after reset to the - * initial state saved. Clear XMM registers file - * image to make the startup program state and signal - * handler XMM register content predictable. + * registers or x87 registers (MM/ST). The fpusave + * call dumped the garbage contained in the registers + * after reset to the initial state saved. Clear XMM + * and x87 registers file image to make the startup + * program state and signal handler XMM/x87 register + * content predictable. */ bzero(npx_initialstate->sv_xmm.sv_fp, sizeof(npx_initialstate->sv_xmm.sv_fp)); From owner-svn-src-all@freebsd.org Tue Feb 2 14:53:35 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C03E7A98137; Tue, 2 Feb 2016 14:53:35 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BDD6113; Tue, 2 Feb 2016 14:53:35 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12ErYf1042437; Tue, 2 Feb 2016 14:53:34 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12ErYal042433; Tue, 2 Feb 2016 14:53:34 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201602021453.u12ErYal042433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Tue, 2 Feb 2016 14:53:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295149 - in head/sys: arm/arm arm/include conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 14:53:35 -0000 Author: mmel Date: Tue Feb 2 14:53:34 2016 New Revision: 295149 URL: https://svnweb.freebsd.org/changeset/base/295149 Log: ARM: All remaining functions in cpufunc_asm_arm10.S are identical with functions in cpufunc_asm_arm9.S. Use arm9 variants and remove cpufunc_asm_arm10.S completly. Deleted: head/sys/arm/arm/cpufunc_asm_arm10.S Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/include/cpufunc.h head/sys/conf/Makefile.arm head/sys/conf/files.arm Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Tue Feb 2 14:16:07 2016 (r295148) +++ head/sys/arm/arm/cpufunc.c Tue Feb 2 14:53:34 2016 (r295149) @@ -167,7 +167,7 @@ struct cpu_functions armv5_ec_cpufuncs = /* TLB functions */ armv4_tlb_flushID, /* tlb_flushID */ - arm10_tlb_flushID_SE, /* tlb_flushID_SE */ + arm9_tlb_flushID_SE, /* tlb_flushID_SE */ armv4_tlb_flushD, /* tlb_flushD */ armv4_tlb_flushD_SE, /* tlb_flushD_SE */ @@ -199,7 +199,7 @@ struct cpu_functions armv5_ec_cpufuncs = /* Soft functions */ - arm10_context_switch, /* context_switch */ + arm9_context_switch, /* context_switch */ arm10_setup /* cpu setup */ @@ -218,7 +218,7 @@ struct cpu_functions sheeva_cpufuncs = { /* TLB functions */ armv4_tlb_flushID, /* tlb_flushID */ - arm10_tlb_flushID_SE, /* tlb_flushID_SE */ + arm9_tlb_flushID_SE, /* tlb_flushID_SE */ armv4_tlb_flushD, /* tlb_flushD */ armv4_tlb_flushD_SE, /* tlb_flushD_SE */ @@ -250,7 +250,7 @@ struct cpu_functions sheeva_cpufuncs = { /* Soft functions */ - arm10_context_switch, /* context_switch */ + arm9_context_switch, /* context_switch */ arm10_setup /* cpu setup */ }; Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Tue Feb 2 14:16:07 2016 (r295148) +++ head/sys/arm/include/cpufunc.h Tue Feb 2 14:53:34 2016 (r295149) @@ -225,11 +225,13 @@ void fa526_idcache_wbinv_range(vm_offset #endif -#ifdef CPU_ARM9 +#if defined(CPU_ARM9) || defined(CPU_ARM9E) void arm9_setttb (u_int); - void arm9_tlb_flushID_SE (u_int va); +void arm9_context_switch (void); +#endif +#if defined(CPU_ARM9) void arm9_icache_sync_all (void); void arm9_icache_sync_range (vm_offset_t, vm_size_t); @@ -241,8 +243,6 @@ void arm9_dcache_wb_range (vm_offset_t, void arm9_idcache_wbinv_all (void); void arm9_idcache_wbinv_range (vm_offset_t, vm_size_t); -void arm9_context_switch (void); - void arm9_setup (void); extern unsigned arm9_dcache_sets_max; @@ -252,10 +252,6 @@ extern unsigned arm9_dcache_index_inc; #endif #if defined(CPU_ARM9E) -void arm10_tlb_flushID_SE (u_int); - -void arm10_context_switch (void); - void arm10_setup (void); u_int sheeva_control_ext (u_int, u_int); Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Tue Feb 2 14:16:07 2016 (r295148) +++ head/sys/conf/Makefile.arm Tue Feb 2 14:53:34 2016 (r295149) @@ -68,7 +68,6 @@ SYSTEM_LD_TAIL +=;sed s/" + SIZEOF_HEADE FILES_CPU_FUNC = \ $S/$M/$M/cpufunc_asm_arm9.S \ - $S/$M/$M/cpufunc_asm_arm10.S \ $S/$M/$M/cpufunc_asm_xscale.S $S/$M/$M/cpufunc_asm.S \ $S/$M/$M/cpufunc_asm_xscale_c3.S $S/$M/$M/cpufunc_asm_armv5_ec.S \ $S/$M/$M/cpufunc_asm_fa526.S $S/$M/$M/cpufunc_asm_sheeva.S \ Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Tue Feb 2 14:16:07 2016 (r295148) +++ head/sys/conf/files.arm Tue Feb 2 14:53:34 2016 (r295149) @@ -11,8 +11,7 @@ arm/arm/busdma_machdep-v6.c optional ar arm/arm/copystr.S standard arm/arm/cpufunc.c standard arm/arm/cpufunc_asm.S standard -arm/arm/cpufunc_asm_arm9.S optional cpu_arm9 -arm/arm/cpufunc_asm_arm10.S optional cpu_arm9e +arm/arm/cpufunc_asm_arm9.S optional cpu_arm9 | cpu_arm9e arm/arm/cpufunc_asm_arm11.S optional cpu_arm1176 arm/arm/cpufunc_asm_arm11x6.S optional cpu_arm1176 arm/arm/cpufunc_asm_armv4.S optional cpu_arm9 | cpu_arm9e | cpu_fa526 | cpu_xscale_80321 | cpu_xscale_pxa2x0 | cpu_xscale_ixp425 | cpu_xscale_80219 | cpu_xscale_81342 From owner-svn-src-all@freebsd.org Tue Feb 2 16:00:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0846CA97DCB; Tue, 2 Feb 2016 16:00:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B738BAFF; Tue, 2 Feb 2016 16:00:43 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12G0g9m060982; Tue, 2 Feb 2016 16:00:42 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12G0gGt060981; Tue, 2 Feb 2016 16:00:42 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201602021600.u12G0gGt060981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 2 Feb 2016 16:00:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295150 - head/sys/mips/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 16:00:44 -0000 Author: adrian Date: Tue Feb 2 16:00:42 2016 New Revision: 295150 URL: https://svnweb.freebsd.org/changeset/base/295150 Log: Move MIPS32 Release 2 and Release 3 CPUs to use the EHB instruction for clearing hazards. This revision makes currently known MIPS32 Release 2 and Release 3 CPUs use the EHB instruction when clearing hazards. So far the MIPS 74K and MIPS1004K (somewhat) were already using the EHB. Now we add more r2 and r3 CPUs to this list. Also, for the cases of MIPS coherent processing systems (currently 1004K, 1074K, interAptiv and proAptiv) - define proper CCA attributes. Submitted by: Stanislav Galabov Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D5078 Modified: head/sys/mips/include/cpuregs.h Modified: head/sys/mips/include/cpuregs.h ============================================================================== --- head/sys/mips/include/cpuregs.h Tue Feb 2 14:53:34 2016 (r295149) +++ head/sys/mips/include/cpuregs.h Tue Feb 2 16:00:42 2016 (r295150) @@ -110,6 +110,7 @@ * C: Cacheable, coherency unspecified. * CNC: Cacheable non-coherent. * CC: Cacheable coherent. + * CCS: Cacheable coherent, shared read. * CCE: Cacheable coherent, exclusive read. * CCEW: Cacheable coherent, exclusive write. * CCUOW: Cacheable coherent, update on write. @@ -154,9 +155,20 @@ #define MIPS_CCA_CACHED 0x03 #endif -#if defined(CPU_MIPS1004K) -#define MIPS_CCA_UNCACHED 0x02 -#define MIPS_CCA_CACHED 0x05 +/* + * 1004K and 1074K cores, as well as interAptiv and proAptiv cores, support + * Cacheable Coherent CCAs 0x04 and 0x05, as well as Cacheable non-Coherent + * CCA 0x03 and Uncached Accelerated CCA 0x07 + */ +#if defined(CPU_MIPS1004K) || defined(CPU_MIPS1074K) || \ + defined(CPU_INTERAPTIV) || defined(CPU_PROAPTIV) +#define MIPS_CCA_CNC 0x03 +#define MIPS_CCA_CCE 0x04 +#define MIPS_CCA_CCS 0x05 +#define MIPS_CCA_UA 0x07 + +/* We use shared read CCA for CACHED CCA */ +#define MIPS_CCA_CACHED MIPS_CCA_CCS #endif #ifndef MIPS_CCA_UNCACHED @@ -214,8 +226,18 @@ #define COP0_SYNC .word 0xc0 /* ehb */ #elif defined(CPU_SB1) #define COP0_SYNC ssnop; ssnop; ssnop; ssnop; ssnop; ssnop; ssnop; ssnop; ssnop -#elif defined(CPU_MIPS74K) || defined(CPU_MIPS1004K) -#define COP0_SYNC .word 0xc0 /* ehb */ +#elif defined(CPU_MIPS24K) || defined(CPU_MIPS34K) || \ + defined(CPU_MIPS74K) || defined(CPU_MIPS1004K) || \ + defined(CPU_MIPS1074K) || defined(CPU_INTERAPTIV) || \ + defined(CPU_PROAPTIV) +/* + * According to MIPS32tm Architecture for Programmers, Vol.II, rev. 2.00: + * "As EHB becomes standard in MIPS implementations, the previous SSNOPs can be + * removed, leaving only the EHB". + * Also, all MIPS32 Release 2 implementations have the EHB instruction, which + * resolves all execution hazards. The same goes for MIPS32 Release 3. + */ +#define COP0_SYNC .word 0xc0 /* ehb */ #else /* * Pick a reasonable default based on the "typical" spacing described in the From owner-svn-src-all@freebsd.org Tue Feb 2 16:12:41 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DEE87A983AA; Tue, 2 Feb 2016 16:12:40 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pa0-x232.google.com (mail-pa0-x232.google.com [IPv6:2607:f8b0:400e:c03::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE7A71593; Tue, 2 Feb 2016 16:12:40 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by mail-pa0-x232.google.com with SMTP id uo6so103102453pac.1; Tue, 02 Feb 2016 08:12:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:reply-to:subject:references:to:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=U3snnUyJbIoxLbRjPWFU8dTOCRdZOejKC6uOsE27Qc4=; b=DTL+ptIvSA7/fIi+jOCE3Bz9/RhHBbY5Afi6WTKI/o1dDIOH5KUBMZqisl0OZmpy8X 82RwyzFIS62KRENVvLbGUjEEOkpf/nmfjwL63zJYAKrTjzRlPiss5Byu1Cd07biYOdJz wROZPaJcjtSq76N5fks5aVNUVc4V86LnxFGqSzeINdbufmVXPm4DTxed98yr+qia0BWV n2K9tJQ4n40h8QWHDu1ykKTmxt4gak6eNVLG2wy91U5uFUfM4lak3IW7dtPssJk6JFg1 E6je/P8Wz+g9UzD0ej0+wSGDP9Xt6DGs5J8Ha7SNIQD8FQeUo/Q8nEKBoMfl3PJcUcpB Ao5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:reply-to:subject:references:to:cc:from :message-id:date:user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=U3snnUyJbIoxLbRjPWFU8dTOCRdZOejKC6uOsE27Qc4=; b=QC/sPfx1igS02TXE2W3rjFSW0ZICUxNTuEE3vZhcl6k3tJNGA0HbTPI4ffjEfvLuZo OgfNSsiWTVpId7fOqCvVDqTE9bbEbZYJGKo3uXk3CGJC8Rqudu4WBPP1U1j5io6CvUgj iYbMcZ7Gc3QOcJPR9n6IatvL+FLaaWHgWmJBvLsdYdf+4ZvgWeYNGylojBVvQNQqZaYm jN3BB7gAm/rZaBy868oOojMmUnbX5R2gsyzMoOmouzL/WNs97HLeVVrf08c1Jht6Ek3B 4gITQxBh915b5DwXS42QxM12ObPc3Z/0UtFCyxTlbzREigct8NFzLOHs97TmaplPysdn J53Q== X-Gm-Message-State: AG10YORK2PAok3mTy3g7yHkbkLaE2Y+lxhZbY30oMVzmRERpaLETEmKsSO0pcxjRB6bvCw== X-Received: by 10.66.155.167 with SMTP id vx7mr48427923pab.109.1454429558959; Tue, 02 Feb 2016 08:12:38 -0800 (PST) Received: from ?IPv6:2001:44b8:31ae:7b01:4c01:5dfa:1e09:7219? (2001-44b8-31ae-7b01-4c01-5dfa-1e09-7219.static.ipv6.internode.on.net. [2001:44b8:31ae:7b01:4c01:5dfa:1e09:7219]) by smtp.gmail.com with ESMTPSA id c9sm3628297pfd.90.2016.02.02.08.12.36 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Feb 2016 08:12:38 -0800 (PST) Sender: Kubilay Kocak Reply-To: koobs@FreeBSD.org Subject: Re: svn commit: r294778 - in head: lib/libc/sys sys/kern References: <201601260757.u0Q7viGW029949@repo.freebsd.org> <56A73806.4080800@FreeBSD.org> <20160126204713.P1692@besplex.bde.org> To: Bruce Evans Cc: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Kubilay Kocak Message-ID: <56B0D56E.6000501@FreeBSD.org> Date: Wed, 3 Feb 2016 03:12:30 +1100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Thunderbird/44.0 MIME-Version: 1.0 In-Reply-To: <20160126204713.P1692@besplex.bde.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 16:12:41 -0000 On 26/01/2016 10:38 PM, Bruce Evans wrote: > On Tue, 26 Jan 2016, Kubilay Kocak wrote: > >>> Log: >>> Restore flushing of output for revoke(2) again. Document revoke()'s >>> intended behaviour in its man page. Simplify tty_drain() to match. >>> Don't call ttydevsw methods in tty_flush() if the device is gone >>> since we now sometimes call it then. >>> ... >>> This was first broken then fixed in 1995. I changed only the tty >>> ... >> >> Seems like >> >>> This was next broken in 1997 then fixed in 1998. Importing Lite2 made >>> ... >> >> A fantastic >> >>> This was next broken in 2008 by replacing everything in tty.c and not >>> ... >> >> Regression test candidate :) >> >>> It is now possible to fix this better using the new FREVOKE flag. > > Regression tests for devices are difficult to write and more difficult > to run. Simpler for ttys than for networking or disks, but you still > need at least 2 generic tty ports just to test things that are not > very related to hardware. Of course, though perhaps mocking external subsystems/components is something we could do, as is relatively standard for testing only the code you want to cover, rather than (requiring) the entire integration. > Bugs in flushing and draining are sometimes obvious by observing if > echo 123 >/dev/ttyXx works when it should fail or fails when it should > work. > > For more arcane bugs, I use the old NIST POSIX test suite. This is > badly written and hard to use and not very complete, but it finds about > 30 regressions between FreeBSD-5 and FreeBSD-9. 30 over-counts for error > cascades but undercounts for blocking and some other timing bugs, and > of course strict POSIX tests don't get near FreeBSD features like > revoke() or bidrectional devices. > > Bruce From owner-svn-src-all@freebsd.org Tue Feb 2 16:22:37 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 141A3A98776; Tue, 2 Feb 2016 16:22:37 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0CFA1BF5; Tue, 2 Feb 2016 16:22:36 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12GMZFR069600; Tue, 2 Feb 2016 16:22:35 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12GMZPl069599; Tue, 2 Feb 2016 16:22:35 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201602021622.u12GMZPl069599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 2 Feb 2016 16:22:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295151 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 16:22:37 -0000 Author: adrian Date: Tue Feb 2 16:22:35 2016 New Revision: 295151 URL: https://svnweb.freebsd.org/changeset/base/295151 Log: Use CPU_MIPS24K now in AR933x based boards. I'll flip on other boards as i test them. Tested: * AR9331, Carambola 2 Modified: head/sys/mips/conf/AR933X_BASE Modified: head/sys/mips/conf/AR933X_BASE ============================================================================== --- head/sys/mips/conf/AR933X_BASE Tue Feb 2 16:00:42 2016 (r295150) +++ head/sys/mips/conf/AR933X_BASE Tue Feb 2 16:22:35 2016 (r295151) @@ -12,7 +12,7 @@ machine mips mips ident AR933X_BASE -cpu CPU_MIPS4KC +cpu CPU_MIPS24K makeoptions KERNLOADADDR=0x80050000 options HZ=1000 From owner-svn-src-all@freebsd.org Tue Feb 2 16:25:54 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B41A0A988AB; Tue, 2 Feb 2016 16:25:54 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 847801DC9; Tue, 2 Feb 2016 16:25:54 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12GPr90069748; Tue, 2 Feb 2016 16:25:53 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12GPr98069747; Tue, 2 Feb 2016 16:25:53 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201602021625.u12GPr98069747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 2 Feb 2016 16:25:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295152 - head/sys/mips/rt305x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 16:25:54 -0000 Author: adrian Date: Tue Feb 2 16:25:53 2016 New Revision: 295152 URL: https://svnweb.freebsd.org/changeset/base/295152 Log: Use MIPS24K now. Submitted by: Stanislav Galabov Differential Revision: https://reviews.freebsd.org/D5079 Modified: head/sys/mips/rt305x/std.rt305x Modified: head/sys/mips/rt305x/std.rt305x ============================================================================== --- head/sys/mips/rt305x/std.rt305x Tue Feb 2 16:22:35 2016 (r295151) +++ head/sys/mips/rt305x/std.rt305x Tue Feb 2 16:25:53 2016 (r295152) @@ -3,5 +3,5 @@ files "../rt305x/files.rt305x" -cpu CPU_MIPS4KC +cpu CPU_MIPS24K From owner-svn-src-all@freebsd.org Tue Feb 2 16:32:45 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC283A98C0A; Tue, 2 Feb 2016 16:32:45 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B27532C; Tue, 2 Feb 2016 16:32:45 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12GWi5Q072568; Tue, 2 Feb 2016 16:32:44 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12GWi7f072567; Tue, 2 Feb 2016 16:32:44 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201602021632.u12GWi7f072567@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 2 Feb 2016 16:32:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295153 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 16:32:45 -0000 Author: andrew Date: Tue Feb 2 16:32:44 2016 New Revision: 295153 URL: https://svnweb.freebsd.org/changeset/base/295153 Log: Only look for the ranges property when we have children. This fixes booting on systems with a gicv2, but no PCIe so no gicv2m. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/arm64/gic_fdt.c Modified: head/sys/arm64/arm64/gic_fdt.c ============================================================================== --- head/sys/arm64/arm64/gic_fdt.c Tue Feb 2 16:25:53 2016 (r295152) +++ head/sys/arm64/arm64/gic_fdt.c Tue Feb 2 16:32:44 2016 (r295153) @@ -158,12 +158,17 @@ arm_gic_fdt_attach(device_t dev) OF_getencprop(root, "#size-cells", &sc->sc_size_cells, sizeof(sc->sc_size_cells)); + /* If we have no children don't probe for them */ + child = OF_child(root); + if (child == 0) + return (0); + if (gic_fill_ranges(root, sc) < 0) { device_printf(dev, "could not get ranges\n"); return (ENXIO); } - for (child = OF_child(root); child != 0; child = OF_peer(child)) { + for (; child != 0; child = OF_peer(child)) { dinfo = malloc(sizeof(*dinfo), M_DEVBUF, M_WAITOK | M_ZERO); if (ofw_bus_gen_setup_devinfo(&dinfo->obdinfo, child) != 0) { From owner-svn-src-all@freebsd.org Tue Feb 2 16:35:38 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68630A98DAC; Tue, 2 Feb 2016 16:35:38 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A2FC84C; Tue, 2 Feb 2016 16:35:38 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12GZbfh072847; Tue, 2 Feb 2016 16:35:37 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12GZbsP072846; Tue, 2 Feb 2016 16:35:37 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201602021635.u12GZbsP072846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 2 Feb 2016 16:35:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295154 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 16:35:38 -0000 Author: andrew Date: Tue Feb 2 16:35:37 2016 New Revision: 295154 URL: https://svnweb.freebsd.org/changeset/base/295154 Log: Increase the space we use after the kernel to 8MiB. On 2GiB HiKey board we would try to access data past this point stopping the boot. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/arm64/locore.S Modified: head/sys/arm64/arm64/locore.S ============================================================================== --- head/sys/arm64/arm64/locore.S Tue Feb 2 16:32:44 2016 (r295153) +++ head/sys/arm64/arm64/locore.S Tue Feb 2 16:35:37 2016 (r295154) @@ -369,8 +369,8 @@ create_pagetables: sub x8, x7, x6 /* Get the number of l2 pages to allocate, rounded down */ lsr x10, x8, #(L2_SHIFT) - /* Add 4 MiB for any rounding above and the module data */ - add x10, x10, #2 + /* Add 8 MiB for any rounding above and the module data */ + add x10, x10, #4 /* Create the kernel space L2 table */ mov x6, x26 From owner-svn-src-all@freebsd.org Tue Feb 2 17:57:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5501A98BEF; Tue, 2 Feb 2016 17:57:16 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B315418B8; Tue, 2 Feb 2016 17:57:16 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12HvFdN096171; Tue, 2 Feb 2016 17:57:15 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12HvFVq096170; Tue, 2 Feb 2016 17:57:15 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201602021757.u12HvFVq096170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 2 Feb 2016 17:57:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295157 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 17:57:17 -0000 Author: andrew Date: Tue Feb 2 17:57:15 2016 New Revision: 295157 URL: https://svnweb.freebsd.org/changeset/base/295157 Log: Ensure we don't overflow the phys_avail array. Some firmware may provide more memory locations than we have space to record. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Tue Feb 2 17:33:37 2016 (r295156) +++ head/sys/arm64/arm64/pmap.c Tue Feb 2 17:57:15 2016 (r295157) @@ -596,7 +596,8 @@ pmap_bootstrap(vm_offset_t l1pt, vm_padd * up to the physical address KERNBASE points at. */ map_slot = avail_slot = 0; - for (; map_slot < (physmap_idx * 2); map_slot += 2) { + for (; map_slot < (physmap_idx * 2) && + avail_slot < (PHYS_AVAIL_SIZE - 2); map_slot += 2) { if (physmap[map_slot] == physmap[map_slot + 1]) continue; @@ -612,7 +613,7 @@ pmap_bootstrap(vm_offset_t l1pt, vm_padd } /* Add the memory before the kernel */ - if (physmap[avail_slot] < pa) { + if (physmap[avail_slot] < pa && avail_slot < (PHYS_AVAIL_SIZE - 2)) { phys_avail[avail_slot] = physmap[map_slot]; phys_avail[avail_slot + 1] = pa; physmem += (phys_avail[avail_slot + 1] - From owner-svn-src-all@freebsd.org Tue Feb 2 17:59:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 662E5A98D60; Tue, 2 Feb 2016 17:59:44 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36E461AC4; Tue, 2 Feb 2016 17:59:44 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12HxhKO096297; Tue, 2 Feb 2016 17:59:43 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12HxhQb096296; Tue, 2 Feb 2016 17:59:43 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201602021759.u12HxhQb096296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 2 Feb 2016 17:59:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295158 - head/sys/arm64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 17:59:44 -0000 Author: andrew Date: Tue Feb 2 17:59:43 2016 New Revision: 295158 URL: https://svnweb.freebsd.org/changeset/base/295158 Log: Increase the size of PHYS_AVAIL_SIZE to allow firmware to provide a large number of physical memory locations we can access. This is the case on some HiKey boards that may have UEFI reserved memory dispersed through the physical space. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/include/pmap.h Modified: head/sys/arm64/include/pmap.h ============================================================================== --- head/sys/arm64/include/pmap.h Tue Feb 2 17:57:15 2016 (r295157) +++ head/sys/arm64/include/pmap.h Tue Feb 2 17:59:43 2016 (r295158) @@ -121,7 +121,7 @@ extern struct pmap kernel_pmap_store; #define PMAP_TRYLOCK(pmap) mtx_trylock(&(pmap)->pm_mtx) #define PMAP_UNLOCK(pmap) mtx_unlock(&(pmap)->pm_mtx) -#define PHYS_AVAIL_SIZE 10 +#define PHYS_AVAIL_SIZE 32 extern vm_paddr_t phys_avail[]; extern vm_paddr_t dump_avail[]; extern vm_offset_t virtual_avail; From owner-svn-src-all@freebsd.org Tue Feb 2 18:22:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28A4AA99720; Tue, 2 Feb 2016 18:22:01 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ob0-x233.google.com (mail-ob0-x233.google.com [IPv6:2607:f8b0:4003:c01::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E8FC2B21; Tue, 2 Feb 2016 18:22:00 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-ob0-x233.google.com with SMTP id xk3so57411766obc.2; Tue, 02 Feb 2016 10:22:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=WwsF8NPzmZZedOTam1YceX0/yArZxVUC3FNgQkxfPXc=; b=nzCEuE7Yvq1W5RHgLgOkoS/jaj4yRqqahLyLRQ1ppmQO0iSTgL8JElDjR+TPIYDLYk Ehk4SFA0LGei5UnWjQbAPhXWQT/PPdMHDrBbi9BX8YAIc8kQfQowhgNdRfUdZpfnMpcY 3vizJenTa18pLW7JTtFELzyzZMai678S/B9CAAfX1iGfIFWC+Z9B5cIqf8150Sdanogk wrVRUkXzw0RWPlTQLFgXsVW0G50ggMf/5ZvI5zoX3dH2FvM/eD/gWU8TxxStpcfcCoIW OTkwg4mbRN/x9rvyBxk815wYOmSXz+50TbwcK34FfdqkBvGNOHQsxPoTqtQMsLg32Wsc qtZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=WwsF8NPzmZZedOTam1YceX0/yArZxVUC3FNgQkxfPXc=; b=MqKly5KvqBf/M15+YuIY+lQGKGem2AqSLs+lQWkD/DNZgivj4pz6m4dQ6uTPszRk/p 8fEu9MOUjeLEuklcIVWy0ufXvTbFKMrGuqWbzoaGNwYSMjuaR/wXdaCJVfTmyr/cZzZy Z0BMoo/I2lxlI4qnqrgJSQRrkwNHvXOrHfiLCrIw3gQXZ3Jy0lH8uKrnoIyeOouXvVkl BSYLep3Q/kvTqkEdIsn0lXhaFMR2e7cOjfF+SP1aXb9i7wYvdLLegskQxUXYqkDEmqH+ gfAmhN3nfJXNKxi3r8R408lpNMoP950kS4WsFFx4L9ZJUqhhVAnZCWmwQHjeHfLVdFOD dyYQ== X-Gm-Message-State: AG10YORYbgrCWp2JysPD/ahbRDC910KTbIDon8/F1nmLH9WtCZZjuLthdFClXZotCCwzTjPcKyLNJrTO8fQyOQ== MIME-Version: 1.0 X-Received: by 10.182.213.71 with SMTP id nq7mr24227574obc.65.1454437320001; Tue, 02 Feb 2016 10:22:00 -0800 (PST) Sender: asomers@gmail.com Received: by 10.202.210.79 with HTTP; Tue, 2 Feb 2016 10:21:59 -0800 (PST) In-Reply-To: <201602020014.u120Ep7e084908@repo.freebsd.org> References: <201602020014.u120Ep7e084908@repo.freebsd.org> Date: Tue, 2 Feb 2016 11:21:59 -0700 X-Google-Sender-Auth: Y1q2t71dZ3fjo44n4rKKqzSxiq4 Message-ID: Subject: Re: svn commit: r295134 - head/sys/kgssapi/krb5 From: Alan Somers To: "Conrad E. Meyer" Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 18:22:01 -0000 On Mon, Feb 1, 2016 at 5:14 PM, Conrad E. Meyer wrote: > Author: cem > Date: Tue Feb 2 00:14:51 2016 > New Revision: 295134 > URL: https://svnweb.freebsd.org/changeset/base/295134 > > Log: > kcrypto_aes: Use separate sessions for AES and SHA1 > > Some hardware supports AES acceleration but not SHA1, e.g., AES-NI > extensions. It is useful to have accelerated AES even if SHA1 must be > software. > > Suggested by: asomers > Reviewed by: asomers, dfr > Sponsored by: EMC / Isilon Storage Division > Differential Revision: https://reviews.freebsd.org/D5146 > > Modified: > head/sys/kgssapi/krb5/kcrypto_aes.c Thanks for doing this, Conrad. Could you also please MFC it once stable/10 thaws? From owner-svn-src-all@freebsd.org Tue Feb 2 19:04:42 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4D6FA98678; Tue, 2 Feb 2016 19:04:42 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 731AD76C; Tue, 2 Feb 2016 19:04:42 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12J4fPX016753; Tue, 2 Feb 2016 19:04:41 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12J4flc016752; Tue, 2 Feb 2016 19:04:41 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201602021904.u12J4flc016752@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Tue, 2 Feb 2016 19:04:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295159 - in head/contrib: libucl/tests libxo unbound X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 19:04:42 -0000 Author: sobomax Date: Tue Feb 2 19:04:40 2016 New Revision: 295159 URL: https://svnweb.freebsd.org/changeset/base/295159 Log: Root out files that don't really belong here and could in fact screw you over if you happen to use git for FreeBSD development, as it is the case with the unbound/.gitignore, which lits files that are actually required for the buildworld. MFC after: 1 day Deleted: head/contrib/libucl/tests/.gitignore head/contrib/libxo/.gitignore head/contrib/unbound/.gitignore From owner-svn-src-all@freebsd.org Tue Feb 2 19:29:31 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26A67A99038; Tue, 2 Feb 2016 19:29:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAFA41410; Tue, 2 Feb 2016 19:29:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12JTT8C023083; Tue, 2 Feb 2016 19:29:29 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12JTTaS023082; Tue, 2 Feb 2016 19:29:29 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201602021929.u12JTTaS023082@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Feb 2016 19:29:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r295160 - stable/7/sys/kern X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 19:29:31 -0000 Author: jhb Date: Tue Feb 2 19:29:29 2016 New Revision: 295160 URL: https://svnweb.freebsd.org/changeset/base/295160 Log: Return the timestamps from the corresponding namecache entry on a negative namecache hit. This was ommitted due to a merging error in r238913. The effect was to usually break caching of negative name lookups in the NFS client. Submitted by: bde Modified: stable/7/sys/kern/vfs_cache.c Modified: stable/7/sys/kern/vfs_cache.c ============================================================================== --- stable/7/sys/kern/vfs_cache.c Tue Feb 2 19:04:40 2016 (r295159) +++ stable/7/sys/kern/vfs_cache.c Tue Feb 2 19:29:29 2016 (r295160) @@ -530,6 +530,7 @@ negative_success: nchstats.ncs_neghits++; if (ncp->nc_flag & NCF_WHITE) cnp->cn_flags |= ISWHITEOUT; + cache_out_ts(ncp, tsp, ticksp); CACHE_UNLOCK(); return (ENOENT); From owner-svn-src-all@freebsd.org Tue Feb 2 19:33:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62CB2A9924B; Tue, 2 Feb 2016 19:33:30 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 09DD21959; Tue, 2 Feb 2016 19:33:30 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by mail-wm0-x22f.google.com with SMTP id r129so133634900wmr.0; Tue, 02 Feb 2016 11:33:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=0K1jLnSA1f30zE2d44lvFA/1RFN1JdIgHIMDDpVpKNA=; b=cgn05AQGnSwyhKNvjHk7OrMz3ByU2u4VO034wZidoXjsegv4KPx1oe/HzIN9Tr3wV1 T05iVuZ2aXXTKYrdQIDPoD0qa7TyRhcA2+riLSCGJrUpUlJujiEyBAr3g6gTbuR0TgjY bvq9quA/sN48D1w2c3GJIBD0Sy0EsGOhtk04UwiJ5cxjBo+Ga/wdYiEB3x7G+FyS+T2d 1ILzrqlo0MffMcmQdW+oHlUsS1r7iMA55tf8LCCraa+jr4W4rULsRi/Ly861yxnvQB6Z LcEQoPBf4bs9L2WZ+1WqXfmZDPqbF/dKGxha8uD45jCdjTpHy4oWw8KVjIZ+/bKy8t+o wR9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=0K1jLnSA1f30zE2d44lvFA/1RFN1JdIgHIMDDpVpKNA=; b=U3Vi+Drbl+BXXroYtOir2eYSNBd0fIzfUU1SFujl+3vN+b6+cDR1WhzQ/zd5ZU4rLQ uyfrzlB5U1ilIzsROgUdbGl8+aT9Nl44KXwA8TnMQ04c5G0q8QhXo7UvGt6/TUsersNN uloqlG6pnhD5fLmAe+ljahfg8flhP5XAnBjbwpzhGM3VkzW9DV1+zTFfCMRnuiJ+JJme JsakfwaUkK+whhv2lAxJ47h3S2UPPYmqI4Np6vQVlP9KoyQyGhlPfkydraTFjSg3QpVQ MDQfSuN1p+wLJuL2jPOW4dAn7DBr/dYnl8+f6Ll4huDw9graUY4+gbzVihiOuefGFzLw f6Hw== X-Gm-Message-State: AG10YORcC0JJiUaI49kNdswaJdvAUO/UbRszc7X8Pg0CHDpsd5WqtEuhQd3OznLIt+EFhQ== X-Received: by 10.28.23.73 with SMTP id 70mr18886338wmx.37.1454441608127; Tue, 02 Feb 2016 11:33:28 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id xx3sm2915694wjc.32.2016.02.02.11.33.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Feb 2016 11:33:27 -0800 (PST) Sender: Baptiste Daroussin Date: Tue, 2 Feb 2016 20:33:25 +0100 From: Baptiste Daroussin To: Maxim Sobolev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r295159 - in head/contrib: libucl/tests libxo unbound Message-ID: <20160202193325.GD12205@ivaldir.etoilebsd.net> References: <201602021904.u12J4flc016752@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3Gf/FFewwPeBMqCJ" Content-Disposition: inline In-Reply-To: <201602021904.u12J4flc016752@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 19:33:30 -0000 --3Gf/FFewwPeBMqCJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 02, 2016 at 07:04:41PM +0000, Maxim Sobolev wrote: > Author: sobomax > Date: Tue Feb 2 19:04:40 2016 > New Revision: 295159 > URL: https://svnweb.freebsd.org/changeset/base/295159 >=20 > Log: > Root out files that don't really belong here and could in fact screw > you over if you happen to use git for FreeBSD development, as it is > the case with the unbound/.gitignore, which lits files that are > actually required for the buildworld. > =20 > MFC after: 1 day >=20 > Deleted: > head/contrib/libucl/tests/.gitignore Thank you! and sorry for having introduced the above one, I'll make sure to= pay more attention Best regards, Bapt --3Gf/FFewwPeBMqCJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWsQSFAAoJEGOJi9zxtz5a/SQP+wf0AmNia2RfzFXmGWyYuzZb cG/6Pa2yUH9LZBfJ25nomzptYzx6xPvJ9ELM0rpv1pTNnyv3O2MrcaqdE2mbpyGn 7jXM/ZF3gZVz5J5OABoH+EibrQyfZIqx3CFJy/DH4lPxlehzoiqwTQSQv5tUwoF8 DWHKLVQUE1761Rk1mCD0BkJIjl0GA1jiNa75dFXxd7vZhxUNxbl0cp63Touf0Lu5 l14ZGZc58WE4kGnPMkWmXoyvrNVewOyDv0jUCoCCvZ9GBEduBi6Wk++2otANV4o9 JRWKbBEuXqtykHFEG8p8FnJy93+PjjODRIwZMrbWY5guSsyG428pmSDhBZ7bGOmx Jn2M0W9fYkJzZjzPvPT4zJJPNjnLOkwK9KznhGCHYThUCXI1tQITF66vz4lJdZSs qb3SeGGFkReh5SYRILHv6aSex9SWvUh8u3JWSsA1H+lG2ULZ2l4brTi4VyTsbgRv vVYZwbrllCKyJjNlezO5/LGGjLsk6X/qqGdMvfiOKM2/FsEg+kx5HNKfZb0JMpe9 CNPe7RMCx/8vpdtnY/CX5gwla2IGnrR6FEQyMZqtS+bHc0CKXdDYw6hr7FOKHxiy baC7raQqr8H7B1/iscaegxiBqjQRjNqsf2fwVzu8C6BAYR4oyLku2saEeX0jDseJ nlq+hzkooG5Xs6ihkm0O =QG0a -----END PGP SIGNATURE----- --3Gf/FFewwPeBMqCJ-- From owner-svn-src-all@freebsd.org Tue Feb 2 19:44:27 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 000B9A995FF; Tue, 2 Feb 2016 19:44:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5376180; Tue, 2 Feb 2016 19:44:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 99842B918; Tue, 2 Feb 2016 14:44:25 -0500 (EST) From: John Baldwin To: Alfred Perlstein Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r295136 - in head: sys/kern sys/netinet sys/sys usr.bin/netstat Date: Tue, 02 Feb 2016 11:39:46 -0800 Message-ID: <36439709.poT7RgRunK@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201602020557.u125vxCP084718@repo.freebsd.org> References: <201602020557.u125vxCP084718@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 02 Feb 2016 14:44:25 -0500 (EST) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 19:44:27 -0000 On Tuesday, February 02, 2016 05:57:59 AM Alfred Perlstein wrote: > Author: alfred > Date: Tue Feb 2 05:57:59 2016 > New Revision: 295136 > URL: https://svnweb.freebsd.org/changeset/base/295136 > > Log: > Increase max allowed backlog for listen sockets > from short to int. > > PR: 203922 > Submitted by: White Knight > MFC After: 4 weeks You do realize that this breaks the ABI of the sysctls used to fetch connection lists (and so will break existing binaries like ucd-snmpd, etc.) and thus can't be MFC'd right? Also, when this patch was brought up on the lists there was the question of if it is really beneficial to have more than 32k sockets that you haven't accepted yet. It's one thing to have lots of concurrent active sockets that you are servicing, but if your application is so backlogged that there are 32k sockets waiting on accept() it's hard to imagine why having more than 32k sockets waiting on accept() is useful. -- John Baldwin From owner-svn-src-all@freebsd.org Tue Feb 2 20:11:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B5F8A99EF8; Tue, 2 Feb 2016 20:11:26 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 6DFCD12FC; Tue, 2 Feb 2016 20:11:26 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from Alfreds-MacBook-Pro-2.local (unknown [IPv6:2601:645:8001:cee1:c76:2f7d:b92b:76e4]) by elvis.mu.org (Postfix) with ESMTPSA id 19B32345A92E; Tue, 2 Feb 2016 12:11:20 -0800 (PST) Subject: Re: svn commit: r295136 - in head: sys/kern sys/netinet sys/sys usr.bin/netstat To: John Baldwin References: <201602020557.u125vxCP084718@repo.freebsd.org> <36439709.poT7RgRunK@ralph.baldwin.cx> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Alfred Perlstein Organization: FreeBSD Message-ID: <56B10D67.4050602@freebsd.org> Date: Tue, 2 Feb 2016 12:11:19 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <36439709.poT7RgRunK@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 20:11:26 -0000 On 2/2/16 11:39 AM, John Baldwin wrote: > On Tuesday, February 02, 2016 05:57:59 AM Alfred Perlstein wrote: >> Author: alfred >> Date: Tue Feb 2 05:57:59 2016 >> New Revision: 295136 >> URL: https://svnweb.freebsd.org/changeset/base/295136 >> >> Log: >> Increase max allowed backlog for listen sockets >> from short to int. >> >> PR: 203922 >> Submitted by: White Knight >> MFC After: 4 weeks > You do realize that this breaks the ABI of the sysctls used to fetch > connection lists (and so will break existing binaries like ucd-snmpd, etc.) > and thus can't be MFC'd right? OK, I will not MFC it. Is it worthwhile to extend the xsocket to have padding so that in 11.x and beyond we can allow for some changes in the structure? Another idea I had was to include a version number with the sysctl request so that we can send back versioned structures, let me know what you think about that. The first idea will take not more than a few days for me to accomplish, the second (versioning the sysctl) probably a few more days than that. thanks, -Alfred From owner-svn-src-all@freebsd.org Tue Feb 2 20:23:28 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EB17A982D8; Tue, 2 Feb 2016 20:23:28 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-io0-x234.google.com (mail-io0-x234.google.com [IPv6:2607:f8b0:4001:c06::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6CB811C33; Tue, 2 Feb 2016 20:23:28 +0000 (UTC) (envelope-from delphij@gmail.com) Received: by mail-io0-x234.google.com with SMTP id 9so31186474iom.1; Tue, 02 Feb 2016 12:23:28 -0800 (PST) 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=umMK6C0gQDbkTdRUn83fAjme+B/UipsggqUIJFDiSfo=; b=tjhJTqC+Gd0UaQyYVDzlo+nA57XdRDHrd0+j10j6yuhmnBlt6VW1LH0FiwiwOL00Pp oogGBOSYHKKGchT8INmecMqBHmuBHTHOh89wJ7q22awfKCwNvD3w0+NDKHBoeBShRsem XzXojB/nm4XdciA5V0UWS4beaRIeo1BrguDV5Pdv4A1HwaMnjKXPZd0DiWG3PdgU5Bj2 /FJUC9nhw2dkkGr8gN4LMAQUe8n280SxO4BDPhDcw+Q6iQUXi17cAqzcXVz68NIizy84 m4Kk5OX4WLP+ALOUNsdnCbUZUTuGkWznkEJl0GfT9zZGSvtkOaxhv7qQVwHxb3O9hi3x ttVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=umMK6C0gQDbkTdRUn83fAjme+B/UipsggqUIJFDiSfo=; b=ZQxJc6IiegOvFS13zD2KG8v164D1c+ut5negKvnrJm6fYCNXGchJHiyn8kpbfwxTx7 5tzJE1fQnXd1RrFvYSNMIHNshbbnIsQrJVCSB70tvWoFqDhTJXoGWClzIGhmMat44qJL X7Xp/nrPfuFxNbhj4ygOdiG+AawCMUMK1jKEEoDG5CpoY0a5BpIC6/Lcubqgxk7kqxM5 ebxOOJfF6gPDUuvT/08d0hrPyjeiBg/IggnHM94WdRK7cmP7fN6rbRY7aVMRJXXVtjRN l7HnGVQK13vJaUtMDy+FXFwrscrd0n3ZpjQzfRoCVObyxxK+ZelxHYluD1Z4XP3APFIK n7Nw== X-Gm-Message-State: AG10YOS3zSbarr/I8AxZZjK4rmHrDEQlHNDsxhXk5AcLHWD2YYnu8V8gW28ZEDhRn6jsIuXxvqpBwBO36rqlPA== MIME-Version: 1.0 X-Received: by 10.107.9.220 with SMTP id 89mr16396895ioj.6.1454444607666; Tue, 02 Feb 2016 12:23:27 -0800 (PST) Received: by 10.36.54.207 with HTTP; Tue, 2 Feb 2016 12:23:27 -0800 (PST) In-Reply-To: <56B10D67.4050602@freebsd.org> References: <201602020557.u125vxCP084718@repo.freebsd.org> <36439709.poT7RgRunK@ralph.baldwin.cx> <56B10D67.4050602@freebsd.org> Date: Tue, 2 Feb 2016 12:23:27 -0800 Message-ID: Subject: Re: svn commit: r295136 - in head: sys/kern sys/netinet sys/sys usr.bin/netstat From: Xin LI To: Alfred Perlstein Cc: John Baldwin , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 20:23:28 -0000 On Tuesday, February 2, 2016, Alfred Perlstein wrote: > > > On 2/2/16 11:39 AM, John Baldwin wrote: > >> On Tuesday, February 02, 2016 05:57:59 AM Alfred Perlstein wrote: >> >>> Author: alfred >>> Date: Tue Feb 2 05:57:59 2016 >>> New Revision: 295136 >>> URL: https://svnweb.freebsd.org/changeset/base/295136 >>> >>> Log: >>> Increase max allowed backlog for listen sockets >>> from short to int. >>> PR: 203922 >>> Submitted by: White Knight >>> MFC After: 4 weeks >>> >> You do realize that this breaks the ABI of the sysctls used to fetch >> connection lists (and so will break existing binaries like ucd-snmpd, >> etc.) >> and thus can't be MFC'd right? >> > OK, I will not MFC it. > > Is it worthwhile to extend the xsocket to have padding so that in 11.x and > beyond we can allow for some changes in the structure? > > Another idea I had was to include a version number with the sysctl request > so that we can send back versioned structures, let me know what you think > about that. > > The first idea will take not more than a few days for me to accomplish, > the second (versioning the sysctl) probably a few more days than that. We have similar construction (versioned ioctl) in FreeBSD ZFS but the main goal is to keep system bootable, not to support all functionalities. Do we change the structure often and is it important enough to warrant the complexity? I think kmem interface have a simple size check to guard against world/kernel inconsistency. I would second John's comment on the necessity of the change though, if one already have 32K of *backlogged* connections, it's probably not very useful to allow more coming in. It sounds like the application itself is seriously broken, and unless expanding the field have some performance benefit, I don't think it should stay. -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die From owner-svn-src-all@freebsd.org Tue Feb 2 20:35:48 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2C2DA98808; Tue, 2 Feb 2016 20:35:48 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 82D8B30B; Tue, 2 Feb 2016 20:35:48 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from Alfreds-MacBook-Pro-2.local (unknown [IPv6:2601:645:8001:cee1:c76:2f7d:b92b:76e4]) by elvis.mu.org (Postfix) with ESMTPSA id DED71345A97C; Tue, 2 Feb 2016 12:35:47 -0800 (PST) Subject: Re: svn commit: r295136 - in head: sys/kern sys/netinet sys/sys usr.bin/netstat To: Xin LI References: <201602020557.u125vxCP084718@repo.freebsd.org> <36439709.poT7RgRunK@ralph.baldwin.cx> <56B10D67.4050602@freebsd.org> Cc: John Baldwin , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Alfred Perlstein Organization: FreeBSD Message-ID: <56B11323.70905@freebsd.org> Date: Tue, 2 Feb 2016 12:35:47 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 20:35:48 -0000 On 2/2/16 12:23 PM, Xin LI wrote: > > > On Tuesday, February 2, 2016, Alfred Perlstein > wrote: > > > > On 2/2/16 11:39 AM, John Baldwin wrote: > > On Tuesday, February 02, 2016 05:57:59 AM Alfred Perlstein wrote: > > Author: alfred > Date: Tue Feb 2 05:57:59 2016 > New Revision: 295136 > URL: https://svnweb.freebsd.org/changeset/base/295136 > > Log: > Increase max allowed backlog for listen sockets > from short to int. > PR: 203922 > Submitted by: White Knight > MFC After: 4 weeks > > You do realize that this breaks the ABI of the sysctls used to > fetch > connection lists (and so will break existing binaries like > ucd-snmpd, etc.) > and thus can't be MFC'd right? > > OK, I will not MFC it. > > Is it worthwhile to extend the xsocket to have padding so that in > 11.x and beyond we can allow for some changes in the structure? > > Another idea I had was to include a version number with the sysctl > request so that we can send back versioned structures, let me know > what you think about that. > > The first idea will take not more than a few days for me to > accomplish, the second (versioning the sysctl) probably a few more > days than that. > > > We have similar construction (versioned ioctl) in FreeBSD ZFS but the > main goal is to keep system bootable, not to support all > functionalities. Do we change the structure often and is it important > enough to warrant the complexity? I think kmem interface have a > simple size check to guard against world/kernel inconsistency. > > I would second John's comment on the necessity of the change though, > if one already have 32K of *backlogged* connections, it's probably not > very useful to allow more coming in. It sounds like the application > itself is seriously broken, and unless expanding the field have some > performance benefit, I don't think it should stay. Imagine a hugely busy image board like 2ch.net, if there is a single hiccup, it's very possible to start dropping connections. I stand by the scalability improvement offered here even though it is an edge case. Linux appears to offer 32 bits of backlog and so should we. -Alfred From owner-svn-src-all@freebsd.org Tue Feb 2 20:50:07 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C75DBA98F8A; Tue, 2 Feb 2016 20:50:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98F0E1025; Tue, 2 Feb 2016 20:50:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12Ko6qO047651; Tue, 2 Feb 2016 20:50:06 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12Ko68R047650; Tue, 2 Feb 2016 20:50:06 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201602022050.u12Ko68R047650@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 2 Feb 2016 20:50:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295161 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 20:50:07 -0000 Author: bdrewery Date: Tue Feb 2 20:50:06 2016 New Revision: 295161 URL: https://svnweb.freebsd.org/changeset/base/295161 Log: Add order for installworld/distribution. Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Tue Feb 2 19:29:29 2016 (r295160) +++ head/Makefile Tue Feb 2 20:50:06 2016 (r295161) @@ -136,6 +136,7 @@ TGTS+= ${BITGTS} .ORDER: buildworld installworld .ORDER: buildworld distributeworld .ORDER: buildworld buildkernel +.ORDER: installworld distribution .ORDER: buildkernel installkernel .ORDER: buildkernel installkernel.debug .ORDER: buildkernel reinstallkernel From owner-svn-src-all@freebsd.org Tue Feb 2 20:50:10 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5AD3A98FB1; Tue, 2 Feb 2016 20:50:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 966871057; Tue, 2 Feb 2016 20:50:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12Ko90h047696; Tue, 2 Feb 2016 20:50:09 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12Ko9xJ047695; Tue, 2 Feb 2016 20:50:09 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201602022050.u12Ko9xJ047695@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 2 Feb 2016 20:50:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295162 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 20:50:10 -0000 Author: bdrewery Date: Tue Feb 2 20:50:09 2016 New Revision: 295162 URL: https://svnweb.freebsd.org/changeset/base/295162 Log: Adjust install .WAITs for lib/ and etc/ to allow parallelization more. Only 'installworld' needs to be protected and only when not using -DNO_ROOT, which implies not installing to / and not needing the lib dependency protections. Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Feb 2 20:50:06 2016 (r295161) +++ head/Makefile.inc1 Tue Feb 2 20:50:09 2016 (r295162) @@ -72,7 +72,7 @@ SRCDIR?= ${.CURDIR} SUBDIR= ${SUBDIR_OVERRIDE} .else SUBDIR= lib libexec -.if make(install*) +.if !defined(NO_ROOT) && (make(installworld) || make(install)) # Ensure libraries are installed before progressing. SUBDIR+=.WAIT .endif @@ -127,7 +127,7 @@ SUBDIR+= ${_DIR} # by calling 'makedb' in share/man. This is only relevant for # install/distribute so they build the whatis file after every manpage is # installed. -.if make(install*) +.if make(installworld) || make(install) SUBDIR+=.WAIT .endif SUBDIR+=etc From owner-svn-src-all@freebsd.org Tue Feb 2 21:10:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF9EFA9962F; Tue, 2 Feb 2016 21:10:01 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 776B41CD3; Tue, 2 Feb 2016 21:10:01 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1aQiD1-0001Gc-3d; Wed, 03 Feb 2016 00:09:59 +0300 Date: Wed, 3 Feb 2016 00:09:59 +0300 From: Slawa Olhovchenkov To: Alfred Perlstein Cc: Xin LI , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , John Baldwin Subject: Re: svn commit: r295136 - in head: sys/kern sys/netinet sys/sys usr.bin/netstat Message-ID: <20160202210958.GV37895@zxy.spb.ru> References: <201602020557.u125vxCP084718@repo.freebsd.org> <36439709.poT7RgRunK@ralph.baldwin.cx> <56B10D67.4050602@freebsd.org> <56B11323.70905@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56B11323.70905@freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 21:10:01 -0000 On Tue, Feb 02, 2016 at 12:35:47PM -0800, Alfred Perlstein wrote: > > I would second John's comment on the necessity of the change though, > > if one already have 32K of *backlogged* connections, it's probably not > > very useful to allow more coming in. It sounds like the application > > itself is seriously broken, and unless expanding the field have some > > performance benefit, I don't think it should stay. > > Imagine a hugely busy image board like 2ch.net, if there is a single > hiccup, it's very possible to start dropping connections. In reality start dropping connections in any case: nobody will be infinity wait of accept (user close browser and go away, etc). Also, if you have more then 4K backloged connections -- you have problem, you can't process all connections request and in next second you will be have 8K, after next second -- 12K and etc. From owner-svn-src-all@freebsd.org Tue Feb 2 21:10:45 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB42BA996A6; Tue, 2 Feb 2016 21:10:45 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C9E81E4E; Tue, 2 Feb 2016 21:10:45 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12LAi7c053543; Tue, 2 Feb 2016 21:10:44 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12LAiEv053537; Tue, 2 Feb 2016 21:10:44 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201602022110.u12LAiEv053537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 2 Feb 2016 21:10:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295165 - head/contrib/openresolv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 21:10:45 -0000 Author: pfg Date: Tue Feb 2 21:10:43 2016 New Revision: 295165 URL: https://svnweb.freebsd.org/changeset/base/295165 Log: MFV r295109: Update openresolve to version 3.7.2 Relnotes: yes Modified: head/contrib/openresolv/Makefile head/contrib/openresolv/resolvconf.8.in head/contrib/openresolv/resolvconf.conf.5.in head/contrib/openresolv/resolvconf.in head/contrib/openresolv/unbound.in Directory Properties: head/contrib/openresolv/ (props changed) Modified: head/contrib/openresolv/Makefile ============================================================================== --- head/contrib/openresolv/Makefile Tue Feb 2 21:06:09 2016 (r295164) +++ head/contrib/openresolv/Makefile Tue Feb 2 21:10:43 2016 (r295165) @@ -1,5 +1,5 @@ PKG= openresolv -VERSION= 3.7.0 +VERSION= 3.7.1 # Nasty hack so that make clean works without configure being run _CONFIG_MK!= test -e config.mk && echo config.mk || echo config-null.mk @@ -37,7 +37,7 @@ SED_RESTARTCMD= -e 's:@RESTARTCMD \(.*\ DISTPREFIX?= ${PKG}-${VERSION} DISTFILEGZ?= ${DISTPREFIX}.tar.gz -DISTFILE?= ${DISTPREFIX}.tar.bz2 +DISTFILE?= ${DISTPREFIX}.tar.xz FOSSILID?= current .SUFFIXES: .in @@ -77,9 +77,9 @@ install: proginstall maninstall import: rm -rf /tmp/${DISTPREFIX} ${INSTALL} -d /tmp/${DISTPREFIX} - cp README ${SRCS} /tmp/${DISPREFIX} + cp README ${SRCS} /tmp/${DISTPREFIX} dist: fossil tarball --name ${DISTPREFIX} ${FOSSILID} ${DISTFILEGZ} - gunzip -c ${DISTFILEGZ} | bzip2 >${DISTFILE} + gunzip -c ${DISTFILEGZ} | xz >${DISTFILE} rm ${DISTFILEGZ} Modified: head/contrib/openresolv/resolvconf.8.in ============================================================================== --- head/contrib/openresolv/resolvconf.8.in Tue Feb 2 21:06:09 2016 (r295164) +++ head/contrib/openresolv/resolvconf.8.in Tue Feb 2 21:10:43 2016 (r295165) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 27, 2014 +.Dd April 27, 2015 .Dt RESOLVCONF 8 .Os .Sh NAME Modified: head/contrib/openresolv/resolvconf.conf.5.in ============================================================================== --- head/contrib/openresolv/resolvconf.conf.5.in Tue Feb 2 21:06:09 2016 (r295164) +++ head/contrib/openresolv/resolvconf.conf.5.in Tue Feb 2 21:10:43 2016 (r295165) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 20, 2015 +.Dd May 14, 2015 .Dt RESOLVCONF.CONF 5 .Os .Sh NAME @@ -91,6 +91,11 @@ To remove a block, you can use 192.168.* These interfaces name servers will only be queried for the domains listed in their resolv.conf. Useful for VPN domains. +Setting +.Sy private_interfaces Ns ="*" +will stop the forwarding of the root zone and allows the local resolver to +recursively query the root servers directly. +Requires a local nameserver other than libc. This is equivalent to the .Nm resolvconf -p option. @@ -149,7 +154,7 @@ When set to /dev/null or NULL, .Sy resolv_conf_local_only is defaulted to NO, .Sy local_nameservers -is unset unless overriden and only the information set in +is unset unless overridden and only the information set in .Nm is written to .Sy resolv_conf . @@ -271,7 +276,7 @@ Each subscriber attempts to automaticall distribution has been catered for. Also, users could equally want to use a different version from the one installed by default, such as bind8 and bind9. -To accomodate this, the subscribers have these files in configurable +To accommodate this, the subscribers have these files in configurable variables, documented below. .Pp .Bl -tag -width indent Modified: head/contrib/openresolv/resolvconf.in ============================================================================== --- head/contrib/openresolv/resolvconf.in Tue Feb 2 21:06:09 2016 (r295164) +++ head/contrib/openresolv/resolvconf.in Tue Feb 2 21:10:43 2016 (r295165) @@ -50,7 +50,6 @@ elif [ -d "$SYSCONFDIR/resolvconf" ]; th interface_order="$(cat "$SYSCONFDIR"/interface-order)" fi fi -TMPDIR="$VARDIR/tmp" IFACEDIR="$VARDIR/interfaces" METRICDIR="$VARDIR/metrics" PRIVATEDIR="$VARDIR/private" Modified: head/contrib/openresolv/unbound.in ============================================================================== --- head/contrib/openresolv/unbound.in Tue Feb 2 21:06:09 2016 (r295164) +++ head/contrib/openresolv/unbound.in Tue Feb 2 21:10:43 2016 (r295165) @@ -45,7 +45,8 @@ for d in $DOMAINS; do ns="${d#*:}" case "$unbound_insecure" in [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) - newconf="$newconf${NL}domain-insecure: \"$dn\"" + newconf="$newconf${NL}server:$NL" + newconf="$newconf domain-insecure: \"$dn\"$NL" ;; esac newconf="$newconf${NL}forward-zone:$NL name: \"$dn\"$NL" From owner-svn-src-all@freebsd.org Tue Feb 2 21:10:57 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15EECA996CC; Tue, 2 Feb 2016 21:10:57 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C82AD1FBB; Tue, 2 Feb 2016 21:10:56 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12LAtNa055547; Tue, 2 Feb 2016 21:10:55 GMT (envelope-from skra@FreeBSD.org) Received: (from skra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12LAt6q055544; Tue, 2 Feb 2016 21:10:55 GMT (envelope-from skra@FreeBSD.org) Message-Id: <201602022110.u12LAt6q055544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skra set sender to skra@FreeBSD.org using -f From: Svatopluk Kraus Date: Tue, 2 Feb 2016 21:10:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295166 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 21:10:57 -0000 Author: skra Date: Tue Feb 2 21:10:55 2016 New Revision: 295166 URL: https://svnweb.freebsd.org/changeset/base/295166 Log: Make pmap_preboot_map_attr() vm subsystem compliant, so its arguments do not depend on pmap internals. This is a preparation for hiding internal pmap definitions as much as possible from the rest of system. Simultaneously, the protection argument evaluation is fixed. Happily, it did not effect the mappings. And it's the reason why it was not fixed earlier. Modified: head/sys/arm/arm/pmap-v6.c head/sys/arm/include/pmap-v6.h Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Tue Feb 2 21:10:43 2016 (r295165) +++ head/sys/arm/arm/pmap-v6.c Tue Feb 2 21:10:55 2016 (r295166) @@ -645,7 +645,7 @@ pt2map_pt2pg(vm_offset_t va) * vm_offset_t pmap_preboot_reserve_pages(u_int num); * vm_offset_t pmap_preboot_get_vpages(u_int num); * void pmap_preboot_map_attr(vm_paddr_t pa, vm_offset_t va, vm_size_t size, - * int prot, int attr); + * vm_prot_t prot, vm_memattr_t attr); * * (2) for all stages: * @@ -984,15 +984,16 @@ pmap_preboot_get_vpages(u_int num) * Pre-bootstrap epoch page mapping(s) with attributes. */ void -pmap_preboot_map_attr(vm_paddr_t pa, vm_offset_t va, vm_size_t size, int prot, - int attr) +pmap_preboot_map_attr(vm_paddr_t pa, vm_offset_t va, vm_size_t size, + vm_prot_t prot, vm_memattr_t attr) { u_int num; - u_int l1_attr, l1_prot; + u_int l1_attr, l1_prot, l2_prot; pt1_entry_t *pte1p; pt2_entry_t *pte2p; - l1_prot = ATTR_TO_L1(prot); + l2_prot = prot & VM_PROT_WRITE ? PTE2_AP_KRW : PTE2_AP_KR; + l1_prot = ATTR_TO_L1(l2_prot); l1_attr = ATTR_TO_L1(attr); /* Map all the pages. */ @@ -1006,13 +1007,12 @@ pmap_preboot_map_attr(vm_paddr_t pa, vm_ num -= PTE1_SIZE; } else { pte2p = pmap_preboot_vtopte2(va); - pte2_store(pte2p, PTE2_KERN(pa, prot, attr)); + pte2_store(pte2p, PTE2_KERN(pa, l2_prot, attr)); va += PAGE_SIZE; pa += PAGE_SIZE; num -= PAGE_SIZE; } } - } /* Modified: head/sys/arm/include/pmap-v6.h ============================================================================== --- head/sys/arm/include/pmap-v6.h Tue Feb 2 21:10:43 2016 (r295165) +++ head/sys/arm/include/pmap-v6.h Tue Feb 2 21:10:55 2016 (r295166) @@ -216,8 +216,8 @@ vm_paddr_t pmap_preboot_get_pages(u_int void pmap_preboot_map_pages(vm_paddr_t , vm_offset_t , u_int ); vm_offset_t pmap_preboot_reserve_pages(u_int ); vm_offset_t pmap_preboot_get_vpages(u_int ); -void pmap_preboot_map_attr(vm_paddr_t , vm_offset_t , vm_size_t , - int , int ); +void pmap_preboot_map_attr(vm_paddr_t, vm_offset_t, vm_size_t, vm_prot_t, + vm_memattr_t); static __inline void pmap_map_chunk(vm_offset_t l1pt, vm_offset_t va, vm_offset_t pa, vm_size_t size, int prot, int cache) From owner-svn-src-all@freebsd.org Tue Feb 2 21:11:25 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32D1BA9972D; Tue, 2 Feb 2016 21:11:25 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03E2A2E8; Tue, 2 Feb 2016 21:11:24 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12LBOFo056269; Tue, 2 Feb 2016 21:11:24 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12LBOJB056268; Tue, 2 Feb 2016 21:11:24 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201602022111.u12LBOJB056268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 2 Feb 2016 21:11:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295167 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 21:11:25 -0000 Author: bdrewery Date: Tue Feb 2 21:11:23 2016 New Revision: 295167 URL: https://svnweb.freebsd.org/changeset/base/295167 Log: Deduplicate distrib-dirs logic from r289086 in distribution. Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Feb 2 21:10:55 2016 (r295166) +++ head/Makefile.inc1 Tue Feb 2 21:11:23 2016 (r295167) @@ -1087,9 +1087,7 @@ distrib-dirs: .MAKE .PHONY ${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ ${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET} -distribution: .MAKE .PHONY - ${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ - ${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET} +distribution: distrib-dirs .MAKE .PHONY ${_+_}cd ${.CURDIR}; ${CROSSENV} PATH=${TMPPATH} \ ${MAKE} -f Makefile.inc1 ${IMAKE_INSTALL} \ METALOG=${METALOG} installconfig From owner-svn-src-all@freebsd.org Tue Feb 2 21:16:45 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE2FAA99957; Tue, 2 Feb 2016 21:16:45 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f176.google.com (mail-yk0-f176.google.com [209.85.160.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 83939820; Tue, 2 Feb 2016 21:16:45 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-yk0-f176.google.com with SMTP id z13so1183803ykd.0; Tue, 02 Feb 2016 13:16:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=bnH6CogWhjWwZfKZCGZ/oAhErjadWAXe0TjcUI+Caz0=; b=S/IDs0crHSc/9qg1txTyrbQxFSUInopkzBmluP3/V5L28SNOzbhEURVtiqgB6UJUXy IiWdS6doc54XWuvH895xIDC9ANoTJgd01f6VqgPd+VZf54DoQoFaRcuxhVPir9e7k0bU Mqc8hMwQOiYVdGHKMRoPlKPjuLuMT0oa/ps2m86OvxfLWRNuIF1TBxljT4uLMwREJw4w PSlIpVPzjf5fjTxGJZ8MbYrAxHzhdEppIQH1Mr2fRmhQLHBhcGmnzrkREEVfLcpxC5v4 a3NWK0o+UbRkbBNpJOxkWfufiIvo6kDDgN1QvZKEDtSfM4REd1h4GYmRHwuWvVXfh3vw VV6Q== X-Gm-Message-State: AG10YOT6Uo04KMpUM2nNrnyP71zKczu4EjvF+XsFkLVVGHJD/7gJmhNAAZnZuAXyWomUjA== X-Received: by 10.37.64.198 with SMTP id n189mr12149673yba.124.1454438451147; Tue, 02 Feb 2016 10:40:51 -0800 (PST) Received: from mail-yk0-f171.google.com (mail-yk0-f171.google.com. [209.85.160.171]) by smtp.gmail.com with ESMTPSA id h129sm664371ywf.56.2016.02.02.10.40.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Feb 2016 10:40:51 -0800 (PST) Received: by mail-yk0-f171.google.com with SMTP id z13so91170146ykd.0; Tue, 02 Feb 2016 10:40:50 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.37.83.133 with SMTP id h127mr21139443ybb.115.1454438450665; Tue, 02 Feb 2016 10:40:50 -0800 (PST) Reply-To: cem@FreeBSD.org Received: by 10.37.4.23 with HTTP; Tue, 2 Feb 2016 10:40:50 -0800 (PST) In-Reply-To: References: <201602020014.u120Ep7e084908@repo.freebsd.org> Date: Tue, 2 Feb 2016 10:40:50 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r295134 - head/sys/kgssapi/krb5 From: Conrad Meyer To: Alan Somers Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 21:16:45 -0000 On Tue, Feb 2, 2016 at 10:21 AM, Alan Somers wrote: > On Mon, Feb 1, 2016 at 5:14 PM, Conrad E. Meyer wrote: >> URL: https://svnweb.freebsd.org/changeset/base/295134 >> >> Log: >> kcrypto_aes: Use separate sessions for AES and SHA1 > > Thanks for doing this, Conrad. Could you also please MFC it once > stable/10 thaws? Sorry, I don't do stable branches. If you would like to MFC it to 10, please go ahead. Best, Conrad From owner-svn-src-all@freebsd.org Tue Feb 2 21:17:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEA7EA999AA; Tue, 2 Feb 2016 21:17:26 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A19398B; Tue, 2 Feb 2016 21:17:26 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12LHPhS056634; Tue, 2 Feb 2016 21:17:25 GMT (envelope-from skra@FreeBSD.org) Received: (from skra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12LHP7M056632; Tue, 2 Feb 2016 21:17:25 GMT (envelope-from skra@FreeBSD.org) Message-Id: <201602022117.u12LHP7M056632@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skra set sender to skra@FreeBSD.org using -f From: Svatopluk Kraus Date: Tue, 2 Feb 2016 21:17:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295168 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 21:17:26 -0000 Author: skra Date: Tue Feb 2 21:17:25 2016 New Revision: 295168 URL: https://svnweb.freebsd.org/changeset/base/295168 Log: Use pmap_preboot_map_attr() directly in arm_devmap_bootstrap() instead of hiding behind pmap_map_chunk(). It's not longer needed after old pmap-v6 code was removed. For compatibility with __ARM_ARCH < 6, define PTE_DEVICE in devmap.c file. Certainly, it would be nice if VM_MEMATTR_DEVICE could be used even for __ARM_ARCH < 6. Modified: head/sys/arm/arm/devmap.c head/sys/arm/include/pmap-v6.h Modified: head/sys/arm/arm/devmap.c ============================================================================== --- head/sys/arm/arm/devmap.c Tue Feb 2 21:11:23 2016 (r295167) +++ head/sys/arm/arm/devmap.c Tue Feb 2 21:17:25 2016 (r295168) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -52,6 +53,9 @@ static boolean_t devmap_bootstrap_done = #define PTE_DEVICE VM_MEMATTR_DEVICE #elif defined(__arm__) #define MAX_VADDR ARM_VECTORS_HIGH +#if __ARM_ARCH >= 6 +#define PTE_DEVICE VM_MEMATTR_DEVICE +#endif #endif /* @@ -204,8 +208,13 @@ arm_devmap_bootstrap(vm_offset_t l1pt, c for (pd = devmap_table; pd->pd_size != 0; ++pd) { #if defined(__arm__) +#if __ARM_ARCH >= 6 + pmap_preboot_map_attr(pd->pd_pa, pd->pd_va, pd->pd_size, + pd->pd_prot, pd->pd_cache); +#else pmap_map_chunk(l1pt, pd->pd_va, pd->pd_pa, pd->pd_size, - pd->pd_prot,pd->pd_cache); + pd->pd_prot, pd->pd_cache); +#endif #elif defined(__aarch64__) pmap_kenter_device(pd->pd_va, pd->pd_size, pd->pd_pa); #endif Modified: head/sys/arm/include/pmap-v6.h ============================================================================== --- head/sys/arm/include/pmap-v6.h Tue Feb 2 21:11:23 2016 (r295167) +++ head/sys/arm/include/pmap-v6.h Tue Feb 2 21:17:25 2016 (r295168) @@ -218,12 +218,6 @@ vm_offset_t pmap_preboot_reserve_pages(u vm_offset_t pmap_preboot_get_vpages(u_int ); void pmap_preboot_map_attr(vm_paddr_t, vm_offset_t, vm_size_t, vm_prot_t, vm_memattr_t); -static __inline void -pmap_map_chunk(vm_offset_t l1pt, vm_offset_t va, vm_offset_t pa, - vm_size_t size, int prot, int cache) -{ - pmap_preboot_map_attr(pa, va, size, prot, cache); -} #endif /* _KERNEL */ @@ -256,29 +250,6 @@ pmap_map_chunk(vm_offset_t l1pt, vm_offs */ void vector_page_setprot(int); -/* - * sys/arm/arm/bus_space_generic.c (just comment) - * sys/arm/arm/devmap.c - * sys/arm/arm/pmap.c (just comment) - * sys/arm/at91/at91_machdep.c - * sys/arm/cavium/cns11xx/econa_machdep.c - * sys/arm/freescale/imx/imx6_machdep.c (just comment) - * sys/arm/mv/orion/db88f5xxx.c - * sys/arm/mv/mv_localbus.c - * sys/arm/mv/mv_machdep.c - * sys/arm/mv/mv_pci.c - * sys/arm/s3c2xx0/s3c24x0_machdep.c - * sys/arm/versatile/versatile_machdep.c - * sys/arm/xscale/ixp425/avila_machdep.c - * sys/arm/xscale/i8134x/crb_machdep.c - * sys/arm/xscale/i80321/ep80219_machdep.c - * sys/arm/xscale/i80321/iq31244_machdep.c - * sys/arm/xscale/pxa/pxa_machdep.c - */ -#define PTE_DEVICE PTE2_ATTR_DEVICE - - - #endif /* _KERNEL */ // ----------------------------------------------------------------------------- From owner-svn-src-all@freebsd.org Tue Feb 2 21:21:54 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C17AA99B76; Tue, 2 Feb 2016 21:21:54 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 6BFF3C27; Tue, 2 Feb 2016 21:21:54 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from Alfreds-MacBook-Pro-2.local (unknown [IPv6:2601:645:8001:cee1:c76:2f7d:b92b:76e4]) by elvis.mu.org (Postfix) with ESMTPSA id 66630345A92E; Tue, 2 Feb 2016 13:21:53 -0800 (PST) Subject: Re: svn commit: r295136 - in head: sys/kern sys/netinet sys/sys usr.bin/netstat To: Slawa Olhovchenkov References: <201602020557.u125vxCP084718@repo.freebsd.org> <36439709.poT7RgRunK@ralph.baldwin.cx> <56B10D67.4050602@freebsd.org> <56B11323.70905@freebsd.org> <20160202210958.GV37895@zxy.spb.ru> Cc: Xin LI , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , John Baldwin From: Alfred Perlstein Organization: FreeBSD Message-ID: <56B11DF0.3060401@freebsd.org> Date: Tue, 2 Feb 2016 13:21:52 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160202210958.GV37895@zxy.spb.ru> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 21:21:54 -0000 On 2/2/16 1:09 PM, Slawa Olhovchenkov wrote: > On Tue, Feb 02, 2016 at 12:35:47PM -0800, Alfred Perlstein wrote: > >>> I would second John's comment on the necessity of the change though, >>> if one already have 32K of *backlogged* connections, it's probably not >>> very useful to allow more coming in. It sounds like the application >>> itself is seriously broken, and unless expanding the field have some >>> performance benefit, I don't think it should stay. >> Imagine a hugely busy image board like 2ch.net, if there is a single >> hiccup, it's very possible to start dropping connections. > In reality start dropping connections in any case: nobody will be > infinity wait of accept (user close browser and go away, etc). > > Also, if you have more then 4K backloged connections -- you have > problem, you can't process all connections request and in next second > you will be have 8K, after next second -- 12K and etc. > Thank you Slawa, I am pretty familiar with what you are describing which are "cascade failures", however in order to understand why such a change makes sense I can give you a little early history lesson on a project I developed under FreeBSD, and then explain why such a project would probably not work with FreeBSD as a platform today (we would have to use Linux or custom patches). Here is that use case: Back in 1999 I wrote a custom webserver using FreeBSD that was processing over 1500 connections per second. What we were doing was tracking web hits using "hidden gifs". Now this was 1999 with only 100mbit hardware and a pentium 400mhz. Mind you I was doing this with cpu to spare, so having an influx of additional hits was OK. Meaning I could easily deal with backlog. Now what was important about this case was that EVERY time we served the data we were able to monitize it and pay for my salary at the time which was working on SMP for FreeBSD and a bunch of other patches. Any lost hits / broken connections would easily cost us money, which in turn meant less time on FreeBSD and less time fixing things to scale. In our case the user would not really know if our "page" didn't load because we were just an invisible gif. So back to the example, let's scale that out to today's numbers. 100mbps -> 10gigE, so that would be 1500 conn/sec -> 150,000 conn/sec. so basically at 0.20 of a second of any sort of latency I will be overflowing the listen queue and dropping connections. Now when you still have CPU to spare because connections *are* precious, then the model makes sense to slightly over-provision the servers to allow for somebacklog to be processed. So, in today's day and age, it really does make sense to allow for buffering more than 32k connections, particularly if the developer knows what he is doing. Does this help explain the reasoning? thanks! -Alfred From owner-svn-src-all@freebsd.org Tue Feb 2 21:41:14 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AE9EA990EF; Tue, 2 Feb 2016 21:41:14 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A3B31591; Tue, 2 Feb 2016 21:41:14 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1aQihE-00026L-ER; Wed, 03 Feb 2016 00:41:12 +0300 Date: Wed, 3 Feb 2016 00:41:12 +0300 From: Slawa Olhovchenkov To: Alfred Perlstein Cc: Xin LI , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , John Baldwin Subject: Re: svn commit: r295136 - in head: sys/kern sys/netinet sys/sys usr.bin/netstat Message-ID: <20160202214112.GR88527@zxy.spb.ru> References: <201602020557.u125vxCP084718@repo.freebsd.org> <36439709.poT7RgRunK@ralph.baldwin.cx> <56B10D67.4050602@freebsd.org> <56B11323.70905@freebsd.org> <20160202210958.GV37895@zxy.spb.ru> <56B11DF0.3060401@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56B11DF0.3060401@freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 21:41:14 -0000 On Tue, Feb 02, 2016 at 01:21:52PM -0800, Alfred Perlstein wrote: > >>> I would second John's comment on the necessity of the change though, > >>> if one already have 32K of *backlogged* connections, it's probably not > >>> very useful to allow more coming in. It sounds like the application > >>> itself is seriously broken, and unless expanding the field have some > >>> performance benefit, I don't think it should stay. > >> Imagine a hugely busy image board like 2ch.net, if there is a single > >> hiccup, it's very possible to start dropping connections. > > In reality start dropping connections in any case: nobody will be > > infinity wait of accept (user close browser and go away, etc). > > > > Also, if you have more then 4K backloged connections -- you have > > problem, you can't process all connections request and in next second > > you will be have 8K, after next second -- 12K and etc. > > > In our case the user would not really know if our "page" didn't load > because we were just an invisible gif. > > So back to the example, let's scale that out to today's numbers. > > 100mbps -> 10gigE, so that would be 1500 conn/sec -> 150,000 conn/sec. > so basically at 0.20 of a second of any sort of latency I will be > overflowing the listen queue and dropping connections. OK, you talk about very specilal case -- extremaly short connections, about one data packet. Yes, in this case you got this behaivor. I think case of 2ch is different. > Now when you still have CPU to spare because connections *are* precious, > then the model makes sense to slightly over-provision the servers to > allow for somebacklog to be processed. > > So, in today's day and age, it really does make sense to allow for > buffering more than 32k connections, particularly if the developer knows > what he is doing. > > Does this help explain the reasoning? Yes, some special cases may be exist. From owner-svn-src-all@freebsd.org Tue Feb 2 21:58:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D3F9A99843; Tue, 2 Feb 2016 21:58:18 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F1528C; Tue, 2 Feb 2016 21:58:18 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12LwHuo068297; Tue, 2 Feb 2016 21:58:17 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12LwHtr068296; Tue, 2 Feb 2016 21:58:17 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201602022158.u12LwHtr068296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 2 Feb 2016 21:58:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295169 - head/usr.sbin/sysrc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 21:58:18 -0000 Author: dteske Date: Tue Feb 2 21:58:17 2016 New Revision: 295169 URL: https://svnweb.freebsd.org/changeset/base/295169 Log: Replace (Qo \ Qc) with (Qo (space) Qc) When using col(1) piped to vim(1) as pager for man(1), the former sequence of (Qo \ Qc) renders as "" without the space. Replace with (Qo (space) Qc) which renders properly in more (all?) pagers. Modified: head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc.8 ============================================================================== --- head/usr.sbin/sysrc/sysrc.8 Tue Feb 2 21:17:25 2016 (r295168) +++ head/usr.sbin/sysrc/sysrc.8 Tue Feb 2 21:58:17 2016 (r295169) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2011-2015 Devin Teske +.\" Copyright (c) 2011-2016 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 12, 2015 +.Dd February 2, 2016 .Dt SYSRC 8 .Os .Sh NAME @@ -255,7 +255,7 @@ When using the .Ql key+=value syntax to add items to existing values, the first character of the value is taken as the delimiter separating items -.Pq usually Qo \ Qc or Qo , Qc . +.Pq usually Qo (space) Qc or Qo , Qc . For example, in the following statement: .Bl -item -offset indent .It From owner-svn-src-all@freebsd.org Tue Feb 2 22:03:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E73C8A99AE0; Tue, 2 Feb 2016 22:03:15 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 814DC753; Tue, 2 Feb 2016 22:03:15 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-wm0-x22f.google.com with SMTP id r129so138719268wmr.0; Tue, 02 Feb 2016 14:03:15 -0800 (PST) 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=S28GK0VAu37GzUJmHwSwBmMM1590taueVtAe1z7kH3w=; b=ww1x5/fFBtxeTfeUnfvtG/Qc3lLidzu+QhxfQupU3qBgfYWT5YpVUdUrDs7qY0lpxV eiZudYoU+reMl6BnJckpCy+A8jFyvPSmI/O5r+0AM3GUfXem/rhe+VYcG/rI4CgDERpP GlDEt9XVE28TIgE/nYxS8OnALaA6Pj6ZavK77zefQj0NdhLJ58v09MXyfK9T6Uq4K29X Z8A8ZXLtDES0bhRE9UQpOfYrfNlkzJz8ZXwXdL/kiVQlmyUMIY4z6W0vAgXRqRRpc9kR ICWFQKQmKdXVjHuQeFScs/WB9PDnsMDPAtLkLLsyitUVByTn/7D/EWOcOwSxECpsIlsG mqUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=S28GK0VAu37GzUJmHwSwBmMM1590taueVtAe1z7kH3w=; b=k+/6n+QhavatbnvOcFJVQbtxY2EYM96NOoaSXQQa6FgErs2oPveftKlzli+TTQSWu6 ldBEaeQGdaOYiGkAqV+hQTCvvdB9XzSbQwBKk6z6FZv1YodSZolR9frPTqNEq8WX3mOi GKz/melKdJe7CWjd+ahUjp/svfEGu2I7bMtit5hipRJOa2pkPfSJwY3z6zIzi7gVvaWt NXdX4Pe7zp0XlYXSGz605O3uNXKoP/Ou2ugHBoCrQKo68AR0+0aDrPoI981L4fG2XaQV a3NtySgA6O3Ed8dektpI1A32DXUCo59fbePmmbLImPTPKMHiJwk4YTuMm1SapfzXp1AO M3ag== X-Gm-Message-State: AG10YOTR8YUzzaXuG9UM12JNFdRphegXaFYtINXl6IlVFSvgPE+0cKxROgBcstBkPwJdXxDf64Wh35W6hsSatA== MIME-Version: 1.0 X-Received: by 10.194.119.68 with SMTP id ks4mr30117843wjb.45.1454450593965; Tue, 02 Feb 2016 14:03:13 -0800 (PST) Received: by 10.27.170.11 with HTTP; Tue, 2 Feb 2016 14:03:13 -0800 (PST) In-Reply-To: <201602022158.u12LwHtr068296@repo.freebsd.org> References: <201602022158.u12LwHtr068296@repo.freebsd.org> Date: Tue, 2 Feb 2016 16:03:13 -0600 Message-ID: Subject: Re: svn commit: r295169 - head/usr.sbin/sysrc From: Benjamin Kaduk To: Devin Teske Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 22:03:16 -0000 On Tue, Feb 2, 2016 at 3:58 PM, Devin Teske wrote: > Author: dteske > Date: Tue Feb 2 21:58:17 2016 > New Revision: 295169 > URL: https://svnweb.freebsd.org/changeset/base/295169 > > Log: > Replace (Qo \ Qc) with (Qo (space) Qc) > > When using col(1) piped to vim(1) as pager for man(1), the former > sequence > of (Qo \ Qc) renders as "" without the space. Replace with (Qo (space) > Qc) > which renders properly in more (all?) pagers. > mdoc(7) also suggests using double-quotes (" ") to escape literal spaces; did you try that? -Ben From owner-svn-src-all@freebsd.org Tue Feb 2 22:18:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2C60A99F2E; Tue, 2 Feb 2016 22:18:44 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7ACA1E25; Tue, 2 Feb 2016 22:18:44 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12MIhgg074143; Tue, 2 Feb 2016 22:18:43 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12MIhNW074141; Tue, 2 Feb 2016 22:18:43 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201602022218.u12MIhNW074141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 2 Feb 2016 22:18:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295170 - head/usr.sbin/sysrc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 22:18:44 -0000 Author: dteske Date: Tue Feb 2 22:18:43 2016 New Revision: 295170 URL: https://svnweb.freebsd.org/changeset/base/295170 Log: For +=/-=, add . and / to convenience characters sysrc(8) supports key+=value and key-=value, but can be told what the delimiter is by being passed as char1 (e.g., "sysrc key+=",value" to use a comma as the delimiter instead of space). For convenience, if the first char is alpha-numeric, it is assumed you wanted whitespace as the delimiter. However, if you naively (as I just did) execute: sysrc rc_conf_files+=/etc/rc.conf.other the result is unexpected. This commit makes `.' and `/' in-addition to alpha-numeric first-characters to cause the default of whitespace to be used as the delimiter. This also means that you can no longer use these as a delimiter. Modified: head/usr.sbin/sysrc/sysrc head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc ============================================================================== --- head/usr.sbin/sysrc/sysrc Tue Feb 2 21:58:17 2016 (r295169) +++ head/usr.sbin/sysrc/sysrc Tue Feb 2 22:18:43 2016 (r295170) @@ -790,7 +790,7 @@ while [ $# -gt 0 ]; do delim="${add%"${add#?}"}" # first character oldIFS="$IFS" case "$delim" in - ""|[$IFS]|[a-zA-Z0-9]) delim=" " ;; + ""|[$IFS]|[a-zA-Z0-9./]) delim=" " ;; *) IFS="$delim" esac new="$before" @@ -812,7 +812,7 @@ while [ $# -gt 0 ]; do delim="${remove%"${remove#?}"}" # first character oldIFS="$IFS" case "$delim" in - ""|[$IFS]|[a-zA-Z0-9]) delim=" " ;; + ""|[$IFS]|[a-zA-Z0-9./]) delim=" " ;; *) IFS="$delim" esac new= Modified: head/usr.sbin/sysrc/sysrc.8 ============================================================================== --- head/usr.sbin/sysrc/sysrc.8 Tue Feb 2 21:58:17 2016 (r295169) +++ head/usr.sbin/sysrc/sysrc.8 Tue Feb 2 22:18:43 2016 (r295170) @@ -275,6 +275,10 @@ it is added .Pp For convenience, if the first character is alpha-numeric .Pq letters A-Z, a-z, or numbers 0-9 , +dot +.Pq Li . , +or slash +.Pq Li / , .Nm uses the default setting of whitespace as separator. For example, the above and below statements are equivalent since @@ -329,6 +333,10 @@ it is removed .Pp For convenience, if the first character is alpha-numeric .Pq letters A-Z, a-z, or numbers 0-9 , +dot +.Pq Li . , +or slash +.Pq Li / , .Nm uses the default setting of whitespace as separator. For example, the above and below statements are equivalent since From owner-svn-src-all@freebsd.org Tue Feb 2 22:18:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2B86A99F58; Tue, 2 Feb 2016 22:18:53 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BCCD0F6B; Tue, 2 Feb 2016 22:18:53 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x22d.google.com with SMTP id 9so34638656iom.1; Tue, 02 Feb 2016 14:18:53 -0800 (PST) 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=wkWDzV7RUEj2da9qd2vBlW/jBFfnGju/BBsvPdZdX4k=; b=vSu27iQA80RJNogUtWW0uGJqCa9VTUE/5zlBdbUP1SDoirO6JByWEEIQoRUxgzR1+t BZXYFRgWo0PIZRLDtVET7iDa0iU1qPxh2qnujWYwt1TUPYkRB73W1SX6/Tu+1SGpASNX UAYIOIGmSW3auF7kUYIa9ADD3C/ycWyi0RRTa8HJGQ4fQip0amKs1aw3JNE8C4xE5Djj Yx0x1q58nD+u7rlfWSDSoqZkn0X/NhMjJoIHTy67YmKEwQLTVAaOuetYrSqSsFBXcnNJ 4rX1+SpGPifF70jBM3COVS6z7AO+yB4k/l51QSdyYBLPlMJuZJkEc2igpSmF1ZzGkenX Ha6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=wkWDzV7RUEj2da9qd2vBlW/jBFfnGju/BBsvPdZdX4k=; b=GTSTkEgNh9M4ik1Q11WISZCUPVRoHOXcreE8m6/jF9fvyifILwJWr4BxsLcbIXnxom ZvYXyy4WRNcf9SLRCd4VwRP57OKTkzYajQD3zcR6FZDe46QhmmRH7uurnSFrFSu3J30K D465Qosp7RIGQ5/EyN5I8jdNE/f3Gtlrw7SZwKPz3IxWCGNL9KugLu/G3rCMPPW3PUlJ 2CycL4eMLOxAJaU0n5t2ls9QBPpV76k5er8URwb+wd2sOd6IPJclfqWXFIrq5EFyRAJD kyXAMxOt5VZ5/tz4fU7y97BArPk0k/5yVXJB2TWsZ5GjxX60x8qOCnY4ms1BJPqkHpol yMbA== X-Gm-Message-State: AG10YORry1xnBcujYyj1aE+awCcv0rhnOzeipDfM5wN6LlL5DSphr0EVGScOyWrzBiR71B/DZervgHI00eehYQ== MIME-Version: 1.0 X-Received: by 10.107.132.142 with SMTP id o14mr18459ioi.75.1454451533123; Tue, 02 Feb 2016 14:18:53 -0800 (PST) Received: by 10.36.14.19 with HTTP; Tue, 2 Feb 2016 14:18:53 -0800 (PST) In-Reply-To: <56B11DF0.3060401@freebsd.org> References: <201602020557.u125vxCP084718@repo.freebsd.org> <36439709.poT7RgRunK@ralph.baldwin.cx> <56B10D67.4050602@freebsd.org> <56B11323.70905@freebsd.org> <20160202210958.GV37895@zxy.spb.ru> <56B11DF0.3060401@freebsd.org> Date: Tue, 2 Feb 2016 14:18:53 -0800 Message-ID: Subject: Re: svn commit: r295136 - in head: sys/kern sys/netinet sys/sys usr.bin/netstat From: Adrian Chadd To: Alfred Perlstein Cc: Slawa Olhovchenkov , Xin LI , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , John Baldwin Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 22:18:54 -0000 On 2 February 2016 at 13:21, Alfred Perlstein wrote: > > > On 2/2/16 1:09 PM, Slawa Olhovchenkov wrote: >> >> On Tue, Feb 02, 2016 at 12:35:47PM -0800, Alfred Perlstein wrote: >> >>>> I would second John's comment on the necessity of the change though, >>>> if one already have 32K of *backlogged* connections, it's probably not >>>> very useful to allow more coming in. It sounds like the application >>>> itself is seriously broken, and unless expanding the field have some >>>> performance benefit, I don't think it should stay. >>> >>> Imagine a hugely busy image board like 2ch.net, if there is a single >>> hiccup, it's very possible to start dropping connections. >> >> In reality start dropping connections in any case: nobody will be >> infinity wait of accept (user close browser and go away, etc). >> >> Also, if you have more then 4K backloged connections -- you have >> problem, you can't process all connections request and in next second >> you will be have 8K, after next second -- 12K and etc. >> > Thank you Slawa, > > I am pretty familiar with what you are describing which are "cascade > failures", however in order to understand why such a change makes sense I > can give you a little early history lesson on a project I developed under > FreeBSD, and then explain why such a project would probably not work with > FreeBSD as a platform today (we would have to use Linux or custom patches). > > Here is that use case: > > Back in 1999 I wrote a custom webserver using FreeBSD that was processing > over 1500 connections per second. > > What we were doing was tracking web hits using "hidden gifs". Now this was > 1999 with only 100mbit hardware and a pentium 400mhz. Mind you I was doing > this with cpu to spare, so having an influx of additional hits was OK. > > Meaning I could easily deal with backlog. > > Now what was important about this case was that EVERY time we served the > data we were able to monitize it and pay for my salary at the time which was > working on SMP for FreeBSD and a bunch of other patches. Any lost hits / > broken connections would easily cost us money, which in turn meant less time > on FreeBSD and less time fixing things to scale. > > In our case the user would not really know if our "page" didn't load because > we were just an invisible gif. > > So back to the example, let's scale that out to today's numbers. > > 100mbps -> 10gigE, so that would be 1500 conn/sec -> 150,000 conn/sec. so > basically at 0.20 of a second of any sort of latency I will be overflowing > the listen queue and dropping connections. > > Now when you still have CPU to spare because connections *are* precious, > then the model makes sense to slightly over-provision the servers to allow > for somebacklog to be processed. > > So, in today's day and age, it really does make sense to allow for buffering > more than 32k connections, particularly if the developer knows what he is > doing. > > Does this help explain the reasoning? Just to add to this: the VM system under ridiculous load (like say, deciding it can dirty most of your half-terabyte of RAM and get behind in writing stuff to disk) can cause the system to pause for little pieces of time. It sucks, but it happens. 0.20 seconds isn't all that long. And that's at 150,000 conn/sec. There's TCP locking work that will hopefully increase that value.. -a From owner-svn-src-all@freebsd.org Tue Feb 2 22:21:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB46DA980BE for ; Tue, 2 Feb 2016 22:21:00 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 66DBD121C for ; Tue, 2 Feb 2016 22:21:00 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-wm0-x22b.google.com with SMTP id l66so44193208wml.0 for ; Tue, 02 Feb 2016 14:21:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=LsFZeQeKnDhtSbfgOPHYXJU8Elp9Qsl4QFBV6wNlJ0k=; b=NOQhtde6m4AVH27Y60fqcxWw62c5o3BL3gnb2nFVctbqXkrvRaFn8qD6NSPrzOvgUf UmXMNPOn2FVLBXWofA5USeWTlLGnThC1kqbOx7av8mbv1AXFmEzZ1IQuyzMBaPMKSz7A iZ5nTk8nLUjrUNJqShP7VccfqQ+LJUfC3ijFuPB4Zfyt4buaP30JfkxAV1dNlFBKZzk+ //+sV2VuKA37XLhCTuOtwguIyTg2ZHlTi2UvZifHO8tInW4BvZkL8TAldePiXZ5ek/8/ lxc0xWsCpx0S0Z4myTKWb911OzRM0rZGRZhn/E6ewMzzfLzueEVm+13CzjqDLH2j7L2J v8Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=LsFZeQeKnDhtSbfgOPHYXJU8Elp9Qsl4QFBV6wNlJ0k=; b=JpKmSD2P6On4ISmKiaWwKiv28TvBplJWw05sTZrDeUJzFvgXOwTx76BJkJbNLceqy8 FOq8sOmrrD+DSRNgqWcZjXONFYBrnb28PIYEmAqerbLr88I1XskyuSaYdryz2G6E/BGU JjDDiunf1dYlMbhajwtLAWH+iunUFkWSNlZzV9neA0rvUuLf4Yq3FVwR0JeAw9VBd4rS zPq+a7P3diq6hq8iKQbAb2w8hgzzmlmbZ5l6z5dzGEl7VANNyTLwB0it+6XtPqxUrJTg 37ba1Am/j4jW78xvPHTTbfUHpCpe5gMWobNV9Oq+UdfLEK8gURYTfgd35CXEARQdT4a1 3BGA== X-Gm-Message-State: AG10YOTv72wex6MBOBg9G2Yv3O9fM2PbhA/7qApEjXm7zPgXKZrhr2ZIw8yisAh8Eewu0crpRe6hS9AqKRm17Gne MIME-Version: 1.0 X-Received: by 10.28.5.213 with SMTP id 204mr77609wmf.20.1454451658906; Tue, 02 Feb 2016 14:20:58 -0800 (PST) Received: by 10.194.82.6 with HTTP; Tue, 2 Feb 2016 14:20:58 -0800 (PST) In-Reply-To: <201602022110.u12LAiEv053537@repo.freebsd.org> References: <201602022110.u12LAiEv053537@repo.freebsd.org> Date: Tue, 2 Feb 2016 23:20:58 +0100 Message-ID: Subject: Re: svn commit: r295165 - head/contrib/openresolv From: Oliver Pinter To: "Pedro F. Giffuni" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 22:21:01 -0000 On 2/2/16, Pedro F. Giffuni wrote: > Author: pfg > Date: Tue Feb 2 21:10:43 2016 > New Revision: 295165 > URL: https://svnweb.freebsd.org/changeset/base/295165 > > Log: > MFV r295109: > Update openresolve to version 3.7.2 This was not 3.7.1? > > Relnotes: yes > > Modified: > head/contrib/openresolv/Makefile > head/contrib/openresolv/resolvconf.8.in > head/contrib/openresolv/resolvconf.conf.5.in > head/contrib/openresolv/resolvconf.in > head/contrib/openresolv/unbound.in > Directory Properties: > head/contrib/openresolv/ (props changed) > > Modified: head/contrib/openresolv/Makefile > ============================================================================== > --- head/contrib/openresolv/Makefile Tue Feb 2 21:06:09 2016 (r295164) > +++ head/contrib/openresolv/Makefile Tue Feb 2 21:10:43 2016 (r295165) > @@ -1,5 +1,5 @@ > PKG= openresolv > -VERSION= 3.7.0 > +VERSION= 3.7.1 > > # Nasty hack so that make clean works without configure being run > _CONFIG_MK!= test -e config.mk && echo config.mk || echo config-null.mk > @@ -37,7 +37,7 @@ SED_RESTARTCMD= -e 's:@RESTARTCMD \(.*\ > > DISTPREFIX?= ${PKG}-${VERSION} > DISTFILEGZ?= ${DISTPREFIX}.tar.gz > -DISTFILE?= ${DISTPREFIX}.tar.bz2 > +DISTFILE?= ${DISTPREFIX}.tar.xz > FOSSILID?= current > > .SUFFIXES: .in > @@ -77,9 +77,9 @@ install: proginstall maninstall > import: > rm -rf /tmp/${DISTPREFIX} > ${INSTALL} -d /tmp/${DISTPREFIX} > - cp README ${SRCS} /tmp/${DISPREFIX} > + cp README ${SRCS} /tmp/${DISTPREFIX} > > dist: > fossil tarball --name ${DISTPREFIX} ${FOSSILID} ${DISTFILEGZ} > - gunzip -c ${DISTFILEGZ} | bzip2 >${DISTFILE} > + gunzip -c ${DISTFILEGZ} | xz >${DISTFILE} > rm ${DISTFILEGZ} > > Modified: head/contrib/openresolv/resolvconf.8.in > ============================================================================== > --- head/contrib/openresolv/resolvconf.8.in Tue Feb 2 21:06:09 > 2016 (r295164) > +++ head/contrib/openresolv/resolvconf.8.in Tue Feb 2 21:10:43 > 2016 (r295165) > @@ -22,7 +22,7 @@ > .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > .\" SUCH DAMAGE. > .\" > -.Dd April 27, 2014 > +.Dd April 27, 2015 > .Dt RESOLVCONF 8 > .Os > .Sh NAME > > Modified: head/contrib/openresolv/resolvconf.conf.5.in > ============================================================================== > --- head/contrib/openresolv/resolvconf.conf.5.in Tue Feb 2 21:06:09 > 2016 (r295164) > +++ head/contrib/openresolv/resolvconf.conf.5.in Tue Feb 2 21:10:43 > 2016 (r295165) > @@ -22,7 +22,7 @@ > .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > .\" SUCH DAMAGE. > .\" > -.Dd March 20, 2015 > +.Dd May 14, 2015 > .Dt RESOLVCONF.CONF 5 > .Os > .Sh NAME > @@ -91,6 +91,11 @@ To remove a block, you can use 192.168.* > These interfaces name servers will only be queried for the domains listed > in their resolv.conf. > Useful for VPN domains. > +Setting > +.Sy private_interfaces Ns ="*" > +will stop the forwarding of the root zone and allows the local resolver to > +recursively query the root servers directly. > +Requires a local nameserver other than libc. > This is equivalent to the > .Nm resolvconf -p > option. > @@ -149,7 +154,7 @@ When set to /dev/null or NULL, > .Sy resolv_conf_local_only > is defaulted to NO, > .Sy local_nameservers > -is unset unless overriden and only the information set in > +is unset unless overridden and only the information set in > .Nm > is written to > .Sy resolv_conf . > @@ -271,7 +276,7 @@ Each subscriber attempts to automaticall > distribution has been catered for. > Also, users could equally want to use a different version from the one > installed by default, such as bind8 and bind9. > -To accomodate this, the subscribers have these files in configurable > +To accommodate this, the subscribers have these files in configurable > variables, documented below. > .Pp > .Bl -tag -width indent > > Modified: head/contrib/openresolv/resolvconf.in > ============================================================================== > --- head/contrib/openresolv/resolvconf.in Tue Feb 2 21:06:09 > 2016 (r295164) > +++ head/contrib/openresolv/resolvconf.in Tue Feb 2 21:10:43 > 2016 (r295165) > @@ -50,7 +50,6 @@ elif [ -d "$SYSCONFDIR/resolvconf" ]; th > interface_order="$(cat "$SYSCONFDIR"/interface-order)" > fi > fi > -TMPDIR="$VARDIR/tmp" > IFACEDIR="$VARDIR/interfaces" > METRICDIR="$VARDIR/metrics" > PRIVATEDIR="$VARDIR/private" > > Modified: head/contrib/openresolv/unbound.in > ============================================================================== > --- head/contrib/openresolv/unbound.in Tue Feb 2 21:06:09 2016 (r295164) > +++ head/contrib/openresolv/unbound.in Tue Feb 2 21:10:43 2016 (r295165) > @@ -45,7 +45,8 @@ for d in $DOMAINS; do > ns="${d#*:}" > case "$unbound_insecure" in > [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) > - newconf="$newconf${NL}domain-insecure: \"$dn\"" > + newconf="$newconf${NL}server:$NL" > + newconf="$newconf domain-insecure: \"$dn\"$NL" > ;; > esac > newconf="$newconf${NL}forward-zone:$NL name: \"$dn\"$NL" > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Tue Feb 2 22:34:07 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E926AA98508 for ; Tue, 2 Feb 2016 22:34:07 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm44-vm10.bullet.mail.bf1.yahoo.com (nm44-vm10.bullet.mail.bf1.yahoo.com [216.109.115.46]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A58281D1E for ; Tue, 2 Feb 2016 22:34:07 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1454452440; bh=LcRTTUbyH7FF1Fsp96uOwRvF9+SkgBYOBXUVFNboQ8M=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=QIaa2G5JNKWeZ/VYR/YFye7gzeum2ltSTPd3l9Qa/nfDHC3rdUsrSCsJ6mKvM02k0HGQ5viyx5vKfCGJZlKYpbK13jAqGJlY4mmcYqozOg9XSjBFK2ZAPfp6ngeuYf0b1qlcaQoocyAM3N6GfjQtnhJKMkWYDubxqpGtwbAxvayhsxHpD3FIw33funLt3WhP/2LZ9f42n0eaQW9HKYKyC6lzWf93rrGgpZTRIc6rFUs18zHB4y7Cdr8OMXOF246zZvjfChv+FnvTLfS4lYGPu3hsbgm5MWgf8OkvrE7ee7EEKUop8RrkQk5mXebSSqf4tNEhpRk2WPI3d00KiYtiLA== Received: from [98.139.215.141] by nm44.bullet.mail.bf1.yahoo.com with NNFMP; 02 Feb 2016 22:34:00 -0000 Received: from [98.139.213.8] by tm12.bullet.mail.bf1.yahoo.com with NNFMP; 02 Feb 2016 22:34:00 -0000 Received: from [127.0.0.1] by smtp108.mail.bf1.yahoo.com with NNFMP; 02 Feb 2016 22:34:00 -0000 X-Yahoo-Newman-Id: 803388.49929.bm@smtp108.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: thXibvYVM1nOoagWOr0YWSsm9SvWTbGjQY7UjMyXrxu0KOG m03TgjiUkOhRO.nbEROZFIwrL_YNB6ZfwUAi7XOpDL3rboOpRBQ3SOOwQU63 n0xWoNEeLvDw4brtqnxFImOFrSJvuBNrnC01rwkBmiLvj5147iIcbY7qzWRW fWyicAvqEnISJaFLRXUymbhlnY1ynxl2TRR5axgRU8btjqaUf65RfgbflgH0 H9XmFIeCfeH5AGi2KVzw72TBRco3Z7We5coa9rxxhFE_mIUv.w0sYaVEBvwi j0d_WxA8Ijj5u5DYtVbYOAYbw1s82IOowN_lR.vN1czQWq2i6AGm38PgsQbS 411JWytzQ9B.hlAgFPpnMyfXOGrIETuzMhQoxg_qMfLr8rxm6sSryva_laef QfmObO.n68ZqkJYnY6M_ZaP2LHCd67LIX1cU8FSdsTkItT7Fxp4zii9AaBEz t8RkZI4GNIsgUme8NuDWZX34mXiMQMOlCmy6HulSCeyDb4GK9gJsP9zJK0gt asJczEdgzf.mf3vS1S5t0XqoY12JLctc- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r295165 - head/contrib/openresolv To: Oliver Pinter References: <201602022110.u12LAiEv053537@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Pedro Giffuni Message-ID: <56B12EDB.7060106@FreeBSD.org> Date: Tue, 2 Feb 2016 17:34:03 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 22:34:08 -0000 On 02/02/16 17:20, Oliver Pinter wrote: > On 2/2/16, Pedro F. Giffuni wrote: >> Author: pfg >> Date: Tue Feb 2 21:10:43 2016 >> New Revision: 295165 >> URL: https://svnweb.freebsd.org/changeset/base/295165 >> >> Log: >> MFV r295109: >> Update openresolve to version 3.7.2 > > This was not 3.7.1? > No .. I downloaded 3.7.2 but upstream kept the version at 3.7.1 internally. Pedro. From owner-svn-src-all@freebsd.org Tue Feb 2 22:34:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98C18A9856D; Tue, 2 Feb 2016 22:34:49 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AD3B1E84; Tue, 2 Feb 2016 22:34:49 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12MYmcF079942; Tue, 2 Feb 2016 22:34:48 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12MYmS5079941; Tue, 2 Feb 2016 22:34:48 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201602022234.u12MYmS5079941@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 2 Feb 2016 22:34:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295173 - head/usr.sbin/sysrc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 22:34:49 -0000 Author: dteske Date: Tue Feb 2 22:34:48 2016 New Revision: 295173 URL: https://svnweb.freebsd.org/changeset/base/295173 Log: Bump version to 7.1 for +=/-= fix MFC after: 3 days X-MFC-to: stable/10 X-MFC-with: r295169, r295170 Modified: head/usr.sbin/sysrc/sysrc Modified: head/usr.sbin/sysrc/sysrc ============================================================================== --- head/usr.sbin/sysrc/sysrc Tue Feb 2 22:27:48 2016 (r295172) +++ head/usr.sbin/sysrc/sysrc Tue Feb 2 22:34:48 2016 (r295173) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010-2015 Devin Teske +# Copyright (c) 2010-2016 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -40,7 +40,7 @@ BSDCFG_SHARE="/usr/share/bsdconfig" # # Version information # -SYSRC_VERSION="7.0 Sep-13,2015" +SYSRC_VERSION="7.1 Feb-2,2016" # # Options From owner-svn-src-all@freebsd.org Tue Feb 2 22:55:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB41EA9990D; Tue, 2 Feb 2016 22:55:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF4B71CE2; Tue, 2 Feb 2016 22:55:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12Mt3Jp092017; Tue, 2 Feb 2016 22:55:03 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12Mt33F092015; Tue, 2 Feb 2016 22:55:03 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201602022255.u12Mt33F092015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Feb 2016 22:55:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295174 - in head: lib/libdevctl usr.sbin/devctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 22:55:05 -0000 Author: jhb Date: Tue Feb 2 22:55:03 2016 New Revision: 295174 URL: https://svnweb.freebsd.org/changeset/base/295174 Log: - Note that devctl(8) will appear in 10.3 first. - Add missing devctl_set_driver entry to namelist in devlist(3). - Fix sorting of function prototypes in devlist(3). MFC after: 3 days Modified: head/lib/libdevctl/devctl.3 head/usr.sbin/devctl/devctl.8 Modified: head/lib/libdevctl/devctl.3 ============================================================================== --- head/lib/libdevctl/devctl.3 Tue Feb 2 22:34:48 2016 (r295173) +++ head/lib/libdevctl/devctl.3 Tue Feb 2 22:55:03 2016 (r295174) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 26, 2014 +.Dd February 2, 2016 .Dt DEVCTL 3 .Os .Sh NAME @@ -35,6 +35,7 @@ .Nm devctl_disable , .Nm devctl_enable , .Nm devctl_resume , +.Nm devctl_set_driver , .Nm devctl_suspend .Nd device control library .Sh LIBRARY @@ -52,9 +53,9 @@ .Ft int .Fn devctl_resume "const char *device" .Ft int -.Fn devctl_suspend "const char *device" -.Ft int .Fn devctl_set_driver "const char *device" "const char *driver" "bool force" +.Ft int +.Fn devctl_suspend "const char *device" .Sh DESCRIPTION The .Nm @@ -287,7 +288,7 @@ The new device driver failed to attach. The .Nm library first appeared in -.Fx 11.0 . +.Fx 10.3 . .Sh BUGS If a device is suspended individually via .Fn devctl_suspend Modified: head/usr.sbin/devctl/devctl.8 ============================================================================== --- head/usr.sbin/devctl/devctl.8 Tue Feb 2 22:34:48 2016 (r295173) +++ head/usr.sbin/devctl/devctl.8 Tue Feb 2 22:55:03 2016 (r295174) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 5, 2015 +.Dd February 2, 2016 .Dt DEVCTL 8 .Os .Sh NAME @@ -134,4 +134,4 @@ the device will not be changed. The .Nm utility first appeared in -.Fx 11.0 . +.Fx 10.3 . From owner-svn-src-all@freebsd.org Tue Feb 2 23:34:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48450A997D5; Tue, 2 Feb 2016 23:34:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1742F1B93; Tue, 2 Feb 2016 23:34:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12NXxh0008440; Tue, 2 Feb 2016 23:33:59 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12NXxCK008439; Tue, 2 Feb 2016 23:33:59 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201602022333.u12NXxCK008439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 2 Feb 2016 23:33:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295176 - head/lib/libc/nls X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 23:34:00 -0000 Author: bdrewery Date: Tue Feb 2 23:33:58 2016 New Revision: 295176 URL: https://svnweb.freebsd.org/changeset/base/295176 Log: Move logic to destroy a struct catentry to its own function. This will be used later for memory leak handling. Obtained from: OneFS Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/nls/msgcat.c Modified: head/lib/libc/nls/msgcat.c ============================================================================== --- head/lib/libc/nls/msgcat.c Tue Feb 2 23:23:37 2016 (r295175) +++ head/lib/libc/nls/msgcat.c Tue Feb 2 23:33:58 2016 (r295176) @@ -325,6 +325,21 @@ notfound: return ((char *)s); } +static void +catfree(struct catentry *np) +{ + + if (np->catd != NULL && np->catd != NLERR) { + munmap(np->catd->__data, (size_t)np->catd->__size); + free(np->catd); + } + SLIST_REMOVE(&cache, np, catentry, list); + free(np->name); + free(np->path); + free(np->lang); + free(np); +} + int catclose(nl_catd catd) { @@ -341,15 +356,8 @@ catclose(nl_catd catd) SLIST_FOREACH(np, &cache, list) { if (catd == np->catd) { np->refcount--; - if (np->refcount == 0) { - munmap(catd->__data, (size_t)catd->__size); - free(catd); - SLIST_REMOVE(&cache, np, catentry, list); - free(np->name); - free(np->path); - free(np->lang); - free(np); - } + if (np->refcount == 0) + catfree(np); break; } } From owner-svn-src-all@freebsd.org Tue Feb 2 23:50:48 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BB61A99DE1; Tue, 2 Feb 2016 23:50:48 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E1789F4; Tue, 2 Feb 2016 23:50:48 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [64.201.244.132] (port=29398 helo=[10.0.0.113]) by shxd.cx with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1aQkic-0004G1-UR; Tue, 02 Feb 2016 15:50:47 -0800 Message-ID: <1454457045.37056.69.camel@FreeBSD.org> Subject: Re: svn commit: r295169 - head/usr.sbin/sysrc From: Devin Teske To: Benjamin Kaduk Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , dteske@FreeBSD.org Date: Tue, 02 Feb 2016 15:50:45 -0800 In-Reply-To: References: <201602022158.u12LwHtr068296@repo.freebsd.org> X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Sender: devin@shxd.cx Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 23:50:48 -0000 On Tue, 2016-02-02 at 16:03 -0600, Benjamin Kaduk wrote: > On Tue, Feb 2, 2016 at 3:58 PM, Devin Teske > wrote: > > Author: dteske > > Date: Tue Feb 2 21:58:17 2016 > > New Revision: 295169 > > URL: https://svnweb.freebsd.org/changeset/base/295169 > > > > Log: > > Replace (Qo \ Qc) with (Qo (space) Qc) > > > > When using col(1) piped to vim(1) as pager for man(1), the former > > sequence > > of (Qo \ Qc) renders as "" without the space. Replace with (Qo > > (space) Qc) > > which renders properly in more (all?) pagers. > mdoc(7) also suggests using double-quotes (" ") to escape literal > spaces; did you try that? Did not try -- tried just now and it works. Will update with a commit. However... /me opens "man mdoc" (20 minutes later; confused as to where) I've read mdoc(7) several times and have never seen such a clarification. (which I might add; would be mighty useful if you can find it) -- Devin From owner-svn-src-all@freebsd.org Tue Feb 2 23:51:40 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBFE6A99E70; Tue, 2 Feb 2016 23:51:40 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B7EDD89; Tue, 2 Feb 2016 23:51:40 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12Npdjf014421; Tue, 2 Feb 2016 23:51:39 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12NpdJ4014420; Tue, 2 Feb 2016 23:51:39 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201602022351.u12NpdJ4014420@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 2 Feb 2016 23:51:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295177 - head/usr.sbin/sysrc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 23:51:40 -0000 Author: dteske Date: Tue Feb 2 23:51:39 2016 New Revision: 295177 URL: https://svnweb.freebsd.org/changeset/base/295177 Log: Fix a typo in a comment Modified: head/usr.sbin/sysrc/sysrc Modified: head/usr.sbin/sysrc/sysrc ============================================================================== --- head/usr.sbin/sysrc/sysrc Tue Feb 2 23:33:58 2016 (r295176) +++ head/usr.sbin/sysrc/sysrc Tue Feb 2 23:51:39 2016 (r295177) @@ -595,7 +595,7 @@ fi if [ "$SHOW_ALL" ]; then # # Get a list of variables that are currently set in the rc.conf(5) - # files (included `/etc/defaults/rc.conf') by performing a call to + # files (including `/etc/defaults/rc.conf') by performing a call to # source_rc_confs() in a clean environment. # ( # Operate in a sub-shell to protect the parent environment From owner-svn-src-all@freebsd.org Tue Feb 2 23:53:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3405A99EE9; Tue, 2 Feb 2016 23:53:04 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7BD8FF5C; Tue, 2 Feb 2016 23:53:04 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by mail-wm0-x232.google.com with SMTP id r129so141487495wmr.0; Tue, 02 Feb 2016 15:53:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=ERy2clm5xlO9z0mcm9ms/in2QfqB2Aw38ZDhveCymic=; b=MACIrOfipXY3UHmlhI76xoiom0tzaZfgibzHj4nKbIqmAP5xoNtJk+m9mBu78tGkwm lZcYcG2gVDCn6U1HYF4k7akPQ/vp9KK7ivkzXV/CqoWROUdL3eiCT/cSY7A5CCvili0p fSE5z4F/a+XMofr2Vk9zJBcxvnmO8Vldir1gpHdNN192pNThNRVahkW9eXefbrtZ+fiK 20TcEj3V2r49GEOKKmUs6NYXlUdm6cJCraukOM12yNeuCCjaL7HSmnm6s2HqCgmqvOY5 wGDdoACEq+5o/q8kR3l3aAophSw8C+fHCZsMycJXlwz77lJJbV+1lKpZRAOM35m59lCJ 2TNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=ERy2clm5xlO9z0mcm9ms/in2QfqB2Aw38ZDhveCymic=; b=iPXjct29RXJ95So5424KHhxd17Z41f9OV4zN16T54bRvVA6odgscGKHSlgaLT/kaQn jR5hclmvCgl/2rRRg0oborDsfH8N3HjRT2aT+4kBDmwyZ/AQQaJBR+voAIerSmaoa105 0W0Ee8PVaFFwmW/0klkKIifaG0uvEK0t4bTY2Trvpi9bYqNkQFaWyZpFZJmzcaONZt/+ xEbFmnqVLx27XLo+nY12abjFrM6OY6PeV7B+3etUrNeql5ZLNBBG0l0kY94IFNr4EKmT gYCTcBMRGH44J6QroJEMzKHuzBFNnBHksuzGW/XNyLuIap8GPKtqhBWWnoq41JruEXme DwxA== X-Gm-Message-State: AG10YOQQjuvuvo1PY9TOmoLmHmlTFy1pVUYFw/Ni+T/qyJ8AIiH79oh3RHbyfi7H/D4Cyw== X-Received: by 10.28.90.67 with SMTP id o64mr19495008wmb.38.1454457182647; Tue, 02 Feb 2016 15:53:02 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id i5sm3686694wja.23.2016.02.02.15.53.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Feb 2016 15:53:01 -0800 (PST) Sender: Baptiste Daroussin Date: Wed, 3 Feb 2016 00:52:59 +0100 From: Baptiste Daroussin To: Devin Teske Cc: Benjamin Kaduk , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r295169 - head/usr.sbin/sysrc Message-ID: <20160202235259.GG12205@ivaldir.etoilebsd.net> References: <201602022158.u12LwHtr068296@repo.freebsd.org> <1454457045.37056.69.camel@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KR/qxknboQ7+Tpez" Content-Disposition: inline In-Reply-To: <1454457045.37056.69.camel@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 23:53:04 -0000 --KR/qxknboQ7+Tpez Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 02, 2016 at 03:50:45PM -0800, Devin Teske wrote: > On Tue, 2016-02-02 at 16:03 -0600, Benjamin Kaduk wrote: > > On Tue, Feb 2, 2016 at 3:58 PM, Devin Teske > > wrote: > > > Author: dteske > > > Date: Tue Feb 2 21:58:17 2016 > > > New Revision: 295169 > > > URL: https://svnweb.freebsd.org/changeset/base/295169 > > >=20 > > > Log: > > > Replace (Qo \ Qc) with (Qo (space) Qc) > > >=20 > > > When using col(1) piped to vim(1) as pager for man(1), the former > > > sequence > > > of (Qo \ Qc) renders as "" without the space. Replace with (Qo > > > (space) Qc) > > > which renders properly in more (all?) pagers. > > mdoc(7) also suggests using double-quotes (" ") to escape literal > > spaces; did you try that? > Did not try -- tried just now and it works. Will update with a commit. > However... /me opens "man mdoc" > (20 minutes later; confused as to where) > I've read mdoc(7) several times and have never seen such a > clarification. > (which I might add; would be mighty useful if you can find it) If one updates mdoc man page please upstream the change first! Best regards, Bapt --KR/qxknboQ7+Tpez Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWsUFbAAoJEGOJi9zxtz5asw0QAI3vlN8b76E4jFISG6ojFZpe WOKmshiglXqc/Jin1o4Ll977msThKZSKfXiAX7YTlTLU0ZjUw/QtbrEB0n6zFn3B kEkCLOm4H3or3Nv4PsTOoASMFZ7eI30WqZZExSfEifUg87HmwLX83gayFZwtvF63 WDR1JNCagWp3o54y6FOa/CeMmaJVcyN5VGDA+pk2AEmxQmziocOYSVax1bMvpXCD n+jG3KXcSohcmqdSQo1RPM8bwtq27/ZxUk76ZC31nqnzOPjDfWnEeJDe7UEP4BtZ aLjtdtit1rEukJ4KI5zZZi/HW3oxkqcU3qaEgNenAZ7jWgbPgtRZG6MN1NdkF1vZ VwKkejhJdGSJuMK6LhCFZo/vKYAXs/R14ozVvcDNxLRKU2qOvZUsedJ6HNRHeavT we8+NYflUId3fUNiLPN9veACutgwT4tvlFJqcFEwDSuEGFmb6LhX79nLLx281V6T U/yFcivIBliact+iW7m3isE0FEuo3Ykwz0SpyKRgcM6PrPsBebU+ILPpF4iKkaK6 eEQGzp/dVci2LP/v6E5PHJNV/7N84ptZnu+vXaSgXpfbxo/fHNeJQHV+vE6OqwHU qGEBT+Ym77Wx7jMieKdqdrvx0tgacIXvlRqOkcaobY+iMZ2Ly6lRROnKHqwwYAgf HjVB0ypCUX+I2kWd6ZGX =Up30 -----END PGP SIGNATURE----- --KR/qxknboQ7+Tpez-- From owner-svn-src-all@freebsd.org Tue Feb 2 23:54:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F1DAA99F66; Tue, 2 Feb 2016 23:54:08 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B98510C9; Tue, 2 Feb 2016 23:54:08 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u12Ns7mQ015160; Tue, 2 Feb 2016 23:54:07 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u12Ns7lS015159; Tue, 2 Feb 2016 23:54:07 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201602022354.u12Ns7lS015159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 2 Feb 2016 23:54:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295178 - head/usr.sbin/sysrc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2016 23:54:08 -0000 Author: dteske Date: Tue Feb 2 23:54:07 2016 New Revision: 295178 URL: https://svnweb.freebsd.org/changeset/base/295178 Log: Revert r295169 and switch `\ ' to `" "' MFC after: 3 days X-MFC-to: stable/10 X-MFC-with: r295169, r295170, r295173, r295177 Modified: head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc.8 ============================================================================== --- head/usr.sbin/sysrc/sysrc.8 Tue Feb 2 23:51:39 2016 (r295177) +++ head/usr.sbin/sysrc/sysrc.8 Tue Feb 2 23:54:07 2016 (r295178) @@ -255,7 +255,7 @@ When using the .Ql key+=value syntax to add items to existing values, the first character of the value is taken as the delimiter separating items -.Pq usually Qo (space) Qc or Qo , Qc . +.Pq usually Qo " " Qc or Qo , Qc . For example, in the following statement: .Bl -item -offset indent .It @@ -316,7 +316,7 @@ When using the .Ql key-=value syntax to remove items from existing values, the first character of the value is taken as the delimiter separating items -.Pq usually Qo \ Qc or Qo , Qc . +.Pq usually Qo " " Qc or Qo , Qc . For example, in the following statement: .Pp .Dl Nm cloned_interfaces-=" gif0" From owner-svn-src-all@freebsd.org Wed Feb 3 00:51:40 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A99DA9A63B; Wed, 3 Feb 2016 00:51:40 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A6F71562; Wed, 3 Feb 2016 00:51:40 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u130pduF033489; Wed, 3 Feb 2016 00:51:39 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u130pd3t033488; Wed, 3 Feb 2016 00:51:39 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201602030051.u130pd3t033488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 3 Feb 2016 00:51:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295180 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 00:51:40 -0000 Author: dteske Date: Wed Feb 3 00:51:38 2016 New Revision: 295180 URL: https://svnweb.freebsd.org/changeset/base/295180 Log: Define f_sprintf() dynamically at inclusion time No need to check/re-check capabilities that won't change at runtime. Modified: head/usr.sbin/bsdconfig/share/strings.subr Modified: head/usr.sbin/bsdconfig/share/strings.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/strings.subr Wed Feb 3 00:34:23 2016 (r295179) +++ head/usr.sbin/bsdconfig/share/strings.subr Wed Feb 3 00:51:38 2016 (r295180) @@ -154,20 +154,25 @@ f_substr() # Similar to sprintf(3), write a string into $var_to_set using printf(1) syntax # (`$format [$arguments ...]'). # -f_sprintf() -{ - local __var_to_set="$1" - shift 1 # var_to_set - - case "$BASH_VERSION" in - 3.1*|4.*) - local __tmp +case "$BASH_VERSION" in +3.1*|4.*) + f_sprintf() + { + local __var_to_set="$1" __tmp + shift 1 # var_to_set printf -v __tmp "$@" eval "$__var_to_set"=\"\${__tmp%\$NL}\" - ;; - *) eval "$__var_to_set"=\$\( printf -- \"\$@\" \) - esac -} + } + ;; +*) + # NB: On FreeBSD, sh(1) runs this faster than bash(1) runs the above + f_sprintf() + { + local __var_to_set="$1" + shift 1 # var_to_set + eval "$__var_to_set"=\$\( printf -- \"\$@\" \) + } +esac # f_vsprintf $var_to_set $format $format_args # From owner-svn-src-all@freebsd.org Wed Feb 3 01:10:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CCE1A9AD9D; Wed, 3 Feb 2016 01:10:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1040E25C; Wed, 3 Feb 2016 01:10:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 90FA5B91F; Tue, 2 Feb 2016 20:10:16 -0500 (EST) From: John Baldwin To: Bryan Drewery Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r295167 - head Date: Tue, 02 Feb 2016 17:10:12 -0800 Message-ID: <1559782.LjJZB0WVHT@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201602022111.u12LBOJB056268@repo.freebsd.org> References: <201602022111.u12LBOJB056268@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 02 Feb 2016 20:10:16 -0500 (EST) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 01:10:18 -0000 On Tuesday, February 02, 2016 09:11:24 PM Bryan Drewery wrote: > Author: bdrewery > Date: Tue Feb 2 21:11:23 2016 > New Revision: 295167 > URL: https://svnweb.freebsd.org/changeset/base/295167 > > Log: > Deduplicate distrib-dirs logic from r289086 in distribution. > > Sponsored by: EMC / Isilon Storage Division Navdeep reported on IRC that this broke distribution resulting in an empty tree. This caused etcupdate to think that all of the files had been removed (so it happily removed all the stock bits from /etc). -- John Baldwin From owner-svn-src-all@freebsd.org Wed Feb 3 01:13:28 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AF79A9AF61; Wed, 3 Feb 2016 01:13:28 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-lb0-x22c.google.com (mail-lb0-x22c.google.com [IPv6:2a00:1450:4010:c04::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C9D99961; Wed, 3 Feb 2016 01:13:27 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-lb0-x22c.google.com with SMTP id dx2so3207084lbd.3; Tue, 02 Feb 2016 17:13:27 -0800 (PST) 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=YFyJaKKCEbZfVCoV3B3Iz0hoYnt5cDLhm5t+qiIvYL4=; b=CVOiRxEYmDeIxT/y6zKat/aurYqLMTl62FXRHL/zEWUU5syTAST0hjo6BLyiDQSFH6 g9IgjmmEEecfLKF2wE9TUc1AzjPCic43S0lE/ISFrAljjR2pTAfHSXErEWHvF7n/Qrc0 ggPd4h0xaZ6HbSUIOoe4dYIqfyPPf8bHQ7z2HEXpoNjCQycj447lyQlRRt9YzClFtk2V UPBzEytH5JZGuL+GLgyMS8A4WVhWz2eNRzgqBDW/ex+uVLTex6VcPWDuBbBtEN96NFWb CcpHmd24AUFZSbQkFJuJMyx3Fgwrim29bOWE07CYZnUlFi8g8GWr+RSIDh5JrO/NUx0g ggQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=YFyJaKKCEbZfVCoV3B3Iz0hoYnt5cDLhm5t+qiIvYL4=; b=gW3qOwREF3rFtdW5vsxOczAlGRdz4Qzqzzi038ZjKUKGW7SXL5D4yY5/cakOL9R1nB wKr/vDxnLJJ15wSQDXkwaIjyhm5LCfoshwPMuLvraKrwPeBQpFtii41dW99Y4zbs+Wks +OrNzJY64degQKYIlqAdJQArpdb9/9FmLNPZoqUZaEtsPpcL8ztEEkUOjL9eb91dkPRu v9PU9wGIpbLbdu0jngFOBS2EZXZj08kCuZAjNuxwI/LUyuhJLtrNYGudFXBhjC9mDxnj T5wUu8K4aY/hKAKRfHQoQuJo1ns3I4fQqsjIGKdqW4Eked/UTPpGp0miuxbpSXfCOcdO S3tg== X-Gm-Message-State: AG10YOSh9ou5KxampvuaiHnh5Vt/TSzaQQ6R2+wcRHcrhoWXZM8Fr2+sdghJ+9tSMgFA2TTAwbkglfFtdRN8hw== MIME-Version: 1.0 X-Received: by 10.112.140.41 with SMTP id rd9mr12846520lbb.138.1454462005995; Tue, 02 Feb 2016 17:13:25 -0800 (PST) Received: by 10.112.160.133 with HTTP; Tue, 2 Feb 2016 17:13:25 -0800 (PST) In-Reply-To: <1559782.LjJZB0WVHT@ralph.baldwin.cx> References: <201602022111.u12LBOJB056268@repo.freebsd.org> <1559782.LjJZB0WVHT@ralph.baldwin.cx> Date: Tue, 2 Feb 2016 17:13:25 -0800 Message-ID: Subject: Re: svn commit: r295167 - head From: NGie Cooper To: John Baldwin Cc: Bryan Drewery , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 01:13:28 -0000 On Tue, Feb 2, 2016 at 5:10 PM, John Baldwin wrote: > On Tuesday, February 02, 2016 09:11:24 PM Bryan Drewery wrote: >> Author: bdrewery >> Date: Tue Feb 2 21:11:23 2016 >> New Revision: 295167 >> URL: https://svnweb.freebsd.org/changeset/base/295167 >> >> Log: >> Deduplicate distrib-dirs logic from r289086 in distribution. >> >> Sponsored by: EMC / Isilon Storage Division > > Navdeep reported on IRC that this broke distribution resulting in an empty > tree. This caused etcupdate to think that all of the files had been removed > (so it happily removed all the stock bits from /etc). +1 with Jenkins I think... https://jenkins.freebsd.org/job/FreeBSD_HEAD/107/ From owner-svn-src-all@freebsd.org Wed Feb 3 01:29:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18535A99523; Wed, 3 Feb 2016 01:29:08 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBD3611C7; Wed, 3 Feb 2016 01:29:07 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u131T62f043033; Wed, 3 Feb 2016 01:29:06 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u131T65R043032; Wed, 3 Feb 2016 01:29:06 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201602030129.u131T65R043032@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 3 Feb 2016 01:29:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295183 - head/sys/powerpc/mpc85xx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 01:29:08 -0000 Author: jhibbits Date: Wed Feb 3 01:29:06 2016 New Revision: 295183 URL: https://svnweb.freebsd.org/changeset/base/295183 Log: Make lbc(4) the same driver pass as simplebus. Device trees mark lbc as compatible with simplebus. Since simplebus is passed first, it attaches first. When lbc's pass (default pass) comes, the bus is already attached to simplebus, so is skipped. Sponsored by: Alex Perez/Inertial Computing Modified: head/sys/powerpc/mpc85xx/lbc.c Modified: head/sys/powerpc/mpc85xx/lbc.c ============================================================================== --- head/sys/powerpc/mpc85xx/lbc.c Wed Feb 3 01:22:02 2016 (r295182) +++ head/sys/powerpc/mpc85xx/lbc.c Wed Feb 3 01:29:06 2016 (r295183) @@ -113,7 +113,8 @@ static driver_t lbc_driver = { devclass_t lbc_devclass; -DRIVER_MODULE(lbc, ofwbus, lbc_driver, lbc_devclass, 0, 0); +EARLY_DRIVER_MODULE(lbc, ofwbus, lbc_driver, lbc_devclass, + 0, 0, BUS_PASS_BUS); /* * Calculate address mask used by OR(n) registers. Use memory region size to From owner-svn-src-all@freebsd.org Wed Feb 3 01:29:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87C84A9959F; Wed, 3 Feb 2016 01:29:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 7A3C01334; Wed, 3 Feb 2016 01:29:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 720651DF8; Wed, 3 Feb 2016 01:29:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 0432DD098; Wed, 3 Feb 2016 01:29:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id OHanUGehrCj5; Wed, 3 Feb 2016 01:29:56 +0000 (UTC) Content-Type: text/plain; charset=us-ascii DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 7F031D095 Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r295167 - head From: Bryan Drewery X-Mailer: iPhone Mail (12H143) In-Reply-To: <1559782.LjJZB0WVHT@ralph.baldwin.cx> Date: Tue, 2 Feb 2016 17:29:53 -0800 Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <1F01F0B2-A471-4CFB-8364-9D521CCD01BD@FreeBSD.org> References: <201602022111.u12LBOJB056268@repo.freebsd.org> <1559782.LjJZB0WVHT@ralph.baldwin.cx> To: John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 01:29:59 -0000 Wow! Please revert. I'm AFK for a few hours. Regards, Bryan Drewery > On Feb 2, 2016, at 17:10, John Baldwin wrote: >=20 >> On Tuesday, February 02, 2016 09:11:24 PM Bryan Drewery wrote: >> Author: bdrewery >> Date: Tue Feb 2 21:11:23 2016 >> New Revision: 295167 >> URL: https://svnweb.freebsd.org/changeset/base/295167 >>=20 >> Log: >> Deduplicate distrib-dirs logic from r289086 in distribution. >>=20 >> Sponsored by: EMC / Isilon Storage Division >=20 > Navdeep reported on IRC that this broke distribution resulting in an empty= > tree. This caused etcupdate to think that all of the files had been remov= ed > (so it happily removed all the stock bits from /etc). >=20 > --=20 > John Baldwin From owner-svn-src-all@freebsd.org Wed Feb 3 01:40:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A6A0A998F6; Wed, 3 Feb 2016 01:40:09 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CAEB195D; Wed, 3 Feb 2016 01:40:09 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u131e8CE045909; Wed, 3 Feb 2016 01:40:08 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u131e8hg045908; Wed, 3 Feb 2016 01:40:08 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201602030140.u131e8hg045908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Wed, 3 Feb 2016 01:40:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295184 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 01:40:09 -0000 Author: cem Date: Wed Feb 3 01:40:07 2016 New Revision: 295184 URL: https://svnweb.freebsd.org/changeset/base/295184 Log: Revert r295167 at bdrewery's request $ svn merge -c -295167 . JHB reports Navdeep reports that it breaks distribution and etcupdate. Approved by: bdrewery Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Feb 3 01:29:06 2016 (r295183) +++ head/Makefile.inc1 Wed Feb 3 01:40:07 2016 (r295184) @@ -1087,7 +1087,9 @@ distrib-dirs: .MAKE .PHONY ${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ ${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET} -distribution: distrib-dirs .MAKE .PHONY +distribution: .MAKE .PHONY + ${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ + ${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET} ${_+_}cd ${.CURDIR}; ${CROSSENV} PATH=${TMPPATH} \ ${MAKE} -f Makefile.inc1 ${IMAKE_INSTALL} \ METALOG=${METALOG} installconfig From owner-svn-src-all@freebsd.org Wed Feb 3 01:45:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4574BA99ACA; Wed, 3 Feb 2016 01:45:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 33F5D1CEB; Wed, 3 Feb 2016 01:45:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 2C43311EE; Wed, 3 Feb 2016 01:45:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id D84FBD0EA; Wed, 3 Feb 2016 01:45:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id NDqAb90y2A1u; Wed, 3 Feb 2016 01:44:56 +0000 (UTC) Content-Type: text/plain; charset=us-ascii DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 0E97DD0E6 Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r295184 - head From: Bryan Drewery X-Mailer: iPhone Mail (12H143) In-Reply-To: <201602030140.u131e8hg045908@repo.freebsd.org> Date: Tue, 2 Feb 2016 17:44:53 -0800 Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <63E4ABF9-89A8-46A4-8D48-3E85C0DA1892@FreeBSD.org> References: <201602030140.u131e8hg045908@repo.freebsd.org> To: "Conrad E. Meyer" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 01:45:03 -0000 Thank you! Regards, Bryan Drewery > On Feb 2, 2016, at 17:40, Conrad E. Meyer wrote: >=20 > Author: cem > Date: Wed Feb 3 01:40:07 2016 > New Revision: 295184 > URL: https://svnweb.freebsd.org/changeset/base/295184 >=20 > Log: > Revert r295167 at bdrewery's request >=20 > $ svn merge -c -295167 . >=20 > JHB reports Navdeep reports that it breaks distribution and etcupdate. >=20 > Approved by: bdrewery >=20 > Modified: > head/Makefile.inc1 >=20 > Modified: head/Makefile.inc1 > =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/Makefile.inc1 Wed Feb 3 01:29:06 2016 (r295183) > +++ head/Makefile.inc1 Wed Feb 3 01:40:07 2016 (r295184) > @@ -1087,7 +1087,9 @@ distrib-dirs: .MAKE .PHONY > ${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=3D${TMPPATH} ${MAKE} \ > ${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=3D${METALOG} ${.TARGET} >=20 > -distribution: distrib-dirs .MAKE .PHONY > +distribution: .MAKE .PHONY > + ${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=3D${TMPPATH} ${MAKE} \ > + ${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=3D${METALOG} ${.TARGET} > ${_+_}cd ${.CURDIR}; ${CROSSENV} PATH=3D${TMPPATH} \ > ${MAKE} -f Makefile.inc1 ${IMAKE_INSTALL} \ > METALOG=3D${METALOG} installconfig >=20 From owner-svn-src-all@freebsd.org Wed Feb 3 01:49:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F01CCA99C1F; Wed, 3 Feb 2016 01:49:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id E1AF1A6; Wed, 3 Feb 2016 01:49:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id D9C7014F1; Wed, 3 Feb 2016 01:49:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 930C1D10C; Wed, 3 Feb 2016 01:49:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id Bj5rtmjiTmEK; Wed, 3 Feb 2016 01:49:13 +0000 (UTC) Content-Type: text/plain; charset=us-ascii DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 21562D108 Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r295167 - head From: Bryan Drewery X-Mailer: iPhone Mail (12H143) In-Reply-To: <1F01F0B2-A471-4CFB-8364-9D521CCD01BD@FreeBSD.org> Date: Tue, 2 Feb 2016 17:49:12 -0800 Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <4F91A482-E42E-4047-8713-6C2E388702E0@FreeBSD.org> References: <201602022111.u12LBOJB056268@repo.freebsd.org> <1559782.LjJZB0WVHT@ralph.baldwin.cx> <1F01F0B2-A471-4CFB-8364-9D521CCD01BD@FreeBSD.org> To: John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 01:49:16 -0000 Oh wow I just realized the issue. Earlier I tested and saw distrib-dirs run a= nd considered it a success. Sorry about that. Regards, Bryan Drewery > On Feb 2, 2016, at 17:29, Bryan Drewery wrote: >=20 > Wow! Please revert. I'm AFK for a few hours. >=20 > Regards, > Bryan Drewery >=20 >>> On Feb 2, 2016, at 17:10, John Baldwin wrote: >>>=20 >>> On Tuesday, February 02, 2016 09:11:24 PM Bryan Drewery wrote: >>> Author: bdrewery >>> Date: Tue Feb 2 21:11:23 2016 >>> New Revision: 295167 >>> URL: https://svnweb.freebsd.org/changeset/base/295167 >>>=20 >>> Log: >>> Deduplicate distrib-dirs logic from r289086 in distribution. >>>=20 >>> Sponsored by: EMC / Isilon Storage Division >>=20 >> Navdeep reported on IRC that this broke distribution resulting in an empt= y >> tree. This caused etcupdate to think that all of the files had been remo= ved >> (so it happily removed all the stock bits from /etc). >>=20 >> --=20 >> John Baldwin >=20 From owner-svn-src-all@freebsd.org Wed Feb 3 01:50:28 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9881DA99CC1; Wed, 3 Feb 2016 01:50:28 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52A17260; Wed, 3 Feb 2016 01:50:28 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u131oRkW048935; Wed, 3 Feb 2016 01:50:27 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u131oR3C048933; Wed, 3 Feb 2016 01:50:27 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201602030150.u131oR3C048933@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 3 Feb 2016 01:50:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295186 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 01:50:28 -0000 Author: jhibbits Date: Wed Feb 3 01:50:27 2016 New Revision: 295186 URL: https://svnweb.freebsd.org/changeset/base/295186 Log: Align signal stack pointer to 16 bytes. The stack must be aligned to 16 bytes at all times. Clang 3.8 is especially adamant about this, and causes strange behavior and segmentation faults if it is not the case. PR: kern/206810 Modified: head/sys/powerpc/powerpc/exec_machdep.c head/sys/powerpc/powerpc/sigcode32.S Modified: head/sys/powerpc/powerpc/exec_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/exec_machdep.c Wed Feb 3 01:49:02 2016 (r295185) +++ head/sys/powerpc/powerpc/exec_machdep.c Wed Feb 3 01:50:27 2016 (r295186) @@ -219,10 +219,10 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && SIGISMEMBER(psp->ps_sigonstack, sig)) { - usfp = (void *)((uintptr_t)td->td_sigstk.ss_sp + - td->td_sigstk.ss_size - rndfsize); + usfp = (void *)(((uintptr_t)td->td_sigstk.ss_sp + + td->td_sigstk.ss_size - rndfsize) & ~0xFul); } else { - usfp = (void *)(tf->fixreg[1] - rndfsize); + usfp = (void *)((tf->fixreg[1] - rndfsize) & ~0xFul); } /* Modified: head/sys/powerpc/powerpc/sigcode32.S ============================================================================== --- head/sys/powerpc/powerpc/sigcode32.S Wed Feb 3 01:49:02 2016 (r295185) +++ head/sys/powerpc/powerpc/sigcode32.S Wed Feb 3 01:50:27 2016 (r295186) @@ -45,9 +45,9 @@ */ .globl CNAME(sigcode32),CNAME(szsigcode32) CNAME(sigcode32): - addi 1,1,-20 /* reserved space for callee */ + addi 1,1,-32 /* reserved space for callee */ blrl - addi 3,1,20+SF_UC /* restore sp, and get &frame->sf_uc */ + addi 3,1,32+SF_UC /* restore sp, and get &frame->sf_uc */ li 0,SYS_sigreturn sc /* sigreturn(scp) */ li 0,SYS_exit From owner-svn-src-all@freebsd.org Wed Feb 3 02:46:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12FEBA9AE21; Wed, 3 Feb 2016 02:46:02 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA22E784; Wed, 3 Feb 2016 02:46:01 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u132k08s066419; Wed, 3 Feb 2016 02:46:00 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u132k0GY066418; Wed, 3 Feb 2016 02:46:00 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201602030246.u132k0GY066418@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 3 Feb 2016 02:46:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295194 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 02:46:02 -0000 Author: dteske Date: Wed Feb 3 02:46:00 2016 New Revision: 295194 URL: https://svnweb.freebsd.org/changeset/base/295194 Log: Remove trailing whitespace Modified: head/usr.sbin/bsdconfig/share/strings.subr Modified: head/usr.sbin/bsdconfig/share/strings.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/strings.subr Wed Feb 3 02:14:31 2016 (r295193) +++ head/usr.sbin/bsdconfig/share/strings.subr Wed Feb 3 02:46:00 2016 (r295194) @@ -65,7 +65,7 @@ f_isinteger() # f_substr [-v $var_to_set] $string $start [$length] # # Similar to awk(1)'s substr(), return length substring of string that begins -# at start position counted from 1. +# at start position counted from 1. # f_substr() { @@ -76,7 +76,7 @@ f_substr() esac done shift $(( $OPTIND - 1 )) - + local __tmp="$1" __start="${2:-1}" __size="$3" local __tbuf __tbuf_len __trim __trimq From owner-svn-src-all@freebsd.org Wed Feb 3 03:03:05 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A3BEA99462; Wed, 3 Feb 2016 03:03:05 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6ABC7121E; Wed, 3 Feb 2016 03:03:05 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1333444072733; Wed, 3 Feb 2016 03:03:04 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u13334Zv072732; Wed, 3 Feb 2016 03:03:04 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201602030303.u13334Zv072732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 3 Feb 2016 03:03:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295195 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 03:03:05 -0000 Author: dteske Date: Wed Feb 3 03:03:04 2016 New Revision: 295195 URL: https://svnweb.freebsd.org/changeset/base/295195 Log: f_substr: Write to stdout when no `-v var_to_set' Fixes ``setvar: : bad variable name'' Modified: head/usr.sbin/bsdconfig/share/strings.subr Modified: head/usr.sbin/bsdconfig/share/strings.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/strings.subr Wed Feb 3 02:46:00 2016 (r295194) +++ head/usr.sbin/bsdconfig/share/strings.subr Wed Feb 3 03:03:04 2016 (r295195) @@ -146,7 +146,11 @@ f_substr() fi done - setvar "$__var_to_set" "$__tmp" + if [ "$__var_to_set" ]; then + setvar "$__var_to_set" "$__tmp" + else + echo "$__tmp" + fi } # f_sprintf $var_to_set $format [$arguments ...] From owner-svn-src-all@freebsd.org Wed Feb 3 03:40:41 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56131A99F9F; Wed, 3 Feb 2016 03:40:41 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E27BE314; Wed, 3 Feb 2016 03:40:40 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-wm0-x22e.google.com with SMTP id l66so51142205wml.0; Tue, 02 Feb 2016 19:40:40 -0800 (PST) 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=bqXQqE01njd7YyRTROLR49sXbyVyoVGQsbICD06sI8Q=; b=vaeVCN/wlG9cVp4fNl/0GFnYcl4LF8C/HKjAoP2PqhWNlmSmk5QJLV4BdASVmEur2c CvCv7dPMQY8wrD3zdU+M7zkRTUtBlZPOBeti4bqSKLymzlt+mEra9MUjhak2a4S+ONx8 T2gnS07uBXbdb3qc9IXGK7XuK3WSY3KFn2wHtt8qZQ3aJvRUxaNXCyENULc+jOlmV7xh onpWCRndUIn14ioLxXQHTUAlHixTuJKlDCUHl5jbzjXm6vKc08ViZ5ZrSB6NJb/MAWOq n510ZZxFs+HlP0zOt9LkOrA3PjA9s4T9pCgUEIyJ8/iFmQb+GWkyBuuMIOH+emQZ4ljy 6B6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=bqXQqE01njd7YyRTROLR49sXbyVyoVGQsbICD06sI8Q=; b=JYKX7sFPK7FUBL3tE4UC8t7rR6kEElHg6ToWYZJd1GTCWUZcEr7sJshCWXnKsqtiH0 r2RCYwyq3VzQxlae2R21qAdm8U8tWicwod8giWHCYYPoRDRggoJsgyolVil2v+VcLowu MY+/5663LwTnN5OoKoWNqB4+a2vb1eCNELim/KW6UKJ8xjLrF7C77GmMuve/ajmLn1f1 vpKvhaoh8AwRpf0bsNDg345rFUgfpSQKE5vgOpdz+hME2WATAl+XiucoB+KH2h4fK+/T CvC/+dq+2NQMlo/au4Rn9n+xOsouFH5MCZ0KKWkYTYUQol8CGsmpIxIK7jnWRKEhNcX4 BZqg== X-Gm-Message-State: AG10YORPlmc5bGRnjKtAs9RkXIj0HBu+NTrz93bIFd2/qWkQtWQcYduHVvnJ00eaVKvQ9n7dvdjeXk852T7NvQ== MIME-Version: 1.0 X-Received: by 10.194.119.68 with SMTP id ks4mr31155451wjb.45.1454470839390; Tue, 02 Feb 2016 19:40:39 -0800 (PST) Received: by 10.27.170.11 with HTTP; Tue, 2 Feb 2016 19:40:39 -0800 (PST) In-Reply-To: <1454457045.37056.69.camel@FreeBSD.org> References: <201602022158.u12LwHtr068296@repo.freebsd.org> <1454457045.37056.69.camel@FreeBSD.org> Date: Tue, 2 Feb 2016 21:40:39 -0600 Message-ID: Subject: Re: svn commit: r295169 - head/usr.sbin/sysrc From: Benjamin Kaduk To: Devin Teske Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 03:40:41 -0000 On Tue, Feb 2, 2016 at 5:50 PM, Devin Teske wrote: > On Tue, 2016-02-02 at 16:03 -0600, Benjamin Kaduk wrote: > > On Tue, Feb 2, 2016 at 3:58 PM, Devin Teske wrote: > > Author: dteske > Date: Tue Feb 2 21:58:17 2016 > New Revision: 295169 > URL: https://svnweb.freebsd.org/changeset/base/295169 > > Log: > Replace (Qo \ Qc) with (Qo (space) Qc) > > When using col(1) piped to vim(1) as pager for man(1), the former > sequence > of (Qo \ Qc) renders as "" without the space. Replace with (Qo (space) > Qc) > which renders properly in more (all?) pagers. > > > mdoc(7) also suggests using double-quotes (" ") to escape literal spaces; > did you try that? > > > Did not try -- tried just now and it works. Will update with a commit. > > However... /me opens "man mdoc" > (20 minutes later; confused as to where) > > I've read mdoc(7) several times and have never seen such a clarification. > (which I might add; would be mighty useful if you can find it) > > The shame is on me; I had opened the system mdoc(7) on OS X, which is actually groff_mdoc(7). There is a subsection therein "Passing Space Characters in an Argument" which has the text in question. I guess I need to spend more time with the mdocml mdoc(7) to get used to what it contains (and does not contain). Sorry for sending you down the wrong rabbit hole... -Ben From owner-svn-src-all@freebsd.org Wed Feb 3 03:55:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BB70A73767; Wed, 3 Feb 2016 03:55:09 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BCA5E86; Wed, 3 Feb 2016 03:55:09 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u133t8wt087579; Wed, 3 Feb 2016 03:55:08 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u133t8s5087578; Wed, 3 Feb 2016 03:55:08 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201602030355.u133t8s5087578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 3 Feb 2016 03:55:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295196 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 03:55:09 -0000 Author: dteske Date: Wed Feb 3 03:55:08 2016 New Revision: 295196 URL: https://svnweb.freebsd.org/changeset/base/295196 Log: Remove SIG prefix from trapped signals Makes traps functional if running under shells/dash Modified: head/usr.sbin/bsdconfig/share/common.subr Modified: head/usr.sbin/bsdconfig/share/common.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/common.subr Wed Feb 3 03:03:04 2016 (r295195) +++ head/usr.sbin/bsdconfig/share/common.subr Wed Feb 3 03:55:08 2016 (r295196) @@ -1,7 +1,7 @@ if [ ! "$_COMMON_SUBR" ]; then _COMMON_SUBR=1 # # Copyright (c) 2012 Ron McDowell -# Copyright (c) 2012-2015 Devin Teske +# Copyright (c) 2012-2016 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -1015,10 +1015,9 @@ f_count_ifs() # # Trap signals so we can recover gracefully # -trap 'f_interrupt' SIGINT -trap 'f_die' SIGTERM SIGPIPE SIGXCPU SIGXFSZ \ - SIGFPE SIGTRAP SIGABRT SIGSEGV -trap '' SIGALRM SIGPROF SIGUSR1 SIGUSR2 SIGHUP SIGVTALRM +trap 'f_interrupt' INT +trap 'f_die' TERM PIPE XCPU XFSZ FPE TRAP ABRT SEGV +trap '' ALRM PROF USR1 USR2 HUP VTALRM # # Clone terminal stdout/stderr so we can redirect to it from within sub-shells From owner-svn-src-all@freebsd.org Wed Feb 3 04:02:52 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D1B8A739FF; Wed, 3 Feb 2016 04:02:52 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DF961323; Wed, 3 Feb 2016 04:02:52 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1342pjR090575; Wed, 3 Feb 2016 04:02:51 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1342prS090574; Wed, 3 Feb 2016 04:02:51 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201602030402.u1342prS090574@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 3 Feb 2016 04:02:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295197 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 04:02:52 -0000 Author: dteske Date: Wed Feb 3 04:02:50 2016 New Revision: 295197 URL: https://svnweb.freebsd.org/changeset/base/295197 Log: f_substr(): Optimized recipe if running under bash This makes runnig f_substr() faster than it was when running under bash, but both sh and dash are still faster when using the non-bash recipe which features dynamically unrolled loops. Modified: head/usr.sbin/bsdconfig/share/strings.subr Modified: head/usr.sbin/bsdconfig/share/strings.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/strings.subr Wed Feb 3 03:55:08 2016 (r295196) +++ head/usr.sbin/bsdconfig/share/strings.subr Wed Feb 3 04:02:50 2016 (r295197) @@ -67,52 +67,58 @@ f_isinteger() # Similar to awk(1)'s substr(), return length substring of string that begins # at start position counted from 1. # -f_substr() -{ - local OPTIND=1 OPTARG __flag __var_to_set= - while getopts v: __flag; do - case "$__flag" in - v) __var_to_set="$OPTARG" ;; +case "$BASH_VERSION" in +*?*) + f_substr() + { + local __var_to_set= + case "$1" in + -v) __var_to_set="$2"; shift 2 ;; + -v?*) __var_to_set="${2#-v}"; shift 1 ;; esac - done - shift $(( $OPTIND - 1 )) - - local __tmp="$1" __start="${2:-1}" __size="$3" - local __tbuf __tbuf_len __trim __trimq + local __tmp="$1" __start="${2:-1}" __len="$3" + [ "$__start" -gt 0 ] 2> /dev/null && + __start=$(( $__start - 1 )) + if [ ! "$__var_to_set" ]; then + eval echo \"\${__tmp:\$__start${__len:+:\$__len}}\" + return $? + fi + if [ "$__len" ]; then + eval $__var_to_set=\"\${__tmp:\$__start:\$__len}\" + else + eval $__var_to_set=\"\${__tmp:\$__start}\" + fi + } + ;; +*) + # NB: On FreeBSD, sh(1) runs this faster than bash(1) runs the above + f_substr() + { + local OPTIND=1 OPTARG __flag __var_to_set= + while getopts v: __flag; do + case "$__flag" in + v) __var_to_set="$OPTARG" ;; + esac + done + shift $(( $OPTIND - 1 )) - if [ ! "$__tmp" ]; then - [ "$__var_to_set" ] && setvar "$__var_to_set" "" - return ${SUCCESS:-0} - fi - [ "$__start" -ge 1 ] 2> /dev/null || __start=1 - if ! [ "${__size:-1}" -ge 1 ] 2> /dev/null; then - [ "$__var_to_set" ] && setvar "$__var_to_set" "" - return ${FAILURE:-1} - fi + local __tmp="$1" __start="${2:-1}" __size="$3" + local __tbuf __tbuf_len __trim __trimq - __trim=$(( $__start - 1 )) - while [ $__trim -gt 0 ]; do - __tbuf="?" - __tbuf_len=1 - while [ $__tbuf_len -lt $(( $__trim / $__tbuf_len )) ]; do - __tbuf="$__tbuf?" - __tbuf_len=$(( $__tbuf_len + 1 )) - done - __trimq=$(( $__trim / $__tbuf_len )) - __trim=$(( $__trim - $__tbuf_len * $__trimq )) - while [ $__trimq -gt 0 ]; do - __tmp="${__tmp#$__tbuf}" - __trimq=$(( $__trimq - 1 )) - done - done + if [ ! "$__tmp" ]; then + [ "$__var_to_set" ] && setvar "$__var_to_set" "" + return ${SUCCESS:-0} + fi + [ "$__start" -ge 1 ] 2> /dev/null || __start=1 + if ! [ "${__size:-1}" -ge 1 ] 2> /dev/null; then + [ "$__var_to_set" ] && setvar "$__var_to_set" "" + return ${FAILURE:-1} + fi - local __tmp_size=${#__tmp} - local __mask __mask_len - __trim=$(( $__tmp_size - ${__size:-$__tmp_size} )) - while [ $__trim -gt 0 ]; do - __tbuf="?" - __tbuf_len=1 - if [ $__trim -le $__size ]; then + __trim=$(( $__start - 1 )) + while [ $__trim -gt 0 ]; do + __tbuf="?" + __tbuf_len=1 while [ $__tbuf_len -lt $(( $__trim / $__tbuf_len )) ] do __tbuf="$__tbuf?" @@ -121,37 +127,66 @@ f_substr() __trimq=$(( $__trim / $__tbuf_len )) __trim=$(( $__trim - $__tbuf_len * $__trimq )) while [ $__trimq -gt 0 ]; do - __tmp="${__tmp%$__tbuf}" + __tmp="${__tmp#$__tbuf}" __trimq=$(( $__trimq - 1 )) done - else - __mask="$__tmp" - while [ $__tbuf_len -lt $(( $__size / $__tbuf_len )) ] - do - __tbuf="$__tbuf?" - __tbuf_len=$(( $__tbuf_len + 1 )) - done - __trimq=$(( $__size / $__tbuf_len )) - if [ $(( $__trimq * $__tbuf_len )) -ne $__size ]; then - __tbuf="$__tbuf?" - __tbuf_len=$(( $__tbuf_len + 1 )) + done + + local __tmp_size=${#__tmp} + local __mask __mask_len + __trim=$(( $__tmp_size - ${__size:-$__tmp_size} )) + while [ $__trim -gt 0 ]; do + __tbuf="?" + __tbuf_len=1 + if [ $__trim -le $__size ]; then + while [ $__tbuf_len -lt $(( + $__trim / $__tbuf_len + )) ]; do + __tbuf="$__tbuf?" + __tbuf_len=$(( $__tbuf_len + 1 )) + done + __trimq=$(( $__trim / $__tbuf_len )) + __trim=$(( $__trim - $__tbuf_len * $__trimq )) + while [ $__trimq -gt 0 ]; do + __tmp="${__tmp%$__tbuf}" + __trimq=$(( $__trimq - 1 )) + done + else + __mask="$__tmp" + while [ $__tbuf_len -lt $(( + $__size / $__tbuf_len + )) ]; do + __tbuf="$__tbuf?" + __tbuf_len=$(( $__tbuf_len + 1 )) + done + __trimq=$(( $__size / $__tbuf_len )) + if [ $__size -ne $(( + $__trimq * $__tbuf_len + )) ]; then + __tbuf="$__tbuf?" + __tbuf_len=$(( $__tbuf_len + 1 )) + fi + __mask_len=$(( + $__tmp_size - $__tbuf_len * $__trimq + )) + __trim=$(( + $__tmp_size - $__mask_len - $__size + )) + while [ $__trimq -gt 0 ]; do + __mask="${__mask#$__tbuf}" + __trimq=$(( $__trimq - 1 )) + done + __tmp="${__tmp%"$__mask"}" fi - __mask_len=$(( $__tmp_size - $__tbuf_len * $__trimq )) - __trim=$(( $__tmp_size - $__mask_len - $__size )) - while [ $__trimq -gt 0 ]; do - __mask="${__mask#$__tbuf}" - __trimq=$(( $__trimq - 1 )) - done - __tmp="${__tmp%"$__mask"}" - fi - done + done - if [ "$__var_to_set" ]; then - setvar "$__var_to_set" "$__tmp" - else - echo "$__tmp" - fi -} + if [ "$__var_to_set" ]; then + setvar "$__var_to_set" "$__tmp" + else + echo "$__tmp" + fi + } +esac # f_sprintf $var_to_set $format [$arguments ...] # From owner-svn-src-all@freebsd.org Wed Feb 3 04:06:37 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85C40A73B3A; Wed, 3 Feb 2016 04:06:37 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 744491558; Wed, 3 Feb 2016 04:06:37 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [64.201.244.132] (port=50865 helo=[10.0.0.113]) by shxd.cx with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1aQoi7-0006a4-3N; Tue, 02 Feb 2016 20:06:31 -0800 Message-ID: <1454472390.31394.1.camel@FreeBSD.org> Subject: Re: svn commit: r295169 - head/usr.sbin/sysrc From: Devin Teske To: Benjamin Kaduk Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Date: Tue, 02 Feb 2016 20:06:30 -0800 In-Reply-To: References: <201602022158.u12LwHtr068296@repo.freebsd.org> <1454457045.37056.69.camel@FreeBSD.org> X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Sender: devin@shxd.cx Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 04:06:37 -0000 On Tue, 2016-02-02 at 21:40 -0600, Benjamin Kaduk wrote: > On Tue, Feb 2, 2016 at 5:50 PM, Devin Teske > wrote: > > On Tue, 2016-02-02 at 16:03 -0600, Benjamin Kaduk wrote: > > > On Tue, Feb 2, 2016 at 3:58 PM, Devin Teske > > > wrote: > > > > Author: dteske > > > > Date: Tue Feb 2 21:58:17 2016 > > > > New Revision: 295169 > > > > URL: https://svnweb.freebsd.org/changeset/base/295169 > > > > > > > > Log: > > > > Replace (Qo \ Qc) with (Qo (space) Qc) > > > > > > > > When using col(1) piped to vim(1) as pager for man(1), the > > > > former sequence > > > > of (Qo \ Qc) renders as "" without the space. Replace with > > > > (Qo (space) Qc) > > > > which renders properly in more (all?) pagers. > > > mdoc(7) also suggests using double-quotes (" ") to escape literal > > > spaces; did you try that? > > Did not try -- tried just now and it works. Will update with a > > commit. > > > > However... /me opens "man mdoc" > > (20 minutes later; confused as to where) > > > > I've read mdoc(7) several times and have never seen such a > > clarification. > > (which I might add; would be mighty useful if you can find it) > > > > > The shame is on me; I had opened the system mdoc(7) on OS X, which is > actually groff_mdoc(7). There is a subsection therein "Passing Space > Characters in an Argument" which has the text in question. I guess I > need to spend more time with the mdocml mdoc(7) to get used to what > it contains (and does not contain). > > Sorry for sending you down the wrong rabbit hole... Funny thing was, your suggestion absolutely worked. Learned something our mdoc(7) doesn't document but supports. -- Devin From owner-svn-src-all@freebsd.org Wed Feb 3 08:02:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C52D8A9A0C5 for ; Wed, 3 Feb 2016 08:02:15 +0000 (UTC) (envelope-from wma@semihalf.com) Received: from mail-ig0-x22b.google.com (mail-ig0-x22b.google.com [IPv6:2607:f8b0:4001:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9936B1BC2 for ; Wed, 3 Feb 2016 08:02:15 +0000 (UTC) (envelope-from wma@semihalf.com) Received: by mail-ig0-x22b.google.com with SMTP id hb3so5502357igb.0 for ; Wed, 03 Feb 2016 00:02:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=xJTorXB1e/azs4NIDgWR0IGDDJTlToRDjqwOiMMlck0=; b=BK7zGxw1Opo0J8utQ2Ski7VMlx43DvLfV1/R9A2hWxzDsuxV/QR+L5zcW5RIxd+Kgh NedI1pdf0CTJdMn76+oRyFb2r6xvN4k97/5vKETjD0Tj7Jr3HSzOg4m3q1Z/To65sf7b ch/XxFQdK/20CXPMQSt2QXsYiqzi5+QhHnO4gxcAAuyCUgXHE6KP/mSrsmTWYMtwuH2m IlI/mwPBhUGq6Ut3OEPtDLQtjvXsK8XgrDiXK6IFoKRydnqZiabCik+fH6cssODbLRrg LoFsqEwiLuFyLCpG+SN237AkXAer68CQVv9DejCIsTe5qXCX/vSiqlSbdQi0lAYXh3Mm YLRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=xJTorXB1e/azs4NIDgWR0IGDDJTlToRDjqwOiMMlck0=; b=Je5LUF7HNr2xtS+CG2zM98T3gln8lGa4jEKHboxAmYpYEa2vn7HaYfyqxm0eJjrYjp jdw8Lfxd69ApKUxQ69bDX+wy84M0g2vUbBGx8dZoYSXJrl3YlVpVJLgLJat42p2aGpU2 ZT3VtZGlnbier5ayCOiuOPePb1ZPFvwCpN0GnnAbn+mMbZM1cbwQ5+6gbepoeUQplX3a n19T/Wd5unnXlGKPx6yrm9+EYC2Bu7xe+uukEcqvHVBJutlhSaq2CTEAMwuRGKwE73pu rm9C/IB8CzWx048WzqkCiD5eGEsYT4AkZOwerHysKBRZWKblEL+qI7+OxTY95g8ZJPno oIMg== X-Gm-Message-State: AG10YOSEszuySSv2tvpTQFAaJkx2RoQ9fiaikAjtwl6onArDsFGCnZfAgtqrB0sW5MlZPxuLqXVPXd9OjPLUtA== X-Received: by 10.50.43.228 with SMTP id z4mr2113058igl.33.1454486534982; Wed, 03 Feb 2016 00:02:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.154.19 with HTTP; Wed, 3 Feb 2016 00:01:55 -0800 (PST) In-Reply-To: <201602022117.u12LHP7M056632@repo.freebsd.org> References: <201602022117.u12LHP7M056632@repo.freebsd.org> From: Wojciech Macek Date: Wed, 3 Feb 2016 09:01:55 +0100 Message-ID: Subject: Re: svn commit: r295168 - in head/sys/arm: arm include To: Svatopluk Kraus Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 08:02:16 -0000 Is it necessary to add acle-compat.h to the includes? If so, I suggest putting it under ifndef __aarch64__ , to fix the ARM64 build. Regards, Wojtek 2016-02-02 22:17 GMT+01:00 Svatopluk Kraus : > Author: skra > Date: Tue Feb 2 21:17:25 2016 > New Revision: 295168 > URL: https://svnweb.freebsd.org/changeset/base/295168 > > Log: > Use pmap_preboot_map_attr() directly in arm_devmap_bootstrap() > instead of hiding behind pmap_map_chunk(). It's not longer needed > after old pmap-v6 code was removed. > > For compatibility with __ARM_ARCH < 6, define PTE_DEVICE in devmap.c > file. Certainly, it would be nice if VM_MEMATTR_DEVICE could be used > even for __ARM_ARCH < 6. > > Modified: > head/sys/arm/arm/devmap.c > head/sys/arm/include/pmap-v6.h > > Modified: head/sys/arm/arm/devmap.c > > ============================================================================== > --- head/sys/arm/arm/devmap.c Tue Feb 2 21:11:23 2016 (r295167) > +++ head/sys/arm/arm/devmap.c Tue Feb 2 21:17:25 2016 (r295168) > @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -52,6 +53,9 @@ static boolean_t devmap_bootstrap_done = > #define PTE_DEVICE VM_MEMATTR_DEVICE > #elif defined(__arm__) > #define MAX_VADDR ARM_VECTORS_HIGH > +#if __ARM_ARCH >= 6 > +#define PTE_DEVICE VM_MEMATTR_DEVICE > +#endif > #endif > > /* > @@ -204,8 +208,13 @@ arm_devmap_bootstrap(vm_offset_t l1pt, c > > for (pd = devmap_table; pd->pd_size != 0; ++pd) { > #if defined(__arm__) > +#if __ARM_ARCH >= 6 > + pmap_preboot_map_attr(pd->pd_pa, pd->pd_va, pd->pd_size, > + pd->pd_prot, pd->pd_cache); > +#else > pmap_map_chunk(l1pt, pd->pd_va, pd->pd_pa, pd->pd_size, > - pd->pd_prot,pd->pd_cache); > + pd->pd_prot, pd->pd_cache); > +#endif > #elif defined(__aarch64__) > pmap_kenter_device(pd->pd_va, pd->pd_size, pd->pd_pa); > #endif > > Modified: head/sys/arm/include/pmap-v6.h > > ============================================================================== > --- head/sys/arm/include/pmap-v6.h Tue Feb 2 21:11:23 2016 > (r295167) > +++ head/sys/arm/include/pmap-v6.h Tue Feb 2 21:17:25 2016 > (r295168) > @@ -218,12 +218,6 @@ vm_offset_t pmap_preboot_reserve_pages(u > vm_offset_t pmap_preboot_get_vpages(u_int ); > void pmap_preboot_map_attr(vm_paddr_t, vm_offset_t, vm_size_t, vm_prot_t, > vm_memattr_t); > -static __inline void > -pmap_map_chunk(vm_offset_t l1pt, vm_offset_t va, vm_offset_t pa, > - vm_size_t size, int prot, int cache) > -{ > - pmap_preboot_map_attr(pa, va, size, prot, cache); > -} > > #endif /* _KERNEL */ > > @@ -256,29 +250,6 @@ pmap_map_chunk(vm_offset_t l1pt, vm_offs > */ > void vector_page_setprot(int); > > -/* > - * sys/arm/arm/bus_space_generic.c (just comment) > - * sys/arm/arm/devmap.c > - * sys/arm/arm/pmap.c (just comment) > - * sys/arm/at91/at91_machdep.c > - * sys/arm/cavium/cns11xx/econa_machdep.c > - * sys/arm/freescale/imx/imx6_machdep.c (just comment) > - * sys/arm/mv/orion/db88f5xxx.c > - * sys/arm/mv/mv_localbus.c > - * sys/arm/mv/mv_machdep.c > - * sys/arm/mv/mv_pci.c > - * sys/arm/s3c2xx0/s3c24x0_machdep.c > - * sys/arm/versatile/versatile_machdep.c > - * sys/arm/xscale/ixp425/avila_machdep.c > - * sys/arm/xscale/i8134x/crb_machdep.c > - * sys/arm/xscale/i80321/ep80219_machdep.c > - * sys/arm/xscale/i80321/iq31244_machdep.c > - * sys/arm/xscale/pxa/pxa_machdep.c > - */ > -#define PTE_DEVICE PTE2_ATTR_DEVICE > - > - > - > #endif /* _KERNEL */ > // > ----------------------------------------------------------------------------- > > > From owner-svn-src-all@freebsd.org Wed Feb 3 08:12:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FE77A9A483; Wed, 3 Feb 2016 08:12:23 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11A3126F; Wed, 3 Feb 2016 08:12:22 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u138CMp7063073; Wed, 3 Feb 2016 08:12:22 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u138CMql063072; Wed, 3 Feb 2016 08:12:22 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201602030812.u138CMql063072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Wed, 3 Feb 2016 08:12:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295198 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 08:12:23 -0000 Author: mmel Date: Wed Feb 3 08:12:21 2016 New Revision: 295198 URL: https://svnweb.freebsd.org/changeset/base/295198 Log: ARM: acle-compat.h is arm specific header, don't include it for aarch64. This fixes aarch64 buildkernel. Modified: head/sys/arm/arm/devmap.c Modified: head/sys/arm/arm/devmap.c ============================================================================== --- head/sys/arm/arm/devmap.c Wed Feb 3 04:02:50 2016 (r295197) +++ head/sys/arm/arm/devmap.c Wed Feb 3 08:12:21 2016 (r295198) @@ -40,7 +40,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef __arm__ #include +#endif #include #include #include From owner-svn-src-all@freebsd.org Wed Feb 3 08:59:14 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1553A76671; Wed, 3 Feb 2016 08:59:14 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CDC1DDD; Wed, 3 Feb 2016 08:59:14 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u138xDf5075417; Wed, 3 Feb 2016 08:59:13 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u138xCvw075411; Wed, 3 Feb 2016 08:59:12 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201602030859.u138xCvw075411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Wed, 3 Feb 2016 08:59:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295199 - head/sys/arm/xscale/i8134x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 08:59:14 -0000 Author: mmel Date: Wed Feb 3 08:59:12 2016 New Revision: 295199 URL: https://svnweb.freebsd.org/changeset/base/295199 Log: ARM: The arm/xscale/i80321 directory is now orphaned, but two drivers are shared with i8134x. In preparation for removal of i80321, copy these drivers to i8134x. Added: head/sys/arm/xscale/i8134x/i80321_timer.c - copied, changed from r295197, head/sys/arm/xscale/i80321/i80321_timer.c head/sys/arm/xscale/i8134x/i80321_wdog.c - copied, changed from r295197, head/sys/arm/xscale/i80321/i80321_wdog.c head/sys/arm/xscale/i8134x/i80321reg.h - copied unchanged from r295197, head/sys/arm/xscale/i80321/i80321reg.h head/sys/arm/xscale/i8134x/i80321var.h - copied unchanged from r295197, head/sys/arm/xscale/i80321/i80321var.h Modified: head/sys/arm/xscale/i8134x/crb_machdep.c head/sys/arm/xscale/i8134x/files.i81342 Modified: head/sys/arm/xscale/i8134x/crb_machdep.c ============================================================================== --- head/sys/arm/xscale/i8134x/crb_machdep.c Wed Feb 3 08:12:21 2016 (r295198) +++ head/sys/arm/xscale/i8134x/crb_machdep.c Wed Feb 3 08:59:12 2016 (r295199) @@ -92,7 +92,7 @@ __FBSDID("$FreeBSD$"); #include -#include /* For i80321_calibrate_delay() */ +#include /* For i80321_calibrate_delay() */ #include #include Modified: head/sys/arm/xscale/i8134x/files.i81342 ============================================================================== --- head/sys/arm/xscale/i8134x/files.i81342 Wed Feb 3 08:12:21 2016 (r295198) +++ head/sys/arm/xscale/i8134x/files.i81342 Wed Feb 3 08:59:12 2016 (r295199) @@ -1,7 +1,7 @@ # $FreeBSD$ arm/arm/bus_space_base.c standard -arm/xscale/i80321/i80321_timer.c standard -arm/xscale/i80321/i80321_wdog.c optional iopwdog +arm/xscale/i8134x/i80321_timer.c standard +arm/xscale/i8134x/i80321_wdog.c optional iopwdog arm/xscale/i8134x/i81342.c standard arm/xscale/i8134x/i81342_mcu.c standard arm/xscale/i8134x/i81342_pci.c optional pci Copied and modified: head/sys/arm/xscale/i8134x/i80321_timer.c (from r295197, head/sys/arm/xscale/i80321/i80321_timer.c) ============================================================================== --- head/sys/arm/xscale/i80321/i80321_timer.c Wed Feb 3 04:02:50 2016 (r295197, copy source) +++ head/sys/arm/xscale/i8134x/i80321_timer.c Wed Feb 3 08:59:12 2016 (r295199) @@ -59,8 +59,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include +#include +#include #ifdef CPU_XSCALE_81342 #define ICU_INT_TIMER0 (8) /* XXX: Can't include i81342reg.h because Copied and modified: head/sys/arm/xscale/i8134x/i80321_wdog.c (from r295197, head/sys/arm/xscale/i80321/i80321_wdog.c) ============================================================================== --- head/sys/arm/xscale/i80321/i80321_wdog.c Wed Feb 3 04:02:50 2016 (r295197, copy source) +++ head/sys/arm/xscale/i8134x/i80321_wdog.c Wed Feb 3 08:59:12 2016 (r295199) @@ -54,8 +54,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include +#include +#include struct iopwdog_softc { Copied: head/sys/arm/xscale/i8134x/i80321reg.h (from r295197, head/sys/arm/xscale/i80321/i80321reg.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/xscale/i8134x/i80321reg.h Wed Feb 3 08:59:12 2016 (r295199, copy of r295197, head/sys/arm/xscale/i80321/i80321reg.h) @@ -0,0 +1,547 @@ +/* $NetBSD: i80321reg.h,v 1.14 2003/12/19 10:08:11 gavan Exp $ */ + +/*- + * Copyright (c) 2002 Wasabi Systems, Inc. + * All rights reserved. + * + * Written by Jason R. Thorpe for Wasabi Systems, Inc. + * + * 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. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed for the NetBSD Project by + * Wasabi Systems, Inc. + * 4. The name of Wasabi Systems, Inc. may not be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``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 WASABI SYSTEMS, INC + * 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_XSCALE_I80321REG_H_ +#define _ARM_XSCALE_I80321REG_H_ + +/* + * Register definitions for the Intel 80321 (``Verde'') I/O processor, + * based on the XScale core. + */ + +/* + * Base i80321 memory map: + * + * 0x0000.0000 - 0x7fff.ffff ATU Outbound Direct Addressing Window + * 0x8000.0000 - 0x9001.ffff ATU Outbound Translation Windows + * 0x9002.0000 - 0xffff.dfff External Memory + * 0xffff.e000 - 0xffff.e8ff Peripheral Memory Mapped Registers + * 0xffff.e900 - 0xffff.ffff Reserved + */ + +#define VERDE_OUT_DIRECT_WIN_BASE 0x00000000UL +#define VERDE_OUT_DIRECT_WIN_SIZE 0x80000000UL + +#define VERDE_OUT_XLATE_MEM_WIN_SIZE 0x04000000UL +#define VERDE_OUT_XLATE_IO_WIN_SIZE 0x00010000UL + +#define VERDE_OUT_XLATE_MEM_WIN0_BASE 0x80000000UL +#define VERDE_OUT_XLATE_MEM_WIN1_BASE 0x84000000UL + +#define VERDE_OUT_XLATE_IO_WIN0_BASE 0x90000000UL + +#define VERDE_EXTMEM_BASE 0x90020000UL + +#define VERDE_PMMR_BASE 0xffffe000UL +#define VERDE_PMMR_SIZE 0x00001700UL + +/* + * Peripheral Memory Mapped Registers. Defined as offsets + * from the VERDE_PMMR_BASE. + */ +#define VERDE_ATU_BASE 0x0100 +#define VERDE_ATU_SIZE 0x0100 + +#define VERDE_MU_BASE 0x0300 +#define VERDE_MU_SIZE 0x0100 + +#define VERDE_DMA_BASE 0x0400 +#define VERDE_DMA_BASE0 (VERDE_DMA_BASE + 0x00) +#define VERDE_DMA_BASE1 (VERDE_DMA_BASE + 0x40) +#define VERDE_DMA_SIZE 0x0100 +#define VERDE_DMA_CHSIZE 0x0040 + +#define VERDE_MCU_BASE 0x0500 +#define VERDE_MCU_SIZE 0x0100 + +#if defined(CPU_XSCALE_80321) +#define VERDE_SSP_BASE 0x0600 +#define VERDE_SSP_SIZE 0x0080 +#endif + +#define VERDE_PBIU_BASE 0x0680 +#define VERDE_PBIU_SIZE 0x0080 + +#if defined(CPU_XSCALE_80321) +#define VERDE_AAU_BASE 0x0800 +#define VERDE_AAU_SIZE 0x0100 +#endif + +#define VERDE_I2C_BASE 0x1680 +#define VERDE_I2C_BASE0 (VERDE_I2C_BASE + 0x00) +#define VERDE_I2C_BASE1 (VERDE_I2C_BASE + 0x20) +#define VERDE_I2C_SIZE 0x0080 +#define VERDE_I2C_CHSIZE 0x0020 + +/* + * Address Translation Unit + */ + /* 0x00 - 0x38 -- PCI configuration space header */ +#define ATU_IALR0 0x40 /* Inbound ATU Limit 0 */ +#define ATU_IATVR0 0x44 /* Inbound ATU Xlate Value 0 */ +#define ATU_ERLR 0x48 /* Expansion ROM Limit */ +#define ATU_ERTVR 0x4c /* Expansion ROM Xlate Value */ +#define ATU_IALR1 0x50 /* Inbound ATU Limit 1 */ +#define ATU_IALR2 0x54 /* Inbound ATU Limit 2 */ +#define ATU_IATVR2 0x58 /* Inbound ATU Xlate Value 2 */ +#define ATU_OIOWTVR 0x5c /* Outbound I/O Window Xlate Value */ +#define ATU_OMWTVR0 0x60 /* Outbound Mem Window Xlate Value 0 */ +#define ATU_OUMWTVR0 0x64 /* Outbound Mem Window Xlate Value 0 Upper */ +#define ATU_OMWTVR1 0x68 /* Outbound Mem Window Xlate Value 1 */ +#define ATU_OUMWTVR1 0x6c /* Outbound Mem Window Xlate Value 1 Upper */ +#define ATU_OUDWTVR 0x78 /* Outbound Mem Direct Xlate Value Upper */ +#define ATU_ATUCR 0x80 /* ATU Configuration */ +#define ATU_PCSR 0x84 /* PCI Configuration and Status */ +#define ATU_ATUISR 0x88 /* ATU Interrupt Status */ +#define ATU_ATUIMR 0x8c /* ATU Interrupt Mask */ +#define ATU_IABAR3 0x90 /* Inbound ATU Base Address 3 */ +#define ATU_IAUBAR3 0x94 /* Inbound ATU Base Address 3 Upper */ +#define ATU_IALR3 0x98 /* Inbound ATU Limit 3 */ +#define ATU_IATVR3 0x9c /* Inbound ATU Xlate Value 3 */ +#define ATU_OCCAR 0xa4 /* Outbound Configuration Cycle Address */ +#define ATU_OCCDR 0xac /* Outbound Configuration Cycle Data */ +#define ATU_MSI_PORT 0xb4 /* MSI port */ +#define ATU_PDSCR 0xbc /* PCI Bus Drive Strength Control */ +#define ATU_PCI_X_CAP_ID 0xe0 /* (1) */ +#define ATU_PCI_X_NEXT 0xe1 /* (1) */ +#define ATU_PCIXCMD 0xe2 /* PCI-X Command Register (2) */ +#define ATU_PCIXSR 0xe4 /* PCI-X Status Register */ + +#define ATUCR_DRC_ALIAS (1U << 19) +#define ATUCR_DAU2GXEN (1U << 18) +#define ATUCR_P_SERR_MA (1U << 16) +#define ATUCR_DTS (1U << 15) +#define ATUCR_P_SERR_DIE (1U << 9) +#define ATUCR_DAE (1U << 8) +#define ATUCR_BIST_IE (1U << 3) +#define ATUCR_OUT_EN (1U << 1) + +#define PCSR_DAAAPE (1U << 18) +#define PCSR_PCI_X_CAP (3U << 16) +#define PCSR_PCI_X_CAP_BORING (0 << 16) +#define PCSR_PCI_X_CAP_66 (1U << 16) +#define PCSR_PCI_X_CAP_100 (2U << 16) +#define PCSR_PCI_X_CAP_133 (3U << 16) +#define PCSR_OTQB (1U << 15) +#define PCSR_IRTQB (1U << 14) +#define PCSR_DTV (1U << 12) +#define PCSR_BUS66 (1U << 10) +#define PCSR_BUS64 (1U << 8) +#define PCSR_RIB (1U << 5) +#define PCSR_RPB (1U << 4) +#define PCSR_CCR (1U << 2) +#define PCSR_CPR (1U << 1) + +#define ATUISR_IMW1BU (1U << 14) +#define ATUISR_ISCEM (1U << 13) +#define ATUISR_RSCEM (1U << 12) +#define ATUISR_PST (1U << 11) +#define ATUISR_P_SERR_ASRT (1U << 10) +#define ATUISR_DPE (1U << 9) +#define ATUISR_BIST (1U << 8) +#define ATUISR_IBMA (1U << 7) +#define ATUISR_P_SERR_DET (1U << 4) +#define ATUISR_PMA (1U << 3) +#define ATUISR_PTAM (1U << 2) +#define ATUISR_PTAT (1U << 1) +#define ATUISR_PMPE (1U << 0) + +#define ATUIMR_IMW1BU (1U << 11) +#define ATUIMR_ISCEM (1U << 10) +#define ATUIMR_RSCEM (1U << 9) +#define ATUIMR_PST (1U << 8) +#define ATUIMR_DPE (1U << 7) +#define ATUIMR_P_SERR_ASRT (1U << 6) +#define ATUIMR_PMA (1U << 5) +#define ATUIMR_PTAM (1U << 4) +#define ATUIMR_PTAT (1U << 3) +#define ATUIMR_PMPE (1U << 2) +#define ATUIMR_IE_SERR_EN (1U << 1) +#define ATUIMR_ECC_TAE (1U << 0) + +#define PCIXCMD_MOST_1 (0 << 4) +#define PCIXCMD_MOST_2 (1 << 4) +#define PCIXCMD_MOST_3 (2 << 4) +#define PCIXCMD_MOST_4 (3 << 4) +#define PCIXCMD_MOST_8 (4 << 4) +#define PCIXCMD_MOST_12 (5 << 4) +#define PCIXCMD_MOST_16 (6 << 4) +#define PCIXCMD_MOST_32 (7 << 4) +#define PCIXCMD_MOST_MASK (7 << 4) +#define PCIXCMD_MMRBC_512 (0 << 2) +#define PCIXCMD_MMRBC_1024 (1 << 2) +#define PCIXCMD_MMRBC_2048 (2 << 2) +#define PCIXCMD_MMRBC_4096 (3 << 2) +#define PCIXCMD_MMRBC_MASK (3 << 2) +#define PCIXCMD_ERO (1U << 1) +#define PCIXCMD_DPERE (1U << 0) + +#define PCIXSR_RSCEM (1U << 29) +#define PCIXSR_DMCRS_MASK (7 << 26) +#define PCIXSR_DMOST_MASK (7 << 23) +#define PCIXSR_COMPLEX (1U << 20) +#define PCIXSR_USC (1U << 19) +#define PCIXSR_SCD (1U << 18) +#define PCIXSR_133_CAP (1U << 17) +#define PCIXSR_32PCI (1U << 16) /* 0 = 32, 1 = 64 */ +#define PCIXSR_BUSNO(x) (((x) & 0xff00) >> 8) +#define PCIXSR_DEVNO(x) (((x) & 0xf8) >> 3) +#define PCIXSR_FUNCNO(x) ((x) & 0x7) + +/* + * Memory Controller Unit + */ +#define MCU_SDIR 0x00 /* DDR SDRAM Init. Register */ +#define MCU_SDCR 0x04 /* DDR SDRAM Control Register */ +#define MCU_SDBR 0x08 /* SDRAM Base Register */ +#define MCU_SBR0 0x0c /* SDRAM Boundary 0 */ +#define MCU_SBR1 0x10 /* SDRAM Boundary 1 */ +#define MCU_ECCR 0x34 /* ECC Control Register */ +#define MCU_ELOG0 0x38 /* ECC Log 0 */ +#define MCU_ELOG1 0x3c /* ECC Log 1 */ +#define MCU_ECAR0 0x40 /* ECC address 0 */ +#define MCU_ECAR1 0x44 /* ECC address 1 */ +#define MCU_ECTST 0x48 /* ECC test register */ +#define MCU_MCISR 0x4c /* MCU Interrupt Status Register */ +#define MCU_RFR 0x50 /* Refresh Frequency Register */ +#define MCU_DBUDSR 0x54 /* Data Bus Pull-up Drive Strength */ +#define MCU_DBDDSR 0x58 /* Data Bus Pull-down Drive Strength */ +#define MCU_CUDSR 0x5c /* Clock Pull-up Drive Strength */ +#define MCU_CDDSR 0x60 /* Clock Pull-down Drive Strength */ +#define MCU_CEUDSR 0x64 /* Clock En Pull-up Drive Strength */ +#define MCU_CEDDSR 0x68 /* Clock En Pull-down Drive Strength */ +#define MCU_CSUDSR 0x6c /* Chip Sel Pull-up Drive Strength */ +#define MCU_CSDDSR 0x70 /* Chip Sel Pull-down Drive Strength */ +#define MCU_REUDSR 0x74 /* Rx En Pull-up Drive Strength */ +#define MCU_REDDSR 0x78 /* Rx En Pull-down Drive Strength */ +#define MCU_ABUDSR 0x7c /* Addr Bus Pull-up Drive Strength */ +#define MCU_ABDDSR 0x80 /* Addr Bus Pull-down Drive Strength */ +#define MCU_DSDR 0x84 /* Data Strobe Delay Register */ +#define MCU_REDR 0x88 /* Rx Enable Delay Register */ + +#define SDCR_DIMMTYPE (1U << 1) /* 0 = unbuf, 1 = reg */ +#define SDCR_BUSWIDTH (1U << 2) /* 0 = 64, 1 = 32 */ + +#define SBRx_TECH (1U << 31) +#define SBRx_BOUND 0x0000003f + +#define ECCR_SBERE (1U << 0) +#define ECCR_MBERE (1U << 1) +#define ECCR_SBECE (1U << 2) +#define ECCR_ECCEN (1U << 3) + +#define ELOGx_SYNDROME 0x000000ff +#define ELOGx_ERRTYPE (1U << 8) /* 1 = multi-bit */ +#define ELOGx_RW (1U << 12) /* 1 = write error */ + /* + * Dev ID Func Requester + * 2 0 XScale core + * 2 1 ATU + * 13 0 DMA channel 0 + * 13 1 DMA channel 1 + * 26 0 ATU + */ +#define ELOGx_REQ_DEV(x) (((x) >> 19) & 0x1f) +#define ELOGx_REQ_FUNC(x) (((x) >> 16) & 0x3) + +#define MCISR_ECC_ERR0 (1U << 0) +#define MCISR_ECC_ERR1 (1U << 1) +#define MCISR_ECC_ERRN (1U << 2) + +/* + * Timers + * + * The i80321 timer registers are available in both memory-mapped + * and coprocessor spaces. Most of the registers are read-only + * if memory-mapped, so we access them via coprocessor space. + * + * TMR0 cp6 c0,1 0xffffe7e0 + * TMR1 cp6 c1,1 0xffffe7e4 + * TCR0 cp6 c2,1 0xffffe7e8 + * TCR1 cp6 c3,1 0xffffe7ec + * TRR0 cp6 c4,1 0xffffe7f0 + * TRR1 cp6 c5,1 0xffffe7f4 + * TISR cp6 c6,1 0xffffe7f8 + * WDTCR cp6 c7,1 0xffffe7fc + */ + +#define TMRx_TC (1U << 0) +#define TMRx_ENABLE (1U << 1) +#define TMRx_RELOAD (1U << 2) +#define TMRx_CSEL_CORE (0 << 4) +#define TMRx_CSEL_CORE_div4 (1 << 4) +#define TMRx_CSEL_CORE_div8 (2 << 4) +#define TMRx_CSEL_CORE_div16 (3 << 4) + +#define TISR_TMR0 (1U << 0) +#define TISR_TMR1 (1U << 1) + +#define WDTCR_ENABLE1 0x1e1e1e1e +#define WDTCR_ENABLE2 0xe1e1e1e1 + +/* + * Interrupt Controller Unit. + * + * INTCTL cp6 c0,0 0xffffe7d0 + * INTSTR cp6 c4,0 0xffffe7d4 + * IINTSRC cp6 c8,0 0xffffe7d8 + * FINTSRC cp6 c9,0 0xffffe7dc + * PIRSR 0xffffe1ec + */ + +#define ICU_PIRSR 0x01ec +#define ICU_GPOE 0x07c4 +#define ICU_GPID 0x07c8 +#define ICU_GPOD 0x07cc + +/* + * NOTE: WE USE THE `bitXX' BITS TO INDICATE PENDING SOFTWARE + * INTERRUPTS. See i80321_icu.c + */ +#define ICU_INT_HPI 31 /* high priority interrupt */ +#define ICU_INT_XINT0 27 /* external interrupts */ +#define ICU_INT_XINT(x) ((x) + ICU_INT_XINT0) +#define ICU_INT_bit26 26 + +#if defined (CPU_XSCALE_80219) +#define ICU_INT_bit25 25 /* reserved */ +#else +/* CPU_XSCALE_80321 */ +#define ICU_INT_SSP 25 /* SSP serial port */ +#endif + +#define ICU_INT_MUE 24 /* msg unit error */ + +#if defined (CPU_XSCALE_80219) +#define ICU_INT_bit23 23 /* reserved */ +#else +/* CPU_XSCALE_80321 */ +#define ICU_INT_AAUE 23 /* AAU error */ +#endif + +#define ICU_INT_bit22 22 +#define ICU_INT_DMA1E 21 /* DMA Ch 1 error */ +#define ICU_INT_DMA0E 20 /* DMA Ch 0 error */ +#define ICU_INT_MCUE 19 /* memory controller error */ +#define ICU_INT_ATUE 18 /* ATU error */ +#define ICU_INT_BIUE 17 /* bus interface unit error */ +#define ICU_INT_PMU 16 /* XScale PMU */ +#define ICU_INT_PPM 15 /* peripheral PMU */ +#define ICU_INT_BIST 14 /* ATU Start BIST */ +#define ICU_INT_MU 13 /* messaging unit */ +#define ICU_INT_I2C1 12 /* i2c unit 1 */ +#define ICU_INT_I2C0 11 /* i2c unit 0 */ +#define ICU_INT_TMR1 10 /* timer 1 */ +#define ICU_INT_TMR0 9 /* timer 0 */ +#define ICU_INT_CPPM 8 /* core processor PMU */ + +#if defined(CPU_XSCALE_80219) +#define ICU_INT_bit7 7 /* reserved */ +#define ICU_INT_bit6 6 /* reserved */ +#else +/* CPU_XSCALE_80321 */ +#define ICU_INT_AAU_EOC 7 /* AAU end-of-chain */ +#define ICU_INT_AAU_EOT 6 /* AAU end-of-transfer */ +#endif + +#define ICU_INT_bit5 5 +#define ICU_INT_bit4 4 +#define ICU_INT_DMA1_EOC 3 /* DMA1 end-of-chain */ +#define ICU_INT_DMA1_EOT 2 /* DMA1 end-of-transfer */ +#define ICU_INT_DMA0_EOC 1 /* DMA0 end-of-chain */ +#define ICU_INT_DMA0_EOT 0 /* DMA0 end-of-transfer */ + +#if defined (CPU_XSCALE_80219) +#define ICU_INT_HWMASK (0xffffffff & \ + ~((1 << ICU_INT_bit26) | \ + (1 << ICU_INT_bit25) | \ + (1 << ICU_INT_bit23) | \ + (1 << ICU_INT_bit22) | \ + (1 << ICU_INT_bit7) | \ + (1 << ICU_INT_bit6) | \ + (1 << ICU_INT_bit5) | \ + (1 << ICU_INT_bit4))) + +#else +/* CPU_XSCALE_80321 */ +#define ICU_INT_HWMASK (0xffffffff & \ + ~((1 << ICU_INT_bit26) | \ + (1 << ICU_INT_bit22) | \ + (1 << ICU_INT_bit5) | \ + (1 << ICU_INT_bit4))) +#endif + +/* + * SSP Serial Port + */ +#if defined (CPU_XSCALE_80321) + +#define SSP_SSCR0 0x00 /* SSC control 0 */ +#define SSP_SSCR1 0x04 /* SSC control 1 */ +#define SSP_SSSR 0x08 /* SSP status */ +#define SSP_SSITR 0x0c /* SSP interrupt test */ +#define SSP_SSDR 0x10 /* SSP data */ + +#define SSP_SSCR0_DSIZE(x) ((x) - 1)/* data size: 4..16 */ +#define SSP_SSCR0_FRF_SPI (0 << 4) /* Motorola Serial Periph Iface */ +#define SSP_SSCR0_FRF_SSP (1U << 4)/* TI Sync. Serial Protocol */ +#define SSP_SSCR0_FRF_UWIRE (2U << 4)/* NatSemi Microwire */ +#define SSP_SSCR0_FRF_rsvd (3U << 4)/* reserved */ +#define SSP_SSCR0_ECS (1U << 6)/* external clock select */ +#define SSP_SSCR0_SSE (1U << 7)/* sync. serial port enable */ +#define SSP_SSCR0_SCR(x) ((x) << 8)/* serial clock rate */ + /* bit rate = 3.6864 * 10e6 / + (2 * (SCR + 1)) */ + +#define SSP_SSCR1_RIE (1U << 0)/* Rx FIFO interrupt enable */ +#define SSP_SSCR1_TIE (1U << 1)/* Tx FIFO interrupt enable */ +#define SSP_SSCR1_LBM (1U << 2)/* loopback mode enable */ +#define SSP_SSCR1_SPO (1U << 3)/* Moto SPI SSCLK pol. (1 = high) */ +#define SSP_SSCR1_SPH (1U << 4)/* Moto SPI SSCLK phase: + 0 = inactive full at start, + 1/2 at end of frame + 1 = inactive 1/2 at start, + full at end of frame */ +#define SSP_SSCR1_MWDS (1U << 5)/* Microwire data size: + 0 = 8 bit + 1 = 16 bit */ +#define SSP_SSCR1_TFT (((x) - 1) << 6) /* Tx FIFO threshold */ +#define SSP_SSCR1_RFT (((x) - 1) << 10)/* Rx FIFO threshold */ +#define SSP_SSCR1_EFWR (1U << 14)/* enab. FIFO write/read */ +#define SSP_SSCR1_STRF (1U << 15)/* FIFO write/read FIFO select: + 0 = Tx FIFO + 1 = Rx FIFO */ + +#define SSP_SSSR_TNF (1U << 2)/* Tx FIFO not full */ +#define SSP_SSSR_RNE (1U << 3)/* Rx FIFO not empty */ +#define SSP_SSSR_BSY (1U << 4)/* SSP is busy */ +#define SSP_SSSR_TFS (1U << 5)/* Tx FIFO service request */ +#define SSP_SSSR_RFS (1U << 6)/* Rx FIFO service request */ +#define SSP_SSSR_ROR (1U << 7)/* Rx FIFO overrun */ +#define SSP_SSSR_TFL(x) (((x) >> 8) & 0xf) /* Tx FIFO level */ +#define SSP_SSSR_RFL(x) (((x) >> 12) & 0xf)/* Rx FIFO level */ + +#define SSP_SSITR_TTFS (1U << 5)/* Test Tx FIFO service */ +#define SSP_SSITR_TRFS (1U << 6)/* Test Rx FIFO service */ +#define SSP_SSITR_TROR (1U << 7)/* Test Rx overrun */ + +#endif /* CPU_XSCALE_80321 */ + +/* + * Peripheral Bus Interface Unit + */ + +#define PBIU_PBCR 0x00 /* PBIU Control Register */ +#define PBIU_PBBAR0 0x08 /* PBIU Base Address Register 0 */ +#define PBIU_PBLR0 0x0c /* PBIU Limit Register 0 */ +#define PBIU_PBBAR1 0x10 /* PBIU Base Address Register 1 */ +#define PBIU_PBLR1 0x14 /* PBIU Limit Register 1 */ +#define PBIU_PBBAR2 0x18 /* PBIU Base Address Register 2 */ +#define PBIU_PBLR2 0x1c /* PBIU Limit Register 2 */ +#define PBIU_PBBAR3 0x20 /* PBIU Base Address Register 3 */ +#define PBIU_PBLR3 0x24 /* PBIU Limit Register 3 */ +#define PBIU_PBBAR4 0x28 /* PBIU Base Address Register 4 */ +#define PBIU_PBLR4 0x2c /* PBIU Limit Register 4 */ +#define PBIU_PBBAR5 0x30 /* PBIU Base Address Register 5 */ +#define PBIU_PBLR5 0x34 /* PBIU Limit Register 5 */ +#define PBIU_DSCR 0x38 /* PBIU Drive Strength Control Reg. */ +#define PBIU_MBR0 0x40 /* PBIU Memory-less Boot Reg. 0 */ +#define PBIU_MBR1 0x60 /* PBIU Memory-less Boot Reg. 1 */ +#define PBIU_MBR2 0x64 /* PBIU Memory-less Boot Reg. 2 */ + +#define PBIU_PBCR_PBIEN (1 << 0) +#define PBIU_PBCR_PBI100 (1 << 1) +#define PBIU_PBCR_PBI66 (2 << 1) +#define PBIU_PBCR_PBI33 (3 << 1) +#define PBIU_PBCR_PBBEN (1 << 3) + +#define PBIU_PBARx_WIDTH8 (0 << 0) +#define PBIU_PBARx_WIDTH16 (1 << 0) +#define PBIU_PBARx_WIDTH32 (2 << 0) +#define PBIU_PBARx_ADWAIT4 (0 << 2) +#define PBIU_PBARx_ADWAIT8 (1 << 2) +#define PBIU_PBARx_ADWAIT12 (2 << 2) +#define PBIU_PBARx_ADWAIT16 (3 << 2) +#define PBIU_PBARx_ADWAIT20 (4 << 2) +#define PBIU_PBARx_RCWAIT1 (0 << 6) +#define PBIU_PBARx_RCWAIT4 (1 << 6) +#define PBIU_PBARx_RCWAIT8 (2 << 6) +#define PBIU_PBARx_RCWAIT12 (3 << 6) +#define PBIU_PBARx_RCWAIT16 (4 << 6) +#define PBIU_PBARx_RCWAIT20 (5 << 6) +#define PBIU_PBARx_FWE (1 << 9) +#define PBIU_BASE_MASK 0xfffff000U + +#define PBIU_PBLRx_SIZE(x) (~((x) - 1)) + +/* + * Messaging Unit + */ +#define MU_IMR0 0x0010 /* MU Inbound Message Register 0 */ +#define MU_IMR1 0x0014 /* MU Inbound Message Register 1 */ +#define MU_OMR0 0x0018 /* MU Outbound Message Register 0 */ +#define MU_OMR1 0x001c /* MU Outbound Message Register 1 */ +#define MU_IDR 0x0020 /* MU Inbound Doorbell Register */ +#define MU_IISR 0x0024 /* MU Inbound Interrupt Status Reg */ +#define MU_IIMR 0x0028 /* MU Inbound Interrupt Mask Reg */ +#define MU_ODR 0x002c /* MU Outbound Doorbell Register */ +#define MU_OISR 0x0030 /* MU Outbound Interrupt Status Reg */ +#define MU_OIMR 0x0034 /* MU Outbound Interrupt Mask Reg */ +#define MU_MUCR 0x0050 /* MU Configuration Register */ +#define MU_QBAR 0x0054 /* MU Queue Base Address Register */ +#define MU_IFHPR 0x0060 /* MU Inbound Free Head Pointer Reg */ +#define MU_IFTPR 0x0064 /* MU Inbound Free Tail Pointer Reg */ +#define MU_IPHPR 0x0068 /* MU Inbound Post Head Pointer Reg */ +#define MU_IPTPR 0x006c /* MU Inbound Post Tail Pointer Reg */ +#define MU_OFHPR 0x0070 /* MU Outbound Free Head Pointer Reg */ +#define MU_OFTPR 0x0074 /* MU Outbound Free Tail Pointer Reg */ +#define MU_OPHPR 0x0078 /* MU Outbound Post Head Pointer Reg */ +#define MU_OPTPR 0x007c /* MU Outbound Post Tail Pointer Reg */ +#define MU_IAR 0x0080 /* MU Index Address Register */ + +#define MU_IIMR_IRI (1 << 6) /* Index Register Interrupt */ +#define MU_IIMR_OFQFI (1 << 5) /* Outbound Free Queue Full Int. */ +#define MU_IIMR_IPQI (1 << 4) /* Inbound Post Queue Interrupt */ +#define MU_IIMR_EDI (1 << 3) /* Error Doorbell Interrupt */ +#define MU_IIMR_IDI (1 << 2) /* Inbound Doorbell Interrupt */ +#define MU_IIMR_IM1I (1 << 1) /* Inbound Message 1 Interrupt */ +#define MU_IIMR_IM0I (1 << 0) /* Inbound Message 0 Interrupt */ + +#endif /* _ARM_XSCALE_I80321REG_H_ */ Copied: head/sys/arm/xscale/i8134x/i80321var.h (from r295197, head/sys/arm/xscale/i80321/i80321var.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/xscale/i8134x/i80321var.h Wed Feb 3 08:59:12 2016 (r295199, copy of r295197, head/sys/arm/xscale/i80321/i80321var.h) @@ -0,0 +1,137 @@ +/* $NetBSD: i80321var.h,v 1.8 2003/10/06 16:06:06 thorpej Exp $ */ + +/*- + * Copyright (c) 2002, 2003 Wasabi Systems, Inc. + * All rights reserved. + * + * Written by Jason R. Thorpe for Wasabi Systems, Inc. + * + * 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. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed for the NetBSD Project by + * Wasabi Systems, Inc. + * 4. The name of Wasabi Systems, Inc. may not be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``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 WASABI SYSTEMS, INC + * 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_XSCALE_I80321VAR_H_ +#define _ARM_XSCALE_I80321VAR_H_ + +#include +#include +#include + +extern struct bus_space i80321_bs_tag; + +struct i80321_softc { + device_t dev; + bus_space_tag_t sc_st; + bus_space_handle_t sc_sh; + /* Handles for the various subregions. */ + bus_space_handle_t sc_atu_sh; + bus_space_handle_t sc_mcu_sh; + int sc_is_host; + + /* + * We expect the board-specific front-end to have already mapped + * the PCI I/O space .. it is only 64K, and I/O mappings tend to + * be smaller than a page size, so it's generally more efficient + * to map them all into virtual space in one fell swoop. + */ + vm_offset_t sc_iow_vaddr; /* I/O window vaddr */ + + /* + * Variables that define the Inbound windows. The base address of + * 0-2 are configured by a host via BARs. The xlate variable + * defines the start of the local address space that it maps to. + * The size variable defines the byte size. + * + * The first 3 windows are for incoming PCI memory read/write + * cycles from a host. The 4th window, not configured by the + * host (as it outside the normal BAR range) is the inbound + * window for PCI devices controlled by the i80321. + */ + struct { + uint32_t iwin_base_hi; + uint32_t iwin_base_lo; + uint32_t iwin_xlate; + uint32_t iwin_size; + } sc_iwin[4]; + + /* + * Variables that define the Outbound windows. + */ + struct { + uint32_t owin_xlate_lo; + uint32_t owin_xlate_hi; + } sc_owin[2]; + + /* + * This is the PCI address that the Outbound I/O + * window maps to. + */ + uint32_t sc_ioout_xlate; + + /* Bus space, DMA, and PCI tags for the PCI bus (private devices). */ + struct bus_space sc_pci_iot; + struct bus_space sc_pci_memt; + + /* GPIO state */ + uint8_t sc_gpio_dir; /* GPIO pin direction (1 == output) */ + uint8_t sc_gpio_val; /* GPIO output pin value */ + struct rman sc_irq_rman; + +}; + + +struct i80321_pci_softc { + device_t sc_dev; + bus_space_tag_t sc_st; + bus_space_handle_t sc_atu_sh; + bus_space_tag_t sc_pciio; + bus_space_tag_t sc_pcimem; + int sc_busno; + struct rman sc_mem_rman; + struct rman sc_io_rman; + struct rman sc_irq_rman; + uint32_t sc_mem; + uint32_t sc_io; +}; + +void i80321_sdram_bounds(bus_space_tag_t, bus_space_handle_t, + vm_paddr_t *, vm_size_t *); + +void i80321_attach(struct i80321_softc *); +void i80321_calibrate_delay(void); + +void i80321_bs_init(bus_space_tag_t, void *); +void i80321_io_bs_init(bus_space_tag_t, void *); +void i80321_mem_bs_init(bus_space_tag_t, void *); +extern int machdep_pci_route_interrupt(device_t pcib, device_t dev, int pin); + + +#endif /* _ARM_XSCALE_I80321VAR_H_ */ From owner-svn-src-all@freebsd.org Wed Feb 3 09:15:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3704FA76E84; Wed, 3 Feb 2016 09:15:46 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F127D174B; Wed, 3 Feb 2016 09:15:45 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u139FjiJ081613; Wed, 3 Feb 2016 09:15:45 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u139Figj081605; Wed, 3 Feb 2016 09:15:44 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201602030915.u139Figj081605@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Wed, 3 Feb 2016 09:15:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295200 - in head/sys: arm/arm arm/conf arm/include arm/xscale/i80321 arm/xscale/i8134x conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 09:15:46 -0000 Author: mmel Date: Wed Feb 3 09:15:44 2016 New Revision: 295200 URL: https://svnweb.freebsd.org/changeset/base/295200 Log: ARM: Remove support for xscale i80219 and i80321 CPUs. We haven't single supported config/board with these CPUs. Deleted: head/sys/arm/xscale/i80321/ Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/elf_trampoline.c head/sys/arm/conf/NOTES head/sys/arm/include/cpuconf.h head/sys/arm/include/cpufunc.h head/sys/arm/xscale/i8134x/i80321reg.h head/sys/conf/files.arm head/sys/conf/options.arm Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Wed Feb 3 08:59:12 2016 (r295199) +++ head/sys/arm/arm/cpufunc.c Wed Feb 3 09:15:44 2016 (r295200) @@ -60,18 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include -#if defined(CPU_XSCALE_80321) || defined(CPU_XSCALE_80219) -#include -#include -#endif - -/* - * Some definitions in i81342reg.h clash with i80321reg.h. - * This only happens for the LINT kernel. As it happens, - * we don't need anything from i81342reg.h that we already - * got from somewhere else during a LINT compile. - */ -#if defined(CPU_XSCALE_81342) && !defined(COMPILING_LINT) +#if defined(CPU_XSCALE_81342) #include #endif @@ -306,9 +295,7 @@ struct cpu_functions pj4bv7_cpufuncs = { }; #endif /* CPU_MV_PJ4B */ -#if defined(CPU_XSCALE_80321) || \ - defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ - defined(CPU_XSCALE_80219) +#if defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) struct cpu_functions xscale_cpufuncs = { /* CPU functions */ @@ -359,8 +346,7 @@ struct cpu_functions xscale_cpufuncs = { xscale_setup /* cpu setup */ }; #endif -/* CPU_XSCALE_80321 || CPU_XSCALE_PXA2X0 || CPU_XSCALE_IXP425 - CPU_XSCALE_80219 */ +/* CPU_XSCALE_PXA2X0 || CPU_XSCALE_IXP425 */ #ifdef CPU_XSCALE_81342 struct cpu_functions xscalec3_cpufuncs = { @@ -588,10 +574,10 @@ u_int cpu_reset_needs_v4_MMU_disable; /* #if defined(CPU_ARM9) || \ defined (CPU_ARM9E) || \ - defined(CPU_ARM1176) || defined(CPU_XSCALE_80321) || \ + defined(CPU_ARM1176) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ defined(CPU_FA526) || defined(CPU_MV_PJ4B) || \ - defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) || \ + defined(CPU_XSCALE_81342) || \ defined(CPU_CORTEXA) || defined(CPU_KRAIT) /* Global cache line sizes, use 32 as default */ @@ -829,18 +815,6 @@ set_cpufuncs() } #endif /* CPU_FA526 */ -#if defined(CPU_XSCALE_80321) || defined(CPU_XSCALE_80219) - if (cputype == CPU_ID_80321_400 || cputype == CPU_ID_80321_600 || - cputype == CPU_ID_80321_400_B0 || cputype == CPU_ID_80321_600_B0 || - cputype == CPU_ID_80219_400 || cputype == CPU_ID_80219_600) { - cpufuncs = xscale_cpufuncs; - cpu_reset_needs_v4_MMU_disable = 1; /* XScale needs it */ - get_cachetype_cp15(); - pmap_pte_init_xscale(); - goto out; - } -#endif /* CPU_XSCALE_80321 */ - #if defined(CPU_XSCALE_81342) if (cputype == CPU_ID_81342) { cpufuncs = xscalec3_cpufuncs; @@ -1207,9 +1181,8 @@ fa526_setup(void) } #endif /* CPU_FA526 */ -#if defined(CPU_XSCALE_80321) || \ - defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ - defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) +#if defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ + defined(CPU_XSCALE_81342) void xscale_setup(void) { @@ -1276,5 +1249,4 @@ xscale_setup(void) __asm __volatile("mcr p15, 0, %0, c1, c0, 1" : : "r" (auxctl)); } -#endif /* CPU_XSCALE_80321 || CPU_XSCALE_PXA2X0 || CPU_XSCALE_IXP425 - CPU_XSCALE_80219 */ +#endif /* CPU_XSCALE_PXA2X0 || CPU_XSCALE_IXP425 */ Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Wed Feb 3 08:59:12 2016 (r295199) +++ head/sys/arm/arm/elf_trampoline.c Wed Feb 3 09:15:44 2016 (r295200) @@ -67,9 +67,7 @@ extern void fa526_idcache_wbinv_all(void extern void armv5_ec_idcache_wbinv_all(void); #elif defined(CPU_ARM1176) #define cpu_idcache_wbinv_all armv6_idcache_wbinv_all -#elif defined(CPU_XSCALE_80321) || \ - defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ - defined(CPU_XSCALE_80219) +#elif defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) #define cpu_idcache_wbinv_all xscale_cache_purgeID extern void xscale_cache_purgeID(void); #elif defined(CPU_XSCALE_81342) Modified: head/sys/arm/conf/NOTES ============================================================================== --- head/sys/arm/conf/NOTES Wed Feb 3 08:59:12 2016 (r295199) +++ head/sys/arm/conf/NOTES Wed Feb 3 09:15:44 2016 (r295200) @@ -5,8 +5,6 @@ machine arm cpu CPU_ARM9 cpu CPU_ARM9E cpu CPU_FA526 -cpu CPU_XSCALE_80219 -cpu CPU_XSCALE_80321 cpu CPU_XSCALE_81342 cpu CPU_XSCALE_IXP425 cpu CPU_XSCALE_IXP435 Modified: head/sys/arm/include/cpuconf.h ============================================================================== --- head/sys/arm/include/cpuconf.h Wed Feb 3 08:59:12 2016 (r295199) +++ head/sys/arm/include/cpuconf.h Wed Feb 3 09:15:44 2016 (r295200) @@ -53,7 +53,6 @@ #define CPU_NTYPES (defined(CPU_ARM9) + \ defined(CPU_ARM9E) + \ defined(CPU_ARM1176) + \ - defined(CPU_XSCALE_80321) + \ defined(CPU_XSCALE_PXA2X0) + \ defined(CPU_FA526) + \ defined(CPU_XSCALE_IXP425)) + \ @@ -71,8 +70,7 @@ #endif #if (defined(CPU_ARM9E) || \ - defined(CPU_XSCALE_80321) || \ - defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) || \ + defined(CPU_XSCALE_81342) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425)) #define ARM_ARCH_5 1 #else @@ -163,9 +161,8 @@ #define ARM_MMU_V7 0 #endif -#if (defined(CPU_XSCALE_80321) || \ - defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ - defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342)) +#if (defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ + defined(CPU_XSCALE_81342)) #define ARM_MMU_XSCALE 1 #else #define ARM_MMU_XSCALE 0 @@ -180,11 +177,10 @@ /* * Step 4: Define features that may be present on a subset of CPUs * - * ARM_XSCALE_PMU Performance Monitoring Unit on 80200 and 80321 + * ARM_XSCALE_PMU Performance Monitoring Unit on 81342 */ -#if (defined(CPU_XSCALE_80321) || \ - defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342)) +#if (defined(CPU_XSCALE_81342)) #define ARM_XSCALE_PMU 1 #else #define ARM_XSCALE_PMU 0 Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Wed Feb 3 08:59:12 2016 (r295199) +++ head/sys/arm/include/cpufunc.h Wed Feb 3 09:15:44 2016 (r295200) @@ -342,10 +342,9 @@ void armv5_ec_idcache_wbinv_range(vm_off #endif #if defined(CPU_ARM9) || defined(CPU_ARM9E) || \ - defined(CPU_XSCALE_80321) || \ defined(CPU_FA526) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ - defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) + defined(CPU_XSCALE_81342) void armv4_tlb_flushID (void); void armv4_tlb_flushD (void); @@ -355,9 +354,8 @@ void armv4_drain_writebuf (void); void armv4_idcache_inv_all (void); #endif -#if defined(CPU_XSCALE_80321) || \ - defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ - defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) +#if defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ + defined(CPU_XSCALE_81342) void xscale_cpwait (void); void xscale_cpu_sleep (int mode); @@ -395,8 +393,7 @@ void xscale_cache_flushD_rng (vm_offset_ void xscale_context_switch (void); void xscale_setup (void); -#endif /* CPU_XSCALE_80321 || CPU_XSCALE_PXA2X0 || CPU_XSCALE_IXP425 - CPU_XSCALE_80219 */ +#endif /* CPU_XSCALE_PXA2X0 || CPU_XSCALE_IXP425 */ #ifdef CPU_XSCALE_81342 Modified: head/sys/arm/xscale/i8134x/i80321reg.h ============================================================================== --- head/sys/arm/xscale/i8134x/i80321reg.h Wed Feb 3 08:59:12 2016 (r295199) +++ head/sys/arm/xscale/i8134x/i80321reg.h Wed Feb 3 09:15:44 2016 (r295200) @@ -91,19 +91,9 @@ #define VERDE_MCU_BASE 0x0500 #define VERDE_MCU_SIZE 0x0100 -#if defined(CPU_XSCALE_80321) -#define VERDE_SSP_BASE 0x0600 -#define VERDE_SSP_SIZE 0x0080 -#endif - #define VERDE_PBIU_BASE 0x0680 #define VERDE_PBIU_SIZE 0x0080 -#if defined(CPU_XSCALE_80321) -#define VERDE_AAU_BASE 0x0800 -#define VERDE_AAU_SIZE 0x0100 -#endif - #define VERDE_I2C_BASE 0x1680 #define VERDE_I2C_BASE0 (VERDE_I2C_BASE + 0x00) #define VERDE_I2C_BASE1 (VERDE_I2C_BASE + 0x20) @@ -340,21 +330,13 @@ #define ICU_INT_XINT(x) ((x) + ICU_INT_XINT0) #define ICU_INT_bit26 26 -#if defined (CPU_XSCALE_80219) -#define ICU_INT_bit25 25 /* reserved */ -#else /* CPU_XSCALE_80321 */ -#define ICU_INT_SSP 25 /* SSP serial port */ -#endif +//#define ICU_INT_SSP 25 /* SSP serial port */ #define ICU_INT_MUE 24 /* msg unit error */ -#if defined (CPU_XSCALE_80219) -#define ICU_INT_bit23 23 /* reserved */ -#else /* CPU_XSCALE_80321 */ -#define ICU_INT_AAUE 23 /* AAU error */ -#endif +//#define ICU_INT_AAUE 23 /* AAU error */ #define ICU_INT_bit22 22 #define ICU_INT_DMA1E 21 /* DMA Ch 1 error */ @@ -372,14 +354,9 @@ #define ICU_INT_TMR0 9 /* timer 0 */ #define ICU_INT_CPPM 8 /* core processor PMU */ -#if defined(CPU_XSCALE_80219) -#define ICU_INT_bit7 7 /* reserved */ -#define ICU_INT_bit6 6 /* reserved */ -#else /* CPU_XSCALE_80321 */ -#define ICU_INT_AAU_EOC 7 /* AAU end-of-chain */ -#define ICU_INT_AAU_EOT 6 /* AAU end-of-transfer */ -#endif +//#define ICU_INT_AAU_EOC 7 /* AAU end-of-chain */ +//#define ICU_INT_AAU_EOT 6 /* AAU end-of-transfer */ #define ICU_INT_bit5 5 #define ICU_INT_bit4 4 @@ -388,81 +365,12 @@ #define ICU_INT_DMA0_EOC 1 /* DMA0 end-of-chain */ #define ICU_INT_DMA0_EOT 0 /* DMA0 end-of-transfer */ -#if defined (CPU_XSCALE_80219) -#define ICU_INT_HWMASK (0xffffffff & \ - ~((1 << ICU_INT_bit26) | \ - (1 << ICU_INT_bit25) | \ - (1 << ICU_INT_bit23) | \ - (1 << ICU_INT_bit22) | \ - (1 << ICU_INT_bit7) | \ - (1 << ICU_INT_bit6) | \ - (1 << ICU_INT_bit5) | \ - (1 << ICU_INT_bit4))) - -#else /* CPU_XSCALE_80321 */ -#define ICU_INT_HWMASK (0xffffffff & \ - ~((1 << ICU_INT_bit26) | \ - (1 << ICU_INT_bit22) | \ - (1 << ICU_INT_bit5) | \ - (1 << ICU_INT_bit4))) -#endif - -/* - * SSP Serial Port - */ -#if defined (CPU_XSCALE_80321) - -#define SSP_SSCR0 0x00 /* SSC control 0 */ -#define SSP_SSCR1 0x04 /* SSC control 1 */ -#define SSP_SSSR 0x08 /* SSP status */ -#define SSP_SSITR 0x0c /* SSP interrupt test */ -#define SSP_SSDR 0x10 /* SSP data */ - -#define SSP_SSCR0_DSIZE(x) ((x) - 1)/* data size: 4..16 */ -#define SSP_SSCR0_FRF_SPI (0 << 4) /* Motorola Serial Periph Iface */ -#define SSP_SSCR0_FRF_SSP (1U << 4)/* TI Sync. Serial Protocol */ -#define SSP_SSCR0_FRF_UWIRE (2U << 4)/* NatSemi Microwire */ -#define SSP_SSCR0_FRF_rsvd (3U << 4)/* reserved */ -#define SSP_SSCR0_ECS (1U << 6)/* external clock select */ -#define SSP_SSCR0_SSE (1U << 7)/* sync. serial port enable */ -#define SSP_SSCR0_SCR(x) ((x) << 8)/* serial clock rate */ - /* bit rate = 3.6864 * 10e6 / - (2 * (SCR + 1)) */ - -#define SSP_SSCR1_RIE (1U << 0)/* Rx FIFO interrupt enable */ -#define SSP_SSCR1_TIE (1U << 1)/* Tx FIFO interrupt enable */ -#define SSP_SSCR1_LBM (1U << 2)/* loopback mode enable */ -#define SSP_SSCR1_SPO (1U << 3)/* Moto SPI SSCLK pol. (1 = high) */ -#define SSP_SSCR1_SPH (1U << 4)/* Moto SPI SSCLK phase: - 0 = inactive full at start, - 1/2 at end of frame - 1 = inactive 1/2 at start, - full at end of frame */ -#define SSP_SSCR1_MWDS (1U << 5)/* Microwire data size: - 0 = 8 bit - 1 = 16 bit */ -#define SSP_SSCR1_TFT (((x) - 1) << 6) /* Tx FIFO threshold */ -#define SSP_SSCR1_RFT (((x) - 1) << 10)/* Rx FIFO threshold */ -#define SSP_SSCR1_EFWR (1U << 14)/* enab. FIFO write/read */ -#define SSP_SSCR1_STRF (1U << 15)/* FIFO write/read FIFO select: - 0 = Tx FIFO - 1 = Rx FIFO */ - -#define SSP_SSSR_TNF (1U << 2)/* Tx FIFO not full */ -#define SSP_SSSR_RNE (1U << 3)/* Rx FIFO not empty */ -#define SSP_SSSR_BSY (1U << 4)/* SSP is busy */ -#define SSP_SSSR_TFS (1U << 5)/* Tx FIFO service request */ -#define SSP_SSSR_RFS (1U << 6)/* Rx FIFO service request */ -#define SSP_SSSR_ROR (1U << 7)/* Rx FIFO overrun */ -#define SSP_SSSR_TFL(x) (((x) >> 8) & 0xf) /* Tx FIFO level */ -#define SSP_SSSR_RFL(x) (((x) >> 12) & 0xf)/* Rx FIFO level */ - -#define SSP_SSITR_TTFS (1U << 5)/* Test Tx FIFO service */ -#define SSP_SSITR_TRFS (1U << 6)/* Test Rx FIFO service */ -#define SSP_SSITR_TROR (1U << 7)/* Test Rx overrun */ - -#endif /* CPU_XSCALE_80321 */ +//#define ICU_INT_HWMASK (0xffffffff & \ +// ~((1 << ICU_INT_bit26) | \ +// (1 << ICU_INT_bit22) | \ +// (1 << ICU_INT_bit5) | \ +// (1 << ICU_INT_bit4))) /* * Peripheral Bus Interface Unit Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Wed Feb 3 08:59:12 2016 (r295199) +++ head/sys/conf/files.arm Wed Feb 3 09:15:44 2016 (r295200) @@ -14,14 +14,14 @@ arm/arm/cpufunc_asm.S standard arm/arm/cpufunc_asm_arm9.S optional cpu_arm9 | cpu_arm9e arm/arm/cpufunc_asm_arm11.S optional cpu_arm1176 arm/arm/cpufunc_asm_arm11x6.S optional cpu_arm1176 -arm/arm/cpufunc_asm_armv4.S optional cpu_arm9 | cpu_arm9e | cpu_fa526 | cpu_xscale_80321 | cpu_xscale_pxa2x0 | cpu_xscale_ixp425 | cpu_xscale_80219 | cpu_xscale_81342 +arm/arm/cpufunc_asm_armv4.S optional cpu_arm9 | cpu_arm9e | cpu_fa526 | cpu_xscale_pxa2x0 | cpu_xscale_ixp425 | cpu_xscale_81342 arm/arm/cpufunc_asm_armv5_ec.S optional cpu_arm9e arm/arm/cpufunc_asm_armv6.S optional cpu_arm1176 arm/arm/cpufunc_asm_armv7.S optional cpu_cortexa | cpu_krait | cpu_mv_pj4b arm/arm/cpufunc_asm_fa526.S optional cpu_fa526 arm/arm/cpufunc_asm_pj4b.S optional cpu_mv_pj4b arm/arm/cpufunc_asm_sheeva.S optional cpu_arm9e -arm/arm/cpufunc_asm_xscale.S optional cpu_xscale_80321 | cpu_xscale_pxa2x0 | cpu_xscale_ixp425 | cpu_xscale_80219 | cpu_xscale_81342 +arm/arm/cpufunc_asm_xscale.S optional cpu_xscale_pxa2x0 | cpu_xscale_ixp425 | cpu_xscale_81342 arm/arm/cpufunc_asm_xscale_c3.S optional cpu_xscale_81342 arm/arm/cpuinfo.c standard arm/arm/cpu_asm-v6.S optional armv6 Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Wed Feb 3 08:59:12 2016 (r295199) +++ head/sys/conf/options.arm Wed Feb 3 09:15:44 2016 (r295200) @@ -15,8 +15,6 @@ CPU_CORTEXA opt_global.h CPU_KRAIT opt_global.h CPU_FA526 opt_global.h CPU_MV_PJ4B opt_global.h -CPU_XSCALE_80219 opt_global.h -CPU_XSCALE_80321 opt_global.h CPU_XSCALE_81342 opt_global.h CPU_XSCALE_IXP425 opt_global.h CPU_XSCALE_IXP435 opt_global.h From owner-svn-src-all@freebsd.org Wed Feb 3 10:01:54 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AE9DA9A1B7; Wed, 3 Feb 2016 10:01:54 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: from mail-ig0-x22f.google.com (mail-ig0-x22f.google.com [IPv6:2607:f8b0:4001:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47F38DE5; Wed, 3 Feb 2016 10:01:54 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: by mail-ig0-x22f.google.com with SMTP id mw1so31773062igb.1; Wed, 03 Feb 2016 02:01:54 -0800 (PST) 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=5WZM+vtj4l8jHwADKq206S/Cblo/IUavmx/wj7ubcVQ=; b=kGUekSwnSjoNO/ol7PnqXD/t+FmrLdC1SHdz+BGzOrvncpEVs//nGlwwIdNoga7ws9 iAncAyb9rgAxrOXxsI8iF3iZYm3I3cfBxGrOnibPzKdbrVSBragxTcBNcFT8xemlBzrh Be/7q5n7EMe/a4zoUFzN5ZfJ8/M9+Le6NP5WyHvIH8qSwG5APHpglVbESkrq+4QWVoO2 Kl3SNtXx0BJS6SGdRfy7DA2Iai+sfS+MU2scaACTaHpVBnkt7awD1T9CRes2qCsT5egI hMZOW7srFRkoPTlWSoBFWUKvVkKjnelAKoQGRJpCiaW9X7+IB5f9+csc1yMXi2smhTjS Y3lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=5WZM+vtj4l8jHwADKq206S/Cblo/IUavmx/wj7ubcVQ=; b=comZ7rhVbflBQxOf8la4T5rTHbhEMQRM+xbB3LkAHaGF3qT38LG4EiDhYgOxI7PpmR HGN5KVqx3HZTrIuqIh/mQfuOnTN6RC/JeQwbupa/IQTBjRkCQvitPXTKyb3O+yMCw4EO IeLJdtFcbyWAE9gb8LdbBEDUYn9IoKMky0+YNR3z56hX+KweoI+PlFkvPq4q0YKUtjMk qN2gQGT0nMDQ6x5rYCt9LrF9TewH7fTmZCo2ARyUnSePpEr42dPIe6Pp2FuAs4W9+jc3 +z5J3RpKEIPe7tEfEnZd/saaB35dOQq/aOEZoPgLJEYOj6VLF2ksEdpfFUbA68odWFrM xXOA== X-Gm-Message-State: AG10YOTuwI4qumkVKn9FFvWlE5owTBLvjdPn3tBgUbqB2CVnZ8GFwqaGpQz05Xe1qjG0vU79wyqGoJL2beHy/A== MIME-Version: 1.0 X-Received: by 10.50.108.13 with SMTP id hg13mr21507464igb.19.1454493713735; Wed, 03 Feb 2016 02:01:53 -0800 (PST) Received: by 10.64.55.97 with HTTP; Wed, 3 Feb 2016 02:01:53 -0800 (PST) In-Reply-To: References: <201602022117.u12LHP7M056632@repo.freebsd.org> Date: Wed, 3 Feb 2016 11:01:53 +0100 Message-ID: Subject: Re: svn commit: r295168 - in head/sys/arm: arm include From: Svatopluk Kraus To: Wojciech Macek Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 10:01:54 -0000 Well, I was told that acle-compat.h is needed when __ARM_ARCH is used as some older or newer, not sure now, gcc does not defines it for us. I think that it came to me from andrew@. BTW, the aarch64 kernel build was fixed in r295198 by mmel@. Thanks. Svata On Wed, Feb 3, 2016 at 9:01 AM, Wojciech Macek wrote: > Is it necessary to add acle-compat.h to the includes? If so, I suggest > putting it under ifndef __aarch64__ , to fix the ARM64 build. > > Regards, > Wojtek > > 2016-02-02 22:17 GMT+01:00 Svatopluk Kraus : >> >> Author: skra >> Date: Tue Feb 2 21:17:25 2016 >> New Revision: 295168 >> URL: https://svnweb.freebsd.org/changeset/base/295168 >> >> Log: >> Use pmap_preboot_map_attr() directly in arm_devmap_bootstrap() >> instead of hiding behind pmap_map_chunk(). It's not longer needed >> after old pmap-v6 code was removed. >> >> For compatibility with __ARM_ARCH < 6, define PTE_DEVICE in devmap.c >> file. Certainly, it would be nice if VM_MEMATTR_DEVICE could be used >> even for __ARM_ARCH < 6. >> >> Modified: >> head/sys/arm/arm/devmap.c >> head/sys/arm/include/pmap-v6.h >> >> Modified: head/sys/arm/arm/devmap.c >> >> ============================================================================== >> --- head/sys/arm/arm/devmap.c Tue Feb 2 21:11:23 2016 (r295167) >> +++ head/sys/arm/arm/devmap.c Tue Feb 2 21:17:25 2016 (r295168) >> @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); >> #include >> #include >> #include >> +#include >> #include >> #include >> #include >> @@ -52,6 +53,9 @@ static boolean_t devmap_bootstrap_done = >> #define PTE_DEVICE VM_MEMATTR_DEVICE >> #elif defined(__arm__) >> #define MAX_VADDR ARM_VECTORS_HIGH >> +#if __ARM_ARCH >= 6 >> +#define PTE_DEVICE VM_MEMATTR_DEVICE >> +#endif >> #endif >> >> /* >> @@ -204,8 +208,13 @@ arm_devmap_bootstrap(vm_offset_t l1pt, c >> >> for (pd = devmap_table; pd->pd_size != 0; ++pd) { >> #if defined(__arm__) >> +#if __ARM_ARCH >= 6 >> + pmap_preboot_map_attr(pd->pd_pa, pd->pd_va, pd->pd_size, >> + pd->pd_prot, pd->pd_cache); >> +#else >> pmap_map_chunk(l1pt, pd->pd_va, pd->pd_pa, pd->pd_size, >> - pd->pd_prot,pd->pd_cache); >> + pd->pd_prot, pd->pd_cache); >> +#endif >> #elif defined(__aarch64__) >> pmap_kenter_device(pd->pd_va, pd->pd_size, pd->pd_pa); >> #endif >> >> Modified: head/sys/arm/include/pmap-v6.h >> >> ============================================================================== >> --- head/sys/arm/include/pmap-v6.h Tue Feb 2 21:11:23 2016 >> (r295167) >> +++ head/sys/arm/include/pmap-v6.h Tue Feb 2 21:17:25 2016 >> (r295168) >> @@ -218,12 +218,6 @@ vm_offset_t pmap_preboot_reserve_pages(u >> vm_offset_t pmap_preboot_get_vpages(u_int ); >> void pmap_preboot_map_attr(vm_paddr_t, vm_offset_t, vm_size_t, vm_prot_t, >> vm_memattr_t); >> -static __inline void >> -pmap_map_chunk(vm_offset_t l1pt, vm_offset_t va, vm_offset_t pa, >> - vm_size_t size, int prot, int cache) >> -{ >> - pmap_preboot_map_attr(pa, va, size, prot, cache); >> -} >> >> #endif /* _KERNEL */ >> >> @@ -256,29 +250,6 @@ pmap_map_chunk(vm_offset_t l1pt, vm_offs >> */ >> void vector_page_setprot(int); >> >> -/* >> - * sys/arm/arm/bus_space_generic.c (just comment) >> - * sys/arm/arm/devmap.c >> - * sys/arm/arm/pmap.c (just comment) >> - * sys/arm/at91/at91_machdep.c >> - * sys/arm/cavium/cns11xx/econa_machdep.c >> - * sys/arm/freescale/imx/imx6_machdep.c (just comment) >> - * sys/arm/mv/orion/db88f5xxx.c >> - * sys/arm/mv/mv_localbus.c >> - * sys/arm/mv/mv_machdep.c >> - * sys/arm/mv/mv_pci.c >> - * sys/arm/s3c2xx0/s3c24x0_machdep.c >> - * sys/arm/versatile/versatile_machdep.c >> - * sys/arm/xscale/ixp425/avila_machdep.c >> - * sys/arm/xscale/i8134x/crb_machdep.c >> - * sys/arm/xscale/i80321/ep80219_machdep.c >> - * sys/arm/xscale/i80321/iq31244_machdep.c >> - * sys/arm/xscale/pxa/pxa_machdep.c >> - */ >> -#define PTE_DEVICE PTE2_ATTR_DEVICE >> - >> - >> - >> #endif /* _KERNEL */ >> // >> ----------------------------------------------------------------------------- >> >> > From owner-svn-src-all@freebsd.org Wed Feb 3 10:39:31 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C920A9AD55; Wed, 3 Feb 2016 10:39:31 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1AF54CC9; Wed, 3 Feb 2016 10:39:31 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u13AdUpw005065; Wed, 3 Feb 2016 10:39:30 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u13AdUVu005064; Wed, 3 Feb 2016 10:39:30 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201602031039.u13AdUVu005064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Wed, 3 Feb 2016 10:39:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295201 - head/sys/arm/xscale/i8134x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 10:39:31 -0000 Author: mmel Date: Wed Feb 3 10:39:29 2016 New Revision: 295201 URL: https://svnweb.freebsd.org/changeset/base/295201 Log: ARM: Remove C++ comments erroneously committed in r295200. Modified: head/sys/arm/xscale/i8134x/i80321reg.h Modified: head/sys/arm/xscale/i8134x/i80321reg.h ============================================================================== --- head/sys/arm/xscale/i8134x/i80321reg.h Wed Feb 3 09:15:44 2016 (r295200) +++ head/sys/arm/xscale/i8134x/i80321reg.h Wed Feb 3 10:39:29 2016 (r295201) @@ -331,12 +331,12 @@ #define ICU_INT_bit26 26 /* CPU_XSCALE_80321 */ -//#define ICU_INT_SSP 25 /* SSP serial port */ +#define ICU_INT_SSP 25 /* SSP serial port */ #define ICU_INT_MUE 24 /* msg unit error */ /* CPU_XSCALE_80321 */ -//#define ICU_INT_AAUE 23 /* AAU error */ +#define ICU_INT_AAUE 23 /* AAU error */ #define ICU_INT_bit22 22 #define ICU_INT_DMA1E 21 /* DMA Ch 1 error */ @@ -355,8 +355,8 @@ #define ICU_INT_CPPM 8 /* core processor PMU */ /* CPU_XSCALE_80321 */ -//#define ICU_INT_AAU_EOC 7 /* AAU end-of-chain */ -//#define ICU_INT_AAU_EOT 6 /* AAU end-of-transfer */ +#define ICU_INT_AAU_EOC 7 /* AAU end-of-chain */ +#define ICU_INT_AAU_EOT 6 /* AAU end-of-transfer */ #define ICU_INT_bit5 5 #define ICU_INT_bit4 4 @@ -366,11 +366,11 @@ #define ICU_INT_DMA0_EOT 0 /* DMA0 end-of-transfer */ /* CPU_XSCALE_80321 */ -//#define ICU_INT_HWMASK (0xffffffff & \ -// ~((1 << ICU_INT_bit26) | \ -// (1 << ICU_INT_bit22) | \ -// (1 << ICU_INT_bit5) | \ -// (1 << ICU_INT_bit4))) +#define ICU_INT_HWMASK (0xffffffff & \ + ~((1 << ICU_INT_bit26) | \ + (1 << ICU_INT_bit22) | \ + (1 << ICU_INT_bit5) | \ + (1 << ICU_INT_bit4))) /* * Peripheral Bus Interface Unit From owner-svn-src-all@freebsd.org Wed Feb 3 11:03:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05694A9967C; Wed, 3 Feb 2016 11:03:46 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE6FEA5C; Wed, 3 Feb 2016 11:03:45 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u13B3ig3013329; Wed, 3 Feb 2016 11:03:44 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u13B3iOH013328; Wed, 3 Feb 2016 11:03:44 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201602031103.u13B3iOH013328@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Wed, 3 Feb 2016 11:03:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295202 - head/contrib/bsnmp/snmp_mibII X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 11:03:46 -0000 Author: bz Date: Wed Feb 3 11:03:44 2016 New Revision: 295202 URL: https://svnweb.freebsd.org/changeset/base/295202 Log: Try to fix a bug introduced in r228623. We started to copy the ifa_msghdr as otherwise platforms with strict alignment would break. It's unclear to me if there's also a problem with access to the address list following the structure. However we never copied the address list after the structure and thus are pointing at random memory. For now just use a pointer to the original memory for accessing the address list making it at least work on platforms with weak memory access. PR: 195445 Reported by: wolfgang lyxys.ka.sub.org Tested by: wolfgang lyxys.ka.sub.org (x86) MFC after: 3 days Modified: head/contrib/bsnmp/snmp_mibII/mibII.c Modified: head/contrib/bsnmp/snmp_mibII/mibII.c ============================================================================== --- head/contrib/bsnmp/snmp_mibII/mibII.c Wed Feb 3 10:39:29 2016 (r295201) +++ head/contrib/bsnmp/snmp_mibII/mibII.c Wed Feb 3 11:03:44 2016 (r295202) @@ -982,7 +982,7 @@ handle_rtmsg(struct rt_msghdr *rtm) { struct sockaddr *addrs[RTAX_MAX]; struct if_msghdr *ifm; - struct ifa_msghdr ifam; + struct ifa_msghdr ifam, *ifamp; struct ifma_msghdr *ifmam; #ifdef RTM_IFANNOUNCE struct if_announcemsghdr *ifan; @@ -1002,8 +1002,9 @@ handle_rtmsg(struct rt_msghdr *rtm) switch (rtm->rtm_type) { case RTM_NEWADDR: - memcpy(&ifam, rtm, sizeof(ifam)); - mib_extract_addrs(ifam.ifam_addrs, (u_char *)(&ifam + 1), addrs); + ifamp = (struct ifa_msghdr *)rtm; + memcpy(&ifam, ifamp, sizeof(ifam)); + mib_extract_addrs(ifam.ifam_addrs, (u_char *)(ifamp + 1), addrs); if (addrs[RTAX_IFA] == NULL || addrs[RTAX_NETMASK] == NULL) break; @@ -1029,8 +1030,9 @@ handle_rtmsg(struct rt_msghdr *rtm) break; case RTM_DELADDR: - memcpy(&ifam, rtm, sizeof(ifam)); - mib_extract_addrs(ifam.ifam_addrs, (u_char *)(&ifam + 1), addrs); + ifamp = (struct ifa_msghdr *)rtm; + memcpy(&ifam, ifamp, sizeof(ifam)); + mib_extract_addrs(ifam.ifam_addrs, (u_char *)(ifamp + 1), addrs); if (addrs[RTAX_IFA] == NULL) break; From owner-svn-src-all@freebsd.org Wed Feb 3 11:41:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BCCAA9A5F1; Wed, 3 Feb 2016 11:41:56 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D90C1A01; Wed, 3 Feb 2016 11:41:56 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u13BftqZ024944; Wed, 3 Feb 2016 11:41:55 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u13Bft9p024943; Wed, 3 Feb 2016 11:41:55 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201602031141.u13Bft9p024943@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Wed, 3 Feb 2016 11:41:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r295203 - stable/9/bin/csh X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 11:41:56 -0000 Author: ume Date: Wed Feb 3 11:41:55 2016 New Revision: 295203 URL: https://svnweb.freebsd.org/changeset/base/295203 Log: MFC r295147: Make dynamic link of libiconv from ports work again. The symbols of libiconv from ports were changed to have prefixed. Since we have iconv in our libc these days, we don't need it on 10.X and later. However, 9.X still need this. Modified: stable/9/bin/csh/iconv_stub.c Directory Properties: stable/9/bin/csh/ (props changed) Modified: stable/9/bin/csh/iconv_stub.c ============================================================================== --- stable/9/bin/csh/iconv_stub.c Wed Feb 3 11:03:44 2016 (r295202) +++ stable/9/bin/csh/iconv_stub.c Wed Feb 3 11:41:55 2016 (r295203) @@ -36,9 +36,9 @@ #undef iconv_close #define ICONVLIB "libiconv.so" -#define ICONV_ENGINE "iconv" -#define ICONV_OPEN "iconv_open" -#define ICONV_CLOSE "iconv_close" +#define ICONV_ENGINE "libiconv" +#define ICONV_OPEN "libiconv_open" +#define ICONV_CLOSE "libiconv_close" typedef iconv_t iconv_open_t(const char *, const char *); From owner-svn-src-all@freebsd.org Wed Feb 3 11:44:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B61F5A9A71A; Wed, 3 Feb 2016 11:44:44 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A8C31D12; Wed, 3 Feb 2016 11:44:44 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u13Bihgq025094; Wed, 3 Feb 2016 11:44:43 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u13BihpW025093; Wed, 3 Feb 2016 11:44:43 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201602031144.u13BihpW025093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Wed, 3 Feb 2016 11:44:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295204 - head/bin/csh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 11:44:44 -0000 Author: ume Date: Wed Feb 3 11:44:43 2016 New Revision: 295204 URL: https://svnweb.freebsd.org/changeset/base/295204 Log: The charset of NLS catalogs were converted to UTF-8 since r231990. Modified: head/bin/csh/Makefile Modified: head/bin/csh/Makefile ============================================================================== --- head/bin/csh/Makefile Wed Feb 3 11:41:55 2016 (r295203) +++ head/bin/csh/Makefile Wed Feb 3 11:44:43 2016 (r295204) @@ -51,41 +51,40 @@ FILESDIR= ${SHAREDIR}/examples/tcsh FILES= complete.tcsh csh-mode.el .endif -CATALOGS= et:et_EE.ISO8859-15 \ - finnish:fi_FI.ISO8859-1 \ - french:fr_FR.ISO8859-1 \ - german:de_DE.ISO8859-1 \ - greek:el_GR.ISO8859-7 \ - italian:it_IT.ISO8859-1 \ - ja:ja_JP.eucJP \ - russian:ru_RU.KOI8-R \ - spanish:es_ES.ISO8859-1 \ - ukrainian:uk_UA.KOI8-U - -NLSLINKS_fi_FI.ISO8859-1= fi_FI.ISO8859-15 -NLSLINKS_fr_FR.ISO8859-1= fr_BE.ISO8859-1 fr_BE.ISO8859-15 \ - fr_CA.ISO8859-1 fr_CA.ISO8859-15 fr_CH.ISO8859-1 \ - fr_CH.ISO8859-15 fr_FR.ISO8859-15 -NLSLINKS_de_DE.ISO8859-1= de_AT.ISO8859-1 de_AT.ISO8859-15 de_CH.ISO8859-1 \ - de_CH.ISO8859-15 de_DE.ISO8859-15 -NLSLINKS_it_IT.ISO8859-1= it_CH.ISO8859-1 it_CH.ISO8859-15 it_IT.ISO8859-15 -NLSLINKS_es_ES.ISO8859-1= es_ES.ISO8859-15 +CATALOGS= et:et_EE.UTF-8 \ + finnish:fi_FI.UTF-8 \ + french:fr_FR.UTF-8 \ + german:de_DE.UTF-8 \ + greek:el_GR.UTF-8 \ + italian:it_IT.UTF-8 \ + ja:ja_JP.UTF-8 \ + russian:ru_RU.UTF-8 \ + spanish:es_ES.UTF-8 \ + ukrainian:uk_UA.UTF-8 + +NLSLINKS_de_DE.UTF-8 = de_AT.UTF-8 de_CH.UTF-8 de_DE.UTF-8 +NLSLINKS_fr_FR.UTF-8 = fr_BE.UTF-8 fr_CA.UTF-8 fr_CH.UTF-8 +NLSLINKS_it_IT.UTF-8 = it_CH.UTF-8 .if ${MK_NLS_CATALOGS} == "no" || defined(RESCUE) CFLAGS+= -DNO_NLS_CATALOGS .else CFLAGS+= -DHAVE_ICONV .if ${MK_ICONV} != "no" -NLSLINKS_de_DE.ISO8859-1 += de_AT.UTF-8 de_CH.UTF-8 de_DE.UTF-8 -NLSLINKS_el_GR.ISO8859-7 = el_GR.UTF-8 -NLSLINKS_es_ES.ISO8859-1 += es_ES.UTF-8 -NLSLINKS_et_EE.ISO8859-15 = et_EE.UTF-8 -NLSLINKS_fi_FI.ISO8859-1 += fi_FI.UTF-8 -NLSLINKS_fr_FR.ISO8859-1 += fr_BE.UTF-8 fr_CA.UTF-8 fr_CH.UTF-8 fr_FR.UTF-8 -NLSLINKS_it_IT.ISO8859-1 += it_CH.UTF-8 it_IT.UTF-8 -NLSLINKS_ja_JP.eucJP = ja_JP.SJIS ja_JP.UTF-8 -NLSLINKS_ru_RU.KOI8-R = ru_RU.CP1251 ru_RU.CP866 ru_RU.ISO8859-5 ru_RU.UTF-8 -NLSLINKS_uk_UA.KOI8-U = uk_UA.ISO8859-5 uk_UA.UTF-8 +NLSLINKS_de_DE.UTF-8 += de_AT.ISO8859-1 de_AT.ISO8859-15 de_CH.ISO8859-1 \ + de_CH.ISO8859-15 de_DE.ISO8859-1 de_DE.ISO8859-15 +NLSLINKS_el_GR.UTF-8 = el_GR.ISO8859-7 +NLSLINKS_es_ES.UTF-8 = es_ES.ISO8859-1 es_ES.ISO8859-15 +NLSLINKS_et_EE.UTF-8 = et_EE.ISO8859-15 +NLSLINKS_fi_FI.UTF-8 = fi_FI.ISO8859-1 fi_FI.ISO8859-15 +NLSLINKS_fr_FR.UTF-8 += fr_BE.ISO8859-1 fr_BE.ISO8859-15 \ + fr_CA.ISO8859-1 fr_CA.ISO8859-15 fr_CH.ISO8859-1 \ + fr_CH.ISO8859-15 fr_FR.ISO8859-1 fr_FR.ISO8859-15 +NLSLINKS_it_IT.UTF-8 += it_CH.ISO8859-1 it_CH.ISO8859-15 it_IT.ISO8859-1 \ + it_IT.ISO8859-15 +NLSLINKS_ja_JP.UTF-8 = ja_JP.SJIS ja_JP.eucJP +NLSLINKS_ru_RU.UTF-8 = ru_RU.CP1251 ru_RU.CP866 ru_RU.ISO8859-5 ru_RU.KOI8-R +NLSLINKS_uk_UA.UTF-8 = uk_UA.ISO8859-5 uk_UA.KOI8-U .else # Above links can be installed from ports/shells/tcsh_nls From owner-svn-src-all@freebsd.org Wed Feb 3 12:11:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4816A995F4; Wed, 3 Feb 2016 12:11:08 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D985D7A; Wed, 3 Feb 2016 12:11:08 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u13CB7Kf031484; Wed, 3 Feb 2016 12:11:07 GMT (envelope-from skra@FreeBSD.org) Received: (from skra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u13CB7gj031482; Wed, 3 Feb 2016 12:11:07 GMT (envelope-from skra@FreeBSD.org) Message-Id: <201602031211.u13CB7gj031482@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skra set sender to skra@FreeBSD.org using -f From: Svatopluk Kraus Date: Wed, 3 Feb 2016 12:11:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295206 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 12:11:08 -0000 Author: skra Date: Wed Feb 3 12:11:07 2016 New Revision: 295206 URL: https://svnweb.freebsd.org/changeset/base/295206 Log: Partly revert r295168 and define PTE_DEVICE in pmap-v6.h header again. It turned out that devmap.c is not only file in which PTE_DEVICE is used and simultaneously, built for both armv4 and armv6 platforms. When I tried to build all arm kernels before r295168 commit, it was hid by some other local changes in my tree. I hope that this is just temporary workaround before VM_MEMATTR_DEVICE could be used instead of PTE_DEVICE outside of pmap code for __ARM_ARCH < 6. Modified: head/sys/arm/arm/devmap.c head/sys/arm/include/pmap-v6.h Modified: head/sys/arm/arm/devmap.c ============================================================================== --- head/sys/arm/arm/devmap.c Wed Feb 3 11:49:51 2016 (r295205) +++ head/sys/arm/arm/devmap.c Wed Feb 3 12:11:07 2016 (r295206) @@ -55,9 +55,6 @@ static boolean_t devmap_bootstrap_done = #define PTE_DEVICE VM_MEMATTR_DEVICE #elif defined(__arm__) #define MAX_VADDR ARM_VECTORS_HIGH -#if __ARM_ARCH >= 6 -#define PTE_DEVICE VM_MEMATTR_DEVICE -#endif #endif /* Modified: head/sys/arm/include/pmap-v6.h ============================================================================== --- head/sys/arm/include/pmap-v6.h Wed Feb 3 11:49:51 2016 (r295205) +++ head/sys/arm/include/pmap-v6.h Wed Feb 3 12:11:07 2016 (r295206) @@ -250,6 +250,8 @@ void pmap_preboot_map_attr(vm_paddr_t, v */ void vector_page_setprot(int); +#define PTE_DEVICE VM_MEMATTR_DEVICE + #endif /* _KERNEL */ // ----------------------------------------------------------------------------- From owner-svn-src-all@freebsd.org Wed Feb 3 12:12:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBD75A99643; Wed, 3 Feb 2016 12:12:03 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id A8452F43; Wed, 3 Feb 2016 12:12:03 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 54B1F7800E7; Wed, 3 Feb 2016 23:11:55 +1100 (AEDT) Date: Wed, 3 Feb 2016 23:11:55 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r295160 - stable/7/sys/kern In-Reply-To: <201602021929.u12JTTaS023082@repo.freebsd.org> Message-ID: <20160203230906.C1511@besplex.bde.org> References: <201602021929.u12JTTaS023082@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=cK4dyQqN c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=BJb7wXAST1g5ecHwEB8A:9 a=CjuIK1q_8ugA:10 a=KNH-PBpkn6UA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 12:12:04 -0000 On Tue, 2 Feb 2016, John Baldwin wrote: > Log: > Return the timestamps from the corresponding namecache entry on a negative > namecache hit. This was ommitted due to a merging error in r238913. The > effect was to usually break caching of negative name lookups in the NFS > client. > > Submitted by: bde Thanks. FreeBSD-7 is now almost the fastest version in my makeworld on nfs benchmark :-). Bruce From owner-svn-src-all@freebsd.org Wed Feb 3 13:47:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F37B0A9984C; Wed, 3 Feb 2016 13:47:52 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B52B91B65; Wed, 3 Feb 2016 13:47:52 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u13DlpSC059834; Wed, 3 Feb 2016 13:47:51 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u13DloCJ059825; Wed, 3 Feb 2016 13:47:50 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201602031347.u13DloCJ059825@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Wed, 3 Feb 2016 13:47:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295207 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 13:47:53 -0000 Author: mmel Date: Wed Feb 3 13:47:50 2016 New Revision: 295207 URL: https://svnweb.freebsd.org/changeset/base/295207 Log: ARM: Replace only once used cpu_icache_sync_all() by ranged equivalent. Remove it from cpu_functions table. Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/cpufunc_asm_arm11x6.S head/sys/arm/arm/cpufunc_asm_arm9.S head/sys/arm/arm/cpufunc_asm_armv5_ec.S head/sys/arm/arm/cpufunc_asm_armv7.S head/sys/arm/arm/cpufunc_asm_fa526.S head/sys/arm/arm/elf_machdep.c head/sys/arm/arm/genassym.c head/sys/arm/include/cpufunc.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Wed Feb 3 12:11:07 2016 (r295206) +++ head/sys/arm/arm/cpufunc.c Wed Feb 3 13:47:50 2016 (r295207) @@ -110,7 +110,6 @@ struct cpu_functions arm9_cpufuncs = { /* Cache operations */ - arm9_icache_sync_all, /* icache_sync_all */ arm9_icache_sync_range, /* icache_sync_range */ arm9_dcache_wbinv_all, /* dcache_wbinv_all */ @@ -162,7 +161,6 @@ struct cpu_functions armv5_ec_cpufuncs = /* Cache operations */ - armv5_ec_icache_sync_all, /* icache_sync_all */ armv5_ec_icache_sync_range, /* icache_sync_range */ armv5_ec_dcache_wbinv_all, /* dcache_wbinv_all */ @@ -213,7 +211,6 @@ struct cpu_functions sheeva_cpufuncs = { /* Cache operations */ - armv5_ec_icache_sync_all, /* icache_sync_all */ armv5_ec_icache_sync_range, /* icache_sync_range */ armv5_ec_dcache_wbinv_all, /* dcache_wbinv_all */ @@ -264,7 +261,6 @@ struct cpu_functions pj4bv7_cpufuncs = { armv7_tlb_flushID_SE, /* tlb_flushD_SE */ /* Cache operations */ - armv7_idcache_wbinv_all, /* icache_sync_all */ armv7_icache_sync_range, /* icache_sync_range */ armv7_dcache_wbinv_all, /* dcache_wbinv_all */ @@ -316,7 +312,6 @@ struct cpu_functions xscale_cpufuncs = { /* Cache operations */ - xscale_cache_syncI, /* icache_sync_all */ xscale_cache_syncI_rng, /* icache_sync_range */ xscale_cache_purgeD, /* dcache_wbinv_all */ @@ -368,7 +363,6 @@ struct cpu_functions xscalec3_cpufuncs = /* Cache operations */ - xscalec3_cache_syncI, /* icache_sync_all */ xscalec3_cache_syncI_rng, /* icache_sync_range */ xscalec3_cache_purgeD, /* dcache_wbinv_all */ @@ -420,7 +414,6 @@ struct cpu_functions fa526_cpufuncs = { /* Cache operations */ - fa526_icache_sync_all, /* icache_sync_all */ fa526_icache_sync_range, /* icache_sync_range */ fa526_dcache_wbinv_all, /* dcache_wbinv_all */ @@ -472,7 +465,6 @@ struct cpu_functions arm1176_cpufuncs = /* Cache operations */ - arm11x6_icache_sync_all, /* icache_sync_all */ arm11x6_icache_sync_range, /* icache_sync_range */ arm11x6_dcache_wbinv_all, /* dcache_wbinv_all */ @@ -528,7 +520,6 @@ struct cpu_functions cortexa_cpufuncs = /* Cache operations */ - armv7_icache_sync_all, /* icache_sync_all */ armv7_icache_sync_range, /* icache_sync_range */ armv7_dcache_wbinv_all, /* dcache_wbinv_all */ Modified: head/sys/arm/arm/cpufunc_asm_arm11x6.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_arm11x6.S Wed Feb 3 12:11:07 2016 (r295206) +++ head/sys/arm/arm/cpufunc_asm_arm11x6.S Wed Feb 3 13:47:50 2016 (r295207) @@ -132,12 +132,6 @@ ENTRY_NP(arm11x6_dcache_wbinv_all) RET END(arm11x6_dcache_wbinv_all) -ENTRY_NP(arm11x6_icache_sync_all) - Flush_D_cache(r0) - Invalidate_I_cache(r0, r1) - RET -END(arm11x6_icache_sync_all) - ENTRY_NP(arm11x6_icache_sync_range) add r1, r1, r0 sub r1, r1, #1 Modified: head/sys/arm/arm/cpufunc_asm_arm9.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_arm9.S Wed Feb 3 12:11:07 2016 (r295206) +++ head/sys/arm/arm/cpufunc_asm_arm9.S Wed Feb 3 13:47:50 2016 (r295207) @@ -85,9 +85,7 @@ ENTRY_NP(arm9_icache_sync_range) subs r1, r1, ip bhi .Larm9_sync_next mov pc, lr -END(arm9_icache_sync_range) -ENTRY_NP(arm9_icache_sync_all) .Larm9_icache_sync_all: /* * We assume that the code here can never be out of sync with the @@ -109,7 +107,7 @@ ENTRY_NP(arm9_icache_sync_all) subs s_max, s_max, s_inc bhs .Lnext_set /* Next set */ mov pc, lr -END(arm9_icache_sync_all) +END(arm9_icache_sync_range) .Larm9_line_size: .word _C_LABEL(arm_pdcache_line_size) Modified: head/sys/arm/arm/cpufunc_asm_armv5_ec.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_armv5_ec.S Wed Feb 3 12:11:07 2016 (r295206) +++ head/sys/arm/arm/cpufunc_asm_armv5_ec.S Wed Feb 3 13:47:50 2016 (r295207) @@ -91,9 +91,7 @@ ENTRY_NP(armv5_ec_icache_sync_range) bpl 1b mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET -END(armv5_ec_icache_sync_range) -ENTRY_NP(armv5_ec_icache_sync_all) .Larmv5_ec_icache_sync_all: /* * We assume that the code here can never be out of sync with the @@ -109,7 +107,7 @@ ENTRY_NP(armv5_ec_icache_sync_all) bne 1b /* More to do? */ mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET -END(armv5_ec_icache_sync_all) +END(armv5_ec_icache_sync_range) .Larmv5_ec_line_size: .word _C_LABEL(arm_pdcache_line_size) Modified: head/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_armv7.S Wed Feb 3 12:11:07 2016 (r295206) +++ head/sys/arm/arm/cpufunc_asm_armv7.S Wed Feb 3 13:47:50 2016 (r295207) @@ -252,16 +252,6 @@ ENTRY(armv7_idcache_wbinv_range) RET END(armv7_idcache_wbinv_range) -ENTRY_NP(armv7_icache_sync_all) -#ifdef SMP - mcr CP15_ICIALLUIS -#else - mcr CP15_ICIALLU -#endif - dsb /* data synchronization barrier */ - isb /* instruction synchronization barrier */ - RET -END(armv7_icache_sync_all) ENTRY_NP(armv7_icache_sync_range) ldr ip, .Larmv7_icache_line_size Modified: head/sys/arm/arm/cpufunc_asm_fa526.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_fa526.S Wed Feb 3 12:11:07 2016 (r295206) +++ head/sys/arm/arm/cpufunc_asm_fa526.S Wed Feb 3 13:47:50 2016 (r295207) @@ -83,12 +83,6 @@ ENTRY(fa526_idcache_wbinv_all) mov pc, lr END(fa526_idcache_wbinv_all) -ENTRY(fa526_icache_sync_all) - mov r0, #0 - mcr p15, 0, r0, c7, c5, 0 /* invalidate I$ */ - mov pc, lr -END(fa526_icache_sync_all) - ENTRY(fa526_dcache_wbinv_all) mov r0, #0 mcr p15, 0, r0, c7, c14, 0 /* clean and invalidate D$ */ @@ -170,7 +164,7 @@ END(fa526_idcache_wbinv_range) ENTRY(fa526_icache_sync_range) cmp r1, #0x4000 - bhs _C_LABEL(fa526_icache_sync_all) + bhs .Lfa526_icache_sync_all and r2, r0, #(CACHELINE_SIZE - 1) add r1, r1, r2 @@ -184,6 +178,11 @@ ENTRY(fa526_icache_sync_range) 2: mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ mov pc, lr + +.Lfa526_icache_sync_all: + mov r0, #0 + mcr p15, 0, r0, c7, c5, 0 /* invalidate I$ */ + mov pc, lr END(fa526_icache_sync_range) ENTRY(fa526_context_switch) Modified: head/sys/arm/arm/elf_machdep.c ============================================================================== --- head/sys/arm/arm/elf_machdep.c Wed Feb 3 12:11:07 2016 (r295206) +++ head/sys/arm/arm/elf_machdep.c Wed Feb 3 13:47:50 2016 (r295207) @@ -282,7 +282,7 @@ elf_cpu_load_file(linker_file_t lf) #else cpu_dcache_wb_range((vm_offset_t)lf->address, (vm_size_t)lf->size); cpu_l2cache_wb_range((vm_offset_t)lf->address, (vm_size_t)lf->size); - cpu_icache_sync_all(); + cpu_icache_sync_range((vm_offset_t)lf->address, (vm_size_t)lf->size); #endif return (0); } Modified: head/sys/arm/arm/genassym.c ============================================================================== --- head/sys/arm/arm/genassym.c Wed Feb 3 12:11:07 2016 (r295206) +++ head/sys/arm/arm/genassym.c Wed Feb 3 13:47:50 2016 (r295207) @@ -101,7 +101,6 @@ ASSYM(CF_L2CACHE_WB_RANGE, offsetof(stru ASSYM(CF_IDCACHE_WBINV_ALL, offsetof(struct cpu_functions, cf_idcache_wbinv_all)); ASSYM(CF_L2CACHE_WBINV_ALL, offsetof(struct cpu_functions, cf_l2cache_wbinv_all)); ASSYM(CF_TLB_FLUSHID_SE, offsetof(struct cpu_functions, cf_tlb_flushID_SE)); -ASSYM(CF_ICACHE_SYNC, offsetof(struct cpu_functions, cf_icache_sync_all)); ASSYM(V_TRAP, offsetof(struct vmmeter, v_trap)); ASSYM(V_SOFT, offsetof(struct vmmeter, v_soft)); Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Wed Feb 3 12:11:07 2016 (r295206) +++ head/sys/arm/include/cpufunc.h Wed Feb 3 13:47:50 2016 (r295207) @@ -79,7 +79,6 @@ struct cpu_functions { * * We define the following primitives: * - * icache_sync_all Synchronize I-cache * icache_sync_range Synchronize I-cache range * * dcache_wbinv_all Write-back and Invalidate D-cache @@ -104,7 +103,7 @@ struct cpu_functions { * state (such as when it may have lines tagged as valid * that belong to a previous set of mappings). * - * I-cache Synch (all or range): + * I-cache Sync range: * The goal is to synchronize the instruction stream, * so you may beed to write-back dirty D-cache blocks * first. If a range is requested, and you can't @@ -130,7 +129,6 @@ struct cpu_functions { * Valid virtual addresses must be passed to each * cache operation. */ - void (*cf_icache_sync_all) (void); void (*cf_icache_sync_range) (vm_offset_t, vm_size_t); void (*cf_dcache_wbinv_all) (void); @@ -173,7 +171,6 @@ extern u_int cputype; #define cpu_tlb_flushD() cpufuncs.cf_tlb_flushD() #define cpu_tlb_flushD_SE(e) cpufuncs.cf_tlb_flushD_SE(e) -#define cpu_icache_sync_all() cpufuncs.cf_icache_sync_all() #define cpu_icache_sync_range(a, s) cpufuncs.cf_icache_sync_range((a), (s)) #define cpu_dcache_wbinv_all() cpufuncs.cf_dcache_wbinv_all() @@ -214,7 +211,6 @@ void fa526_context_switch (void); void fa526_cpu_sleep (int); void fa526_tlb_flushID_SE (u_int); -void fa526_icache_sync_all (void); void fa526_icache_sync_range(vm_offset_t start, vm_size_t end); void fa526_dcache_wbinv_all (void); void fa526_dcache_wbinv_range(vm_offset_t start, vm_size_t end); @@ -231,8 +227,7 @@ void arm9_tlb_flushID_SE (u_int va); void arm9_context_switch (void); #endif -#if defined(CPU_ARM9) -void arm9_icache_sync_all (void); +#if defined(CPU_ARM9) void arm9_icache_sync_range (vm_offset_t, vm_size_t); void arm9_dcache_wbinv_all (void); @@ -275,7 +270,6 @@ void armv6_idcache_wbinv_all (void); void armv7_setttb (u_int); void armv7_tlb_flushID (void); void armv7_tlb_flushID_SE (u_int); -void armv7_icache_sync_all (void); void armv7_icache_sync_range (vm_offset_t, vm_size_t); void armv7_idcache_wbinv_range (vm_offset_t, vm_size_t); void armv7_idcache_inv_all (void); @@ -319,7 +313,6 @@ void armv6_idcache_inv_all (void); void arm11x6_setttb (u_int); void arm11x6_idcache_wbinv_all (void); void arm11x6_dcache_wbinv_all (void); -void arm11x6_icache_sync_all (void); void arm11x6_icache_sync_range (vm_offset_t, vm_size_t); void arm11x6_idcache_wbinv_range (vm_offset_t, vm_size_t); void arm11x6_setup (void); @@ -329,7 +322,6 @@ void arm11x6_sleep #if defined(CPU_ARM9E) void armv5_ec_setttb(u_int); -void armv5_ec_icache_sync_all(void); void armv5_ec_icache_sync_range(vm_offset_t, vm_size_t); void armv5_ec_dcache_wbinv_all(void); From owner-svn-src-all@freebsd.org Wed Feb 3 14:04:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60153A99DA3; Wed, 3 Feb 2016 14:04:09 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F11363F; Wed, 3 Feb 2016 14:04:09 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u13E48n1065559; Wed, 3 Feb 2016 14:04:08 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u13E47VR065554; Wed, 3 Feb 2016 14:04:07 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201602031404.u13E47VR065554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 3 Feb 2016 14:04:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295208 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 14:04:09 -0000 Author: tuexen Date: Wed Feb 3 14:04:07 2016 New Revision: 295208 URL: https://svnweb.freebsd.org/changeset/base/295208 Log: MFC r294995: Always look in the TCP pool. This fixes issues with a restarting peer when the listening 1-to-1 style socket is closed. MFC r295021: Remove debug output which was committed by accident. Thanks to Oliver Pinter for reporting. MFC r295069: Ignore peer addresses in a consistent way also when checking for new addresses during restart. If this is not done, restart doesn't work when the local socket is IPv4 only and the peer uses IPv4 and IPv6 addresses. MFC r295070: Don't change the remote UDP encapsulation port for SCTP packets containing an INIT chunk. MFC r295072: Don't allow a remote encapsulation port change during the SCTP restart procedure. MFC r295075: Update the path mtu when turning on/off UDP encapsulation for SCTP. MFC r295077: Add missing parentheses. This was reported by ccaughie via GitHub for the userland stack. Approved by: re (kib) Modified: stable/10/sys/netinet/sctp_input.c stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctp_output.h stable/10/sys/netinet/sctp_pcb.c stable/10/sys/netinet/sctp_var.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_input.c ============================================================================== --- stable/10/sys/netinet/sctp_input.c Wed Feb 3 13:47:50 2016 (r295207) +++ stable/10/sys/netinet/sctp_input.c Wed Feb 3 14:04:07 2016 (r295208) @@ -85,7 +85,7 @@ static void sctp_handle_init(struct mbuf *m, int iphlen, int offset, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_init_chunk *cp, struct sctp_inpcb *inp, - struct sctp_tcb *stcb, int *abort_no_unlock, + struct sctp_tcb *stcb, struct sctp_nets *net, int *abort_no_unlock, uint8_t mflowtype, uint32_t mflowid, uint32_t vrf_id, uint16_t port) { @@ -198,8 +198,8 @@ sctp_handle_init(struct mbuf *m, int iph sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_CONTROL_PROC, SCTP_SO_NOT_LOCKED); } else { SCTPDBG(SCTP_DEBUG_INPUT3, "sctp_handle_init: sending INIT-ACK\n"); - sctp_send_initiate_ack(inp, stcb, m, iphlen, offset, src, dst, - sh, cp, + sctp_send_initiate_ack(inp, stcb, net, m, iphlen, offset, + src, dst, sh, cp, mflowtype, mflowid, vrf_id, port, ((stcb == NULL) ? SCTP_HOLDS_LOCK : SCTP_NOT_LOCKED)); @@ -4840,7 +4840,7 @@ process_control_chunks: } sctp_handle_init(m, iphlen, *offset, src, dst, sh, (struct sctp_init_chunk *)ch, inp, - stcb, &abort_no_unlock, + stcb, *netp, &abort_no_unlock, mflowtype, mflowid, vrf_id, port); *offset = length; @@ -5684,9 +5684,18 @@ sctp_common_input_processing(struct mbuf stcb = sctp_findassociation_addr(m, offset, src, dst, sh, ch, &inp, &net, vrf_id); #if defined(INET) || defined(INET6) - if ((net != NULL) && (port != 0)) { + if ((ch->chunk_type != SCTP_INITIATION) && + (net != NULL) && (net->port != port)) { if (net->port == 0) { - sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); + /* UDP encapsulation turned on. */ + net->mtu -= sizeof(struct udphdr); + if (stcb->asoc.smallest_mtu > net->mtu) { + sctp_pathmtu_adjustment(stcb, net->mtu); + } + } else if (port == 0) { + /* UDP encapsulation turned off. */ + net->mtu += sizeof(struct udphdr); + /* XXX Update smallest_mtu */ } net->port = port; } @@ -5715,9 +5724,18 @@ sctp_common_input_processing(struct mbuf stcb = sctp_findassociation_addr(m, offset, src, dst, sh, ch, &inp, &net, vrf_id); #if defined(INET) || defined(INET6) - if ((net != NULL) && (port != 0)) { + if ((ch->chunk_type != SCTP_INITIATION) && + (net != NULL) && (net->port != port)) { if (net->port == 0) { - sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); + /* UDP encapsulation turned on. */ + net->mtu -= sizeof(struct udphdr); + if (stcb->asoc.smallest_mtu > net->mtu) { + sctp_pathmtu_adjustment(stcb, net->mtu); + } + } else if (port == 0) { + /* UDP encapsulation turned off. */ + net->mtu += sizeof(struct udphdr); + /* XXX Update smallest_mtu */ } net->port = port; } @@ -5829,9 +5847,18 @@ sctp_common_input_processing(struct mbuf */ inp = stcb->sctp_ep; #if defined(INET) || defined(INET6) - if ((net != NULL) && (port != 0)) { + if ((ch->chunk_type != SCTP_INITIATION) && + (net != NULL) && (net->port != port)) { if (net->port == 0) { - sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); + /* UDP encapsulation turned on. */ + net->mtu -= sizeof(struct udphdr); + if (stcb->asoc.smallest_mtu > net->mtu) { + sctp_pathmtu_adjustment(stcb, net->mtu); + } + } else if (port == 0) { + /* UDP encapsulation turned off. */ + net->mtu += sizeof(struct udphdr); + /* XXX Update smallest_mtu */ } net->port = port; } Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Wed Feb 3 13:47:50 2016 (r295207) +++ stable/10/sys/netinet/sctp_output.c Wed Feb 3 14:04:07 2016 (r295208) @@ -5307,6 +5307,7 @@ sctp_are_there_new_addresses(struct sctp uint16_t ptype, plen; uint8_t fnd; struct sctp_nets *net; + int check_src; #ifdef INET struct sockaddr_in sin4, *sa4; @@ -5328,39 +5329,61 @@ sctp_are_there_new_addresses(struct sctp sin6.sin6_len = sizeof(sin6); #endif /* First what about the src address of the pkt ? */ - fnd = 0; - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - sa = (struct sockaddr *)&net->ro._l_addr; - if (sa->sa_family == src->sa_family) { + check_src = 0; + switch (src->sa_family) { #ifdef INET - if (sa->sa_family == AF_INET) { - struct sockaddr_in *src4; + case AF_INET: + if (asoc->scope.ipv4_addr_legal) { + check_src = 1; + } + break; +#endif +#ifdef INET6 + case AF_INET6: + if (asoc->scope.ipv6_addr_legal) { + check_src = 1; + } + break; +#endif + default: + /* TSNH */ + break; + } + if (check_src) { + fnd = 0; + TAILQ_FOREACH(net, &asoc->nets, sctp_next) { + sa = (struct sockaddr *)&net->ro._l_addr; + if (sa->sa_family == src->sa_family) { +#ifdef INET + if (sa->sa_family == AF_INET) { + struct sockaddr_in *src4; - sa4 = (struct sockaddr_in *)sa; - src4 = (struct sockaddr_in *)src; - if (sa4->sin_addr.s_addr == src4->sin_addr.s_addr) { - fnd = 1; - break; + sa4 = (struct sockaddr_in *)sa; + src4 = (struct sockaddr_in *)src; + if (sa4->sin_addr.s_addr == src4->sin_addr.s_addr) { + fnd = 1; + break; + } } - } #endif #ifdef INET6 - if (sa->sa_family == AF_INET6) { - struct sockaddr_in6 *src6; + if (sa->sa_family == AF_INET6) { + struct sockaddr_in6 *src6; - sa6 = (struct sockaddr_in6 *)sa; - src6 = (struct sockaddr_in6 *)src; - if (SCTP6_ARE_ADDR_EQUAL(sa6, src6)) { - fnd = 1; - break; + sa6 = (struct sockaddr_in6 *)sa; + src6 = (struct sockaddr_in6 *)src; + if (SCTP6_ARE_ADDR_EQUAL(sa6, src6)) { + fnd = 1; + break; + } } - } #endif + } + } + if (fnd == 0) { + /* New address added! no need to look futher. */ + return (1); } - } - if (fnd == 0) { - /* New address added! no need to look futher. */ - return (1); } /* Ok so far lets munge through the rest of the packet */ offset += sizeof(struct sctp_init_chunk); @@ -5381,9 +5404,11 @@ sctp_are_there_new_addresses(struct sctp phdr == NULL) { return (1); } - p4 = (struct sctp_ipv4addr_param *)phdr; - sin4.sin_addr.s_addr = p4->addr; - sa_touse = (struct sockaddr *)&sin4; + if (asoc->scope.ipv4_addr_legal) { + p4 = (struct sctp_ipv4addr_param *)phdr; + sin4.sin_addr.s_addr = p4->addr; + sa_touse = (struct sockaddr *)&sin4; + } break; } #endif @@ -5398,10 +5423,12 @@ sctp_are_there_new_addresses(struct sctp phdr == NULL) { return (1); } - p6 = (struct sctp_ipv6addr_param *)phdr; - memcpy((caddr_t)&sin6.sin6_addr, p6->addr, - sizeof(p6->addr)); - sa_touse = (struct sockaddr *)&sin6; + if (asoc->scope.ipv6_addr_legal) { + p6 = (struct sctp_ipv6addr_param *)phdr; + memcpy((caddr_t)&sin6.sin6_addr, p6->addr, + sizeof(p6->addr)); + sa_touse = (struct sockaddr *)&sin6; + } break; } #endif @@ -5457,7 +5484,8 @@ sctp_are_there_new_addresses(struct sctp */ void sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb, - struct mbuf *init_pkt, int iphlen, int offset, + struct sctp_nets *src_net, struct mbuf *init_pkt, + int iphlen, int offset, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_init_chunk *init_chk, uint8_t mflowtype, uint32_t mflowid, @@ -5501,20 +5529,39 @@ sctp_send_initiate_ack(struct sctp_inpcb asoc = NULL; } if ((asoc != NULL) && - (SCTP_GET_STATE(asoc) != SCTP_STATE_COOKIE_WAIT) && - (sctp_are_there_new_addresses(asoc, init_pkt, offset, src))) { - /* new addresses, out of here in non-cookie-wait states */ - /* - * Send a ABORT, we don't add the new address error clause - * though we even set the T bit and copy in the 0 tag.. this - * looks no different than if no listener was present. - */ - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), - "Address added"); - sctp_send_abort(init_pkt, iphlen, src, dst, sh, 0, op_err, - mflowtype, mflowid, inp->fibnum, - vrf_id, port); - return; + (SCTP_GET_STATE(asoc) != SCTP_STATE_COOKIE_WAIT)) { + if (sctp_are_there_new_addresses(asoc, init_pkt, offset, src)) { + /* + * new addresses, out of here in non-cookie-wait + * states + * + * Send an ABORT, without the new address error cause. + * This looks no different than if no listener was + * present. + */ + op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + "Address added"); + sctp_send_abort(init_pkt, iphlen, src, dst, sh, 0, op_err, + mflowtype, mflowid, inp->fibnum, + vrf_id, port); + return; + } + if (src_net != NULL && (src_net->port != port)) { + /* + * change of remote encapsulation port, out of here + * in non-cookie-wait states + * + * Send an ABORT, without an specific error cause. This + * looks no different than if no listener was + * present. + */ + op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + "Remote encapsulation port changed"); + sctp_send_abort(init_pkt, iphlen, src, dst, sh, 0, op_err, + mflowtype, mflowid, inp->fibnum, + vrf_id, port); + return; + } } abort_flag = 0; op_err = sctp_arethere_unrecognized_parameters(init_pkt, Modified: stable/10/sys/netinet/sctp_output.h ============================================================================== --- stable/10/sys/netinet/sctp_output.h Wed Feb 3 13:47:50 2016 (r295207) +++ stable/10/sys/netinet/sctp_output.h Wed Feb 3 14:04:07 2016 (r295208) @@ -80,7 +80,8 @@ sctp_send_initiate(struct sctp_inpcb *, ); void -sctp_send_initiate_ack(struct sctp_inpcb *, struct sctp_tcb *, struct mbuf *, +sctp_send_initiate_ack(struct sctp_inpcb *, struct sctp_tcb *, + struct sctp_nets *, struct mbuf *, int, int, struct sockaddr *, struct sockaddr *, struct sctphdr *, struct sctp_init_chunk *, Modified: stable/10/sys/netinet/sctp_pcb.c ============================================================================== --- stable/10/sys/netinet/sctp_pcb.c Wed Feb 3 13:47:50 2016 (r295207) +++ stable/10/sys/netinet/sctp_pcb.c Wed Feb 3 14:04:07 2016 (r295208) @@ -2256,7 +2256,6 @@ sctp_findassociation_addr(struct mbuf *m struct sctphdr *sh, struct sctp_chunkhdr *ch, struct sctp_inpcb **inp_p, struct sctp_nets **netp, uint32_t vrf_id) { - int find_tcp_pool; struct sctp_tcb *stcb; struct sctp_inpcb *inp; @@ -2268,25 +2267,13 @@ sctp_findassociation_addr(struct mbuf *m return (stcb); } } - find_tcp_pool = 0; - /* - * Don't consider INIT chunks since that breaks 1-to-1 sockets: When - * a server closes the listener, incoming INIT chunks are not - * responsed by an INIT-ACK chunk. - */ - if ((ch->chunk_type != SCTP_INITIATION_ACK) && - (ch->chunk_type != SCTP_COOKIE_ACK) && - (ch->chunk_type != SCTP_COOKIE_ECHO)) { - /* Other chunk types go to the tcp pool. */ - find_tcp_pool = 1; - } if (inp_p) { stcb = sctp_findassociation_addr_sa(src, dst, inp_p, netp, - find_tcp_pool, vrf_id); + 1, vrf_id); inp = *inp_p; } else { stcb = sctp_findassociation_addr_sa(src, dst, &inp, netp, - find_tcp_pool, vrf_id); + 1, vrf_id); } SCTPDBG(SCTP_DEBUG_PCB1, "stcb:%p inp:%p\n", (void *)stcb, (void *)inp); if (stcb == NULL && inp) { Modified: stable/10/sys/netinet/sctp_var.h ============================================================================== --- stable/10/sys/netinet/sctp_var.h Wed Feb 3 13:47:50 2016 (r295207) +++ stable/10/sys/netinet/sctp_var.h Wed Feb 3 14:04:07 2016 (r295208) @@ -86,7 +86,7 @@ extern struct pr_usrreqs sctp_usrreqs; #define sctp_sbspace_failedmsgs(sb) ((long) ((sctp_maxspace(sb) > (sb)->sb_cc) ? (sctp_maxspace(sb) - (sb)->sb_cc) : 0)) -#define sctp_sbspace_sub(a,b) ((a > b) ? (a - b) : 0) +#define sctp_sbspace_sub(a,b) (((a) > (b)) ? ((a) - (b)) : 0) /* * I tried to cache the readq entries at one point. But the reality From owner-svn-src-all@freebsd.org Wed Feb 3 14:31:25 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AAB0A9A6B1; Wed, 3 Feb 2016 14:31:25 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF25C143C; Wed, 3 Feb 2016 14:31:24 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u13EVN9w074413; Wed, 3 Feb 2016 14:31:23 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u13EVNaL074412; Wed, 3 Feb 2016 14:31:23 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201602031431.u13EVNaL074412@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 3 Feb 2016 14:31:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295209 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 14:31:25 -0000 Author: pfg Date: Wed Feb 3 14:31:23 2016 New Revision: 295209 URL: https://svnweb.freebsd.org/changeset/base/295209 Log: Revert r294695: ext2fs: passthrough any extra timestamps to the dinode struct. While it passed the classic testing, the change appears to have caused some regression and still requires some more precautions. PR: 206820 MFC after: 3 days Modified: head/sys/fs/ext2fs/ext2_inode_cnv.c Modified: head/sys/fs/ext2fs/ext2_inode_cnv.c ============================================================================== --- head/sys/fs/ext2fs/ext2_inode_cnv.c Wed Feb 3 14:04:07 2016 (r295208) +++ head/sys/fs/ext2fs/ext2_inode_cnv.c Wed Feb 3 14:31:23 2016 (r295209) @@ -149,11 +149,13 @@ ext2_i2ei(struct inode *ip, struct ext2f ei->e2di_atime = ip->i_atime; ei->e2di_mtime = ip->i_mtime; ei->e2di_ctime = ip->i_ctime; - ei->e2di_ctime_extra = NSEC_TO_XTIME(ip->i_ctimensec); - ei->e2di_mtime_extra = NSEC_TO_XTIME(ip->i_mtimensec); - ei->e2di_atime_extra = NSEC_TO_XTIME(ip->i_atimensec); - ei->e2di_crtime = ip->i_birthtime; - ei->e2di_crtime_extra = NSEC_TO_XTIME(ip->i_birthnsec); + if (E2DI_HAS_XTIME(ip)) { + ei->e2di_ctime_extra = NSEC_TO_XTIME(ip->i_ctimensec); + ei->e2di_mtime_extra = NSEC_TO_XTIME(ip->i_mtimensec); + ei->e2di_atime_extra = NSEC_TO_XTIME(ip->i_atimensec); + ei->e2di_crtime = ip->i_birthtime; + ei->e2di_crtime_extra = NSEC_TO_XTIME(ip->i_birthnsec); + } ei->e2di_flags = 0; ei->e2di_flags |= (ip->i_flags & SF_APPEND) ? EXT2_APPEND: 0; ei->e2di_flags |= (ip->i_flags & SF_IMMUTABLE) ? EXT2_IMMUTABLE: 0; From owner-svn-src-all@freebsd.org Wed Feb 3 14:34:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81367A9A837; Wed, 3 Feb 2016 14:34:26 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50F9F18BF; Wed, 3 Feb 2016 14:34:26 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u13EYPDp074578; Wed, 3 Feb 2016 14:34:25 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u13EYP3m074577; Wed, 3 Feb 2016 14:34:25 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201602031434.u13EYP3m074577@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 3 Feb 2016 14:34:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295210 - head/sys/boot/efi/libefi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 14:34:26 -0000 Author: andrew Date: Wed Feb 3 14:34:25 2016 New Revision: 295210 URL: https://svnweb.freebsd.org/changeset/base/295210 Log: Still open the network interface when EFI_OPEN_PROTOCOL_EXCLUSIVE failed. Not all UEFI implementations support this protocol. Modified: head/sys/boot/efi/libefi/efinet.c Modified: head/sys/boot/efi/libefi/efinet.c ============================================================================== --- head/sys/boot/efi/libefi/efinet.c Wed Feb 3 14:31:23 2016 (r295209) +++ head/sys/boot/efi/libefi/efinet.c Wed Feb 3 14:34:25 2016 (r295210) @@ -309,8 +309,8 @@ efinet_dev_init() status = BS->OpenProtocol(h, &sn_guid, (void **)&net, IH, 0, EFI_OPEN_PROTOCOL_EXCLUSIVE); if (status != EFI_SUCCESS) { - printf("Unable to open network interface %d\n", i); - continue; + printf("Unable to open network interface %d for " + "exclusive access\n", i); } dif->dif_unit = i; From owner-svn-src-all@freebsd.org Wed Feb 3 15:16:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0756A99992; Wed, 3 Feb 2016 15:16:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D3FF12A8; Wed, 3 Feb 2016 15:16:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u13FGKUl086350; Wed, 3 Feb 2016 15:16:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u13FGKr2086349; Wed, 3 Feb 2016 15:16:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201602031516.u13FGKr2086349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Feb 2016 15:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295211 - stable/10/sys/dev/pty X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 15:16:21 -0000 Author: kib Date: Wed Feb 3 15:16:20 2016 New Revision: 295211 URL: https://svnweb.freebsd.org/changeset/base/295211 Log: MFC r293825: Switch legacy pty clone handler to use make_dev_s(9). MFC r294594: Remove printf only useful for debugging. Approved by: re (marius) Modified: stable/10/sys/dev/pty/pty.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/pty/pty.c ============================================================================== --- stable/10/sys/dev/pty/pty.c Wed Feb 3 14:34:25 2016 (r295210) +++ stable/10/sys/dev/pty/pty.c Wed Feb 3 15:16:20 2016 (r295211) @@ -97,6 +97,8 @@ static void pty_clone(void *arg, struct ucred *cr, char *name, int namelen, struct cdev **dev) { + struct make_dev_args mda; + int error; /* Cloning is already satisfied. */ if (*dev != NULL) @@ -117,8 +119,15 @@ pty_clone(void *arg, struct ucred *cr, c return; /* Create the controller device node. */ - *dev = make_dev_credf(MAKEDEV_REF, &ptydev_cdevsw, 0, - NULL, UID_ROOT, GID_WHEEL, 0666, "%s", name); + make_dev_args_init(&mda); + mda.mda_flags = MAKEDEV_CHECKNAME | MAKEDEV_REF; + mda.mda_devsw = &ptydev_cdevsw; + mda.mda_uid = UID_ROOT; + mda.mda_gid = GID_WHEEL; + mda.mda_mode = 0666; + error = make_dev_s(&mda, dev, "%s", name); + if (error != 0) + *dev = NULL; } static int From owner-svn-src-all@freebsd.org Wed Feb 3 15:45:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DC9DA9A45B; Wed, 3 Feb 2016 15:45:15 +0000 (UTC) (envelope-from jceel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20EDC7DA; Wed, 3 Feb 2016 15:45:15 +0000 (UTC) (envelope-from jceel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u13FjEod094906; Wed, 3 Feb 2016 15:45:14 GMT (envelope-from jceel@FreeBSD.org) Received: (from jceel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u13FjDCx094901; Wed, 3 Feb 2016 15:45:13 GMT (envelope-from jceel@FreeBSD.org) Message-Id: <201602031545.u13FjDCx094901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jceel set sender to jceel@FreeBSD.org using -f From: Jakub Wojciech Klama Date: Wed, 3 Feb 2016 15:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295212 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 15:45:15 -0000 Author: jceel Date: Wed Feb 3 15:45:13 2016 New Revision: 295212 URL: https://svnweb.freebsd.org/changeset/base/295212 Log: Add an additional, libucl-based configuration file parser to ctld. Default ctld behavior remains unchanged - libucl parser can be selected explicitly by adding -u switch to ctld command line. Reviewed by: trasz Approved by: trasz (mentor) MFC after: 1 month Relnotes: yes Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D4534 Added: head/usr.sbin/ctld/uclparse.c (contents, props changed) Modified: head/usr.sbin/ctld/Makefile head/usr.sbin/ctld/ctld.c head/usr.sbin/ctld/ctld.h head/usr.sbin/ctld/parse.y Modified: head/usr.sbin/ctld/Makefile ============================================================================== --- head/usr.sbin/ctld/Makefile Wed Feb 3 15:16:20 2016 (r295211) +++ head/usr.sbin/ctld/Makefile Wed Feb 3 15:45:13 2016 (r295212) @@ -1,8 +1,11 @@ # $FreeBSD$ +CFLAGS+=-I${.CURDIR}/../../contrib/libucl/include +.PATH: ${.CURDIR}/../../contrib/libucl/include + PROG= ctld SRCS= chap.c ctld.c discovery.c isns.c kernel.c keys.c log.c -SRCS+= login.c parse.y pdu.c token.l y.tab.h +SRCS+= login.c parse.y pdu.c token.l y.tab.h uclparse.c CFLAGS+= -I${.CURDIR} CFLAGS+= -I${.CURDIR}/../../sys CFLAGS+= -I${.CURDIR}/../../sys/cam/ctl @@ -10,7 +13,7 @@ CFLAGS+= -I${.CURDIR}/../../sys/dev/iscs #CFLAGS+= -DICL_KERNEL_PROXY MAN= ctld.8 ctl.conf.5 -LIBADD= bsdxml l md sbuf util +LIBADD= bsdxml l md sbuf util ucl m YFLAGS+= -v CLEANFILES= y.tab.c y.tab.h y.output Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Wed Feb 3 15:16:20 2016 (r295211) +++ head/usr.sbin/ctld/ctld.c Wed Feb 3 15:45:13 2016 (r295212) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -2491,6 +2492,104 @@ register_signals(void) log_err(1, "sigaction"); } +static void +check_perms(const char *path) +{ + struct stat sb; + int error; + + error = stat(path, &sb); + if (error != 0) { + log_warn("stat"); + return; + } + if (sb.st_mode & S_IWOTH) { + log_warnx("%s is world-writable", path); + } else if (sb.st_mode & S_IROTH) { + log_warnx("%s is world-readable", path); + } else if (sb.st_mode & S_IXOTH) { + /* + * Ok, this one doesn't matter, but still do it, + * just for consistency. + */ + log_warnx("%s is world-executable", path); + } + + /* + * XXX: Should we also check for owner != 0? + */ +} + +static struct conf * +conf_new_from_file(const char *path, struct conf *oldconf, bool ucl) +{ + struct conf *conf; + struct auth_group *ag; + struct portal_group *pg; + struct pport *pp; + int error; + + log_debugx("obtaining configuration from %s", path); + + conf = conf_new(); + + TAILQ_FOREACH(pp, &oldconf->conf_pports, pp_next) + pport_copy(pp, conf); + + ag = auth_group_new(conf, "default"); + assert(ag != NULL); + + ag = auth_group_new(conf, "no-authentication"); + assert(ag != NULL); + ag->ag_type = AG_TYPE_NO_AUTHENTICATION; + + ag = auth_group_new(conf, "no-access"); + assert(ag != NULL); + ag->ag_type = AG_TYPE_DENY; + + pg = portal_group_new(conf, "default"); + assert(pg != NULL); + + if (ucl) + error = uclparse_conf(conf, path); + else + error = parse_conf(conf, path); + + if (error != 0) { + conf_delete(conf); + return (NULL); + } + + check_perms(path); + + if (conf->conf_default_ag_defined == false) { + log_debugx("auth-group \"default\" not defined; " + "going with defaults"); + ag = auth_group_find(conf, "default"); + assert(ag != NULL); + ag->ag_type = AG_TYPE_DENY; + } + + if (conf->conf_default_pg_defined == false) { + log_debugx("portal-group \"default\" not defined; " + "going with defaults"); + pg = portal_group_find(conf, "default"); + assert(pg != NULL); + portal_group_add_listen(pg, "0.0.0.0:3260", false); + portal_group_add_listen(pg, "[::]:3260", false); + } + + conf->conf_kernel_port_on = true; + + error = conf_verify(conf); + if (error != 0) { + conf_delete(conf); + return (NULL); + } + + return (conf); +} + int main(int argc, char **argv) { @@ -2499,13 +2598,17 @@ main(int argc, char **argv) const char *config_path = DEFAULT_CONFIG_PATH; int debug = 0, ch, error; bool dont_daemonize = false; + bool use_ucl = false; - while ((ch = getopt(argc, argv, "df:R")) != -1) { + while ((ch = getopt(argc, argv, "duf:R")) != -1) { switch (ch) { case 'd': dont_daemonize = true; debug++; break; + case 'u': + use_ucl = true; + break; case 'f': config_path = optarg; break; @@ -2529,7 +2632,8 @@ main(int argc, char **argv) kernel_init(); oldconf = conf_new_from_kernel(); - newconf = conf_new_from_file(config_path, oldconf); + newconf = conf_new_from_file(config_path, oldconf, use_ucl); + if (newconf == NULL) log_errx(1, "configuration error; exiting"); if (debug > 0) { @@ -2564,7 +2668,9 @@ main(int argc, char **argv) if (sighup_received) { sighup_received = false; log_debugx("received SIGHUP, reloading configuration"); - tmpconf = conf_new_from_file(config_path, newconf); + tmpconf = conf_new_from_file(config_path, newconf, + use_ucl); + if (tmpconf == NULL) { log_warnx("configuration error, " "continuing with old configuration"); Modified: head/usr.sbin/ctld/ctld.h ============================================================================== --- head/usr.sbin/ctld/ctld.h Wed Feb 3 15:16:20 2016 (r295211) +++ head/usr.sbin/ctld/ctld.h Wed Feb 3 15:45:13 2016 (r295212) @@ -297,8 +297,10 @@ int rchap_receive(struct rchap *rchap, char *rchap_get_response(struct rchap *rchap); void rchap_delete(struct rchap *rchap); +int parse_conf(struct conf *conf, const char *path); +int uclparse_conf(struct conf *conf, const char *path); + struct conf *conf_new(void); -struct conf *conf_new_from_file(const char *path, struct conf *old); struct conf *conf_new_from_kernel(void); void conf_delete(struct conf *conf); int conf_verify(struct conf *conf); Modified: head/usr.sbin/ctld/parse.y ============================================================================== --- head/usr.sbin/ctld/parse.y Wed Feb 3 15:16:20 2016 (r295211) +++ head/usr.sbin/ctld/parse.y Wed Feb 3 15:45:13 2016 (r295212) @@ -1044,70 +1044,18 @@ yyerror(const char *str) lineno, yytext, str); } -static void -check_perms(const char *path) +int +parse_conf(struct conf *newconf, const char *path) { - struct stat sb; int error; - error = stat(path, &sb); - if (error != 0) { - log_warn("stat"); - return; - } - if (sb.st_mode & S_IWOTH) { - log_warnx("%s is world-writable", path); - } else if (sb.st_mode & S_IROTH) { - log_warnx("%s is world-readable", path); - } else if (sb.st_mode & S_IXOTH) { - /* - * Ok, this one doesn't matter, but still do it, - * just for consistency. - */ - log_warnx("%s is world-executable", path); - } - - /* - * XXX: Should we also check for owner != 0? - */ -} - -struct conf * -conf_new_from_file(const char *path, struct conf *oldconf) -{ - struct auth_group *ag; - struct portal_group *pg; - struct pport *pp; - int error; - - log_debugx("obtaining configuration from %s", path); - - conf = conf_new(); - - TAILQ_FOREACH(pp, &oldconf->conf_pports, pp_next) - pport_copy(pp, conf); - - ag = auth_group_new(conf, "default"); - assert(ag != NULL); - - ag = auth_group_new(conf, "no-authentication"); - assert(ag != NULL); - ag->ag_type = AG_TYPE_NO_AUTHENTICATION; - - ag = auth_group_new(conf, "no-access"); - assert(ag != NULL); - ag->ag_type = AG_TYPE_DENY; - - pg = portal_group_new(conf, "default"); - assert(pg != NULL); - + conf = newconf; yyin = fopen(path, "r"); if (yyin == NULL) { log_warn("unable to open configuration file %s", path); - conf_delete(conf); - return (NULL); + return (1); } - check_perms(path); + lineno = 1; yyrestart(yyin); error = yyparse(); @@ -1116,35 +1064,6 @@ conf_new_from_file(const char *path, str target = NULL; lun = NULL; fclose(yyin); - if (error != 0) { - conf_delete(conf); - return (NULL); - } - - if (conf->conf_default_ag_defined == false) { - log_debugx("auth-group \"default\" not defined; " - "going with defaults"); - ag = auth_group_find(conf, "default"); - assert(ag != NULL); - ag->ag_type = AG_TYPE_DENY; - } - - if (conf->conf_default_pg_defined == false) { - log_debugx("portal-group \"default\" not defined; " - "going with defaults"); - pg = portal_group_find(conf, "default"); - assert(pg != NULL); - portal_group_add_listen(pg, "0.0.0.0:3260", false); - portal_group_add_listen(pg, "[::]:3260", false); - } - - conf->conf_kernel_port_on = true; - - error = conf_verify(conf); - if (error != 0) { - conf_delete(conf); - return (NULL); - } - return (conf); + return (error); } Added: head/usr.sbin/ctld/uclparse.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/ctld/uclparse.c Wed Feb 3 15:45:13 2016 (r295212) @@ -0,0 +1,900 @@ +/*- + * Copyright (c) 2015 iXsystems Inc. + * All rights reserved. + * + * This software was developed by Jakub Klama + * under sponsorship from iXsystems Inc. + * + * 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$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ctld.h" + +static struct conf *conf = NULL; + +static int uclparse_toplevel(const ucl_object_t *); +static int uclparse_chap(struct auth_group *, const ucl_object_t *); +static int uclparse_chap_mutual(struct auth_group *, const ucl_object_t *); +static int uclparse_lun(const char *, const ucl_object_t *); +static int uclparse_auth_group(const char *, const ucl_object_t *); +static int uclparse_portal_group(const char *, const ucl_object_t *); +static int uclparse_target(const char *, const ucl_object_t *); +static int uclparse_target_portal_group(struct target *, const ucl_object_t *); +static int uclparse_target_lun(struct target *, const ucl_object_t *); + +static int +uclparse_chap(struct auth_group *auth_group, const ucl_object_t *obj) +{ + const struct auth *ca; + const ucl_object_t *user, *secret; + + user = ucl_object_find_key(obj, "user"); + if (!user || user->type != UCL_STRING) { + log_warnx("chap section in auth-group \"%s\" is missing " + "\"user\" string key", auth_group->ag_name); + return (1); + } + + secret = ucl_object_find_key(obj, "secret"); + if (!secret || secret->type != UCL_STRING) { + log_warnx("chap section in auth-group \"%s\" is missing " + "\"secret\" string key", auth_group->ag_name); + } + + ca = auth_new_chap(auth_group, + ucl_object_tostring(user), + ucl_object_tostring(secret)); + + if (ca == NULL) + return (1); + + return (0); +} + +static int +uclparse_chap_mutual(struct auth_group *auth_group, const ucl_object_t *obj) +{ + const struct auth *ca; + const ucl_object_t *user, *secret, *mutual_user; + const ucl_object_t *mutual_secret; + + user = ucl_object_find_key(obj, "user"); + if (!user || user->type != UCL_STRING) { + log_warnx("chap-mutual section in auth-group \"%s\" is missing " + "\"user\" string key", auth_group->ag_name); + return (1); + } + + secret = ucl_object_find_key(obj, "secret"); + if (!secret || secret->type != UCL_STRING) { + log_warnx("chap-mutual section in auth-group \"%s\" is missing " + "\"secret\" string key", auth_group->ag_name); + return (1); + } + + mutual_user = ucl_object_find_key(obj, "mutual-user"); + if (!user || user->type != UCL_STRING) { + log_warnx("chap-mutual section in auth-group \"%s\" is missing " + "\"mutual-user\" string key", auth_group->ag_name); + return (1); + } + + mutual_secret = ucl_object_find_key(obj, "mutual-secret"); + if (!secret || secret->type != UCL_STRING) { + log_warnx("chap-mutual section in auth-group \"%s\" is missing " + "\"mutual-secret\" string key", auth_group->ag_name); + return (1); + } + + ca = auth_new_chap_mutual(auth_group, + ucl_object_tostring(user), + ucl_object_tostring(secret), + ucl_object_tostring(mutual_user), + ucl_object_tostring(mutual_secret)); + + if (ca == NULL) + return (1); + + return (0); +} + +static int +uclparse_target_portal_group(struct target *target, const ucl_object_t *obj) +{ + struct portal_group *tpg; + struct auth_group *tag = NULL; + struct port *tp; + const ucl_object_t *portal_group, *auth_group; + + portal_group = ucl_object_find_key(obj, "name"); + if (!portal_group || portal_group->type != UCL_STRING) { + log_warnx("portal-group section in target \"%s\" is missing " + "\"name\" string key", target->t_name); + return (1); + } + + auth_group = ucl_object_find_key(obj, "auth-group-name"); + if (auth_group && auth_group->type != UCL_STRING) { + log_warnx("portal-group section in target \"%s\" is missing " + "\"auth-group-name\" string key", target->t_name); + return (1); + } + + + tpg = portal_group_find(conf, ucl_object_tostring(portal_group)); + if (tpg == NULL) { + log_warnx("unknown portal-group \"%s\" for target " + "\"%s\"", ucl_object_tostring(portal_group), target->t_name); + return (1); + } + + if (auth_group) { + tag = auth_group_find(conf, ucl_object_tostring(auth_group)); + if (tag == NULL) { + log_warnx("unknown auth-group \"%s\" for target " + "\"%s\"", ucl_object_tostring(auth_group), + target->t_name); + return (1); + } + } + + tp = port_new(conf, target, tpg); + if (tp == NULL) { + log_warnx("can't link portal-group \"%s\" to target " + "\"%s\"", ucl_object_tostring(portal_group), target->t_name); + return (1); + } + tp->p_auth_group = tag; + + return (0); +} + +static int +uclparse_target_lun(struct target *target, const ucl_object_t *obj) +{ + struct lun *lun; + + if (obj->type == UCL_INT) { + char *name; + + asprintf(&name, "%s,lun,%ju", target->t_name, + ucl_object_toint(obj)); + lun = lun_new(conf, name); + if (lun == NULL) + return (1); + + lun_set_scsiname(lun, name); + target->t_luns[ucl_object_toint(obj)] = lun; + return (0); + } + + if (obj->type == UCL_OBJECT) { + const ucl_object_t *num = ucl_object_find_key(obj, "number"); + const ucl_object_t *name = ucl_object_find_key(obj, "name"); + + if (num == NULL || num->type != UCL_INT) { + log_warnx("lun section in target \"%s\" is missing " + "\"number\" integer property", target->t_name); + return (1); + } + + if (name == NULL || name->type != UCL_STRING) { + log_warnx("lun section in target \"%s\" is missing " + "\"name\" string property", target->t_name); + return (1); + } + + lun = lun_find(conf, ucl_object_tostring(name)); + if (lun == NULL) + return (1); + + target->t_luns[ucl_object_toint(num)] = lun; + } + + return (0); +} + +static int +uclparse_toplevel(const ucl_object_t *top) +{ + ucl_object_iter_t it = NULL, iter = NULL; + const ucl_object_t *obj = NULL, *child = NULL; + int err = 0; + + /* Pass 1 - everything except targets */ + while ((obj = ucl_iterate_object(top, &it, true))) { + const char *key = ucl_object_key(obj); + + if (!strcmp(key, "debug")) { + if (obj->type == UCL_INT) + conf->conf_debug = ucl_object_toint(obj); + else { + log_warnx("\"debug\" property value is not integer"); + return (1); + } + } + + if (!strcmp(key, "timeout")) { + if (obj->type == UCL_INT) + conf->conf_timeout = ucl_object_toint(obj); + else { + log_warnx("\"timeout\" property value is not integer"); + return (1); + } + } + + if (!strcmp(key, "maxproc")) { + if (obj->type == UCL_INT) + conf->conf_maxproc = ucl_object_toint(obj); + else { + log_warnx("\"maxproc\" property value is not integer"); + return (1); + } + } + + if (!strcmp(key, "pidfile")) { + if (obj->type == UCL_STRING) + conf->conf_pidfile_path = strdup( + ucl_object_tostring(obj)); + else { + log_warnx("\"pidfile\" property value is not string"); + return (1); + } + } + + if (!strcmp(key, "isns-server")) { + if (obj->type == UCL_ARRAY) { + iter = NULL; + while ((child = ucl_iterate_object(obj, &iter, + true))) { + if (child->type != UCL_STRING) + return (1); + + err = isns_new(conf, + ucl_object_tostring(child)); + if (err != 0) { + return (1); + } + } + } else { + log_warnx("\"isns-server\" property value is " + "not an array"); + return (1); + } + } + + if (!strcmp(key, "isns-period")) { + if (obj->type == UCL_INT) + conf->conf_timeout = ucl_object_toint(obj); + else { + log_warnx("\"isns-period\" property value is not integer"); + return (1); + } + } + + if (!strcmp(key, "isns-timeout")) { + if (obj->type == UCL_INT) + conf->conf_timeout = ucl_object_toint(obj); + else { + log_warnx("\"isns-timeout\" property value is not integer"); + return (1); + } + } + + if (!strcmp(key, "auth-group")) { + if (obj->type == UCL_OBJECT) { + iter = NULL; + while ((child = ucl_iterate_object(obj, &iter, true))) { + uclparse_auth_group(ucl_object_key(child), child); + } + } else { + log_warnx("\"auth-group\" section is not an object"); + return (1); + } + } + + if (!strcmp(key, "portal-group")) { + if (obj->type == UCL_OBJECT) { + iter = NULL; + while ((child = ucl_iterate_object(obj, &iter, true))) { + uclparse_portal_group(ucl_object_key(child), child); + } + } else { + log_warnx("\"portal-group\" section is not an object"); + return (1); + } + } + + if (!strcmp(key, "lun")) { + if (obj->type == UCL_OBJECT) { + iter = NULL; + while ((child = ucl_iterate_object(obj, &iter, true))) { + uclparse_lun(ucl_object_key(child), child); + } + } else { + log_warnx("\"lun\" section is not an object"); + return (1); + } + } + } + + /* Pass 2 - targets */ + it = NULL; + while ((obj = ucl_iterate_object(top, &it, true))) { + const char *key = ucl_object_key(obj); + + if (!strcmp(key, "target")) { + if (obj->type == UCL_OBJECT) { + iter = NULL; + while ((child = ucl_iterate_object(obj, &iter, + true))) { + uclparse_target(ucl_object_key(child), + child); + } + } else { + log_warnx("\"target\" section is not an object"); + return (1); + } + } + } + + return (0); +} + +static int +uclparse_auth_group(const char *name, const ucl_object_t *top) +{ + struct auth_group *auth_group; + const struct auth_name *an; + const struct auth_portal *ap; + ucl_object_iter_t it = NULL, it2 = NULL; + const ucl_object_t *obj = NULL, *tmp = NULL; + const char *key; + int err; + + if (!strcmp(name, "default") && + conf->conf_default_ag_defined == false) { + auth_group = auth_group_find(conf, name); + conf->conf_default_ag_defined = true; + } else { + auth_group = auth_group_new(conf, name); + } + + if (auth_group == NULL) + return (1); + + while ((obj = ucl_iterate_object(top, &it, true))) { + key = ucl_object_key(obj); + + if (!strcmp(key, "auth-type")) { + const char *value = ucl_object_tostring(obj); + + err = auth_group_set_type(auth_group, value); + if (err) + return (1); + } + + if (!strcmp(key, "chap")) { + if (obj->type != UCL_ARRAY) { + log_warnx("\"chap\" property of " + "auth-group \"%s\" is not an array", + name); + return (1); + } + + it2 = NULL; + while ((tmp = ucl_iterate_object(obj, &it2, true))) { + if (uclparse_chap(auth_group, tmp) != 0) + return (1); + } + } + + if (!strcmp(key, "chap-mutual")) { + if (obj->type != UCL_ARRAY) { + log_warnx("\"chap-mutual\" property of " + "auth-group \"%s\" is not an array", + name); + return (1); + } + + it2 = NULL; + while ((tmp = ucl_iterate_object(obj, &it2, true))) { + if (uclparse_chap_mutual(auth_group, tmp) != 0) + return (1); + } + } + + if (!strcmp(key, "initiator-name")) { + if (obj->type != UCL_ARRAY) { + log_warnx("\"initiator-name\" property of " + "auth-group \"%s\" is not an array", + name); + return (1); + } + + it2 = NULL; + while ((tmp = ucl_iterate_object(obj, &it2, true))) { + const char *value = ucl_object_tostring(tmp); + + an = auth_name_new(auth_group, value); + if (an == NULL) + return (1); + } + } + + if (!strcmp(key, "initiator-portal")) { + if (obj->type != UCL_ARRAY) { + log_warnx("\"initiator-portal\" property of " + "auth-group \"%s\" is not an array", + name); + return (1); + } + + it2 = NULL; + while ((tmp = ucl_iterate_object(obj, &it2, true))) { + const char *value = ucl_object_tostring(tmp); + + ap = auth_portal_new(auth_group, value); + if (ap == NULL) + return (1); + } + } + } + + return (0); +} + +static int +uclparse_portal_group(const char *name, const ucl_object_t *top) +{ + struct portal_group *portal_group; + ucl_object_iter_t it = NULL, it2 = NULL; + const ucl_object_t *obj = NULL, *tmp = NULL; + const char *key; + + if (strcmp(name, "default") == 0 && + conf->conf_default_pg_defined == false) { + portal_group = portal_group_find(conf, name); + conf->conf_default_pg_defined = true; + } else { + portal_group = portal_group_new(conf, name); + } + + if (portal_group == NULL) + return (1); + + while ((obj = ucl_iterate_object(top, &it, true))) { + key = ucl_object_key(obj); + + if (!strcmp(key, "discovery-auth-group")) { + portal_group->pg_discovery_auth_group = + auth_group_find(conf, ucl_object_tostring(obj)); + if (portal_group->pg_discovery_auth_group == NULL) { + log_warnx("unknown discovery-auth-group \"%s\" " + "for portal-group \"%s\"", + ucl_object_tostring(obj), + portal_group->pg_name); + return (1); + } + } + + if (!strcmp(key, "discovery-filter")) { + if (obj->type != UCL_STRING) { + log_warnx("\"discovery-filter\" property of " + "portal-group \"%s\" is not a string", + portal_group->pg_name); + return (1); + } + + if (portal_group_set_filter(portal_group, + ucl_object_tostring(obj)) != 0) + return (1); + } + + if (!strcmp(key, "listen")) { + if (obj->type == UCL_STRING) { + if (portal_group_add_listen(portal_group, + ucl_object_tostring(obj), false) != 0) + return (1); + } else if (obj->type == UCL_ARRAY) { + while ((tmp = ucl_iterate_object(obj, &it2, + true))) { + if (portal_group_add_listen( + portal_group, + ucl_object_tostring(tmp), + false) != 0) + return (1); + } + } else { + log_warnx("\"listen\" property of " + "portal-group \"%s\" is not a string", + portal_group->pg_name); + return (1); + } + } + + if (!strcmp(key, "listen-iser")) { + if (obj->type == UCL_STRING) { + if (portal_group_add_listen(portal_group, + ucl_object_tostring(obj), true) != 0) + return (1); + } else if (obj->type == UCL_ARRAY) { + while ((tmp = ucl_iterate_object(obj, &it2, + true))) { + if (portal_group_add_listen( + portal_group, + ucl_object_tostring(tmp), + true) != 0) + return (1); + } + } else { + log_warnx("\"listen\" property of " + "portal-group \"%s\" is not a string", + portal_group->pg_name); + return (1); + } + } + + if (!strcmp(key, "redirect")) { + if (obj->type != UCL_STRING) { + log_warnx("\"listen\" property of " + "portal-group \"%s\" is not a string", + portal_group->pg_name); + return (1); + } + + if (portal_group_set_redirection(portal_group, + ucl_object_tostring(obj)) != 0) + return (1); + } + + if (!strcmp(key, "options")) { + if (obj->type != UCL_OBJECT) { + log_warnx("\"options\" property of portal group " + "\"%s\" is not an object", portal_group->pg_name); + return (1); + } + + while ((tmp = ucl_iterate_object(obj, &it2, + true))) { + option_new(&portal_group->pg_options, + ucl_object_key(tmp), + ucl_object_tostring_forced(tmp)); + } + } + } + + return (0); +} + +static int +uclparse_target(const char *name, const ucl_object_t *top) +{ + struct target *target; + ucl_object_iter_t it = NULL, it2 = NULL; + const ucl_object_t *obj = NULL, *tmp = NULL; + const char *key; + + target = target_new(conf, name); + + while ((obj = ucl_iterate_object(top, &it, true))) { + key = ucl_object_key(obj); + + if (!strcmp(key, "alias")) { + if (obj->type != UCL_STRING) { + log_warnx("\"alias\" property of target " + "\"%s\" is not a string", target->t_name); + return (1); + } + + target->t_alias = strdup(ucl_object_tostring(obj)); + } + + if (!strcmp(key, "auth-group")) { + if (target->t_auth_group != NULL) { + if (target->t_auth_group->ag_name != NULL) + log_warnx("auth-group for target \"%s\" " + "specified more than once", + target->t_name); + else + log_warnx("cannot use both auth-group " + "and explicit authorisations for " + "target \"%s\"", target->t_name); + return (1); + } + target->t_auth_group = auth_group_find(conf, + ucl_object_tostring(obj)); + if (target->t_auth_group == NULL) { + log_warnx("unknown auth-group \"%s\" for target " + "\"%s\"", ucl_object_tostring(obj), + target->t_name); + return (1); + } + } + + if (!strcmp(key, "auth-type")) { + int error; + + if (target->t_auth_group != NULL) { + if (target->t_auth_group->ag_name != NULL) { + log_warnx("cannot use both auth-group and " + "auth-type for target \"%s\"", + target->t_name); + return (1); + } + } else { + target->t_auth_group = auth_group_new(conf, NULL); + if (target->t_auth_group == NULL) + return (1); + + target->t_auth_group->ag_target = target; + } + error = auth_group_set_type(target->t_auth_group, + ucl_object_tostring(obj)); + if (error != 0) + return (1); + } + + if (!strcmp(key, "chap")) { + if (uclparse_chap(target->t_auth_group, obj) != 0) + return (1); + } + + if (!strcmp(key, "chap-mutual")) { + if (uclparse_chap_mutual(target->t_auth_group, obj) != 0) + return (1); + } + + if (!strcmp(key, "initiator-name")) { + const struct auth_name *an; + + if (target->t_auth_group != NULL) { + if (target->t_auth_group->ag_name != NULL) { + log_warnx("cannot use both auth-group and " + "initiator-name for target \"%s\"", + target->t_name); + return (1); + } + } else { + target->t_auth_group = auth_group_new(conf, NULL); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Feb 3 16:44:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 720C0A9AB44; Wed, 3 Feb 2016 16:44:08 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DC4B12BF; Wed, 3 Feb 2016 16:44:08 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u13Gi7AC012835; Wed, 3 Feb 2016 16:44:07 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u13Gi6Yw012828; Wed, 3 Feb 2016 16:44:06 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201602031644.u13Gi6Yw012828@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Wed, 3 Feb 2016 16:44:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295213 - in head/sys/arm: arm at91 cavium/cns11xx include xscale/i8134x xscale/ixp425 xscale/pxa X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 16:44:08 -0000 Author: mmel Date: Wed Feb 3 16:44:06 2016 New Revision: 295213 URL: https://svnweb.freebsd.org/changeset/base/295213 Log: ARM: Consistently use cpu_setttb() instead of setttb(). Remove unused #define for drain_writebuf. Modified: head/sys/arm/arm/machdep.c head/sys/arm/at91/at91_machdep.c head/sys/arm/cavium/cns11xx/econa_machdep.c head/sys/arm/include/cpufunc.h 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/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Wed Feb 3 15:45:13 2016 (r295212) +++ head/sys/arm/arm/machdep.c Wed Feb 3 16:44:06 2016 (r295213) @@ -1622,7 +1622,7 @@ initarm(struct arm_boot_params *abp) cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2)) | DOMAIN_CLIENT); pmap_pa = kernel_l1pt.pv_pa; - setttb(kernel_l1pt.pv_pa); + cpu_setttb(kernel_l1pt.pv_pa); cpu_tlb_flushID(); cpu_domains(DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2)); @@ -1675,7 +1675,7 @@ initarm(struct arm_boot_params *abp) /* * We must now clean the cache again.... * Cleaning may be done by reading new data to displace any - * dirty data in the cache. This will have happened in setttb() + * dirty data in the cache. This will have happened in cpu_setttb() * but since we are boot strapping the addresses used for the read * may have just been remapped and thus the cache could be out * of sync. A re-clean after the switch will cure this. @@ -1867,7 +1867,7 @@ initarm(struct arm_boot_params *abp) /* * We must now clean the cache again.... * Cleaning may be done by reading new data to displace any - * dirty data in the cache. This will have happened in setttb() + * dirty data in the cache. This will have happened in cpu_setttb() * but since we are boot strapping the addresses used for the read * may have just been remapped and thus the cache could be out * of sync. A re-clean after the switch will cure this. Modified: head/sys/arm/at91/at91_machdep.c ============================================================================== --- head/sys/arm/at91/at91_machdep.c Wed Feb 3 15:45:13 2016 (r295212) +++ head/sys/arm/at91/at91_machdep.c Wed Feb 3 16:44:06 2016 (r295213) @@ -566,7 +566,7 @@ initarm(struct arm_boot_params *abp) arm_devmap_bootstrap(l1pagetable, at91_devmap); cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2)) | DOMAIN_CLIENT); - setttb(kernel_l1pt.pv_pa); + cpu_setttb(kernel_l1pt.pv_pa); cpu_tlb_flushID(); cpu_domains(DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2)); @@ -612,7 +612,7 @@ initarm(struct arm_boot_params *abp) /* * We must now clean the cache again.... * Cleaning may be done by reading new data to displace any - * dirty data in the cache. This will have happened in setttb() + * dirty data in the cache. This will have happened in cpu_setttb() * but since we are boot strapping the addresses used for the read * may have just been remapped and thus the cache could be out * of sync. A re-clean after the switch will cure this. Modified: head/sys/arm/cavium/cns11xx/econa_machdep.c ============================================================================== --- head/sys/arm/cavium/cns11xx/econa_machdep.c Wed Feb 3 15:45:13 2016 (r295212) +++ head/sys/arm/cavium/cns11xx/econa_machdep.c Wed Feb 3 16:44:06 2016 (r295213) @@ -275,7 +275,7 @@ initarm(struct arm_boot_params *abp) arm_devmap_bootstrap(l1pagetable, econa_devmap); cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT); - setttb(kernel_l1pt.pv_pa); + cpu_setttb(kernel_l1pt.pv_pa); cpu_tlb_flushID(); cpu_domains(DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)); cninit(); @@ -297,7 +297,7 @@ initarm(struct arm_boot_params *abp) /* * We must now clean the cache again.... * Cleaning may be done by reading new data to displace any - * dirty data in the cache. This will have happened in setttb() + * dirty data in the cache. This will have happened in cpu_setttb() * but since we are boot strapping the addresses used for the read * may have just been remapped and thus the cache could be out * of sync. A re-clean after the switch will cure this. Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Wed Feb 3 15:45:13 2016 (r295212) +++ head/sys/arm/include/cpufunc.h Wed Feb 3 16:44:06 2016 (r295213) @@ -412,9 +412,6 @@ void xscalec3_context_switch (void); #endif /* CPU_XSCALE_81342 */ -#define setttb cpu_setttb -#define drain_writebuf cpu_drain_writebuf - /* * Macros for manipulating CPU interrupts */ Modified: head/sys/arm/xscale/i8134x/crb_machdep.c ============================================================================== --- head/sys/arm/xscale/i8134x/crb_machdep.c Wed Feb 3 15:45:13 2016 (r295212) +++ head/sys/arm/xscale/i8134x/crb_machdep.c Wed Feb 3 16:44:06 2016 (r295213) @@ -267,7 +267,7 @@ initarm(struct arm_boot_params *abp) xscale_cache_clean_addr = 0xff000000U; cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT); - setttb(kernel_l1pt.pv_pa); + cpu_setttb(kernel_l1pt.pv_pa); cpu_tlb_flushID(); cpu_domains(DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)); /* @@ -284,7 +284,7 @@ initarm(struct arm_boot_params *abp) /* * We must now clean the cache again.... * Cleaning may be done by reading new data to displace any - * dirty data in the cache. This will have happened in setttb() + * dirty data in the cache. This will have happened in cpu_setttb() * but since we are boot strapping the addresses used for the read * may have just been remapped and thus the cache could be out * of sync. A re-clean after the switch will cure this. Modified: head/sys/arm/xscale/ixp425/avila_machdep.c ============================================================================== --- head/sys/arm/xscale/ixp425/avila_machdep.c Wed Feb 3 15:45:13 2016 (r295212) +++ head/sys/arm/xscale/ixp425/avila_machdep.c Wed Feb 3 16:44:06 2016 (r295213) @@ -353,7 +353,7 @@ initarm(struct arm_boot_params *abp) xscale_cache_clean_addr = 0xff000000U; cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT); - setttb(kernel_l1pt.pv_pa); + cpu_setttb(kernel_l1pt.pv_pa); cpu_tlb_flushID(); cpu_domains(DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)); @@ -370,7 +370,7 @@ initarm(struct arm_boot_params *abp) /* * We must now clean the cache again.... * Cleaning may be done by reading new data to displace any - * dirty data in the cache. This will have happened in setttb() + * dirty data in the cache. This will have happened in cpu_setttb() * but since we are boot strapping the addresses used for the read * may have just been remapped and thus the cache could be out * of sync. A re-clean after the switch will cure this. Modified: head/sys/arm/xscale/pxa/pxa_machdep.c ============================================================================== --- head/sys/arm/xscale/pxa/pxa_machdep.c Wed Feb 3 15:45:13 2016 (r295212) +++ head/sys/arm/xscale/pxa/pxa_machdep.c Wed Feb 3 16:44:06 2016 (r295213) @@ -267,7 +267,7 @@ initarm(struct arm_boot_params *abp) xscale_cache_clean_addr = 0xff000000U; cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT); - setttb(kernel_l1pt.pv_pa); + cpu_setttb(kernel_l1pt.pv_pa); cpu_tlb_flushID(); cpu_domains(DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)); @@ -284,7 +284,7 @@ initarm(struct arm_boot_params *abp) /* * We must now clean the cache again.... * Cleaning may be done by reading new data to displace any - * dirty data in the cache. This will have happened in setttb() + * dirty data in the cache. This will have happened in cpu_setttb() * but since we are boot strapping the addresses used for the read * may have just been remapped and thus the cache could be out * of sync. A re-clean after the switch will cure this. From owner-svn-src-all@freebsd.org Wed Feb 3 17:00:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD57BA9916A; Wed, 3 Feb 2016 17:00:20 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B8671DBC; Wed, 3 Feb 2016 17:00:20 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u13H0JML015976; Wed, 3 Feb 2016 17:00:19 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u13H0JbH015975; Wed, 3 Feb 2016 17:00:19 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201602031700.u13H0JbH015975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 3 Feb 2016 17:00:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295214 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 17:00:20 -0000 Author: andrew Date: Wed Feb 3 17:00:19 2016 New Revision: 295214 URL: https://svnweb.freebsd.org/changeset/base/295214 Log: Handle a misaligned stack pointer exception from userspace. The exception still needs to be enabled, but this will help with testing. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/arm64/trap.c Modified: head/sys/arm64/arm64/trap.c ============================================================================== --- head/sys/arm64/arm64/trap.c Wed Feb 3 16:44:06 2016 (r295213) +++ head/sys/arm64/arm64/trap.c Wed Feb 3 17:00:19 2016 (r295214) @@ -374,6 +374,10 @@ do_el0_sync(struct trapframe *frame) case EXCP_UNKNOWN: el0_excp_unknown(frame); break; + case EXCP_SP_ALIGN: + call_trapsignal(td, SIGBUS, BUS_ADRALN, (void *)frame->tf_sp); + userret(td, frame); + break; case EXCP_PC_ALIGN: call_trapsignal(td, SIGBUS, BUS_ADRALN, (void *)frame->tf_elr); userret(td, frame); From owner-svn-src-all@freebsd.org Wed Feb 3 17:38:32 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BBF7A9724E; Wed, 3 Feb 2016 17:38:32 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f179.google.com (mail-yk0-f179.google.com [209.85.160.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 126F317FA; Wed, 3 Feb 2016 17:38:31 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-yk0-f179.google.com with SMTP id z13so25487332ykd.0; Wed, 03 Feb 2016 09:38:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=d8sBs1M3qgbSFMACRIHmnehx8oOjvnGY04Sa3VrYNSA=; b=Umcx2qK7ccBAXv4OncHuJYOpTWY+NMpRyUbKmdDo5lWtHVHzWLUAvporC2nUiaeaAo SIHu1CBuBl9v91FKo0ZSBlhVUCO1Oc0KsbPxDrzVptgcM8/ozqQ3JBur75JrZOH7r6eg OYBskpDppZhCIN1ooiGWvysOEpDsPgJFSYDmE6/V90FN23Ja1MRtUhjDTElAly+dKVa5 ciC4my5Mnrpj2cL6fCWdRt0S/96aLHV4/JGHMxy1pLi8qnJ8/N9wYv6W48nwKXN8hDgI 5riacYiQyfj6Ao1CLh6CfRc4anMOhIYvq+UF0Gp6CtkaKblBwuEFCDtXdQKtYij2+Gg0 4cdg== X-Gm-Message-State: AG10YOTWJnu3KSm9u4O9onFQWLmeZXe/n342SxfW1+1vvrKUbN2UqyNbvsoqg0m1wWKmjw== X-Received: by 10.37.15.130 with SMTP id 124mr1772834ybp.84.1454521110559; Wed, 03 Feb 2016 09:38:30 -0800 (PST) Received: from mail-yk0-f170.google.com (mail-yk0-f170.google.com. [209.85.160.170]) by smtp.gmail.com with ESMTPSA id d145sm3901603ywb.54.2016.02.03.09.38.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Feb 2016 09:38:30 -0800 (PST) Received: by mail-yk0-f170.google.com with SMTP id z13so25487028ykd.0; Wed, 03 Feb 2016 09:38:30 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.37.82.8 with SMTP id g8mr1741777ybb.91.1454521109974; Wed, 03 Feb 2016 09:38:29 -0800 (PST) Reply-To: cem@FreeBSD.org Received: by 10.37.4.23 with HTTP; Wed, 3 Feb 2016 09:38:29 -0800 (PST) In-Reply-To: <201602031431.u13EVNaL074412@repo.freebsd.org> References: <201602031431.u13EVNaL074412@repo.freebsd.org> Date: Wed, 3 Feb 2016 09:38:29 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r295209 - head/sys/fs/ext2fs From: Conrad Meyer To: "Pedro F. Giffuni" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 17:38:32 -0000 On Wed, Feb 3, 2016 at 6:31 AM, Pedro F. Giffuni wrote: > Author: pfg > Date: Wed Feb 3 14:31:23 2016 > New Revision: 295209 > URL: https://svnweb.freebsd.org/changeset/base/295209 > > Log: > Revert r294695: > ext2fs: passthrough any extra timestamps to the dinode struct. > > While it passed the classic testing, the change appears to have > caused some regression and still requires some more precautions. > > PR: 206820 What's the classic testing =E2=80=94 xfstests or something more/less thorou= gh? I was going to ask what the regression was, but then I noticed the PR numbe= r. Thanks, Conrad From owner-svn-src-all@freebsd.org Wed Feb 3 17:52:47 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09AB1A9777F for ; Wed, 3 Feb 2016 17:52:47 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm44-vm3.bullet.mail.bf1.yahoo.com (nm44-vm3.bullet.mail.bf1.yahoo.com [216.109.114.254]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD8AECC for ; Wed, 3 Feb 2016 17:52:46 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1454521959; bh=apMBUSl+LVlJ3e3CrYKA+FmGhlirLagcwNrdFpH/iyI=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=tgepzLfICW0XiTeTBoEuuJCdWPpfUBNoQqtCNlKON2NVq2dPAjmXyNjYnEjteoEFlfMlKmhCNH37SyDK/C9QkuXAy0SeuR7NbtC5TmWQh4SxdkVwSwKJ+FvkqgaEtwYnrUdhlC4GLmGcjsoH1ySIBrR89MI5yQJm3Bn9836Aj7o3tQdYAsTCyC7sLe+o3nbZV8iLj9afRI84DIRQhjJwU9oZdiGJF+lY1hVKGdp8/NeLW11v5t9jk0OfUf+qbtw8d6yXHU+6YYeRAIWq2/skNLMM3XVvH3+1lzyDhbZJLwRbv68r88/wZ+5ZV7nG/xRLnXDlEr2mgMBjR+jSCLDkgQ== Received: from [98.139.170.179] by nm44.bullet.mail.bf1.yahoo.com with NNFMP; 03 Feb 2016 17:52:39 -0000 Received: from [98.139.213.13] by tm22.bullet.mail.bf1.yahoo.com with NNFMP; 03 Feb 2016 17:52:39 -0000 Received: from [127.0.0.1] by smtp113.mail.bf1.yahoo.com with NNFMP; 03 Feb 2016 17:52:39 -0000 X-Yahoo-Newman-Id: 547531.64459.bm@smtp113.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 2CCt7uAVM1l0FO5WH_RtXhQjw0.sL28UB9GqmUODDNX7smT 45PVOot4BdmSAEbjWCv2hGEzGFFk0tP2y9eOlZCYhRiOdXJoFLQ7TjYQeYBN .W2X.sTp1I.WT6Olt7CvP5yhDesohNf73AmysUwPUvaUmu8yc1jaY9N35FMm Z6AVZZ00Ot2qOXEn3DvMIzjameS1P6cjRZA0p6DYjmIPOEYj0Pd2JYgTsOPa wqv6XMOukEpUE7xpHs9w2asCef13HAAf5mWnoVhblCSXnYrSELnAkNEoo20Y 1mxFmFSCPLyNGT3YkDMqVRdWi3YLIDAoR5s7t2VXxlb_GuPdGDTBI8i1JfUu MOnNELZb05FWAbqx3oizsnkGlD7PpioBOlHybZZP75vjllGfDZNXM5eMXBI1 PkuhPiJ9RMXHkKbo1suE0IrwEmf4tbwqzak9v944OjB2OV4MUCXk3mE1nBOJ akVcJpa8zlyObBH7B_vGL4duExBXBwIfhJ3kxV8wy9Pj0FVk6v57ZVgv_mqV RQrjGyQLx74C1CVHjJn9pnFmbleyITFwS X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r295209 - head/sys/fs/ext2fs To: cem@FreeBSD.org References: <201602031431.u13EVNaL074412@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Pedro Giffuni Message-ID: <56B23E69.5050006@FreeBSD.org> Date: Wed, 3 Feb 2016 12:52:41 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 17:52:47 -0000 On 02/03/16 12:38, Conrad Meyer wrote: > On Wed, Feb 3, 2016 at 6:31 AM, Pedro F. Giffuni wrote: >> Author: pfg >> Date: Wed Feb 3 14:31:23 2016 >> New Revision: 295209 >> URL: https://svnweb.freebsd.org/changeset/base/295209 >> >> Log: >> Revert r294695: >> ext2fs: passthrough any extra timestamps to the dinode struct. >> >> While it passed the classic testing, the change appears to have >> caused some regression and still requires some more precautions. >> >> PR: 206820 > > What's the classic testing — xfstests or something more/less thorough? > My regular testing is fsx and then build a port (cad/spice) on it. Other people have been running other tests like pho's testsuite so we usually catch anything. > I was going to ask what the regression was, but then I noticed the PR number. > Yeah, the error is related to the inode size: I only tested the default (256) which has no problems. Considering the upcoming release I just want to get the get this reverted and I'll worry about a real fix later. Pedro. From owner-svn-src-all@freebsd.org Wed Feb 3 18:10:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD89DA97D12; Wed, 3 Feb 2016 18:10:55 +0000 (UTC) (envelope-from peter@wemm.org) Received: from smtp2.wemm.org (smtp2.wemm.org [IPv6:2001:470:67:39d::78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C93C0B50; Wed, 3 Feb 2016 18:10:55 +0000 (UTC) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id 654A3A1D; Wed, 3 Feb 2016 10:10:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1454523055; bh=wOmVAUHGemnQPhu0sMmGJaalVj2Q01wtUIKnI1jQ/xM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=WuK6y91+Nk219+y9BIRDjy6HRH00sy3rVCg0Tp+fWok2CV9qX21NAy5LKiS+ziRT6 5/d7OdyrRAb6FO+sfJlRXNlpERu4BhWti/HFiFRcq6eVBIdygugAe9ZTLMMvD1kcDp tOUEC1gpJIjni05ietgH4N/SUTE2gabArmb9ghLo= From: Peter Wemm To: svn-src-head@freebsd.org Cc: Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r292206 - in head/contrib/unbound: . compat daemon dns64 dnstap doc iterator libunbound libunbound/python libunbound/python/doc libunbound/python/doc/modules libunbound/python/examples ... Date: Wed, 03 Feb 2016 10:10:51 -0800 Message-ID: <2289655.bjqHNzHbLI@overcee.wemm.org> User-Agent: KMail/4.14.3 (FreeBSD/11.0-CURRENT; KDE/4.14.3; amd64; ; ) In-Reply-To: <201512141301.tBED1pnR087993@repo.freebsd.org> References: <201512141301.tBED1pnR087993@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3968233.9TFDir0Csu"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 18:10:56 -0000 --nextPart3968233.9TFDir0Csu Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" On Monday, December 14, 2015 01:01:51 PM Dag-Erling Sm=F8rgrav wrote: > Author: des > Date: Mon Dec 14 13:01:51 2015 > New Revision: 292206 > URL: https://svnweb.freebsd.org/changeset/base/292206 >=20 > Log: > Upgrade to Unbound 1.5.7. >=20 > Added: > head/contrib/unbound/.gitignore > - copied unchanged from r292133, vendor/unbound/dist/.gitignore > head/contrib/unbound/compat/isblank.c > - copied unchanged from r292133, vendor/unbound/dist/compat/isbl= ank.c > Modified: > head/contrib/unbound/Makefile.in An error was introduced here that breaks some of the support scripts: @@ -107,16 +107,15 @@ fi =20 # create self-signed cert for server =2Dcat >request.cfg < request.cfg +echo "default_bits=3D$BITS\n" >> request.cfg +echo "default_md=3D$HASH\n" >> request.cfg +echo "prompt=3Dno\n" >> request.cfg +echo "distinguished_name=3Dreq_distinguished_name\n" >> request.cfg +echo "\n" >> request.cfg +echo "[req_distinguished_name]\n" >> request.cfg +echo "commonName=3D$SERVERNAME\n" >> request.cfg =20 =2D[req_distinguished_name] =2DcommonName=3D$SERVERNAME =2DEOF test -f request.cfg || error "could not create request.cfg" =20 echo "create $SVR_BASE.pem (self signed certificate)" @@ -125,16 +124,15 @@ openssl x509 -in $SVR_BASE.pem -addtrust serverAuth -out=20 $SVR_BASE"_trust.pem" =20 # create client request and sign it, piped =2Dcat >request.cfg < request.cfg +echo "default_bits=3D$BITS\n" >> request.cfg +echo "default_md=3D$HASH\n" >> request.cfg +echo "prompt=3Dno\n" >> request.cfg +echo "distinguished_name=3Dreq_distinguished_name\n" >> request.cfg +echo "\n" >> request.cfg +echo "[req_distinguished_name]\n" >> request.cfg +echo "commonName=3D$CLIENTNAME" >> request.cfg =20 =2D[req_distinguished_name] =2DcommonName=3D$CLIENTNAME =2DEOF test -f request.cfg || error "could not create request.cfg" =20 echo "create $CTL_BASE.pem (signed client certificate)" Whoever wrote this seems to have confused "echo" with "printf". All th= e=20 trailing "\n" lines cause an openssl error. In the cluster build I had= to=20 remove the "\n" and that was sufficient to bootstrap new instances agai= n. I suspect this error is harmless on bash. Unfortunately our environmen= t=20 cares. =2D-=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI= 6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 --nextPart3968233.9TFDir0Csu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJWskKrAAoJEDXWlwnsgJ4ESaQH/iRPiV8qr1kFmEBx3Ys3dnAD UCZ8vDg9piEW6ZRTyVBQ3BmkY5cNBZznRsI9G+TQdzcLFwX3yUCGGOyuWBp1NN9I jrAfJK6S3evyl9VYctnQL+lS6cSrXF3y+VdmNaObP2fcLsdSn/5TsZEQpHlACWGw 5J94KEM07Bcdd+oIScRxsRB9OO5T+8btCloqguT2ZfLMf0ltmjhM0Zn/Bwa32mLx /ltA3yme0nckBLNor9ft3sb2EYe4hQ95DcqocpcSSwQfp0uw5RCvrTBTs24CUos2 vygfRjs1J9OvME4bGtoWTcNj/AGokWQxeD1Fh10yLaCxz/gH+viNvsDQEeJKDmQ= =L5bg -----END PGP SIGNATURE----- --nextPart3968233.9TFDir0Csu-- From owner-svn-src-all@freebsd.org Wed Feb 3 18:19:42 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E82CA9A3A8; Wed, 3 Feb 2016 18:19:42 +0000 (UTC) (envelope-from peter@wemm.org) Received: from smtp2.wemm.org (smtp2.wemm.org [IPv6:2001:470:67:39d::78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 39EDC1309; Wed, 3 Feb 2016 18:19:42 +0000 (UTC) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id F2EABA2E; Wed, 3 Feb 2016 10:19:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1454523582; bh=//4+nICzjlB9YQjLa5F6bi8+xS6lu8D40c6NTybZCo8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=QF1u2P7kS7axO2axsMqsR2KqnBuo4YipSz1ravrhbspftfuVSOuu8V2/Rph6VQvjl fqKaGehPHhEWjOrk0NqblB2C76ikdp+80owowsZn1CITd+UK+OIGSvaCLp1seKAGHc 0wsNgKiWJBuCp7IlnXmMFTwaK05og9nuZdpKjhbU= From: Peter Wemm To: svn-src-all@freebsd.org Cc: svn-src-head@freebsd.org, src-committers@freebsd.org, Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= Subject: Re: svn commit: r292206 - in head/contrib/unbound: . compat daemon dns64 dnstap doc iterator libunbound libunbound/python libunbound/python/doc libunbound/python/doc/modules libunbound/python/examples ... Date: Wed, 03 Feb 2016 10:19:41 -0800 Message-ID: <4187957.tkjBAhizh6@overcee.wemm.org> User-Agent: KMail/4.14.3 (FreeBSD/11.0-CURRENT; KDE/4.14.3; amd64; ; ) In-Reply-To: <2289655.bjqHNzHbLI@overcee.wemm.org> References: <201512141301.tBED1pnR087993@repo.freebsd.org> <2289655.bjqHNzHbLI@overcee.wemm.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2063477.egdlyyyUCA"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 18:19:42 -0000 --nextPart2063477.egdlyyyUCA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" On Wednesday, February 03, 2016 10:10:51 AM Peter Wemm wrote: > On Monday, December 14, 2015 01:01:51 PM Dag-Erling Sm=F8rgrav wrote:= > > Author: des > > Date: Mon Dec 14 13:01:51 2015 > > New Revision: 292206 > > URL: https://svnweb.freebsd.org/changeset/base/292206 > >=20 > > Log: > > Upgrade to Unbound 1.5.7. > >=20 > > Added: > > head/contrib/unbound/.gitignore > > =20 > > - copied unchanged from r292133, vendor/unbound/dist/.gitignor= e > > =20 > > head/contrib/unbound/compat/isblank.c > > =20 > > - copied unchanged from r292133, vendor/unbound/dist/compat/is= blank.c > >=20 > > Modified: > > head/contrib/unbound/Makefile.in >=20 > An error was introduced here that breaks some of the support scripts:= >=20 > @@ -107,16 +107,15 @@ > fi >=20 > # create self-signed cert for server > -cat >request.cfg < -[req] > -default_bits=3D$BITS > -default_md=3D$HASH > -prompt=3Dno > -distinguished_name=3Dreq_distinguished_name > +echo "[req]\n" > request.cfg > +echo "default_bits=3D$BITS\n" >> request.cfg > +echo "default_md=3D$HASH\n" >> request.cfg > +echo "prompt=3Dno\n" >> request.cfg > +echo "distinguished_name=3Dreq_distinguished_name\n" >> request.cfg > +echo "\n" >> request.cfg > +echo "[req_distinguished_name]\n" >> request.cfg > +echo "commonName=3D$SERVERNAME\n" >> request.cfg >=20 > -[req_distinguished_name] > -commonName=3D$SERVERNAME > -EOF > test -f request.cfg || error "could not create request.cfg" >=20 > echo "create $SVR_BASE.pem (self signed certificate)" > @@ -125,16 +124,15 @@ > openssl x509 -in $SVR_BASE.pem -addtrust serverAuth -out > $SVR_BASE"_trust.pem" >=20 > # create client request and sign it, piped > -cat >request.cfg < -[req] > -default_bits=3D$BITS > -default_md=3D$HASH > -prompt=3Dno > -distinguished_name=3Dreq_distinguished_name > +echo "[req]\n" > request.cfg > +echo "default_bits=3D$BITS\n" >> request.cfg > +echo "default_md=3D$HASH\n" >> request.cfg > +echo "prompt=3Dno\n" >> request.cfg > +echo "distinguished_name=3Dreq_distinguished_name\n" >> request.cfg > +echo "\n" >> request.cfg > +echo "[req_distinguished_name]\n" >> request.cfg > +echo "commonName=3D$CLIENTNAME" >> request.cfg >=20 > -[req_distinguished_name] > -commonName=3D$CLIENTNAME > -EOF > test -f request.cfg || error "could not create request.cfg" >=20 > echo "create $CTL_BASE.pem (signed client certificate)" >=20 > Whoever wrote this seems to have confused "echo" with "printf". All = the > trailing "\n" lines cause an openssl error. In the cluster build I h= ad to > remove the "\n" and that was sufficient to bootstrap new instances ag= ain. Filed as https://bugs.freebsd.org/206887 =2D-=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI= 6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 --nextPart2063477.egdlyyyUCA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJWskS9AAoJEDXWlwnsgJ4EyakH/itQjRhzCQOc9XYzWJBkjCXk OkXwbogkkNPbbVftphkyCqf8lbpZRaQRR9xfUngcBU1KQpbxfcpofaMsmTmWxDAP mH9hjHt2+KZOtRDhuj/reCTkQSUylpU44ugKGILHui+lz0N4iNOPuv+E/RxQi3y7 y9R7fIKpu/pjTfVvyEhxUCqG670HxCf/WCSPtnK0JhZyGvB66n2/cOy38KWGPDt3 yl4cBw6jOxvYY6ggNqSsqCbmu5njywVf5Abxjl4iDMRdHexHjUmfGZCu6lE020bg s0LKtMRGS3ixc9Wg6/588yQtoqqk6/MIh1EnI49iWEiPg57lK9jgsmKjPrRlWq8= =/pe/ -----END PGP SIGNATURE----- --nextPart2063477.egdlyyyUCA-- From owner-svn-src-all@freebsd.org Wed Feb 3 20:24:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C423A9BA5B; Wed, 3 Feb 2016 20:24:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F0911B12; Wed, 3 Feb 2016 20:24:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u13KOL0a079138; Wed, 3 Feb 2016 20:24:21 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u13KOLW4079137; Wed, 3 Feb 2016 20:24:21 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201602032024.u13KOLW4079137@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 3 Feb 2016 20:24:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295217 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 20:24:23 -0000 Author: bdrewery Date: Wed Feb 3 20:24:21 2016 New Revision: 295217 URL: https://svnweb.freebsd.org/changeset/base/295217 Log: Deduplicate distrib-dirs logic from r289086 in distribution. This does it correctly this time, rather than the incorrect version in r295167. Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Feb 3 19:08:45 2016 (r295216) +++ head/Makefile.inc1 Wed Feb 3 20:24:21 2016 (r295217) @@ -1083,16 +1083,14 @@ redistribute: .MAKE .PHONY DISTRIBUTION=lib32 .endif -distrib-dirs: .MAKE .PHONY - ${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ - ${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET} - -distribution: .MAKE .PHONY +distrib-dirs distribution: .MAKE .PHONY ${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ ${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET} +.if make(distribution) ${_+_}cd ${.CURDIR}; ${CROSSENV} PATH=${TMPPATH} \ ${MAKE} -f Makefile.inc1 ${IMAKE_INSTALL} \ METALOG=${METALOG} installconfig +.endif # # buildkernel and installkernel From owner-svn-src-all@freebsd.org Wed Feb 3 20:39:54 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 680F6A9BDD9; Wed, 3 Feb 2016 20:39:54 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 339F11163; Wed, 3 Feb 2016 20:39:54 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u13Kdrx7082308; Wed, 3 Feb 2016 20:39:53 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u13KdrG9082307; Wed, 3 Feb 2016 20:39:53 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201602032039.u13KdrG9082307@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 3 Feb 2016 20:39:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295218 - head/sys/dev/cxgb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 20:39:54 -0000 Author: glebius Date: Wed Feb 3 20:39:52 2016 New Revision: 295218 URL: https://svnweb.freebsd.org/changeset/base/295218 Log: Fix inverse logic. If this is zone_pack, then we shouldn't free the cluster ourselves. Found by review. Since this code is !386 and !amd64 and is executed on error path, pretty sure no one ever executed it. Modified: head/sys/dev/cxgb/cxgb_sge.c Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Wed Feb 3 20:24:21 2016 (r295217) +++ head/sys/dev/cxgb/cxgb_sge.c Wed Feb 3 20:39:52 2016 (r295218) @@ -738,7 +738,7 @@ refill_fl(adapter_t *sc, struct sge_fl * cl, q->buf_size, refill_fl_cb, &cb_arg, 0); if (err != 0 || cb_arg.error) { - if (q->zone == zone_pack) + if (q->zone != zone_pack) uma_zfree(q->zone, cl); m_free(m); goto done; From owner-svn-src-all@freebsd.org Wed Feb 3 22:02:38 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C81BA9A41D; Wed, 3 Feb 2016 22:02:38 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB1C81158; Wed, 3 Feb 2016 22:02:37 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u13M2a11010212; Wed, 3 Feb 2016 22:02:36 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u13M2avs010208; Wed, 3 Feb 2016 22:02:36 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201602032202.u13M2avs010208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 3 Feb 2016 22:02:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295221 - in head/sys: kern vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 22:02:38 -0000 Author: glebius Date: Wed Feb 3 22:02:36 2016 New Revision: 295221 URL: https://svnweb.freebsd.org/changeset/base/295221 Log: Move uma_dbg_alloc() and uma_dbg_free() into uma_core.c, which allows to make uma_dbg.h not depend on uma_int.h, which allows to uninclude uma_int.h from the mbuf(9) allocator. Modified: head/sys/kern/kern_mbuf.c head/sys/vm/uma_core.c head/sys/vm/uma_dbg.c head/sys/vm/uma_dbg.h Modified: head/sys/kern/kern_mbuf.c ============================================================================== --- head/sys/kern/kern_mbuf.c Wed Feb 3 21:56:51 2016 (r295220) +++ head/sys/kern/kern_mbuf.c Wed Feb 3 22:02:36 2016 (r295221) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include /* Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Wed Feb 3 21:56:51 2016 (r295220) +++ head/sys/vm/uma_core.c Wed Feb 3 22:02:36 2016 (r295221) @@ -275,6 +275,11 @@ void uma_print_stats(void); static int sysctl_vm_zone_count(SYSCTL_HANDLER_ARGS); static int sysctl_vm_zone_stats(SYSCTL_HANDLER_ARGS); +#ifdef INVARIANTS +static void uma_dbg_free(uma_zone_t zone, uma_slab_t slab, void *item); +static void uma_dbg_alloc(uma_zone_t zone, uma_slab_t slab, void *item); +#endif + SYSINIT(uma_startup3, SI_SUB_VM_CONF, SI_ORDER_SECOND, uma_startup3, NULL); SYSCTL_PROC(_vm, OID_AUTO, zone_count, CTLFLAG_RD|CTLTYPE_INT, @@ -3607,6 +3612,102 @@ sysctl_handle_uma_zone_cur(SYSCTL_HANDLE return (sysctl_handle_int(oidp, &cur, 0, req)); } +#ifdef INVARIANTS +static uma_slab_t +uma_dbg_getslab(uma_zone_t zone, void *item) +{ + uma_slab_t slab; + uma_keg_t keg; + uint8_t *mem; + + mem = (uint8_t *)((uintptr_t)item & (~UMA_SLAB_MASK)); + if (zone->uz_flags & UMA_ZONE_VTOSLAB) { + slab = vtoslab((vm_offset_t)mem); + } else { + /* + * It is safe to return the slab here even though the + * zone is unlocked because the item's allocation state + * essentially holds a reference. + */ + ZONE_LOCK(zone); + keg = LIST_FIRST(&zone->uz_kegs)->kl_keg; + if (keg->uk_flags & UMA_ZONE_HASH) + slab = hash_sfind(&keg->uk_hash, mem); + else + slab = (uma_slab_t)(mem + keg->uk_pgoff); + ZONE_UNLOCK(zone); + } + + return (slab); +} + +/* + * Set up the slab's freei data such that uma_dbg_free can function. + * + */ +static void +uma_dbg_alloc(uma_zone_t zone, uma_slab_t slab, void *item) +{ + uma_keg_t keg; + int freei; + + if (zone_first_keg(zone) == NULL) + return; + if (slab == NULL) { + slab = uma_dbg_getslab(zone, item); + if (slab == NULL) + panic("uma: item %p did not belong to zone %s\n", + item, zone->uz_name); + } + keg = slab->us_keg; + freei = ((uintptr_t)item - (uintptr_t)slab->us_data) / keg->uk_rsize; + + if (BIT_ISSET(SLAB_SETSIZE, freei, &slab->us_debugfree)) + panic("Duplicate alloc of %p from zone %p(%s) slab %p(%d)\n", + item, zone, zone->uz_name, slab, freei); + BIT_SET_ATOMIC(SLAB_SETSIZE, freei, &slab->us_debugfree); + + return; +} + +/* + * Verifies freed addresses. Checks for alignment, valid slab membership + * and duplicate frees. + * + */ +static void +uma_dbg_free(uma_zone_t zone, uma_slab_t slab, void *item) +{ + uma_keg_t keg; + int freei; + + if (zone_first_keg(zone) == NULL) + return; + if (slab == NULL) { + slab = uma_dbg_getslab(zone, item); + if (slab == NULL) + panic("uma: Freed item %p did not belong to zone %s\n", + item, zone->uz_name); + } + keg = slab->us_keg; + freei = ((uintptr_t)item - (uintptr_t)slab->us_data) / keg->uk_rsize; + + if (freei >= keg->uk_ipers) + panic("Invalid free of %p from zone %p(%s) slab %p(%d)\n", + item, zone, zone->uz_name, slab, freei); + + if (((freei * keg->uk_rsize) + slab->us_data) != item) + panic("Unaligned free of %p from zone %p(%s) slab %p(%d)\n", + item, zone, zone->uz_name, slab, freei); + + if (!BIT_ISSET(SLAB_SETSIZE, freei, &slab->us_debugfree)) + panic("Duplicate free of %p from zone %p(%s) slab %p(%d)\n", + item, zone, zone->uz_name, slab, freei); + + BIT_CLR_ATOMIC(SLAB_SETSIZE, freei, &slab->us_debugfree); +} +#endif /* INVARIANTS */ + #ifdef DDB DB_SHOW_COMMAND(uma, db_show_uma) { @@ -3664,4 +3765,4 @@ DB_SHOW_COMMAND(umacache, db_show_umacac return; } } -#endif +#endif /* DDB */ Modified: head/sys/vm/uma_dbg.c ============================================================================== --- head/sys/vm/uma_dbg.c Wed Feb 3 21:56:51 2016 (r295220) +++ head/sys/vm/uma_dbg.c Wed Feb 3 22:02:36 2016 (r295221) @@ -196,100 +196,3 @@ mtrash_fini(void *mem, int size) { (void)mtrash_ctor(mem, size, NULL, 0); } - -#ifdef INVARIANTS -static uma_slab_t -uma_dbg_getslab(uma_zone_t zone, void *item) -{ - uma_slab_t slab; - uma_keg_t keg; - uint8_t *mem; - - mem = (uint8_t *)((uintptr_t)item & (~UMA_SLAB_MASK)); - if (zone->uz_flags & UMA_ZONE_VTOSLAB) { - slab = vtoslab((vm_offset_t)mem); - } else { - /* - * It is safe to return the slab here even though the - * zone is unlocked because the item's allocation state - * essentially holds a reference. - */ - ZONE_LOCK(zone); - keg = LIST_FIRST(&zone->uz_kegs)->kl_keg; - if (keg->uk_flags & UMA_ZONE_HASH) - slab = hash_sfind(&keg->uk_hash, mem); - else - slab = (uma_slab_t)(mem + keg->uk_pgoff); - ZONE_UNLOCK(zone); - } - - return (slab); -} - -/* - * Set up the slab's freei data such that uma_dbg_free can function. - * - */ -void -uma_dbg_alloc(uma_zone_t zone, uma_slab_t slab, void *item) -{ - uma_keg_t keg; - int freei; - - if (zone_first_keg(zone) == NULL) - return; - if (slab == NULL) { - slab = uma_dbg_getslab(zone, item); - if (slab == NULL) - panic("uma: item %p did not belong to zone %s\n", - item, zone->uz_name); - } - keg = slab->us_keg; - freei = ((uintptr_t)item - (uintptr_t)slab->us_data) / keg->uk_rsize; - - if (BIT_ISSET(SLAB_SETSIZE, freei, &slab->us_debugfree)) - panic("Duplicate alloc of %p from zone %p(%s) slab %p(%d)\n", - item, zone, zone->uz_name, slab, freei); - BIT_SET_ATOMIC(SLAB_SETSIZE, freei, &slab->us_debugfree); - - return; -} - -/* - * Verifies freed addresses. Checks for alignment, valid slab membership - * and duplicate frees. - * - */ -void -uma_dbg_free(uma_zone_t zone, uma_slab_t slab, void *item) -{ - uma_keg_t keg; - int freei; - - if (zone_first_keg(zone) == NULL) - return; - if (slab == NULL) { - slab = uma_dbg_getslab(zone, item); - if (slab == NULL) - panic("uma: Freed item %p did not belong to zone %s\n", - item, zone->uz_name); - } - keg = slab->us_keg; - freei = ((uintptr_t)item - (uintptr_t)slab->us_data) / keg->uk_rsize; - - if (freei >= keg->uk_ipers) - panic("Invalid free of %p from zone %p(%s) slab %p(%d)\n", - item, zone, zone->uz_name, slab, freei); - - if (((freei * keg->uk_rsize) + slab->us_data) != item) - panic("Unaligned free of %p from zone %p(%s) slab %p(%d)\n", - item, zone, zone->uz_name, slab, freei); - - if (!BIT_ISSET(SLAB_SETSIZE, freei, &slab->us_debugfree)) - panic("Duplicate free of %p from zone %p(%s) slab %p(%d)\n", - item, zone, zone->uz_name, slab, freei); - - BIT_CLR_ATOMIC(SLAB_SETSIZE, freei, &slab->us_debugfree); -} - -#endif /* INVARIANTS */ Modified: head/sys/vm/uma_dbg.h ============================================================================== --- head/sys/vm/uma_dbg.h Wed Feb 3 21:56:51 2016 (r295220) +++ head/sys/vm/uma_dbg.h Wed Feb 3 22:02:36 2016 (r295221) @@ -49,7 +49,4 @@ void mtrash_dtor(void *mem, int size, vo int mtrash_init(void *mem, int size, int flags); void mtrash_fini(void *mem, int size); -void uma_dbg_free(uma_zone_t zone, uma_slab_t slab, void *item); -void uma_dbg_alloc(uma_zone_t zone, uma_slab_t slab, void *item); - #endif /* VM_UMA_DBG_H */ From owner-svn-src-all@freebsd.org Wed Feb 3 23:30:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0A0AA9BCDE; Wed, 3 Feb 2016 23:30:19 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A000A1135; Wed, 3 Feb 2016 23:30:19 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u13NUIAY034780; Wed, 3 Feb 2016 23:30:18 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u13NUHiE034771; Wed, 3 Feb 2016 23:30:17 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201602032330.u13NUHiE034771@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 3 Feb 2016 23:30:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295222 - in head/sys: amd64/amd64 kern vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 23:30:20 -0000 Author: glebius Date: Wed Feb 3 23:30:17 2016 New Revision: 295222 URL: https://svnweb.freebsd.org/changeset/base/295222 Log: Redo r292484. Embed task(9) into zone, so that uz_maxaction is called in a context that can sleep, allowing consumers of the KPI to run their drain routines without any extra measures. Discussed with: jtl Modified: head/sys/amd64/amd64/uma_machdep.c head/sys/kern/kern_malloc.c head/sys/kern/kern_mbuf.c head/sys/vm/memguard.c head/sys/vm/uma.h head/sys/vm/uma_core.c head/sys/vm/uma_dbg.c head/sys/vm/uma_int.h head/sys/vm/vm_page.c Modified: head/sys/amd64/amd64/uma_machdep.c ============================================================================== --- head/sys/amd64/amd64/uma_machdep.c Wed Feb 3 22:02:36 2016 (r295221) +++ head/sys/amd64/amd64/uma_machdep.c Wed Feb 3 23:30:17 2016 (r295222) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/kern/kern_malloc.c ============================================================================== --- head/sys/kern/kern_malloc.c Wed Feb 3 22:02:36 2016 (r295221) +++ head/sys/kern/kern_malloc.c Wed Feb 3 23:30:17 2016 (r295222) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/kern/kern_mbuf.c ============================================================================== --- head/sys/kern/kern_mbuf.c Wed Feb 3 22:02:36 2016 (r295221) +++ head/sys/kern/kern_mbuf.c Wed Feb 3 23:30:17 2016 (r295222) @@ -274,12 +274,6 @@ uma_zone_t zone_jumbo16; uma_zone_t zone_ext_refcnt; /* - * Callout to assist us in freeing mbufs. - */ -static struct callout mb_reclaim_callout; -static struct mtx mb_reclaim_callout_mtx; - -/* * Local prototypes. */ static int mb_ctor_mbuf(void *, int, void *, int); @@ -291,9 +285,8 @@ static void mb_dtor_pack(void *, int, vo static int mb_zinit_pack(void *, int, int); static void mb_zfini_pack(void *, int); -static void mb_reclaim(void *); +static void mb_reclaim(uma_zone_t, int); static void *mbuf_jumbo_alloc(uma_zone_t, vm_size_t, uint8_t *, int); -static void mb_maxaction(uma_zone_t); /* Ensure that MSIZE is a power of 2. */ CTASSERT((((MSIZE - 1) ^ MSIZE) + 1) >> 1 == MSIZE); @@ -319,7 +312,7 @@ mbuf_init(void *dummy) if (nmbufs > 0) nmbufs = uma_zone_set_max(zone_mbuf, nmbufs); uma_zone_set_warning(zone_mbuf, "kern.ipc.nmbufs limit reached"); - uma_zone_set_maxaction(zone_mbuf, mb_maxaction); + uma_zone_set_maxaction(zone_mbuf, mb_reclaim); zone_clust = uma_zcreate(MBUF_CLUSTER_MEM_NAME, MCLBYTES, mb_ctor_clust, mb_dtor_clust, @@ -332,7 +325,7 @@ mbuf_init(void *dummy) if (nmbclusters > 0) nmbclusters = uma_zone_set_max(zone_clust, nmbclusters); uma_zone_set_warning(zone_clust, "kern.ipc.nmbclusters limit reached"); - uma_zone_set_maxaction(zone_clust, mb_maxaction); + uma_zone_set_maxaction(zone_clust, mb_reclaim); zone_pack = uma_zsecond_create(MBUF_PACKET_MEM_NAME, mb_ctor_pack, mb_dtor_pack, mb_zinit_pack, mb_zfini_pack, zone_mbuf); @@ -349,7 +342,7 @@ mbuf_init(void *dummy) if (nmbjumbop > 0) nmbjumbop = uma_zone_set_max(zone_jumbop, nmbjumbop); uma_zone_set_warning(zone_jumbop, "kern.ipc.nmbjumbop limit reached"); - uma_zone_set_maxaction(zone_jumbop, mb_maxaction); + uma_zone_set_maxaction(zone_jumbop, mb_reclaim); zone_jumbo9 = uma_zcreate(MBUF_JUMBO9_MEM_NAME, MJUM9BYTES, mb_ctor_clust, mb_dtor_clust, @@ -363,7 +356,7 @@ mbuf_init(void *dummy) if (nmbjumbo9 > 0) nmbjumbo9 = uma_zone_set_max(zone_jumbo9, nmbjumbo9); uma_zone_set_warning(zone_jumbo9, "kern.ipc.nmbjumbo9 limit reached"); - uma_zone_set_maxaction(zone_jumbo9, mb_maxaction); + uma_zone_set_maxaction(zone_jumbo9, mb_reclaim); zone_jumbo16 = uma_zcreate(MBUF_JUMBO16_MEM_NAME, MJUM16BYTES, mb_ctor_clust, mb_dtor_clust, @@ -377,20 +370,13 @@ mbuf_init(void *dummy) if (nmbjumbo16 > 0) nmbjumbo16 = uma_zone_set_max(zone_jumbo16, nmbjumbo16); uma_zone_set_warning(zone_jumbo16, "kern.ipc.nmbjumbo16 limit reached"); - uma_zone_set_maxaction(zone_jumbo16, mb_maxaction); + uma_zone_set_maxaction(zone_jumbo16, mb_reclaim); zone_ext_refcnt = uma_zcreate(MBUF_EXTREFCNT_MEM_NAME, sizeof(u_int), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_ZINIT); - /* uma_prealloc() goes here... */ - - /* Initialize the mb_reclaim() callout. */ - mtx_init(&mb_reclaim_callout_mtx, "mb_reclaim_callout_mtx", NULL, - MTX_DEF); - callout_init(&mb_reclaim_callout, 1); - /* * Hook event handler for low-memory situation, used to * drain protocols and push data back to the caches (UMA @@ -677,81 +663,23 @@ m_pkthdr_init(struct mbuf *m, int how) } /* - * This is the protocol drain routine. + * This is the protocol drain routine. Called by UMA whenever any of the + * mbuf zones is closed to its limit. * * No locks should be held when this is called. The drain routines have to * presently acquire some locks which raises the possibility of lock order * reversal. */ static void -mb_reclaim(void *junk) +mb_reclaim(uma_zone_t zone __unused, int pending __unused) { struct domain *dp; struct protosw *pr; - WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK | WARN_PANIC, NULL, - "mb_reclaim()"); + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK | WARN_PANIC, NULL, __func__); for (dp = domains; dp != NULL; dp = dp->dom_next) for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++) if (pr->pr_drain != NULL) (*pr->pr_drain)(); } - -/* - * This is the function called by the mb_reclaim_callout, which is - * used when we hit the maximum for a zone. - * - * (See mb_maxaction() below.) - */ -static void -mb_reclaim_timer(void *junk __unused) -{ - - mtx_lock(&mb_reclaim_callout_mtx); - - /* - * Avoid running this function extra times by skipping this invocation - * if the callout has already been rescheduled. - */ - if (callout_pending(&mb_reclaim_callout) || - !callout_active(&mb_reclaim_callout)) { - mtx_unlock(&mb_reclaim_callout_mtx); - return; - } - mtx_unlock(&mb_reclaim_callout_mtx); - - mb_reclaim(NULL); - - mtx_lock(&mb_reclaim_callout_mtx); - callout_deactivate(&mb_reclaim_callout); - mtx_unlock(&mb_reclaim_callout_mtx); -} - -/* - * This function is called when we hit the maximum for a zone. - * - * At that point, we want to call the protocol drain routine to free up some - * mbufs. However, we will use the callout routines to schedule this to - * occur in another thread. (The thread calling this function holds the - * zone lock.) - */ -static void -mb_maxaction(uma_zone_t zone __unused) -{ - - /* - * If we can't immediately obtain the lock, either the callout - * is currently running, or another thread is scheduling the - * callout. - */ - if (!mtx_trylock(&mb_reclaim_callout_mtx)) - return; - - /* If not already scheduled/running, schedule the callout. */ - if (!callout_active(&mb_reclaim_callout)) { - callout_reset(&mb_reclaim_callout, 1, mb_reclaim_timer, NULL); - } - - mtx_unlock(&mb_reclaim_callout_mtx); -} Modified: head/sys/vm/memguard.c ============================================================================== --- head/sys/vm/memguard.c Wed Feb 3 22:02:36 2016 (r295221) +++ head/sys/vm/memguard.c Wed Feb 3 23:30:17 2016 (r295222) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/vm/uma.h ============================================================================== --- head/sys/vm/uma.h Wed Feb 3 22:02:36 2016 (r295221) +++ head/sys/vm/uma.h Wed Feb 3 23:30:17 2016 (r295222) @@ -530,7 +530,7 @@ void uma_zone_set_warning(uma_zone_t zon * Returns: * Nothing */ -typedef void (*uma_maxaction_t)(uma_zone_t); +typedef void (*uma_maxaction_t)(uma_zone_t, int); void uma_zone_set_maxaction(uma_zone_t zone, uma_maxaction_t); /* Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Wed Feb 3 22:02:36 2016 (r295221) +++ head/sys/vm/uma_core.c Wed Feb 3 23:30:17 2016 (r295222) @@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -439,8 +440,9 @@ zone_log_warning(uma_zone_t zone) static inline void zone_maxaction(uma_zone_t zone) { - if (zone->uz_maxaction) - (*zone->uz_maxaction)(zone); + + if (zone->uz_maxaction.ta_func != NULL) + taskqueue_enqueue(taskqueue_thread, &zone->uz_maxaction); } static void @@ -1590,7 +1592,6 @@ zone_ctor(void *mem, int size, void *uda zone->uz_flags = 0; zone->uz_warning = NULL; timevalclear(&zone->uz_ratecheck); - zone->uz_maxaction = NULL; keg = arg->keg; ZONE_LOCK_INIT(zone, (arg->flags & UMA_ZONE_MTXCLASS)); @@ -3027,7 +3028,7 @@ uma_zone_set_maxaction(uma_zone_t zone, { ZONE_LOCK(zone); - zone->uz_maxaction = maxaction; + TASK_INIT(&zone->uz_maxaction, 0, (task_fn_t *)maxaction, zone); ZONE_UNLOCK(zone); } Modified: head/sys/vm/uma_dbg.c ============================================================================== --- head/sys/vm/uma_dbg.c Wed Feb 3 22:02:36 2016 (r295221) +++ head/sys/vm/uma_dbg.c Wed Feb 3 23:30:17 2016 (r295222) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Wed Feb 3 22:02:36 2016 (r295221) +++ head/sys/vm/uma_int.h Wed Feb 3 23:30:17 2016 (r295222) @@ -307,7 +307,7 @@ struct uma_zone { const char *uz_warning; /* Warning to print on failure */ struct timeval uz_ratecheck; /* Warnings rate-limiting */ - uma_maxaction_t uz_maxaction; /* Function to run when at limit */ + struct task uz_maxaction; /* Task to run when at limit */ /* * This HAS to be the last item because we adjust the zone size Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Wed Feb 3 22:02:36 2016 (r295221) +++ head/sys/vm/vm_page.c Wed Feb 3 23:30:17 2016 (r295222) @@ -102,6 +102,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include From owner-svn-src-all@freebsd.org Wed Feb 3 23:37:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DDD4A9BF10; Wed, 3 Feb 2016 23:37:16 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E18661604; Wed, 3 Feb 2016 23:37:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u13NbElD037613; Wed, 3 Feb 2016 23:37:14 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u13NbELu037612; Wed, 3 Feb 2016 23:37:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201602032337.u13NbELu037612@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 3 Feb 2016 23:37:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295223 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 23:37:16 -0000 Author: bdrewery Date: Wed Feb 3 23:37:14 2016 New Revision: 295223 URL: https://svnweb.freebsd.org/changeset/base/295223 Log: Don't let NLSLINKS contain itself. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.nls.mk Modified: head/share/mk/bsd.nls.mk ============================================================================== --- head/share/mk/bsd.nls.mk Wed Feb 3 23:30:17 2016 (r295222) +++ head/share/mk/bsd.nls.mk Wed Feb 3 23:37:14 2016 (r295223) @@ -73,6 +73,9 @@ SYMLINKS+= ${NLSSYMLINKS} .for file in ${NLS} NLSNAME_${file:T}= ${file:T:R}/${NLSNAME}.cat .if defined(NLSLINKS_${file:R}) && !empty(NLSLINKS_${file:R}) +.if !empty(NLSLINKS_${file:R}:M${file:R}) +.error NLSLINKS_${file:R} contains itself: ${file:R} +.endif NLSLINKS+= ${file:R} .endif .for dst in ${NLSLINKS_${file:R}} From owner-svn-src-all@freebsd.org Wed Feb 3 23:37:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69A40A9BF34; Wed, 3 Feb 2016 23:37:26 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34FE21845; Wed, 3 Feb 2016 23:37:26 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u13NbP4L037664; Wed, 3 Feb 2016 23:37:25 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u13NbPnH037663; Wed, 3 Feb 2016 23:37:25 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201602032337.u13NbPnH037663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 3 Feb 2016 23:37:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295224 - head/bin/csh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 23:37:26 -0000 Author: bdrewery Date: Wed Feb 3 23:37:24 2016 New Revision: 295224 URL: https://svnweb.freebsd.org/changeset/base/295224 Log: Don't link /usr/share/nls/de_DE.UTF-8/tcsh.cat to itself. Sponsored by: EMC / Isilon Storage Division Modified: head/bin/csh/Makefile Modified: head/bin/csh/Makefile ============================================================================== --- head/bin/csh/Makefile Wed Feb 3 23:37:14 2016 (r295223) +++ head/bin/csh/Makefile Wed Feb 3 23:37:24 2016 (r295224) @@ -62,7 +62,7 @@ CATALOGS= et:et_EE.UTF-8 \ spanish:es_ES.UTF-8 \ ukrainian:uk_UA.UTF-8 -NLSLINKS_de_DE.UTF-8 = de_AT.UTF-8 de_CH.UTF-8 de_DE.UTF-8 +NLSLINKS_de_DE.UTF-8 = de_AT.UTF-8 de_CH.UTF-8 NLSLINKS_fr_FR.UTF-8 = fr_BE.UTF-8 fr_CA.UTF-8 fr_CH.UTF-8 NLSLINKS_it_IT.UTF-8 = it_CH.UTF-8 From owner-svn-src-all@freebsd.org Wed Feb 3 23:38:07 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BB33A9BFCF; Wed, 3 Feb 2016 23:38:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 7EC1E1A29; Wed, 3 Feb 2016 23:38:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 75B751844; Wed, 3 Feb 2016 23:38:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 2353515320; Wed, 3 Feb 2016 23:38:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id EuzT8aMOQmha; Wed, 3 Feb 2016 23:38:04 +0000 (UTC) Subject: Re: svn commit: r295204 - head/bin/csh DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 43F571531B To: Hajimu UMEMOTO , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201602031144.u13BihpW025093@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <56B28F68.803@FreeBSD.org> Date: Wed, 3 Feb 2016 15:38:16 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <201602031144.u13BihpW025093@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eaeWakRL34rJvmSHEC5aBor4CUDSbEF7o" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 23:38:07 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --eaeWakRL34rJvmSHEC5aBor4CUDSbEF7o Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2/3/2016 3:44 AM, Hajimu UMEMOTO wrote: > Author: ume > Date: Wed Feb 3 11:44:43 2016 > New Revision: 295204 > URL: https://svnweb.freebsd.org/changeset/base/295204 >=20 > Log: > The charset of NLS catalogs were converted to UTF-8 > since r231990. >=20 > Modified: > head/bin/csh/Makefile >=20 > Modified: head/bin/csh/Makefile > =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/bin/csh/Makefile Wed Feb 3 11:41:55 2016 (r295203) > +++ head/bin/csh/Makefile Wed Feb 3 11:44:43 2016 (r295204) > @@ -51,41 +51,40 @@ FILESDIR=3D ${SHAREDIR}/examples/tcsh > FILES=3D complete.tcsh csh-mode.el > .endif > =20 > -CATALOGS=3D et:et_EE.ISO8859-15 \ > - finnish:fi_FI.ISO8859-1 \ > - french:fr_FR.ISO8859-1 \ > - german:de_DE.ISO8859-1 \ > - greek:el_GR.ISO8859-7 \ > - italian:it_IT.ISO8859-1 \ > - ja:ja_JP.eucJP \ > - russian:ru_RU.KOI8-R \ > - spanish:es_ES.ISO8859-1 \ > - ukrainian:uk_UA.KOI8-U > - > -NLSLINKS_fi_FI.ISO8859-1=3D fi_FI.ISO8859-15 > -NLSLINKS_fr_FR.ISO8859-1=3D fr_BE.ISO8859-1 fr_BE.ISO8859-15 \ > - fr_CA.ISO8859-1 fr_CA.ISO8859-15 fr_CH.ISO8859-1 \ > - fr_CH.ISO8859-15 fr_FR.ISO8859-15 > -NLSLINKS_de_DE.ISO8859-1=3D de_AT.ISO8859-1 de_AT.ISO8859-15 de_CH.ISO= 8859-1 \ > - de_CH.ISO8859-15 de_DE.ISO8859-15 > -NLSLINKS_it_IT.ISO8859-1=3D it_CH.ISO8859-1 it_CH.ISO8859-15 it_IT.ISO= 8859-15 > -NLSLINKS_es_ES.ISO8859-1=3D es_ES.ISO8859-15 > +CATALOGS=3D et:et_EE.UTF-8 \ > + finnish:fi_FI.UTF-8 \ > + french:fr_FR.UTF-8 \ > + german:de_DE.UTF-8 \ > + greek:el_GR.UTF-8 \ > + italian:it_IT.UTF-8 \ > + ja:ja_JP.UTF-8 \ > + russian:ru_RU.UTF-8 \ > + spanish:es_ES.UTF-8 \ > + ukrainian:uk_UA.UTF-8 > + > +NLSLINKS_de_DE.UTF-8 =3D de_AT.UTF-8 de_CH.UTF-8 de_DE.UTF-8 This is linking /usr/share/nls/de_DE.UTF-8/tcsh.cat to itself. I removed that in r295224. I'm not sure if it should be linked to something else though. --=20 Regards, Bryan Drewery --eaeWakRL34rJvmSHEC5aBor4CUDSbEF7o Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWso9oAAoJEDXXcbtuRpfPuzQH/1UEgKbAjZIAPcCx22h4p8Df q1RG7XuXnh53E+mHZBoKmQiLjovMS8xa9Koe81tmrF2Sr4gNW0qLQVUxfax2YVIi qF3+ZkJuLeswcSEPSTzjOsN6J1J06K7ICd1K5RZ4WQFnq9uaG2zZU/CCBJk+y8qn KyJjOKRd/n3ce/IA3wI2ybYvOv73v8O+Gpny+FYioTpbC8f7q8zQ4jLZOR1QABNE NJaE1dGZVp1aJvGSWnk5rhzD2bODgA0ImFl/6i+RKGdmJLegbjoee2b25InRz3ZV aqIQL4cA2lTYkDwxfWUAQCBZWxWzpqRrjWd/fonf9uLhJn6qmF1tPBzFQeMfmBk= =/y6G -----END PGP SIGNATURE----- --eaeWakRL34rJvmSHEC5aBor4CUDSbEF7o-- From owner-svn-src-all@freebsd.org Thu Feb 4 00:23:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20E18A9B274; Thu, 4 Feb 2016 00:23:23 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4383287; Thu, 4 Feb 2016 00:23:22 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u140NLMc052393; Thu, 4 Feb 2016 00:23:21 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u140NL0i052392; Thu, 4 Feb 2016 00:23:21 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201602040023.u140NL0i052392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 4 Feb 2016 00:23:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295226 - head/lib/libmemstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 00:23:23 -0000 Author: glebius Date: Thu Feb 4 00:23:21 2016 New Revision: 295226 URL: https://svnweb.freebsd.org/changeset/base/295226 Log: Fix build. Modified: head/lib/libmemstat/memstat_uma.c Modified: head/lib/libmemstat/memstat_uma.c ============================================================================== --- head/lib/libmemstat/memstat_uma.c Wed Feb 3 23:41:58 2016 (r295225) +++ head/lib/libmemstat/memstat_uma.c Thu Feb 4 00:23:21 2016 (r295226) @@ -29,6 +29,7 @@ #include #include #include +#include #include #include From owner-svn-src-all@freebsd.org Thu Feb 4 00:41:17 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32A25A9B7DB; Thu, 4 Feb 2016 00:41:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 2097FD5C; Thu, 4 Feb 2016 00:41:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 18A3F17CD; Thu, 4 Feb 2016 00:41:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id BF6C215414; Thu, 4 Feb 2016 00:41:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id fsRH3lD30UnF; Thu, 4 Feb 2016 00:41:14 +0000 (UTC) Subject: Re: svn commit: r295226 - head/lib/libmemstat DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 378FD1540C To: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201602040023.u140NL0i052392@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <56B29E36.8000900@FreeBSD.org> Date: Wed, 3 Feb 2016 16:41:26 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <201602040023.u140NL0i052392@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="q8T8suujb9rwAwsuCIDT4F7DN89FRw0la" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 00:41:17 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --q8T8suujb9rwAwsuCIDT4F7DN89FRw0la Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2/3/2016 4:23 PM, Gleb Smirnoff wrote: > Author: glebius > Date: Thu Feb 4 00:23:21 2016 > New Revision: 295226 > URL: https://svnweb.freebsd.org/changeset/base/295226 >=20 > Log: > Fix build. >=20 > Modified: > head/lib/libmemstat/memstat_uma.c >=20 > Modified: head/lib/libmemstat/memstat_uma.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/lib/libmemstat/memstat_uma.c Wed Feb 3 23:41:58 2016 (r295225= ) > +++ head/lib/libmemstat/memstat_uma.c Thu Feb 4 00:23:21 2016 (r295226= ) > @@ -29,6 +29,7 @@ > #include > #include > #include > +#include > =20 > #include > #include >=20 Shouldn't uma_int.h forward declare or include _task.h for struct task? --=20 Regards, Bryan Drewery --q8T8suujb9rwAwsuCIDT4F7DN89FRw0la Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWsp42AAoJEDXXcbtuRpfPR3QH/Ama6sUJlpUbP7Dz+f4areuZ zWds9CPR5r5M2GtZ0J5Lvs01GqJMJIPSodARCET84a34L4AmzMmIGwvNW5e2CqLV KT7JX9E+c1pBMzme3y8AAlPKBkSy2BmYnaqBQp2Eh4VlFjN5YU1I/x3akMQj62Sz umbXkiDY69VEmfzyK/oB20Mytia7tH2Z5yeGFvxumaD5I582JJghmJLyD0UmJ0yg fLBHBXpd1SjIs5cgjC8P16TkBHG5Ll9ztFWcCDhOmq1Yv+vjz4graq7T3CN2OK1B jlbWDelwYzGw6bsGV8PxMR3m/VJWjNtYGn0i9f3sHG7PHKoQgBNe+jTc4Ojj7B8= =QTqY -----END PGP SIGNATURE----- --q8T8suujb9rwAwsuCIDT4F7DN89FRw0la-- From owner-svn-src-all@freebsd.org Thu Feb 4 01:08:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B965FA9A046; Thu, 4 Feb 2016 01:08:43 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88B5C1C6C; Thu, 4 Feb 2016 01:08:43 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1418gq1064024; Thu, 4 Feb 2016 01:08:42 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1418gmD064022; Thu, 4 Feb 2016 01:08:42 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201602040108.u1418gmD064022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 4 Feb 2016 01:08:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295227 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 01:08:43 -0000 Author: bdrewery Date: Thu Feb 4 01:08:42 2016 New Revision: 295227 URL: https://svnweb.freebsd.org/changeset/base/295227 Log: Stop hiding link install commands. This is no longer needed now that a .for loop is used rather than inline shell script. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.incs.mk head/share/mk/bsd.links.mk Modified: head/share/mk/bsd.incs.mk ============================================================================== --- head/share/mk/bsd.incs.mk Thu Feb 4 00:23:21 2016 (r295226) +++ head/share/mk/bsd.incs.mk Thu Feb 4 01:08:42 2016 (r295227) @@ -80,7 +80,6 @@ _${group}INS: ${_${group}INCS} .if defined(INCSLINKS) && !empty(INCSLINKS) installincludes: .for s t in ${INCSLINKS} - @${ECHO} "$t -> $s" ; \ ${INSTALL_SYMLINK} $s ${DESTDIR}$t .endfor .endif Modified: head/share/mk/bsd.links.mk ============================================================================== --- head/share/mk/bsd.links.mk Thu Feb 4 00:23:21 2016 (r295226) +++ head/share/mk/bsd.links.mk Thu Feb 4 01:08:42 2016 (r295227) @@ -8,10 +8,8 @@ afterinstall: _installlinks .ORDER: realinstall _installlinks _installlinks: .for s t in ${LINKS} - @${ECHO} "$t -> $s" ;\ ${INSTALL_LINK} ${DESTDIR}$s ${DESTDIR}$t .endfor .for s t in ${SYMLINKS} - @${ECHO} "$t -> $s" ;\ ${INSTALL_SYMLINK} $s ${DESTDIR}/$t .endfor From owner-svn-src-all@freebsd.org Thu Feb 4 01:08:50 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1577AA9A067; Thu, 4 Feb 2016 01:08:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A485D1D05; Thu, 4 Feb 2016 01:08:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1418m2C064117; Thu, 4 Feb 2016 01:08:48 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1418mal064116; Thu, 4 Feb 2016 01:08:48 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201602040108.u1418mal064116@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 4 Feb 2016 01:08:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295229 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 01:08:50 -0000 Author: bdrewery Date: Thu Feb 4 01:08:48 2016 New Revision: 295229 URL: https://svnweb.freebsd.org/changeset/base/295229 Log: MLINKS: Deduplicate some of the logic, simplify, and unhide install commands. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.man.mk Modified: head/share/mk/bsd.man.mk ============================================================================== --- head/share/mk/bsd.man.mk Thu Feb 4 01:08:45 2016 (r295228) +++ head/share/mk/bsd.man.mk Thu Feb 4 01:08:48 2016 (r295229) @@ -171,6 +171,17 @@ ${__target}: ${__page} .endif # ${MK_MANCOMPRESS} == "no" +.if !defined(NO_MLINKS) && defined(MLINKS) && !empty(MLINKS) +.for _oname _osect _dname _dsect in ${MLINKS:C/\.([^.]*)$/.\1 \1/} +_MANLINKS+= ${MANDIR}${_osect}${MANSUBDIR}/${_oname} \ + ${MANDIR}${_dsect}${MANSUBDIR}/${_dname} +.if defined(MANBUILDCAT) && !empty(MANBUILDCAT) +_MANLINKS+= ${CATDIR}${_osect}${MANSUBDIR}/${_oname} \ + ${CATDIR}${_dsect}${MANSUBDIR}/${_dname} +.endif +.endfor +.endif + maninstall: _maninstall _maninstall: .if defined(MAN) && !empty(MAN) @@ -215,25 +226,10 @@ _maninstall: ${MAN} .endfor .endif # ${MK_MANCOMPRESS} == "no" .endif - -.if !defined(NO_MLINKS) && defined(MLINKS) && !empty(MLINKS) -.for _oname _osect _dname _dsect in ${MLINKS:C/\.([^.]*)$/.\1 \1/} - @l=${DESTDIR}${MANDIR}${_osect}${MANSUBDIR}/${_oname}; \ - t=${DESTDIR}${MANDIR}${_dsect}${MANSUBDIR}/${_dname}; \ - ${ECHO} $${t}${ZEXT} -\> $${l}${ZEXT}; \ - rm -f $${t} $${t}${MCOMPRESS_EXT}; \ - ${INSTALL_LINK} $${l}${ZEXT} $${t}${ZEXT} +.for l t in ${_MANLINKS} + rm -f ${DESTDIR}${t} ${DESTDIR}${t}${MCOMPRESS_EXT}; \ + ${INSTALL_LINK} ${DESTDIR}${l}${ZEXT} ${DESTDIR}${t}${ZEXT} .endfor -.if defined(MANBUILDCAT) && !empty(MANBUILDCAT) -.for _oname _osect _dname _dsect in ${MLINKS:C/\.([^.]*)$/.\1 \1/} - @l=${DESTDIR}${CATDIR}${_osect}${MANSUBDIR}/${_oname}; \ - t=${DESTDIR}${CATDIR}${_dsect}${MANSUBDIR}/${_dname}; \ - ${ECHO} $${t}${ZEXT} -\> $${l}${ZEXT}; \ - rm -f $${t} $${t}${MCOMPRESS_EXT}; \ - ${INSTALL_LINK} $${l}${ZEXT} $${t}${ZEXT} -.endfor -.endif -.endif manlint: .if defined(MAN) && !empty(MAN) From owner-svn-src-all@freebsd.org Thu Feb 4 01:08:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B29B8A9A05A; Thu, 4 Feb 2016 01:08:46 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 847C81C6D; Thu, 4 Feb 2016 01:08:46 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1418juE064072; Thu, 4 Feb 2016 01:08:45 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1418j9x064071; Thu, 4 Feb 2016 01:08:45 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201602040108.u1418j9x064071@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 4 Feb 2016 01:08:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295228 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 01:08:46 -0000 Author: bdrewery Date: Thu Feb 4 01:08:45 2016 New Revision: 295228 URL: https://svnweb.freebsd.org/changeset/base/295228 Log: Fix cat files being installed to wrong place since r284685. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.man.mk Modified: head/share/mk/bsd.man.mk ============================================================================== --- head/share/mk/bsd.man.mk Thu Feb 4 01:08:42 2016 (r295227) +++ head/share/mk/bsd.man.mk Thu Feb 4 01:08:45 2016 (r295228) @@ -226,8 +226,8 @@ _maninstall: ${MAN} .endfor .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) .for _oname _osect _dname _dsect in ${MLINKS:C/\.([^.]*)$/.\1 \1/} - @l=${DESTDIR}${MANDIR}${_osect}${MANSUBDIR}/${_oname}; \ - t=${DESTDIR}${MANDIR}${_dsect}${MANSUBDIR}/${_dname}; \ + @l=${DESTDIR}${CATDIR}${_osect}${MANSUBDIR}/${_oname}; \ + t=${DESTDIR}${CATDIR}${_dsect}${MANSUBDIR}/${_dname}; \ ${ECHO} $${t}${ZEXT} -\> $${l}${ZEXT}; \ rm -f $${t} $${t}${MCOMPRESS_EXT}; \ ${INSTALL_LINK} $${l}${ZEXT} $${t}${ZEXT} From owner-svn-src-all@freebsd.org Thu Feb 4 01:08:52 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF757A9A06E; Thu, 4 Feb 2016 01:08:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE8651DEB; Thu, 4 Feb 2016 01:08:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1418pW8064165; Thu, 4 Feb 2016 01:08:51 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1418pkk064163; Thu, 4 Feb 2016 01:08:51 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201602040108.u1418pkk064163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 4 Feb 2016 01:08:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295230 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 01:08:53 -0000 Author: bdrewery Date: Thu Feb 4 01:08:51 2016 New Revision: 295230 URL: https://svnweb.freebsd.org/changeset/base/295230 Log: Fix style and remove excess / for installing SYMLINKS. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.incs.mk head/share/mk/bsd.links.mk Modified: head/share/mk/bsd.incs.mk ============================================================================== --- head/share/mk/bsd.incs.mk Thu Feb 4 01:08:48 2016 (r295229) +++ head/share/mk/bsd.incs.mk Thu Feb 4 01:08:51 2016 (r295230) @@ -80,7 +80,7 @@ _${group}INS: ${_${group}INCS} .if defined(INCSLINKS) && !empty(INCSLINKS) installincludes: .for s t in ${INCSLINKS} - ${INSTALL_SYMLINK} $s ${DESTDIR}$t + ${INSTALL_SYMLINK} ${s} ${DESTDIR}${t} .endfor .endif .endif # !target(installincludes) Modified: head/share/mk/bsd.links.mk ============================================================================== --- head/share/mk/bsd.links.mk Thu Feb 4 01:08:48 2016 (r295229) +++ head/share/mk/bsd.links.mk Thu Feb 4 01:08:51 2016 (r295230) @@ -8,8 +8,8 @@ afterinstall: _installlinks .ORDER: realinstall _installlinks _installlinks: .for s t in ${LINKS} - ${INSTALL_LINK} ${DESTDIR}$s ${DESTDIR}$t + ${INSTALL_LINK} ${DESTDIR}${s} ${DESTDIR}${t} .endfor .for s t in ${SYMLINKS} - ${INSTALL_SYMLINK} $s ${DESTDIR}/$t + ${INSTALL_SYMLINK} ${s} ${DESTDIR}${t} .endfor From owner-svn-src-all@freebsd.org Thu Feb 4 01:29:36 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2610EA9A965; Thu, 4 Feb 2016 01:29:36 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from mail.mahoroba.org (ent.mahoroba.org [IPv6:2001:2f0:104:8010::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "asuka.mahoroba.org", Issuer "ca.mahoroba.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CDC38DFE; Thu, 4 Feb 2016 01:29:35 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from asuka.mahoroba.org (ume@ent.mahoroba.org [IPv6:2001:2f0:104:8010::1]) (user=ume mech=CRAM-MD5 bits=0) by mail.mahoroba.org (8.15.2/8.15.2) with ESMTPSA/inet6 id u141TSIQ013875 (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Thu, 4 Feb 2016 10:29:28 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Thu, 04 Feb 2016 10:29:27 +0900 Message-ID: From: Hajimu UMEMOTO To: Bryan Drewery Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r295224 - head/bin/csh In-Reply-To: <201602032337.u13NbPnH037663@repo.freebsd.org> References: <201602032337.u13NbPnH037663@repo.freebsd.org> User-Agent: xcite1.60> Wanderlust/2.15.9 (Almost Unreal) Emacs/24.5 Mule/6.0 (HANACHIRUSATO) X-Operating-System: FreeBSD 10.3-PRERELEASE X-PGP-Key: http://www.mahoroba.org/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6a2 (mail.mahoroba.org [IPv6:2001:2f0:104:8010::1]); Thu, 04 Feb 2016 10:29:28 +0900 (JST) X-Virus-Scanned: clamav-milter 0.99 at asuka.mahoroba.org X-Virus-Status: Clean X-Spam-Status: No, score=-3.5 required=5.0 tests=ALL_TRUSTED,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on asuka.mahoroba.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 01:29:36 -0000 Hi, >>>>> On Wed, 3 Feb 2016 23:37:25 +0000 (UTC) >>>>> Bryan Drewery said: bdrewery> Author: bdrewery bdrewery> Date: Wed Feb 3 23:37:24 2016 bdrewery> New Revision: 295224 bdrewery> URL: https://svnweb.freebsd.org/changeset/base/295224 bdrewery> Log: bdrewery> Don't link /usr/share/nls/de_DE.UTF-8/tcsh.cat to itself. Oops, it's my fault. Thank you! -- Hajimu UMEMOTO ume@mahoroba.org ume@FreeBSD.org http://www.mahoroba.org/~ume/ From owner-svn-src-all@freebsd.org Thu Feb 4 03:55:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D6B6A99D16; Thu, 4 Feb 2016 03:55:43 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53405183F; Thu, 4 Feb 2016 03:55:43 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u143tgVD013536; Thu, 4 Feb 2016 03:55:42 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u143tg1Z013531; Thu, 4 Feb 2016 03:55:42 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201602040355.u143tg1Z013531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 4 Feb 2016 03:55:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295231 - in head/sys: arm64/arm64 mips/mips powerpc/powerpc riscv/riscv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 03:55:43 -0000 Author: glebius Date: Thu Feb 4 03:55:41 2016 New Revision: 295231 URL: https://svnweb.freebsd.org/changeset/base/295231 Log: Fix build. Modified: head/sys/arm64/arm64/uma_machdep.c head/sys/mips/mips/uma_machdep.c head/sys/powerpc/powerpc/uma_machdep.c head/sys/riscv/riscv/uma_machdep.c Modified: head/sys/arm64/arm64/uma_machdep.c ============================================================================== --- head/sys/arm64/arm64/uma_machdep.c Thu Feb 4 01:08:51 2016 (r295230) +++ head/sys/arm64/arm64/uma_machdep.c Thu Feb 4 03:55:41 2016 (r295231) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/mips/mips/uma_machdep.c ============================================================================== --- head/sys/mips/mips/uma_machdep.c Thu Feb 4 01:08:51 2016 (r295230) +++ head/sys/mips/mips/uma_machdep.c Thu Feb 4 03:55:41 2016 (r295231) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/powerpc/powerpc/uma_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/uma_machdep.c Thu Feb 4 01:08:51 2016 (r295230) +++ head/sys/powerpc/powerpc/uma_machdep.c Thu Feb 4 03:55:41 2016 (r295231) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/riscv/riscv/uma_machdep.c ============================================================================== --- head/sys/riscv/riscv/uma_machdep.c Thu Feb 4 01:08:51 2016 (r295230) +++ head/sys/riscv/riscv/uma_machdep.c Thu Feb 4 03:55:41 2016 (r295231) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include From owner-svn-src-all@freebsd.org Thu Feb 4 04:22:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57302A9B4D2; Thu, 4 Feb 2016 04:22:20 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14DD53BC; Thu, 4 Feb 2016 04:22:20 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u144MJsR022419; Thu, 4 Feb 2016 04:22:19 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u144MI8h022413; Thu, 4 Feb 2016 04:22:18 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201602040422.u144MI8h022413@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 4 Feb 2016 04:22:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295232 - in head/sys: compat/cloudabi compat/linux kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 04:22:20 -0000 Author: mjg Date: Thu Feb 4 04:22:18 2016 New Revision: 295232 URL: https://svnweb.freebsd.org/changeset/base/295232 Log: fork: pass arguments to fork1 in a dedicated structure Suggested by: kib Modified: head/sys/compat/cloudabi/cloudabi_proc.c head/sys/compat/linux/linux_fork.c head/sys/kern/init_main.c head/sys/kern/kern_fork.c head/sys/kern/kern_kthread.c head/sys/sys/proc.h Modified: head/sys/compat/cloudabi/cloudabi_proc.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_proc.c Thu Feb 4 03:55:41 2016 (r295231) +++ head/sys/compat/cloudabi/cloudabi_proc.c Thu Feb 4 04:22:18 2016 (r295232) @@ -75,12 +75,18 @@ int cloudabi_sys_proc_fork(struct thread *td, struct cloudabi_sys_proc_fork_args *uap) { + struct fork_req fr; struct filecaps fcaps = {}; struct proc *p2; int error, fd; cap_rights_init(&fcaps.fc_rights, CAP_FSTAT, CAP_EVENT); - error = fork1(td, RFFDG | RFPROC | RFPROCDESC, 0, &p2, &fd, 0, &fcaps); + bzero(&fr, sizeof(fr)); + fr.fr_flags = RFFDG | RFPROC | RFPROCDESC; + fr.fr_procp = &p2; + fr.fr_pd_fd = &fd; + fr.fr_pd_fcaps = &fcaps; + error = fork1(td, &fr); if (error != 0) return (error); /* Return the file descriptor to the parent process. */ Modified: head/sys/compat/linux/linux_fork.c ============================================================================== --- head/sys/compat/linux/linux_fork.c Thu Feb 4 03:55:41 2016 (r295231) +++ head/sys/compat/linux/linux_fork.c Thu Feb 4 04:22:18 2016 (r295232) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); int linux_fork(struct thread *td, struct linux_fork_args *args) { + struct fork_req fr; int error; struct proc *p2; struct thread *td2; @@ -73,8 +74,10 @@ linux_fork(struct thread *td, struct lin printf(ARGS(fork, "")); #endif - if ((error = fork1(td, RFFDG | RFPROC | RFSTOPPED, 0, &p2, NULL, 0, - NULL)) != 0) + bzero(&fr, sizeof(fr)); + fr.fr_flags = RFFDG | RFPROC | RFSTOPPED; + fr.fr_procp = &p2; + if ((error = fork1(td, &fr)) != 0) return (error); td2 = FIRST_THREAD_IN_PROC(p2); @@ -97,6 +100,7 @@ linux_fork(struct thread *td, struct lin int linux_vfork(struct thread *td, struct linux_vfork_args *args) { + struct fork_req fr; int error; struct proc *p2; struct thread *td2; @@ -106,8 +110,10 @@ linux_vfork(struct thread *td, struct li printf(ARGS(vfork, "")); #endif - if ((error = fork1(td, RFFDG | RFPROC | RFMEM | RFPPWAIT | RFSTOPPED, - 0, &p2, NULL, 0, NULL)) != 0) + bzero(&fr, sizeof(fr)); + fr.fr_flags = RFFDG | RFPROC | RFMEM | RFPPWAIT | RFSTOPPED; + fr.fr_procp = &p2; + if ((error = fork1(td, &fr)) != 0) return (error); td2 = FIRST_THREAD_IN_PROC(p2); @@ -130,6 +136,7 @@ linux_vfork(struct thread *td, struct li static int linux_clone_proc(struct thread *td, struct linux_clone_args *args) { + struct fork_req fr; int error, ff = RFPROC | RFSTOPPED; struct proc *p2; struct thread *td2; @@ -170,7 +177,10 @@ linux_clone_proc(struct thread *td, stru if (args->flags & LINUX_CLONE_VFORK) ff |= RFPPWAIT; - error = fork1(td, ff, 0, &p2, NULL, 0, NULL); + bzero(&fr, sizeof(fr)); + fr.fr_flags = ff; + fr.fr_procp = &p2; + error = fork1(td, &fr); if (error) return (error); Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Thu Feb 4 03:55:41 2016 (r295231) +++ head/sys/kern/init_main.c Thu Feb 4 04:22:18 2016 (r295232) @@ -828,12 +828,15 @@ start_init(void *dummy) static void create_init(const void *udata __unused) { + struct fork_req fr; struct ucred *newcred, *oldcred; struct thread *td; int error; - error = fork1(&thread0, RFFDG | RFPROC | RFSTOPPED, 0, &initproc, - NULL, 0, NULL); + bzero(&fr, sizeof(fr)); + fr.fr_flags = RFFDG | RFPROC | RFSTOPPED; + fr.fr_procp = &initproc; + error = fork1(&thread0, &fr); if (error) panic("cannot fork init: %d\n", error); KASSERT(initproc->p_pid == 1, ("create_init: initproc->p_pid != 1")); Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Thu Feb 4 03:55:41 2016 (r295231) +++ head/sys/kern/kern_fork.c Thu Feb 4 04:22:18 2016 (r295232) @@ -101,10 +101,14 @@ struct fork_args { int sys_fork(struct thread *td, struct fork_args *uap) { + struct fork_req fr; int error; struct proc *p2; - error = fork1(td, RFFDG | RFPROC, 0, &p2, NULL, 0, NULL); + bzero(&fr, sizeof(fr)); + fr.fr_flags = RFFDG | RFPROC; + fr.fr_procp = &p2; + error = fork1(td, &fr); if (error == 0) { td->td_retval[0] = p2->p_pid; td->td_retval[1] = 0; @@ -118,16 +122,21 @@ sys_pdfork(td, uap) struct thread *td; struct pdfork_args *uap; { + struct fork_req fr; int error, fd; struct proc *p2; + bzero(&fr, sizeof(fr)); + fr.fr_flags = RFFDG | RFPROC | RFPROCDESC; + fr.fr_procp = &p2; + fr.fr_pd_fd = &fd; + fr.fr_pd_flags = uap->flags; /* * It is necessary to return fd by reference because 0 is a valid file * descriptor number, and the child needs to be able to distinguish * itself from the parent using the return value. */ - error = fork1(td, RFFDG | RFPROC | RFPROCDESC, 0, &p2, - &fd, uap->flags, NULL); + error = fork1(td, &fr); if (error == 0) { td->td_retval[0] = p2->p_pid; td->td_retval[1] = 0; @@ -140,11 +149,14 @@ sys_pdfork(td, uap) int sys_vfork(struct thread *td, struct vfork_args *uap) { - int error, flags; + struct fork_req fr; + int error; struct proc *p2; - flags = RFFDG | RFPROC | RFPPWAIT | RFMEM; - error = fork1(td, flags, 0, &p2, NULL, 0, NULL); + bzero(&fr, sizeof(fr)); + fr.fr_flags = RFFDG | RFPROC | RFPPWAIT | RFMEM; + fr.fr_procp = &p2; + error = fork1(td, &fr); if (error == 0) { td->td_retval[0] = p2->p_pid; td->td_retval[1] = 0; @@ -155,6 +167,7 @@ sys_vfork(struct thread *td, struct vfor int sys_rfork(struct thread *td, struct rfork_args *uap) { + struct fork_req fr; struct proc *p2; int error; @@ -163,7 +176,10 @@ sys_rfork(struct thread *td, struct rfor return (EINVAL); AUDIT_ARG_FFLAGS(uap->flags); - error = fork1(td, uap->flags, 0, &p2, NULL, 0, NULL); + bzero(&fr, sizeof(fr)); + fr.fr_flags = uap->flags; + fr.fr_procp = &p2; + error = fork1(td, &fr); if (error == 0) { td->td_retval[0] = p2 ? p2->p_pid : 0; td->td_retval[1] = 0; @@ -761,8 +777,7 @@ do_fork(struct thread *td, int flags, st } int -fork1(struct thread *td, int flags, int pages, struct proc **procp, - int *procdescp, int pdflags, struct filecaps *fcaps) +fork1(struct thread *td, struct fork_req *fr) { struct proc *p1, *newproc; struct thread *td2; @@ -772,6 +787,10 @@ fork1(struct thread *td, int flags, int int error, nprocs_new, ok; static int curfail; static struct timeval lastfail; + int flags, pages; + + flags = fr->fr_flags; + pages = fr->fr_pages; /* Check for the undefined or unimplemented flags. */ if ((flags & ~(RFFLAGS | RFTSIGFLAGS(RFTSIGMASK))) != 0) @@ -795,7 +814,7 @@ fork1(struct thread *td, int flags, int return (EINVAL); /* Must provide a place to put a procdesc if creating one. */ - if (procdescp == NULL) + if (fr->fr_pd_fd == NULL) return (EINVAL); } @@ -806,7 +825,7 @@ fork1(struct thread *td, int flags, int * certain parts of a process from itself. */ if ((flags & RFPROC) == 0) { - *procp = NULL; + *fr->fr_procp = NULL; return (fork_norfproc(td, flags)); } @@ -845,7 +864,8 @@ fork1(struct thread *td, int flags, int * later. */ if (flags & RFPROCDESC) { - error = falloc_caps(td, &fp_procdesc, procdescp, 0, fcaps); + error = falloc_caps(td, &fp_procdesc, fr->fr_pd_fd, 0, + fr->fr_pd_fcaps); if (error != 0) goto fail2; } @@ -933,12 +953,12 @@ fork1(struct thread *td, int flags, int lim_cur(td, RLIMIT_NPROC)); } if (ok) { - do_fork(td, flags, newproc, td2, vm2, pdflags); + do_fork(td, flags, newproc, td2, vm2, fr->fr_pd_flags); /* * Return child proc pointer to parent. */ - *procp = newproc; + *fr->fr_procp = newproc; if (flags & RFPROCDESC) { procdesc_finit(newproc->p_procdesc, fp_procdesc); fdrop(fp_procdesc, td); @@ -962,7 +982,7 @@ fail2: vmspace_free(vm2); uma_zfree(proc_zone, newproc); if ((flags & RFPROCDESC) != 0 && fp_procdesc != NULL) { - fdclose(td, fp_procdesc, *procdescp); + fdclose(td, fp_procdesc, *fr->fr_pd_fd); fdrop(fp_procdesc, td); } atomic_add_int(&nprocs, -1); Modified: head/sys/kern/kern_kthread.c ============================================================================== --- head/sys/kern/kern_kthread.c Thu Feb 4 03:55:41 2016 (r295231) +++ head/sys/kern/kern_kthread.c Thu Feb 4 04:22:18 2016 (r295232) @@ -80,6 +80,7 @@ int kproc_create(void (*func)(void *), void *arg, struct proc **newpp, int flags, int pages, const char *fmt, ...) { + struct fork_req fr; int error; va_list ap; struct thread *td; @@ -88,8 +89,11 @@ kproc_create(void (*func)(void *), void if (!proc0.p_stats) panic("kproc_create called too soon"); - error = fork1(&thread0, RFMEM | RFFDG | RFPROC | RFSTOPPED | flags, - pages, &p2, NULL, 0, NULL); + bzero(&fr, sizeof(fr)); + fr.fr_flags = RFMEM | RFFDG | RFPROC | RFSTOPPED | flags; + fr.fr_pages = pages; + fr.fr_procp = &p2; + error = fork1(&thread0, &fr); if (error) return error; Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Thu Feb 4 03:55:41 2016 (r295231) +++ head/sys/sys/proc.h Thu Feb 4 04:22:18 2016 (r295232) @@ -907,6 +907,15 @@ struct proc *pfind_locked(pid_t pid); struct pgrp *pgfind(pid_t); /* Find process group by id. */ struct proc *zpfind(pid_t); /* Find zombie process by id. */ +struct fork_req { + int fr_flags; + int fr_pages; + struct proc **fr_procp; + int *fr_pd_fd; + int fr_pd_flags; + struct filecaps *fr_pd_fcaps; +}; + /* * pget() flags. */ @@ -930,8 +939,7 @@ int enterpgrp(struct proc *p, pid_t pgid int enterthispgrp(struct proc *p, struct pgrp *pgrp); void faultin(struct proc *p); void fixjobc(struct proc *p, struct pgrp *pgrp, int entering); -int fork1(struct thread *, int, int, struct proc **, int *, int, - struct filecaps *); +int fork1(struct thread *, struct fork_req *); void fork_exit(void (*)(void *, struct trapframe *), void *, struct trapframe *); void fork_return(struct thread *, struct trapframe *); From owner-svn-src-all@freebsd.org Thu Feb 4 04:25:32 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A56AA9B5A7; Thu, 4 Feb 2016 04:25:32 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25F237CA; Thu, 4 Feb 2016 04:25:32 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u144PVB5022632; Thu, 4 Feb 2016 04:25:31 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u144PUpe022628; Thu, 4 Feb 2016 04:25:30 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201602040425.u144PUpe022628@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 4 Feb 2016 04:25:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295233 - in head/sys: compat/cloudabi kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 04:25:32 -0000 Author: mjg Date: Thu Feb 4 04:25:30 2016 New Revision: 295233 URL: https://svnweb.freebsd.org/changeset/base/295233 Log: fork: plug a use after free of the returned process fork1 required its callers to pass a pointer to struct proc * which would be set to the new process (if any). procdesc and racct manipulation also used said pointer. However, the process could have exited prior to do_fork return and be automatically reaped, thus making this a use-after-free. Fix the problem by letting callers indicate whether they want the pid or the struct proc, return the process in stopped state for the latter case. Reviewed by: kib Modified: head/sys/compat/cloudabi/cloudabi_proc.c head/sys/kern/kern_fork.c head/sys/kern/kern_racct.c head/sys/sys/proc.h Modified: head/sys/compat/cloudabi/cloudabi_proc.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_proc.c Thu Feb 4 04:22:18 2016 (r295232) +++ head/sys/compat/cloudabi/cloudabi_proc.c Thu Feb 4 04:25:30 2016 (r295233) @@ -77,13 +77,11 @@ cloudabi_sys_proc_fork(struct thread *td { struct fork_req fr; struct filecaps fcaps = {}; - struct proc *p2; int error, fd; cap_rights_init(&fcaps.fc_rights, CAP_FSTAT, CAP_EVENT); bzero(&fr, sizeof(fr)); fr.fr_flags = RFFDG | RFPROC | RFPROCDESC; - fr.fr_procp = &p2; fr.fr_pd_fd = &fd; fr.fr_pd_fcaps = &fcaps; error = fork1(td, &fr); Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Thu Feb 4 04:22:18 2016 (r295232) +++ head/sys/kern/kern_fork.c Thu Feb 4 04:25:30 2016 (r295233) @@ -102,15 +102,14 @@ int sys_fork(struct thread *td, struct fork_args *uap) { struct fork_req fr; - int error; - struct proc *p2; + int error, pid; bzero(&fr, sizeof(fr)); fr.fr_flags = RFFDG | RFPROC; - fr.fr_procp = &p2; + fr.fr_pidp = &pid; error = fork1(td, &fr); if (error == 0) { - td->td_retval[0] = p2->p_pid; + td->td_retval[0] = pid; td->td_retval[1] = 0; } return (error); @@ -123,12 +122,11 @@ sys_pdfork(td, uap) struct pdfork_args *uap; { struct fork_req fr; - int error, fd; - struct proc *p2; + int error, fd, pid; bzero(&fr, sizeof(fr)); fr.fr_flags = RFFDG | RFPROC | RFPROCDESC; - fr.fr_procp = &p2; + fr.fr_pidp = &pid; fr.fr_pd_fd = &fd; fr.fr_pd_flags = uap->flags; /* @@ -138,7 +136,7 @@ sys_pdfork(td, uap) */ error = fork1(td, &fr); if (error == 0) { - td->td_retval[0] = p2->p_pid; + td->td_retval[0] = pid; td->td_retval[1] = 0; error = copyout(&fd, uap->fdp, sizeof(fd)); } @@ -150,15 +148,14 @@ int sys_vfork(struct thread *td, struct vfork_args *uap) { struct fork_req fr; - int error; - struct proc *p2; + int error, pid; bzero(&fr, sizeof(fr)); fr.fr_flags = RFFDG | RFPROC | RFPPWAIT | RFMEM; - fr.fr_procp = &p2; + fr.fr_pidp = &pid; error = fork1(td, &fr); if (error == 0) { - td->td_retval[0] = p2->p_pid; + td->td_retval[0] = pid; td->td_retval[1] = 0; } return (error); @@ -168,8 +165,7 @@ int sys_rfork(struct thread *td, struct rfork_args *uap) { struct fork_req fr; - struct proc *p2; - int error; + int error, pid; /* Don't allow kernel-only flags. */ if ((uap->flags & RFKERNELONLY) != 0) @@ -178,10 +174,10 @@ sys_rfork(struct thread *td, struct rfor AUDIT_ARG_FFLAGS(uap->flags); bzero(&fr, sizeof(fr)); fr.fr_flags = uap->flags; - fr.fr_procp = &p2; + fr.fr_pidp = &pid; error = fork1(td, &fr); if (error == 0) { - td->td_retval[0] = p2 ? p2->p_pid : 0; + td->td_retval[0] = pid; td->td_retval[1] = 0; } return (error); @@ -382,11 +378,11 @@ fail: } static void -do_fork(struct thread *td, int flags, struct proc *p2, struct thread *td2, - struct vmspace *vm2, int pdflags) +do_fork(struct thread *td, struct fork_req *fr, struct proc *p2, struct thread *td2, + struct vmspace *vm2, struct file *fp_procdesc) { struct proc *p1, *pptr; - int p2_held, trypid; + int trypid; struct filedesc *fd; struct filedesc_to_leader *fdtol; struct sigacts *newsigacts; @@ -394,10 +390,9 @@ do_fork(struct thread *td, int flags, st sx_assert(&proctree_lock, SX_SLOCKED); sx_assert(&allproc_lock, SX_XLOCKED); - p2_held = 0; p1 = td->td_proc; - trypid = fork_findpid(flags); + trypid = fork_findpid(fr->fr_flags); sx_sunlock(&proctree_lock); @@ -430,7 +425,7 @@ do_fork(struct thread *td, int flags, st /* * Malloc things while we don't hold any locks. */ - if (flags & RFSIGSHARE) + if (fr->fr_flags & RFSIGSHARE) newsigacts = NULL; else newsigacts = sigacts_alloc(); @@ -438,10 +433,10 @@ do_fork(struct thread *td, int flags, st /* * Copy filedesc. */ - if (flags & RFCFDG) { + if (fr->fr_flags & RFCFDG) { fd = fdinit(p1->p_fd, false); fdtol = NULL; - } else if (flags & RFFDG) { + } else if (fr->fr_flags & RFFDG) { fd = fdcopy(p1->p_fd); fdtol = NULL; } else { @@ -449,7 +444,7 @@ do_fork(struct thread *td, int flags, st if (p1->p_fdtol == NULL) p1->p_fdtol = filedesc_to_leader_alloc(NULL, NULL, p1->p_leader); - if ((flags & RFTHREAD) != 0) { + if ((fr->fr_flags & RFTHREAD) != 0) { /* * Shared file descriptor table, and shared * process leaders. @@ -517,16 +512,16 @@ do_fork(struct thread *td, int flags, st vm_domain_policy_localcopy(&p2->p_vm_dom_policy, &p1->p_vm_dom_policy); - if (flags & RFSIGSHARE) { + if (fr->fr_flags & RFSIGSHARE) { p2->p_sigacts = sigacts_hold(p1->p_sigacts); } else { sigacts_copy(newsigacts, p1->p_sigacts); p2->p_sigacts = newsigacts; } - if (flags & RFTSIGZMB) - p2->p_sigparent = RFTSIGNUM(flags); - else if (flags & RFLINUXTHPN) + if (fr->fr_flags & RFTSIGZMB) + p2->p_sigparent = RFTSIGNUM(fr->fr_flags); + else if (fr->fr_flags & RFLINUXTHPN) p2->p_sigparent = SIGUSR1; else p2->p_sigparent = SIGCHLD; @@ -559,7 +554,7 @@ do_fork(struct thread *td, int flags, st /* * Set up linkage for kernel based threading. */ - if ((flags & RFTHREAD) != 0) { + if ((fr->fr_flags & RFTHREAD) != 0) { mtx_lock(&ppeers_lock); p2->p_peers = p1->p_peers; p1->p_peers = p2; @@ -606,7 +601,7 @@ do_fork(struct thread *td, int flags, st if (p1->p_session->s_ttyvp != NULL && p1->p_flag & P_CONTROLT) p2->p_flag |= P_CONTROLT; SESS_UNLOCK(p1->p_session); - if (flags & RFPPWAIT) + if (fr->fr_flags & RFPPWAIT) p2->p_flag |= P_PPWAIT; p2->p_pgrp = p1->p_pgrp; @@ -640,7 +635,7 @@ do_fork(struct thread *td, int flags, st * of init. This effectively disassociates the child from the * parent. */ - if ((flags & RFNOWAIT) != 0) { + if ((fr->fr_flags & RFNOWAIT) != 0) { pptr = p1->p_reaper; p2->p_reaper = pptr; } else { @@ -668,13 +663,13 @@ do_fork(struct thread *td, int flags, st * Finish creating the child process. It will return via a different * execution path later. (ie: directly into user mode) */ - vm_forkproc(td, p2, td2, vm2, flags); + vm_forkproc(td, p2, td2, vm2, fr->fr_flags); - if (flags == (RFFDG | RFPROC)) { + if (fr->fr_flags == (RFFDG | RFPROC)) { PCPU_INC(cnt.v_forks); PCPU_ADD(cnt.v_forkpages, p2->p_vmspace->vm_dsize + p2->p_vmspace->vm_ssize); - } else if (flags == (RFFDG | RFPROC | RFPPWAIT | RFMEM)) { + } else if (fr->fr_flags == (RFFDG | RFPROC | RFPPWAIT | RFMEM)) { PCPU_INC(cnt.v_vforks); PCPU_ADD(cnt.v_vforkpages, p2->p_vmspace->vm_dsize + p2->p_vmspace->vm_ssize); @@ -693,14 +688,14 @@ do_fork(struct thread *td, int flags, st * can happen that might cause that process to need the descriptor. * However, don't do this until after fork(2) can no longer fail. */ - if (flags & RFPROCDESC) - procdesc_new(p2, pdflags); + if (fr->fr_flags & RFPROCDESC) + procdesc_new(p2, fr->fr_pd_flags); /* * Both processes are set up, now check if any loadable modules want * to adjust anything. */ - EVENTHANDLER_INVOKE(process_fork, p1, p2, flags); + EVENTHANDLER_INVOKE(process_fork, p1, p2, fr->fr_flags); /* * Set the child start time and mark the process as being complete. @@ -719,9 +714,14 @@ do_fork(struct thread *td, int flags, st * this only after p_state is PRS_NORMAL since the fasttrap module will * use pfind() later on. */ - if ((flags & RFMEM) == 0 && dtrace_fasttrap_fork) + if ((fr->fr_flags & RFMEM) == 0 && dtrace_fasttrap_fork) dtrace_fasttrap_fork(p1, p2); #endif + /* + * Hold the process so that it cannot exit after we make it runnable, + * but before we wait for the debugger. + */ + _PHOLD(p2); if ((p1->p_flag & (P_TRACED | P_FOLLOWFORK)) == (P_TRACED | P_FOLLOWFORK)) { /* @@ -734,24 +734,12 @@ do_fork(struct thread *td, int flags, st td->td_dbgflags |= TDB_FORK; td->td_dbg_forked = p2->p_pid; td2->td_dbgflags |= TDB_STOPATFORK; - _PHOLD(p2); - p2_held = 1; } - if (flags & RFPPWAIT) { + if (fr->fr_flags & RFPPWAIT) { td->td_pflags |= TDP_RFPPWAIT; td->td_rfppwait_p = p2; } PROC_UNLOCK(p2); - if ((flags & RFSTOPPED) == 0) { - /* - * If RFSTOPPED not requested, make child runnable and - * add to run queue. - */ - thread_lock(td2); - TD_SET_CAN_RUN(td2); - sched_add(td2, SRQ_BORING); - thread_unlock(td2); - } /* * Now can be swapped. @@ -763,16 +751,36 @@ do_fork(struct thread *td, int flags, st * Tell any interested parties about the new process. */ knote_fork(&p1->p_klist, p2->p_pid); - SDT_PROBE3(proc, , , create, p2, p1, flags); + SDT_PROBE3(proc, , , create, p2, p1, fr->fr_flags); + if (fr->fr_flags & RFPROCDESC) { + procdesc_finit(p2->p_procdesc, fp_procdesc); + fdrop(fp_procdesc, td); + } + + if ((fr->fr_flags & RFSTOPPED) == 0) { + /* + * If RFSTOPPED not requested, make child runnable and + * add to run queue. + */ + thread_lock(td2); + TD_SET_CAN_RUN(td2); + sched_add(td2, SRQ_BORING); + thread_unlock(td2); + if (fr->fr_pidp != NULL) + *fr->fr_pidp = p2->p_pid; + } else { + *fr->fr_procp = p2; + } + + PROC_LOCK(p2); /* * Wait until debugger is attached to child. */ - PROC_LOCK(p2); while ((td2->td_dbgflags & TDB_STOPATFORK) != 0) cv_wait(&p2->p_dbgwait, &p2->p_mtx); - if (p2_held) - _PRELE(p2); + _PRELE(p2); + racct_proc_fork_done(p2); PROC_UNLOCK(p2); } @@ -792,6 +800,11 @@ fork1(struct thread *td, struct fork_req flags = fr->fr_flags; pages = fr->fr_pages; + if ((flags & RFSTOPPED) != 0) + MPASS(fr->fr_procp != NULL && fr->fr_pidp == NULL); + else + MPASS(fr->fr_procp == NULL); + /* Check for the undefined or unimplemented flags. */ if ((flags & ~(RFFLAGS | RFTSIGFLAGS(RFTSIGMASK))) != 0) return (EINVAL); @@ -825,7 +838,10 @@ fork1(struct thread *td, struct fork_req * certain parts of a process from itself. */ if ((flags & RFPROC) == 0) { - *fr->fr_procp = NULL; + if (fr->fr_procp != NULL) + *fr->fr_procp = NULL; + else if (fr->fr_pidp != NULL) + *fr->fr_pidp = 0; return (fork_norfproc(td, flags)); } @@ -953,17 +969,7 @@ fork1(struct thread *td, struct fork_req lim_cur(td, RLIMIT_NPROC)); } if (ok) { - do_fork(td, flags, newproc, td2, vm2, fr->fr_pd_flags); - - /* - * Return child proc pointer to parent. - */ - *fr->fr_procp = newproc; - if (flags & RFPROCDESC) { - procdesc_finit(newproc->p_procdesc, fp_procdesc); - fdrop(fp_procdesc, td); - } - racct_proc_fork_done(newproc); + do_fork(td, fr, newproc, td2, vm2, fp_procdesc); return (0); } Modified: head/sys/kern/kern_racct.c ============================================================================== --- head/sys/kern/kern_racct.c Thu Feb 4 04:22:18 2016 (r295232) +++ head/sys/kern/kern_racct.c Thu Feb 4 04:25:30 2016 (r295233) @@ -957,16 +957,15 @@ void racct_proc_fork_done(struct proc *child) { + PROC_LOCK_ASSERT(child, MA_OWNED); #ifdef RCTL if (!racct_enable) return; - PROC_LOCK(child); mtx_lock(&racct_lock); rctl_enforce(child, RACCT_NPROC, 0); rctl_enforce(child, RACCT_NTHR, 0); mtx_unlock(&racct_lock); - PROC_UNLOCK(child); #endif } Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Thu Feb 4 04:22:18 2016 (r295232) +++ head/sys/sys/proc.h Thu Feb 4 04:25:30 2016 (r295233) @@ -910,6 +910,7 @@ struct proc *zpfind(pid_t); /* Find zom struct fork_req { int fr_flags; int fr_pages; + int *fr_pidp; struct proc **fr_procp; int *fr_pd_fd; int fr_pd_flags; From owner-svn-src-all@freebsd.org Thu Feb 4 05:03:37 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C186A9A663; Thu, 4 Feb 2016 05:03:37 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A3BA1DF3; Thu, 4 Feb 2016 05:03:37 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1453aY7034754; Thu, 4 Feb 2016 05:03:36 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1453arg034753; Thu, 4 Feb 2016 05:03:36 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201602040503.u1453arg034753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Thu, 4 Feb 2016 05:03:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295234 - head/share/i18n/esdb/MISC X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 05:03:37 -0000 Author: ume Date: Thu Feb 4 05:03:35 2016 New Revision: 295234 URL: https://svnweb.freebsd.org/changeset/base/295234 Log: Make sure to enable aliases for SHIFT_JIS. MFC after: 3 days Modified: head/share/i18n/esdb/MISC/MISC.alias Modified: head/share/i18n/esdb/MISC/MISC.alias ============================================================================== --- head/share/i18n/esdb/MISC/MISC.alias Thu Feb 4 04:25:30 2016 (r295233) +++ head/share/i18n/esdb/MISC/MISC.alias Thu Feb 4 05:03:35 2016 (r295234) @@ -29,10 +29,10 @@ JISX0208:1990 x0208 JOHAB cp1361 -SHIFT_JIS csshiftjis -SHIFT_JIS ms_kanji -SHIFT_JIS sjis +Shift_JIS csshiftjis +Shift_JIS ms_kanji +Shift_JIS sjis -SHIFT_JIS-2004 shift_jisx0213 +Shift_JIS-2004 shift_jisx0213 TDS565 iso-ir-230 From owner-svn-src-all@freebsd.org Thu Feb 4 06:39:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 116BCA997A3; Thu, 4 Feb 2016 06:39:22 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0322663; Thu, 4 Feb 2016 06:39:21 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u146dKbA060978; Thu, 4 Feb 2016 06:39:20 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u146dKE7060977; Thu, 4 Feb 2016 06:39:20 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201602040639.u146dKE7060977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Thu, 4 Feb 2016 06:39:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295235 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 06:39:22 -0000 Author: mmel Date: Thu Feb 4 06:39:20 2016 New Revision: 295235 URL: https://svnweb.freebsd.org/changeset/base/295235 Log: ARM: Remove unused symbols from genassym.c. Modified: head/sys/arm/arm/genassym.c Modified: head/sys/arm/arm/genassym.c ============================================================================== --- head/sys/arm/arm/genassym.c Thu Feb 4 05:03:35 2016 (r295234) +++ head/sys/arm/arm/genassym.c Thu Feb 4 06:39:20 2016 (r295235) @@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$"); #include ASSYM(KERNBASE, KERNBASE); -ASSYM(PCB_NOALIGNFLT, PCB_NOALIGNFLT); #if __ARM_ARCH >= 6 ASSYM(CPU_ASID_KERNEL,CPU_ASID_KERNEL); #endif @@ -67,7 +66,6 @@ ASSYM(PCB_ONFAULT, offsetof(struct pcb, #if __ARM_ARCH < 6 ASSYM(PCB_DACR, offsetof(struct pcb, pcb_dacr)); #endif -ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags)); ASSYM(PCB_PAGEDIR, offsetof(struct pcb, pcb_pagedir)); #if __ARM_ARCH < 6 ASSYM(PCB_L1VEC, offsetof(struct pcb, pcb_l1vec)); @@ -93,23 +91,15 @@ ASSYM(M_DATA, offsetof(struct mbuf, m_da ASSYM(M_NEXT, offsetof(struct mbuf, m_next)); ASSYM(IP_SRC, offsetof(struct ip, ip_src)); ASSYM(IP_DST, offsetof(struct ip, ip_dst)); -ASSYM(CF_SETTTB, offsetof(struct cpu_functions, cf_setttb)); -ASSYM(CF_CONTROL, offsetof(struct cpu_functions, cf_control)); ASSYM(CF_CONTEXT_SWITCH, offsetof(struct cpu_functions, cf_context_switch)); ASSYM(CF_DCACHE_WB_RANGE, offsetof(struct cpu_functions, cf_dcache_wb_range)); -ASSYM(CF_L2CACHE_WB_RANGE, offsetof(struct cpu_functions, cf_l2cache_wb_range)); ASSYM(CF_IDCACHE_WBINV_ALL, offsetof(struct cpu_functions, cf_idcache_wbinv_all)); ASSYM(CF_L2CACHE_WBINV_ALL, offsetof(struct cpu_functions, cf_l2cache_wbinv_all)); ASSYM(CF_TLB_FLUSHID_SE, offsetof(struct cpu_functions, cf_tlb_flushID_SE)); -ASSYM(V_TRAP, offsetof(struct vmmeter, v_trap)); -ASSYM(V_SOFT, offsetof(struct vmmeter, v_soft)); -ASSYM(V_INTR, offsetof(struct vmmeter, v_intr)); - ASSYM(TD_PCB, offsetof(struct thread, td_pcb)); ASSYM(TD_FLAGS, offsetof(struct thread, td_flags)); ASSYM(TD_PROC, offsetof(struct thread, td_proc)); -ASSYM(TD_FRAME, offsetof(struct thread, td_frame)); ASSYM(TD_MD, offsetof(struct thread, td_md)); ASSYM(TD_LOCK, offsetof(struct thread, td_lock)); ASSYM(MD_TP, offsetof(struct mdthread, md_tp)); @@ -146,10 +136,6 @@ ASSYM(PMAP_INCLUDE_PTE_SYNC, 1); #endif ASSYM(TDF_ASTPENDING, TDF_ASTPENDING); ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED); -ASSYM(P_TRACED, P_TRACED); -ASSYM(P_SIGEVENT, P_SIGEVENT); -ASSYM(P_PROFIL, P_PROFIL); -ASSYM(TRAPFRAMESIZE, sizeof(struct trapframe)); ASSYM(MAXCOMLEN, MAXCOMLEN); ASSYM(MAXCPU, MAXCPU); From owner-svn-src-all@freebsd.org Thu Feb 4 10:49:36 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 175D0A9C713; Thu, 4 Feb 2016 10:49:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE40EA03; Thu, 4 Feb 2016 10:49:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14AnYmV036360; Thu, 4 Feb 2016 10:49:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14AnY3x036359; Thu, 4 Feb 2016 10:49:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201602041049.u14AnY3x036359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 4 Feb 2016 10:49:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295249 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 10:49:36 -0000 Author: kib Date: Thu Feb 4 10:49:34 2016 New Revision: 295249 URL: https://svnweb.freebsd.org/changeset/base/295249 Log: Guard against runnable td2 exiting and than being reused for unrelated process when the parent sleeps waiting for the debugger attach on fork. Diagnosed and reviewed by: mjg Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_fork.c Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Thu Feb 4 09:39:08 2016 (r295248) +++ head/sys/kern/kern_fork.c Thu Feb 4 10:49:34 2016 (r295249) @@ -777,7 +777,7 @@ do_fork(struct thread *td, struct fork_r /* * Wait until debugger is attached to child. */ - while ((td2->td_dbgflags & TDB_STOPATFORK) != 0) + while (td2->td_proc == p2 && (td2->td_dbgflags & TDB_STOPATFORK) != 0) cv_wait(&p2->p_dbgwait, &p2->p_mtx); _PRELE(p2); racct_proc_fork_done(p2); From owner-svn-src-all@freebsd.org Thu Feb 4 11:52:55 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C068A9BDAC; Thu, 4 Feb 2016 11:52:55 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A7E8F17; Thu, 4 Feb 2016 11:52:55 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14Bqsl2056700; Thu, 4 Feb 2016 11:52:54 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14BqrCR056697; Thu, 4 Feb 2016 11:52:53 GMT (envelope-from br@FreeBSD.org) Message-Id: <201602041152.u14BqrCR056697@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 4 Feb 2016 11:52:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295250 - in head/sys: arm64/arm64 mips/mips riscv/riscv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 11:52:55 -0000 Author: br Date: Thu Feb 4 11:52:53 2016 New Revision: 295250 URL: https://svnweb.freebsd.org/changeset/base/295250 Log: Fix build. Modified: head/sys/arm64/arm64/vm_machdep.c head/sys/mips/mips/vm_machdep.c head/sys/riscv/riscv/vm_machdep.c Modified: head/sys/arm64/arm64/vm_machdep.c ============================================================================== --- head/sys/arm64/arm64/vm_machdep.c Thu Feb 4 10:49:34 2016 (r295249) +++ head/sys/arm64/arm64/vm_machdep.c Thu Feb 4 11:52:53 2016 (r295250) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/mips/mips/vm_machdep.c ============================================================================== --- head/sys/mips/mips/vm_machdep.c Thu Feb 4 10:49:34 2016 (r295249) +++ head/sys/mips/mips/vm_machdep.c Thu Feb 4 11:52:53 2016 (r295250) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/riscv/riscv/vm_machdep.c ============================================================================== --- head/sys/riscv/riscv/vm_machdep.c Thu Feb 4 10:49:34 2016 (r295249) +++ head/sys/riscv/riscv/vm_machdep.c Thu Feb 4 11:52:53 2016 (r295250) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include From owner-svn-src-all@freebsd.org Thu Feb 4 12:06:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4422EA9C7DB; Thu, 4 Feb 2016 12:06:08 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 161D0194B; Thu, 4 Feb 2016 12:06:08 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14C67Mj059757; Thu, 4 Feb 2016 12:06:07 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14C66Td059755; Thu, 4 Feb 2016 12:06:06 GMT (envelope-from br@FreeBSD.org) Message-Id: <201602041206.u14C66Td059755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 4 Feb 2016 12:06:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295251 - in head/sys: arm/arm sparc64/sparc64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 12:06:08 -0000 Author: br Date: Thu Feb 4 12:06:06 2016 New Revision: 295251 URL: https://svnweb.freebsd.org/changeset/base/295251 Log: Fix build. Modified: head/sys/arm/arm/vm_machdep.c head/sys/sparc64/sparc64/vm_machdep.c Modified: head/sys/arm/arm/vm_machdep.c ============================================================================== --- head/sys/arm/arm/vm_machdep.c Thu Feb 4 11:52:53 2016 (r295250) +++ head/sys/arm/arm/vm_machdep.c Thu Feb 4 12:06:06 2016 (r295251) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/sparc64/sparc64/vm_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/vm_machdep.c Thu Feb 4 11:52:53 2016 (r295250) +++ head/sys/sparc64/sparc64/vm_machdep.c Thu Feb 4 12:06:06 2016 (r295251) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include From owner-svn-src-all@freebsd.org Thu Feb 4 12:10:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44F8CA9C9FF; Thu, 4 Feb 2016 12:10:18 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 0EA9E1C8E; Thu, 4 Feb 2016 12:10:17 +0000 (UTC) (envelope-from des@des.no) Received: from desk.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id DE3D9C3FD; Thu, 4 Feb 2016 12:10:09 +0000 (UTC) Received: by desk.des.no (Postfix, from userid 1001) id 0686C4B155; Thu, 4 Feb 2016 13:10:09 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Peter Wemm Cc: svn-src-head@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r292206 - in head/contrib/unbound: . compat daemon dns64 dnstap doc iterator libunbound libunbound/python libunbound/python/doc libunbound/python/doc/modules libunbound/python/examples ... References: <201512141301.tBED1pnR087993@repo.freebsd.org> <2289655.bjqHNzHbLI@overcee.wemm.org> Date: Thu, 04 Feb 2016 13:10:08 +0100 In-Reply-To: <2289655.bjqHNzHbLI@overcee.wemm.org> (Peter Wemm's message of "Wed, 03 Feb 2016 10:10:51 -0800") Message-ID: <86powcsmlb.fsf@desk.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 12:10:18 -0000 Peter Wemm writes: > An error was introduced here that breaks some of the support scripts: It would help to name the script... If it's unbound-control-setup, the solution is to remove it, as it is no longer needed. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@freebsd.org Thu Feb 4 12:11:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 732FEA9CC36; Thu, 4 Feb 2016 12:11:20 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3331B1F82; Thu, 4 Feb 2016 12:11:20 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14CBIcO060624; Thu, 4 Feb 2016 12:11:18 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14CBIFt060621; Thu, 4 Feb 2016 12:11:18 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201602041211.u14CBIFt060621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Thu, 4 Feb 2016 12:11:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295252 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 12:11:20 -0000 Author: mmel Date: Thu Feb 4 12:11:18 2016 New Revision: 295252 URL: https://svnweb.freebsd.org/changeset/base/295252 Log: ARM: Don't use ugly (and hidden) global variable, control register is readable at any time. Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/identcpu.c head/sys/arm/include/cpufunc.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Thu Feb 4 12:06:06 2016 (r295251) +++ head/sys/arm/arm/cpufunc.c Thu Feb 4 12:11:18 2016 (r295252) @@ -88,8 +88,6 @@ u_int arm_cache_level; u_int arm_cache_type[14]; u_int arm_cache_loc; -int ctrl; - #ifdef CPU_ARM9 struct cpu_functions arm9_cpufuncs = { /* CPU functions */ @@ -889,7 +887,6 @@ arm9_setup(void) /* Set the control register */ cpu_control(cpuctrlmask, cpuctrl); - ctrl = cpuctrl; } #endif /* CPU_ARM9 */ @@ -928,7 +925,6 @@ arm10_setup(void) cpuctrl |= CPU_CONTROL_VECRELOC; /* Set the control register */ - ctrl = cpuctrl; cpu_control(0xffffffff, cpuctrl); /* And again. */ @@ -1032,7 +1028,6 @@ arm11x6_setup(void) cp15_cpacr_set(0x0fffffff); /* Set the control register */ - ctrl = cpuctrl; cpu_control(~cpuctrl_wax, cpuctrl); tmp = cp15_actlr_get(); @@ -1074,7 +1069,6 @@ pj4bv7_setup(void) cpu_idcache_wbinv_all(); /* Set the control register */ - ctrl = cpuctrl; cpu_control(0xFFFFFFFF, cpuctrl); /* And again. */ @@ -1120,7 +1114,6 @@ cortexa_setup(void) cpu_idcache_wbinv_all(); /* Set the control register */ - ctrl = cpuctrl; cpu_control(cpuctrlmask, cpuctrl); /* And again. */ @@ -1167,7 +1160,6 @@ fa526_setup(void) cpu_idcache_wbinv_all(); /* Set the control register */ - ctrl = cpuctrl; cpu_control(0xffffffff, cpuctrl); } #endif /* CPU_FA526 */ @@ -1221,7 +1213,6 @@ xscale_setup(void) * Set the control register. Note that bits 6:3 must always * be set to 1. */ - ctrl = cpuctrl; /* cpu_control(cpuctrlmask, cpuctrl);*/ cpu_control(0xffffffff, cpuctrl); Modified: head/sys/arm/arm/identcpu.c ============================================================================== --- head/sys/arm/arm/identcpu.c Thu Feb 4 12:06:06 2016 (r295251) +++ head/sys/arm/arm/identcpu.c Thu Feb 4 12:11:18 2016 (r295252) @@ -321,7 +321,6 @@ print_enadis(int enadis, char *s) printf(" %s %sabled", s, (enadis == 0) ? "dis" : "en"); } -extern int ctrl; enum cpu_class cpu_class = CPU_CLASS_NONE; u_int cpu_pfr(int num) @@ -388,9 +387,10 @@ void identify_arm_cpu(void) { u_int cpuid, reg, size, sets, ways; - u_int8_t type, linesize; + u_int8_t type, linesize, ctrl; int i; + ctrl = cpu_get_control(); cpuid = cpu_ident(); if (cpuid == 0) { Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Thu Feb 4 12:06:06 2016 (r295251) +++ head/sys/arm/include/cpufunc.h Thu Feb 4 12:11:18 2016 (r295252) @@ -202,6 +202,7 @@ u_int cpufunc_control (u_int clear, u_i void cpu_domains (u_int domains); u_int cpu_faultstatus (void); u_int cpu_faultaddress (void); +u_int cpu_get_control (void); u_int cpu_pfr (int); #if defined(CPU_FA526) From owner-svn-src-all@freebsd.org Thu Feb 4 12:49:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11CB4A9AF99; Thu, 4 Feb 2016 12:49:30 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E133F1CF7; Thu, 4 Feb 2016 12:49:29 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14CnSGs071704; Thu, 4 Feb 2016 12:49:28 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14CnS8m071697; Thu, 4 Feb 2016 12:49:28 GMT (envelope-from br@FreeBSD.org) Message-Id: <201602041249.u14CnS8m071697@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 4 Feb 2016 12:49:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295253 - in head/sys/riscv: include riscv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 12:49:30 -0000 Author: br Date: Thu Feb 4 12:49:28 2016 New Revision: 295253 URL: https://svnweb.freebsd.org/changeset/base/295253 Log: Reuse gp register for pcpu pointer. gp (global pointer) is used by compiler in userland only, so re-use it for pcpup in kernel, save it on stack on switching out to userland and load back on return to kernel. Discussed with: jhb, andrew, kib Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D5178 Modified: head/sys/riscv/include/pcpu.h head/sys/riscv/riscv/exception.S head/sys/riscv/riscv/genassym.c head/sys/riscv/riscv/machdep.c head/sys/riscv/riscv/swtch.S head/sys/riscv/riscv/vm_machdep.c Modified: head/sys/riscv/include/pcpu.h ============================================================================== --- head/sys/riscv/include/pcpu.h Thu Feb 4 12:11:18 2016 (r295252) +++ head/sys/riscv/include/pcpu.h Thu Feb 4 12:49:28 2016 (r295253) @@ -47,8 +47,11 @@ extern struct pcpu *pcpup; static inline struct pcpu * get_pcpu(void) { + struct pcpu *pcpu; - return (pcpup); + __asm __volatile("mv %0, gp" : "=&r"(pcpu)); + + return (pcpu); } static inline struct thread * @@ -56,7 +59,7 @@ get_curthread(void) { struct thread *td; - td = (struct thread *)*(uint64_t *)pcpup; + __asm __volatile("ld %0, 0(gp)" : "=&r"(td)); return (td); } Modified: head/sys/riscv/riscv/exception.S ============================================================================== --- head/sys/riscv/riscv/exception.S Thu Feb 4 12:11:18 2016 (r295252) +++ head/sys/riscv/riscv/exception.S Thu Feb 4 12:49:28 2016 (r295253) @@ -41,12 +41,16 @@ __FBSDID("$FreeBSD$"); #include .macro save_registers el - addi sp, sp, -280 + addi sp, sp, -(TF_SIZE) sd ra, (TF_RA)(sp) - sd gp, (TF_GP)(sp) sd tp, (TF_TP)(sp) +.if \el == 0 /* We came from userspace. Load our pcpu */ + sd gp, (TF_GP)(sp) + ld gp, (TF_SIZE)(sp) +.endif + sd t0, (TF_T + 0 * 8)(sp) sd t1, (TF_T + 1 * 8)(sp) sd t2, (TF_T + 2 * 8)(sp) @@ -127,13 +131,16 @@ __FBSDID("$FreeBSD$"); csrw sepc, t0 .if \el == 0 - /* Load user sp */ + /* We go to userspace. Load user sp */ ld t0, (TF_SP)(sp) csrw sscratch, t0 + + /* And store our pcpu */ + sd gp, (TF_SIZE)(sp) + ld gp, (TF_GP)(sp) .endif ld ra, (TF_RA)(sp) - ld gp, (TF_GP)(sp) ld tp, (TF_TP)(sp) ld t0, (TF_T + 0 * 8)(sp) @@ -166,7 +173,7 @@ __FBSDID("$FreeBSD$"); ld a6, (TF_A + 6 * 8)(sp) ld a7, (TF_A + 7 * 8)(sp) - addi sp, sp, 280 + addi sp, sp, (TF_SIZE) .endm .macro do_ast Modified: head/sys/riscv/riscv/genassym.c ============================================================================== --- head/sys/riscv/riscv/genassym.c Thu Feb 4 12:11:18 2016 (r295252) +++ head/sys/riscv/riscv/genassym.c Thu Feb 4 12:49:28 2016 (r295253) @@ -85,6 +85,7 @@ ASSYM(TD_FRAME, offsetof(struct thread, ASSYM(TD_MD, offsetof(struct thread, td_md)); ASSYM(TD_LOCK, offsetof(struct thread, td_lock)); +ASSYM(TF_SIZE, sizeof(struct trapframe)); ASSYM(TF_RA, offsetof(struct trapframe, tf_ra)); ASSYM(TF_SP, offsetof(struct trapframe, tf_sp)); ASSYM(TF_GP, offsetof(struct trapframe, tf_gp)); Modified: head/sys/riscv/riscv/machdep.c ============================================================================== --- head/sys/riscv/riscv/machdep.c Thu Feb 4 12:11:18 2016 (r295252) +++ head/sys/riscv/riscv/machdep.c Thu Feb 4 12:49:28 2016 (r295253) @@ -256,7 +256,9 @@ ptrace_clear_single_step(struct thread * void exec_setregs(struct thread *td, struct image_params *imgp, u_long stack) { - struct trapframe *tf = td->td_frame; + struct trapframe *tf; + + tf = td->td_frame; memset(tf, 0, sizeof(struct trapframe)); @@ -563,6 +565,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, static void init_proc0(vm_offset_t kstack) { + pcpup = &__pcpu[0]; proc_linkup0(&proc0, &thread0); @@ -760,11 +763,7 @@ initriscv(struct riscv_bootparams *rvbp) pcpu_init(pcpup, 0, sizeof(struct pcpu)); /* Set the pcpu pointer */ -#if 0 - /* SMP TODO: try re-use gp for pcpu pointer */ - __asm __volatile( - "mv gp, %0" :: "r"(pcpup)); -#endif + __asm __volatile("mv gp, %0" :: "r"(pcpup)); PCPU_SET(curthread, &thread0); Modified: head/sys/riscv/riscv/swtch.S ============================================================================== --- head/sys/riscv/riscv/swtch.S Thu Feb 4 12:11:18 2016 (r295252) +++ head/sys/riscv/riscv/swtch.S Thu Feb 4 12:49:28 2016 (r295253) @@ -74,8 +74,6 @@ ENTRY(cpu_throw) /* Load registers */ ld ra, (PCB_RA)(x13) ld sp, (PCB_SP)(x13) - ld gp, (PCB_GP)(x13) - ld tp, (PCB_TP)(x13) /* s[0-11] */ ld s0, (PCB_S + 0 * 8)(x13) @@ -120,8 +118,6 @@ ENTRY(cpu_switch) /* Store the callee-saved registers */ sd ra, (PCB_RA)(x13) sd sp, (PCB_SP)(x13) - sd gp, (PCB_GP)(x13) - sd tp, (PCB_TP)(x13) /* We use these in fork_trampoline */ sd t0, (PCB_T + 0 * 8)(x13) @@ -176,8 +172,6 @@ ENTRY(cpu_switch) /* Restore the registers */ ld ra, (PCB_RA)(x13) ld sp, (PCB_SP)(x13) - ld gp, (PCB_GP)(x13) - ld tp, (PCB_TP)(x13) /* We use these in fork_trampoline */ ld t0, (PCB_T + 0 * 8)(x13) @@ -254,12 +248,23 @@ ENTRY(fork_trampoline) ld a6, (TF_A + 6 * 8)(sp) ld a7, (TF_A + 7 * 8)(sp) + /* Load user ra and sp */ + ld tp, (TF_TP)(sp) + ld ra, (TF_RA)(sp) + + /* + * Store our pcpup on stack, we will load it back + * on kernel mode trap. + */ + sd gp, (TF_SIZE)(sp) + ld gp, (TF_GP)(sp) + /* Save kernel stack so we can use it doing a user trap */ + addi sp, sp, TF_SIZE csrw sscratch, sp - /* Load user ra and sp */ - ld ra, (TF_RA)(sp) - ld sp, (TF_SP)(sp) + /* Load user stack */ + ld sp, (TF_SP - TF_SIZE)(sp) eret END(fork_trampoline) Modified: head/sys/riscv/riscv/vm_machdep.c ============================================================================== --- head/sys/riscv/riscv/vm_machdep.c Thu Feb 4 12:11:18 2016 (r295252) +++ head/sys/riscv/riscv/vm_machdep.c Thu Feb 4 12:49:28 2016 (r295253) @@ -218,7 +218,7 @@ cpu_thread_alloc(struct thread *td) td->td_pcb = (struct pcb *)(td->td_kstack + td->td_kstack_pages * PAGE_SIZE) - 1; td->td_frame = (struct trapframe *)STACKALIGN( - td->td_pcb - 1); + (caddr_t)td->td_pcb - 8 - sizeof(struct trapframe)); } void From owner-svn-src-all@freebsd.org Thu Feb 4 13:32:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EF3CA9C0A9; Thu, 4 Feb 2016 13:32:30 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A7BC15EC; Thu, 4 Feb 2016 13:32:30 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14DWTIg085872; Thu, 4 Feb 2016 13:32:29 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14DWTu0085871; Thu, 4 Feb 2016 13:32:29 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201602041332.u14DWTu0085871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Thu, 4 Feb 2016 13:32:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295254 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 13:32:30 -0000 Author: mmel Date: Thu Feb 4 13:32:29 2016 New Revision: 295254 URL: https://svnweb.freebsd.org/changeset/base/295254 Log: ARM: RPI-B kernel was broken by r294740. Make it functional again. Modified: head/sys/arm/arm/debug_monitor.c Modified: head/sys/arm/arm/debug_monitor.c ============================================================================== --- head/sys/arm/arm/debug_monitor.c Thu Feb 4 12:49:28 2016 (r295253) +++ head/sys/arm/arm/debug_monitor.c Thu Feb 4 13:32:29 2016 (r295254) @@ -845,8 +845,10 @@ dbg_arch_supported(void) { switch (dbg_model) { +#ifdef not_yet case ID_DFR0_CP_DEBUG_M_V6: case ID_DFR0_CP_DEBUG_M_V6_1: +#endif case ID_DFR0_CP_DEBUG_M_V7: case ID_DFR0_CP_DEBUG_M_V7_1: /* fall through */ return (TRUE); From owner-svn-src-all@freebsd.org Thu Feb 4 13:35:41 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DB13A9C252; Thu, 4 Feb 2016 13:35:41 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 512A518C6; Thu, 4 Feb 2016 13:35:41 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14DZelh086033; Thu, 4 Feb 2016 13:35:40 GMT (envelope-from skra@FreeBSD.org) Received: (from skra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14DZeeM086032; Thu, 4 Feb 2016 13:35:40 GMT (envelope-from skra@FreeBSD.org) Message-Id: <201602041335.u14DZeeM086032@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skra set sender to skra@FreeBSD.org using -f From: Svatopluk Kraus Date: Thu, 4 Feb 2016 13:35:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295255 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 13:35:41 -0000 Author: skra Date: Thu Feb 4 13:35:40 2016 New Revision: 295255 URL: https://svnweb.freebsd.org/changeset/base/295255 Log: Small rearrangement of abort_handler(). (1) Move cnt.v_trap increment to the beginning. There is cnt.v_vm_faults counter in vm_fault(), so a number of hardware emulation aborts may be get roughly as difference. (2) Move kdb_reenter() up to not be ignored if pmap_fault() has failed. (3) Update comments. Modified: head/sys/arm/arm/trap-v6.c Modified: head/sys/arm/arm/trap-v6.c ============================================================================== --- head/sys/arm/arm/trap-v6.c Thu Feb 4 13:32:29 2016 (r295254) +++ head/sys/arm/arm/trap-v6.c Thu Feb 4 13:35:40 2016 (r295255) @@ -293,7 +293,10 @@ abort_handler(struct trapframe *tf, int #ifdef INVARIANTS void *onfault; #endif + + PCPU_INC(cnt.v_trap); td = curthread; + fsr = (prefetch) ? cp15_ifsr_get(): cp15_dfsr_get(); #if __ARM_ARCH >= 7 far = (prefetch) ? cp15_ifar_get() : cp15_dfar_get(); @@ -334,24 +337,23 @@ abort_handler(struct trapframe *tf, int * they are not from KVA space. Thus, no action is needed here. */ + /* + * (1) Handle access and R/W hardware emulation aborts. + * (2) Check that abort is not on pmap essential address ranges. + * There is no way how to fix it, so we don't even try. + */ rv = pmap_fault(PCPU_GET(curpmap), far, fsr, idx, usermode); if (rv == KERN_SUCCESS) return; - if (rv == KERN_INVALID_ADDRESS) - goto nogo; - /* - * Now, when we handled imprecise and debug aborts, the rest of - * aborts should be really related to mapping. - */ - - PCPU_INC(cnt.v_trap); - #ifdef KDB if (kdb_active) { kdb_reenter(); goto out; } #endif + if (rv == KERN_INVALID_ADDRESS) + goto nogo; + if (__predict_false((td->td_pflags & TDP_NOFAULTING) != 0)) { /* * Due to both processor errata and lazy TLB invalidation when @@ -418,6 +420,14 @@ abort_handler(struct trapframe *tf, int } /* + * At this point, we're dealing with one of the following aborts: + * + * FAULT_ICACHE - I-cache maintenance + * FAULT_TRAN_xx - Translation + * FAULT_PERM_xx - Permission + */ + + /* * Don't pass faulting cache operation to vm_fault(). We don't want * to handle all vm stuff at this moment. */ @@ -435,16 +445,6 @@ abort_handler(struct trapframe *tf, int goto out; } - /* - * At this point, we're dealing with one of the following aborts: - * - * FAULT_TRAN_xx - Translation - * FAULT_PERM_xx - Permission - * - * These are the main virtual memory-related faults signalled by - * the MMU. - */ - /* fusubailout is used by [fs]uswintr to avoid page faulting. */ if (__predict_false(pcb->pcb_onfault == fusubailout)) { tf->tf_r0 = EFAULT; From owner-svn-src-all@freebsd.org Thu Feb 4 13:41:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BA53A9C4F0 for ; Thu, 4 Feb 2016 13:41:53 +0000 (UTC) (envelope-from zbb@semihalf.com) Received: from mail-lf0-x232.google.com (mail-lf0-x232.google.com [IPv6:2a00:1450:4010:c07::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 10F401CE0 for ; Thu, 4 Feb 2016 13:41:53 +0000 (UTC) (envelope-from zbb@semihalf.com) Received: by mail-lf0-x232.google.com with SMTP id j78so36298197lfb.1 for ; Thu, 04 Feb 2016 05:41:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=6T3u8F/k7cMpt0zU60HFb27Gk0VOvzbzl6m9T/gPVaE=; b=fINBZ6fbEd79D49aUB+guTSxhkHW80DuImb+JDXy/R/DvUNLdoznJopftu+sdM2F0d wnrT5sz0GU36TuAQLop5C1CG5+tU5kgq0b64nJv+wtOj8hVd2ozUtOB+9HL03b59WMdy F+YyEa0okgj361A3cyOLo7h0ObI2qRmeutcYnn5h6tMhtif9XUuzRqB0sR2p7Yvoy8zY ao6ygGjs/Od2kY65zYfBhwKYbomF+yZGY7WdHAaxMOD45l2wmHWkFN6UJFXdT6DcPOHr GWgqYJgOfxUC9CP2ZMv20eFOHQWEz9p+jrpI6j24p5fZUl5iGrhG67cUTqlcIc5d5NBp f5+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=6T3u8F/k7cMpt0zU60HFb27Gk0VOvzbzl6m9T/gPVaE=; b=joCwTsGtsQLU2x3sPkcPOWJTf5pR57ktxuyHC458D38/aYzlDqdMCsJugIfSyb6ltp OOvpiZgvdF7yr31kMyx1K6CEQLwPuJEoSbZriblWEUoCOTZrq5+LfpMt+adiVu3Y2GGk b85UFaX7gWqwk9xccXDQ8Y7/23EZs5HVi4v9sWC9tllP27fYA0Q5Yrk0dYF6TbVYUxhl kOHNjEzvFvN6jvLqX6cBh3c4RtBE8D1PlowD3RurxDCT83FiBeHV7189sRa9r2wQ7eRb nHmBYK7XidnlW6lKQYD85HQX8dFnUISEC/UDST+EFUjuDn7UAl7iCfZePvljiHbQeJIA FsXg== X-Gm-Message-State: AG10YOQBDYOfS9KO43NqBs69aVi8NcXYa1/frfj4Id1++QwO1m7M174fr/PZGnHJFYYyOLDiuJHyFkyXQrazxA== X-Received: by 10.25.137.136 with SMTP id l130mr3105138lfd.158.1454593310892; Thu, 04 Feb 2016 05:41:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.198.7 with HTTP; Thu, 4 Feb 2016 05:41:31 -0800 (PST) In-Reply-To: <201602041332.u14DWTu0085871@repo.freebsd.org> References: <201602041332.u14DWTu0085871@repo.freebsd.org> From: Zbigniew Bodek Date: Thu, 4 Feb 2016 14:41:31 +0100 Message-ID: Subject: Re: svn commit: r295254 - head/sys/arm/arm To: Michal Meloun Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 13:41:53 -0000 Hello Michal, I have a fix for that that I will send for review soon (I need to test in on some other platforms): https://people.freebsd.org/~zbb/arm/other/0001-Fix-debug_monitor-code-for-older-ARMs-ARM11.patch If you don't mind I will add you to the review on Phabricator. Best regards zbb 2016-02-04 14:32 GMT+01:00 Michal Meloun : > Author: mmel > Date: Thu Feb 4 13:32:29 2016 > New Revision: 295254 > URL: https://svnweb.freebsd.org/changeset/base/295254 > > Log: > ARM: RPI-B kernel was broken by r294740. Make it functional again. > > Modified: > head/sys/arm/arm/debug_monitor.c > > Modified: head/sys/arm/arm/debug_monitor.c > > ============================================================================== > --- head/sys/arm/arm/debug_monitor.c Thu Feb 4 12:49:28 2016 > (r295253) > +++ head/sys/arm/arm/debug_monitor.c Thu Feb 4 13:32:29 2016 > (r295254) > @@ -845,8 +845,10 @@ dbg_arch_supported(void) > { > > switch (dbg_model) { > +#ifdef not_yet > case ID_DFR0_CP_DEBUG_M_V6: > case ID_DFR0_CP_DEBUG_M_V6_1: > +#endif > case ID_DFR0_CP_DEBUG_M_V7: > case ID_DFR0_CP_DEBUG_M_V7_1: /* fall through */ > return (TRUE); > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Thu Feb 4 14:02:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEBABA9CB38; Thu, 4 Feb 2016 14:02:43 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 761B5BB7; Thu, 4 Feb 2016 14:02:43 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14E2gHq094519; Thu, 4 Feb 2016 14:02:42 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14E2gmV094518; Thu, 4 Feb 2016 14:02:42 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201602041402.u14E2gmV094518@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Thu, 4 Feb 2016 14:02:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295256 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 14:02:43 -0000 Author: mmel Date: Thu Feb 4 14:02:42 2016 New Revision: 295256 URL: https://svnweb.freebsd.org/changeset/base/295256 Log: ARM: Set UNAL_ENABLE bit in SCTLR CP15 register. This bit is RAO/SBOP for ARMv7. For ARMv6, it controls ARMv5 compatible alignment support. This bit have no effect until unaligned access is enabled. Modified: head/sys/arm/arm/locore-v6.S Modified: head/sys/arm/arm/locore-v6.S ============================================================================== --- head/sys/arm/arm/locore-v6.S Thu Feb 4 13:35:40 2016 (r295255) +++ head/sys/arm/arm/locore-v6.S Thu Feb 4 14:02:42 2016 (r295256) @@ -132,9 +132,9 @@ ASENTRY_NP(_start) bic r7, #CPU_CONTROL_DC_ENABLE bic r7, #CPU_CONTROL_MMU_ENABLE bic r7, #CPU_CONTROL_IC_ENABLE - bic r7, #CPU_CONTROL_UNAL_ENABLE bic r7, #CPU_CONTROL_BPRD_ENABLE bic r7, #CPU_CONTROL_SW_ENABLE + orr r7, #CPU_CONTROL_UNAL_ENABLE orr r7, #CPU_CONTROL_AFLT_ENABLE orr r7, #CPU_CONTROL_VECRELOC mcr CP15_SCTLR(r7) @@ -456,9 +456,9 @@ ASENTRY_NP(mpentry) bic r0, #CPU_CONTROL_MMU_ENABLE bic r0, #CPU_CONTROL_DC_ENABLE bic r0, #CPU_CONTROL_IC_ENABLE - bic r0, #CPU_CONTROL_UNAL_ENABLE bic r0, #CPU_CONTROL_BPRD_ENABLE bic r0, #CPU_CONTROL_SW_ENABLE + orr r0, #CPU_CONTROL_UNAL_ENABLE orr r0, #CPU_CONTROL_AFLT_ENABLE orr r0, #CPU_CONTROL_VECRELOC mcr CP15_SCTLR(r0) From owner-svn-src-all@freebsd.org Thu Feb 4 14:15:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5046BA9B413; Thu, 4 Feb 2016 14:15:26 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1944C18B2; Thu, 4 Feb 2016 14:15:26 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14EFPB8097867; Thu, 4 Feb 2016 14:15:25 GMT (envelope-from skra@FreeBSD.org) Received: (from skra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14EFP3a097864; Thu, 4 Feb 2016 14:15:25 GMT (envelope-from skra@FreeBSD.org) Message-Id: <201602041415.u14EFP3a097864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skra set sender to skra@FreeBSD.org using -f From: Svatopluk Kraus Date: Thu, 4 Feb 2016 14:15:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295257 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 14:15:26 -0000 Author: skra Date: Thu Feb 4 14:15:24 2016 New Revision: 295257 URL: https://svnweb.freebsd.org/changeset/base/295257 Log: Make VM_MEMATTR_xxx definitions independent on pmap internals for __ARM_ARCH >= 6. It's TEX class number now, so it still has some meaning. Modified: head/sys/arm/arm/pmap-v6.c head/sys/arm/include/pmap-v6.h head/sys/arm/include/vm.h Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Thu Feb 4 14:02:42 2016 (r295256) +++ head/sys/arm/arm/pmap-v6.c Thu Feb 4 14:15:24 2016 (r295257) @@ -223,11 +223,13 @@ int pmap_debug_level = 1; /* * PTE2 descriptors creation macros. */ +#define PTE2_TEX_DEFAULT memattr_to_tex2(VM_MEMATTR_DEFAULT) + #define PTE2_KPT(pa) PTE2_KERN(pa, PTE2_AP_KRW, pt_memattr) #define PTE2_KPT_NG(pa) PTE2_KERN_NG(pa, PTE2_AP_KRW, pt_memattr) -#define PTE2_KRW(pa) PTE2_KERN(pa, PTE2_AP_KRW, PTE2_ATTR_NORMAL) -#define PTE2_KRO(pa) PTE2_KERN(pa, PTE2_AP_KR, PTE2_ATTR_NORMAL) +#define PTE2_KRW(pa) PTE2_KERN(pa, PTE2_AP_KRW, PTE2_TEX_DEFAULT) +#define PTE2_KRO(pa) PTE2_KERN(pa, PTE2_AP_KR, PTE2_TEX_DEFAULT) #define PV_STATS #ifdef PV_STATS @@ -262,10 +264,6 @@ static uint32_t ttb_flags; static vm_memattr_t pt_memattr; ttb_entry_t pmap_kern_ttb; -/* XXX use converion function*/ -#define PTE2_ATTR_NORMAL VM_MEMATTR_DEFAULT -#define PTE1_ATTR_NORMAL ATTR_TO_L1(PTE2_ATTR_NORMAL) - struct pmap kernel_pmap_store; LIST_HEAD(pmaplist, pmap); static struct pmaplist allpmaps; @@ -399,6 +397,37 @@ static uint32_t tex_class[8] = { }; #undef TEX +static uint32_t tex_attr2[8] = { + PTE2_ATTR_WB_WA, /* 0 - VM_MEMATTR_WB_WA */ + PTE2_ATTR_NOCACHE, /* 1 - VM_MEMATTR_NOCACHE */ + PTE2_ATTR_DEVICE, /* 2 - VM_MEMATTR_DEVICE */ + PTE2_ATTR_SO, /* 3 - VM_MEMATTR_SO */ + PTE2_ATTR_WT, /* 4 - VM_MEMATTR_WRITE_THROUGH */ + 0, /* 5 - NOT USED YET */ + 0, /* 6 - NOT USED YET */ + 0 /* 7 - NOT USED YET */ +}; +CTASSERT(VM_MEMATTR_WB_WA == 0); +CTASSERT(VM_MEMATTR_NOCACHE == 1); +CTASSERT(VM_MEMATTR_DEVICE == 2); +CTASSERT(VM_MEMATTR_SO == 3); +CTASSERT(VM_MEMATTR_WRITE_THROUGH == 4); + +static inline uint32_t +memattr_to_tex2(vm_memattr_t ma) +{ + + KASSERT(ma < 5, ("%s: bad vm_memattr_t %d", __func__, ma)); + return (tex_attr2[(u_int)ma]); +} + +static inline uint32_t +page_tex2(vm_page_t m) +{ + + return (memattr_to_tex2(m->md.pat_mode)); +} + /* * Convert TEX definition entry to TTB flags. */ @@ -713,7 +742,7 @@ pmap_bootstrap_prepare(vm_paddr_t last) pt1_entry_t *pte1p; pt2_entry_t *pte2p; u_int i; - uint32_t actlr_mask, actlr_set; + uint32_t actlr_mask, actlr_set, l1_attr; /* * Now, we are going to make real kernel mapping. Note that we are @@ -776,10 +805,10 @@ pmap_bootstrap_prepare(vm_paddr_t last) pte1_store(pte1p++, PTE1_LINK(pa)); /* Make section mappings for kernel. */ + l1_attr = ATTR_TO_L1(PTE2_TEX_DEFAULT); pte1p = kern_pte1(KERNBASE); for (pa = KERNEL_V2P(KERNBASE); pa < last; pa += PTE1_SIZE) - pte1_store(pte1p++, PTE1_KERN(pa, PTE1_AP_KRW, - ATTR_TO_L1(PTE2_ATTR_WB_WA))); + pte1_store(pte1p++, PTE1_KERN(pa, PTE1_AP_KRW, l1_attr)); /* * Get free and aligned space for PT2MAP and make L1 page table links @@ -988,13 +1017,14 @@ pmap_preboot_map_attr(vm_paddr_t pa, vm_ vm_prot_t prot, vm_memattr_t attr) { u_int num; - u_int l1_attr, l1_prot, l2_prot; + u_int l1_attr, l1_prot, l2_prot, l2_attr; pt1_entry_t *pte1p; pt2_entry_t *pte2p; l2_prot = prot & VM_PROT_WRITE ? PTE2_AP_KRW : PTE2_AP_KR; + l2_attr = memattr_to_tex2(attr); l1_prot = ATTR_TO_L1(l2_prot); - l1_attr = ATTR_TO_L1(attr); + l1_attr = ATTR_TO_L1(l2_attr); /* Map all the pages. */ num = round_page(size); @@ -1007,7 +1037,7 @@ pmap_preboot_map_attr(vm_paddr_t pa, vm_ num -= PTE1_SIZE; } else { pte2p = pmap_preboot_vtopte2(va); - pte2_store(pte2p, PTE2_KERN(pa, l2_prot, attr)); + pte2_store(pte2p, PTE2_KERN(pa, l2_prot, l2_attr)); va += PAGE_SIZE; pa += PAGE_SIZE; num -= PAGE_SIZE; @@ -1247,7 +1277,7 @@ PMAP_INLINE void pmap_kenter(vm_offset_t va, vm_paddr_t pa) { - pmap_kenter_prot_attr(va, pa, PTE2_AP_KRW, PTE2_ATTR_NORMAL); + pmap_kenter_prot_attr(va, pa, PTE2_AP_KRW, PTE2_TEX_DEFAULT); } /* @@ -1320,7 +1350,8 @@ pmap_map(vm_offset_t *virt, vm_paddr_t s vm_offset_t va, sva; vm_paddr_t pte1_offset; pt1_entry_t npte1; - u_int l1prot,l2prot; + uint32_t l1prot, l2prot; + uint32_t l1attr, l2attr; PDEBUG(1, printf("%s: virt = %#x, start = %#x, end = %#x (size = %#x)," " prot = %d\n", __func__, *virt, start, end, end - start, prot)); @@ -1329,6 +1360,9 @@ pmap_map(vm_offset_t *virt, vm_paddr_t s l2prot |= (prot & VM_PROT_EXECUTE) ? PTE2_X : PTE2_NX; l1prot = ATTR_TO_L1(l2prot); + l2attr = PTE2_TEX_DEFAULT; + l1attr = ATTR_TO_L1(l2attr); + va = *virt; /* * Does the physical address range's size and alignment permit at @@ -1351,13 +1385,12 @@ pmap_map(vm_offset_t *virt, vm_paddr_t s if ((start & PTE1_OFFSET) == 0 && end - start >= PTE1_SIZE) { KASSERT((va & PTE1_OFFSET) == 0, ("%s: misaligned va %#x", __func__, va)); - npte1 = PTE1_KERN(start, l1prot, PTE1_ATTR_NORMAL); + npte1 = PTE1_KERN(start, l1prot, l1attr); pmap_kenter_pte1(va, npte1); va += PTE1_SIZE; start += PTE1_SIZE; } else { - pmap_kenter_prot_attr(va, start, l2prot, - PTE2_ATTR_NORMAL); + pmap_kenter_prot_attr(va, start, l2prot, l2attr); va += PAGE_SIZE; start += PAGE_SIZE; } @@ -1527,7 +1560,7 @@ pmap_page_init(vm_page_t m) TAILQ_INIT(&m->md.pv_list); pt2_wirecount_init(m); - m->md.pat_mode = PTE2_ATTR_NORMAL; + m->md.pat_mode = VM_MEMATTR_DEFAULT; } /* @@ -1561,8 +1594,7 @@ pmap_pt2pg_zero(vm_page_t m) mtx_lock(&sysmaps->lock); if (pte2_load(sysmaps->CMAP2) != 0) panic("%s: CMAP2 busy", __func__); - pte2_store(sysmaps->CMAP2, PTE2_KERN_NG(pa, PTE2_AP_KRW, - m->md.pat_mode)); + pte2_store(sysmaps->CMAP2, PTE2_KERN_NG(pa, PTE2_AP_KRW, page_tex2(m))); /* Even VM_ALLOC_ZERO request is only advisory. */ if ((m->flags & PG_ZERO) == 0) pagezero(sysmaps->CADDR2); @@ -1586,7 +1618,7 @@ pmap_pt2pg_init(pmap_t pmap, vm_offset_t pt2_entry_t *pte2p; /* Check page attributes. */ - if (pmap_page_get_memattr(m) != pt_memattr) + if (m->md.pat_mode != pt_memattr) pmap_page_set_memattr(m, pt_memattr); /* Zero page and init wire counts. */ @@ -1717,10 +1749,10 @@ pmap_qenter(vm_offset_t sva, vm_page_t * pa = VM_PAGE_TO_PHYS(m); pte2 = pte2_load(pte2p); if ((pte2_pa(pte2) != pa) || - (pte2_attr(pte2) != m->md.pat_mode)) { + (pte2_attr(pte2) != page_tex2(m))) { anychanged++; pte2_store(pte2p, PTE2_KERN(pa, PTE2_AP_KRW, - m->md.pat_mode)); + page_tex2(m))); } pte2p++; } @@ -3770,7 +3802,7 @@ validate: /* * Now validate mapping with desired protection/wiring. */ - npte2 = PTE2(pa, PTE2_NM, m->md.pat_mode); + npte2 = PTE2(pa, PTE2_NM, page_tex2(m)); if (prot & VM_PROT_WRITE) { if (pte2_is_managed(npte2)) vm_page_aflag_set(m, PGA_WRITEABLE); @@ -3795,7 +3827,7 @@ validate: */ if ((opte2 & ~(PTE2_NM | PTE2_A)) != (npte2 & ~(PTE2_NM | PTE2_A))) { /* - * Sync icache if exec permission and attribute PTE2_ATTR_WB_WA + * Sync icache if exec permission and attribute VM_MEMATTR_WB_WA * is set. Do it now, before the mapping is stored and made * valid for hardware table walk. If done later, there is a race * for other threads of current process in lazy loading case. @@ -3810,7 +3842,7 @@ validate: * (2) Now, we do it on a page basis. */ if ((prot & VM_PROT_EXECUTE) && pmap != kernel_pmap && - m->md.pat_mode == PTE2_ATTR_WB_WA && + m->md.pat_mode == VM_MEMATTR_WB_WA && (opa != pa || (opte2 & PTE2_NX))) cache_icache_sync_fresh(va, pa, PAGE_SIZE); @@ -4410,14 +4442,14 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ l2prot |= PTE2_U | PTE2_NG; if ((prot & VM_PROT_EXECUTE) == 0) l2prot |= PTE2_NX; - else if (m->md.pat_mode == PTE2_ATTR_WB_WA && pmap != kernel_pmap) { + else if (m->md.pat_mode == VM_MEMATTR_WB_WA && pmap != kernel_pmap) { /* - * Sync icache if exec permission and attribute PTE2_ATTR_WB_WA + * Sync icache if exec permission and attribute VM_MEMATTR_WB_WA * is set. QQQ: For more info, see comments in pmap_enter(). */ cache_icache_sync_fresh(va, pa, PAGE_SIZE); } - pte2_store(pte2p, PTE2(pa, l2prot, m->md.pat_mode)); + pte2_store(pte2p, PTE2(pa, l2prot, page_tex2(m))); return (mpt2pg); } @@ -4481,14 +4513,14 @@ pmap_enter_pte1(pmap_t pmap, vm_offset_t l1prot |= PTE1_U | PTE1_NG; if ((prot & VM_PROT_EXECUTE) == 0) l1prot |= PTE1_NX; - else if (m->md.pat_mode == PTE2_ATTR_WB_WA && pmap != kernel_pmap) { + else if (m->md.pat_mode == VM_MEMATTR_WB_WA && pmap != kernel_pmap) { /* - * Sync icache if exec permission and attribute PTE2_ATTR_WB_WA + * Sync icache if exec permission and attribute VM_MEMATTR_WB_WA * is set. QQQ: For more info, see comments in pmap_enter(). */ cache_icache_sync_fresh(va, pa, PTE1_SIZE); } - pte1_store(pte1p, PTE1(pa, l1prot, ATTR_TO_L1(m->md.pat_mode))); + pte1_store(pte1p, PTE1(pa, l1prot, ATTR_TO_L1(page_tex2(m)))); pmap_pte1_mappings++; CTR3(KTR_PMAP, "%s: success for va %#lx in pmap %p", __func__, va, @@ -4552,7 +4584,7 @@ pmap_object_init_pt(pmap_t pmap, vm_offs pt1_entry_t *pte1p; vm_paddr_t pa, pte2_pa; vm_page_t p; - int pat_mode; + vm_memattr_t pat_mode; u_int l1attr, l1prot; VM_OBJECT_ASSERT_WLOCKED(object); @@ -4598,7 +4630,7 @@ pmap_object_init_pt(pmap_t pmap, vm_offs * is done here, so readonly mapping must be done elsewhere. */ l1prot = PTE1_U | PTE1_NG | PTE1_RW | PTE1_M | PTE1_A; - l1attr = ATTR_TO_L1(pat_mode); + l1attr = ATTR_TO_L1(memattr_to_tex2(pat_mode)); PMAP_LOCK(pmap); for (pa = pte2_pa; pa < pte2_pa + size; pa += PTE1_SIZE) { pte1p = pmap_pte1(pmap, addr); @@ -5492,7 +5524,8 @@ pmap_page_set_memattr(vm_page_t m, vm_me mtx_lock(&sysmaps->lock); if (*sysmaps->CMAP2) panic("%s: CMAP2 busy", __func__); - pte2_store(sysmaps->CMAP2, PTE2_KERN_NG(pa, PTE2_AP_KRW, ma)); + pte2_store(sysmaps->CMAP2, PTE2_KERN_NG(pa, PTE2_AP_KRW, + memattr_to_tex2(ma))); dcache_wbinv_poc((vm_offset_t)sysmaps->CADDR2, pa, PAGE_SIZE); pte2_clear(sysmaps->CMAP2); tlb_flush((vm_offset_t)sysmaps->CADDR2); @@ -5583,7 +5616,7 @@ pmap_zero_page(vm_page_t m) if (pte2_load(sysmaps->CMAP2) != 0) panic("%s: CMAP2 busy", __func__); pte2_store(sysmaps->CMAP2, PTE2_KERN_NG(VM_PAGE_TO_PHYS(m), PTE2_AP_KRW, - m->md.pat_mode)); + page_tex2(m))); pagezero(sysmaps->CADDR2); pte2_clear(sysmaps->CMAP2); tlb_flush((vm_offset_t)sysmaps->CADDR2); @@ -5608,7 +5641,7 @@ pmap_zero_page_area(vm_page_t m, int off if (pte2_load(sysmaps->CMAP2) != 0) panic("%s: CMAP2 busy", __func__); pte2_store(sysmaps->CMAP2, PTE2_KERN_NG(VM_PAGE_TO_PHYS(m), PTE2_AP_KRW, - m->md.pat_mode)); + page_tex2(m))); if (off == 0 && size == PAGE_SIZE) pagezero(sysmaps->CADDR2); else @@ -5633,7 +5666,7 @@ pmap_zero_page_idle(vm_page_t m) panic("%s: CMAP3 busy", __func__); sched_pin(); pte2_store(CMAP3, PTE2_KERN_NG(VM_PAGE_TO_PHYS(m), PTE2_AP_KRW, - m->md.pat_mode)); + page_tex2(m))); pagezero(CADDR3); pte2_clear(CMAP3); tlb_flush((vm_offset_t)CADDR3); @@ -5659,9 +5692,9 @@ pmap_copy_page(vm_page_t src, vm_page_t if (pte2_load(sysmaps->CMAP2) != 0) panic("%s: CMAP2 busy", __func__); pte2_store(sysmaps->CMAP1, PTE2_KERN_NG(VM_PAGE_TO_PHYS(src), - PTE2_AP_KR | PTE2_NM, src->md.pat_mode)); + PTE2_AP_KR | PTE2_NM, page_tex2(src))); pte2_store(sysmaps->CMAP2, PTE2_KERN_NG(VM_PAGE_TO_PHYS(dst), - PTE2_AP_KRW, dst->md.pat_mode)); + PTE2_AP_KRW, page_tex2(dst))); bcopy(sysmaps->CADDR1, sysmaps->CADDR2, PAGE_SIZE); pte2_clear(sysmaps->CMAP1); tlb_flush((vm_offset_t)sysmaps->CADDR1); @@ -5698,10 +5731,10 @@ pmap_copy_pages(vm_page_t ma[], vm_offse b_pg_offset = b_offset & PAGE_MASK; cnt = min(cnt, PAGE_SIZE - b_pg_offset); pte2_store(sysmaps->CMAP1, PTE2_KERN_NG(VM_PAGE_TO_PHYS(a_pg), - PTE2_AP_KR | PTE2_NM, a_pg->md.pat_mode)); + PTE2_AP_KR | PTE2_NM, page_tex2(a_pg))); tlb_flush_local((vm_offset_t)sysmaps->CADDR1); pte2_store(sysmaps->CMAP2, PTE2_KERN_NG(VM_PAGE_TO_PHYS(b_pg), - PTE2_AP_KRW, b_pg->md.pat_mode)); + PTE2_AP_KRW, page_tex2(b_pg))); tlb_flush_local((vm_offset_t)sysmaps->CADDR2); a_cp = sysmaps->CADDR1 + a_pg_offset; b_cp = sysmaps->CADDR2 + b_pg_offset; @@ -5731,7 +5764,7 @@ pmap_quick_enter_page(vm_page_t m) KASSERT(pte2_load(pte2p) == 0, ("%s: PTE2 busy", __func__)); pte2_store(pte2p, PTE2_KERN_NG(VM_PAGE_TO_PHYS(m), PTE2_AP_KRW, - pmap_page_get_memattr(m))); + page_tex2(m))); return (qmap_addr); } @@ -5993,13 +6026,15 @@ void pmap_kenter_device(vm_offset_t va, vm_size_t size, vm_paddr_t pa) { vm_offset_t sva; + uint32_t l2attr; KASSERT((size & PAGE_MASK) == 0, ("%s: device mapping not page-sized", __func__)); sva = va; + l2attr = memattr_to_tex2(VM_MEMATTR_DEVICE); while (size != 0) { - pmap_kenter_prot_attr(va, pa, PTE2_AP_KRW, PTE2_ATTR_DEVICE); + pmap_kenter_prot_attr(va, pa, PTE2_AP_KRW, l2attr); va += PAGE_SIZE; pa += PAGE_SIZE; size -= PAGE_SIZE; @@ -6073,7 +6108,7 @@ cache_icache_sync_fresh(vm_offset_t va, m = PHYS_TO_VM_PAGE(pa); KASSERT(m != NULL, ("%s: vm_page_t is null for %#x", __func__, pa)); - pmap_dcache_wb_pou(pa, len, m->md.pat_mode); + pmap_dcache_wb_pou(pa, len, page_tex2(m)); } /* * I-cache is VIPT. Only way how to flush all virtual mappings @@ -6101,7 +6136,7 @@ pmap_sync_icache(pmap_t pmap, vm_offset_ m = PHYS_TO_VM_PAGE(pa); KASSERT(m != NULL, ("%s: vm_page_t is null for %#x", __func__, pa)); - pmap_dcache_wb_pou(pa, len, m->md.pat_mode); + pmap_dcache_wb_pou(pa, len, page_tex2(m)); } } /* @@ -6298,7 +6333,7 @@ pmap_zero_page_check(vm_page_t m) if (pte2_load(sysmaps->CMAP2) != 0) panic("%s: CMAP2 busy", __func__); pte2_store(sysmaps->CMAP2, PTE2_KERN_NG(VM_PAGE_TO_PHYS(m), PTE2_AP_KRW, - m->md.pat_mode)); + page_tex2(m))); end = (uint32_t*)(sysmaps->CADDR2 + PAGE_SIZE); for (p = (uint32_t*)sysmaps->CADDR2; p < end; p++) if (*p != 0) Modified: head/sys/arm/include/pmap-v6.h ============================================================================== --- head/sys/arm/include/pmap-v6.h Thu Feb 4 14:02:42 2016 (r295256) +++ head/sys/arm/include/pmap-v6.h Thu Feb 4 14:15:24 2016 (r295257) @@ -115,7 +115,7 @@ struct pv_chunk; struct md_page { TAILQ_HEAD(,pv_entry) pv_list; uint16_t pt2_wirecount[4]; - int pat_mode; + vm_memattr_t pat_mode; }; struct pmap { @@ -173,7 +173,7 @@ struct pv_chunk { struct pcb; extern ttb_entry_t pmap_kern_ttb; /* TTB for kernel pmap */ -#define pmap_page_get_memattr(m) ((vm_memattr_t)(m)->md.pat_mode) +#define pmap_page_get_memattr(m) ((m)->md.pat_mode) #define pmap_page_is_write_mapped(m) (((m)->aflags & PGA_WRITEABLE) != 0) /* Modified: head/sys/arm/include/vm.h ============================================================================== --- head/sys/arm/include/vm.h Thu Feb 4 14:02:42 2016 (r295256) +++ head/sys/arm/include/vm.h Thu Feb 4 14:15:24 2016 (r295257) @@ -34,11 +34,11 @@ #if __ARM_ARCH >= 6 #include -#define VM_MEMATTR_WB_WA ((vm_memattr_t)PTE2_ATTR_WB_WA) -#define VM_MEMATTR_NOCACHE ((vm_memattr_t)PTE2_ATTR_NOCACHE) -#define VM_MEMATTR_DEVICE ((vm_memattr_t)PTE2_ATTR_DEVICE) -#define VM_MEMATTR_SO ((vm_memattr_t)PTE2_ATTR_SO) -#define VM_MEMATTR_WRITE_THROUGH ((vm_memattr_t)PTE2_ATTR_WT) +#define VM_MEMATTR_WB_WA ((vm_memattr_t)0) +#define VM_MEMATTR_NOCACHE ((vm_memattr_t)1) +#define VM_MEMATTR_DEVICE ((vm_memattr_t)2) +#define VM_MEMATTR_SO ((vm_memattr_t)3) +#define VM_MEMATTR_WRITE_THROUGH ((vm_memattr_t)4) #define VM_MEMATTR_DEFAULT VM_MEMATTR_WB_WA #define VM_MEMATTR_UNCACHEABLE VM_MEMATTR_SO /* misused by DMA */ From owner-svn-src-all@freebsd.org Thu Feb 4 14:30:48 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5913FA9BB98; Thu, 4 Feb 2016 14:30:48 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CCCC6BA; Thu, 4 Feb 2016 14:30:47 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14EUk6u001358; Thu, 4 Feb 2016 14:30:46 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14EUkq4001355; Thu, 4 Feb 2016 14:30:46 GMT (envelope-from br@FreeBSD.org) Message-Id: <201602041430.u14EUkq4001355@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 4 Feb 2016 14:30:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295258 - in head/sys/riscv: include riscv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 14:30:48 -0000 Author: br Date: Thu Feb 4 14:30:46 2016 New Revision: 295258 URL: https://svnweb.freebsd.org/changeset/base/295258 Log: Access pcpup using gp register. Modified: head/sys/riscv/include/asm.h head/sys/riscv/riscv/exception.S head/sys/riscv/riscv/swtch.S Modified: head/sys/riscv/include/asm.h ============================================================================== --- head/sys/riscv/include/asm.h Thu Feb 4 14:15:24 2016 (r295257) +++ head/sys/riscv/include/asm.h Thu Feb 4 14:30:46 2016 (r295258) @@ -59,9 +59,7 @@ .set alias,sym #define SET_FAULT_HANDLER(handler, tmp) \ - la tmp, pcpup; \ - ld tmp, 0(tmp); \ - ld tmp, PC_CURTHREAD(tmp); \ + ld tmp, PC_CURTHREAD(gp); \ ld tmp, TD_PCB(tmp); /* Load the pcb */ \ sd handler, PCB_ONFAULT(tmp) /* Set the handler */ Modified: head/sys/riscv/riscv/exception.S ============================================================================== --- head/sys/riscv/riscv/exception.S Thu Feb 4 14:15:24 2016 (r295257) +++ head/sys/riscv/riscv/exception.S Thu Feb 4 14:30:46 2016 (r295258) @@ -182,9 +182,7 @@ __FBSDID("$FreeBSD$"); 1: csrci sstatus, SSTATUS_IE - la a1, pcpup - ld a1, 0(a1) - ld a1, PC_CURTHREAD(a1) + ld a1, PC_CURTHREAD(gp) lw a2, TD_FLAGS(a1) li a3, (TDF_ASTPENDING|TDF_NEEDRESCHED) Modified: head/sys/riscv/riscv/swtch.S ============================================================================== --- head/sys/riscv/riscv/swtch.S Thu Feb 4 14:15:24 2016 (r295257) +++ head/sys/riscv/riscv/swtch.S Thu Feb 4 14:30:46 2016 (r295258) @@ -46,14 +46,11 @@ __FBSDID("$FreeBSD$"); * void cpu_throw(struct thread *old, struct thread *new) */ ENTRY(cpu_throw) - /* Load pcpu */ - la x14, pcpup - ld x14, 0(x14) /* Store the new curthread */ - sd a1, PC_CURTHREAD(x14) + sd a1, PC_CURTHREAD(gp) /* And the new pcb */ ld x13, TD_PCB(a1) - sd x13, PC_CURPCB(x14) + sd x13, PC_CURPCB(gp) sfence.vm @@ -103,14 +100,11 @@ END(cpu_throw) * x3 to x7, x16 and x17 are caller saved */ ENTRY(cpu_switch) - /* Load pcpu */ - la x14, pcpup - ld x14, 0(x14) /* Store the new curthread */ - sd a1, PC_CURTHREAD(x14) + sd a1, PC_CURTHREAD(gp) /* And the new pcb */ ld x13, TD_PCB(a1) - sd x13, PC_CURPCB(x14) + sd x13, PC_CURPCB(gp) /* Save the old context. */ ld x13, TD_PCB(a0) From owner-svn-src-all@freebsd.org Thu Feb 4 14:32:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACEAFA9BD83; Thu, 4 Feb 2016 14:32:49 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87EBFA26; Thu, 4 Feb 2016 14:32:49 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14EWmCj004027; Thu, 4 Feb 2016 14:32:48 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14EWmLc004026; Thu, 4 Feb 2016 14:32:48 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201602041432.u14EWmLc004026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Thu, 4 Feb 2016 14:32:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295259 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 14:32:49 -0000 Author: mmel Date: Thu Feb 4 14:32:48 2016 New Revision: 295259 URL: https://svnweb.freebsd.org/changeset/base/295259 Log: ARM: For ARMv6/v7, code in locore.S initializes SCTLR and ACTRL registers. Don't duplicate this initialization in cpu_setup(). Modified: head/sys/arm/arm/cpufunc.c Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Thu Feb 4 14:30:46 2016 (r295258) +++ head/sys/arm/arm/cpufunc.c Thu Feb 4 14:32:48 2016 (r295259) @@ -966,47 +966,12 @@ cpu_scc_setup_ccnt(void) void arm11x6_setup(void) { - int cpuctrl, cpuctrl_wax; uint32_t auxctrl, auxctrl_wax; uint32_t tmp, tmp2; - uint32_t sbz=0; uint32_t cpuid; cpuid = cpu_ident(); - cpuctrl = - CPU_CONTROL_MMU_ENABLE | - CPU_CONTROL_DC_ENABLE | - CPU_CONTROL_WBUF_ENABLE | - CPU_CONTROL_32BP_ENABLE | - CPU_CONTROL_32BD_ENABLE | - CPU_CONTROL_LABT_ENABLE | - CPU_CONTROL_SYST_ENABLE | - CPU_CONTROL_IC_ENABLE | - CPU_CONTROL_UNAL_ENABLE; - - /* - * "write as existing" bits - * inverse of this is mask - */ - cpuctrl_wax = - (3 << 30) | /* SBZ */ - (1 << 29) | /* FA */ - (1 << 28) | /* TR */ - (3 << 26) | /* SBZ */ - (3 << 19) | /* SBZ */ - (1 << 17); /* SBZ */ - - cpuctrl |= CPU_CONTROL_BPRD_ENABLE; - cpuctrl |= CPU_CONTROL_V6_EXTPAGE; - -#ifdef __ARMEB__ - cpuctrl |= CPU_CONTROL_BEND_ENABLE; -#endif - - if (vector_page == ARM_VECTORS_HIGH) - cpuctrl |= CPU_CONTROL_VECRELOC; - auxctrl = 0; auxctrl_wax = ~0; @@ -1018,18 +983,6 @@ arm11x6_setup(void) auxctrl_wax = ~ARM1176_AUXCTL_PHD; } - /* Clear out the cache */ - cpu_idcache_wbinv_all(); - - /* Now really make sure they are clean. */ - __asm volatile ("mcr\tp15, 0, %0, c7, c7, 0" : : "r"(sbz)); - - /* Allow detection code to find the VFP if it's fitted. */ - cp15_cpacr_set(0x0fffffff); - - /* Set the control register */ - cpu_control(~cpuctrl_wax, cpuctrl); - tmp = cp15_actlr_get(); tmp2 = tmp; tmp &= auxctrl_wax; @@ -1037,9 +990,6 @@ arm11x6_setup(void) if (tmp != tmp2) cp15_actlr_set(tmp); - /* And again. */ - cpu_idcache_wbinv_all(); - cpu_scc_setup_ccnt(); } #endif /* CPU_ARM1176 */ @@ -1048,32 +998,8 @@ arm11x6_setup(void) void pj4bv7_setup(void) { - int cpuctrl; pj4b_config(); - - cpuctrl = CPU_CONTROL_MMU_ENABLE; -#ifndef ARM32_DISABLE_ALIGNMENT_FAULTS - cpuctrl |= CPU_CONTROL_AFLT_ENABLE; -#endif - cpuctrl |= CPU_CONTROL_DC_ENABLE; - cpuctrl |= (0xf << 3); - cpuctrl |= CPU_CONTROL_BPRD_ENABLE; - cpuctrl |= CPU_CONTROL_IC_ENABLE; - if (vector_page == ARM_VECTORS_HIGH) - cpuctrl |= CPU_CONTROL_VECRELOC; - cpuctrl |= (0x5 << 16) | (1 < 22); - cpuctrl |= CPU_CONTROL_V6_EXTPAGE; - - /* Clear out the cache */ - cpu_idcache_wbinv_all(); - - /* Set the control register */ - cpu_control(0xFFFFFFFF, cpuctrl); - - /* And again. */ - cpu_idcache_wbinv_all(); - cpu_scc_setup_ccnt(); } #endif /* CPU_MV_PJ4B */ @@ -1083,44 +1009,6 @@ pj4bv7_setup(void) void cortexa_setup(void) { - int cpuctrl, cpuctrlmask; - - cpuctrlmask = CPU_CONTROL_MMU_ENABLE | /* MMU enable [0] */ - CPU_CONTROL_AFLT_ENABLE | /* Alignment fault [1] */ - CPU_CONTROL_DC_ENABLE | /* DCache enable [2] */ - CPU_CONTROL_BPRD_ENABLE | /* Branch prediction [11] */ - CPU_CONTROL_IC_ENABLE | /* ICache enable [12] */ - CPU_CONTROL_VECRELOC; /* Vector relocation [13] */ - - cpuctrl = CPU_CONTROL_MMU_ENABLE | - CPU_CONTROL_IC_ENABLE | - CPU_CONTROL_DC_ENABLE | - CPU_CONTROL_BPRD_ENABLE; - -#ifndef ARM32_DISABLE_ALIGNMENT_FAULTS - cpuctrl |= CPU_CONTROL_AFLT_ENABLE; -#endif - - /* Switch to big endian */ -#ifdef __ARMEB__ - cpuctrl |= CPU_CONTROL_BEND_ENABLE; -#endif - - /* Check if the vector page is at the high address (0xffff0000) */ - if (vector_page == ARM_VECTORS_HIGH) - cpuctrl |= CPU_CONTROL_VECRELOC; - - /* Clear out the cache */ - cpu_idcache_wbinv_all(); - - /* Set the control register */ - cpu_control(cpuctrlmask, cpuctrl); - - /* And again. */ - cpu_idcache_wbinv_all(); -#if defined(SMP) && !defined(ARM_NEW_PMAP) - armv7_auxctrl((1 << 6) | (1 << 0), (1 << 6) | (1 << 0)); /* Enable SMP + TLB broadcasting */ -#endif cpu_scc_setup_ccnt(); } From owner-svn-src-all@freebsd.org Thu Feb 4 14:52:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A6C8A9A834; Thu, 4 Feb 2016 14:52:49 +0000 (UTC) (envelope-from mmel@freebsd.org) Received: from mail.miracle.cz (mail.miracle.cz [193.84.128.19]) by mx1.freebsd.org (Postfix) with ESMTP id D9B9FF5; Thu, 4 Feb 2016 14:52:48 +0000 (UTC) (envelope-from mmel@freebsd.org) Received: from [193.84.128.50] (meloun.ad.miracle.cz [193.84.128.50]) by mail.miracle.cz (Postfix) with ESMTPSA id 5398A400F1; Thu, 4 Feb 2016 15:45:11 +0100 (CET) Subject: Re: svn commit: r295254 - head/sys/arm/arm To: Zbigniew Bodek References: <201602041332.u14DWTu0085871@repo.freebsd.org> Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Michal Meloun X-Enigmail-Draft-Status: N0020 Organization: freebsd.org Message-ID: <56B363F7.6000003@freebsd.org> Date: Thu, 4 Feb 2016 15:45:11 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.miracle.cz); Thu, 04 Feb 2016 15:45:11 +0100 (CET) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 14:52:49 -0000 Yep, I'm ready to review your patch. Allow me one question in forward. How this patch affects JTAG based debugging of kernel? Mainly if I start kernel under JTAG debugger, with active breakpoints (or watchpoints). Michal Dne 04.02.2016 v 14:41 Zbigniew Bodek napsal(a): > Hello Michal, > > I have a fix for that that I will send for review soon (I need to test > in on some other platforms): > https://people.freebsd.org/~zbb/arm/other/0001-Fix-debug_monitor-code-for-older-ARMs-ARM11.patch > > > If you don't mind I will add you to the review on Phabricator. > > Best regards > zbb > > 2016-02-04 14:32 GMT+01:00 Michal Meloun >: > > Author: mmel > Date: Thu Feb 4 13:32:29 2016 > New Revision: 295254 > URL: https://svnweb.freebsd.org/changeset/base/295254 > > Log: > ARM: RPI-B kernel was broken by r294740. Make it functional again. > > Modified: > head/sys/arm/arm/debug_monitor.c > > Modified: head/sys/arm/arm/debug_monitor.c > ============================================================================== > --- head/sys/arm/arm/debug_monitor.c Thu Feb 4 12:49:28 2016 > (r295253) > +++ head/sys/arm/arm/debug_monitor.c Thu Feb 4 13:32:29 2016 > (r295254) > @@ -845,8 +845,10 @@ dbg_arch_supported(void) > { > > switch (dbg_model) { > +#ifdef not_yet > case ID_DFR0_CP_DEBUG_M_V6: > case ID_DFR0_CP_DEBUG_M_V6_1: > +#endif > case ID_DFR0_CP_DEBUG_M_V7: > case ID_DFR0_CP_DEBUG_M_V7_1: /* fall through */ > return (TRUE); > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to > "svn-src-all-unsubscribe@freebsd.org > " > > From owner-svn-src-all@freebsd.org Thu Feb 4 15:10:10 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36C15A991A4; Thu, 4 Feb 2016 15:10:10 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1D0CCFD; Thu, 4 Feb 2016 15:10:09 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14FA8E2013351; Thu, 4 Feb 2016 15:10:08 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14FA8qn013350; Thu, 4 Feb 2016 15:10:08 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201602041510.u14FA8qn013350@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 4 Feb 2016 15:10:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295260 - head/bin/dd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 15:10:10 -0000 Author: trasz Date: Thu Feb 4 15:10:08 2016 New Revision: 295260 URL: https://svnweb.freebsd.org/changeset/base/295260 Log: Reduce code duplication. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/bin/dd/args.c Modified: head/bin/dd/args.c ============================================================================== --- head/bin/dd/args.c Thu Feb 4 14:32:48 2016 (r295259) +++ head/bin/dd/args.c Thu Feb 4 15:10:08 2016 (r295260) @@ -360,6 +360,38 @@ c_conv(const void *a, const void *b) ((const struct conv *)b)->name)); } +static uintmax_t +postfix_to_mult(const char expr) +{ + uintmax_t mult; + + mult = 0; + switch (expr) { + case 'B': + case 'b': + mult = 512; + break; + case 'K': + case 'k': + mult = 1 << 10; + break; + case 'M': + case 'm': + mult = 1 << 20; + break; + case 'G': + case 'g': + mult = 1 << 30; + break; + case 'W': + case 'w': + mult = sizeof(int); + break; + } + + return (mult); +} + /* * Convert an expression of the following forms to a uintmax_t. * 1) A positive decimal number. @@ -386,31 +418,7 @@ get_num(const char *val) if (expr == val) /* No valid digits. */ errx(1, "%s: illegal numeric value", oper); - mult = 0; - switch (*expr) { - case 'B': - case 'b': - mult = 512; - break; - case 'K': - case 'k': - mult = 1 << 10; - break; - case 'M': - case 'm': - mult = 1 << 20; - break; - case 'G': - case 'g': - mult = 1 << 30; - break; - case 'W': - case 'w': - mult = sizeof(int); - break; - default: - ; - } + mult = postfix_to_mult(*expr); if (mult != 0) { prevnum = num; @@ -460,29 +468,7 @@ get_off_t(const char *val) if (expr == val) /* No valid digits. */ errx(1, "%s: illegal numeric value", oper); - mult = 0; - switch (*expr) { - case 'B': - case 'b': - mult = 512; - break; - case 'K': - case 'k': - mult = 1 << 10; - break; - case 'M': - case 'm': - mult = 1 << 20; - break; - case 'G': - case 'g': - mult = 1 << 30; - break; - case 'W': - case 'w': - mult = sizeof(int); - break; - } + mult = postfix_to_mult(*expr); if (mult != 0) { prevnum = num; From owner-svn-src-all@freebsd.org Thu Feb 4 15:21:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 492F2A998EF; Thu, 4 Feb 2016 15:21:03 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 189051888; Thu, 4 Feb 2016 15:21:03 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14FL2Cx018407; Thu, 4 Feb 2016 15:21:02 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14FL1gX018405; Thu, 4 Feb 2016 15:21:01 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201602041521.u14FL1gX018405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 4 Feb 2016 15:21:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295261 - head/bin/dd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 15:21:03 -0000 Author: trasz Date: Thu Feb 4 15:21:01 2016 New Revision: 295261 URL: https://svnweb.freebsd.org/changeset/base/295261 Log: Add 't' and 'p' postfixes to dd(1). MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/bin/dd/args.c head/bin/dd/dd.1 Modified: head/bin/dd/args.c ============================================================================== --- head/bin/dd/args.c Thu Feb 4 15:10:08 2016 (r295260) +++ head/bin/dd/args.c Thu Feb 4 15:21:01 2016 (r295261) @@ -383,6 +383,14 @@ postfix_to_mult(const char expr) case 'g': mult = 1 << 30; break; + case 'T': + case 't': + mult = (uintmax_t)1 << 40; + break; + case 'P': + case 'p': + mult = (uintmax_t)1 << 50; + break; case 'W': case 'w': mult = sizeof(int); Modified: head/bin/dd/dd.1 ============================================================================== --- head/bin/dd/dd.1 Thu Feb 4 15:10:08 2016 (r295260) +++ head/bin/dd/dd.1 Thu Feb 4 15:21:01 2016 (r295261) @@ -32,7 +32,7 @@ .\" @(#)dd.1 8.2 (Berkeley) 1/13/94 .\" $FreeBSD$ .\" -.Dd August 28, 2014 +.Dd February 4, 2016 .Dt DD 1 .Os .Sh NAME @@ -332,10 +332,13 @@ If the number ends with a .Dq Li k , .Dq Li m , .Dq Li g , +.Dq Li t , +.Dq Li p , or .Dq Li w , the -number is multiplied by 512, 1024 (1K), 1048576 (1M), 1073741824 (1G) +number is multiplied by 512, 1024 (1K), 1048576 (1M), 1073741824 (1G), +1099511627776 (1T), 1125899906842624 (1P) or the number of bytes in an integer, respectively. Two or more numbers may be separated by an .Dq Li x From owner-svn-src-all@freebsd.org Thu Feb 4 15:32:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D6F7A99FCA for ; Thu, 4 Feb 2016 15:32:46 +0000 (UTC) (envelope-from zbb@semihalf.com) Received: from mail-lf0-x22e.google.com (mail-lf0-x22e.google.com [IPv6:2a00:1450:4010:c07::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DDA75619 for ; Thu, 4 Feb 2016 15:32:45 +0000 (UTC) (envelope-from zbb@semihalf.com) Received: by mail-lf0-x22e.google.com with SMTP id l143so38581060lfe.2 for ; Thu, 04 Feb 2016 07:32:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=mbqPy3T808BnY/glwXxvWTisxr8FUQQlg7r49CUXSd4=; b=aWwMOEOGk/UoDkZHFcCLW16IEjS8k0BUmD1WIdUMtlCaH1kRuw0EDtOsqb1d8smB7Z fjemnzBQhwU53C8V66yZJntlPNMOE24JB4Ghxa8QCgFcsv7u/QmhVTr/YGUrGgJ1543M xoAnpiC5egPx0/sXsHM2+KkVZHtwY9xamWUm8e7NaMF1tig79ixz0zd2N47z++zl+Zux 0A7K1YdqHvsLC7iAbAVrwiLzjX1bMcLMAYaq67JfIFAYWbDImOWiF/LGjlR17Kf1kkZD ZmLfv8DhAsMzqtXY1Jv+7ks+4HPGXvrFAZJgwLP5yiGl4gSpWW9VT7SCmWoGGRLremjl Dkyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=mbqPy3T808BnY/glwXxvWTisxr8FUQQlg7r49CUXSd4=; b=X0/XjrLbAaJ+46fjqw6CbCFxQ+bI5bdAftYq3t+a3K8du9ezAfXAf7vgkmch7K4C49 MlqVywpKjDzwcxS2W4YvhRYoHrB787/ey8b0x64S43lSeZnmSDKD9NNtGGpRkMsx8yfg VXb41Q9Gk0wo2wH2xktkD65OpfOnTZBqkdvx6K0cAIm3G0hj52CFqDqe/DVaus+1rHyM tatNsv5Uez1WjFHeGJ+ogtCueZh9bqSLsAcCD+50TtjZv8dfHZE+TUMUQXkrvuXMgtR2 v8WRiPNaDYVp02CI7eQPHkoLWy4AO+lzKNBgiyujpERsfHSm1/sMYrHFtgAMRauvHXOb sjCg== X-Gm-Message-State: AG10YOT46QRdW5UxX8u6DaiwFxt+IG5Ezo1erW36h8vJuA3r2vWUem4RpvJOqHq7AbPDJlkbJxH9B2n/GkpRlQ== X-Received: by 10.25.137.136 with SMTP id l130mr3315367lfd.158.1454599963900; Thu, 04 Feb 2016 07:32:43 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.198.7 with HTTP; Thu, 4 Feb 2016 07:32:24 -0800 (PST) In-Reply-To: <56B363F7.6000003@freebsd.org> References: <201602041332.u14DWTu0085871@repo.freebsd.org> <56B363F7.6000003@freebsd.org> From: Zbigniew Bodek Date: Thu, 4 Feb 2016 16:32:24 +0100 Message-ID: Subject: Re: svn commit: r295254 - head/sys/arm/arm To: Michal Meloun Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 15:32:46 -0000 Hmm I didn't try that but I think the architecture supports using both Monitor mode debugging (on a running system) and Halting debug mode (using debugger). However I will need to ensure whether any additional configuration is required to use both at the same time. Best regards zbb 2016-02-04 15:45 GMT+01:00 Michal Meloun : > Yep, I'm ready to review your patch. > Allow me one question in forward. > How this patch affects JTAG based debugging of kernel? Mainly if I start > kernel under JTAG debugger, with active breakpoints (or watchpoints). > > Michal > > Dne 04.02.2016 v 14:41 Zbigniew Bodek napsal(a): > > Hello Michal, > > > > I have a fix for that that I will send for review soon (I need to test > > in on some other platforms): > > > https://people.freebsd.org/~zbb/arm/other/0001-Fix-debug_monitor-code-for-older-ARMs-ARM11.patch > > < > https://people.freebsd.org/%7Ezbb/arm/other/0001-Fix-debug_monitor-code-for-older-ARMs-ARM11.patch > > > > > > If you don't mind I will add you to the review on Phabricator. > > > > Best regards > > zbb > > > > 2016-02-04 14:32 GMT+01:00 Michal Meloun > >: > > > > Author: mmel > > Date: Thu Feb 4 13:32:29 2016 > > New Revision: 295254 > > URL: https://svnweb.freebsd.org/changeset/base/295254 > > > > Log: > > ARM: RPI-B kernel was broken by r294740. Make it functional again. > > > > Modified: > > head/sys/arm/arm/debug_monitor.c > > > > Modified: head/sys/arm/arm/debug_monitor.c > > > ============================================================================== > > --- head/sys/arm/arm/debug_monitor.c Thu Feb 4 12:49:28 2016 > > (r295253) > > +++ head/sys/arm/arm/debug_monitor.c Thu Feb 4 13:32:29 2016 > > (r295254) > > @@ -845,8 +845,10 @@ dbg_arch_supported(void) > > { > > > > switch (dbg_model) { > > +#ifdef not_yet > > case ID_DFR0_CP_DEBUG_M_V6: > > case ID_DFR0_CP_DEBUG_M_V6_1: > > +#endif > > case ID_DFR0_CP_DEBUG_M_V7: > > case ID_DFR0_CP_DEBUG_M_V7_1: /* fall through */ > > return (TRUE); > > _______________________________________________ > > svn-src-all@freebsd.org mailing > list > > https://lists.freebsd.org/mailman/listinfo/svn-src-all > > To unsubscribe, send any mail to > > "svn-src-all-unsubscribe@freebsd.org > > " > > > > > > From owner-svn-src-all@freebsd.org Thu Feb 4 15:46:14 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 203ADA9B75E; Thu, 4 Feb 2016 15:46:14 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF14510B7; Thu, 4 Feb 2016 15:46:13 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14FkCAa025166; Thu, 4 Feb 2016 15:46:12 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14FkCmj025165; Thu, 4 Feb 2016 15:46:12 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201602041546.u14FkCmj025165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Thu, 4 Feb 2016 15:46:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295264 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 15:46:14 -0000 Author: allanjude Date: Thu Feb 4 15:46:12 2016 New Revision: 295264 URL: https://svnweb.freebsd.org/changeset/base/295264 Log: MFC: r295074 The zfsboot (zfs auto mode) part of bsdinstall now supports UEFI Approved by: re (marius) Relnotes: yes Sponsored by: ScaleEngine Inc. Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/zfsboot Thu Feb 4 15:41:00 2016 (r295263) +++ stable/10/usr.sbin/bsdinstall/scripts/zfsboot Thu Feb 4 15:46:12 2016 (r295264) @@ -109,7 +109,12 @@ f_include $BSDCFG_SHARE/variable.subr # # Default partitioning scheme to use on disks # -: ${ZFSBOOT_PARTITION_SCHEME:=GPT} +: ${ZFSBOOT_PARTITION_SCHEME:=} + +# +# Default partitioning scheme to use on disks +# +: ${ZFSBOOT_BOOT_TYPE:=} # # How much swap to put on each block device in the boot zpool @@ -193,6 +198,7 @@ GPART_ADD_ALIGN_LABEL='gpart add %s -l % GPART_ADD_ALIGN_LABEL_WITH_SIZE='gpart add %s -l %s -t %s -s %s "%s"' GPART_BOOTCODE='gpart bootcode -b "%s" "%s"' GPART_BOOTCODE_PART='gpart bootcode -b "%s" -p "%s" -i %s "%s"' +GPART_BOOTCODE_PARTONLY='gpart bootcode -p "%s" -i %s "%s"' GPART_CREATE='gpart create -s %s "%s"' GPART_DESTROY_F='gpart destroy -F "%s"' GPART_SET_ACTIVE='gpart set -a active -i %s "%s"' @@ -297,7 +303,6 @@ msg_swap_size="Swap Size" msg_swap_size_help="Customize how much swap space is allocated to each selected disk" msg_swap_toosmall="The selected swap size (%s) is to small. Please enter a value greater than 100MB or enter 0 for no swap" msg_these_disks_are_too_small="These disks are too small given the amount of requested\nswap (%s) and/or geli(8) (%s) partitions, which would\ntake 50%% or more of each of the following selected disk\ndevices (not recommended):\n\n %s\n\nRecommend changing partition size(s) and/or selecting a\ndifferent set of devices." -msg_uefi_not_supported="The FreeBSD UEFI loader does not currently support booting root-on-ZFS. Your system will need to boot in legacy (CSM) mode.\nDo you want to continue?" msg_unable_to_get_disk_capacity="Unable to get disk capacity of \`%s'" msg_unsupported_partition_scheme="%s is an unsupported partition scheme" msg_user_cancelled="User Cancelled." @@ -345,7 +350,7 @@ dialog_menu_main() 'E $msg_encrypt_disks' '$usegeli' '$msg_encrypt_disks_help' 'P $msg_partition_scheme' - '$ZFSBOOT_PARTITION_SCHEME' + '$ZFSBOOT_PARTITION_SCHEME ($ZFSBOOT_BOOT_TYPE)' '$msg_partition_scheme_help' 'S $msg_swap_size' '$ZFSBOOT_SWAP_SIZE' '$msg_swap_size_help' @@ -695,48 +700,6 @@ dialog_menu_layout() return $DIALOG_OK } -# dialog_uefi_prompt -# -# Confirm that the user wants to continue with the installation on a BIOS -# system when they have booted with UEFI -# -dialog_uefi_prompt() -{ - local title="$DIALOG_TITLE" - local btitle="$DIALOG_BACKTITLE" - local prompt # Calculated below - local hline="$hline_arrows_tab_enter" - - local height=8 width=50 prefix=" " - local plen=${#prefix} list= line= - local max_width=$(( $width - 3 - $plen )) - - local yes no defaultno extra_args format - if [ "$USE_XDIALOG" ]; then - yes=ok no=cancel defaultno=default-no - extra_args="--wrap --left" - format="$msg_uefi_not_supported" - else - yes=yes no=no defaultno=defaultno - extra_args="--cr-wrap" - format="$msg_uefi_not_supported" - fi - - # Add height for Xdialog(1) - [ "$USE_XDIALOG" ] && height=$(( $height + $height / 5 + 3 )) - - prompt=$( printf "$format" ) - f_dprintf "%s: UEFI prompt" "$0" - $DIALOG \ - --title "$title" \ - --backtitle "$btitle" \ - --hline "$hline" \ - --$yes-label "$msg_yes" \ - --$no-label "$msg_no" \ - $extra_args \ - --yesno "$prompt" $height $width -} - # zfs_create_diskpart $disk $index # # For each block device to be used in the zpool, rather than just create the @@ -848,14 +811,25 @@ zfs_create_diskpart() fi # - # 2. Add small freebsd-boot partition labeled `boot#' + # 2. Add small freebsd-boot or efi partition # - f_eval_catch $funcname gpart "$GPART_ADD_ALIGN_LABEL_WITH_SIZE" \ - "$align_small" gptboot$index freebsd-boot 512k $disk || - return $FAILURE - f_eval_catch $funcname gpart "$GPART_BOOTCODE_PART" \ - /boot/pmbr /boot/gptzfsboot 1 $disk || - return $FAILURE + if [ "$ZFSBOOT_BOOT_TYPE" = "UEFI" ]; then + f_eval_catch $funcname gpart \ + "$GPART_ADD_ALIGN_LABEL_WITH_SIZE" \ + "$align_small" efiboot$index efi 800k $disk || + return $FAILURE + f_eval_catch $funcname gpart "$GPART_BOOTCODE_PARTONLY" \ + /boot/boot1.efifat 1 $disk || + return $FAILURE + else + f_eval_catch $funcname gpart \ + "$GPART_ADD_ALIGN_LABEL_WITH_SIZE" \ + "$align_small" gptboot$index freebsd-boot \ + 512k $disk || return $FAILURE + f_eval_catch $funcname gpart "$GPART_BOOTCODE_PART" \ + /boot/pmbr /boot/gptzfsboot 1 $disk || + return $FAILURE + fi # NB: zpool will use the `zfs#' GPT labels bootpart=p2 swappart=p2 targetpart=p2 @@ -1460,18 +1434,16 @@ f_dprintf "BSDINSTALL_TMPETC=[%s]" "$BSD f_dprintf "FSTAB_FMT=[%s]" "$FSTAB_FMT" # -# If the system was booted with UEFI, warn the user that FreeBSD can't do -# ZFS with UEFI yet +# If the system was booted with UEFI, set the default boot type to UEFI # -if f_interactive; then - bootmethod=$( sysctl -n machdep.bootmethod ) - f_dprintf "machdep.bootmethod=[%s]" "$bootmethod" - if [ "$bootmethod" != "BIOS" ]; then - dialog_uefi_prompt - retval=$? - f_dprintf "uefi_prompt=[%s]" "$retval" - [ $retval -eq $DIALOG_OK ] || f_die - fi +bootmethod=$( sysctl -n machdep.bootmethod ) +f_dprintf "machdep.bootmethod=[%s]" "$bootmethod" +if [ "$bootmethod" = "UEFI" ]; then + : ${ZFSBOOT_BOOT_TYPE:=UEFI} + : ${ZFSBOOT_PARTITION_SCHEME:=GPT} +else + : ${ZFSBOOT_BOOT_TYPE:=BIOS} + : ${ZFSBOOT_PARTITION_SCHEME:=GPT} fi # @@ -1593,15 +1565,22 @@ while :; do fi ;; ?" $msg_partition_scheme") - # Toggle between GPT and MBR - if [ "$ZFSBOOT_PARTITION_SCHEME" = GPT ]; then - ZFSBOOT_PARTITION_SCHEME=MBR - elif [ "$ZFSBOOT_PARTITION_SCHEME" = MBR ]; then + # Toggle between GPT (BIOS), GPT (UEFI) and MBR + if [ "$ZFSBOOT_PARTITION_SCHEME" = "GPT" -a "$ZFSBOOT_BOOT_TYPE" = "BIOS" ]; then + ZFSBOOT_PARTITION_SCHEME="GPT" + ZFSBOOT_BOOT_TYPE="UEFI" + elif [ "$ZFSBOOT_PARTITION_SCHEME" = "GPT" ]; then + ZFSBOOT_PARTITION_SCHEME="MBR" + ZFSBOOT_BOOT_TYPE="BIOS" + elif [ "$ZFSBOOT_PARTITION_SCHEME" = "MBR" ]; then ZFSBOOT_PARTITION_SCHEME="GPT + Active" + ZFSBOOT_BOOT_TYPE="BIOS" elif [ "$ZFSBOOT_PARTITION_SCHEME" = "GPT + Active" ]; then ZFSBOOT_PARTITION_SCHEME="GPT + Lenovo Fix" + ZFSBOOT_BOOT_TYPE="BIOS" else - ZFSBOOT_PARTITION_SCHEME=GPT + ZFSBOOT_PARTITION_SCHEME="GPT" + ZFSBOOT_BOOT_TYPE="BIOS" fi ;; ?" $msg_swap_size") From owner-svn-src-all@freebsd.org Thu Feb 4 16:32:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55AB9A9B03E; Thu, 4 Feb 2016 16:32:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D9221DFB; Thu, 4 Feb 2016 16:32:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14GWMgK040459; Thu, 4 Feb 2016 16:32:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14GWM9R040458; Thu, 4 Feb 2016 16:32:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201602041632.u14GWM9R040458@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 4 Feb 2016 16:32:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295265 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 16:32:23 -0000 Author: kib Date: Thu Feb 4 16:32:21 2016 New Revision: 295265 URL: https://svnweb.freebsd.org/changeset/base/295265 Log: Do not copy by field when converting struct oexport_args to struct export_args on mount update, bzero() is consistent with vfs_oexport_conv(). Make the code structure more explicit by using switch. Return EINVAL if export option layout (deduced from size) is unknown. Based on the submission by: bde Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/vfs_mount.c Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Thu Feb 4 15:46:12 2016 (r295264) +++ head/sys/kern/vfs_mount.c Thu Feb 4 16:32:21 2016 (r295265) @@ -880,10 +880,10 @@ vfs_domount_update( struct vfsoptlist **optlist /* Options local to the filesystem. */ ) { - struct oexport_args oexport; struct export_args export; + void *bufp; struct mount *mp; - int error, export_error; + int error, export_error, len; uint64_t flag; ASSERT_VOP_ELOCKED(vp, __func__); @@ -951,23 +951,21 @@ vfs_domount_update( error = VFS_MOUNT(mp); export_error = 0; - if (error == 0) { - /* Process the export option. */ - if (vfs_copyopt(mp->mnt_optnew, "export", &export, - sizeof(export)) == 0) { - export_error = vfs_export(mp, &export); - } else if (vfs_copyopt(mp->mnt_optnew, "export", &oexport, - sizeof(oexport)) == 0) { - export.ex_flags = oexport.ex_flags; - export.ex_root = oexport.ex_root; - export.ex_anon = oexport.ex_anon; - export.ex_addr = oexport.ex_addr; - export.ex_addrlen = oexport.ex_addrlen; - export.ex_mask = oexport.ex_mask; - export.ex_masklen = oexport.ex_masklen; - export.ex_indexfile = oexport.ex_indexfile; - export.ex_numsecflavors = 0; + /* Process the export option. */ + if (error == 0 && vfs_getopt(mp->mnt_optnew, "export", &bufp, + &len) == 0) { + /* Assume that there is only 1 ABI for each length. */ + switch (len) { + case (sizeof(struct oexport_args)): + bzero(&export, sizeof(export)); + /* FALLTHROUGH */ + case (sizeof(export)): + bcopy(bufp, &export, len); export_error = vfs_export(mp, &export); + break; + default: + export_error = EINVAL; + break; } } From owner-svn-src-all@freebsd.org Thu Feb 4 17:01:40 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30DFFA9BEB7; Thu, 4 Feb 2016 17:01:40 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E670615D5; Thu, 4 Feb 2016 17:01:39 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14H1c3A049773; Thu, 4 Feb 2016 17:01:38 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14H1cCD049766; Thu, 4 Feb 2016 17:01:38 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201602041701.u14H1cCD049766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Thu, 4 Feb 2016 17:01:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295267 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 17:01:40 -0000 Author: mmel Date: Thu Feb 4 17:01:38 2016 New Revision: 295267 URL: https://svnweb.freebsd.org/changeset/base/295267 Log: Replace broken implementation of fuswintr() and suswintr() by functions which return -1 as well as on tier 1 archs. Remove block_userspace_access used only in these implementations. (1) These functions may be called in interrupt context and pcb_onfault can be already set in this time. Thus, prior pcb_onfault must be saved and restored afterwards. (2) The check that an abort came either from nested interrupt or while in critical section or holding not sleepable lock must be avoided for this case. These functions are called only for profiling reason, so there will be only small gain by making the code more complex. Modified: head/sys/arm/arm/cpufunc_asm_xscale.S head/sys/arm/arm/cpufunc_asm_xscale_c3.S head/sys/arm/arm/elf_trampoline.c head/sys/arm/arm/fusu.S head/sys/arm/arm/trap-v6.c head/sys/arm/arm/trap.c Modified: head/sys/arm/arm/cpufunc_asm_xscale.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_xscale.S Thu Feb 4 16:38:24 2016 (r295266) +++ head/sys/arm/arm/cpufunc_asm_xscale.S Thu Feb 4 17:01:38 2016 (r295267) @@ -80,9 +80,6 @@ __FBSDID("$FreeBSD$"); */ #define DCACHE_SIZE 0x00008000 -.Lblock_userspace_access: - .word _C_LABEL(block_userspace_access) - /* * CPWAIT -- Canonical method to wait for CP15 update. * From: Intel 80200 manual, section 2.3.3. @@ -137,11 +134,6 @@ ENTRY(xscale_setttb) mrs r3, cpsr orr r1, r3, #(PSR_I | PSR_F) msr cpsr_fsxc, r1 -#else - ldr r3, .Lblock_userspace_access - ldr r2, [r3] - orr r1, r2, #1 - str r1, [r3] #endif stmfd sp!, {r0-r3, lr} bl _C_LABEL(xscale_cache_cleanID) @@ -165,8 +157,6 @@ ENTRY(xscale_setttb) #ifdef CACHE_CLEAN_BLOCK_INTR msr cpsr_fsxc, r3 -#else - str r2, [r3] #endif RET END(xscale_setttb) @@ -273,14 +263,9 @@ _C_LABEL(xscale_minidata_clean_size): #define XSCALE_CACHE_CLEAN_UNBLOCK \ msr cpsr_fsxc, r3 #else -#define XSCALE_CACHE_CLEAN_BLOCK \ - ldr r3, .Lblock_userspace_access ; \ - ldr ip, [r3] ; \ - orr r0, ip, #1 ; \ - str r0, [r3] +#define XSCALE_CACHE_CLEAN_BLOCK -#define XSCALE_CACHE_CLEAN_UNBLOCK \ - str ip, [r3] +#define XSCALE_CACHE_CLEAN_UNBLOCK #endif /* CACHE_CLEAN_BLOCK_INTR */ #define XSCALE_CACHE_CLEAN_PROLOGUE \ Modified: head/sys/arm/arm/cpufunc_asm_xscale_c3.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_xscale_c3.S Thu Feb 4 16:38:24 2016 (r295266) +++ head/sys/arm/arm/cpufunc_asm_xscale_c3.S Thu Feb 4 17:01:38 2016 (r295267) @@ -82,9 +82,6 @@ __FBSDID("$FreeBSD$"); */ #define DCACHE_SIZE 0x00008000 -.Lblock_userspace_access: - .word _C_LABEL(block_userspace_access) - /* * CPWAIT -- Canonical method to wait for CP15 update. * From: Intel 80200 manual, section 2.3.3. @@ -130,16 +127,8 @@ __FBSDID("$FreeBSD$"); msr cpsr_fsxc, r4 ; \ ldmfd sp!, {r4} #else -#define XSCALE_CACHE_CLEAN_BLOCK \ - stmfd sp!, {r4} ; \ - ldr r4, .Lblock_userspace_access ; \ - ldr ip, [r4] ; \ - orr r0, ip, #1 ; \ - str r0, [r4] - -#define XSCALE_CACHE_CLEAN_UNBLOCK \ - str ip, [r3] ; \ - ldmfd sp!, {r4} +#define XSCALE_CACHE_CLEAN_BLOCK +#define XSCALE_CACHE_CLEAN_UNBLOCK #endif /* CACHE_CLEAN_BLOCK_INTR */ @@ -352,11 +341,6 @@ ENTRY(xscalec3_setttb) mrs r3, cpsr orr r1, r3, #(PSR_I | PSR_F) msr cpsr_fsxc, r1 -#else - ldr r3, .Lblock_userspace_access - ldr r2, [r3] - orr r1, r2, #1 - str r1, [r3] #endif stmfd sp!, {r0-r3, lr} bl _C_LABEL(xscalec3_cache_cleanID) Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Thu Feb 4 16:38:24 2016 (r295266) +++ head/sys/arm/arm/elf_trampoline.c Thu Feb 4 17:01:38 2016 (r295267) @@ -125,7 +125,6 @@ static int arm_dcache_l2_assoc; static int arm_dcache_l2_linesize; -int block_userspace_access = 0; extern int arm9_dcache_sets_inc; extern int arm9_dcache_sets_max; extern int arm9_dcache_index_max; Modified: head/sys/arm/arm/fusu.S ============================================================================== --- head/sys/arm/arm/fusu.S Thu Feb 4 16:38:24 2016 (r295266) +++ head/sys/arm/arm/fusu.S Thu Feb 4 17:01:38 2016 (r295267) @@ -183,51 +183,10 @@ END(fusword) */ ENTRY(fuswintr) - ldr r3, =(VM_MAXUSER_ADDRESS-1) - cmp r0, r3 - mvncs r0, #0 - RETc(cs) - - ldr r2, Lblock_userspace_access - ldr r2, [r2] - teq r2, #0 - mvnne r0, #0x00000000 - RETne - - GET_PCB(r2) - ldr r2, [r2] - -#ifdef DIAGNOSTIC - teq r2, #0x00000000 - beq .Lfusupcbfault -#endif - - adr r1, _C_LABEL(fusubailout) - str r1, [r2, #PCB_ONFAULT] - - ldrbt r3, [r0], #1 - ldrbt ip, [r0] -#ifdef __ARMEB__ - orr r0, ip, r3, asl #8 -#else - orr r0, r3, ip, asl #8 -#endif - - mov r1, #0x00000000 - str r1, [r2, #PCB_ONFAULT] + mov r0, #-1 RET END(fuswintr) -Lblock_userspace_access: - .word _C_LABEL(block_userspace_access) - - .data - .align 2 - .global _C_LABEL(block_userspace_access) -_C_LABEL(block_userspace_access): - .word 0 - .text - /* * fubyte(caddr_t uaddr); * Fetch a byte from the user's address space. @@ -268,20 +227,6 @@ END(fubyte) mvn r0, #0x00000000 RET -/* - * Handle faults from [fs]u*(). Clean up and return -1. This differs from - * fusufault() in that trap() will recognise it and return immediately rather - * than trying to page fault. - */ - -/* label must be global as fault.c references it */ - .global _C_LABEL(fusubailout) -_C_LABEL(fusubailout): - mov r0, #0x00000000 - str r0, [r2, #PCB_ONFAULT] - mvn r0, #0x00000000 - RET - #ifdef DIAGNOSTIC /* * Handle earlier faults from [fs]u*(), due to no pcb @@ -335,39 +280,7 @@ END(suword) */ ENTRY(suswintr) - ldr r3, =(VM_MAXUSER_ADDRESS-1) - cmp r0, r3 - mvncs r0, #0 - RETc(cs) - - ldr r2, Lblock_userspace_access - ldr r2, [r2] - teq r2, #0 - mvnne r0, #0x00000000 - RETne - - GET_PCB(r2) - ldr r2, [r2] - -#ifdef DIAGNOSTIC - teq r2, #0x00000000 - beq .Lfusupcbfault -#endif - - adr r3, _C_LABEL(fusubailout) - str r3, [r2, #PCB_ONFAULT] - -#ifdef __ARMEB__ - mov ip, r1, lsr #8 - strbt ip, [r0], #1 -#else - strbt r1, [r0], #1 - mov r1, r1, lsr #8 -#endif - strbt r1, [r0] - - mov r0, #0x00000000 - str r0, [r2, #PCB_ONFAULT] + mov r0, #-1 RET END(suswintr) Modified: head/sys/arm/arm/trap-v6.c ============================================================================== --- head/sys/arm/arm/trap-v6.c Thu Feb 4 16:38:24 2016 (r295266) +++ head/sys/arm/arm/trap-v6.c Thu Feb 4 17:01:38 2016 (r295267) @@ -70,7 +70,6 @@ __FBSDID("$FreeBSD$"); #include #endif -extern char fusubailout[]; extern char cachebailout[]; #ifdef DEBUG @@ -445,13 +444,6 @@ abort_handler(struct trapframe *tf, int goto out; } - /* fusubailout is used by [fs]uswintr to avoid page faulting. */ - if (__predict_false(pcb->pcb_onfault == fusubailout)) { - tf->tf_r0 = EFAULT; - tf->tf_pc = (register_t)pcb->pcb_onfault; - return; - } - va = trunc_page(far); if (va >= KERNBASE) { /* Modified: head/sys/arm/arm/trap.c ============================================================================== --- head/sys/arm/arm/trap.c Thu Feb 4 16:38:24 2016 (r295266) +++ head/sys/arm/arm/trap.c Thu Feb 4 17:01:38 2016 (r295267) @@ -111,8 +111,6 @@ __FBSDID("$FreeBSD$"); #define ReadWord(a) (*((volatile unsigned int *)(a))) -extern char fusubailout[]; - #ifdef DEBUG int last_fault_code; /* For the benefit of pmap_fault_fixup() */ #endif @@ -255,13 +253,6 @@ abort_handler(struct trapframe *tf, int * the MMU. */ - /* fusubailout is used by [fs]uswintr to avoid page faulting */ - if (__predict_false(pcb->pcb_onfault == fusubailout)) { - tf->tf_r0 = EFAULT; - tf->tf_pc = (register_t)(intptr_t) pcb->pcb_onfault; - return; - } - /* * Make sure the Program Counter is sane. We could fall foul of * someone executing Thumb code, in which case the PC might not From owner-svn-src-all@freebsd.org Thu Feb 4 17:06:05 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23C16A9C1E3; Thu, 4 Feb 2016 17:06:05 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F95E1CCF; Thu, 4 Feb 2016 17:06:04 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id u14H63OV070226 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 4 Feb 2016 09:06:03 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id u14H63Y1070225; Thu, 4 Feb 2016 09:06:03 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 4 Feb 2016 09:06:03 -0800 From: Gleb Smirnoff To: Bryan Drewery Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r295226 - head/lib/libmemstat Message-ID: <20160204170603.GF65294@FreeBSD.org> References: <201602040023.u140NL0i052392@repo.freebsd.org> <56B29E36.8000900@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56B29E36.8000900@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 17:06:05 -0000 On Wed, Feb 03, 2016 at 04:41:26PM -0800, Bryan Drewery wrote: B> On 2/3/2016 4:23 PM, Gleb Smirnoff wrote: B> > Author: glebius B> > Date: Thu Feb 4 00:23:21 2016 B> > New Revision: 295226 B> > URL: https://svnweb.freebsd.org/changeset/base/295226 B> > B> > Log: B> > Fix build. B> > B> > Modified: B> > head/lib/libmemstat/memstat_uma.c B> > B> > Modified: head/lib/libmemstat/memstat_uma.c B> > ============================================================================== B> > --- head/lib/libmemstat/memstat_uma.c Wed Feb 3 23:41:58 2016 (r295225) B> > +++ head/lib/libmemstat/memstat_uma.c Thu Feb 4 00:23:21 2016 (r295226) B> > @@ -29,6 +29,7 @@ B> > #include B> > #include B> > #include B> > +#include B> > B> > #include B> > #include B> > B> B> Shouldn't uma_int.h forward declare or include _task.h for struct task? Forward declaration won't work, since structure is included, not pointed at. I'm reluctant with adding includes into includes. -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Thu Feb 4 17:09:45 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1ADC4A9C334; Thu, 4 Feb 2016 17:09:45 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC4B81E92; Thu, 4 Feb 2016 17:09:44 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14H9hGR050132; Thu, 4 Feb 2016 17:09:43 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14H9hLB050131; Thu, 4 Feb 2016 17:09:43 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201602041709.u14H9hLB050131@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 4 Feb 2016 17:09:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295269 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 17:09:45 -0000 Author: dteske Date: Thu Feb 4 17:09:43 2016 New Revision: 295269 URL: https://svnweb.freebsd.org/changeset/base/295269 Log: Fix grammar in error statement s/consider to migrate to jail.conf/consider migrating to jail.conf/ Modified: head/etc/rc.d/jail Modified: head/etc/rc.d/jail ============================================================================== --- head/etc/rc.d/jail Thu Feb 4 17:03:12 2016 (r295268) +++ head/etc/rc.d/jail Thu Feb 4 17:09:43 2016 (r295269) @@ -563,7 +563,7 @@ jail_warn() # To relieve confusion, show a warning message. case $_confwarn in 1) warn "Per-jail configuration via jail_* variables " \ - "is obsolete. Please consider to migrate to $jail_conf." + "is obsolete. Please consider migrating to $jail_conf." ;; esac } From owner-svn-src-all@freebsd.org Thu Feb 4 17:22:17 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25F88A9C7DD; Thu, 4 Feb 2016 17:22:17 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBA1F9B2; Thu, 4 Feb 2016 17:22:16 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14HMFW3053864; Thu, 4 Feb 2016 17:22:15 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14HMFbF053863; Thu, 4 Feb 2016 17:22:15 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201602041722.u14HMFbF053863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 4 Feb 2016 17:22:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295270 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 17:22:17 -0000 Author: andrew Date: Thu Feb 4 17:22:15 2016 New Revision: 295270 URL: https://svnweb.freebsd.org/changeset/base/295270 Log: Enable checking of the stack alignment. The stack should be aligned to a 16-byte value. With this the hardware will check if a memory access uses an incorrectly aligned stack pointer as the base address. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/arm64/locore.S Modified: head/sys/arm64/arm64/locore.S ============================================================================== --- head/sys/arm64/arm64/locore.S Thu Feb 4 17:09:43 2016 (r295269) +++ head/sys/arm64/arm64/locore.S Thu Feb 4 17:22:15 2016 (r295270) @@ -628,11 +628,11 @@ tcr_early: sctlr_set: /* Bits to set */ .quad (SCTLR_UCI | SCTLR_nTWE | SCTLR_nTWI | SCTLR_UCT | SCTLR_DZE | \ - SCTLR_I | SCTLR_SED | SCTLR_C | SCTLR_M) + SCTLR_I | SCTLR_SED | SCTLR_SA0 | SCTLR_SA | SCTLR_C | SCTLR_M) sctlr_clear: /* Bits to clear */ .quad (SCTLR_EE | SCTLR_EOE | SCTLR_WXN | SCTLR_UMA | SCTLR_ITD | \ - SCTLR_THEE | SCTLR_CP15BEN | SCTLR_SA0 | SCTLR_SA | SCTLR_A) + SCTLR_THEE | SCTLR_CP15BEN | SCTLR_A) .globl abort abort: From owner-svn-src-all@freebsd.org Thu Feb 4 17:43:57 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F891A9C15B; Thu, 4 Feb 2016 17:43:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 563951AD8; Thu, 4 Feb 2016 17:43:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14HhuFv062297; Thu, 4 Feb 2016 17:43:56 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14HhumR062295; Thu, 4 Feb 2016 17:43:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201602041743.u14HhumR062295@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 4 Feb 2016 17:43:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295271 - head/sys/powerpc/fpu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 17:43:57 -0000 Author: jhb Date: Thu Feb 4 17:43:56 2016 New Revision: 295271 URL: https://svnweb.freebsd.org/changeset/base/295271 Log: Fix build of powerpc FPU emulator after changes in r295132 to restore the ABI of struct fpreg. The FPU emulator operates on the "raw" FPU state stored in the pcb rather than the "cooked" fpreg state used for ptrace() and cores. Reported by: bz Modified: head/sys/powerpc/fpu/fpu_emu.c head/sys/powerpc/fpu/fpu_explode.c Modified: head/sys/powerpc/fpu/fpu_emu.c ============================================================================== --- head/sys/powerpc/fpu/fpu_emu.c Thu Feb 4 17:22:15 2016 (r295270) +++ head/sys/powerpc/fpu/fpu_emu.c Thu Feb 4 17:43:56 2016 (r295271) @@ -275,7 +275,7 @@ fpu_execute(struct trapframe *tf, struct vm_offset_t addr; int ra, rb, rc, rt, type, mask, fsr, cx, bf, setcr; unsigned int cond; - struct fpreg *fs; + struct fpu *fs; /* Setup work. */ fp = NULL; @@ -335,7 +335,7 @@ fpu_execute(struct trapframe *tf, struct if (ra != 0) addr += tf->fixreg[ra]; rt = instr.i_x.i_rt; - a = (int *)&fs->fpreg[rt].fpr; + a = (int *)&fs->fpr[rt].fpr; DPRINTF(FPE_INSN, ("fpu_execute: Store INT %x at %p\n", a[1], (void *)addr)); @@ -402,7 +402,7 @@ fpu_execute(struct trapframe *tf, struct DPRINTF(FPE_INSN, ("fpu_execute: Store DBL at %p\n", (void *)addr)); - if (copyout(&fs->fpreg[rt].fpr, (void *)addr, + if (copyout(&fs->fpr[rt].fpr, (void *)addr, size)) return (FAULT); } @@ -411,13 +411,13 @@ fpu_execute(struct trapframe *tf, struct FPU_EMU_EVCNT_INCR(fpload); DPRINTF(FPE_INSN, ("fpu_execute: Load from %p\n", (void *)addr)); - if (copyin((const void *)addr, &fs->fpreg[rt].fpr, + if (copyin((const void *)addr, &fs->fpr[rt].fpr, size)) return (FAULT); if (type != FTYPE_DBL) { fpu_explode(fe, fp = &fe->fe_f1, type, rt); fpu_implode(fe, fp, FTYPE_DBL, - (u_int *)&fs->fpreg[rt].fpr); + (u_int *)&fs->fpr[rt].fpr); } } if (update) @@ -470,7 +470,7 @@ fpu_execute(struct trapframe *tf, struct DPRINTF(FPE_INSN, ("fpu_execute: FRSP\n")); fpu_explode(fe, fp = &fe->fe_f1, FTYPE_DBL, rb); fpu_implode(fe, fp, FTYPE_SNG, - (u_int *)&fs->fpreg[rt].fpr); + (u_int *)&fs->fpr[rt].fpr); fpu_explode(fe, fp = &fe->fe_f1, FTYPE_SNG, rt); type = FTYPE_DBL; break; @@ -503,9 +503,9 @@ fpu_execute(struct trapframe *tf, struct case OPC63_FNEG: FPU_EMU_EVCNT_INCR(fnegabs); DPRINTF(FPE_INSN, ("fpu_execute: FNEGABS\n")); - memcpy(&fs->fpreg[rt].fpr, &fs->fpreg[rb].fpr, + memcpy(&fs->fpr[rt].fpr, &fs->fpr[rb].fpr, sizeof(double)); - a = (int *)&fs->fpreg[rt].fpr; + a = (int *)&fs->fpr[rt].fpr; *a ^= (1U << 31); break; case OPC63_MCRFS: @@ -533,7 +533,7 @@ fpu_execute(struct trapframe *tf, struct case OPC63_FMR: FPU_EMU_EVCNT_INCR(fmr); DPRINTF(FPE_INSN, ("fpu_execute: FMR\n")); - memcpy(&fs->fpreg[rt].fpr, &fs->fpreg[rb].fpr, + memcpy(&fs->fpr[rt].fpr, &fs->fpr[rb].fpr, sizeof(double)); break; case OPC63_MTFSFI: @@ -550,23 +550,23 @@ fpu_execute(struct trapframe *tf, struct case OPC63_FNABS: FPU_EMU_EVCNT_INCR(fnabs); DPRINTF(FPE_INSN, ("fpu_execute: FABS\n")); - memcpy(&fs->fpreg[rt].fpr, &fs->fpreg[rb].fpr, + memcpy(&fs->fpr[rt].fpr, &fs->fpr[rb].fpr, sizeof(double)); - a = (int *)&fs->fpreg[rt].fpr; + a = (int *)&fs->fpr[rt].fpr; *a |= (1U << 31); break; case OPC63_FABS: FPU_EMU_EVCNT_INCR(fabs); DPRINTF(FPE_INSN, ("fpu_execute: FABS\n")); - memcpy(&fs->fpreg[rt].fpr, &fs->fpreg[rb].fpr, + memcpy(&fs->fpr[rt].fpr, &fs->fpr[rb].fpr, sizeof(double)); - a = (int *)&fs->fpreg[rt].fpr; + a = (int *)&fs->fpr[rt].fpr; *a &= ~(1U << 31); break; case OPC63_MFFS: FPU_EMU_EVCNT_INCR(mffs); DPRINTF(FPE_INSN, ("fpu_execute: MFFS\n")); - memcpy(&fs->fpreg[rt].fpr, &fs->fpscr, + memcpy(&fs->fpr[rt].fpr, &fs->fpscr, sizeof(fs->fpscr)); break; case OPC63_MTFSF: @@ -581,7 +581,7 @@ fpu_execute(struct trapframe *tf, struct if (rt & (1<fpreg[rt].fpr; + a = (int *)&fs->fpr[rt].fpr; fe->fe_cx = mask & a[1]; fe->fe_fpscr = (fe->fe_fpscr&~mask) | (fe->fe_cx); @@ -648,12 +648,12 @@ fpu_execute(struct trapframe *tf, struct case OPC63M_FSEL: FPU_EMU_EVCNT_INCR(fsel); DPRINTF(FPE_INSN, ("fpu_execute: FSEL\n")); - a = (int *)&fe->fe_fpstate->fpreg[ra].fpr; + a = (int *)&fe->fe_fpstate->fpr[ra].fpr; if ((*a & 0x80000000) && (*a & 0x7fffffff)) /* fra < 0 */ rc = rb; DPRINTF(FPE_INSN, ("f%d => f%d\n", rc, rt)); - memcpy(&fs->fpreg[rt].fpr, &fs->fpreg[rc].fpr, + memcpy(&fs->fpr[rt].fpr, &fs->fpr[rc].fpr, sizeof(double)); break; case OPC59_FRES: @@ -662,7 +662,7 @@ fpu_execute(struct trapframe *tf, struct fpu_explode(fe, &fe->fe_f1, type, rb); fp = fpu_sqrt(fe); /* now we've gotta overwrite the dest reg */ - *((int *)&fe->fe_fpstate->fpreg[rt].fpr) = 1; + *((int *)&fe->fe_fpstate->fpr[rt].fpr) = 1; fpu_explode(fe, &fe->fe_f1, FTYPE_INT, rt); fpu_div(fe); break; @@ -681,7 +681,7 @@ fpu_execute(struct trapframe *tf, struct fp = fpu_sqrt(fe); fe->fe_f2 = *fp; /* now we've gotta overwrite the dest reg */ - *((int *)&fe->fe_fpstate->fpreg[rt].fpr) = 1; + *((int *)&fe->fe_fpstate->fpr[rt].fpr) = 1; fpu_explode(fe, &fe->fe_f1, FTYPE_INT, rt); fpu_div(fe); break; @@ -737,7 +737,7 @@ fpu_execute(struct trapframe *tf, struct /* If the instruction was single precision, round */ if (!(instr.i_any.i_opcd & 0x4)) { fpu_implode(fe, fp, FTYPE_SNG, - (u_int *)&fs->fpreg[rt].fpr); + (u_int *)&fs->fpr[rt].fpr); fpu_explode(fe, fp = &fe->fe_f1, FTYPE_SNG, rt); } } @@ -752,7 +752,7 @@ fpu_execute(struct trapframe *tf, struct * Otherwise set new current exceptions and accrue. */ if (fp) - fpu_implode(fe, fp, type, (u_int *)&fs->fpreg[rt].fpr); + fpu_implode(fe, fp, type, (u_int *)&fs->fpr[rt].fpr); cx = fe->fe_cx; fsr = fe->fe_fpscr; if (cx != 0) { Modified: head/sys/powerpc/fpu/fpu_explode.c ============================================================================== --- head/sys/powerpc/fpu/fpu_explode.c Thu Feb 4 17:22:15 2016 (r295270) +++ head/sys/powerpc/fpu/fpu_explode.c Thu Feb 4 17:43:56 2016 (r295271) @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #include @@ -211,9 +211,9 @@ fpu_explode(struct fpemu *fe, struct fpn u_int s, *space; u_int64_t l, *xspace; - xspace = (u_int64_t *)&fe->fe_fpstate->fpreg[reg].fpr; + xspace = (u_int64_t *)&fe->fe_fpstate->fpr[reg].fpr; l = xspace[0]; - space = (u_int *)&fe->fe_fpstate->fpreg[reg].fpr; + space = (u_int *)&fe->fe_fpstate->fpr[reg].fpr; s = space[0]; fp->fp_sign = s >> 31; fp->fp_sticky = 0; From owner-svn-src-all@freebsd.org Thu Feb 4 18:03:07 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE6DAA9C7C8; Thu, 4 Feb 2016 18:03:07 +0000 (UTC) (envelope-from jgh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DC7F5E3; Thu, 4 Feb 2016 18:03:07 +0000 (UTC) (envelope-from jgh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14I36Rn068001; Thu, 4 Feb 2016 18:03:06 GMT (envelope-from jgh@FreeBSD.org) Received: (from jgh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14I36CE068000; Thu, 4 Feb 2016 18:03:06 GMT (envelope-from jgh@FreeBSD.org) Message-Id: <201602041803.u14I36CE068000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jgh set sender to jgh@FreeBSD.org using -f From: Jason Helfman Date: Thu, 4 Feb 2016 18:03:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295272 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 18:03:07 -0000 Author: jgh (doc,ports committer) Date: Thu Feb 4 18:03:06 2016 New Revision: 295272 URL: https://svnweb.freebsd.org/changeset/base/295272 Log: - connect(2) Clarify namelen PR: 206838 Submitted by: t@tobik.me Approved by: bcr (mentor) MFH: after 1 week Differential Revision: https://reviews.freebsd.org/D5194 Modified: head/lib/libc/sys/connect.2 Modified: head/lib/libc/sys/connect.2 ============================================================================== --- head/lib/libc/sys/connect.2 Thu Feb 4 17:43:56 2016 (r295271) +++ head/lib/libc/sys/connect.2 Thu Feb 4 18:03:06 2016 (r295272) @@ -28,7 +28,7 @@ .\" @(#)connect.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 29, 2014 +.Dd February 4, 2016 .Dt CONNECT 2 .Os .Sh NAME @@ -58,6 +58,14 @@ another socket. The other socket is specified by .Fa name , which is an address in the communications space of the socket. +.Fa namelen +indicates the amount of space pointed to by +.Fa name , +in bytes; the +.Fa sa_len +member of +.Fa name +is ignored. Each communications space interprets the .Fa name argument in its own way. From owner-svn-src-all@freebsd.org Thu Feb 4 18:08:51 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C239A9CA05; Thu, 4 Feb 2016 18:08:51 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52342C0E; Thu, 4 Feb 2016 18:08:51 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14I8oIc068702; Thu, 4 Feb 2016 18:08:50 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14I8ouc068701; Thu, 4 Feb 2016 18:08:50 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201602041808.u14I8ouc068701@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 4 Feb 2016 18:08:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295273 - head/sys/dev/ixgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 18:08:51 -0000 Author: tuexen Date: Thu Feb 4 18:08:50 2016 New Revision: 295273 URL: https://svnweb.freebsd.org/changeset/base/295273 Log: In FreeBSD 10 and higher the driver announces SCTP checksum offloading support also for 82598, which doesn't support it. The legacy code has a check for it, which was missed when the code for dealing with CSUM_IP6_* was added. Add the same check for FreeBSD 10 and higher. Differential Revision: https://reviews.freebsd.org/D5192 Modified: head/sys/dev/ixgbe/if_ix.c Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Thu Feb 4 18:03:06 2016 (r295272) +++ head/sys/dev/ixgbe/if_ix.c Thu Feb 4 18:08:50 2016 (r295273) @@ -1017,6 +1017,7 @@ static void ixgbe_set_if_hwassist(struct adapter *adapter) { struct ifnet *ifp = adapter->ifp; + struct ixgbe_hw *hw = &adapter->hw; ifp->if_hwassist = 0; #if __FreeBSD_version >= 1000000 @@ -1024,18 +1025,21 @@ ixgbe_set_if_hwassist(struct adapter *ad ifp->if_hwassist |= CSUM_IP_TSO; if (ifp->if_capenable & IFCAP_TSO6) ifp->if_hwassist |= CSUM_IP6_TSO; - if (ifp->if_capenable & IFCAP_TXCSUM) - ifp->if_hwassist |= (CSUM_IP | CSUM_IP_UDP | CSUM_IP_TCP | - CSUM_IP_SCTP); - if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) - ifp->if_hwassist |= (CSUM_IP6_UDP | CSUM_IP6_TCP | - CSUM_IP6_SCTP); + if (ifp->if_capenable & IFCAP_TXCSUM) { + ifp->if_hwassist |= (CSUM_IP | CSUM_IP_UDP | CSUM_IP_TCP); + if (hw->mac.type != ixgbe_mac_82598EB) + ifp->if_hwassist |= CSUM_IP_SCTP; + } + if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) { + ifp->if_hwassist |= (CSUM_IP6_UDP | CSUM_IP6_TCP); + if (hw->mac.type != ixgbe_mac_82598EB) + ifp->if_hwassist |= CSUM_IP6_SCTP; + } #else if (ifp->if_capenable & IFCAP_TSO) ifp->if_hwassist |= CSUM_TSO; if (ifp->if_capenable & IFCAP_TXCSUM) { ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP); - struct ixgbe_hw *hw = &adapter->hw; if (hw->mac.type != ixgbe_mac_82598EB) ifp->if_hwassist |= CSUM_SCTP; } From owner-svn-src-all@freebsd.org Thu Feb 4 19:53:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A210A9C399; Thu, 4 Feb 2016 19:53:56 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDA181196; Thu, 4 Feb 2016 19:53:55 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14JrsQm001950; Thu, 4 Feb 2016 19:53:54 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14Jrslb001947; Thu, 4 Feb 2016 19:53:54 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201602041953.u14Jrslb001947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Thu, 4 Feb 2016 19:53:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295276 - in head/sys: cam/ata dev/ata sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 19:53:56 -0000 Author: rpokala Date: Thu Feb 4 19:53:54 2016 New Revision: 295276 URL: https://svnweb.freebsd.org/changeset/base/295276 Log: Add defines for WRITE_UNCORRECTABLE ATA command, and improve command logging Add #defines for ATA_WRITE_UNCORRECTABLE48 and its features. Update the decoding in ATACAM to recognize the new values. Also improve command decoding for a few other commands (SMART, NOP, SET_FEATURES). Bring the decoding in ata(4) up to parity with ATACAM. Reviewed by: mav, imp MFC after: 1 month Sponsored by: Panasas, Inc. Differential Revision: https://reviews.freebsd.org/D5181 Modified: head/sys/cam/ata/ata_all.c head/sys/dev/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 Feb 4 19:30:24 2016 (r295275) +++ head/sys/cam/ata/ata_all.c Thu Feb 4 19:53:54 2016 (r295276) @@ -75,13 +75,18 @@ ata_op_string(struct ata_cmd *cmd) if (cmd->control & 0x04) return ("SOFT_RESET"); switch (cmd->command) { - case 0x00: return ("NOP"); + case 0x00: + switch (cmd->features) { + case 0x00: return ("NOP FLUSHQUEUE"); + case 0x01: return ("NOP AUTOPOLL"); + } + return ("NOP"); case 0x03: return ("CFA_REQUEST_EXTENDED_ERROR"); case 0x06: switch (cmd->features) { - case 0x01: return ("DSM TRIM"); - } - return "DSM"; + case 0x01: return ("DSM TRIM"); + } + return "DSM"; case 0x08: return ("DEVICE_RESET"); case 0x20: return ("READ"); case 0x24: return ("READ48"); @@ -105,6 +110,12 @@ ata_op_string(struct ata_cmd *cmd) case 0x3f: return ("WRITE_LOG_EXT"); case 0x40: return ("READ_VERIFY"); case 0x42: return ("READ_VERIFY48"); + case 0x45: + switch (cmd->features) { + case 0x55: return ("WRITE_UNCORRECTABLE48 PSEUDO"); + case 0xaa: return ("WRITE_UNCORRECTABLE48 FLAGGED"); + } + return "WRITE_UNCORRECTABLE48"; case 0x51: return ("CONFIGURE_STREAM"); case 0x60: return ("READ_FPDMA_QUEUED"); case 0x61: return ("WRITE_FPDMA_QUEUED"); @@ -128,7 +139,18 @@ ata_op_string(struct ata_cmd *cmd) case 0xa0: return ("PACKET"); case 0xa1: return ("ATAPI_IDENTIFY"); case 0xa2: return ("SERVICE"); - case 0xb0: return ("SMART"); + case 0xb0: + switch(cmd->features) { + case 0xd0: return ("SMART READ ATTR VALUES"); + case 0xd1: return ("SMART READ ATTR THRESHOLDS"); + case 0xd3: return ("SMART SAVE ATTR VALUES"); + case 0xd4: return ("SMART EXECUTE OFFLINE IMMEDIATE"); + case 0xd5: return ("SMART READ LOG DATA"); + case 0xd8: return ("SMART ENABLE OPERATION"); + case 0xd9: return ("SMART DISABLE OPERATION"); + case 0xda: return ("SMART RETURN STATUS"); + } + return ("SMART"); case 0xb1: return ("DEVICE CONFIGURATION"); case 0xc0: return ("CFA_ERASE"); case 0xc4: return ("READ_MUL"); @@ -158,18 +180,22 @@ ata_op_string(struct ata_cmd *cmd) case 0xed: return ("MEDIA_EJECT"); case 0xef: switch (cmd->features) { - case 0x03: return ("SETFEATURES SET TRANSFER MODE"); - case 0x02: return ("SETFEATURES ENABLE WCACHE"); - case 0x82: return ("SETFEATURES DISABLE WCACHE"); - case 0x06: return ("SETFEATURES ENABLE PUIS"); - case 0x86: return ("SETFEATURES DISABLE PUIS"); - case 0x07: return ("SETFEATURES SPIN-UP"); - case 0x10: return ("SETFEATURES ENABLE SATA FEATURE"); - case 0x90: return ("SETFEATURES DISABLE SATA FEATURE"); - case 0xaa: return ("SETFEATURES ENABLE RCACHE"); - case 0x55: return ("SETFEATURES DISABLE RCACHE"); - } - return "SETFEATURES"; + case 0x03: return ("SETFEATURES SET TRANSFER MODE"); + case 0x02: return ("SETFEATURES ENABLE WCACHE"); + case 0x82: return ("SETFEATURES DISABLE WCACHE"); + case 0x06: return ("SETFEATURES ENABLE PUIS"); + case 0x86: return ("SETFEATURES DISABLE PUIS"); + case 0x07: return ("SETFEATURES SPIN-UP"); + case 0x10: return ("SETFEATURES ENABLE SATA FEATURE"); + case 0x90: return ("SETFEATURES DISABLE SATA FEATURE"); + case 0xaa: return ("SETFEATURES ENABLE RCACHE"); + case 0x55: return ("SETFEATURES DISABLE RCACHE"); + case 0x5d: return ("SETFEATURES ENABLE RELIRQ"); + case 0xdd: return ("SETFEATURES DISABLE RELIRQ"); + case 0x5e: return ("SETFEATURES ENABLE SRVIRQ"); + case 0xde: return ("SETFEATURES DISABLE SRVIRQ"); + } + return "SETFEATURES"; case 0xf1: return ("SECURITY_SET_PASSWORD"); case 0xf2: return ("SECURITY_UNLOCK"); case 0xf3: return ("SECURITY_ERASE_PREPARE"); Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Thu Feb 4 19:30:24 2016 (r295275) +++ head/sys/dev/ata/ata-all.c Thu Feb 4 19:53:54 2016 (r295276) @@ -496,7 +496,18 @@ ata_cmd2str(struct ata_request *request) } } else { switch (request->u.ata.command) { - case 0x00: return ("NOP"); + case 0x00: + switch (request->u.ata.feature) { + case 0x00: return ("NOP FLUSHQUEUE"); + case 0x01: return ("NOP AUTOPOLL"); + } + return ("NOP"); + case 0x03: return ("CFA_REQUEST_EXTENDED_ERROR"); + case 0x06: + switch (request->u.ata.feature) { + case 0x01: return ("DSM TRIM"); + } + return "DSM"; case 0x08: return ("DEVICE_RESET"); case 0x20: return ("READ"); case 0x24: return ("READ48"); @@ -504,18 +515,65 @@ ata_cmd2str(struct ata_request *request) case 0x26: return ("READ_DMA_QUEUED48"); case 0x27: return ("READ_NATIVE_MAX_ADDRESS48"); case 0x29: return ("READ_MUL48"); + case 0x2a: return ("READ_STREAM_DMA48"); + case 0x2b: return ("READ_STREAM48"); + case 0x2f: return ("READ_LOG_EXT"); case 0x30: return ("WRITE"); case 0x34: return ("WRITE48"); case 0x35: return ("WRITE_DMA48"); case 0x36: return ("WRITE_DMA_QUEUED48"); case 0x37: return ("SET_MAX_ADDRESS48"); case 0x39: return ("WRITE_MUL48"); + case 0x3a: return ("WRITE_STREAM_DMA48"); + case 0x3b: return ("WRITE_STREAM48"); + case 0x3d: return ("WRITE_DMA_FUA48"); + case 0x3e: return ("WRITE_DMA_QUEUED_FUA48"); + case 0x3f: return ("WRITE_LOG_EXT"); + case 0x40: return ("READ_VERIFY"); + case 0x42: return ("READ_VERIFY48"); + case 0x45: + switch (request->u.ata.feature) { + case 0x55: return ("WRITE_UNCORRECTABLE48 PSEUDO"); + case 0xaa: return ("WRITE_UNCORRECTABLE48 FLAGGED"); + } + return "WRITE_UNCORRECTABLE48"; + case 0x51: return ("CONFIGURE_STREAM"); + case 0x60: return ("READ_FPDMA_QUEUED"); + case 0x61: return ("WRITE_FPDMA_QUEUED"); + case 0x63: return ("NCQ_NON_DATA"); + case 0x64: return ("SEND_FPDMA_QUEUED"); + case 0x65: return ("RECEIVE_FPDMA_QUEUED"); + case 0x67: + if (request->u.ata.feature == 0xec) + return ("SEP_ATTN IDENTIFY"); + switch (request->u.ata.lba) { + case 0x00: return ("SEP_ATTN READ BUFFER"); + case 0x02: return ("SEP_ATTN RECEIVE DIAGNOSTIC RESULTS"); + case 0x80: return ("SEP_ATTN WRITE BUFFER"); + case 0x82: return ("SEP_ATTN SEND DIAGNOSTIC"); + } + return ("SEP_ATTN"); case 0x70: return ("SEEK"); - case 0xa0: return ("PACKET_CMD"); + case 0x87: return ("CFA_TRANSLATE_SECTOR"); + case 0x90: return ("EXECUTE_DEVICE_DIAGNOSTIC"); + case 0x92: return ("DOWNLOAD_MICROCODE"); + case 0xa0: return ("PACKET"); case 0xa1: return ("ATAPI_IDENTIFY"); case 0xa2: return ("SERVICE"); - case 0xb0: return ("SMART"); - case 0xc0: return ("CFA ERASE"); + case 0xb0: + switch(request->u.ata.feature) { + case 0xd0: return ("SMART READ ATTR VALUES"); + case 0xd1: return ("SMART READ ATTR THRESHOLDS"); + case 0xd3: return ("SMART SAVE ATTR VALUES"); + case 0xd4: return ("SMART EXECUTE OFFLINE IMMEDIATE"); + case 0xd5: return ("SMART READ LOG DATA"); + case 0xd8: return ("SMART ENABLE OPERATION"); + case 0xd9: return ("SMART DISABLE OPERATION"); + case 0xda: return ("SMART RETURN STATUS"); + } + return ("SMART"); + case 0xb1: return ("DEVICE CONFIGURATION"); + case 0xc0: return ("CFA_ERASE"); case 0xc4: return ("READ_MUL"); case 0xc5: return ("WRITE_MUL"); case 0xc6: return ("SET_MULTI"); @@ -523,22 +581,48 @@ ata_cmd2str(struct ata_request *request) case 0xc8: return ("READ_DMA"); case 0xca: return ("WRITE_DMA"); case 0xcc: return ("WRITE_DMA_QUEUED"); + case 0xcd: return ("CFA_WRITE_MULTIPLE_WITHOUT_ERASE"); + case 0xce: return ("WRITE_MUL_FUA48"); + case 0xd1: return ("CHECK_MEDIA_CARD_TYPE"); + case 0xda: return ("GET_MEDIA_STATUS"); + case 0xde: return ("MEDIA_LOCK"); + case 0xdf: return ("MEDIA_UNLOCK"); + case 0xe0: return ("STANDBY_IMMEDIATE"); + case 0xe1: return ("IDLE_IMMEDIATE"); + case 0xe2: return ("STANDBY"); + case 0xe3: return ("IDLE"); + case 0xe4: return ("READ_BUFFER/PM"); + case 0xe5: return ("CHECK_POWER_MODE"); case 0xe6: return ("SLEEP"); case 0xe7: return ("FLUSHCACHE"); + case 0xe8: return ("WRITE_PM"); case 0xea: return ("FLUSHCACHE48"); case 0xec: return ("ATA_IDENTIFY"); + case 0xed: return ("MEDIA_EJECT"); case 0xef: switch (request->u.ata.feature) { case 0x03: return ("SETFEATURES SET TRANSFER MODE"); case 0x02: return ("SETFEATURES ENABLE WCACHE"); case 0x82: return ("SETFEATURES DISABLE WCACHE"); + case 0x06: return ("SETFEATURES ENABLE PUIS"); + case 0x86: return ("SETFEATURES DISABLE PUIS"); + case 0x07: return ("SETFEATURES SPIN-UP"); + case 0x10: return ("SETFEATURES ENABLE SATA FEATURE"); + case 0x90: return ("SETFEATURES DISABLE SATA FEATURE"); case 0xaa: return ("SETFEATURES ENABLE RCACHE"); case 0x55: return ("SETFEATURES DISABLE RCACHE"); + case 0x5d: return ("SETFEATURES ENABLE RELIRQ"); + case 0xdd: return ("SETFEATURES DISABLE RELIRQ"); + case 0x5e: return ("SETFEATURES ENABLE SRVIRQ"); + case 0xde: return ("SETFEATURES DISABLE SRVIRQ"); } - sprintf(buffer, "SETFEATURES 0x%02x", - request->u.ata.feature); - return (buffer); - case 0xf5: return ("SECURITY_FREE_LOCK"); + return "SETFEATURES"; + case 0xf1: return ("SECURITY_SET_PASSWORD"); + case 0xf2: return ("SECURITY_UNLOCK"); + case 0xf3: return ("SECURITY_ERASE_PREPARE"); + case 0xf4: return ("SECURITY_ERASE_UNIT"); + 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"); } Modified: head/sys/sys/ata.h ============================================================================== --- head/sys/sys/ata.h Thu Feb 4 19:30:24 2016 (r295275) +++ head/sys/sys/ata.h Thu Feb 4 19:53:54 2016 (r295276) @@ -368,6 +368,9 @@ struct ata_params { #define ATA_WRITE_LOG_EXT 0x3f #define ATA_READ_VERIFY 0x40 #define ATA_READ_VERIFY48 0x42 +#define ATA_WRITE_UNCORRECTABLE48 0x45 /* write uncorrectable 48bit LBA */ +#define ATA_WU_PSEUDO 0x55 /* pseudo-uncorrectable error */ +#define ATA_WU_FLAGGED 0xaa /* flagged-uncorrectable error */ #define ATA_READ_LOG_DMA_EXT 0x47 /* read log DMA ext - PIO Data-In */ #define ATA_READ_FPDMA_QUEUED 0x60 /* read DMA NCQ */ #define ATA_WRITE_FPDMA_QUEUED 0x61 /* write DMA NCQ */ From owner-svn-src-all@freebsd.org Thu Feb 4 20:55:51 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 114A8A9B8F9; Thu, 4 Feb 2016 20:55:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB566118F; Thu, 4 Feb 2016 20:55:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14KtnYD019882; Thu, 4 Feb 2016 20:55:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14Ktnug019881; Thu, 4 Feb 2016 20:55:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201602042055.u14Ktnug019881@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 4 Feb 2016 20:55:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295277 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 20:55:51 -0000 Author: kib Date: Thu Feb 4 20:55:49 2016 New Revision: 295277 URL: https://svnweb.freebsd.org/changeset/base/295277 Log: When matching brand to the ELF binary by notes, try to find a brand with interpreter name exactly matching one wanted by the binary. If no such brand exists, return first brand which accepted the binary by note. The change fixes a regression after r292749, where e.g. our two ia32 compat brands, ia32_brand_info and ia32_brand_oinfo, only differ by the interpeter path and binary matches to a brand by linkage order. Then old binaries which require /usr/libexec/ld-elf.so.1 but matched against ia32_brand_info with interp_path /libexec/ld-elf.so.1, were considered requiring non-standard interpreter name, and magic to force ld-elf32.so.1 did not happen. Note that it might make sense to apply the same selection of brands for other matching criteria, SCO EI_OSABI and 3.x string. Reported and tested by: dwmalone Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Thu Feb 4 19:53:54 2016 (r295276) +++ head/sys/kern/imgact_elf.c Thu Feb 4 20:55:49 2016 (r295277) @@ -258,7 +258,7 @@ __elfN(get_brandinfo)(struct image_param int interp_name_len, int32_t *osrel) { const Elf_Ehdr *hdr = (const Elf_Ehdr *)imgp->image_header; - Elf_Brandinfo *bi; + Elf_Brandinfo *bi, *bi_m; boolean_t ret; int i; @@ -270,6 +270,7 @@ __elfN(get_brandinfo)(struct image_param */ /* Look for an ".note.ABI-tag" ELF section */ + bi_m = NULL; for (i = 0; i < MAX_BRANDS; i++) { bi = elf_brand_list[i]; if (bi == NULL) @@ -280,10 +281,28 @@ __elfN(get_brandinfo)(struct image_param /* Give brand a chance to veto check_note's guess */ if (ret && bi->header_supported) ret = bi->header_supported(imgp); + /* + * If note checker claimed the binary, but the + * interpreter path in the image does not + * match default one for the brand, try to + * search for other brands with the same + * interpreter. Either there is better brand + * with the right interpreter, or, failing + * this, we return first brand which accepted + * our note and, optionally, header. + */ + if (ret && bi_m == NULL && (strlen(bi->interp_path) + + 1 != interp_name_len || strncmp(interp, + bi->interp_path, interp_name_len) != 0)) { + bi_m = bi; + ret = 0; + } if (ret) return (bi); } } + if (bi_m != NULL) + return (bi_m); /* If the executable has a brand, search for it in the brand list. */ for (i = 0; i < MAX_BRANDS; i++) { From owner-svn-src-all@freebsd.org Thu Feb 4 21:39:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AFA0A9C98A; Thu, 4 Feb 2016 21:39:59 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BF4D184D; Thu, 4 Feb 2016 21:39:59 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14LdwxU032810; Thu, 4 Feb 2016 21:39:58 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14Ldwql032809; Thu, 4 Feb 2016 21:39:58 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201602042139.u14Ldwql032809@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Thu, 4 Feb 2016 21:39:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295282 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 21:39:59 -0000 Author: gnn Date: Thu Feb 4 21:39:58 2016 New Revision: 295282 URL: https://svnweb.freebsd.org/changeset/base/295282 Log: Summary: Remove discussion of fastforwarding. Modified: head/share/man/man4/inet.4 Modified: head/share/man/man4/inet.4 ============================================================================== --- head/share/man/man4/inet.4 Thu Feb 4 21:27:03 2016 (r295281) +++ head/share/man/man4/inet.4 Thu Feb 4 21:39:58 2016 (r295282) @@ -164,33 +164,11 @@ MIB. In addition to the variables supported by the transport protocols (for which the respective manual pages may be consulted), the following general variables are defined: -.Bl -tag -width IPCTL_FASTFORWARDING +.Bl -tag -width IPCTL_ACCEPTSOURCEROUTE .It Dv IPCTL_FORWARDING .Pq ip.forwarding Boolean: enable/disable forwarding of IP packets. Defaults to off. -.It Dv IPCTL_FASTFORWARDING -.Pq ip.fastforwarding -Boolean: enable/disable the use of -.Tn fast IP forwarding -code. -Defaults to off. -When -.Tn fast IP forwarding -is enabled, IP packets are forwarded directly to the appropriate network -interface with direct processing to completion, which greatly improves -the throughput. -All packets for local IP addresses, non-unicast, or with IP options are -handled by the normal IP input processing path. -All features of the normal (slow) IP forwarding path are supported -including firewall (through -.Xr pfil 9 -hooks) checking, except -.Xr ipsec 4 -tunnel brokering. -The -.Tn IP fastforwarding -path does not generate ICMP redirect or source quench messages. .It Dv IPCTL_SENDREDIRECTS .Pq ip.redirect Boolean: enable/disable sending of ICMP redirects in response to From owner-svn-src-all@freebsd.org Thu Feb 4 21:46:39 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10E18A9CC69; Thu, 4 Feb 2016 21:46:39 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D27651F23; Thu, 4 Feb 2016 21:46:38 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14Lkbw5035940; Thu, 4 Feb 2016 21:46:37 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14LkbZS035939; Thu, 4 Feb 2016 21:46:37 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201602042146.u14LkbZS035939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Thu, 4 Feb 2016 21:46:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295283 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 21:46:39 -0000 Author: gnn Date: Thu Feb 4 21:46:37 2016 New Revision: 295283 URL: https://svnweb.freebsd.org/changeset/base/295283 Log: Summary: Update the date Modified: head/share/man/man4/inet.4 Modified: head/share/man/man4/inet.4 ============================================================================== --- head/share/man/man4/inet.4 Thu Feb 4 21:39:58 2016 (r295282) +++ head/share/man/man4/inet.4 Thu Feb 4 21:46:37 2016 (r295283) @@ -28,7 +28,7 @@ .\" From: @(#)inet.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd April 7, 2015 +.Dd Feb 4, 2016 .Dt INET 4 .Os .Sh NAME From owner-svn-src-all@freebsd.org Thu Feb 4 22:39:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48447A9CE80; Thu, 4 Feb 2016 22:39:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0166FAE2; Thu, 4 Feb 2016 22:39:28 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14MdSkv051510; Thu, 4 Feb 2016 22:39:28 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14MdRMF051508; Thu, 4 Feb 2016 22:39:27 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201602042239.u14MdRMF051508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 4 Feb 2016 22:39:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295284 - in head/sys: conf dev/cfi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 22:39:29 -0000 Author: adrian Date: Thu Feb 4 22:39:27 2016 New Revision: 295284 URL: https://svnweb.freebsd.org/changeset/base/295284 Log: Provide a workaround for setting the correct endianness when doing CFI on a mips big-endian board. This is (hopefully! ish!) a temporary change until a slightly better way can be found to express this without a config option. Tested: * BUFFALO WZR-HP-G300NH 1stGen (by submitter) Submitted by: Mori Hiroki Modified: head/sys/conf/options head/sys/dev/cfi/cfi_core.c Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Thu Feb 4 21:46:37 2016 (r295283) +++ head/sys/conf/options Thu Feb 4 22:39:27 2016 (r295284) @@ -918,6 +918,7 @@ VNET_DEBUG opt_global.h # Common Flash Interface (CFI) options CFI_SUPPORT_STRATAFLASH opt_cfi.h CFI_ARMEDANDDANGEROUS opt_cfi.h +CFI_HARDWAREBYTESWAP opt_cfi.h # Sound options SND_DEBUG opt_snd.h Modified: head/sys/dev/cfi/cfi_core.c ============================================================================== --- head/sys/dev/cfi/cfi_core.c Thu Feb 4 21:46:37 2016 (r295283) +++ head/sys/dev/cfi/cfi_core.c Thu Feb 4 22:39:27 2016 (r295284) @@ -99,11 +99,17 @@ cfi_read(struct cfi_softc *sc, u_int ofs break; case 2: sval = bus_space_read_2(sc->sc_tag, sc->sc_handle, ofs); +#ifdef CFI_HARDWAREBYTESWAP + val = sval; +#else val = le16toh(sval); +#endif break; case 4: val = bus_space_read_4(sc->sc_tag, sc->sc_handle, ofs); +#ifndef CFI_HARDWAREBYTESWAP val = le32toh(val); +#endif break; default: val = ~0; @@ -122,10 +128,19 @@ cfi_write(struct cfi_softc *sc, u_int of bus_space_write_1(sc->sc_tag, sc->sc_handle, ofs, val); break; case 2: +#ifdef CFI_HARDWAREBYTESWAP + bus_space_write_2(sc->sc_tag, sc->sc_handle, ofs, val); +#else bus_space_write_2(sc->sc_tag, sc->sc_handle, ofs, htole16(val)); + +#endif break; case 4: +#ifdef CFI_HARDWAREBYTESWAP + bus_space_write_4(sc->sc_tag, sc->sc_handle, ofs, val); +#else bus_space_write_4(sc->sc_tag, sc->sc_handle, ofs, htole32(val)); +#endif break; } } From owner-svn-src-all@freebsd.org Thu Feb 4 22:53:14 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EC5BA9D474; Thu, 4 Feb 2016 22:53:14 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51C2A13CC; Thu, 4 Feb 2016 22:53:14 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14MrDbV057257; Thu, 4 Feb 2016 22:53:13 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14MrCqn057246; Thu, 4 Feb 2016 22:53:12 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201602042253.u14MrCqn057246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Thu, 4 Feb 2016 22:53:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295285 - in stable/10: share/man/man4 sys/net sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 22:53:14 -0000 Author: gnn Date: Thu Feb 4 22:53:12 2016 New Revision: 295285 URL: https://svnweb.freebsd.org/changeset/base/295285 Log: MFC: r290383,295282,295283 Replace the fastforward path with tryforward which does not require a sysctl and will always be on. The former split between default and fast forwarding is removed by this commit while preserving the ability to use all network stack features. Differential Revision: https://reviews.freebsd.org/D4042 Reviewed by: ae, melifaro, olivier, rwatson Approved by: re (glebius) Sponsored by: Rubicon Communications (Netgate) Modified: stable/10/share/man/man4/inet.4 stable/10/sys/net/if_arcsubr.c stable/10/sys/net/if_ef.c stable/10/sys/net/if_ethersubr.c stable/10/sys/net/if_fddisubr.c stable/10/sys/net/if_fwsubr.c stable/10/sys/net/if_iso88025subr.c stable/10/sys/netinet/in_var.h stable/10/sys/netinet/ip_fastfwd.c stable/10/sys/netinet/ip_input.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/inet.4 ============================================================================== --- stable/10/share/man/man4/inet.4 Thu Feb 4 22:39:27 2016 (r295284) +++ stable/10/share/man/man4/inet.4 Thu Feb 4 22:53:12 2016 (r295285) @@ -32,7 +32,7 @@ .\" From: @(#)inet.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd January 26, 2012 +.Dd Feb 4, 2016 .Dt INET 4 .Os .Sh NAME @@ -169,33 +169,11 @@ MIB. In addition to the variables supported by the transport protocols (for which the respective manual pages may be consulted), the following general variables are defined: -.Bl -tag -width IPCTL_FASTFORWARDING +.Bl -tag -width IPCTL_ACCEPTSOURCEROUTE .It Dv IPCTL_FORWARDING .Pq ip.forwarding Boolean: enable/disable forwarding of IP packets. Defaults to off. -.It Dv IPCTL_FASTFORWARDING -.Pq ip.fastforwarding -Boolean: enable/disable the use of -.Tn fast IP forwarding -code. -Defaults to off. -When -.Tn fast IP forwarding -is enabled, IP packets are forwarded directly to the appropriate network -interface with direct processing to completion, which greatly improves -the throughput. -All packets for local IP addresses, non-unicast, or with IP options are -handled by the normal IP input processing path. -All features of the normal (slow) IP forwarding path are supported -including firewall (through -.Xr pfil 9 -hooks) checking, except -.Xr ipsec 4 -tunnel brokering. -The -.Tn IP fastforwarding -path does not generate ICMP redirect or source quench messages. .It Dv IPCTL_SENDREDIRECTS .Pq ip.redirect Boolean: enable/disable sending of ICMP redirects in response to Modified: stable/10/sys/net/if_arcsubr.c ============================================================================== --- stable/10/sys/net/if_arcsubr.c Thu Feb 4 22:39:27 2016 (r295284) +++ stable/10/sys/net/if_arcsubr.c Thu Feb 4 22:53:12 2016 (r295285) @@ -557,15 +557,11 @@ arc_input(struct ifnet *ifp, struct mbuf #ifdef INET case ARCTYPE_IP: m_adj(m, ARC_HDRNEWLEN); - if ((m = ip_fastforward(m)) == NULL) - return; isr = NETISR_IP; break; case ARCTYPE_IP_OLD: m_adj(m, ARC_HDRLEN); - if ((m = ip_fastforward(m)) == NULL) - return; isr = NETISR_IP; break; Modified: stable/10/sys/net/if_ef.c ============================================================================== --- stable/10/sys/net/if_ef.c Thu Feb 4 22:39:27 2016 (r295284) +++ stable/10/sys/net/if_ef.c Thu Feb 4 22:53:12 2016 (r295285) @@ -240,8 +240,6 @@ ef_inputEII(struct mbuf *m, struct ether #endif #ifdef INET case ETHERTYPE_IP: - if ((m = ip_fastforward(m)) == NULL) - return (0); isr = NETISR_IP; break; Modified: stable/10/sys/net/if_ethersubr.c ============================================================================== --- stable/10/sys/net/if_ethersubr.c Thu Feb 4 22:39:27 2016 (r295284) +++ stable/10/sys/net/if_ethersubr.c Thu Feb 4 22:53:12 2016 (r295285) @@ -784,8 +784,6 @@ ether_demux(struct ifnet *ifp, struct mb switch (ether_type) { #ifdef INET case ETHERTYPE_IP: - if ((m = ip_fastforward(m)) == NULL) - return; isr = NETISR_IP; break; Modified: stable/10/sys/net/if_fddisubr.c ============================================================================== --- stable/10/sys/net/if_fddisubr.c Thu Feb 4 22:39:27 2016 (r295284) +++ stable/10/sys/net/if_fddisubr.c Thu Feb 4 22:53:12 2016 (r295285) @@ -501,8 +501,6 @@ fddi_input(ifp, m) switch (type) { #ifdef INET case ETHERTYPE_IP: - if ((m = ip_fastforward(m)) == NULL) - return; isr = NETISR_IP; break; Modified: stable/10/sys/net/if_fwsubr.c ============================================================================== --- stable/10/sys/net/if_fwsubr.c Thu Feb 4 22:39:27 2016 (r295284) +++ stable/10/sys/net/if_fwsubr.c Thu Feb 4 22:53:12 2016 (r295285) @@ -595,8 +595,6 @@ firewire_input(struct ifnet *ifp, struct switch (type) { #ifdef INET case ETHERTYPE_IP: - if ((m = ip_fastforward(m)) == NULL) - return; isr = NETISR_IP; break; Modified: stable/10/sys/net/if_iso88025subr.c ============================================================================== --- stable/10/sys/net/if_iso88025subr.c Thu Feb 4 22:39:27 2016 (r295284) +++ stable/10/sys/net/if_iso88025subr.c Thu Feb 4 22:53:12 2016 (r295285) @@ -579,8 +579,6 @@ iso88025_input(ifp, m) #ifdef INET case ETHERTYPE_IP: th->iso88025_shost[0] &= ~(TR_RII); - if ((m = ip_fastforward(m)) == NULL) - return; isr = NETISR_IP; break; Modified: stable/10/sys/netinet/in_var.h ============================================================================== --- stable/10/sys/netinet/in_var.h Thu Feb 4 22:39:27 2016 (r295284) +++ stable/10/sys/netinet/in_var.h Thu Feb 4 22:53:12 2016 (r295285) @@ -452,7 +452,7 @@ int in_scrubprefix(struct in_ifaddr *, u void ip_input(struct mbuf *); int in_ifadown(struct ifaddr *ifa, int); void in_ifscrub(struct ifnet *, struct in_ifaddr *, u_int); -struct mbuf *ip_fastforward(struct mbuf *); +struct mbuf *ip_tryforward(struct mbuf *); void *in_domifattach(struct ifnet *); void in_domifdetach(struct ifnet *, void *); Modified: stable/10/sys/netinet/ip_fastfwd.c ============================================================================== --- stable/10/sys/netinet/ip_fastfwd.c Thu Feb 4 22:39:27 2016 (r295284) +++ stable/10/sys/netinet/ip_fastfwd.c Thu Feb 4 22:53:12 2016 (r295285) @@ -109,12 +109,6 @@ __FBSDID("$FreeBSD$"); #include -static VNET_DEFINE(int, ipfastforward_active); -#define V_ipfastforward_active VNET(ipfastforward_active) - -SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, fastforwarding, CTLFLAG_RW, - &VNET_NAME(ipfastforward_active), 0, "Enable fast IP forwarding"); - static struct sockaddr_in * ip_findroute(struct route *ro, struct in_addr dest, struct mbuf *m) { @@ -159,7 +153,7 @@ ip_findroute(struct route *ro, struct in * to ip_input for full processing. */ struct mbuf * -ip_fastforward(struct mbuf *m) +ip_tryforward(struct mbuf *m) { struct ip *ip; struct mbuf *m0 = NULL; @@ -167,119 +161,20 @@ ip_fastforward(struct mbuf *m) struct sockaddr_in *dst = NULL; struct ifnet *ifp; struct in_addr odest, dest; - uint16_t sum, ip_len, ip_off; + uint16_t ip_len, ip_off; int error = 0; - int hlen, mtu; + int mtu; struct m_tag *fwd_tag = NULL; /* * Are we active and forwarding packets? */ - if (!V_ipfastforward_active || !V_ipforwarding) - return m; M_ASSERTVALID(m); M_ASSERTPKTHDR(m); bzero(&ro, sizeof(ro)); - /* - * Step 1: check for packet drop conditions (and sanity checks) - */ - - /* - * Is entire packet big enough? - */ - if (m->m_pkthdr.len < sizeof(struct ip)) { - IPSTAT_INC(ips_tooshort); - goto drop; - } - - /* - * Is first mbuf large enough for ip header and is header present? - */ - if (m->m_len < sizeof (struct ip) && - (m = m_pullup(m, sizeof (struct ip))) == NULL) { - IPSTAT_INC(ips_toosmall); - return NULL; /* mbuf already free'd */ - } - - ip = mtod(m, struct ip *); - - /* - * Is it IPv4? - */ - if (ip->ip_v != IPVERSION) { - IPSTAT_INC(ips_badvers); - goto drop; - } - - /* - * Is IP header length correct and is it in first mbuf? - */ - hlen = ip->ip_hl << 2; - if (hlen < sizeof(struct ip)) { /* minimum header length */ - IPSTAT_INC(ips_badhlen); - goto drop; - } - if (hlen > m->m_len) { - if ((m = m_pullup(m, hlen)) == NULL) { - IPSTAT_INC(ips_badhlen); - return NULL; /* mbuf already free'd */ - } - ip = mtod(m, struct ip *); - } - - /* - * Checksum correct? - */ - if (m->m_pkthdr.csum_flags & CSUM_IP_CHECKED) - sum = !(m->m_pkthdr.csum_flags & CSUM_IP_VALID); - else { - if (hlen == sizeof(struct ip)) - sum = in_cksum_hdr(ip); - else - sum = in_cksum(m, hlen); - } - if (sum) { - IPSTAT_INC(ips_badsum); - goto drop; - } - - /* - * Remember that we have checked the IP header and found it valid. - */ - m->m_pkthdr.csum_flags |= (CSUM_IP_CHECKED | CSUM_IP_VALID); - - ip_len = ntohs(ip->ip_len); - - /* - * Is IP length longer than packet we have got? - */ - if (m->m_pkthdr.len < ip_len) { - IPSTAT_INC(ips_tooshort); - goto drop; - } - - /* - * Is packet longer than IP header tells us? If yes, truncate packet. - */ - if (m->m_pkthdr.len > ip_len) { - if (m->m_len == m->m_pkthdr.len) { - m->m_len = ip_len; - m->m_pkthdr.len = ip_len; - } else - m_adj(m, ip_len - m->m_pkthdr.len); - } - - /* - * Is packet from or to 127/8? - */ - if ((ntohl(ip->ip_dst.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET || - (ntohl(ip->ip_src.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) { - IPSTAT_INC(ips_badaddr); - goto drop; - } #ifdef ALTQ /* @@ -290,12 +185,10 @@ ip_fastforward(struct mbuf *m) #endif /* - * Step 2: fallback conditions to normal ip_input path processing - */ - - /* * Only IP packets without options */ + ip = mtod(m, struct ip *); + if (ip->ip_hl != (sizeof(struct ip) >> 2)) { if (V_ip_doopts == 1) return m; Modified: stable/10/sys/netinet/ip_input.c ============================================================================== --- stable/10/sys/netinet/ip_input.c Thu Feb 4 22:39:27 2016 (r295284) +++ stable/10/sys/netinet/ip_input.c Thu Feb 4 22:53:12 2016 (r295285) @@ -77,6 +77,8 @@ __FBSDID("$FreeBSD$"); #include #ifdef IPSEC #include +#include +#include #endif /* IPSEC */ #include @@ -464,12 +466,22 @@ tooshort: } else m_adj(m, ip_len - m->m_pkthdr.len); } + /* Try to forward the packet, but if we fail continue */ #ifdef IPSEC + /* For now we do not handle IPSEC in tryforward. */ + if (!key_havesp(IPSEC_DIR_INBOUND) && !key_havesp(IPSEC_DIR_OUTBOUND) && + (V_ipforwarding == 1)) + if (ip_tryforward(m) == NULL) + return; /* * Bypass packet filtering for packets previously handled by IPsec. */ if (ip_ipsec_filtertunnel(m)) goto passin; +#else + if (V_ipforwarding == 1) + if (ip_tryforward(m) == NULL) + return; #endif /* IPSEC */ /* From owner-svn-src-all@freebsd.org Thu Feb 4 23:28:05 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66C0AA9DF13; Thu, 4 Feb 2016 23:28:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 4EC49882; Thu, 4 Feb 2016 23:28:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 466DD13AB; Thu, 4 Feb 2016 23:28:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id EF9E519A65; Thu, 4 Feb 2016 23:28:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id CBe3EpcaXeQl; Thu, 4 Feb 2016 23:28:02 +0000 (UTC) Subject: Re: svn commit: r294560 - head/etc/rc.d DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com AF81D19A5E To: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201601221214.u0MCE8Jk054031@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <56B3DE8E.9020603@FreeBSD.org> Date: Thu, 4 Feb 2016 15:28:14 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <201601221214.u0MCE8Jk054031@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ngOBgO3mLCB2utkpMj8uWo1FHPUPSMnwr" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 23:28:05 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ngOBgO3mLCB2utkpMj8uWo1FHPUPSMnwr Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 1/22/2016 4:14 AM, Dag-Erling Sm=C3=B8rgrav wrote: > Author: des > Date: Fri Jan 22 12:14:08 2016 > New Revision: 294560 > URL: https://svnweb.freebsd.org/changeset/base/294560 >=20 > Log: > Do not generate RSA1 or DSA keys by default. >=20 > Modified: > head/etc/rc.d/sshd >=20 > Modified: head/etc/rc.d/sshd > =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/etc/rc.d/sshd Fri Jan 22 12:00:56 2016 (r294559) > +++ head/etc/rc.d/sshd Fri Jan 22 12:14:08 2016 (r294560) > @@ -20,9 +20,9 @@ configtest_cmd=3D"sshd_configtest" > pidfile=3D"/var/run/${name}.pid" > extra_commands=3D"configtest keygen reload" > =20 > -: ${sshd_rsa1_enable:=3D"yes"} > +: ${sshd_rsa1_enable:=3D"no"} > : ${sshd_rsa_enable:=3D"yes"} > -: ${sshd_dsa_enable:=3D"yes"} > +: ${sshd_dsa_enable:=3D"no"} > : ${sshd_ecdsa_enable:=3D"yes"} > : ${sshd_ed25519_enable:=3D"yes"} > =20 >=20 I think perhaps you should also remove these as having default paths in the .c as well and require they be enabled in the config. Otherwise a warning is given: Feb 4 15:25:22 VM sshd[874]: error: Could not load host key: /etc/ssh/ssh_host_dsa_key Or always generate them but only load them if enabled in the config. --=20 Regards, Bryan Drewery --ngOBgO3mLCB2utkpMj8uWo1FHPUPSMnwr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWs96OAAoJEDXXcbtuRpfPppIIAMxrSe392ijRq6ZJRXSEop8w f/7gNluDLraY00TPLMAMUTzVZgMDel8UfOWGQbSHBOJcrv3q79B8tLL6VcS6fFkX r1RnIYZPpDgFgtOmsP0JwHJgKUTASK8fBvzJf5bnBUV9jkh6Lq/jWRWWsBeWy0Ls 8k4vtwC4wKaUL49RBfnUAdjmFhGz80y8lGYbWb3kvqvHpAwHvn9lrrFwK6cOGiBo N1GsfSTVf8871tGr0IxLsMKLJXfM+vV+OCT6zvmNko3mJPxKZgwd4fLZsXGANpD6 CaENz8NWOi1MWZFgAF/99gWTNCw0B79HYPJz3b1J6uMVr/WBUbMpxKMoih2Aqtk= =5Z6w -----END PGP SIGNATURE----- --ngOBgO3mLCB2utkpMj8uWo1FHPUPSMnwr-- From owner-svn-src-all@freebsd.org Thu Feb 4 23:38:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5F80A9B2FD; Thu, 4 Feb 2016 23:38:56 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2A74E22; Thu, 4 Feb 2016 23:38:56 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14Nctgc069058; Thu, 4 Feb 2016 23:38:55 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14Ncts8069055; Thu, 4 Feb 2016 23:38:55 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201602042338.u14Ncts8069055@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Thu, 4 Feb 2016 23:38:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295286 - head/sys/dev/mps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 23:38:57 -0000 Author: scottl Date: Thu Feb 4 23:38:55 2016 New Revision: 295286 URL: https://svnweb.freebsd.org/changeset/base/295286 Log: Add sysctls for dumping out the device mapping tables. I'm finding this useful for debugging device-target translation bugs. MFC after: 3 days Sponsored by: Netflix Modified: head/sys/dev/mps/mps.c head/sys/dev/mps/mps_mapping.c head/sys/dev/mps/mpsvar.h Modified: head/sys/dev/mps/mps.c ============================================================================== --- head/sys/dev/mps/mps.c Thu Feb 4 22:53:12 2016 (r295285) +++ head/sys/dev/mps/mps.c Thu Feb 4 23:38:55 2016 (r295286) @@ -1476,6 +1476,14 @@ mps_setup_sysctl(struct mps_softc *sc) OID_AUTO, "spinup_wait_time", CTLFLAG_RD, &sc->spinup_wait_time, DEFAULT_SPINUP_WAIT, "seconds to wait for " "spinup after SATA ID error"); + + SYSCTL_ADD_PROC(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "mapping_table_dump", CTLTYPE_STRING | CTLFLAG_RD, sc, 0, + mps_mapping_dump, "A", "Mapping Table Dump"); + + SYSCTL_ADD_PROC(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "encl_table_dump", CTLTYPE_STRING | CTLFLAG_RD, sc, 0, + mps_mapping_encl_dump, "A", "Enclosure Table Dump"); } int Modified: head/sys/dev/mps/mps_mapping.c ============================================================================== --- head/sys/dev/mps/mps_mapping.c Thu Feb 4 22:53:12 2016 (r295285) +++ head/sys/dev/mps/mps_mapping.c Thu Feb 4 23:38:55 2016 (r295286) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -2263,3 +2264,61 @@ out: if (sc->pending_map_events) sc->pending_map_events--; } + +int +mps_mapping_dump(SYSCTL_HANDLER_ARGS) +{ + struct mps_softc *sc; + struct dev_mapping_table *mt_entry; + struct sbuf sbuf; + int i, error; + + sc = (struct mps_softc *)arg1; + + error = sysctl_wire_old_buffer(req, 0); + if (error != 0) + return (error); + sbuf_new_for_sysctl(&sbuf, NULL, 128, req); + + sbuf_printf(&sbuf, "\nindex physical_id handle id\n"); + for (i = 0; i < sc->max_devices; i++) { + mt_entry = &sc->mapping_table[i]; + if (mt_entry->physical_id == 0) + continue; + sbuf_printf(&sbuf, "%4d %jx %04x %hd\n", + i, mt_entry->physical_id, mt_entry->dev_handle, + mt_entry->id); + } + error = sbuf_finish(&sbuf); + sbuf_delete(&sbuf); + return (error); +} + +int +mps_mapping_encl_dump(SYSCTL_HANDLER_ARGS) +{ + struct mps_softc *sc; + struct enc_mapping_table *enc_entry; + struct sbuf sbuf; + int i, error; + + sc = (struct mps_softc *)arg1; + + error = sysctl_wire_old_buffer(req, 0); + if (error != 0) + return (error); + sbuf_new_for_sysctl(&sbuf, NULL, 128, req); + + sbuf_printf(&sbuf, "\nindex enclosure_id handle map_index\n"); + for (i = 0; i < sc->max_enclosures; i++) { + enc_entry = &sc->enclosure_table[i]; + if (enc_entry->enclosure_id == 0) + continue; + sbuf_printf(&sbuf, "%4d %jx %04x %d\n", + i, enc_entry->enclosure_id, enc_entry->enc_handle, + enc_entry->start_index); + } + error = sbuf_finish(&sbuf); + sbuf_delete(&sbuf); + return (error); +} Modified: head/sys/dev/mps/mpsvar.h ============================================================================== --- head/sys/dev/mps/mpsvar.h Thu Feb 4 22:53:12 2016 (r295285) +++ head/sys/dev/mps/mpsvar.h Thu Feb 4 23:38:55 2016 (r295286) @@ -756,6 +756,8 @@ void mps_mapping_enclosure_dev_status_ch Mpi2EventDataSasEnclDevStatusChange_t *event_data); void mps_mapping_ir_config_change_event(struct mps_softc *sc, Mpi2EventDataIrConfigChangeList_t *event_data); +int mps_mapping_dump(SYSCTL_HANDLER_ARGS); +int mps_mapping_encl_dump(SYSCTL_HANDLER_ARGS); void mpssas_evt_handler(struct mps_softc *sc, uintptr_t data, MPI2_EVENT_NOTIFICATION_REPLY *event); From owner-svn-src-all@freebsd.org Thu Feb 4 23:56:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73243A9B839; Thu, 4 Feb 2016 23:56:02 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45BCA161E; Thu, 4 Feb 2016 23:56:02 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u14Nu1Hn074802; Thu, 4 Feb 2016 23:56:01 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u14Nu1m3074801; Thu, 4 Feb 2016 23:56:01 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201602042356.u14Nu1m3074801@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 4 Feb 2016 23:56:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295287 - stable/10/sys/dev/e1000 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 23:56:02 -0000 Author: marius Date: Thu Feb 4 23:56:01 2016 New Revision: 295287 URL: https://svnweb.freebsd.org/changeset/base/295287 Log: MFC: r295133 As it turns out, one of the more or less recent changes to em(4) causes watchdog timeouts when using TSO4 at link speeds below Gigabit, at least with 82573E. So disable the assist automatically when at lower speeds. Submitted by: jfv Approved by: re (kib), erj Obtained from: D3162 Modified: stable/10/sys/dev/e1000/if_em.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/e1000/if_em.c ============================================================================== --- stable/10/sys/dev/e1000/if_em.c Thu Feb 4 23:38:55 2016 (r295286) +++ stable/10/sys/dev/e1000/if_em.c Thu Feb 4 23:56:01 2016 (r295287) @@ -1377,8 +1377,15 @@ em_init_locked(struct adapter *adapter) ifp->if_hwassist = 0; if (ifp->if_capenable & IFCAP_TXCSUM) ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP); - if (ifp->if_capenable & IFCAP_TSO4) - ifp->if_hwassist |= CSUM_TSO; + /* + ** There have proven to be problems with TSO when not + ** at full gigabit speed, so disable the assist automatically + ** when at lower speeds. -jfv + */ + if (ifp->if_capenable & IFCAP_TSO4) { + if (adapter->link_speed == SPEED_1000) + ifp->if_hwassist |= CSUM_TSO; + } /* Configure for OS presence */ em_init_manageability(adapter); From owner-svn-src-all@freebsd.org Thu Feb 4 23:57:12 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8DA9AA9BA81; Thu, 4 Feb 2016 23:57:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 7CC81188A; Thu, 4 Feb 2016 23:57:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 7484C1B12; Thu, 4 Feb 2016 23:57:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 19A3119B2A; Thu, 4 Feb 2016 23:57:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id KHu0LfPDWEWm; Thu, 4 Feb 2016 23:57:05 +0000 (UTC) Subject: Re: svn commit: r294560 - head/etc/rc.d DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 2234919B23 To: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201601221214.u0MCE8Jk054031@repo.freebsd.org> <56B3DE8E.9020603@FreeBSD.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <56B3E55F.3040004@FreeBSD.org> Date: Thu, 4 Feb 2016 15:57:19 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56B3DE8E.9020603@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="T0dgwd6kDQjgSDId7KSj1S63J6VPp2SfG" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 23:57:12 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --T0dgwd6kDQjgSDId7KSj1S63J6VPp2SfG Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2/4/2016 3:28 PM, Bryan Drewery wrote: > On 1/22/2016 4:14 AM, Dag-Erling Sm=C3=B8rgrav wrote: >> Author: des >> Date: Fri Jan 22 12:14:08 2016 >> New Revision: 294560 >> URL: https://svnweb.freebsd.org/changeset/base/294560 >> >> Log: >> Do not generate RSA1 or DSA keys by default. >> >> Modified: >> head/etc/rc.d/sshd >> >> Modified: head/etc/rc.d/sshd >> =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/etc/rc.d/sshd Fri Jan 22 12:00:56 2016 (r294559) >> +++ head/etc/rc.d/sshd Fri Jan 22 12:14:08 2016 (r294560) >> @@ -20,9 +20,9 @@ configtest_cmd=3D"sshd_configtest" >> pidfile=3D"/var/run/${name}.pid" >> extra_commands=3D"configtest keygen reload" >> =20 >> -: ${sshd_rsa1_enable:=3D"yes"} >> +: ${sshd_rsa1_enable:=3D"no"} >> : ${sshd_rsa_enable:=3D"yes"} >> -: ${sshd_dsa_enable:=3D"yes"} >> +: ${sshd_dsa_enable:=3D"no"} >> : ${sshd_ecdsa_enable:=3D"yes"} >> : ${sshd_ed25519_enable:=3D"yes"} >> =20 >> >=20 > I think perhaps you should also remove these as having default paths in= > the .c as well and require they be enabled in the config. Otherwise a > warning is given: >=20 > Feb 4 15:25:22 VM sshd[874]: error: Could not load host key: > /etc/ssh/ssh_host_dsa_key This happens on every login even. It's quite annoying. >=20 > Or always generate them but only load them if enabled in the config. >=20 --=20 Regards, Bryan Drewery --T0dgwd6kDQjgSDId7KSj1S63J6VPp2SfG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWs+VgAAoJEDXXcbtuRpfP5tgIAJ2JsPsm3lvBCrFwE6We1Yun lDkzJMA1TM1k14X0ZLwh5/1wCSmuzqq80ncTAOtTzMlduD80JqWzALdcYXdoJcfO D1VM5+k4VZBriyGFaC2xlb45By6SGgXzXITGNKhyxupDNdsn/Uv9dPgKOkOvc8c0 93RtoRf0JYEGlHJ3Zbchc2zowCY1zh/XmE7FKZYYq/iJ6JF0cVaZ6IWCmFES1tfH PYGZxC91voY5CKxx1F6lO6Zj+PkEW6eI1ervjT3RIUiVfypFpgeFD5npY+QRYlWz fHksuC6sFfVALcNNbISeQ/2FuBLUUDk09EbX8vPJIfylCgcOQ6xDnnDSh28HsWE= =HkAm -----END PGP SIGNATURE----- --T0dgwd6kDQjgSDId7KSj1S63J6VPp2SfG-- From owner-svn-src-all@freebsd.org Fri Feb 5 00:12:14 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEC3AA9C188; Fri, 5 Feb 2016 00:12:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F3FE255; Fri, 5 Feb 2016 00:12:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u150CD79080728; Fri, 5 Feb 2016 00:12:13 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u150CDvD080727; Fri, 5 Feb 2016 00:12:13 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201602050012.u150CDvD080727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Fri, 5 Feb 2016 00:12:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295288 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 00:12:14 -0000 Author: marius Date: Fri Feb 5 00:12:13 2016 New Revision: 295288 URL: https://svnweb.freebsd.org/changeset/base/295288 Log: Update stable/10 to BETA1 in preparation for 10.3-BETA1 builds. Approved by: re (implicit) Modified: stable/10/sys/conf/newvers.sh Modified: stable/10/sys/conf/newvers.sh ============================================================================== --- stable/10/sys/conf/newvers.sh Thu Feb 4 23:56:01 2016 (r295287) +++ stable/10/sys/conf/newvers.sh Fri Feb 5 00:12:13 2016 (r295288) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.3" -BRANCH="PRERELEASE" +BRANCH="BETA" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Fri Feb 5 00:14:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E207A9C244; Fri, 5 Feb 2016 00:14:26 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20B04643; Fri, 5 Feb 2016 00:14:26 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u150EP1h080838; Fri, 5 Feb 2016 00:14:25 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u150EPaI080837; Fri, 5 Feb 2016 00:14:25 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201602050014.u150EPaI080837@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Fri, 5 Feb 2016 00:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295289 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 00:14:26 -0000 Author: marius Date: Fri Feb 5 00:14:24 2016 New Revision: 295289 URL: https://svnweb.freebsd.org/changeset/base/295289 Log: Update stable/10 to BETA1 in preparation for 10.3-BETA1 builds, take 2. Approved by: re (implicit) Modified: stable/10/sys/conf/newvers.sh Modified: stable/10/sys/conf/newvers.sh ============================================================================== --- stable/10/sys/conf/newvers.sh Fri Feb 5 00:12:13 2016 (r295288) +++ stable/10/sys/conf/newvers.sh Fri Feb 5 00:14:24 2016 (r295289) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.3" -BRANCH="BETA" +BRANCH="BETA1" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Fri Feb 5 03:46:55 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CA77A9A5D8; Fri, 5 Feb 2016 03:46:55 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C76C2125D; Fri, 5 Feb 2016 03:46:54 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u153krbo042418; Fri, 5 Feb 2016 03:46:53 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u153krZ9042417; Fri, 5 Feb 2016 03:46:53 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201602050346.u153krZ9042417@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 5 Feb 2016 03:46:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295295 - head/sys/dev/hyperv/storvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 03:46:55 -0000 Author: sephe Date: Fri Feb 5 03:46:53 2016 New Revision: 295295 URL: https://svnweb.freebsd.org/changeset/base/295295 Log: hyperv/stor: Fix the NULL pointer dereference Reported by: Netapp Submitted by: Hongjiang Zhang Reviewed by: adrian, sephe, Dexuan Cui Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5097 Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Fri Feb 5 03:20:27 2016 (r295294) +++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Fri Feb 5 03:46:53 2016 (r295295) @@ -1524,13 +1524,12 @@ static void storvsc_destroy_bounce_buffer(struct sglist *sgl) { struct hv_sgl_node *sgl_node = NULL; - - sgl_node = LIST_FIRST(&g_hv_sgl_page_pool.in_use_sgl_list); - LIST_REMOVE(sgl_node, link); - if (NULL == sgl_node) { + if (LIST_EMPTY(&g_hv_sgl_page_pool.in_use_sgl_list)) { printf("storvsc error: not enough in use sgl\n"); return; } + sgl_node = LIST_FIRST(&g_hv_sgl_page_pool.in_use_sgl_list); + LIST_REMOVE(sgl_node, link); sgl_node->sgl_data = sgl; LIST_INSERT_HEAD(&g_hv_sgl_page_pool.free_sgl_list, sgl_node, link); } @@ -1556,12 +1555,12 @@ storvsc_create_bounce_buffer(uint16_t se struct hv_sgl_node *sgl_node = NULL; /* get struct sglist from free_sgl_list */ - sgl_node = LIST_FIRST(&g_hv_sgl_page_pool.free_sgl_list); - LIST_REMOVE(sgl_node, link); - if (NULL == sgl_node) { + if (LIST_EMPTY(&g_hv_sgl_page_pool.free_sgl_list)) { printf("storvsc error: not enough free sgl\n"); return NULL; } + sgl_node = LIST_FIRST(&g_hv_sgl_page_pool.free_sgl_list); + LIST_REMOVE(sgl_node, link); bounce_sgl = sgl_node->sgl_data; LIST_INSERT_HEAD(&g_hv_sgl_page_pool.in_use_sgl_list, sgl_node, link); From owner-svn-src-all@freebsd.org Fri Feb 5 04:03:52 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59C74A9ABBB; Fri, 5 Feb 2016 04:03:52 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33D371D0B; Fri, 5 Feb 2016 04:03:52 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1543pfs048148; Fri, 5 Feb 2016 04:03:51 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1543pLI048146; Fri, 5 Feb 2016 04:03:51 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201602050403.u1543pLI048146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 5 Feb 2016 04:03:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295296 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 04:03:52 -0000 Author: sephe Date: Fri Feb 5 04:03:50 2016 New Revision: 295296 URL: https://svnweb.freebsd.org/changeset/base/295296 Log: hyperv/hn: Avoid duplicate csum features settings - Record csum features in softc, so we don't need to duplicate the logic from attach path to ioctl path. - Protect if_capenable and if_hwassist changes by main lock. - Prefer turn on/off bits in if_hwassist explicitly instead of using XOR. Reviewed by: adrian, Hongjiang Zhang Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5085 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Fri Feb 5 03:46:53 2016 (r295295) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Fri Feb 5 04:03:50 2016 (r295296) @@ -1043,6 +1043,8 @@ typedef struct hn_softc { u_long hn_txdma_failed; u_long hn_tx_collapsed; u_long hn_tx_chimney; + + uint64_t hn_csum_assist; } hn_softc_t; Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 5 03:46:53 2016 (r295295) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 5 04:03:50 2016 (r295296) @@ -176,6 +176,14 @@ struct hn_txdesc { CSUM_IP_ISCSI|CSUM_IP6_UDP|CSUM_IP6_TCP|CSUM_IP6_SCTP| \ CSUM_IP6_TSO|CSUM_IP6_ISCSI) +/* + * Only enable UDP checksum offloading when it is on 2012R2 or + * later. UDP checksum offloading doesn't work on earlier + * Windows releases. + */ +#define HN_CSUM_ASSIST_WIN8 (CSUM_TCP) +#define HN_CSUM_ASSIST (CSUM_UDP | CSUM_TCP) + /* XXX move to netinet/tcp_lro.h */ #define HN_LRO_HIWAT_MAX 65535 #define HN_LRO_HIWAT_DEF HN_LRO_HIWAT_MAX @@ -444,15 +452,12 @@ netvsc_attach(device_t dev) ifp->if_capenable |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_TSO | IFCAP_LRO; - /* - * Only enable UDP checksum offloading when it is on 2012R2 or - * later. UDP checksum offloading doesn't work on earlier - * Windows releases. - */ + if (hv_vmbus_protocal_version >= HV_VMBUS_VERSION_WIN8_1) - ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_TSO; + sc->hn_csum_assist = HN_CSUM_ASSIST; else - ifp->if_hwassist = CSUM_TCP | CSUM_TSO; + sc->hn_csum_assist = HN_CSUM_ASSIST_WIN8; + ifp->if_hwassist = sc->hn_csum_assist | CSUM_TSO; error = hv_rf_on_device_add(device_ctx, &device_info); if (error) @@ -1506,47 +1511,40 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, error = 0; break; case SIOCSIFCAP: + NV_LOCK(sc); + mask = ifr->ifr_reqcap ^ ifp->if_capenable; if (mask & IFCAP_TXCSUM) { - if (IFCAP_TXCSUM & ifp->if_capenable) { - ifp->if_capenable &= ~IFCAP_TXCSUM; - ifp->if_hwassist &= ~(CSUM_TCP | CSUM_UDP); - } else { - ifp->if_capenable |= IFCAP_TXCSUM; - /* - * Only enable UDP checksum offloading on - * Windows Server 2012R2 or later releases. - */ - if (hv_vmbus_protocal_version >= - HV_VMBUS_VERSION_WIN8_1) { - ifp->if_hwassist |= - (CSUM_TCP | CSUM_UDP); - } else { - ifp->if_hwassist |= CSUM_TCP; - } - } + ifp->if_capenable ^= IFCAP_TXCSUM; + if (ifp->if_capenable & IFCAP_TXCSUM) + ifp->if_hwassist |= sc->hn_csum_assist; + else + ifp->if_hwassist &= ~sc->hn_csum_assist; } - if (mask & IFCAP_RXCSUM) { - if (IFCAP_RXCSUM & ifp->if_capenable) { - ifp->if_capenable &= ~IFCAP_RXCSUM; - } else { - ifp->if_capenable |= IFCAP_RXCSUM; - } - } + if (mask & IFCAP_RXCSUM) + ifp->if_capenable ^= IFCAP_RXCSUM; + if (mask & IFCAP_LRO) ifp->if_capenable ^= IFCAP_LRO; if (mask & IFCAP_TSO4) { ifp->if_capenable ^= IFCAP_TSO4; - ifp->if_hwassist ^= CSUM_IP_TSO; + if (ifp->if_capenable & IFCAP_TSO4) + ifp->if_hwassist |= CSUM_IP_TSO; + else + ifp->if_hwassist &= ~CSUM_IP_TSO; } if (mask & IFCAP_TSO6) { ifp->if_capenable ^= IFCAP_TSO6; - ifp->if_hwassist ^= CSUM_IP6_TSO; + if (ifp->if_capenable & IFCAP_TSO6) + ifp->if_hwassist |= CSUM_IP6_TSO; + else + ifp->if_hwassist &= ~CSUM_IP6_TSO; } + NV_UNLOCK(sc); error = 0; break; case SIOCADDMULTI: From owner-svn-src-all@freebsd.org Fri Feb 5 04:10:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FC01A9ADA0; Fri, 5 Feb 2016 04:10:06 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F220D1FD4; Fri, 5 Feb 2016 04:10:05 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u154A4pI048399; Fri, 5 Feb 2016 04:10:04 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u154A4cf048397; Fri, 5 Feb 2016 04:10:04 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201602050410.u154A4cf048397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 5 Feb 2016 04:10:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295297 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 04:10:06 -0000 Author: sephe Date: Fri Feb 5 04:10:04 2016 New Revision: 295297 URL: https://svnweb.freebsd.org/changeset/base/295297 Log: hyperv/hn: Reorganize TX csum offloading - For non-TSO offloading, we don't need to access mbuf to know which csum offloading is requested, we can just use the CSUM_{IP,TCP,UDP} in the csum_flags. - For TSO offloading, we still can depend on CSUM_{TSO4,TSO6} in the csum_flags to tell whether the TSO packet is an IPv4 TSO packet or an IPv6 TSO packet. This streamlines csum offloading handling (remove the two goto) and allows us the nuke the unnecessary get_transport_proto_type(). Reviewed by: adrian, Hongjiang Zhang Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5098 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Fri Feb 5 04:03:50 2016 (r295296) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Fri Feb 5 04:10:04 2016 (r295297) @@ -1015,6 +1015,7 @@ typedef struct hn_softc { bus_dma_tag_t hn_tx_rndis_dtag; int hn_tx_chimney_size; int hn_tx_chimney_max; + uint64_t hn_csum_assist; struct mtx hn_txlist_spin; struct hn_txdesc_list hn_txlist; @@ -1043,8 +1044,6 @@ typedef struct hn_softc { u_long hn_txdma_failed; u_long hn_tx_collapsed; u_long hn_tx_chimney; - - uint64_t hn_csum_assist; } hn_softc_t; Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 5 04:03:50 2016 (r295296) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 5 04:10:04 2016 (r295297) @@ -167,16 +167,6 @@ struct hn_txdesc { #define HN_TXD_FLAG_DMAMAP 0x2 /* - * A unified flag for all outbound check sum flags is useful, - * and it helps avoiding unnecessary check sum calculation in - * network forwarding scenario. - */ -#define HV_CSUM_FOR_OUTBOUND \ - (CSUM_IP|CSUM_IP_UDP|CSUM_IP_TCP|CSUM_IP_SCTP|CSUM_IP_TSO| \ - CSUM_IP_ISCSI|CSUM_IP6_UDP|CSUM_IP6_TCP|CSUM_IP6_SCTP| \ - CSUM_IP6_TSO|CSUM_IP6_ISCSI) - -/* * Only enable UDP checksum offloading when it is on 2012R2 or * later. UDP checksum offloading doesn't work on earlier * Windows releases. @@ -265,62 +255,6 @@ hn_set_lro_hiwat(struct hn_softc *sc, in #endif } -/* - * NetVsc get message transport protocol type - */ -static uint32_t get_transport_proto_type(struct mbuf *m_head) -{ - uint32_t ret_val = TRANSPORT_TYPE_NOT_IP; - uint16_t ether_type = 0; - int ether_len = 0; - struct ether_vlan_header *eh; -#ifdef INET - struct ip *iph; -#endif -#ifdef INET6 - struct ip6_hdr *ip6; -#endif - - eh = mtod(m_head, struct ether_vlan_header*); - if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) { - ether_len = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN; - ether_type = eh->evl_proto; - } else { - ether_len = ETHER_HDR_LEN; - ether_type = eh->evl_encap_proto; - } - - switch (ntohs(ether_type)) { -#ifdef INET6 - case ETHERTYPE_IPV6: - ip6 = (struct ip6_hdr *)(m_head->m_data + ether_len); - - if (IPPROTO_TCP == ip6->ip6_nxt) { - ret_val = TRANSPORT_TYPE_IPV6_TCP; - } else if (IPPROTO_UDP == ip6->ip6_nxt) { - ret_val = TRANSPORT_TYPE_IPV6_UDP; - } - break; -#endif -#ifdef INET - case ETHERTYPE_IP: - iph = (struct ip *)(m_head->m_data + ether_len); - - if (IPPROTO_TCP == iph->ip_p) { - ret_val = TRANSPORT_TYPE_IPV4_TCP; - } else if (IPPROTO_UDP == iph->ip_p) { - ret_val = TRANSPORT_TYPE_IPV4_UDP; - } - break; -#endif - default: - ret_val = TRANSPORT_TYPE_NOT_IP; - break; - } - - return (ret_val); -} - static int hn_ifmedia_upd(struct ifnet *ifp __unused) { @@ -783,16 +717,13 @@ hn_start_locked(struct ifnet *ifp, int l hn_softc_t *sc = ifp->if_softc; struct hv_device *device_ctx = vmbus_get_devctx(sc->hn_dev); netvsc_dev *net_dev = sc->net_dev; - struct ether_vlan_header *eh; rndis_msg *rndis_mesg; rndis_packet *rndis_pkt; rndis_per_packet_info *rppi; ndis_8021q_info *rppi_vlan_info; rndis_tcp_ip_csum_info *csum_info; rndis_tcp_tso_info *tso_info; - int ether_len; uint32_t rndis_msg_size = 0; - uint32_t trans_proto_type; if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != IFF_DRV_RUNNING) @@ -872,101 +803,78 @@ hn_start_locked(struct ifnet *ifp, int l m_head->m_pkthdr.ether_vtag & 0xfff; } - /* Only check the flags for outbound and ignore the ones for inbound */ - if (0 == (m_head->m_pkthdr.csum_flags & HV_CSUM_FOR_OUTBOUND)) { - goto pre_send; - } - - eh = mtod(m_head, struct ether_vlan_header*); - if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) { - ether_len = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN; - } else { - ether_len = ETHER_HDR_LEN; - } - - trans_proto_type = get_transport_proto_type(m_head); - if (TRANSPORT_TYPE_NOT_IP == trans_proto_type) { - goto pre_send; - } - - /* - * TSO packet needless to setup the send side checksum - * offload. - */ if (m_head->m_pkthdr.csum_flags & CSUM_TSO) { - goto do_tso; - } - - /* setup checksum offload */ - rndis_msg_size += RNDIS_CSUM_PPI_SIZE; - rppi = hv_set_rppi_data(rndis_mesg, RNDIS_CSUM_PPI_SIZE, - tcpip_chksum_info); - csum_info = (rndis_tcp_ip_csum_info *)((char*)rppi + - rppi->per_packet_info_offset); + struct ether_vlan_header *eh; + int ether_len; - if (trans_proto_type & (TYPE_IPV4 << 16)) { - csum_info->xmit.is_ipv4 = 1; - } else { - csum_info->xmit.is_ipv6 = 1; - } + eh = mtod(m_head, struct ether_vlan_header*); + if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) { + ether_len = ETHER_HDR_LEN + + ETHER_VLAN_ENCAP_LEN; + } else { + ether_len = ETHER_HDR_LEN; + } - if (trans_proto_type & TYPE_TCP) { - csum_info->xmit.tcp_csum = 1; - csum_info->xmit.tcp_header_offset = 0; - } else if (trans_proto_type & TYPE_UDP) { - csum_info->xmit.udp_csum = 1; - } + rndis_msg_size += RNDIS_TSO_PPI_SIZE; + rppi = hv_set_rppi_data(rndis_mesg, RNDIS_TSO_PPI_SIZE, + tcp_large_send_info); - goto pre_send; + tso_info = (rndis_tcp_tso_info *)((char *)rppi + + rppi->per_packet_info_offset); + tso_info->lso_v2_xmit.type = + RNDIS_TCP_LARGE_SEND_OFFLOAD_V2_TYPE; -do_tso: - /* setup TCP segmentation offload */ - rndis_msg_size += RNDIS_TSO_PPI_SIZE; - rppi = hv_set_rppi_data(rndis_mesg, RNDIS_TSO_PPI_SIZE, - tcp_large_send_info); - - tso_info = (rndis_tcp_tso_info *)((char *)rppi + - rppi->per_packet_info_offset); - tso_info->lso_v2_xmit.type = - RNDIS_TCP_LARGE_SEND_OFFLOAD_V2_TYPE; - #ifdef INET - if (trans_proto_type & (TYPE_IPV4 << 16)) { - struct ip *ip = - (struct ip *)(m_head->m_data + ether_len); - unsigned long iph_len = ip->ip_hl << 2; - struct tcphdr *th = - (struct tcphdr *)((caddr_t)ip + iph_len); - - tso_info->lso_v2_xmit.ip_version = - RNDIS_TCP_LARGE_SEND_OFFLOAD_IPV4; - ip->ip_len = 0; - ip->ip_sum = 0; - - th->th_sum = in_pseudo(ip->ip_src.s_addr, - ip->ip_dst.s_addr, - htons(IPPROTO_TCP)); - } + if (m_head->m_pkthdr.csum_flags & CSUM_IP_TSO) { + struct ip *ip = + (struct ip *)(m_head->m_data + ether_len); + unsigned long iph_len = ip->ip_hl << 2; + struct tcphdr *th = + (struct tcphdr *)((caddr_t)ip + iph_len); + + tso_info->lso_v2_xmit.ip_version = + RNDIS_TCP_LARGE_SEND_OFFLOAD_IPV4; + ip->ip_len = 0; + ip->ip_sum = 0; + + th->th_sum = in_pseudo(ip->ip_src.s_addr, + ip->ip_dst.s_addr, htons(IPPROTO_TCP)); + } #endif #if defined(INET6) && defined(INET) - else + else #endif #ifdef INET6 - { - struct ip6_hdr *ip6 = - (struct ip6_hdr *)(m_head->m_data + ether_len); - struct tcphdr *th = (struct tcphdr *)(ip6 + 1); - - tso_info->lso_v2_xmit.ip_version = - RNDIS_TCP_LARGE_SEND_OFFLOAD_IPV6; - ip6->ip6_plen = 0; - th->th_sum = in6_cksum_pseudo(ip6, 0, IPPROTO_TCP, 0); - } + { + struct ip6_hdr *ip6 = (struct ip6_hdr *) + (m_head->m_data + ether_len); + struct tcphdr *th = (struct tcphdr *)(ip6 + 1); + + tso_info->lso_v2_xmit.ip_version = + RNDIS_TCP_LARGE_SEND_OFFLOAD_IPV6; + ip6->ip6_plen = 0; + th->th_sum = + in6_cksum_pseudo(ip6, 0, IPPROTO_TCP, 0); + } #endif - tso_info->lso_v2_xmit.tcp_header_offset = 0; - tso_info->lso_v2_xmit.mss = m_head->m_pkthdr.tso_segsz; + tso_info->lso_v2_xmit.tcp_header_offset = 0; + tso_info->lso_v2_xmit.mss = m_head->m_pkthdr.tso_segsz; + } else if (m_head->m_pkthdr.csum_flags & sc->hn_csum_assist) { + rndis_msg_size += RNDIS_CSUM_PPI_SIZE; + rppi = hv_set_rppi_data(rndis_mesg, RNDIS_CSUM_PPI_SIZE, + tcpip_chksum_info); + csum_info = (rndis_tcp_ip_csum_info *)((char*)rppi + + rppi->per_packet_info_offset); + + csum_info->xmit.is_ipv4 = 1; + if (m_head->m_pkthdr.csum_flags & CSUM_TCP) { + csum_info->xmit.tcp_csum = 1; + csum_info->xmit.tcp_header_offset = 0; + } else if (m_head->m_pkthdr.csum_flags & CSUM_UDP) { + csum_info->xmit.udp_csum = 1; + } + } -pre_send: rndis_mesg->msg_len = packet->tot_data_buf_len + rndis_msg_size; packet->tot_data_buf_len = rndis_mesg->msg_len; From owner-svn-src-all@freebsd.org Fri Feb 5 05:01:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B21FCA9CDB9; Fri, 5 Feb 2016 05:01:03 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7EB9915D0; Fri, 5 Feb 2016 05:01:03 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u155127D063152; Fri, 5 Feb 2016 05:01:02 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u155124N063151; Fri, 5 Feb 2016 05:01:02 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201602050501.u155124N063151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 5 Feb 2016 05:01:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295298 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 05:01:03 -0000 Author: sephe Date: Fri Feb 5 05:01:02 2016 New Revision: 295298 URL: https://svnweb.freebsd.org/changeset/base/295298 Log: hyperv/hn: Enable IP header checksum offloading So that: - TCP/IP stack will not do unnecessary IP header checksum for TSO packets. - Reduce guest load for non-TSO IP packets. Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5099 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 5 04:10:04 2016 (r295297) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 5 05:01:02 2016 (r295298) @@ -172,7 +172,7 @@ struct hn_txdesc { * Windows releases. */ #define HN_CSUM_ASSIST_WIN8 (CSUM_TCP) -#define HN_CSUM_ASSIST (CSUM_UDP | CSUM_TCP) +#define HN_CSUM_ASSIST (CSUM_IP | CSUM_UDP | CSUM_TCP) /* XXX move to netinet/tcp_lro.h */ #define HN_LRO_HIWAT_MAX 65535 @@ -867,6 +867,9 @@ hn_start_locked(struct ifnet *ifp, int l rppi->per_packet_info_offset); csum_info->xmit.is_ipv4 = 1; + if (m_head->m_pkthdr.csum_flags & CSUM_IP) + csum_info->xmit.ip_header_csum = 1; + if (m_head->m_pkthdr.csum_flags & CSUM_TCP) { csum_info->xmit.tcp_csum = 1; csum_info->xmit.tcp_header_offset = 0; From owner-svn-src-all@freebsd.org Fri Feb 5 05:06:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B9C6A9CFF6; Fri, 5 Feb 2016 05:06:15 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52AFE1A2B; Fri, 5 Feb 2016 05:06:15 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1556EuI065914; Fri, 5 Feb 2016 05:06:14 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1556EPW065912; Fri, 5 Feb 2016 05:06:14 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201602050506.u1556EPW065912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 5 Feb 2016 05:06:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295299 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 05:06:15 -0000 Author: sephe Date: Fri Feb 5 05:06:14 2016 New Revision: 295299 URL: https://svnweb.freebsd.org/changeset/base/295299 Log: hyperv/hn: Enable UDP RXCSUM Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5102 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Fri Feb 5 05:01:02 2016 (r295298) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Fri Feb 5 05:06:14 2016 (r295299) @@ -1036,6 +1036,7 @@ typedef struct hn_softc { u_long hn_csum_ip; u_long hn_csum_tcp; + u_long hn_csum_udp; u_long hn_csum_trusted; u_long hn_lro_tried; u_long hn_small_pkts; Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 5 05:01:02 2016 (r295298) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 5 05:06:14 2016 (r295299) @@ -456,6 +456,8 @@ netvsc_attach(device_t dev) CTLFLAG_RW, &sc->hn_csum_ip, "RXCSUM IP"); SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "csum_tcp", CTLFLAG_RW, &sc->hn_csum_tcp, "RXCSUM TCP"); + SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "csum_udp", + CTLFLAG_RW, &sc->hn_csum_udp, "RXCSUM UDP"); SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "csum_trusted", CTLFLAG_RW, &sc->hn_csum_trusted, "# of TCP segements that we trust host's csum verification"); @@ -1156,7 +1158,7 @@ netvsc_recv(struct hv_device *device_ctx m_new->m_pkthdr.rcvif = ifp; /* receive side checksum offload */ - if (NULL != csum_info) { + if (csum_info != NULL) { /* IP csum offload */ if (csum_info->receive.ip_csum_succeeded) { m_new->m_pkthdr.csum_flags |= @@ -1164,12 +1166,16 @@ netvsc_recv(struct hv_device *device_ctx sc->hn_csum_ip++; } - /* TCP csum offload */ - if (csum_info->receive.tcp_csum_succeeded) { + /* TCP/UDP csum offload */ + if (csum_info->receive.tcp_csum_succeeded || + csum_info->receive.udp_csum_succeeded) { m_new->m_pkthdr.csum_flags |= (CSUM_DATA_VALID | CSUM_PSEUDO_HDR); m_new->m_pkthdr.csum_data = 0xffff; - sc->hn_csum_tcp++; + if (csum_info->receive.tcp_csum_succeeded) + sc->hn_csum_tcp++; + else + sc->hn_csum_udp++; } if (csum_info->receive.ip_csum_succeeded && From owner-svn-src-all@freebsd.org Fri Feb 5 05:12:32 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 304FFA9B322; Fri, 5 Feb 2016 05:12:32 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 095AF1EDC; Fri, 5 Feb 2016 05:12:31 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u155CV8V068751; Fri, 5 Feb 2016 05:12:31 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u155CUAM068749; Fri, 5 Feb 2016 05:12:30 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201602050512.u155CUAM068749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 5 Feb 2016 05:12:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295300 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 05:12:32 -0000 Author: sephe Date: Fri Feb 5 05:12:30 2016 New Revision: 295300 URL: https://svnweb.freebsd.org/changeset/base/295300 Log: hyperv/hn: Add sysctls to trust host side UDP and IP csum verification Reviewed by: adrian, Hongjiang Zhang Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5103 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Fri Feb 5 05:06:14 2016 (r295299) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Fri Feb 5 05:12:30 2016 (r295300) @@ -1031,8 +1031,8 @@ typedef struct hn_softc { struct lro_ctrl hn_lro; int hn_lro_hiwat; - /* Trust tcp segments verification on host side */ - int hn_trust_hosttcp; + /* Trust csum verification on host side */ + int hn_trust_hcsum; /* HN_TRUST_HCSUM_ */ u_long hn_csum_ip; u_long hn_csum_tcp; @@ -1047,6 +1047,9 @@ typedef struct hn_softc { u_long hn_tx_chimney; } hn_softc_t; +#define HN_TRUST_HCSUM_IP 0x0001 +#define HN_TRUST_HCSUM_TCP 0x0002 +#define HN_TRUST_HCSUM_UDP 0x0004 /* * Externs Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 5 05:06:14 2016 (r295299) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 5 05:12:30 2016 (r295300) @@ -210,6 +210,14 @@ int hv_promisc_mode = 0; /* normal mo static int hn_trust_hosttcp = 1; TUNABLE_INT("dev.hn.trust_hosttcp", &hn_trust_hosttcp); +/* Trust udp datagrams verification on host side. */ +static int hn_trust_hostudp = 1; +TUNABLE_INT("dev.hn.trust_hostudp", &hn_trust_hostudp); + +/* Trust ip packets verification on host side. */ +static int hn_trust_hostip = 1; +TUNABLE_INT("dev.hn.trust_hostip", &hn_trust_hostip); + #if __FreeBSD_version >= 1100045 /* Limit TSO burst size */ static int hn_tso_maxlen = 0; @@ -239,6 +247,7 @@ static void hn_ifmedia_sts(struct ifnet #ifdef HN_LRO_HIWAT static int hn_lro_hiwat_sysctl(SYSCTL_HANDLER_ARGS); #endif +static int hn_trust_hcsum_sysctl(SYSCTL_HANDLER_ARGS); static int hn_tx_chimney_size_sysctl(SYSCTL_HANDLER_ARGS); static int hn_check_iplen(const struct mbuf *, int); static int hn_create_tx_ring(struct hn_softc *sc); @@ -335,8 +344,13 @@ netvsc_attach(device_t dev) sc->hn_unit = unit; sc->hn_dev = dev; sc->hn_lro_hiwat = HN_LRO_HIWAT_DEF; - sc->hn_trust_hosttcp = hn_trust_hosttcp; sc->hn_direct_tx_size = hn_direct_tx_size; + if (hn_trust_hosttcp) + sc->hn_trust_hcsum |= HN_TRUST_HCSUM_TCP; + if (hn_trust_hostudp) + sc->hn_trust_hcsum |= HN_TRUST_HCSUM_UDP; + if (hn_trust_hostip) + sc->hn_trust_hcsum |= HN_TRUST_HCSUM_IP; sc->hn_tx_taskq = taskqueue_create_fast("hn_tx", M_WAITOK, taskqueue_thread_enqueue, &sc->hn_tx_taskq); @@ -448,10 +462,21 @@ netvsc_attach(device_t dev) CTLTYPE_INT | CTLFLAG_RW, sc, 0, hn_lro_hiwat_sysctl, "I", "LRO high watermark"); #endif - SYSCTL_ADD_INT(ctx, child, OID_AUTO, "trust_hosttcp", - CTLFLAG_RW, &sc->hn_trust_hosttcp, 0, + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "trust_hosttcp", + CTLTYPE_INT | CTLFLAG_RW, sc, HN_TRUST_HCSUM_TCP, + hn_trust_hcsum_sysctl, "I", "Trust tcp segement verification on host side, " "when csum info is missing"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "trust_hostudp", + CTLTYPE_INT | CTLFLAG_RW, sc, HN_TRUST_HCSUM_UDP, + hn_trust_hcsum_sysctl, "I", + "Trust udp datagram verification on host side, " + "when csum info is missing"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "trust_hostip", + CTLTYPE_INT | CTLFLAG_RW, sc, HN_TRUST_HCSUM_IP, + hn_trust_hcsum_sysctl, "I", + "Trust ip packet verification on host side, " + "when csum info is missing"); SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "csum_ip", CTLFLAG_RW, &sc->hn_csum_ip, "RXCSUM IP"); SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "csum_tcp", @@ -460,7 +485,7 @@ netvsc_attach(device_t dev) CTLFLAG_RW, &sc->hn_csum_udp, "RXCSUM UDP"); SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "csum_trusted", CTLFLAG_RW, &sc->hn_csum_trusted, - "# of TCP segements that we trust host's csum verification"); + "# of packets that we trust host's csum verification"); SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "small_pkts", CTLFLAG_RW, &sc->hn_small_pkts, "# of small packets received"); SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "no_txdescs", @@ -503,6 +528,14 @@ netvsc_attach(device_t dev) CTLFLAG_RD, &hn_trust_hosttcp, 0, "Trust tcp segement verification on host side, " "when csum info is missing (global setting)"); + SYSCTL_ADD_INT(dc_ctx, dc_child, OID_AUTO, "trust_hostudp", + CTLFLAG_RD, &hn_trust_hostudp, 0, + "Trust udp datagram verification on host side, " + "when csum info is missing (global setting)"); + SYSCTL_ADD_INT(dc_ctx, dc_child, OID_AUTO, "trust_hostip", + CTLFLAG_RD, &hn_trust_hostip, 0, + "Trust ip packet verification on host side, " + "when csum info is missing (global setting)"); SYSCTL_ADD_INT(dc_ctx, dc_child, OID_AUTO, "tx_chimney_size", CTLFLAG_RD, &hn_tx_chimney_size, 0, "Chimney send packet size limit"); @@ -1206,7 +1239,7 @@ netvsc_recv(struct hv_device *device_ctx pr = hn_check_iplen(m_new, hoff); if (pr == IPPROTO_TCP) { - if (sc->hn_trust_hosttcp) { + if (sc->hn_trust_hcsum & HN_TRUST_HCSUM_TCP) { sc->hn_csum_trusted++; m_new->m_pkthdr.csum_flags |= (CSUM_IP_CHECKED | CSUM_IP_VALID | @@ -1215,6 +1248,19 @@ netvsc_recv(struct hv_device *device_ctx } /* Rely on SW csum verification though... */ do_lro = 1; + } else if (pr == IPPROTO_UDP) { + if (sc->hn_trust_hcsum & HN_TRUST_HCSUM_UDP) { + sc->hn_csum_trusted++; + m_new->m_pkthdr.csum_flags |= + (CSUM_IP_CHECKED | CSUM_IP_VALID | + CSUM_DATA_VALID | CSUM_PSEUDO_HDR); + m_new->m_pkthdr.csum_data = 0xffff; + } + } else if (pr != IPPROTO_DONE && + (sc->hn_trust_hcsum & HN_TRUST_HCSUM_IP)) { + sc->hn_csum_trusted++; + m_new->m_pkthdr.csum_flags |= + (CSUM_IP_CHECKED | CSUM_IP_VALID); } } } @@ -1650,6 +1696,30 @@ hn_lro_hiwat_sysctl(SYSCTL_HANDLER_ARGS) #endif /* HN_LRO_HIWAT */ static int +hn_trust_hcsum_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct hn_softc *sc = arg1; + int hcsum = arg2; + int on, error; + + on = 0; + if (sc->hn_trust_hcsum & hcsum) + on = 1; + + error = sysctl_handle_int(oidp, &on, 0, req); + if (error || req->newptr == NULL) + return error; + + NV_LOCK(sc); + if (on) + sc->hn_trust_hcsum |= hcsum; + else + sc->hn_trust_hcsum &= ~hcsum; + NV_UNLOCK(sc); + return 0; +} + +static int hn_tx_chimney_size_sysctl(SYSCTL_HANDLER_ARGS) { struct hn_softc *sc = arg1; From owner-svn-src-all@freebsd.org Fri Feb 5 05:17:50 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17338A9B4DE; Fri, 5 Feb 2016 05:17:50 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC7AA237; Fri, 5 Feb 2016 05:17:49 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u155HmCl068953; Fri, 5 Feb 2016 05:17:48 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u155HmYS068952; Fri, 5 Feb 2016 05:17:48 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201602050517.u155HmYS068952@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 5 Feb 2016 05:17:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295301 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 05:17:50 -0000 Author: sephe Date: Fri Feb 5 05:17:48 2016 New Revision: 295301 URL: https://svnweb.freebsd.org/changeset/base/295301 Log: hyperv/hn: Obey IFCAP_RXCSUM configure Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5104 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 5 05:12:30 2016 (r295300) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 5 05:17:48 2016 (r295301) @@ -1142,7 +1142,7 @@ netvsc_recv(struct hv_device *device_ctx struct mbuf *m_new; struct ifnet *ifp; device_t dev = device_ctx->device; - int size, do_lro = 0; + int size, do_lro = 0, do_csum = 1; if (sc == NULL) { return (0); /* TODO: KYS how can this be! */ @@ -1190,18 +1190,21 @@ netvsc_recv(struct hv_device *device_ctx } m_new->m_pkthdr.rcvif = ifp; + if (__predict_false((ifp->if_capenable & IFCAP_RXCSUM) == 0)) + do_csum = 0; + /* receive side checksum offload */ if (csum_info != NULL) { /* IP csum offload */ - if (csum_info->receive.ip_csum_succeeded) { + if (csum_info->receive.ip_csum_succeeded && do_csum) { m_new->m_pkthdr.csum_flags |= (CSUM_IP_CHECKED | CSUM_IP_VALID); sc->hn_csum_ip++; } /* TCP/UDP csum offload */ - if (csum_info->receive.tcp_csum_succeeded || - csum_info->receive.udp_csum_succeeded) { + if ((csum_info->receive.tcp_csum_succeeded || + csum_info->receive.udp_csum_succeeded) && do_csum) { m_new->m_pkthdr.csum_flags |= (CSUM_DATA_VALID | CSUM_PSEUDO_HDR); m_new->m_pkthdr.csum_data = 0xffff; @@ -1239,7 +1242,8 @@ netvsc_recv(struct hv_device *device_ctx pr = hn_check_iplen(m_new, hoff); if (pr == IPPROTO_TCP) { - if (sc->hn_trust_hcsum & HN_TRUST_HCSUM_TCP) { + if (do_csum && + (sc->hn_trust_hcsum & HN_TRUST_HCSUM_TCP)) { sc->hn_csum_trusted++; m_new->m_pkthdr.csum_flags |= (CSUM_IP_CHECKED | CSUM_IP_VALID | @@ -1249,14 +1253,15 @@ netvsc_recv(struct hv_device *device_ctx /* Rely on SW csum verification though... */ do_lro = 1; } else if (pr == IPPROTO_UDP) { - if (sc->hn_trust_hcsum & HN_TRUST_HCSUM_UDP) { + if (do_csum && + (sc->hn_trust_hcsum & HN_TRUST_HCSUM_UDP)) { sc->hn_csum_trusted++; m_new->m_pkthdr.csum_flags |= (CSUM_IP_CHECKED | CSUM_IP_VALID | CSUM_DATA_VALID | CSUM_PSEUDO_HDR); m_new->m_pkthdr.csum_data = 0xffff; } - } else if (pr != IPPROTO_DONE && + } else if (pr != IPPROTO_DONE && do_csum && (sc->hn_trust_hcsum & HN_TRUST_HCSUM_IP)) { sc->hn_csum_trusted++; m_new->m_pkthdr.csum_flags |= From owner-svn-src-all@freebsd.org Fri Feb 5 05:25:12 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFC39A9B8B9; Fri, 5 Feb 2016 05:25:12 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BD589B8; Fri, 5 Feb 2016 05:25:12 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u155PB4q071821; Fri, 5 Feb 2016 05:25:11 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u155PBCX071820; Fri, 5 Feb 2016 05:25:11 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201602050525.u155PBCX071820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 5 Feb 2016 05:25:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295302 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 05:25:12 -0000 Author: sephe Date: Fri Feb 5 05:25:11 2016 New Revision: 295302 URL: https://svnweb.freebsd.org/changeset/base/295302 Log: hyperv/hn: Factor out hn_encap() from hn_start_locked() It will be shared w/ upcoming ifnet.if_transmit implementaion. No functional changes. Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5158 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 5 05:17:48 2016 (r295301) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 5 05:25:11 2016 (r295302) @@ -254,6 +254,7 @@ static int hn_create_tx_ring(struct hn_s static void hn_destroy_tx_ring(struct hn_softc *sc); static void hn_start_taskfunc(void *xsc, int pending); static void hn_txeof_taskfunc(void *xsc, int pending); +static int hn_encap(struct hn_softc *, struct hn_txdesc *, struct mbuf **); static __inline void hn_set_lro_hiwat(struct hn_softc *sc, int hiwat) @@ -744,31 +745,235 @@ netvsc_channel_rollup(struct hv_device * } /* - * Start a transmit of one or more packets + * NOTE: + * This this function fails, then both txd and m_head0 will be freed */ static int -hn_start_locked(struct ifnet *ifp, int len) +hn_encap(struct hn_softc *sc, struct hn_txdesc *txd, struct mbuf **m_head0) { - hn_softc_t *sc = ifp->if_softc; - struct hv_device *device_ctx = vmbus_get_devctx(sc->hn_dev); - netvsc_dev *net_dev = sc->net_dev; + bus_dma_segment_t segs[HN_TX_DATA_SEGCNT_MAX]; + int error, nsegs, i; + struct mbuf *m_head = *m_head0; + netvsc_packet *packet; rndis_msg *rndis_mesg; rndis_packet *rndis_pkt; rndis_per_packet_info *rppi; - ndis_8021q_info *rppi_vlan_info; - rndis_tcp_ip_csum_info *csum_info; - rndis_tcp_tso_info *tso_info; - uint32_t rndis_msg_size = 0; + uint32_t rndis_msg_size; + + packet = &txd->netvsc_pkt; + packet->is_data_pkt = TRUE; + packet->tot_data_buf_len = m_head->m_pkthdr.len; + + /* + * extension points to the area reserved for the + * rndis_filter_packet, which is placed just after + * the netvsc_packet (and rppi struct, if present; + * length is updated later). + */ + rndis_mesg = txd->rndis_msg; + /* XXX not necessary */ + memset(rndis_mesg, 0, HN_RNDIS_MSG_LEN); + rndis_mesg->ndis_msg_type = REMOTE_NDIS_PACKET_MSG; + + rndis_pkt = &rndis_mesg->msg.packet; + rndis_pkt->data_offset = sizeof(rndis_packet); + rndis_pkt->data_length = packet->tot_data_buf_len; + rndis_pkt->per_pkt_info_offset = sizeof(rndis_packet); + + rndis_msg_size = RNDIS_MESSAGE_SIZE(rndis_packet); + + if (m_head->m_flags & M_VLANTAG) { + ndis_8021q_info *rppi_vlan_info; + + rndis_msg_size += RNDIS_VLAN_PPI_SIZE; + rppi = hv_set_rppi_data(rndis_mesg, RNDIS_VLAN_PPI_SIZE, + ieee_8021q_info); + + rppi_vlan_info = (ndis_8021q_info *)((uint8_t *)rppi + + rppi->per_packet_info_offset); + rppi_vlan_info->u1.s1.vlan_id = + m_head->m_pkthdr.ether_vtag & 0xfff; + } + + if (m_head->m_pkthdr.csum_flags & CSUM_TSO) { + rndis_tcp_tso_info *tso_info; + struct ether_vlan_header *eh; + int ether_len; + + /* + * XXX need m_pullup and use mtodo + */ + eh = mtod(m_head, struct ether_vlan_header*); + if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) + ether_len = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN; + else + ether_len = ETHER_HDR_LEN; + + rndis_msg_size += RNDIS_TSO_PPI_SIZE; + rppi = hv_set_rppi_data(rndis_mesg, RNDIS_TSO_PPI_SIZE, + tcp_large_send_info); + + tso_info = (rndis_tcp_tso_info *)((uint8_t *)rppi + + rppi->per_packet_info_offset); + tso_info->lso_v2_xmit.type = + RNDIS_TCP_LARGE_SEND_OFFLOAD_V2_TYPE; + +#ifdef INET + if (m_head->m_pkthdr.csum_flags & CSUM_IP_TSO) { + struct ip *ip = + (struct ip *)(m_head->m_data + ether_len); + unsigned long iph_len = ip->ip_hl << 2; + struct tcphdr *th = + (struct tcphdr *)((caddr_t)ip + iph_len); + + tso_info->lso_v2_xmit.ip_version = + RNDIS_TCP_LARGE_SEND_OFFLOAD_IPV4; + ip->ip_len = 0; + ip->ip_sum = 0; + + th->th_sum = in_pseudo(ip->ip_src.s_addr, + ip->ip_dst.s_addr, htons(IPPROTO_TCP)); + } +#endif +#if defined(INET6) && defined(INET) + else +#endif +#ifdef INET6 + { + struct ip6_hdr *ip6 = (struct ip6_hdr *) + (m_head->m_data + ether_len); + struct tcphdr *th = (struct tcphdr *)(ip6 + 1); + + tso_info->lso_v2_xmit.ip_version = + RNDIS_TCP_LARGE_SEND_OFFLOAD_IPV6; + ip6->ip6_plen = 0; + th->th_sum = in6_cksum_pseudo(ip6, 0, IPPROTO_TCP, 0); + } +#endif + tso_info->lso_v2_xmit.tcp_header_offset = 0; + tso_info->lso_v2_xmit.mss = m_head->m_pkthdr.tso_segsz; + } else if (m_head->m_pkthdr.csum_flags & sc->hn_csum_assist) { + rndis_tcp_ip_csum_info *csum_info; + + rndis_msg_size += RNDIS_CSUM_PPI_SIZE; + rppi = hv_set_rppi_data(rndis_mesg, RNDIS_CSUM_PPI_SIZE, + tcpip_chksum_info); + csum_info = (rndis_tcp_ip_csum_info *)((uint8_t *)rppi + + rppi->per_packet_info_offset); + + csum_info->xmit.is_ipv4 = 1; + if (m_head->m_pkthdr.csum_flags & CSUM_IP) + csum_info->xmit.ip_header_csum = 1; + + if (m_head->m_pkthdr.csum_flags & CSUM_TCP) { + csum_info->xmit.tcp_csum = 1; + csum_info->xmit.tcp_header_offset = 0; + } else if (m_head->m_pkthdr.csum_flags & CSUM_UDP) { + csum_info->xmit.udp_csum = 1; + } + } + + rndis_mesg->msg_len = packet->tot_data_buf_len + rndis_msg_size; + packet->tot_data_buf_len = rndis_mesg->msg_len; + + /* + * Chimney send, if the packet could fit into one chimney buffer. + */ + if (packet->tot_data_buf_len < sc->hn_tx_chimney_size) { + netvsc_dev *net_dev = sc->net_dev; + uint32_t send_buf_section_idx; + + send_buf_section_idx = + hv_nv_get_next_send_section(net_dev); + if (send_buf_section_idx != + NVSP_1_CHIMNEY_SEND_INVALID_SECTION_INDEX) { + uint8_t *dest = ((uint8_t *)net_dev->send_buf + + (send_buf_section_idx * + net_dev->send_section_size)); + + memcpy(dest, rndis_mesg, rndis_msg_size); + dest += rndis_msg_size; + m_copydata(m_head, 0, m_head->m_pkthdr.len, dest); + + packet->send_buf_section_idx = send_buf_section_idx; + packet->send_buf_section_size = + packet->tot_data_buf_len; + packet->page_buf_count = 0; + sc->hn_tx_chimney++; + goto done; + } + } + + error = hn_txdesc_dmamap_load(sc, txd, &m_head, segs, &nsegs); + if (error) { + int freed; + + /* + * This mbuf is not linked w/ the txd yet, so free it now. + */ + m_freem(m_head); + *m_head0 = NULL; + + freed = hn_txdesc_put(sc, txd); + KASSERT(freed != 0, + ("fail to free txd upon txdma error")); + + sc->hn_txdma_failed++; + if_inc_counter(sc->hn_ifp, IFCOUNTER_OERRORS, 1); + return error; + } + *m_head0 = m_head; + + packet->page_buf_count = nsegs + HV_RF_NUM_TX_RESERVED_PAGE_BUFS; + + /* send packet with page buffer */ + packet->page_buffers[0].pfn = atop(txd->rndis_msg_paddr); + packet->page_buffers[0].offset = txd->rndis_msg_paddr & PAGE_MASK; + packet->page_buffers[0].length = rndis_msg_size; + + /* + * Fill the page buffers with mbuf info starting at index + * HV_RF_NUM_TX_RESERVED_PAGE_BUFS. + */ + for (i = 0; i < nsegs; ++i) { + hv_vmbus_page_buffer *pb = &packet->page_buffers[ + i + HV_RF_NUM_TX_RESERVED_PAGE_BUFS]; + + pb->pfn = atop(segs[i].ds_addr); + pb->offset = segs[i].ds_addr & PAGE_MASK; + pb->length = segs[i].ds_len; + } + + packet->send_buf_section_idx = + NVSP_1_CHIMNEY_SEND_INVALID_SECTION_INDEX; + packet->send_buf_section_size = 0; +done: + txd->m = m_head; + + /* Set the completion routine */ + packet->compl.send.on_send_completion = netvsc_xmit_completion; + packet->compl.send.send_completion_context = packet; + packet->compl.send.send_completion_tid = (uint64_t)(uintptr_t)txd; + + return 0; +} + +/* + * Start a transmit of one or more packets + */ +static int +hn_start_locked(struct ifnet *ifp, int len) +{ + struct hn_softc *sc = ifp->if_softc; + struct hv_device *device_ctx = vmbus_get_devctx(sc->hn_dev); if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != IFF_DRV_RUNNING) return 0; while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { - bus_dma_segment_t segs[HN_TX_DATA_SEGCNT_MAX]; - int error, nsegs, i, send_failed = 0; + int error, send_failed = 0; struct hn_txdesc *txd; - netvsc_packet *packet; struct mbuf *m_head; IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); @@ -793,216 +998,17 @@ hn_start_locked(struct ifnet *ifp, int l break; } - packet = &txd->netvsc_pkt; - packet->is_data_pkt = TRUE; - /* Initialize it from the mbuf */ - packet->tot_data_buf_len = m_head->m_pkthdr.len; - - /* - * extension points to the area reserved for the - * rndis_filter_packet, which is placed just after - * the netvsc_packet (and rppi struct, if present; - * length is updated later). - */ - rndis_mesg = txd->rndis_msg; - /* XXX not necessary */ - memset(rndis_mesg, 0, HN_RNDIS_MSG_LEN); - rndis_mesg->ndis_msg_type = REMOTE_NDIS_PACKET_MSG; - - rndis_pkt = &rndis_mesg->msg.packet; - rndis_pkt->data_offset = sizeof(rndis_packet); - rndis_pkt->data_length = packet->tot_data_buf_len; - rndis_pkt->per_pkt_info_offset = sizeof(rndis_packet); - - rndis_msg_size = RNDIS_MESSAGE_SIZE(rndis_packet); - - /* - * If the Hyper-V infrastructure needs to embed a VLAN tag, - * initialize netvsc_packet and rppi struct values as needed. - */ - if (m_head->m_flags & M_VLANTAG) { - /* - * set up some additional fields so the Hyper-V infrastructure will stuff the VLAN tag - * into the frame. - */ - rndis_msg_size += RNDIS_VLAN_PPI_SIZE; - - rppi = hv_set_rppi_data(rndis_mesg, RNDIS_VLAN_PPI_SIZE, - ieee_8021q_info); - - /* VLAN info immediately follows rppi struct */ - rppi_vlan_info = (ndis_8021q_info *)((char*)rppi + - rppi->per_packet_info_offset); - /* FreeBSD does not support CFI or priority */ - rppi_vlan_info->u1.s1.vlan_id = - m_head->m_pkthdr.ether_vtag & 0xfff; - } - - if (m_head->m_pkthdr.csum_flags & CSUM_TSO) { - struct ether_vlan_header *eh; - int ether_len; - - eh = mtod(m_head, struct ether_vlan_header*); - if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) { - ether_len = ETHER_HDR_LEN + - ETHER_VLAN_ENCAP_LEN; - } else { - ether_len = ETHER_HDR_LEN; - } - - rndis_msg_size += RNDIS_TSO_PPI_SIZE; - rppi = hv_set_rppi_data(rndis_mesg, RNDIS_TSO_PPI_SIZE, - tcp_large_send_info); - - tso_info = (rndis_tcp_tso_info *)((char *)rppi + - rppi->per_packet_info_offset); - tso_info->lso_v2_xmit.type = - RNDIS_TCP_LARGE_SEND_OFFLOAD_V2_TYPE; - -#ifdef INET - if (m_head->m_pkthdr.csum_flags & CSUM_IP_TSO) { - struct ip *ip = - (struct ip *)(m_head->m_data + ether_len); - unsigned long iph_len = ip->ip_hl << 2; - struct tcphdr *th = - (struct tcphdr *)((caddr_t)ip + iph_len); - - tso_info->lso_v2_xmit.ip_version = - RNDIS_TCP_LARGE_SEND_OFFLOAD_IPV4; - ip->ip_len = 0; - ip->ip_sum = 0; - - th->th_sum = in_pseudo(ip->ip_src.s_addr, - ip->ip_dst.s_addr, htons(IPPROTO_TCP)); - } -#endif -#if defined(INET6) && defined(INET) - else -#endif -#ifdef INET6 - { - struct ip6_hdr *ip6 = (struct ip6_hdr *) - (m_head->m_data + ether_len); - struct tcphdr *th = (struct tcphdr *)(ip6 + 1); - - tso_info->lso_v2_xmit.ip_version = - RNDIS_TCP_LARGE_SEND_OFFLOAD_IPV6; - ip6->ip6_plen = 0; - th->th_sum = - in6_cksum_pseudo(ip6, 0, IPPROTO_TCP, 0); - } -#endif - tso_info->lso_v2_xmit.tcp_header_offset = 0; - tso_info->lso_v2_xmit.mss = m_head->m_pkthdr.tso_segsz; - } else if (m_head->m_pkthdr.csum_flags & sc->hn_csum_assist) { - rndis_msg_size += RNDIS_CSUM_PPI_SIZE; - rppi = hv_set_rppi_data(rndis_mesg, RNDIS_CSUM_PPI_SIZE, - tcpip_chksum_info); - csum_info = (rndis_tcp_ip_csum_info *)((char*)rppi + - rppi->per_packet_info_offset); - - csum_info->xmit.is_ipv4 = 1; - if (m_head->m_pkthdr.csum_flags & CSUM_IP) - csum_info->xmit.ip_header_csum = 1; - - if (m_head->m_pkthdr.csum_flags & CSUM_TCP) { - csum_info->xmit.tcp_csum = 1; - csum_info->xmit.tcp_header_offset = 0; - } else if (m_head->m_pkthdr.csum_flags & CSUM_UDP) { - csum_info->xmit.udp_csum = 1; - } - } - - rndis_mesg->msg_len = packet->tot_data_buf_len + rndis_msg_size; - packet->tot_data_buf_len = rndis_mesg->msg_len; - - /* send packet with send buffer */ - if (packet->tot_data_buf_len < sc->hn_tx_chimney_size) { - uint32_t send_buf_section_idx; - - send_buf_section_idx = - hv_nv_get_next_send_section(net_dev); - if (send_buf_section_idx != - NVSP_1_CHIMNEY_SEND_INVALID_SECTION_INDEX) { - uint8_t *dest = ((uint8_t *)net_dev->send_buf + - (send_buf_section_idx * - net_dev->send_section_size)); - - memcpy(dest, rndis_mesg, rndis_msg_size); - dest += rndis_msg_size; - - m_copydata(m_head, 0, m_head->m_pkthdr.len, - dest); - - packet->send_buf_section_idx = - send_buf_section_idx; - packet->send_buf_section_size = - packet->tot_data_buf_len; - packet->page_buf_count = 0; - sc->hn_tx_chimney++; - goto do_send; - } - } - - error = hn_txdesc_dmamap_load(sc, txd, &m_head, segs, &nsegs); + error = hn_encap(sc, txd, &m_head); if (error) { - int freed; - - /* - * This mbuf is not linked w/ the txd yet, so free - * it now. - */ - m_freem(m_head); - freed = hn_txdesc_put(sc, txd); - KASSERT(freed != 0, - ("fail to free txd upon txdma error")); - - sc->hn_txdma_failed++; - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + /* Both txd and m_head are freed */ continue; } - - packet->page_buf_count = nsegs + - HV_RF_NUM_TX_RESERVED_PAGE_BUFS; - - /* send packet with page buffer */ - packet->page_buffers[0].pfn = atop(txd->rndis_msg_paddr); - packet->page_buffers[0].offset = - txd->rndis_msg_paddr & PAGE_MASK; - packet->page_buffers[0].length = rndis_msg_size; - - /* - * Fill the page buffers with mbuf info starting at index - * HV_RF_NUM_TX_RESERVED_PAGE_BUFS. - */ - for (i = 0; i < nsegs; ++i) { - hv_vmbus_page_buffer *pb = &packet->page_buffers[ - i + HV_RF_NUM_TX_RESERVED_PAGE_BUFS]; - - pb->pfn = atop(segs[i].ds_addr); - pb->offset = segs[i].ds_addr & PAGE_MASK; - pb->length = segs[i].ds_len; - } - - packet->send_buf_section_idx = - NVSP_1_CHIMNEY_SEND_INVALID_SECTION_INDEX; - packet->send_buf_section_size = 0; - -do_send: - txd->m = m_head; - - /* Set the completion routine */ - packet->compl.send.on_send_completion = netvsc_xmit_completion; - packet->compl.send.send_completion_context = packet; - packet->compl.send.send_completion_tid = - (uint64_t)(uintptr_t)txd; - again: /* * Make sure that txd is not freed before ETHER_BPF_MTAP. */ hn_txdesc_hold(txd); - error = hv_nv_on_send(device_ctx, packet); + error = hv_nv_on_send(device_ctx, &txd->netvsc_pkt); if (!error) { ETHER_BPF_MTAP(ifp, m_head); if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); From owner-svn-src-all@freebsd.org Fri Feb 5 05:31:32 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E085CA9BB80; Fri, 5 Feb 2016 05:31:32 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97114CF7; Fri, 5 Feb 2016 05:31:32 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u155VVj6072683; Fri, 5 Feb 2016 05:31:31 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u155VVH0072682; Fri, 5 Feb 2016 05:31:31 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201602050531.u155VVH0072682@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 5 Feb 2016 05:31:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295303 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 05:31:33 -0000 Author: sephe Date: Fri Feb 5 05:31:31 2016 New Revision: 295303 URL: https://svnweb.freebsd.org/changeset/base/295303 Log: hyperv/hn: Recover half of the chimney sending space We lost half of the chimney sending space, because we mis-used ffs() on a 64 bits mask, where ffsl() should be used. While I'm here: - Use system atomic operation instead. - Stringent chimney sending index assertion. Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5159 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.c Fri Feb 5 05:25:11 2016 (r295302) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c Fri Feb 5 05:31:31 2016 (r295303) @@ -136,15 +136,15 @@ hv_nv_get_next_send_section(netvsc_dev * int i; for (i = 0; i < bitsmap_words; i++) { - idx = ffs(~bitsmap[i]); + idx = ffsl(~bitsmap[i]); if (0 == idx) continue; idx--; - if (i * BITS_PER_LONG + idx >= net_dev->send_section_count) - return (ret); + KASSERT(i * BITS_PER_LONG + idx < net_dev->send_section_count, + ("invalid i %d and idx %lu", i, idx)); - if (synch_test_and_set_bit(idx, &bitsmap[i])) + if (atomic_testandset_long(&bitsmap[i], idx)) continue; ret = i * BITS_PER_LONG + idx; @@ -789,8 +789,27 @@ hv_nv_on_send_completion(netvsc_dev *net if (NULL != net_vsc_pkt) { if (net_vsc_pkt->send_buf_section_idx != NVSP_1_CHIMNEY_SEND_INVALID_SECTION_INDEX) { - synch_change_bit(net_vsc_pkt->send_buf_section_idx, - net_dev->send_section_bitsmap); + u_long mask; + int idx; + + idx = net_vsc_pkt->send_buf_section_idx / + BITS_PER_LONG; + KASSERT(idx < net_dev->bitsmap_words, + ("invalid section index %u", + net_vsc_pkt->send_buf_section_idx)); + mask = 1UL << + (net_vsc_pkt->send_buf_section_idx % + BITS_PER_LONG); + + KASSERT(net_dev->send_section_bitsmap[idx] & + mask, + ("index bitmap 0x%lx, section index %u, " + "bitmap idx %d, bitmask 0x%lx", + net_dev->send_section_bitsmap[idx], + net_vsc_pkt->send_buf_section_idx, + idx, mask)); + atomic_clear_long( + &net_dev->send_section_bitsmap[idx], mask); } /* Notify the layer above us */ From owner-svn-src-all@freebsd.org Fri Feb 5 05:34:14 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74553A9BD57; Fri, 5 Feb 2016 05:34:14 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: from mail-lf0-f44.google.com (mail-lf0-f44.google.com [209.85.215.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 061FD1096; Fri, 5 Feb 2016 05:34:13 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: by mail-lf0-f44.google.com with SMTP id 78so50308582lfy.3; Thu, 04 Feb 2016 21:34:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:to:subject:references:date:cc :mime-version:content-transfer-encoding:from:message-id:in-reply-to :user-agent; bh=vhT5XwAjf8e7YuSgzX058fpH7SLQRH+7yXN8FOHToPQ=; b=Nav5oF3Q5mnMWU+20l+1BcmHSxOhoYdHOIWvF0MQaPhgk+EgpkMRj/nzWbR+skzBR+ favlamKGLtqSvDHO/aQrS+AP5t3kvb4wCWyTZJopPK5nMF5Mzwh/kGSQfGAvOD8MDA+i QAFTA17zNnEn+Skck0u1rvsLHfZx3aTFRov5VgehfLn9cHgEycakJwUQzlLzA1F2U6XB YmbqaLOoCUmEDbqfnpKAyD4KgcWgDtS8e7jV0zEWtFV2dsNtM9iXbg9oYlYk2ovHN/dk t+4GNsdDDucYs3RcQ4yfgi4awyxO9biWwCpAbJ4ERRGaalDTcCnXrQZnAVJdBMjjCOHS 0SfA== X-Gm-Message-State: AG10YOSO1Sln0+dHTnhmCEwDYsl74UMdt62ntzohzzWG1QN1UEixmciSy/dR8KBw6Iii4A== X-Received: by 10.25.91.81 with SMTP id p78mr5252500lfb.19.1454650445947; Thu, 04 Feb 2016 21:34:05 -0800 (PST) Received: from localhost (host-176-37-109-22.la.net.ua. [176.37.109.22]) by smtp.gmail.com with ESMTPSA id 36sm2063426lfx.19.2016.02.04.21.34.04 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 04 Feb 2016 21:34:05 -0800 (PST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Sepherosa Ziehau" Subject: Re: svn commit: r295302 - head/sys/dev/hyperv/netvsc References: <201602050525.u155PBCX071820@repo.freebsd.org> Date: Fri, 05 Feb 2016 07:34:05 +0200 Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable From: "Andriy Voskoboinyk" Message-ID: In-Reply-To: <201602050525.u155PBCX071820@repo.freebsd.org> User-Agent: Opera Mail/12.16 (FreeBSD) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 05:34:14 -0000 Fri, 05 Feb 2016 07:25:11 +0200 =D0=B1=D1=83=D0=BB=D0=BE =D0=BD=D0=B0=D0= =BF=D0=B8=D1=81=D0=B0=D0=BD=D0=BE Sepherosa Ziehau = : > Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.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 > ... > @@ -744,31 +745,235 @@ netvsc_channel_rollup(struct hv_device * > } > /* > - * Start a transmit of one or more packets > + * NOTE: > + * This this function fails, then both txd and m_head0 will be freed Probably "If this function fails.." ? > */ > static int > -hn_start_locked(struct ifnet *ifp, int len) > +hn_encap(struct hn_softc *sc, struct hn_txdesc *txd, struct mbuf = > **m_head0) > { From owner-svn-src-all@freebsd.org Fri Feb 5 05:38:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E26DA9BEBB; Fri, 5 Feb 2016 05:38:03 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05A0A124F; Fri, 5 Feb 2016 05:38:02 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u155c2hq074888; Fri, 5 Feb 2016 05:38:02 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u155c237074887; Fri, 5 Feb 2016 05:38:02 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201602050538.u155c237074887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 5 Feb 2016 05:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295304 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 05:38:03 -0000 Author: sephe Date: Fri Feb 5 05:38:01 2016 New Revision: 295304 URL: https://svnweb.freebsd.org/changeset/base/295304 Log: hyperv/hn: Increase LRO entry count to 128 by default hn(4) only has one RX ring currently, so default 8 LRO entries are too small. Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5166 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 5 05:31:31 2016 (r295303) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 5 05:38:01 2016 (r295304) @@ -132,6 +132,8 @@ __FBSDID("$FreeBSD$"); /* YYY should get it from the underlying channel */ #define HN_TX_DESC_CNT 512 +#define HN_LROENT_CNT_DEF 128 + #define HN_RNDIS_MSG_LEN \ (sizeof(rndis_msg) + \ RNDIS_VLAN_PPI_SIZE + \ @@ -232,6 +234,13 @@ TUNABLE_INT("dev.hn.tx_chimney_size", &h static int hn_direct_tx_size = HN_DIRECT_TX_SIZE_DEF; TUNABLE_INT("dev.hn.direct_tx_size", &hn_direct_tx_size); +#if defined(INET) || defined(INET6) +#if __FreeBSD_version >= 1100095 +static int hn_lro_entry_count = HN_LROENT_CNT_DEF; +TUNABLE_INT("dev.hn.lro_entry_count", &hn_lro_entry_count); +#endif +#endif + /* * Forward declarations */ @@ -335,6 +344,11 @@ netvsc_attach(device_t dev) #if __FreeBSD_version >= 1100045 int tso_maxlen; #endif +#if defined(INET) || defined(INET6) +#if __FreeBSD_version >= 1100095 + int lroent_cnt; +#endif +#endif sc = device_get_softc(dev); if (sc == NULL) { @@ -417,9 +431,17 @@ netvsc_attach(device_t dev) } #if defined(INET) || defined(INET6) +#if __FreeBSD_version >= 1100095 + lroent_cnt = hn_lro_entry_count; + if (lroent_cnt < TCP_LRO_ENTRIES) + lroent_cnt = TCP_LRO_ENTRIES; + tcp_lro_init_args(&sc->hn_lro, ifp, lroent_cnt, 0); + device_printf(dev, "LRO: entry count %d\n", lroent_cnt); +#else tcp_lro_init(&sc->hn_lro); /* Driver private LRO settings */ sc->hn_lro.ifp = ifp; +#endif #ifdef HN_LRO_HIWAT sc->hn_lro.lro_hiwat = sc->hn_lro_hiwat; #endif @@ -547,6 +569,12 @@ netvsc_attach(device_t dev) SYSCTL_ADD_INT(dc_ctx, dc_child, OID_AUTO, "direct_tx_size", CTLFLAG_RD, &hn_direct_tx_size, 0, "Size of the packet for direct transmission"); +#if defined(INET) || defined(INET6) +#if __FreeBSD_version >= 1100095 + SYSCTL_ADD_INT(dc_ctx, dc_child, OID_AUTO, "lro_entry_count", + CTLFLAG_RD, &hn_lro_entry_count, 0, "LRO entry count"); +#endif +#endif } return (0); From owner-svn-src-all@freebsd.org Fri Feb 5 05:44:32 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA861A9A1C6; Fri, 5 Feb 2016 05:44:32 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAAE91963; Fri, 5 Feb 2016 05:44:32 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u155iVef077733; Fri, 5 Feb 2016 05:44:31 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u155iVSC077732; Fri, 5 Feb 2016 05:44:31 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201602050544.u155iVSC077732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 5 Feb 2016 05:44:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295305 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 05:44:33 -0000 Author: sephe Date: Fri Feb 5 05:44:31 2016 New Revision: 295305 URL: https://svnweb.freebsd.org/changeset/base/295305 Log: hyperv/hn: Move LRO flush to the channel processing rollup This significantly increases LRO aggregation ratio when there are large amount of connections (improves reception performance a lot). Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5167 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 5 05:38:01 2016 (r295304) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 5 05:44:31 2016 (r295305) @@ -764,6 +764,15 @@ void netvsc_channel_rollup(struct hv_device *device_ctx) { struct hn_softc *sc = device_get_softc(device_ctx->device); +#if defined(INET) || defined(INET6) + struct lro_ctrl *lro = &sc->hn_lro; + struct lro_entry *queued; + + while ((queued = SLIST_FIRST(&lro->lro_active)) != NULL) { + SLIST_REMOVE_HEAD(&lro->lro_active, next); + tcp_lro_flush(lro, queued); + } +#endif if (!sc->hn_txeof) return; @@ -1338,18 +1347,8 @@ skip: } void -netvsc_recv_rollup(struct hv_device *device_ctx) +netvsc_recv_rollup(struct hv_device *device_ctx __unused) { -#if defined(INET) || defined(INET6) - hn_softc_t *sc = device_get_softc(device_ctx->device); - struct lro_ctrl *lro = &sc->hn_lro; - struct lro_entry *queued; - - while ((queued = SLIST_FIRST(&lro->lro_active)) != NULL) { - SLIST_REMOVE_HEAD(&lro->lro_active, next); - tcp_lro_flush(lro, queued); - } -#endif } /* From owner-svn-src-all@freebsd.org Fri Feb 5 05:50:54 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A28C6A9A3FD; Fri, 5 Feb 2016 05:50:54 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 584491C58; Fri, 5 Feb 2016 05:50:54 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u155or0O078599; Fri, 5 Feb 2016 05:50:53 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u155or19078597; Fri, 5 Feb 2016 05:50:53 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201602050550.u155or19078597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 5 Feb 2016 05:50:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295306 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 05:50:54 -0000 Author: sephe Date: Fri Feb 5 05:50:53 2016 New Revision: 295306 URL: https://svnweb.freebsd.org/changeset/base/295306 Log: hyperv/hn: Add an option to always do transmission scheduling It is off by default. This eases more experiment on hn(4). Reviewed by: adrian, Hongjiang Zhang Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5175 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Fri Feb 5 05:44:31 2016 (r295305) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Fri Feb 5 05:50:53 2016 (r295306) @@ -1023,6 +1023,7 @@ typedef struct hn_softc { int hn_txdesc_avail; int hn_txeof; + int hn_sched_tx; int hn_direct_tx_size; struct taskqueue *hn_tx_taskq; struct task hn_start_task; Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 5 05:44:31 2016 (r295305) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 5 05:50:53 2016 (r295306) @@ -534,6 +534,10 @@ netvsc_attach(device_t dev) SYSCTL_ADD_INT(ctx, child, OID_AUTO, "direct_tx_size", CTLFLAG_RW, &sc->hn_direct_tx_size, 0, "Size of the packet for direct transmission"); + SYSCTL_ADD_INT(ctx, child, OID_AUTO, "sched_tx", + CTLFLAG_RW, &sc->hn_sched_tx, 0, + "Always schedule transmission " + "instead of doing direct transmission"); if (unit == 0) { struct sysctl_ctx_list *dc_ctx; @@ -1602,9 +1606,11 @@ hn_stop(hn_softc_t *sc) static void hn_start(struct ifnet *ifp) { - hn_softc_t *sc; + struct hn_softc *sc = ifp->if_softc; + + if (sc->hn_sched_tx) + goto do_sched; - sc = ifp->if_softc; if (NV_TRYLOCK(sc)) { int sched; @@ -1613,15 +1619,18 @@ hn_start(struct ifnet *ifp) if (!sched) return; } +do_sched: taskqueue_enqueue_fast(sc->hn_tx_taskq, &sc->hn_start_task); } static void hn_start_txeof(struct ifnet *ifp) { - hn_softc_t *sc; + struct hn_softc *sc = ifp->if_softc; + + if (sc->hn_sched_tx) + goto do_sched; - sc = ifp->if_softc; if (NV_TRYLOCK(sc)) { int sched; @@ -1633,6 +1642,7 @@ hn_start_txeof(struct ifnet *ifp) &sc->hn_start_task); } } else { +do_sched: /* * Release the OACTIVE earlier, with the hope, that * others could catch up. The task will clear the From owner-svn-src-all@freebsd.org Fri Feb 5 05:53:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 306FAA9A63E; Fri, 5 Feb 2016 05:53:44 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: from mail-vk0-x22b.google.com (mail-vk0-x22b.google.com [IPv6:2607:f8b0:400c:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DEB28F6; Fri, 5 Feb 2016 05:53:43 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: by mail-vk0-x22b.google.com with SMTP id c3so4121421vkb.3; Thu, 04 Feb 2016 21:53:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=fgMOcdDMU426SnEXSewxu6Rj5bd15epvEQj6/rEsT7c=; b=LcwwCDqul0KZGewN/B8WSKP5FIpH9rfvvOSTUkHqz88X8sOz2jo4418LT9fOA1N/K/ kZbLyvzZHVQRF55I9Z1xtBw5G8j3uA1JnKxhCMiOE+4Ah856+heValY+l7fE6FRZlmoL rH3CpyZL7dGpKyUEN8MSGBABcVTLEetYT4kpmeais5cFogIL4OYciPiefYTzFp5un0Pg b6s9gId/6OLK7pzTlK7DDMFv3fKUbeaFiGNL4594m6plnUbLAZLzJKAhuGLx/BfmEgnd S1ijirQJPDm4GXGvgUg9oV9VAH8LUTH+whMhZzhcd3XdUBAzjM62Sf3OBNnyLRP27Vun x4Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=fgMOcdDMU426SnEXSewxu6Rj5bd15epvEQj6/rEsT7c=; b=HsAD+mpy1+3SchXB7vEtl+ZLlyY5p6YF3hfab2UHfqFqmSb5tPBRIBlESsVfBii7S6 yfRGFA02MKueF5NoIiZJ402qs/MI06QpvEO+jJWtmJPj0J8xwNP4xW10LWM0Bns1ilgj xYJ8OOdU1qnryZ1aviXUeW01b4FgkwBev2+wQni9aFCdmXoNKGQScout6XgGvJmW5CIx Zc6Hoo8qlKwMDUo1T/rh5raQT0fa4ayDIW1kXFybTWXrzDf/WPg5J68l9N6B9/0v8UB4 mRSur4w4DX7r9+td0WXkZKuotXW/SVS7mpsY5HtJmAfMbWvexk1BRnxlSwTwGO8qXObQ GwTA== X-Gm-Message-State: AG10YOTJfTVNiSNvvE3PfoiRaucRBhn8jZq8VCjf64c1hX9BGfUFe6yCgz0Kik9YHk2YHRca0lKteomsetsspA== MIME-Version: 1.0 X-Received: by 10.31.169.87 with SMTP id s84mr8241976vke.55.1454651622982; Thu, 04 Feb 2016 21:53:42 -0800 (PST) Sender: sepherosa@gmail.com Received: by 10.176.65.104 with HTTP; Thu, 4 Feb 2016 21:53:42 -0800 (PST) In-Reply-To: References: <201602050525.u155PBCX071820@repo.freebsd.org> Date: Fri, 5 Feb 2016 13:53:42 +0800 X-Google-Sender-Auth: CRyDa3pBipaEUmaOUt9afpmsOfk Message-ID: Subject: Re: svn commit: r295302 - head/sys/dev/hyperv/netvsc From: Sepherosa Ziehau To: Andriy Voskoboinyk Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 05:53:44 -0000 Oh, thanks, will fix it :) On Fri, Feb 5, 2016 at 1:34 PM, Andriy Voskoboinyk wrote= : > Fri, 05 Feb 2016 07:25:11 +0200 =D0=B1=D1=83=D0=BB=D0=BE =D0=BD=D0=B0=D0= =BF=D0=B8=D1=81=D0=B0=D0=BD=D0=BE Sepherosa Ziehau > : > >> Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.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 >> ... >> @@ -744,31 +745,235 @@ netvsc_channel_rollup(struct hv_device * >> } >> /* >> - * Start a transmit of one or more packets >> + * NOTE: >> + * This this function fails, then both txd and m_head0 will be freed > > > Probably "If this function fails.." ? > > >> */ >> static int >> -hn_start_locked(struct ifnet *ifp, int len) >> +hn_encap(struct hn_softc *sc, struct hn_txdesc *txd, struct mbuf >> **m_head0) >> { --=20 Tomorrow Will Never Die From owner-svn-src-all@freebsd.org Fri Feb 5 07:10:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96F35A9D0D2; Fri, 5 Feb 2016 07:10:00 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69E2E6D3; Fri, 5 Feb 2016 07:10:00 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1579xwu002289; Fri, 5 Feb 2016 07:09:59 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1579wjk002280; Fri, 5 Feb 2016 07:09:58 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201602050709.u1579wjk002280@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 5 Feb 2016 07:09:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295307 - in head/sys/dev/hyperv: include utilities vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 07:10:00 -0000 Author: sephe Date: Fri Feb 5 07:09:58 2016 New Revision: 295307 URL: https://svnweb.freebsd.org/changeset/base/295307 Log: hyperv: Use standard taskqueue instead of hv_work_queue HyperV code was ported from Linux. There is an implementation of work queue called hv_work_queue. In FreeBSD, taskqueue could be used for the same purpose. Convert all the consumer of hv_work_queue to use taskqueue, and remove work queue implementation. Submitted by: Jun Su Reviewed by: adrian, Hongjiang Zhang Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4963 Modified: head/sys/dev/hyperv/include/hyperv.h head/sys/dev/hyperv/utilities/hv_kvp.c head/sys/dev/hyperv/utilities/hv_util.c head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c head/sys/dev/hyperv/vmbus/hv_connection.c head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h Modified: head/sys/dev/hyperv/include/hyperv.h ============================================================================== --- head/sys/dev/hyperv/include/hyperv.h Fri Feb 5 05:50:53 2016 (r295306) +++ head/sys/dev/hyperv/include/hyperv.h Fri Feb 5 07:09:58 2016 (r295307) @@ -908,30 +908,6 @@ int hv_vmbus_channel_teardown_gpdal( struct hv_vmbus_channel* vmbus_select_outgoing_channel(struct hv_vmbus_channel *promary); -/* - * Work abstraction defines - */ -typedef struct hv_work_queue { - struct taskqueue* queue; - struct proc* proc; - struct sema* work_sema; -} hv_work_queue; - -typedef struct hv_work_item { - struct task work; - void (*callback)(void *); - void* context; - hv_work_queue* wq; -} hv_work_item; - -struct hv_work_queue* hv_work_queue_create(char* name); - -void hv_work_queue_close(struct hv_work_queue* wq); - -int hv_queue_work_item( - hv_work_queue* wq, - void (*callback)(void *), - void* context); /** * @brief Get physical address from virtual */ @@ -952,8 +928,8 @@ typedef struct hv_vmbus_service { hv_guid guid; /* Hyper-V GUID */ char *name; /* name of service */ boolean_t enabled; /* service enabled */ - hv_work_queue *work_queue; /* background work queue */ - + void* context; + struct task task; /* * function to initialize service */ @@ -963,6 +939,11 @@ typedef struct hv_vmbus_service { * function to process Hyper-V messages */ void (*callback)(void *); + + /* + * function to uninitilize service + */ + int (*uninit)(struct hv_vmbus_service *); } hv_vmbus_service; extern uint8_t* receive_buffer[]; Modified: head/sys/dev/hyperv/utilities/hv_kvp.c ============================================================================== --- head/sys/dev/hyperv/utilities/hv_kvp.c Fri Feb 5 05:50:53 2016 (r295306) +++ head/sys/dev/hyperv/utilities/hv_kvp.c Fri Feb 5 07:09:58 2016 (r295307) @@ -98,7 +98,7 @@ static d_poll_t hv_kvp_dev_daemon_poll; static int hv_kvp_req_in_progress(void); static void hv_kvp_transaction_init(uint32_t, hv_vmbus_channel *, uint64_t, uint8_t *); static void hv_kvp_send_msg_to_daemon(void); -static void hv_kvp_process_request(void *context); +static void hv_kvp_process_request(void *context, int pending); /* hv_kvp character device structure */ static struct cdevsw hv_kvp_cdevsw = @@ -123,9 +123,6 @@ static struct selinfo hv_kvp_selinfo; */ static struct { - /* Pre-allocated work item for queue */ - hv_work_item work_item; - /* Unless specified the pending mutex should be * used to alter the values of the following paramters: * 1. req_in_progress @@ -642,7 +639,7 @@ hv_kvp_send_msg_to_daemon(void) * and interact with daemon */ static void -hv_kvp_process_request(void *context) +hv_kvp_process_request(void *context, int pending) { uint8_t *kvp_buf; hv_vmbus_channel *channel = context; @@ -756,23 +753,18 @@ hv_kvp_callback(void *context) uint64_t pending_cnt = 0; if (kvp_globals.register_done == false) { - kvp_globals.channelp = context; + TASK_INIT(&service_table[HV_KVP].task, 0, hv_kvp_process_request, context); } else { - mtx_lock(&kvp_globals.pending_mutex); kvp_globals.pending_reqs = kvp_globals.pending_reqs + 1; pending_cnt = kvp_globals.pending_reqs; mtx_unlock(&kvp_globals.pending_mutex); if (pending_cnt == 1) { hv_kvp_log_info("%s: Queuing work item\n", __func__); - hv_queue_work_item( - service_table[HV_KVP].work_queue, - hv_kvp_process_request, - context - ); + taskqueue_enqueue(taskqueue_thread, &service_table[HV_KVP].task); } - } + } } @@ -977,26 +969,13 @@ int hv_kvp_init(hv_vmbus_service *srv) { int error = 0; - hv_work_queue *work_queue = NULL; - - memset(&kvp_globals, 0, sizeof(kvp_globals)); - work_queue = hv_work_queue_create("KVP Service"); - if (work_queue == NULL) { - hv_kvp_log_info("%s: Work queue alloc failed\n", __func__); - error = ENOMEM; - hv_kvp_log_error("%s: ENOMEM\n", __func__); - goto Finish; - } - srv->work_queue = work_queue; + memset(&kvp_globals, 0, sizeof(kvp_globals)); error = hv_kvp_dev_init(); mtx_init(&kvp_globals.pending_mutex, "hv-kvp pending mutex", - NULL, MTX_DEF); - kvp_globals.pending_reqs = 0; - + NULL, MTX_DEF); -Finish: return (error); } Modified: head/sys/dev/hyperv/utilities/hv_util.c ============================================================================== --- head/sys/dev/hyperv/utilities/hv_util.c Fri Feb 5 05:50:53 2016 (r295306) +++ head/sys/dev/hyperv/utilities/hv_util.c Fri Feb 5 07:09:58 2016 (r295307) @@ -52,6 +52,8 @@ static void hv_heartbeat_cb(void *contex static void hv_timesync_cb(void *context); static int hv_timesync_init(hv_vmbus_service *serv); +static int hv_timesync_uninit(hv_vmbus_service *serv); +static void hv_set_host_time(void *context, int pending); /* * Note: GUID codes below are predefined by the host hypervisor @@ -73,6 +75,7 @@ hv_vmbus_service service_table[] = { .enabled = TRUE, .init = hv_timesync_init, .callback = hv_timesync_cb, + .uninit = hv_timesync_uninit, }, /* Heartbeat Service */ @@ -111,10 +114,16 @@ struct hv_ictimesync_data { static int hv_timesync_init(hv_vmbus_service *serv) { + void *time_msg = malloc(sizeof(time_sync_data), M_DEVBUF, M_WAITOK); + TASK_INIT(&serv->task, 1, hv_set_host_time, time_msg); + return (0); +} - serv->work_queue = hv_work_queue_create("Time Sync"); - if (serv->work_queue == NULL) - return (ENOMEM); +static int +hv_timesync_uninit(hv_vmbus_service *serv) +{ + taskqueue_drain(taskqueue_thread, &serv->task); + free(serv->task.ta_context, M_DEVBUF); return (0); } @@ -152,9 +161,9 @@ hv_negotiate_version( * Set host time based on time sync message from host */ static void -hv_set_host_time(void *context) +hv_set_host_time(void *context, int pending) { - time_sync_data* time_msg = (time_sync_data*) context; + time_sync_data* time_msg = (time_sync_data*) context; uint64_t hosttime = time_msg->data; struct timespec guest_ts, host_ts; uint64_t host_tns; @@ -166,7 +175,7 @@ hv_set_host_time(void *context) host_ts.tv_nsec = (long)(host_tns%HV_NANO_SEC_PER_SEC); nanotime(&guest_ts); - + diff = (int64_t)host_ts.tv_sec - (int64_t)guest_ts.tv_sec; /* @@ -175,12 +184,7 @@ hv_set_host_time(void *context) if (diff > 5 || diff < -5) { error = kern_clock_settime(curthread, CLOCK_REALTIME, &host_ts); - } - - /* - * Free the hosttime that was allocated in hv_adj_guesttime() - */ - free(time_msg, M_DEVBUF); + } } /** @@ -197,23 +201,13 @@ hv_set_host_time(void *context) static inline void hv_adj_guesttime(uint64_t hosttime, uint8_t flags) { - time_sync_data* time_msg; - - time_msg = malloc(sizeof(time_sync_data), M_DEVBUF, M_NOWAIT); + time_sync_data* time_msg = service_table[HV_TIME_SYNCH].task.ta_context; - if (time_msg == NULL) - return; - time_msg->data = hosttime; - if ((flags & HV_ICTIMESYNCFLAG_SYNC) != 0) { - hv_queue_work_item(service_table[HV_TIME_SYNCH].work_queue, - hv_set_host_time, time_msg); - } else if ((flags & HV_ICTIMESYNCFLAG_SAMPLE) != 0) { - hv_queue_work_item(service_table[HV_TIME_SYNCH].work_queue, - hv_set_host_time, time_msg); - } else { - free(time_msg, M_DEVBUF); + if (((flags & HV_ICTIMESYNCFLAG_SYNC) != 0) || + ((flags & HV_ICTIMESYNCFLAG_SAMPLE) != 0)) { + taskqueue_enqueue(taskqueue_thread, &service_table[HV_TIME_SYNCH].task); } } @@ -452,19 +446,14 @@ hv_util_detach(device_t dev) service = device_get_softc(dev); receive_buffer_offset = service - &service_table[0]; - if (service->work_queue != NULL) - hv_work_queue_close(service->work_queue); + if (service->uninit != NULL) + service->uninit(service); free(receive_buffer[receive_buffer_offset], M_DEVBUF); receive_buffer[receive_buffer_offset] = NULL; return (0); } -static void -hv_util_init(void) -{ -} - static int hv_util_modevent(module_t mod, int event, void *arg) { @@ -495,6 +484,3 @@ static devclass_t util_devclass; DRIVER_MODULE(hv_utils, vmbus, util_driver, util_devclass, hv_util_modevent, 0); MODULE_VERSION(hv_utils, 1); MODULE_DEPEND(hv_utils, vmbus, 1, 1, 1); - -SYSINIT(hv_util_initx, SI_SUB_KTHREAD_IDLE, SI_ORDER_MIDDLE + 1, - hv_util_init, NULL); Modified: head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c ============================================================================== --- head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c Fri Feb 5 05:50:53 2016 (r295306) +++ head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c Fri Feb 5 07:09:58 2016 (r295307) @@ -36,8 +36,10 @@ */ static void vmbus_channel_on_offer(hv_vmbus_channel_msg_header* hdr); +static void vmbus_channel_on_offer_internal(void* context); static void vmbus_channel_on_open_result(hv_vmbus_channel_msg_header* hdr); static void vmbus_channel_on_offer_rescind(hv_vmbus_channel_msg_header* hdr); +static void vmbus_channel_on_offer_rescind_internal(void* context); static void vmbus_channel_on_gpadl_created(hv_vmbus_channel_msg_header* hdr); static void vmbus_channel_on_gpadl_torndown(hv_vmbus_channel_msg_header* hdr); static void vmbus_channel_on_offers_delivered(hv_vmbus_channel_msg_header* hdr); @@ -49,41 +51,46 @@ static void vmbus_channel_on_version_res hv_vmbus_channel_msg_table_entry g_channel_message_table[HV_CHANNEL_MESSAGE_COUNT] = { { HV_CHANNEL_MESSAGE_INVALID, - 0, NULL }, + NULL }, { HV_CHANNEL_MESSAGE_OFFER_CHANNEL, - 0, vmbus_channel_on_offer }, + vmbus_channel_on_offer }, { HV_CHANNEL_MESSAGE_RESCIND_CHANNEL_OFFER, - 0, vmbus_channel_on_offer_rescind }, + vmbus_channel_on_offer_rescind }, { HV_CHANNEL_MESSAGE_REQUEST_OFFERS, - 0, NULL }, + NULL }, { HV_CHANNEL_MESSAGE_ALL_OFFERS_DELIVERED, - 1, vmbus_channel_on_offers_delivered }, + vmbus_channel_on_offers_delivered }, { HV_CHANNEL_MESSAGE_OPEN_CHANNEL, - 0, NULL }, + NULL }, { HV_CHANNEL_MESSAGE_OPEN_CHANNEL_RESULT, - 1, vmbus_channel_on_open_result }, + vmbus_channel_on_open_result }, { HV_CHANNEL_MESSAGE_CLOSE_CHANNEL, - 0, NULL }, + NULL }, { HV_CHANNEL_MESSAGEL_GPADL_HEADER, - 0, NULL }, + NULL }, { HV_CHANNEL_MESSAGE_GPADL_BODY, - 0, NULL }, + NULL }, { HV_CHANNEL_MESSAGE_GPADL_CREATED, - 1, vmbus_channel_on_gpadl_created }, + vmbus_channel_on_gpadl_created }, { HV_CHANNEL_MESSAGE_GPADL_TEARDOWN, - 0, NULL }, + NULL }, { HV_CHANNEL_MESSAGE_GPADL_TORNDOWN, - 1, vmbus_channel_on_gpadl_torndown }, + vmbus_channel_on_gpadl_torndown }, { HV_CHANNEL_MESSAGE_REL_ID_RELEASED, - 0, NULL }, + NULL }, { HV_CHANNEL_MESSAGE_INITIATED_CONTACT, - 0, NULL }, + NULL }, { HV_CHANNEL_MESSAGE_VERSION_RESPONSE, - 1, vmbus_channel_on_version_response }, + vmbus_channel_on_version_response }, { HV_CHANNEL_MESSAGE_UNLOAD, - 0, NULL } + NULL } }; +typedef struct hv_work_item { + struct task work; + void (*callback)(void *); + void* context; +} hv_work_item; /** * Implementation of the work abstraction. @@ -93,120 +100,30 @@ work_item_callback(void *work, int pendi { struct hv_work_item *w = (struct hv_work_item *)work; - /* - * Serialize work execution. - */ - if (w->wq->work_sema != NULL) { - sema_wait(w->wq->work_sema); - } - w->callback(w->context); - if (w->wq->work_sema != NULL) { - sema_post(w->wq->work_sema); - } - free(w, M_DEVBUF); } -struct hv_work_queue* -hv_work_queue_create(char* name) -{ - static unsigned int qid = 0; - char qname[64]; - int pri; - struct hv_work_queue* wq; - - wq = malloc(sizeof(struct hv_work_queue), M_DEVBUF, M_NOWAIT | M_ZERO); - KASSERT(wq != NULL, ("Error VMBUS: Failed to allocate work_queue\n")); - if (wq == NULL) - return (NULL); - - /* - * We use work abstraction to handle messages - * coming from the host and these are typically offers. - * Some FreeBsd drivers appear to have a concurrency issue - * where probe/attach needs to be serialized. We ensure that - * by having only one thread process work elements in a - * specific queue by serializing work execution. - * - */ - if (strcmp(name, "vmbusQ") == 0) { - pri = PI_DISK; - } else { /* control */ - pri = PI_NET; - /* - * Initialize semaphore for this queue by pointing - * to the globale semaphore used for synchronizing all - * control messages. - */ - wq->work_sema = &hv_vmbus_g_connection.control_sema; - } - - sprintf(qname, "hv_%s_%u", name, qid); - - /* - * Fixme: FreeBSD 8.2 has a different prototype for - * taskqueue_create(), and for certain other taskqueue functions. - * We need to research the implications of these changes. - * Fixme: Not sure when the changes were introduced. - */ - wq->queue = taskqueue_create(qname, M_NOWAIT, taskqueue_thread_enqueue, - &wq->queue - #if __FreeBSD_version < 800000 - , &wq->proc - #endif - ); - - if (wq->queue == NULL) { - free(wq, M_DEVBUF); - return (NULL); - } - - if (taskqueue_start_threads(&wq->queue, 1, pri, "%s taskq", qname)) { - taskqueue_free(wq->queue); - free(wq, M_DEVBUF); - return (NULL); - } - - qid++; - - return (wq); -} - -void -hv_work_queue_close(struct hv_work_queue *wq) -{ - /* - * KYS: Need to drain the taskqueue - * before we close the hv_work_queue. - */ - /*KYS: taskqueue_drain(wq->tq, ); */ - taskqueue_free(wq->queue); - free(wq, M_DEVBUF); -} - /** * @brief Create work item */ -int +static int hv_queue_work_item( - struct hv_work_queue *wq, void (*callback)(void *), void *context) { struct hv_work_item *w = malloc(sizeof(struct hv_work_item), - M_DEVBUF, M_NOWAIT | M_ZERO); + M_DEVBUF, M_NOWAIT); KASSERT(w != NULL, ("Error VMBUS: Failed to allocate WorkItem\n")); if (w == NULL) return (ENOMEM); w->callback = callback; w->context = context; - w->wq = wq; TASK_INIT(&w->work, 0, work_item_callback, w); - return (taskqueue_enqueue(wq->queue, &w->work)); + return (taskqueue_enqueue(taskqueue_thread, &w->work)); } @@ -221,10 +138,7 @@ hv_vmbus_allocate_channel(void) channel = (hv_vmbus_channel*) malloc( sizeof(hv_vmbus_channel), M_DEVBUF, - M_NOWAIT | M_ZERO); - KASSERT(channel != NULL, ("Error VMBUS: Failed to allocate channel!")); - if (channel == NULL) - return (NULL); + M_WAITOK | M_ZERO); mtx_init(&channel->inbound_lock, "channel inbound", NULL, MTX_DEF); mtx_init(&channel->sc_lock, "vmbus multi channel", NULL, MTX_DEF); @@ -235,16 +149,6 @@ hv_vmbus_allocate_channel(void) } /** - * @brief Release the vmbus channel object itself - */ -static inline void -ReleaseVmbusChannel(void *context) -{ - hv_vmbus_channel* channel = (hv_vmbus_channel*) context; - free(channel, M_DEVBUF); -} - -/** * @brief Release the resources used by the vmbus channel object */ void @@ -252,13 +156,8 @@ hv_vmbus_free_vmbus_channel(hv_vmbus_cha { mtx_destroy(&channel->sc_lock); mtx_destroy(&channel->inbound_lock); - /* - * We have to release the channel's workqueue/thread in - * the vmbus's workqueue/thread context - * ie we can't destroy ourselves - */ - hv_queue_work_item(hv_vmbus_g_connection.work_queue, - ReleaseVmbusChannel, (void *) channel); + + free(channel, M_DEVBUF); } /** @@ -456,7 +355,7 @@ static void vmbus_channel_on_offer(hv_vmbus_channel_msg_header* hdr) { hv_vmbus_channel_offer_channel* offer; - hv_vmbus_channel* new_channel; + hv_vmbus_channel_offer_channel* copied; offer = (hv_vmbus_channel_offer_channel*) hdr; @@ -466,10 +365,25 @@ vmbus_channel_on_offer(hv_vmbus_channel_ guidType = &offer->offer.interface_type; guidInstance = &offer->offer.interface_instance; + // copy offer data + copied = malloc(sizeof(*copied), M_DEVBUF, M_NOWAIT); + if (copied == NULL) { + printf("fail to allocate memory\n"); + return; + } + + memcpy(copied, hdr, sizeof(*copied)); + hv_queue_work_item(vmbus_channel_on_offer_internal, copied); +} + +static void +vmbus_channel_on_offer_internal(void* context) +{ + hv_vmbus_channel* new_channel; + + hv_vmbus_channel_offer_channel* offer = (hv_vmbus_channel_offer_channel*)context; /* Allocate the channel object and save this offer */ new_channel = hv_vmbus_allocate_channel(); - if (new_channel == NULL) - return; /* * By default we setup state to enable batched @@ -509,6 +423,8 @@ vmbus_channel_on_offer(hv_vmbus_channel_ new_channel->monitor_bit = (uint8_t) offer->monitor_id % 32; vmbus_channel_process_offer(new_channel); + + free(offer, M_DEVBUF); } /** @@ -526,13 +442,20 @@ vmbus_channel_on_offer_rescind(hv_vmbus_ rescind = (hv_vmbus_channel_rescind_offer*) hdr; channel = hv_vmbus_g_connection.channels[rescind->child_rel_id]; - if (channel == NULL) + if (channel == NULL) return; - hv_vmbus_child_device_unregister(channel->device); - mtx_lock(&hv_vmbus_g_connection.channel_lock); + hv_queue_work_item(vmbus_channel_on_offer_rescind_internal, channel); hv_vmbus_g_connection.channels[rescind->child_rel_id] = NULL; - mtx_unlock(&hv_vmbus_g_connection.channel_lock); +} + +static void +vmbus_channel_on_offer_rescind_internal(void *context) +{ + hv_vmbus_channel* channel; + + channel = (hv_vmbus_channel*)context; + hv_vmbus_child_device_unregister(channel->device); } /** @@ -709,35 +632,6 @@ vmbus_channel_on_version_response(hv_vmb } /** - * @brief Handler for channel protocol messages. - * - * This is invoked in the vmbus worker thread context. - */ -void -hv_vmbus_on_channel_message(void *context) -{ - hv_vmbus_message* msg; - hv_vmbus_channel_msg_header* hdr; - int size; - - msg = (hv_vmbus_message*) context; - hdr = (hv_vmbus_channel_msg_header*) msg->u.payload; - size = msg->header.payload_size; - - if (hdr->message_type >= HV_CHANNEL_MESSAGE_COUNT) { - free(msg, M_DEVBUF); - return; - } - - if (g_channel_message_table[hdr->message_type].messageHandler) { - g_channel_message_table[hdr->message_type].messageHandler(hdr); - } - - /* Free the msg that was allocated in VmbusOnMsgDPC() */ - free(msg, M_DEVBUF); -} - -/** * @brief Send a request to get all our pending offers. */ int @@ -762,8 +656,7 @@ hv_vmbus_request_channel_offers(void) ret = hv_vmbus_post_message(msg, sizeof(hv_vmbus_channel_msg_header)); - if (msg_info) - free(msg_info, M_DEVBUF); + free(msg_info, M_DEVBUF); return (ret); } Modified: head/sys/dev/hyperv/vmbus/hv_connection.c ============================================================================== --- head/sys/dev/hyperv/vmbus/hv_connection.c Fri Feb 5 05:50:53 2016 (r295306) +++ head/sys/dev/hyperv/vmbus/hv_connection.c Fri Feb 5 07:09:58 2016 (r295307) @@ -164,8 +164,6 @@ hv_vmbus_connect(void) { * Initialize the vmbus connection */ hv_vmbus_g_connection.connect_state = HV_CONNECTING; - hv_vmbus_g_connection.work_queue = hv_work_queue_create("vmbusQ"); - sema_init(&hv_vmbus_g_connection.control_sema, 1, "control_sema"); TAILQ_INIT(&hv_vmbus_g_connection.channel_msg_anchor); mtx_init(&hv_vmbus_g_connection.channel_msg_lock, "vmbus channel msg", @@ -269,8 +267,6 @@ hv_vmbus_connect(void) { hv_vmbus_g_connection.connect_state = HV_DISCONNECTED; - hv_work_queue_close(hv_vmbus_g_connection.work_queue); - sema_destroy(&hv_vmbus_g_connection.control_sema); mtx_destroy(&hv_vmbus_g_connection.channel_lock); mtx_destroy(&hv_vmbus_g_connection.channel_msg_lock); @@ -323,9 +319,6 @@ hv_vmbus_disconnect(void) { mtx_destroy(&hv_vmbus_g_connection.channel_msg_lock); - hv_work_queue_close(hv_vmbus_g_connection.work_queue); - sema_destroy(&hv_vmbus_g_connection.control_sema); - free(hv_vmbus_g_connection.channels, M_DEVBUF); hv_vmbus_g_connection.connect_state = HV_DISCONNECTED; Modified: head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c Fri Feb 5 05:50:53 2016 (r295306) +++ head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c Fri Feb 5 07:09:58 2016 (r295307) @@ -83,8 +83,6 @@ vmbus_msg_swintr(void *arg) hv_vmbus_channel_msg_table_entry *entry; hv_vmbus_channel_msg_type msg_type; hv_vmbus_message* msg; - hv_vmbus_message* copied; - static bool warned = false; cpu = (int)(long)arg; KASSERT(cpu <= mp_maxid, ("VMBUS: vmbus_msg_swintr: " @@ -100,31 +98,15 @@ vmbus_msg_swintr(void *arg) hdr = (hv_vmbus_channel_msg_header *)msg->u.payload; msg_type = hdr->message_type; - if (msg_type >= HV_CHANNEL_MESSAGE_COUNT && !warned) { - warned = true; + if (msg_type >= HV_CHANNEL_MESSAGE_COUNT) { printf("VMBUS: unknown message type = %d\n", msg_type); goto handled; } entry = &g_channel_message_table[msg_type]; - if (entry->handler_no_sleep) + if (entry->messageHandler) entry->messageHandler(hdr); - else { - - copied = malloc(sizeof(hv_vmbus_message), - M_DEVBUF, M_NOWAIT); - KASSERT(copied != NULL, - ("Error VMBUS: malloc failed to allocate" - " hv_vmbus_message!")); - if (copied == NULL) - continue; - - memcpy(copied, msg, sizeof(hv_vmbus_message)); - hv_queue_work_item(hv_vmbus_g_connection.work_queue, - hv_vmbus_on_channel_message, - copied); - } handled: msg->header.message_type = HV_MESSAGE_TYPE_NONE; Modified: head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h ============================================================================== --- head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h Fri Feb 5 05:50:53 2016 (r295306) +++ head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h Fri Feb 5 07:09:58 2016 (r295307) @@ -362,10 +362,8 @@ typedef struct { /** * channel table for fast lookup through id. - */ + */ hv_vmbus_channel **channels; - hv_vmbus_handle work_queue; - struct sema control_sema; } hv_vmbus_connection; typedef union { @@ -632,7 +630,6 @@ typedef void (*vmbus_msg_handler)(hv_vmb typedef struct hv_vmbus_channel_msg_table_entry { hv_vmbus_channel_msg_type messageType; - bool handler_no_sleep; /* true: the handler doesn't sleep */ vmbus_msg_handler messageHandler; } hv_vmbus_channel_msg_table_entry; @@ -682,7 +679,6 @@ uint32_t hv_ring_buffer_read_end( hv_vmbus_channel* hv_vmbus_allocate_channel(void); void hv_vmbus_free_vmbus_channel(hv_vmbus_channel *channel); -void hv_vmbus_on_channel_message(void *context); int hv_vmbus_request_channel_offers(void); void hv_vmbus_release_unattached_channels(void); int hv_vmbus_init(void); From owner-svn-src-all@freebsd.org Fri Feb 5 07:20:33 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0534A9D3F4; Fri, 5 Feb 2016 07:20:33 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7BF3DC5A; Fri, 5 Feb 2016 07:20:33 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u157KWcX005372; Fri, 5 Feb 2016 07:20:32 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u157KWjE005367; Fri, 5 Feb 2016 07:20:32 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201602050720.u157KWjE005367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 5 Feb 2016 07:20:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295308 - in head/sys/dev/hyperv: netvsc vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 07:20:33 -0000 Author: sephe Date: Fri Feb 5 07:20:31 2016 New Revision: 295308 URL: https://svnweb.freebsd.org/changeset/base/295308 Log: hyperv: Use WAITOK in the places where we can wait And convert rndis non-hot path spinlock to mutex. Submitted by: Jun Su Reviewed by: adrian, sephe Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5081 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c head/sys/dev/hyperv/netvsc/hv_rndis_filter.c head/sys/dev/hyperv/vmbus/hv_connection.c head/sys/dev/hyperv/vmbus/hv_hv.c head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.c Fri Feb 5 07:09:58 2016 (r295307) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c Fri Feb 5 07:20:31 2016 (r295308) @@ -74,10 +74,7 @@ hv_nv_alloc_net_device(struct hv_device netvsc_dev *net_dev; hn_softc_t *sc = device_get_softc(device->device); - net_dev = malloc(sizeof(netvsc_dev), M_NETVSC, M_NOWAIT | M_ZERO); - if (net_dev == NULL) { - return (NULL); - } + net_dev = malloc(sizeof(netvsc_dev), M_NETVSC, M_WAITOK | M_ZERO); net_dev->dev = device; net_dev->destroy = FALSE; @@ -224,11 +221,7 @@ hv_nv_init_rx_buffer_with_net_vsp(struct init_pkt->msgs.vers_1_msgs.send_rx_buf_complete.num_sections; net_dev->rx_sections = malloc(net_dev->rx_section_count * - sizeof(nvsp_1_rx_buf_section), M_NETVSC, M_NOWAIT); - if (net_dev->rx_sections == NULL) { - ret = EINVAL; - goto cleanup; - } + sizeof(nvsp_1_rx_buf_section), M_NETVSC, M_WAITOK); memcpy(net_dev->rx_sections, init_pkt->msgs.vers_1_msgs.send_rx_buf_complete.sections, net_dev->rx_section_count * sizeof(nvsp_1_rx_buf_section)); @@ -326,11 +319,7 @@ hv_nv_init_send_buffer_with_net_vsp(stru BITS_PER_LONG); net_dev->send_section_bitsmap = malloc(net_dev->bitsmap_words * sizeof(long), M_NETVSC, - M_NOWAIT | M_ZERO); - if (NULL == net_dev->send_section_bitsmap) { - ret = ENOMEM; - goto cleanup; - } + M_WAITOK | M_ZERO); goto exit; Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Fri Feb 5 07:09:58 2016 (r295307) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Fri Feb 5 07:20:31 2016 (r295308) @@ -135,12 +135,9 @@ hv_get_rndis_device(void) { rndis_device *device; - device = malloc(sizeof(rndis_device), M_NETVSC, M_NOWAIT | M_ZERO); - if (device == NULL) { - return (NULL); - } + device = malloc(sizeof(rndis_device), M_NETVSC, M_WAITOK | M_ZERO); - mtx_init(&device->req_lock, "HV-FRL", NULL, MTX_SPIN | MTX_RECURSE); + mtx_init(&device->req_lock, "HV-FRL", NULL, MTX_DEF); /* Same effect as STAILQ_HEAD_INITIALIZER() static initializer */ STAILQ_INIT(&device->myrequest_list); @@ -171,10 +168,7 @@ hv_rndis_request(rndis_device *device, u rndis_msg *rndis_mesg; rndis_set_request *set; - request = malloc(sizeof(rndis_request), M_NETVSC, M_NOWAIT | M_ZERO); - if (request == NULL) { - return (NULL); - } + request = malloc(sizeof(rndis_request), M_NETVSC, M_WAITOK | M_ZERO); sema_init(&request->wait_sema, 0, "rndis sema"); @@ -193,9 +187,9 @@ hv_rndis_request(rndis_device *device, u set->request_id += 1; /* Add to the request list */ - mtx_lock_spin(&device->req_lock); + mtx_lock(&device->req_lock); STAILQ_INSERT_TAIL(&device->myrequest_list, request, mylist_entry); - mtx_unlock_spin(&device->req_lock); + mtx_unlock(&device->req_lock); return (request); } @@ -206,14 +200,14 @@ hv_rndis_request(rndis_device *device, u static inline void hv_put_rndis_request(rndis_device *device, rndis_request *request) { - mtx_lock_spin(&device->req_lock); + mtx_lock(&device->req_lock); /* Fixme: Has O(n) performance */ /* * XXXKYS: Use Doubly linked lists. */ STAILQ_REMOVE(&device->myrequest_list, request, rndis_request_, mylist_entry); - mtx_unlock_spin(&device->req_lock); + mtx_unlock(&device->req_lock); sema_destroy(&request->wait_sema); free(request, M_NETVSC); @@ -270,7 +264,7 @@ hv_rf_receive_response(rndis_device *dev rndis_request *next_request; boolean_t found = FALSE; - mtx_lock_spin(&device->req_lock); + mtx_lock(&device->req_lock); request = STAILQ_FIRST(&device->myrequest_list); while (request != NULL) { /* @@ -285,7 +279,7 @@ hv_rf_receive_response(rndis_device *dev next_request = STAILQ_NEXT(request, mylist_entry); request = next_request; } - mtx_unlock_spin(&device->req_lock); + mtx_unlock(&device->req_lock); if (found) { if (response->msg_len <= sizeof(rndis_msg)) { Modified: head/sys/dev/hyperv/vmbus/hv_connection.c ============================================================================== --- head/sys/dev/hyperv/vmbus/hv_connection.c Fri Feb 5 07:09:58 2016 (r295307) +++ head/sys/dev/hyperv/vmbus/hv_connection.c Fri Feb 5 07:20:31 2016 (r295308) @@ -88,8 +88,7 @@ hv_vmbus_negotiate_version(hv_vmbus_chan msg->monitor_page_1 = hv_get_phys_addr( hv_vmbus_g_connection.monitor_pages); - msg->monitor_page_2 = - hv_get_phys_addr( + msg->monitor_page_2 = hv_get_phys_addr( ((uint8_t *) hv_vmbus_g_connection.monitor_pages + PAGE_SIZE)); @@ -179,16 +178,9 @@ hv_vmbus_connect(void) { */ hv_vmbus_g_connection.interrupt_page = contigmalloc( PAGE_SIZE, M_DEVBUF, - M_NOWAIT | M_ZERO, 0UL, + M_WAITOK | M_ZERO, 0UL, BUS_SPACE_MAXADDR, PAGE_SIZE, 0); - KASSERT(hv_vmbus_g_connection.interrupt_page != NULL, - ("Error VMBUS: malloc failed to allocate Channel" - " Request Event message!")); - if (hv_vmbus_g_connection.interrupt_page == NULL) { - ret = ENOMEM; - goto cleanup; - } hv_vmbus_g_connection.recv_interrupt_page = hv_vmbus_g_connection.interrupt_page; @@ -204,28 +196,16 @@ hv_vmbus_connect(void) { hv_vmbus_g_connection.monitor_pages = contigmalloc( 2 * PAGE_SIZE, M_DEVBUF, - M_NOWAIT | M_ZERO, + M_WAITOK | M_ZERO, 0UL, BUS_SPACE_MAXADDR, PAGE_SIZE, 0); - KASSERT(hv_vmbus_g_connection.monitor_pages != NULL, - ("Error VMBUS: malloc failed to allocate Monitor Pages!")); - if (hv_vmbus_g_connection.monitor_pages == NULL) { - ret = ENOMEM; - goto cleanup; - } msg_info = (hv_vmbus_channel_msg_info*) malloc(sizeof(hv_vmbus_channel_msg_info) + sizeof(hv_vmbus_channel_initiate_contact), - M_DEVBUF, M_NOWAIT | M_ZERO); - KASSERT(msg_info != NULL, - ("Error VMBUS: malloc failed for Initiate Contact message!")); - if (msg_info == NULL) { - ret = ENOMEM; - goto cleanup; - } + M_DEVBUF, M_WAITOK | M_ZERO); hv_vmbus_g_connection.channels = malloc(sizeof(hv_vmbus_channel*) * HV_CHANNEL_MAX_COUNT, @@ -301,19 +281,11 @@ hv_vmbus_connect(void) { int hv_vmbus_disconnect(void) { int ret = 0; - hv_vmbus_channel_unload* msg; + hv_vmbus_channel_unload msg; - msg = malloc(sizeof(hv_vmbus_channel_unload), - M_DEVBUF, M_NOWAIT | M_ZERO); - KASSERT(msg != NULL, - ("Error VMBUS: malloc failed to allocate Channel Unload Msg!")); - if (msg == NULL) - return (ENOMEM); - - msg->message_type = HV_CHANNEL_MESSAGE_UNLOAD; - - ret = hv_vmbus_post_message(msg, sizeof(hv_vmbus_channel_unload)); + msg.message_type = HV_CHANNEL_MESSAGE_UNLOAD; + ret = hv_vmbus_post_message(&msg, sizeof(hv_vmbus_channel_unload)); contigfree(hv_vmbus_g_connection.interrupt_page, PAGE_SIZE, M_DEVBUF); @@ -322,8 +294,6 @@ hv_vmbus_disconnect(void) { free(hv_vmbus_g_connection.channels, M_DEVBUF); hv_vmbus_g_connection.connect_state = HV_DISCONNECTED; - free(msg, M_DEVBUF); - return (ret); } Modified: head/sys/dev/hyperv/vmbus/hv_hv.c ============================================================================== --- head/sys/dev/hyperv/vmbus/hv_hv.c Fri Feb 5 07:09:58 2016 (r295307) +++ head/sys/dev/hyperv/vmbus/hv_hv.c Fri Feb 5 07:20:31 2016 (r295308) @@ -189,11 +189,7 @@ hv_vmbus_init(void) * See if the hypercall page is already set */ hypercall_msr.as_uint64_t = rdmsr(HV_X64_MSR_HYPERCALL); - virt_addr = malloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT | M_ZERO); - KASSERT(virt_addr != NULL, - ("Error VMBUS: malloc failed to allocate page during init!")); - if (virt_addr == NULL) - goto cleanup; + virt_addr = malloc(PAGE_SIZE, M_DEVBUF, M_WAITOK | M_ZERO); hypercall_msr.u.enable = 1; hypercall_msr.u.guest_physical_address = Modified: head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c Fri Feb 5 07:09:58 2016 (r295307) +++ head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c Fri Feb 5 07:20:31 2016 (r295308) @@ -291,12 +291,7 @@ hv_vmbus_child_device_create( * Allocate the new child device */ child_dev = malloc(sizeof(hv_device), M_DEVBUF, - M_NOWAIT | M_ZERO); - KASSERT(child_dev != NULL, - ("Error VMBUS: malloc failed to allocate hv_device!")); - - if (child_dev == NULL) - return (NULL); + M_WAITOK | M_ZERO); child_dev->channel = channel; memcpy(&child_dev->class_id, &type, sizeof(hv_guid)); @@ -548,12 +543,7 @@ vmbus_bus_init(void) */ for(i = 0; i < 2; i++) { setup_args.page_buffers[2 * j + i] = - malloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT | M_ZERO); - if (setup_args.page_buffers[2 * j + i] == NULL) { - KASSERT(setup_args.page_buffers[2 * j + i] != NULL, - ("Error VMBUS: malloc failed!")); - goto cleanup1; - } + malloc(PAGE_SIZE, M_DEVBUF, M_WAITOK | M_ZERO); } } From owner-svn-src-all@freebsd.org Fri Feb 5 07:29:13 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C2DFA9D635; Fri, 5 Feb 2016 07:29:13 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17A5A1007; Fri, 5 Feb 2016 07:29:13 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u157TCvS008245; Fri, 5 Feb 2016 07:29:12 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u157TBNG008242; Fri, 5 Feb 2016 07:29:11 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201602050729.u157TBNG008242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 5 Feb 2016 07:29:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295309 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 07:29:13 -0000 Author: sephe Date: Fri Feb 5 07:29:11 2016 New Revision: 295309 URL: https://svnweb.freebsd.org/changeset/base/295309 Log: hyperv: Use malloc for page allocation. We will eventually convert them to use busdma. Submitted by: Jun Su Reviewed by: adrian, sephe, Dexuan Cui Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5087 Modified: head/sys/dev/hyperv/vmbus/hv_channel.c head/sys/dev/hyperv/vmbus/hv_connection.c head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h Modified: head/sys/dev/hyperv/vmbus/hv_channel.c ============================================================================== --- head/sys/dev/hyperv/vmbus/hv_channel.c Fri Feb 5 07:20:31 2016 (r295308) +++ head/sys/dev/hyperv/vmbus/hv_channel.c Fri Feb 5 07:29:11 2016 (r295309) @@ -68,9 +68,7 @@ vmbus_channel_set_event(hv_vmbus_channel + ((channel->offer_msg.child_rel_id >> 5)))); monitor_page = (hv_vmbus_monitor_page *) - hv_vmbus_g_connection.monitor_pages; - - monitor_page++; /* Get the child to parent monitor page */ + hv_vmbus_g_connection.monitor_page_2; synch_set_bit(channel->monitor_bit, (uint32_t *)&monitor_page-> Modified: head/sys/dev/hyperv/vmbus/hv_connection.c ============================================================================== --- head/sys/dev/hyperv/vmbus/hv_connection.c Fri Feb 5 07:20:31 2016 (r295308) +++ head/sys/dev/hyperv/vmbus/hv_connection.c Fri Feb 5 07:29:11 2016 (r295309) @@ -86,11 +86,10 @@ hv_vmbus_negotiate_version(hv_vmbus_chan hv_vmbus_g_connection.interrupt_page); msg->monitor_page_1 = hv_get_phys_addr( - hv_vmbus_g_connection.monitor_pages); + hv_vmbus_g_connection.monitor_page_1); msg->monitor_page_2 = hv_get_phys_addr( - ((uint8_t *) hv_vmbus_g_connection.monitor_pages - + PAGE_SIZE)); + hv_vmbus_g_connection.monitor_page_2); /** * Add to list before we send the request since we may receive the @@ -176,11 +175,9 @@ hv_vmbus_connect(void) { * Setup the vmbus event connection for channel interrupt abstraction * stuff */ - hv_vmbus_g_connection.interrupt_page = contigmalloc( + hv_vmbus_g_connection.interrupt_page = malloc( PAGE_SIZE, M_DEVBUF, - M_WAITOK | M_ZERO, 0UL, - BUS_SPACE_MAXADDR, - PAGE_SIZE, 0); + M_WAITOK | M_ZERO); hv_vmbus_g_connection.recv_interrupt_page = hv_vmbus_g_connection.interrupt_page; @@ -193,14 +190,14 @@ hv_vmbus_connect(void) { * Set up the monitor notification facility. The 1st page for * parent->child and the 2nd page for child->parent */ - hv_vmbus_g_connection.monitor_pages = contigmalloc( - 2 * PAGE_SIZE, + hv_vmbus_g_connection.monitor_page_1 = malloc( + PAGE_SIZE, M_DEVBUF, - M_WAITOK | M_ZERO, - 0UL, - BUS_SPACE_MAXADDR, + M_WAITOK | M_ZERO); + hv_vmbus_g_connection.monitor_page_2 = malloc( PAGE_SIZE, - 0); + M_DEVBUF, + M_WAITOK | M_ZERO); msg_info = (hv_vmbus_channel_msg_info*) malloc(sizeof(hv_vmbus_channel_msg_info) + @@ -258,13 +255,8 @@ hv_vmbus_connect(void) { hv_vmbus_g_connection.interrupt_page = NULL; } - if (hv_vmbus_g_connection.monitor_pages != NULL) { - contigfree( - hv_vmbus_g_connection.monitor_pages, - 2 * PAGE_SIZE, - M_DEVBUF); - hv_vmbus_g_connection.monitor_pages = NULL; - } + free(hv_vmbus_g_connection.monitor_page_1, M_DEVBUF); + free(hv_vmbus_g_connection.monitor_page_2, M_DEVBUF); if (msg_info) { sema_destroy(&msg_info->wait_sema); Modified: head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h ============================================================================== --- head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h Fri Feb 5 07:20:31 2016 (r295308) +++ head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h Fri Feb 5 07:29:11 2016 (r295309) @@ -350,7 +350,8 @@ typedef struct { * notification and 2nd is child->parent * notification */ - void *monitor_pages; + void *monitor_page_1; + void *monitor_page_2; TAILQ_HEAD(, hv_vmbus_channel_msg_info) channel_msg_anchor; struct mtx channel_msg_lock; /** From owner-svn-src-all@freebsd.org Fri Feb 5 09:46:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0C57A77283; Fri, 5 Feb 2016 09:46:26 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D0B9965; Fri, 5 Feb 2016 09:46:26 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u159kP0t049581; Fri, 5 Feb 2016 09:46:25 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u159kOEB049571; Fri, 5 Feb 2016 09:46:24 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201602050946.u159kOEB049571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Fri, 5 Feb 2016 09:46:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295315 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 09:46:27 -0000 Author: mmel Date: Fri Feb 5 09:46:24 2016 New Revision: 295315 URL: https://svnweb.freebsd.org/changeset/base/295315 Log: ARM: Introduce new cpu-v4.h header and move all ARMv4 specific code from cpu-v6.h to it. Remove unneeded cpu-v6.h includes. Added: head/sys/arm/include/cpu-v4.h - copied, changed from r295314, head/sys/arm/include/cpu-v6.h Modified: head/sys/arm/arm/cpuinfo.c head/sys/arm/arm/genassym.c head/sys/arm/arm/machdep.c head/sys/arm/arm/pmap-v6.c head/sys/arm/arm/sys_machdep.c head/sys/arm/arm/trap-v6.c head/sys/arm/include/cpu-v6.h head/sys/arm/include/cpu.h Modified: head/sys/arm/arm/cpuinfo.c ============================================================================== --- head/sys/arm/arm/cpuinfo.c Fri Feb 5 09:28:03 2016 (r295314) +++ head/sys/arm/arm/cpuinfo.c Fri Feb 5 09:46:24 2016 (r295315) @@ -31,8 +31,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include -#include struct cpuinfo cpuinfo = { @@ -83,14 +83,16 @@ cpuinfo_init(void) /* CP15 c0,c0 regs 0-7 exist on all CPUs (although aliased with MIDR) */ cpuinfo.ctr = cp15_ctr_get(); cpuinfo.tcmtr = cp15_tcmtr_get(); +#if __ARM_ARCH >= 6 cpuinfo.tlbtr = cp15_tlbtr_get(); cpuinfo.mpidr = cp15_mpidr_get(); cpuinfo.revidr = cp15_revidr_get(); +#endif /* if CPU is not v7 cpu id scheme */ if (cpuinfo.architecture != 0xF) return; - +#if __ARM_ARCH >= 6 cpuinfo.id_pfr0 = cp15_id_pfr0_get(); cpuinfo.id_pfr1 = cp15_id_pfr1_get(); cpuinfo.id_dfr0 = cp15_id_dfr0_get(); @@ -144,6 +146,7 @@ cpuinfo_init(void) } cpuinfo.dcache_line_mask = cpuinfo.dcache_line_size - 1; cpuinfo.icache_line_mask = cpuinfo.icache_line_size - 1; +#endif } /* Modified: head/sys/arm/arm/genassym.c ============================================================================== --- head/sys/arm/arm/genassym.c Fri Feb 5 09:28:03 2016 (r295314) +++ head/sys/arm/arm/genassym.c Fri Feb 5 09:46:24 2016 (r295315) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Fri Feb 5 09:28:03 2016 (r295314) +++ head/sys/arm/arm/machdep.c Fri Feb 5 09:46:24 2016 (r295315) @@ -123,7 +123,6 @@ __FBSDID("$FreeBSD$"); #include #if __ARM_ARCH >= 6 -#include DB_SHOW_COMMAND(cp15, db_show_cp15) { Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Fri Feb 5 09:28:03 2016 (r295314) +++ head/sys/arm/arm/pmap-v6.c Fri Feb 5 09:46:24 2016 (r295315) @@ -141,7 +141,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #ifdef SMP Modified: head/sys/arm/arm/sys_machdep.c ============================================================================== --- head/sys/arm/arm/sys_machdep.c Fri Feb 5 09:28:03 2016 (r295314) +++ head/sys/arm/arm/sys_machdep.c Fri Feb 5 09:46:24 2016 (r295315) @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #include Modified: head/sys/arm/arm/trap-v6.c ============================================================================== --- head/sys/arm/arm/trap-v6.c Fri Feb 5 09:28:03 2016 (r295314) +++ head/sys/arm/arm/trap-v6.c Fri Feb 5 09:46:24 2016 (r295315) @@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Copied and modified: head/sys/arm/include/cpu-v4.h (from r295314, head/sys/arm/include/cpu-v6.h) ============================================================================== --- head/sys/arm/include/cpu-v6.h Fri Feb 5 09:28:03 2016 (r295314, copy source) +++ head/sys/arm/include/cpu-v4.h Fri Feb 5 09:46:24 2016 (r295315) @@ -1,6 +1,6 @@ /*- - * Copyright 2014 Svatopluk Kraus - * Copyright 2014 Michal Meloun + * Copyright 2016 Svatopluk Kraus + * Copyright 2016 Michal Meloun * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,24 +26,25 @@ * * $FreeBSD$ */ -#ifndef MACHINE_CPU_V6_H -#define MACHINE_CPU_V6_H +#ifndef MACHINE_CPU_V4_H +#define MACHINE_CPU_V4_H /* There are no user serviceable parts here, they may change without notice */ #ifndef _KERNEL #error Only include this file in the kernel -#else +#endif #include -#include "machine/atomic.h" -#include "machine/cpufunc.h" -#include "machine/cpuinfo.h" -#include "machine/sysreg.h" +#include +#include +#include +#include -#define CPU_ASID_KERNEL 0 +#if __ARM_ARCH >= 6 +#error Newer include this file for ARMv6 +#else -vm_offset_t dcache_wb_pou_checked(vm_offset_t, vm_size_t); -vm_offset_t icache_inv_pou_checked(vm_offset_t, vm_size_t); +#define CPU_ASID_KERNEL 0 /* * Macros to generate CP15 (system control processor) read/write functions. @@ -82,503 +83,34 @@ fname(register_t reg) \ __asm __volatile("mcr\t" _FX(aname):: "r" (reg)); \ } -#define _W64F1(fname, aname...) \ -static __inline void \ -fname(uint64_t reg) \ -{ \ - __asm __volatile("mcrr\t" _FX(aname):: "r" (reg)); \ -} - -/* - * Raw CP15 maintenance operations - * !!! not for external use !!! - */ - -/* TLB */ - -_WF0(_CP15_TLBIALL, CP15_TLBIALL) /* Invalidate entire unified TLB */ -#if __ARM_ARCH >= 7 && defined SMP -_WF0(_CP15_TLBIALLIS, CP15_TLBIALLIS) /* Invalidate entire unified TLB IS */ -#endif -_WF1(_CP15_TLBIASID, CP15_TLBIASID(%0)) /* Invalidate unified TLB by ASID */ -#if __ARM_ARCH >= 7 && defined SMP -_WF1(_CP15_TLBIASIDIS, CP15_TLBIASIDIS(%0)) /* Invalidate unified TLB by ASID IS */ -#endif -_WF1(_CP15_TLBIMVAA, CP15_TLBIMVAA(%0)) /* Invalidate unified TLB by MVA, all ASID */ -#if __ARM_ARCH >= 7 && defined SMP -_WF1(_CP15_TLBIMVAAIS, CP15_TLBIMVAAIS(%0)) /* Invalidate unified TLB by MVA, all ASID IS */ -#endif -_WF1(_CP15_TLBIMVA, CP15_TLBIMVA(%0)) /* Invalidate unified TLB by MVA */ - -_WF1(_CP15_TTB_SET, CP15_TTBR0(%0)) - -/* Cache and Branch predictor */ - -_WF0(_CP15_BPIALL, CP15_BPIALL) /* Branch predictor invalidate all */ -#if __ARM_ARCH >= 7 && defined SMP -_WF0(_CP15_BPIALLIS, CP15_BPIALLIS) /* Branch predictor invalidate all IS */ -#endif -_WF1(_CP15_BPIMVA, CP15_BPIMVA(%0)) /* Branch predictor invalidate by MVA */ -_WF1(_CP15_DCCIMVAC, CP15_DCCIMVAC(%0)) /* Data cache clean and invalidate by MVA PoC */ -_WF1(_CP15_DCCISW, CP15_DCCISW(%0)) /* Data cache clean and invalidate by set/way */ -_WF1(_CP15_DCCMVAC, CP15_DCCMVAC(%0)) /* Data cache clean by MVA PoC */ -#if __ARM_ARCH >= 7 -_WF1(_CP15_DCCMVAU, CP15_DCCMVAU(%0)) /* Data cache clean by MVA PoU */ -#endif -_WF1(_CP15_DCCSW, CP15_DCCSW(%0)) /* Data cache clean by set/way */ -_WF1(_CP15_DCIMVAC, CP15_DCIMVAC(%0)) /* Data cache invalidate by MVA PoC */ -_WF1(_CP15_DCISW, CP15_DCISW(%0)) /* Data cache invalidate by set/way */ -_WF0(_CP15_ICIALLU, CP15_ICIALLU) /* Instruction cache invalidate all PoU */ -#if __ARM_ARCH >= 7 && defined SMP -_WF0(_CP15_ICIALLUIS, CP15_ICIALLUIS) /* Instruction cache invalidate all PoU IS */ -#endif -_WF1(_CP15_ICIMVAU, CP15_ICIMVAU(%0)) /* Instruction cache invalidate */ /* * Publicly accessible functions */ -/* CP14 Debug Registers */ -_RF0(cp14_dbgdidr_get, CP14_DBGDIDR(%0)) -_RF0(cp14_dbgprsr_get, CP14_DBGPRSR(%0)) -_RF0(cp14_dbgoslsr_get, CP14_DBGOSLSR(%0)) -_RF0(cp14_dbgosdlr_get, CP14_DBGOSDLR(%0)) -_RF0(cp14_dbgdscrint_get, CP14_DBGDSCRint(%0)) - -_WF1(cp14_dbgdscr_v6_set, CP14_DBGDSCRext_V6(%0)) -_WF1(cp14_dbgdscr_v7_set, CP14_DBGDSCRext_V7(%0)) -_WF1(cp14_dbgvcr_set, CP14_DBGVCR(%0)) -_WF1(cp14_dbgoslar_set, CP14_DBGOSLAR(%0)) /* Various control registers */ _RF0(cp15_cpacr_get, CP15_CPACR(%0)) _WF1(cp15_cpacr_set, CP15_CPACR(%0)) _RF0(cp15_dfsr_get, CP15_DFSR(%0)) -_RF0(cp15_ifsr_get, CP15_IFSR(%0)) -_WF1(cp15_prrr_set, CP15_PRRR(%0)) -_WF1(cp15_nmrr_set, CP15_NMRR(%0)) _RF0(cp15_ttbr_get, CP15_TTBR0(%0)) _RF0(cp15_dfar_get, CP15_DFAR(%0)) -#if __ARM_ARCH >= 7 -_RF0(cp15_ifar_get, CP15_IFAR(%0)) -_RF0(cp15_l2ctlr_get, CP15_L2CTLR(%0)) -#endif -/* ARMv6+ and XScale */ +/* XScale */ _RF0(cp15_actlr_get, CP15_ACTLR(%0)) _WF1(cp15_actlr_set, CP15_ACTLR(%0)) -#if __ARM_ARCH >= 6 -_WF1(cp15_ats1cpr_set, CP15_ATS1CPR(%0)) -_WF1(cp15_ats1cpw_set, CP15_ATS1CPW(%0)) -_RF0(cp15_par_get, CP15_PAR(%0)) -_RF0(cp15_sctlr_get, CP15_SCTLR(%0)) -#endif /*CPU id registers */ _RF0(cp15_midr_get, CP15_MIDR(%0)) _RF0(cp15_ctr_get, CP15_CTR(%0)) _RF0(cp15_tcmtr_get, CP15_TCMTR(%0)) _RF0(cp15_tlbtr_get, CP15_TLBTR(%0)) -_RF0(cp15_mpidr_get, CP15_MPIDR(%0)) -_RF0(cp15_revidr_get, CP15_REVIDR(%0)) -_RF0(cp15_ccsidr_get, CP15_CCSIDR(%0)) -_RF0(cp15_clidr_get, CP15_CLIDR(%0)) -_RF0(cp15_aidr_get, CP15_AIDR(%0)) -_WF1(cp15_csselr_set, CP15_CSSELR(%0)) -_RF0(cp15_id_pfr0_get, CP15_ID_PFR0(%0)) -_RF0(cp15_id_pfr1_get, CP15_ID_PFR1(%0)) -_RF0(cp15_id_dfr0_get, CP15_ID_DFR0(%0)) -_RF0(cp15_id_afr0_get, CP15_ID_AFR0(%0)) -_RF0(cp15_id_mmfr0_get, CP15_ID_MMFR0(%0)) -_RF0(cp15_id_mmfr1_get, CP15_ID_MMFR1(%0)) -_RF0(cp15_id_mmfr2_get, CP15_ID_MMFR2(%0)) -_RF0(cp15_id_mmfr3_get, CP15_ID_MMFR3(%0)) -_RF0(cp15_id_isar0_get, CP15_ID_ISAR0(%0)) -_RF0(cp15_id_isar1_get, CP15_ID_ISAR1(%0)) -_RF0(cp15_id_isar2_get, CP15_ID_ISAR2(%0)) -_RF0(cp15_id_isar3_get, CP15_ID_ISAR3(%0)) -_RF0(cp15_id_isar4_get, CP15_ID_ISAR4(%0)) -_RF0(cp15_id_isar5_get, CP15_ID_ISAR5(%0)) -_RF0(cp15_cbar_get, CP15_CBAR(%0)) - -/* Performance Monitor registers */ - -#if __ARM_ARCH == 6 && defined(CPU_ARM1176) -_RF0(cp15_pmuserenr_get, CP15_PMUSERENR(%0)) -_WF1(cp15_pmuserenr_set, CP15_PMUSERENR(%0)) -_RF0(cp15_pmcr_get, CP15_PMCR(%0)) -_WF1(cp15_pmcr_set, CP15_PMCR(%0)) -_RF0(cp15_pmccntr_get, CP15_PMCCNTR(%0)) -_WF1(cp15_pmccntr_set, CP15_PMCCNTR(%0)) -#elif __ARM_ARCH > 6 -_RF0(cp15_pmcr_get, CP15_PMCR(%0)) -_WF1(cp15_pmcr_set, CP15_PMCR(%0)) -_RF0(cp15_pmcnten_get, CP15_PMCNTENSET(%0)) -_WF1(cp15_pmcnten_set, CP15_PMCNTENSET(%0)) -_WF1(cp15_pmcnten_clr, CP15_PMCNTENCLR(%0)) -_RF0(cp15_pmovsr_get, CP15_PMOVSR(%0)) -_WF1(cp15_pmovsr_set, CP15_PMOVSR(%0)) -_WF1(cp15_pmswinc_set, CP15_PMSWINC(%0)) -_RF0(cp15_pmselr_get, CP15_PMSELR(%0)) -_WF1(cp15_pmselr_set, CP15_PMSELR(%0)) -_RF0(cp15_pmccntr_get, CP15_PMCCNTR(%0)) -_WF1(cp15_pmccntr_set, CP15_PMCCNTR(%0)) -_RF0(cp15_pmxevtyper_get, CP15_PMXEVTYPER(%0)) -_WF1(cp15_pmxevtyper_set, CP15_PMXEVTYPER(%0)) -_RF0(cp15_pmxevcntr_get, CP15_PMXEVCNTRR(%0)) -_WF1(cp15_pmxevcntr_set, CP15_PMXEVCNTRR(%0)) -_RF0(cp15_pmuserenr_get, CP15_PMUSERENR(%0)) -_WF1(cp15_pmuserenr_set, CP15_PMUSERENR(%0)) -_RF0(cp15_pminten_get, CP15_PMINTENSET(%0)) -_WF1(cp15_pminten_set, CP15_PMINTENSET(%0)) -_WF1(cp15_pminten_clr, CP15_PMINTENCLR(%0)) -#endif - -_RF0(cp15_tpidrurw_get, CP15_TPIDRURW(%0)) -_WF1(cp15_tpidrurw_set, CP15_TPIDRURW(%0)) -_RF0(cp15_tpidruro_get, CP15_TPIDRURO(%0)) -_WF1(cp15_tpidruro_set, CP15_TPIDRURO(%0)) -_RF0(cp15_tpidrpwr_get, CP15_TPIDRPRW(%0)) -_WF1(cp15_tpidrpwr_set, CP15_TPIDRPRW(%0)) - -/* Generic Timer registers - only use when you know the hardware is available */ -_RF0(cp15_cntfrq_get, CP15_CNTFRQ(%0)) -_WF1(cp15_cntfrq_set, CP15_CNTFRQ(%0)) -_RF0(cp15_cntkctl_get, CP15_CNTKCTL(%0)) -_WF1(cp15_cntkctl_set, CP15_CNTKCTL(%0)) -_RF0(cp15_cntp_tval_get, CP15_CNTP_TVAL(%0)) -_WF1(cp15_cntp_tval_set, CP15_CNTP_TVAL(%0)) -_RF0(cp15_cntp_ctl_get, CP15_CNTP_CTL(%0)) -_WF1(cp15_cntp_ctl_set, CP15_CNTP_CTL(%0)) -_RF0(cp15_cntv_tval_get, CP15_CNTV_TVAL(%0)) -_WF1(cp15_cntv_tval_set, CP15_CNTV_TVAL(%0)) -_RF0(cp15_cntv_ctl_get, CP15_CNTV_CTL(%0)) -_WF1(cp15_cntv_ctl_set, CP15_CNTV_CTL(%0)) -_RF0(cp15_cnthctl_get, CP15_CNTHCTL(%0)) -_WF1(cp15_cnthctl_set, CP15_CNTHCTL(%0)) -_RF0(cp15_cnthp_tval_get, CP15_CNTHP_TVAL(%0)) -_WF1(cp15_cnthp_tval_set, CP15_CNTHP_TVAL(%0)) -_RF0(cp15_cnthp_ctl_get, CP15_CNTHP_CTL(%0)) -_WF1(cp15_cnthp_ctl_set, CP15_CNTHP_CTL(%0)) - -_R64F0(cp15_cntpct_get, CP15_CNTPCT(%Q0, %R0)) -_R64F0(cp15_cntvct_get, CP15_CNTVCT(%Q0, %R0)) -_R64F0(cp15_cntp_cval_get, CP15_CNTP_CVAL(%Q0, %R0)) -_W64F1(cp15_cntp_cval_set, CP15_CNTP_CVAL(%Q0, %R0)) -_R64F0(cp15_cntv_cval_get, CP15_CNTV_CVAL(%Q0, %R0)) -_W64F1(cp15_cntv_cval_set, CP15_CNTV_CVAL(%Q0, %R0)) -_R64F0(cp15_cntvoff_get, CP15_CNTVOFF(%Q0, %R0)) -_W64F1(cp15_cntvoff_set, CP15_CNTVOFF(%Q0, %R0)) -_R64F0(cp15_cnthp_cval_get, CP15_CNTHP_CVAL(%Q0, %R0)) -_W64F1(cp15_cnthp_cval_set, CP15_CNTHP_CVAL(%Q0, %R0)) #undef _FX #undef _RF0 #undef _WF0 #undef _WF1 -#if __ARM_ARCH >= 6 -/* - * Cache and TLB maintenance operations for armv6+ code. The #else block - * provides armv4/v5 implementations for a few of these used in common code. - */ - -/* - * TLB maintenance operations. - */ - -/* Local (i.e. not broadcasting ) operations. */ - -/* Flush all TLB entries (even global). */ -static __inline void -tlb_flush_all_local(void) -{ - - dsb(); - _CP15_TLBIALL(); - dsb(); -} - -/* Flush all not global TLB entries. */ -static __inline void -tlb_flush_all_ng_local(void) -{ - - dsb(); - _CP15_TLBIASID(CPU_ASID_KERNEL); - dsb(); -} - -/* Flush single TLB entry (even global). */ -static __inline void -tlb_flush_local(vm_offset_t va) -{ - - KASSERT((va & PAGE_MASK) == 0, ("%s: va %#x not aligned", __func__, va)); - - dsb(); - _CP15_TLBIMVA(va | CPU_ASID_KERNEL); - dsb(); -} - -/* Flush range of TLB entries (even global). */ -static __inline void -tlb_flush_range_local(vm_offset_t va, vm_size_t size) -{ - vm_offset_t eva = va + size; - - KASSERT((va & PAGE_MASK) == 0, ("%s: va %#x not aligned", __func__, va)); - KASSERT((size & PAGE_MASK) == 0, ("%s: size %#x not aligned", __func__, - size)); - - dsb(); - for (; va < eva; va += PAGE_SIZE) - _CP15_TLBIMVA(va | CPU_ASID_KERNEL); - dsb(); -} - -/* Broadcasting operations. */ -#if __ARM_ARCH >= 7 && defined SMP - -static __inline void -tlb_flush_all(void) -{ - - dsb(); - _CP15_TLBIALLIS(); - dsb(); -} - -static __inline void -tlb_flush_all_ng(void) -{ - - dsb(); - _CP15_TLBIASIDIS(CPU_ASID_KERNEL); - dsb(); -} - -static __inline void -tlb_flush(vm_offset_t va) -{ - - KASSERT((va & PAGE_MASK) == 0, ("%s: va %#x not aligned", __func__, va)); - - dsb(); - _CP15_TLBIMVAAIS(va); - dsb(); -} - -static __inline void -tlb_flush_range(vm_offset_t va, vm_size_t size) -{ - vm_offset_t eva = va + size; - - KASSERT((va & PAGE_MASK) == 0, ("%s: va %#x not aligned", __func__, va)); - KASSERT((size & PAGE_MASK) == 0, ("%s: size %#x not aligned", __func__, - size)); - - dsb(); - for (; va < eva; va += PAGE_SIZE) - _CP15_TLBIMVAAIS(va); - dsb(); -} -#else /* SMP */ - -#define tlb_flush_all() tlb_flush_all_local() -#define tlb_flush_all_ng() tlb_flush_all_ng_local() -#define tlb_flush(va) tlb_flush_local(va) -#define tlb_flush_range(va, size) tlb_flush_range_local(va, size) - -#endif /* SMP */ - -/* - * Cache maintenance operations. - */ - -/* Sync I and D caches to PoU */ -static __inline void -icache_sync(vm_offset_t va, vm_size_t size) -{ - vm_offset_t eva = va + size; - - dsb(); - va &= ~cpuinfo.dcache_line_mask; - for ( ; va < eva; va += cpuinfo.dcache_line_size) { -#if __ARM_ARCH >= 7 && defined SMP - _CP15_DCCMVAU(va); -#else - _CP15_DCCMVAC(va); -#endif - } - dsb(); -#if __ARM_ARCH >= 7 && defined SMP - _CP15_ICIALLUIS(); -#else - _CP15_ICIALLU(); -#endif - dsb(); - isb(); -} - -/* Invalidate I cache */ -static __inline void -icache_inv_all(void) -{ -#if __ARM_ARCH >= 7 && defined SMP - _CP15_ICIALLUIS(); -#else - _CP15_ICIALLU(); -#endif - dsb(); - isb(); -} - -/* Invalidate branch predictor buffer */ -static __inline void -bpb_inv_all(void) -{ -#if __ARM_ARCH >= 7 && defined SMP - _CP15_BPIALLIS(); -#else - _CP15_BPIALL(); -#endif - dsb(); - isb(); -} - -/* Write back D-cache to PoU */ -static __inline void -dcache_wb_pou(vm_offset_t va, vm_size_t size) -{ - vm_offset_t eva = va + size; - - dsb(); - va &= ~cpuinfo.dcache_line_mask; - for ( ; va < eva; va += cpuinfo.dcache_line_size) { -#if __ARM_ARCH >= 7 && defined SMP - _CP15_DCCMVAU(va); -#else - _CP15_DCCMVAC(va); -#endif - } - dsb(); -} - -/* - * Invalidate D-cache to PoC - * - * Caches are invalidated from outermost to innermost as fresh cachelines - * flow in this direction. In given range, if there was no dirty cacheline - * in any cache before, no stale cacheline should remain in them after this - * operation finishes. - */ -static __inline void -dcache_inv_poc(vm_offset_t va, vm_paddr_t pa, vm_size_t size) -{ - vm_offset_t eva = va + size; - - dsb(); - /* invalidate L2 first */ - cpu_l2cache_inv_range(pa, size); - - /* then L1 */ - va &= ~cpuinfo.dcache_line_mask; - for ( ; va < eva; va += cpuinfo.dcache_line_size) { - _CP15_DCIMVAC(va); - } - dsb(); -} - -/* - * Discard D-cache lines to PoC, prior to overwrite by DMA engine. - * - * Normal invalidation does L2 then L1 to ensure that stale data from L2 doesn't - * flow into L1 while invalidating. This routine is intended to be used only - * when invalidating a buffer before a DMA operation loads new data into memory. - * The concern in this case is that dirty lines are not evicted to main memory, - * overwriting the DMA data. For that reason, the L1 is done first to ensure - * that an evicted L1 line doesn't flow to L2 after the L2 has been cleaned. - */ -static __inline void -dcache_inv_poc_dma(vm_offset_t va, vm_paddr_t pa, vm_size_t size) -{ - vm_offset_t eva = va + size; - - /* invalidate L1 first */ - dsb(); - va &= ~cpuinfo.dcache_line_mask; - for ( ; va < eva; va += cpuinfo.dcache_line_size) { - _CP15_DCIMVAC(va); - } - dsb(); - - /* then L2 */ - cpu_l2cache_inv_range(pa, size); -} - -/* - * Write back D-cache to PoC - * - * Caches are written back from innermost to outermost as dirty cachelines - * flow in this direction. In given range, no dirty cacheline should remain - * in any cache after this operation finishes. - */ -static __inline void -dcache_wb_poc(vm_offset_t va, vm_paddr_t pa, vm_size_t size) -{ - vm_offset_t eva = va + size; - - dsb(); - va &= ~cpuinfo.dcache_line_mask; - for ( ; va < eva; va += cpuinfo.dcache_line_size) { - _CP15_DCCMVAC(va); - } - dsb(); - - cpu_l2cache_wb_range(pa, size); -} - -/* Write back and invalidate D-cache to PoC */ -static __inline void -dcache_wbinv_poc(vm_offset_t sva, vm_paddr_t pa, vm_size_t size) -{ - vm_offset_t va; - vm_offset_t eva = sva + size; - - dsb(); - /* write back L1 first */ - va = sva & ~cpuinfo.dcache_line_mask; - for ( ; va < eva; va += cpuinfo.dcache_line_size) { - _CP15_DCCMVAC(va); - } - dsb(); - - /* then write back and invalidate L2 */ - cpu_l2cache_wbinv_range(pa, size); - - /* then invalidate L1 */ - va = sva & ~cpuinfo.dcache_line_mask; - for ( ; va < eva; va += cpuinfo.dcache_line_size) { - _CP15_DCIMVAC(va); - } - dsb(); -} - -/* Set TTB0 register */ -static __inline void -cp15_ttbr_set(uint32_t reg) -{ - dsb(); - _CP15_TTB_SET(reg); - dsb(); - _CP15_BPIALL(); - dsb(); - isb(); - tlb_flush_all_ng_local(); -} - -#else /* ! __ARM_ARCH >= 6 */ /* * armv4/5 compatibility shims. @@ -617,8 +149,6 @@ dcache_wb_poc(vm_offset_t va, vm_paddr_t cpu_l2cache_wb_range(va, size); } -#endif /* __ARM_ARCH >= 6 */ - #endif /* _KERNEL */ -#endif /* !MACHINE_CPU_V6_H */ +#endif /* MACHINE_CPU_V4_H */ Modified: head/sys/arm/include/cpu-v6.h ============================================================================== --- head/sys/arm/include/cpu-v6.h Fri Feb 5 09:28:03 2016 (r295314) +++ head/sys/arm/include/cpu-v6.h Fri Feb 5 09:46:24 2016 (r295315) @@ -32,19 +32,33 @@ /* There are no user serviceable parts here, they may change without notice */ #ifndef _KERNEL #error Only include this file in the kernel -#else +#endif #include -#include "machine/atomic.h" -#include "machine/cpufunc.h" -#include "machine/cpuinfo.h" -#include "machine/sysreg.h" +#include +#include +#include +#include + +#if __ARM_ARCH < 6 +#error Only include this file for ARMv6 +#else + + #define CPU_ASID_KERNEL 0 vm_offset_t dcache_wb_pou_checked(vm_offset_t, vm_size_t); vm_offset_t icache_inv_pou_checked(vm_offset_t, vm_size_t); +#ifdef DEV_PMU +#include +#define PMU_OVSR_C 0x80000000 /* Cycle Counter */ +extern uint32_t ccnt_hi[MAXCPU]; +extern int pmu_attched; +#endif /* DEV_PMU */ + + /* * Macros to generate CP15 (system control processor) read/write functions. */ @@ -277,12 +291,6 @@ _W64F1(cp15_cnthp_cval_set, CP15_CNTHP_C #undef _WF0 #undef _WF1 -#if __ARM_ARCH >= 6 -/* - * Cache and TLB maintenance operations for armv6+ code. The #else block - * provides armv4/v5 implementations for a few of these used in common code. - */ - /* * TLB maintenance operations. */ @@ -577,48 +585,6 @@ cp15_ttbr_set(uint32_t reg) isb(); tlb_flush_all_ng_local(); } - -#else /* ! __ARM_ARCH >= 6 */ - -/* - * armv4/5 compatibility shims. - * - * These functions provide armv4 cache maintenance using the new armv6 names. - * Included here are just the functions actually used now in common code; it may - * be necessary to add things here over time. - * - * The callers of the dcache functions expect these routines to handle address - * and size values which are not aligned to cacheline boundaries; the armv4 and - * armv5 asm code handles that. - */ - -static __inline void -dcache_inv_poc(vm_offset_t va, vm_paddr_t pa, vm_size_t size) -{ - - cpu_dcache_inv_range(va, size); - cpu_l2cache_inv_range(va, size); -} - -static __inline void -dcache_inv_poc_dma(vm_offset_t va, vm_paddr_t pa, vm_size_t size) -{ - - /* See armv6 code, above, for why we do L2 before L1 in this case. */ - cpu_l2cache_inv_range(va, size); - cpu_dcache_inv_range(va, size); -} - -static __inline void -dcache_wb_poc(vm_offset_t va, vm_paddr_t pa, vm_size_t size) -{ - - cpu_dcache_wb_range(va, size); - cpu_l2cache_wb_range(va, size); -} - -#endif /* __ARM_ARCH >= 6 */ - #endif /* _KERNEL */ #endif /* !MACHINE_CPU_V6_H */ Modified: head/sys/arm/include/cpu.h ============================================================================== --- head/sys/arm/include/cpu.h Fri Feb 5 09:28:03 2016 (r295314) +++ head/sys/arm/include/cpu.h Fri Feb 5 09:46:24 2016 (r295315) @@ -14,12 +14,8 @@ void swi_vm(void *); #ifdef _KERNEL #if __ARM_ARCH >= 6 #include -#ifdef DEV_PMU -#include -#define PMU_OVSR_C 0x80000000 /* Cycle Counter */ -extern uint32_t ccnt_hi[MAXCPU]; -extern int pmu_attched; -#endif /* DEV_PMU */ +#else +#include #endif /* __ARM_ARCH >= 6 */ static __inline uint64_t From owner-svn-src-all@freebsd.org Fri Feb 5 10:25:38 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB0B3A77F90; Fri, 5 Feb 2016 10:25:38 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BB0768F; Fri, 5 Feb 2016 10:25:38 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1aRda4-000FH7-JC; Fri, 05 Feb 2016 13:25:36 +0300 Date: Fri, 5 Feb 2016 13:25:36 +0300 From: Slawa Olhovchenkov To: Bryan Drewery Cc: Dag-Erling =?utf-8?B?U23DuHJncmF2?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r294560 - head/etc/rc.d Message-ID: <20160205102536.GY37895@zxy.spb.ru> References: <201601221214.u0MCE8Jk054031@repo.freebsd.org> <56B3DE8E.9020603@FreeBSD.org> <56B3E55F.3040004@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <56B3E55F.3040004@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 10:25:39 -0000 On Thu, Feb 04, 2016 at 03:57:19PM -0800, Bryan Drewery wrote: > On 2/4/2016 3:28 PM, Bryan Drewery wrote: > > On 1/22/2016 4:14 AM, Dag-Erling Smørgrav wrote: > >> Author: des > >> Date: Fri Jan 22 12:14:08 2016 > >> New Revision: 294560 > >> URL: https://svnweb.freebsd.org/changeset/base/294560 > >> > >> Log: > >> Do not generate RSA1 or DSA keys by default. > >> > >> Modified: > >> head/etc/rc.d/sshd > >> > >> Modified: head/etc/rc.d/sshd > >> ============================================================================== > >> --- head/etc/rc.d/sshd Fri Jan 22 12:00:56 2016 (r294559) > >> +++ head/etc/rc.d/sshd Fri Jan 22 12:14:08 2016 (r294560) > >> @@ -20,9 +20,9 @@ configtest_cmd="sshd_configtest" > >> pidfile="/var/run/${name}.pid" > >> extra_commands="configtest keygen reload" > >> > >> -: ${sshd_rsa1_enable:="yes"} > >> +: ${sshd_rsa1_enable:="no"} > >> : ${sshd_rsa_enable:="yes"} > >> -: ${sshd_dsa_enable:="yes"} > >> +: ${sshd_dsa_enable:="no"} > >> : ${sshd_ecdsa_enable:="yes"} > >> : ${sshd_ed25519_enable:="yes"} > >> > >> > > > > I think perhaps you should also remove these as having default paths in > > the .c as well and require they be enabled in the config. Otherwise a > > warning is given: > > > > Feb 4 15:25:22 VM sshd[874]: error: Could not load host key: > > /etc/ssh/ssh_host_dsa_key > > This happens on every login even. It's quite annoying. And no login too. From owner-svn-src-all@freebsd.org Fri Feb 5 10:40:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5257BA9C3A6; Fri, 5 Feb 2016 10:40:03 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07AF5B63; Fri, 5 Feb 2016 10:40:02 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u15Ae1PA065154; Fri, 5 Feb 2016 10:40:01 GMT (envelope-from skra@FreeBSD.org) Received: (from skra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u15Ae18K065153; Fri, 5 Feb 2016 10:40:01 GMT (envelope-from skra@FreeBSD.org) Message-Id: <201602051040.u15Ae18K065153@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skra set sender to skra@FreeBSD.org using -f From: Svatopluk Kraus Date: Fri, 5 Feb 2016 10:40:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295316 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 10:40:03 -0000 Author: skra Date: Fri Feb 5 10:40:01 2016 New Revision: 295316 URL: https://svnweb.freebsd.org/changeset/base/295316 Log: Follow up r295257 and convert also pt_memattr. This did not break anything as both VM_MEMATTR_WB_WA and PTE2_ATTR_WB_WA are zero. Correct also type of pmap_dcache_wb_pou() last argument. Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Fri Feb 5 09:46:24 2016 (r295315) +++ head/sys/arm/arm/pmap-v6.c Fri Feb 5 10:40:01 2016 (r295316) @@ -3,8 +3,8 @@ * Copyright (c) 1994 John S. Dyson * Copyright (c) 1994 David Greenman * Copyright (c) 2005-2010 Alan L. Cox - * Copyright (c) 2014 Svatopluk Kraus - * Copyright (c) 2014 Michal Meloun + * Copyright (c) 2014-2016 Svatopluk Kraus + * Copyright (c) 2014-2016 Michal Meloun * All rights reserved. * * This code is derived from software contributed to Berkeley by @@ -223,9 +223,10 @@ int pmap_debug_level = 1; * PTE2 descriptors creation macros. */ #define PTE2_TEX_DEFAULT memattr_to_tex2(VM_MEMATTR_DEFAULT) +#define PTE2_TEX_PT memattr_to_tex2(pt_memattr) -#define PTE2_KPT(pa) PTE2_KERN(pa, PTE2_AP_KRW, pt_memattr) -#define PTE2_KPT_NG(pa) PTE2_KERN_NG(pa, PTE2_AP_KRW, pt_memattr) +#define PTE2_KPT(pa) PTE2_KERN(pa, PTE2_AP_KRW, PTE2_TEX_PT) +#define PTE2_KPT_NG(pa) PTE2_KERN_NG(pa, PTE2_AP_KRW, PTE2_TEX_PT) #define PTE2_KRW(pa) PTE2_KERN(pa, PTE2_AP_KRW, PTE2_TEX_DEFAULT) #define PTE2_KRO(pa) PTE2_KERN(pa, PTE2_AP_KR, PTE2_TEX_DEFAULT) @@ -6071,7 +6072,7 @@ pmap_set_pcb_pagedir(pmap_t pmap, struct * The range must be within a single page. */ static void -pmap_dcache_wb_pou(vm_paddr_t pa, vm_size_t size, vm_memattr_t ma) +pmap_dcache_wb_pou(vm_paddr_t pa, vm_size_t size, uint32_t attr) { struct sysmaps *sysmaps; @@ -6083,7 +6084,7 @@ pmap_dcache_wb_pou(vm_paddr_t pa, vm_siz mtx_lock(&sysmaps->lock); if (*sysmaps->CMAP3) panic("%s: CMAP3 busy", __func__); - pte2_store(sysmaps->CMAP3, PTE2_KERN_NG(pa, PTE2_AP_KRW, ma)); + pte2_store(sysmaps->CMAP3, PTE2_KERN_NG(pa, PTE2_AP_KRW, attr)); dcache_wb_pou((vm_offset_t)sysmaps->CADDR3 + (pa & PAGE_MASK), size); pte2_clear(sysmaps->CMAP3); tlb_flush((vm_offset_t)sysmaps->CADDR3); From owner-svn-src-all@freebsd.org Fri Feb 5 11:28:37 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 429A5A765B7; Fri, 5 Feb 2016 11:28:37 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19D2782E; Fri, 5 Feb 2016 11:28:37 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u15BSaqc080112; Fri, 5 Feb 2016 11:28:36 GMT (envelope-from skra@FreeBSD.org) Received: (from skra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u15BSa26080111; Fri, 5 Feb 2016 11:28:36 GMT (envelope-from skra@FreeBSD.org) Message-Id: <201602051128.u15BSa26080111@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skra set sender to skra@FreeBSD.org using -f From: Svatopluk Kraus Date: Fri, 5 Feb 2016 11:28:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295317 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 11:28:37 -0000 Author: skra Date: Fri Feb 5 11:28:35 2016 New Revision: 295317 URL: https://svnweb.freebsd.org/changeset/base/295317 Log: Follow up r295257 and replace bad reference to TEX in defines, variables and functions. This stuff is named properly now. Thus, the VM_MEMATTR_xxx is an index to PTE2 attribute table. Pointy hat to: skra Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Fri Feb 5 10:40:01 2016 (r295316) +++ head/sys/arm/arm/pmap-v6.c Fri Feb 5 11:28:35 2016 (r295317) @@ -222,14 +222,14 @@ int pmap_debug_level = 1; /* * PTE2 descriptors creation macros. */ -#define PTE2_TEX_DEFAULT memattr_to_tex2(VM_MEMATTR_DEFAULT) -#define PTE2_TEX_PT memattr_to_tex2(pt_memattr) +#define PTE2_ATTR_DEFAULT vm_memattr_to_pte2(VM_MEMATTR_DEFAULT) +#define PTE2_ATTR_PT vm_memattr_to_pte2(pt_memattr) -#define PTE2_KPT(pa) PTE2_KERN(pa, PTE2_AP_KRW, PTE2_TEX_PT) -#define PTE2_KPT_NG(pa) PTE2_KERN_NG(pa, PTE2_AP_KRW, PTE2_TEX_PT) +#define PTE2_KPT(pa) PTE2_KERN(pa, PTE2_AP_KRW, PTE2_ATTR_PT) +#define PTE2_KPT_NG(pa) PTE2_KERN_NG(pa, PTE2_AP_KRW, PTE2_ATTR_PT) -#define PTE2_KRW(pa) PTE2_KERN(pa, PTE2_AP_KRW, PTE2_TEX_DEFAULT) -#define PTE2_KRO(pa) PTE2_KERN(pa, PTE2_AP_KR, PTE2_TEX_DEFAULT) +#define PTE2_KRW(pa) PTE2_KERN(pa, PTE2_AP_KRW, PTE2_ATTR_DEFAULT) +#define PTE2_KRO(pa) PTE2_KERN(pa, PTE2_AP_KR, PTE2_ATTR_DEFAULT) #define PV_STATS #ifdef PV_STATS @@ -397,7 +397,7 @@ static uint32_t tex_class[8] = { }; #undef TEX -static uint32_t tex_attr2[8] = { +static uint32_t pte2_attr_tab[8] = { PTE2_ATTR_WB_WA, /* 0 - VM_MEMATTR_WB_WA */ PTE2_ATTR_NOCACHE, /* 1 - VM_MEMATTR_NOCACHE */ PTE2_ATTR_DEVICE, /* 2 - VM_MEMATTR_DEVICE */ @@ -414,18 +414,18 @@ CTASSERT(VM_MEMATTR_SO == 3); CTASSERT(VM_MEMATTR_WRITE_THROUGH == 4); static inline uint32_t -memattr_to_tex2(vm_memattr_t ma) +vm_memattr_to_pte2(vm_memattr_t ma) { - KASSERT(ma < 5, ("%s: bad vm_memattr_t %d", __func__, ma)); - return (tex_attr2[(u_int)ma]); + KASSERT((u_int)ma < 5, ("%s: bad vm_memattr_t %d", __func__, ma)); + return (pte2_attr_tab[(u_int)ma]); } static inline uint32_t -page_tex2(vm_page_t m) +vm_page_pte2_attr(vm_page_t m) { - return (memattr_to_tex2(m->md.pat_mode)); + return (vm_memattr_to_pte2(m->md.pat_mode)); } /* @@ -805,7 +805,7 @@ pmap_bootstrap_prepare(vm_paddr_t last) pte1_store(pte1p++, PTE1_LINK(pa)); /* Make section mappings for kernel. */ - l1_attr = ATTR_TO_L1(PTE2_TEX_DEFAULT); + l1_attr = ATTR_TO_L1(PTE2_ATTR_DEFAULT); pte1p = kern_pte1(KERNBASE); for (pa = KERNEL_V2P(KERNBASE); pa < last; pa += PTE1_SIZE) pte1_store(pte1p++, PTE1_KERN(pa, PTE1_AP_KRW, l1_attr)); @@ -1022,7 +1022,7 @@ pmap_preboot_map_attr(vm_paddr_t pa, vm_ pt2_entry_t *pte2p; l2_prot = prot & VM_PROT_WRITE ? PTE2_AP_KRW : PTE2_AP_KR; - l2_attr = memattr_to_tex2(attr); + l2_attr = vm_memattr_to_pte2(attr); l1_prot = ATTR_TO_L1(l2_prot); l1_attr = ATTR_TO_L1(l2_attr); @@ -1277,7 +1277,7 @@ PMAP_INLINE void pmap_kenter(vm_offset_t va, vm_paddr_t pa) { - pmap_kenter_prot_attr(va, pa, PTE2_AP_KRW, PTE2_TEX_DEFAULT); + pmap_kenter_prot_attr(va, pa, PTE2_AP_KRW, PTE2_ATTR_DEFAULT); } /* @@ -1360,7 +1360,7 @@ pmap_map(vm_offset_t *virt, vm_paddr_t s l2prot |= (prot & VM_PROT_EXECUTE) ? PTE2_X : PTE2_NX; l1prot = ATTR_TO_L1(l2prot); - l2attr = PTE2_TEX_DEFAULT; + l2attr = PTE2_ATTR_DEFAULT; l1attr = ATTR_TO_L1(l2attr); va = *virt; @@ -1594,7 +1594,8 @@ pmap_pt2pg_zero(vm_page_t m) mtx_lock(&sysmaps->lock); if (pte2_load(sysmaps->CMAP2) != 0) panic("%s: CMAP2 busy", __func__); - pte2_store(sysmaps->CMAP2, PTE2_KERN_NG(pa, PTE2_AP_KRW, page_tex2(m))); + pte2_store(sysmaps->CMAP2, PTE2_KERN_NG(pa, PTE2_AP_KRW, + vm_page_pte2_attr(m))); /* Even VM_ALLOC_ZERO request is only advisory. */ if ((m->flags & PG_ZERO) == 0) pagezero(sysmaps->CADDR2); @@ -1749,10 +1750,10 @@ pmap_qenter(vm_offset_t sva, vm_page_t * pa = VM_PAGE_TO_PHYS(m); pte2 = pte2_load(pte2p); if ((pte2_pa(pte2) != pa) || - (pte2_attr(pte2) != page_tex2(m))) { + (pte2_attr(pte2) != vm_page_pte2_attr(m))) { anychanged++; pte2_store(pte2p, PTE2_KERN(pa, PTE2_AP_KRW, - page_tex2(m))); + vm_page_pte2_attr(m))); } pte2p++; } @@ -3802,7 +3803,7 @@ validate: /* * Now validate mapping with desired protection/wiring. */ - npte2 = PTE2(pa, PTE2_NM, page_tex2(m)); + npte2 = PTE2(pa, PTE2_NM, vm_page_pte2_attr(m)); if (prot & VM_PROT_WRITE) { if (pte2_is_managed(npte2)) vm_page_aflag_set(m, PGA_WRITEABLE); @@ -4449,7 +4450,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ */ cache_icache_sync_fresh(va, pa, PAGE_SIZE); } - pte2_store(pte2p, PTE2(pa, l2prot, page_tex2(m))); + pte2_store(pte2p, PTE2(pa, l2prot, vm_page_pte2_attr(m))); return (mpt2pg); } @@ -4520,7 +4521,7 @@ pmap_enter_pte1(pmap_t pmap, vm_offset_t */ cache_icache_sync_fresh(va, pa, PTE1_SIZE); } - pte1_store(pte1p, PTE1(pa, l1prot, ATTR_TO_L1(page_tex2(m)))); + pte1_store(pte1p, PTE1(pa, l1prot, ATTR_TO_L1(vm_page_pte2_attr(m)))); pmap_pte1_mappings++; CTR3(KTR_PMAP, "%s: success for va %#lx in pmap %p", __func__, va, @@ -4630,7 +4631,7 @@ pmap_object_init_pt(pmap_t pmap, vm_offs * is done here, so readonly mapping must be done elsewhere. */ l1prot = PTE1_U | PTE1_NG | PTE1_RW | PTE1_M | PTE1_A; - l1attr = ATTR_TO_L1(memattr_to_tex2(pat_mode)); + l1attr = ATTR_TO_L1(vm_memattr_to_pte2(pat_mode)); PMAP_LOCK(pmap); for (pa = pte2_pa; pa < pte2_pa + size; pa += PTE1_SIZE) { pte1p = pmap_pte1(pmap, addr); @@ -5525,7 +5526,7 @@ pmap_page_set_memattr(vm_page_t m, vm_me if (*sysmaps->CMAP2) panic("%s: CMAP2 busy", __func__); pte2_store(sysmaps->CMAP2, PTE2_KERN_NG(pa, PTE2_AP_KRW, - memattr_to_tex2(ma))); + vm_memattr_to_pte2(ma))); dcache_wbinv_poc((vm_offset_t)sysmaps->CADDR2, pa, PAGE_SIZE); pte2_clear(sysmaps->CMAP2); tlb_flush((vm_offset_t)sysmaps->CADDR2); @@ -5616,7 +5617,7 @@ pmap_zero_page(vm_page_t m) if (pte2_load(sysmaps->CMAP2) != 0) panic("%s: CMAP2 busy", __func__); pte2_store(sysmaps->CMAP2, PTE2_KERN_NG(VM_PAGE_TO_PHYS(m), PTE2_AP_KRW, - page_tex2(m))); + vm_page_pte2_attr(m))); pagezero(sysmaps->CADDR2); pte2_clear(sysmaps->CMAP2); tlb_flush((vm_offset_t)sysmaps->CADDR2); @@ -5641,7 +5642,7 @@ pmap_zero_page_area(vm_page_t m, int off if (pte2_load(sysmaps->CMAP2) != 0) panic("%s: CMAP2 busy", __func__); pte2_store(sysmaps->CMAP2, PTE2_KERN_NG(VM_PAGE_TO_PHYS(m), PTE2_AP_KRW, - page_tex2(m))); + vm_page_pte2_attr(m))); if (off == 0 && size == PAGE_SIZE) pagezero(sysmaps->CADDR2); else @@ -5666,7 +5667,7 @@ pmap_zero_page_idle(vm_page_t m) panic("%s: CMAP3 busy", __func__); sched_pin(); pte2_store(CMAP3, PTE2_KERN_NG(VM_PAGE_TO_PHYS(m), PTE2_AP_KRW, - page_tex2(m))); + vm_page_pte2_attr(m))); pagezero(CADDR3); pte2_clear(CMAP3); tlb_flush((vm_offset_t)CADDR3); @@ -5692,9 +5693,9 @@ pmap_copy_page(vm_page_t src, vm_page_t if (pte2_load(sysmaps->CMAP2) != 0) panic("%s: CMAP2 busy", __func__); pte2_store(sysmaps->CMAP1, PTE2_KERN_NG(VM_PAGE_TO_PHYS(src), - PTE2_AP_KR | PTE2_NM, page_tex2(src))); + PTE2_AP_KR | PTE2_NM, vm_page_pte2_attr(src))); pte2_store(sysmaps->CMAP2, PTE2_KERN_NG(VM_PAGE_TO_PHYS(dst), - PTE2_AP_KRW, page_tex2(dst))); + PTE2_AP_KRW, vm_page_pte2_attr(dst))); bcopy(sysmaps->CADDR1, sysmaps->CADDR2, PAGE_SIZE); pte2_clear(sysmaps->CMAP1); tlb_flush((vm_offset_t)sysmaps->CADDR1); @@ -5731,10 +5732,10 @@ pmap_copy_pages(vm_page_t ma[], vm_offse b_pg_offset = b_offset & PAGE_MASK; cnt = min(cnt, PAGE_SIZE - b_pg_offset); pte2_store(sysmaps->CMAP1, PTE2_KERN_NG(VM_PAGE_TO_PHYS(a_pg), - PTE2_AP_KR | PTE2_NM, page_tex2(a_pg))); + PTE2_AP_KR | PTE2_NM, vm_page_pte2_attr(a_pg))); tlb_flush_local((vm_offset_t)sysmaps->CADDR1); pte2_store(sysmaps->CMAP2, PTE2_KERN_NG(VM_PAGE_TO_PHYS(b_pg), - PTE2_AP_KRW, page_tex2(b_pg))); + PTE2_AP_KRW, vm_page_pte2_attr(b_pg))); tlb_flush_local((vm_offset_t)sysmaps->CADDR2); a_cp = sysmaps->CADDR1 + a_pg_offset; b_cp = sysmaps->CADDR2 + b_pg_offset; @@ -5764,7 +5765,7 @@ pmap_quick_enter_page(vm_page_t m) KASSERT(pte2_load(pte2p) == 0, ("%s: PTE2 busy", __func__)); pte2_store(pte2p, PTE2_KERN_NG(VM_PAGE_TO_PHYS(m), PTE2_AP_KRW, - page_tex2(m))); + vm_page_pte2_attr(m))); return (qmap_addr); } @@ -6032,7 +6033,7 @@ pmap_kenter_device(vm_offset_t va, vm_si ("%s: device mapping not page-sized", __func__)); sva = va; - l2attr = memattr_to_tex2(VM_MEMATTR_DEVICE); + l2attr = vm_memattr_to_pte2(VM_MEMATTR_DEVICE); while (size != 0) { pmap_kenter_prot_attr(va, pa, PTE2_AP_KRW, l2attr); va += PAGE_SIZE; @@ -6108,7 +6109,7 @@ cache_icache_sync_fresh(vm_offset_t va, m = PHYS_TO_VM_PAGE(pa); KASSERT(m != NULL, ("%s: vm_page_t is null for %#x", __func__, pa)); - pmap_dcache_wb_pou(pa, len, page_tex2(m)); + pmap_dcache_wb_pou(pa, len, vm_page_pte2_attr(m)); } /* * I-cache is VIPT. Only way how to flush all virtual mappings @@ -6136,7 +6137,7 @@ pmap_sync_icache(pmap_t pmap, vm_offset_ m = PHYS_TO_VM_PAGE(pa); KASSERT(m != NULL, ("%s: vm_page_t is null for %#x", __func__, pa)); - pmap_dcache_wb_pou(pa, len, page_tex2(m)); + pmap_dcache_wb_pou(pa, len, vm_page_pte2_attr(m)); } } /* @@ -6333,7 +6334,7 @@ pmap_zero_page_check(vm_page_t m) if (pte2_load(sysmaps->CMAP2) != 0) panic("%s: CMAP2 busy", __func__); pte2_store(sysmaps->CMAP2, PTE2_KERN_NG(VM_PAGE_TO_PHYS(m), PTE2_AP_KRW, - page_tex2(m))); + vm_page_pte2_attr(m))); end = (uint32_t*)(sysmaps->CADDR2 + PAGE_SIZE); for (p = (uint32_t*)sysmaps->CADDR2; p < end; p++) if (*p != 0) From owner-svn-src-all@freebsd.org Fri Feb 5 14:16:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B0D2A768D4; Fri, 5 Feb 2016 14:16:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BE97F05; Fri, 5 Feb 2016 14:16:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u15EGhcK032181; Fri, 5 Feb 2016 14:16:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u15EGhsK032180; Fri, 5 Feb 2016 14:16:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201602051416.u15EGhsK032180@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 5 Feb 2016 14:16:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r295318 - stable/9/etc/periodic/daily X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 14:16:44 -0000 Author: mav Date: Fri Feb 5 14:16:42 2016 New Revision: 295318 URL: https://svnweb.freebsd.org/changeset/base/295318 Log: MFC r292313 (by lidl): Skip unavailable pools when running zfs pool scrubs Modified: stable/9/etc/periodic/daily/800.scrub-zfs Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) Modified: stable/9/etc/periodic/daily/800.scrub-zfs ============================================================================== --- stable/9/etc/periodic/daily/800.scrub-zfs Fri Feb 5 11:28:35 2016 (r295317) +++ stable/9/etc/periodic/daily/800.scrub-zfs Fri Feb 5 14:16:42 2016 (r295318) @@ -43,6 +43,10 @@ case "$daily_scrub_zfs_enable" in rc=3 echo "Skipping faulted pool: ${pool}" continue ;; + *UNAVAIL*) + rc=4 + echo "Skipping unavailable pool: ${pool}" + continue ;; esac # determine how many days shall be between scrubs From owner-svn-src-all@freebsd.org Fri Feb 5 14:57:45 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EB88A9A92F; Fri, 5 Feb 2016 14:57:45 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38E3983C; Fri, 5 Feb 2016 14:57:45 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u15EviAU044772; Fri, 5 Feb 2016 14:57:44 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u15EvgO1044749; Fri, 5 Feb 2016 14:57:42 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201602051457.u15EvgO1044749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Fri, 5 Feb 2016 14:57:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295319 - in head/sys: arm/allwinner/a20 arm/altera/socfpga arm/amlogic/aml8726 arm/arm arm/broadcom/bcm2835 arm/freescale/imx arm/include arm/mv/armada38x arm/mv/armadaxp arm/rockchip ... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 14:57:45 -0000 Author: mmel Date: Fri Feb 5 14:57:41 2016 New Revision: 295319 URL: https://svnweb.freebsd.org/changeset/base/295319 Log: ARM: Use new ARMv6 naming conventions for cache and TLB functions in all but ARMv4 specific files. Expand ARMv6 compatibility stubs in cpu-v4.h. Use physical address in L2 cache functions if ARM_L2_PIPT is defined. Modified: head/sys/arm/allwinner/a20/a20_mp.c head/sys/arm/altera/socfpga/socfpga_mp.c head/sys/arm/amlogic/aml8726/aml8726_mp.c head/sys/arm/arm/db_interface.c head/sys/arm/arm/dump_machdep.c head/sys/arm/arm/fiq.c head/sys/arm/arm/machdep.c head/sys/arm/arm/minidump_machdep.c head/sys/arm/arm/mp_machdep.c head/sys/arm/arm/sys_machdep.c head/sys/arm/broadcom/bcm2835/bcm2836_mp.c head/sys/arm/freescale/imx/imx6_mp.c head/sys/arm/include/cpu-v4.h head/sys/arm/include/cpu-v6.h head/sys/arm/include/cpufunc.h head/sys/arm/include/kdb.h head/sys/arm/mv/armada38x/pmsu.c head/sys/arm/mv/armadaxp/armadaxp_mp.c head/sys/arm/rockchip/rk30xx_mp.c head/sys/arm/samsung/exynos/exynos5_mp.c head/sys/arm/ti/omap4/omap4_mp.c head/sys/arm/xilinx/zy7_mp.c head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Modified: head/sys/arm/allwinner/a20/a20_mp.c ============================================================================== --- head/sys/arm/allwinner/a20/a20_mp.c Fri Feb 5 14:16:42 2016 (r295318) +++ head/sys/arm/allwinner/a20/a20_mp.c Fri Feb 5 14:57:41 2016 (r295319) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -101,8 +102,7 @@ platform_mp_start_ap(void) &cpucfg) != 0) panic("Couldn't map the CPUCFG\n"); - cpu_idcache_wbinv_all(); - cpu_l2cache_wbinv_all(); + dcache_wbinv_poc_all(); bus_space_write_4(fdtbus_bs_tag, cpucfg, CPUCFG_P_REG0, pmap_kextract((vm_offset_t)mpentry)); Modified: head/sys/arm/altera/socfpga/socfpga_mp.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_mp.c Fri Feb 5 14:16:42 2016 (r295318) +++ head/sys/arm/altera/socfpga/socfpga_mp.c Fri Feb 5 14:57:41 2016 (r295319) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -162,8 +163,7 @@ platform_mp_start_ap(void) bus_space_write_region_4(fdtbus_bs_tag, ram, 0, (uint32_t *)&socfpga_trampoline, 8); - cpu_idcache_wbinv_all(); - cpu_l2cache_wbinv_all(); + dcache_wbinv_poc_all(); /* Put CPU1 out from reset */ bus_space_write_4(fdtbus_bs_tag, rst, MPUMODRST, 0); Modified: head/sys/arm/amlogic/aml8726/aml8726_mp.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_mp.c Fri Feb 5 14:16:42 2016 (r295318) +++ head/sys/arm/amlogic/aml8726/aml8726_mp.c Fri Feb 5 14:57:41 2016 (r295319) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -485,7 +486,7 @@ platform_mp_start_ap(void) value |= AML_SCU_CONTROL_ENABLE; SCU_WRITE_4(AML_SCU_CONTROL_REG, value); SCU_BARRIER(AML_SCU_CONTROL_REG); - cpu_idcache_wbinv_all(); + dcache_wbinv_poc_all(); /* Set the boot address and power on each AP. */ paddr = pmap_kextract((vm_offset_t)mpentry); Modified: head/sys/arm/arm/db_interface.c ============================================================================== --- head/sys/arm/arm/db_interface.c Fri Feb 5 14:16:42 2016 (r295318) +++ head/sys/arm/arm/db_interface.c Fri Feb 5 14:57:41 2016 (r295319) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" #include +#include #include #include #include /* just for boothowto */ @@ -53,9 +54,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include -#include #include #include @@ -63,7 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include + static int nil = 0; @@ -245,11 +246,10 @@ db_write_bytes(vm_offset_t addr, size_t } /* make sure the caches and memory are in sync */ - cpu_icache_sync_range(addr, size); + icache_sync(addr, size); /* In case the current page tables have been modified ... */ - cpu_tlb_flushID(); - cpu_cpwait(); + tlb_flush_all(); return (0); } Modified: head/sys/arm/arm/dump_machdep.c ============================================================================== --- head/sys/arm/arm/dump_machdep.c Fri Feb 5 14:16:42 2016 (r295318) +++ head/sys/arm/arm/dump_machdep.c Fri Feb 5 14:57:41 2016 (r295319) @@ -59,8 +59,7 @@ dumpsys_wbinv_all(void) * have already been stopped, and their flush/invalidate was done as * part of stopping. */ - cpu_idcache_wbinv_all(); - cpu_l2cache_wbinv_all(); + dcache_wbinv_poc_all(); #ifdef __XSCALE__ xscale_cache_clean_minidata(); #endif Modified: head/sys/arm/arm/fiq.c ============================================================================== --- head/sys/arm/arm/fiq.c Fri Feb 5 14:16:42 2016 (r295318) +++ head/sys/arm/arm/fiq.c Fri Feb 5 14:57:41 2016 (r295319) @@ -81,8 +81,8 @@ fiq_installhandler(void *func, size_t si #if !defined(__ARM_FIQ_INDIRECT) vector_page_setprot(VM_PROT_READ); - cpu_icache_sync_range((vm_offset_t) fiqvector, size); #endif + icache_sync((vm_offset_t) fiqvector, size); } /* Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Fri Feb 5 14:16:42 2016 (r295318) +++ head/sys/arm/arm/machdep.c Fri Feb 5 14:57:41 2016 (r295319) @@ -396,7 +396,7 @@ arm_vector_init(vm_offset_t va, int whic } /* Now sync the vectors. */ - cpu_icache_sync_range(va, (ARM_NVEC * 2) * sizeof(u_int)); + icache_sync(va, (ARM_NVEC * 2) * sizeof(u_int)); vector_page = va; @@ -478,12 +478,7 @@ void cpu_flush_dcache(void *ptr, size_t len) { - cpu_dcache_wb_range((uintptr_t)ptr, len); -#ifdef ARM_L2_PIPT - cpu_l2cache_wb_range((uintptr_t)vtophys(ptr), len); -#else - cpu_l2cache_wb_range((uintptr_t)ptr, len); -#endif + dcache_wb_poc((vm_offset_t)ptr, (vm_paddr_t)vtophys(ptr), len); } /* Get current clock frequency for the given cpu id. */ Modified: head/sys/arm/arm/minidump_machdep.c ============================================================================== --- head/sys/arm/arm/minidump_machdep.c Fri Feb 5 14:16:42 2016 (r295318) +++ head/sys/arm/arm/minidump_machdep.c Fri Feb 5 14:57:41 2016 (r295319) @@ -45,11 +45,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include -#include #include -#include +#include CTASSERT(sizeof(struct kerneldumpheader) == 512); @@ -203,8 +203,7 @@ minidumpsys(struct dumperinfo *di) * by time we get to here, all that remains is to flush the L1 for the * current CPU, then the L2. */ - cpu_idcache_wbinv_all(); - cpu_l2cache_wbinv_all(); + dcache_wbinv_poc_all(); counter = 0; /* Walk page table pages, set bits in vm_page_dump */ Modified: head/sys/arm/arm/mp_machdep.c ============================================================================== --- head/sys/arm/arm/mp_machdep.c Fri Feb 5 14:16:42 2016 (r295318) +++ head/sys/arm/arm/mp_machdep.c Fri Feb 5 14:57:41 2016 (r295319) @@ -123,9 +123,7 @@ cpu_mp_start(void) dpcpu[i] = (void *)kmem_malloc(kernel_arena, DPCPU_SIZE, M_WAITOK | M_ZERO); - cpu_idcache_wbinv_all(); - cpu_l2cache_wbinv_all(); - cpu_idcache_wbinv_all(); + dcache_wbinv_poc_all(); /* Initialize boot code and start up processors */ platform_mp_start_ap(); @@ -283,7 +281,7 @@ ipi_stop(void *dummy __unused) * stop will do the l2 cache flush after all other cores * have done their l1 flushes and stopped. */ - cpu_idcache_wbinv_all(); + dcache_wbinv_poc_all(); /* Indicate we are stopped */ CPU_SET_ATOMIC(cpu, &stopped_cpus); @@ -381,7 +379,7 @@ ipi_handler(void *arg) * stop will do the l2 cache flush after all other cores * have done their l1 flushes and stopped. */ - cpu_idcache_wbinv_all(); + dcache_wbinv_poc_all(); /* Indicate we are stopped */ CPU_SET_ATOMIC(cpu, &stopped_cpus); Modified: head/sys/arm/arm/sys_machdep.c ============================================================================== --- head/sys/arm/arm/sys_machdep.c Fri Feb 5 14:16:42 2016 (r295318) +++ head/sys/arm/arm/sys_machdep.c Fri Feb 5 14:57:41 2016 (r295319) @@ -153,8 +153,13 @@ arm32_drain_writebuf(struct thread *td, { /* No args. */ - td->td_retval[0] = 0; +#if __ARM_ARCH < 6 cpu_drain_writebuf(); +#else + dsb(); + cpu_l2cache_drain_writebuf(); +#endif + td->td_retval[0] = 0; return (0); } Modified: head/sys/arm/broadcom/bcm2835/bcm2836_mp.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2836_mp.c Fri Feb 5 14:16:42 2016 (r295318) +++ head/sys/arm/broadcom/bcm2835/bcm2836_mp.c Fri Feb 5 14:57:41 2016 (r295319) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -123,8 +124,7 @@ platform_mp_start_ap(void) BSWR4(MBOX3CLR_CORE(i), 0xffffffff); } wmb(); - cpu_idcache_wbinv_all(); - cpu_l2cache_wbinv_all(); + dcache_wbinv_poc_all(); /* boot secondary CPUs */ for (i = 1; i < mp_ncpus; i++) { Modified: head/sys/arm/freescale/imx/imx6_mp.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_mp.c Fri Feb 5 14:16:42 2016 (r295318) +++ head/sys/arm/freescale/imx/imx6_mp.c Fri Feb 5 14:57:41 2016 (r295319) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -149,7 +150,7 @@ platform_mp_start_ap(void) val = bus_space_read_4(fdtbus_bs_tag, scu, SCU_CONTROL_REG); bus_space_write_4(fdtbus_bs_tag, scu, SCU_CONTROL_REG, val | SCU_CONTROL_ENABLE); - cpu_idcache_wbinv_all(); + dcache_wbinv_poc_all(); /* * For each AP core, set the entry point address and argument registers, Modified: head/sys/arm/include/cpu-v4.h ============================================================================== --- head/sys/arm/include/cpu-v4.h Fri Feb 5 14:16:42 2016 (r295318) +++ head/sys/arm/include/cpu-v4.h Fri Feb 5 14:57:41 2016 (r295319) @@ -41,7 +41,7 @@ #include #if __ARM_ARCH >= 6 -#error Newer include this file for ARMv6 +#error Never include this file for ARMv6 #else #define CPU_ASID_KERNEL 0 @@ -125,11 +125,28 @@ _RF0(cp15_tlbtr_get, CP15_TLBTR(%0)) */ static __inline void +tlb_flush_all(void) +{ + cpu_tlb_flushID(); + cpu_cpwait(); +} + +static __inline void +icache_sync(vm_offset_t va, vm_size_t size) +{ + cpu_icache_sync_range(va, size); +} + +static __inline void dcache_inv_poc(vm_offset_t va, vm_paddr_t pa, vm_size_t size) { cpu_dcache_inv_range(va, size); +#ifdef ARM_L2_PIPT + cpu_l2cache_inv_range(pa, size); +#else cpu_l2cache_inv_range(va, size); +#endif } static __inline void @@ -137,7 +154,11 @@ dcache_inv_poc_dma(vm_offset_t va, vm_pa { /* See armv6 code, above, for why we do L2 before L1 in this case. */ +#ifdef ARM_L2_PIPT + cpu_l2cache_inv_range(pa, size); +#else cpu_l2cache_inv_range(va, size); +#endif cpu_dcache_inv_range(va, size); } @@ -146,7 +167,18 @@ dcache_wb_poc(vm_offset_t va, vm_paddr_t { cpu_dcache_wb_range(va, size); +#ifdef ARM_L2_PIPT + cpu_l2cache_wb_range(pa, size); +#else cpu_l2cache_wb_range(va, size); +#endif +} + +static __inline void +dcache_wbinv_poc_all(void) +{ + cpu_idcache_wbinv_all(); + cpu_l2cache_wbinv_all(); } #endif /* _KERNEL */ Modified: head/sys/arm/include/cpu-v6.h ============================================================================== --- head/sys/arm/include/cpu-v6.h Fri Feb 5 14:16:42 2016 (r295318) +++ head/sys/arm/include/cpu-v6.h Fri Feb 5 14:57:41 2016 (r295319) @@ -44,10 +44,9 @@ #error Only include this file for ARMv6 #else - - #define CPU_ASID_KERNEL 0 +void dcache_wbinv_poc_all(void); /* !!! NOT SMP coherent function !!! */ vm_offset_t dcache_wb_pou_checked(vm_offset_t, vm_size_t); vm_offset_t icache_inv_pou_checked(vm_offset_t, vm_size_t); Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Fri Feb 5 14:16:42 2016 (r295318) +++ head/sys/arm/include/cpufunc.h Fri Feb 5 14:57:41 2016 (r295319) @@ -161,9 +161,12 @@ struct cpu_functions { extern struct cpu_functions cpufuncs; extern u_int cputype; +#if __ARM_ARCH < 6 #define cpu_cpwait() cpufuncs.cf_cpwait() +#endif #define cpu_control(c, e) cpufuncs.cf_control(c, e) +#if __ARM_ARCH < 6 #define cpu_setttb(t) cpufuncs.cf_setttb(t) #define cpu_tlb_flushID() cpufuncs.cf_tlb_flushID() @@ -181,13 +184,16 @@ extern u_int cputype; #define cpu_idcache_inv_all() cpufuncs.cf_idcache_inv_all() #define cpu_idcache_wbinv_all() cpufuncs.cf_idcache_wbinv_all() #define cpu_idcache_wbinv_range(a, s) cpufuncs.cf_idcache_wbinv_range((a), (s)) +#endif #define cpu_l2cache_wbinv_all() cpufuncs.cf_l2cache_wbinv_all() #define cpu_l2cache_wb_range(a, s) cpufuncs.cf_l2cache_wb_range((a), (s)) #define cpu_l2cache_inv_range(a, s) cpufuncs.cf_l2cache_inv_range((a), (s)) #define cpu_l2cache_wbinv_range(a, s) cpufuncs.cf_l2cache_wbinv_range((a), (s)) #define cpu_l2cache_drain_writebuf() cpufuncs.cf_l2cache_drain_writebuf() +#if __ARM_ARCH < 6 #define cpu_drain_writebuf() cpufuncs.cf_drain_writebuf() +#endif #define cpu_sleep(m) cpufuncs.cf_sleep(m) #define cpu_setup() cpufuncs.cf_setup() Modified: head/sys/arm/include/kdb.h ============================================================================== --- head/sys/arm/include/kdb.h Fri Feb 5 14:16:42 2016 (r295318) +++ head/sys/arm/include/kdb.h Fri Feb 5 14:57:41 2016 (r295319) @@ -29,10 +29,10 @@ #ifndef _MACHINE_KDB_H_ #define _MACHINE_KDB_H_ +#include +#include #include #include -#include -#include #define KDB_STOPPEDPCB(pc) &stoppcbs[pc->pc_cpuid] @@ -56,7 +56,7 @@ static __inline void kdb_cpu_sync_icache(unsigned char *addr, size_t size) { - cpu_icache_sync_range((vm_offset_t)addr, size); + icache_sync((vm_offset_t)addr, size); } static __inline void Modified: head/sys/arm/mv/armada38x/pmsu.c ============================================================================== --- head/sys/arm/mv/armada38x/pmsu.c Fri Feb 5 14:16:42 2016 (r295318) +++ head/sys/arm/mv/armada38x/pmsu.c Fri Feb 5 14:57:41 2016 (r295319) @@ -36,10 +36,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include #include #include @@ -143,8 +145,7 @@ pmsu_boot_secondary_cpu(void) bus_space_write_4(fdtbus_bs_tag, vaddr, PMSU_BOOT_ADDR_REDIRECT_OFFSET(1), pmap_kextract((vm_offset_t)mpentry)); - cpu_idcache_wbinv_all(); - cpu_l2cache_wbinv_all(); + dcache_wbinv_poc_all(); armv7_sev(); bus_space_unmap(fdtbus_bs_tag, vaddr, MV_PMSU_REGS_LEN); Modified: head/sys/arm/mv/armadaxp/armadaxp_mp.c ============================================================================== --- head/sys/arm/mv/armadaxp/armadaxp_mp.c Fri Feb 5 14:16:42 2016 (r295318) +++ head/sys/arm/mv/armadaxp/armadaxp_mp.c Fri Feb 5 14:57:41 2016 (r295319) @@ -40,6 +40,7 @@ #include +#include #include #include #include @@ -174,7 +175,7 @@ platform_mp_start_ap(void) bus_space_write_4(fdtbus_bs_tag, CPU_PMU(cpu_num), CPU_PMU_BOOT, pmap_kextract((vm_offset_t)mpentry)); - cpu_idcache_wbinv_all(); + dcache_wbinv_poc_all(); for (cpu_num = 1; cpu_num < mp_ncpus; cpu_num++ ) bus_space_write_4(fdtbus_bs_tag, MP, MP_SW_RESET(cpu_num), 0); Modified: head/sys/arm/rockchip/rk30xx_mp.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_mp.c Fri Feb 5 14:16:42 2016 (r295318) +++ head/sys/arm/rockchip/rk30xx_mp.c Fri Feb 5 14:57:41 2016 (r295319) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -171,8 +172,7 @@ platform_mp_start_ap(void) bus_space_write_region_4(fdtbus_bs_tag, imem, 0, (uint32_t *)&rk30xx_boot2, 8); - cpu_idcache_wbinv_all(); - cpu_l2cache_wbinv_all(); + dcache_wbinv_poc_all(); /* Start all cores */ val = bus_space_read_4(fdtbus_bs_tag, pmu, PMU_PWRDN_CON); Modified: head/sys/arm/samsung/exynos/exynos5_mp.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_mp.c Fri Feb 5 14:16:42 2016 (r295318) +++ head/sys/arm/samsung/exynos/exynos5_mp.c Fri Feb 5 14:57:41 2016 (r295319) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -135,8 +136,7 @@ platform_mp_start_ap(void) bus_space_write_4(fdtbus_bs_tag, sysram, 0x0, pmap_kextract((vm_offset_t)mpentry)); - cpu_idcache_wbinv_all(); - cpu_l2cache_wbinv_all(); + dcache_wbinv_poc_all(); armv7_sev(); bus_space_unmap(fdtbus_bs_tag, sysram, 0x100); Modified: head/sys/arm/ti/omap4/omap4_mp.c ============================================================================== --- head/sys/arm/ti/omap4/omap4_mp.c Fri Feb 5 14:16:42 2016 (r295318) +++ head/sys/arm/ti/omap4/omap4_mp.c Fri Feb 5 14:57:41 2016 (r295319) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -72,8 +73,8 @@ platform_mp_start_ap(void) /* Enable the SCU */ *(volatile unsigned int *)scu_addr |= 1; //*(volatile unsigned int *)(scu_addr + 0x30) |= 1; - cpu_idcache_wbinv_all(); - cpu_l2cache_wbinv_all(); + dcache_wbinv_poc_all(); + ti_smc0(0x200, 0xfffffdff, MODIFY_AUX_CORE_0); ti_smc0(pmap_kextract((vm_offset_t)mpentry), 0, WRITE_AUX_CORE_1); armv7_sev(); Modified: head/sys/arm/xilinx/zy7_mp.c ============================================================================== --- head/sys/arm/xilinx/zy7_mp.c Fri Feb 5 14:16:42 2016 (r295318) +++ head/sys/arm/xilinx/zy7_mp.c Fri Feb 5 14:57:41 2016 (r295319) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -104,8 +105,7 @@ platform_mp_start_ap(void) * magic location, 0xfffffff0, isn't in the SCU's filtering range so it * needs a write-back too. */ - cpu_idcache_wbinv_all(); - cpu_l2cache_wbinv_all(); + dcache_wbinv_poc_all(); /* Wake up CPU1. */ armv7_sev(); Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Fri Feb 5 14:16:42 2016 (r295318) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Fri Feb 5 14:57:41 2016 (r295319) @@ -48,6 +48,7 @@ #include #include +#include #include #include @@ -411,6 +412,7 @@ create_pagelist(char __user *buf, size_t int run, addridx, actual_pages; int err; vm_paddr_t pagelist_phys; + vm_paddr_t pa; offset = (vm_offset_t)buf & (PAGE_SIZE - 1); num_pages = (count + offset + PAGE_SIZE - 1) / PAGE_SIZE; @@ -533,7 +535,8 @@ create_pagelist(char __user *buf, size_t (fragments - g_fragments_base)/g_fragment_size; } - cpu_dcache_wbinv_range((vm_offset_t)buf, count); + pa = pmap_extract(PCPU_GET(curpmap), (vm_offset_t)buf); + dcache_wbinv_poc((vm_offset_t)buf, pa, count); bus_dmamap_sync(bi->pagelist_dma_tag, bi->pagelist_dma_map, BUS_DMASYNC_PREWRITE); From owner-svn-src-all@freebsd.org Fri Feb 5 15:35:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBF70A7768C; Fri, 5 Feb 2016 15:35:34 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D02C1FEC; Fri, 5 Feb 2016 15:35:34 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u15FZXNS057265; Fri, 5 Feb 2016 15:35:33 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u15FZX3W057260; Fri, 5 Feb 2016 15:35:33 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201602051535.u15FZX3W057260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Fri, 5 Feb 2016 15:35:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295320 - in head/sys/boot/efi: boot1 include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 15:35:35 -0000 Author: smh Date: Fri Feb 5 15:35:33 2016 New Revision: 295320 URL: https://svnweb.freebsd.org/changeset/base/295320 Log: Fix EFI multi device boot support Fix EFI boot support when presented with multiple valid boot partitions across multiple devices. It now prefers to boot from partitions that are present on the underlying device that the boot1 image was loaded from. This means that it will boot from the partitions on device the user chose from EFI boot menu in preference to those on other devices. Also fixed is the recovery from a failed attempt to boot, from a seemingly valid partition, by continuing to trying all other available partitions no matter what the error. boot1 now use * to signify a partition what was accepted from the preferred device and + otherwise. Finally some error messages where improved and DPRINTF's with slowed boot to aid debugging. ZFS will still be preferred over UFS when both are available on the boot device. Reviewed by: imp MFC after: 1 week Sponsored by: Multiplay Differential Revision: https://reviews.freebsd.org/D5108 Modified: head/sys/boot/efi/boot1/boot1.c head/sys/boot/efi/boot1/boot_module.h head/sys/boot/efi/boot1/ufs_module.c head/sys/boot/efi/boot1/zfs_module.c head/sys/boot/efi/include/efidevp.h Modified: head/sys/boot/efi/boot1/boot1.c ============================================================================== --- head/sys/boot/efi/boot1/boot1.c Fri Feb 5 14:57:41 2016 (r295319) +++ head/sys/boot/efi/boot1/boot1.c Fri Feb 5 15:35:33 2016 (r295320) @@ -50,9 +50,6 @@ static const boot_module_t *boot_modules void putchar(int c); EFI_STATUS efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE* Xsystab); -static void try_load(const boot_module_t* mod); -static EFI_STATUS probe_handle(EFI_HANDLE h); - EFI_SYSTEM_TABLE *systab; EFI_BOOT_SERVICES *bs; static EFI_HANDLE *image; @@ -85,20 +82,300 @@ Free(void *buf, const char *file __unuse } /* - * This function only returns if it fails to load the kernel. If it - * succeeds, it simply boots the kernel. + * nodes_match returns TRUE if the imgpath isn't NULL and the nodes match, + * FALSE otherwise. */ -void -try_load(const boot_module_t *mod) +static BOOLEAN +nodes_match(EFI_DEVICE_PATH *imgpath, EFI_DEVICE_PATH *devpath) +{ + int len; + + if (imgpath == NULL || imgpath->Type != devpath->Type || + imgpath->SubType != devpath->SubType) + return (FALSE); + + len = DevicePathNodeLength(imgpath); + if (len != DevicePathNodeLength(devpath)) + return (FALSE); + + return (memcmp(imgpath, devpath, (size_t)len) == 0); +} + +/* + * device_paths_match returns TRUE if the imgpath isn't NULL and all nodes + * in imgpath and devpath match up to their respect occurances of a media + * node, FALSE otherwise. + */ +static BOOLEAN +device_paths_match(EFI_DEVICE_PATH *imgpath, EFI_DEVICE_PATH *devpath) { - size_t bufsize, cmdsize; - void *buf; + + if (imgpath == NULL) + return (FALSE); + + while (!IsDevicePathEnd(imgpath) && !IsDevicePathEnd(devpath)) { + if (IsDevicePathType(imgpath, MEDIA_DEVICE_PATH) && + IsDevicePathType(devpath, MEDIA_DEVICE_PATH)) + return (TRUE); + + if (!nodes_match(imgpath, devpath)) + return (FALSE); + + imgpath = NextDevicePathNode(imgpath); + devpath = NextDevicePathNode(devpath); + } + + return (FALSE); +} + +/* + * devpath_last returns the last non-path end node in devpath. + */ +static EFI_DEVICE_PATH * +devpath_last(EFI_DEVICE_PATH *devpath) +{ + + while (!IsDevicePathEnd(NextDevicePathNode(devpath))) + devpath = NextDevicePathNode(devpath); + + return (devpath); +} + +/* + * devpath_node_str is a basic output method for a devpath node which + * only understands a subset of the available sub types. + * + * If we switch to UEFI 2.x then we should update it to use: + * EFI_DEVICE_PATH_TO_TEXT_PROTOCOL. + */ +static int +devpath_node_str(char *buf, size_t size, EFI_DEVICE_PATH *devpath) +{ + + switch (devpath->Type) { + case MESSAGING_DEVICE_PATH: + switch (devpath->SubType) { + case MSG_ATAPI_DP: { + ATAPI_DEVICE_PATH *atapi; + + atapi = (ATAPI_DEVICE_PATH *)(void *)devpath; + return snprintf(buf, size, "ata(%s,%s,0x%x)", + (atapi->PrimarySecondary == 1) ? "Sec" : "Pri", + (atapi->SlaveMaster == 1) ? "Slave" : "Master", + atapi->Lun); + } + case MSG_USB_DP: { + USB_DEVICE_PATH *usb; + + usb = (USB_DEVICE_PATH *)devpath; + return snprintf(buf, size, "usb(0x%02x,0x%02x)", + usb->ParentPortNumber, usb->InterfaceNumber); + } + case MSG_SCSI_DP: { + SCSI_DEVICE_PATH *scsi; + + scsi = (SCSI_DEVICE_PATH *)(void *)devpath; + return snprintf(buf, size, "scsi(0x%02x,0x%02x)", + scsi->Pun, scsi->Lun); + } + case MSG_SATA_DP: { + SATA_DEVICE_PATH *sata; + + sata = (SATA_DEVICE_PATH *)(void *)devpath; + return snprintf(buf, size, "sata(0x%x,0x%x,0x%x)", + sata->HBAPortNumber, sata->PortMultiplierPortNumber, + sata->Lun); + } + default: + return snprintf(buf, size, "msg(0x%02x)", + devpath->SubType); + } + break; + case HARDWARE_DEVICE_PATH: + switch (devpath->SubType) { + case HW_PCI_DP: { + PCI_DEVICE_PATH *pci; + + pci = (PCI_DEVICE_PATH *)devpath; + return snprintf(buf, size, "pci(0x%02x,0x%02x)", + pci->Device, pci->Function); + } + default: + return snprintf(buf, size, "hw(0x%02x)", + devpath->SubType); + } + break; + case ACPI_DEVICE_PATH: { + ACPI_HID_DEVICE_PATH *acpi; + + acpi = (ACPI_HID_DEVICE_PATH *)(void *)devpath; + if ((acpi->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) { + switch (EISA_ID_TO_NUM(acpi->HID)) { + case 0x0a03: + return snprintf(buf, size, "pciroot(0x%x)", + acpi->UID); + case 0x0a08: + return snprintf(buf, size, "pcieroot(0x%x)", + acpi->UID); + case 0x0604: + return snprintf(buf, size, "floppy(0x%x)", + acpi->UID); + case 0x0301: + return snprintf(buf, size, "keyboard(0x%x)", + acpi->UID); + case 0x0501: + return snprintf(buf, size, "serial(0x%x)", + acpi->UID); + case 0x0401: + return snprintf(buf, size, "parallelport(0x%x)", + acpi->UID); + default: + return snprintf(buf, size, "acpi(pnp%04x,0x%x)", + EISA_ID_TO_NUM(acpi->HID), acpi->UID); + } + } + + return snprintf(buf, size, "acpi(0x%08x,0x%x)", acpi->HID, + acpi->UID); + } + case MEDIA_DEVICE_PATH: + switch (devpath->SubType) { + case MEDIA_CDROM_DP: { + CDROM_DEVICE_PATH *cdrom; + + cdrom = (CDROM_DEVICE_PATH *)(void *)devpath; + return snprintf(buf, size, "cdrom(%x)", + cdrom->BootEntry); + } + case MEDIA_HARDDRIVE_DP: { + HARDDRIVE_DEVICE_PATH *hd; + + hd = (HARDDRIVE_DEVICE_PATH *)(void *)devpath; + return snprintf(buf, size, "hd(%x)", + hd->PartitionNumber); + } + default: + return snprintf(buf, size, "media(0x%02x)", + devpath->SubType); + } + case BBS_DEVICE_PATH: + return snprintf(buf, size, "bbs(0x%02x)", devpath->SubType); + case END_DEVICE_PATH_TYPE: + return (0); + } + + return snprintf(buf, size, "type(0x%02x, 0x%02x)", devpath->Type, + devpath->SubType); +} + +/* + * devpath_strlcat appends a text description of devpath to buf but not more + * than size - 1 characters followed by NUL-terminator. + */ +int +devpath_strlcat(char *buf, size_t size, EFI_DEVICE_PATH *devpath) +{ + size_t len, used; + const char *sep; + + sep = ""; + used = 0; + while (!IsDevicePathEnd(devpath)) { + len = snprintf(buf, size - used, "%s", sep); + used += len; + if (used > size) + return (used); + buf += len; + + len = devpath_node_str(buf, size - used, devpath); + used += len; + if (used > size) + return (used); + buf += len; + devpath = NextDevicePathNode(devpath); + sep = ":"; + } + + return (used); +} + +/* + * devpath_str is convenience method which returns the text description of + * devpath using a static buffer, so it isn't thread safe! + */ +char * +devpath_str(EFI_DEVICE_PATH *devpath) +{ + static char buf[256]; + + devpath_strlcat(buf, sizeof(buf), devpath); + + return buf; +} + +/* + * load_loader attempts to load the loader image data. + * + * It tries each module and its respective devices, identified by mod->probe, + * in order until a successful load occurs at which point it returns EFI_SUCCESS + * and EFI_NOT_FOUND otherwise. + * + * Only devices which have preferred matching the preferred parameter are tried. + */ +static EFI_STATUS +load_loader(const boot_module_t **modp, dev_info_t **devinfop, void **bufp, + size_t *bufsize, BOOLEAN preferred) +{ + UINTN i; + dev_info_t *dev; + const boot_module_t *mod; + + for (i = 0; i < NUM_BOOT_MODULES; i++) { + if (boot_modules[i] == NULL) + continue; + mod = boot_modules[i]; + for (dev = mod->devices(); dev != NULL; dev = dev->next) { + if (dev->preferred != preferred) + continue; + + if (mod->load(PATH_LOADER_EFI, dev, bufp, bufsize) == + EFI_SUCCESS) { + *devinfop = dev; + *modp = mod; + return (EFI_SUCCESS); + } + } + } + + return (EFI_NOT_FOUND); +} + +/* + * try_boot only returns if it fails to load the loader. If it succeeds + * it simply boots, otherwise it returns the status of last EFI call. + */ +static EFI_STATUS +try_boot() +{ + size_t bufsize, loadersize, cmdsize; + void *buf, *loaderbuf; char *cmd; dev_info_t *dev; + const boot_module_t *mod; EFI_HANDLE loaderhandle; EFI_LOADED_IMAGE *loaded_image; EFI_STATUS status; + status = load_loader(&mod, &dev, &loaderbuf, &loadersize, TRUE); + if (status != EFI_SUCCESS) { + status = load_loader(&mod, &dev, &loaderbuf, &loadersize, + FALSE); + if (status != EFI_SUCCESS) { + printf("Failed to load '%s'\n", PATH_LOADER_EFI); + return (status); + } + } + /* * Read in and parse the command line from /boot.config or /boot/config, * if present. We'll pass it the next stage via a simple ASCII @@ -111,67 +388,183 @@ try_load(const boot_module_t *mod) */ cmd = NULL; cmdsize = 0; - status = mod->load(PATH_DOTCONFIG, &dev, &buf, &bufsize); + status = mod->load(PATH_DOTCONFIG, dev, &buf, &bufsize); if (status == EFI_NOT_FOUND) - status = mod->load(PATH_CONFIG, &dev, &buf, &bufsize); + status = mod->load(PATH_CONFIG, dev, &buf, &bufsize); if (status == EFI_SUCCESS) { cmdsize = bufsize + 1; cmd = malloc(cmdsize); - if (cmd == NULL) { - free(buf); - return; - } + if (cmd == NULL) + goto errout; memcpy(cmd, buf, bufsize); cmd[bufsize] = '\0'; free(buf); + buf = NULL; } - status = mod->load(PATH_LOADER_EFI, &dev, &buf, &bufsize); - if (status == EFI_NOT_FOUND) - return; - - if (status != EFI_SUCCESS) { - printf("%s failed to load %s (%lu)\n", mod->name, - PATH_LOADER_EFI, EFI_ERROR_CODE(status)); - return; - } - - if ((status = bs->LoadImage(TRUE, image, dev->devpath, buf, bufsize, - &loaderhandle)) != EFI_SUCCESS) { + if ((status = bs->LoadImage(TRUE, image, devpath_last(dev->devpath), + loaderbuf, loadersize, &loaderhandle)) != EFI_SUCCESS) { printf("Failed to load image provided by %s, size: %zu, (%lu)\n", mod->name, bufsize, EFI_ERROR_CODE(status)); - return; + goto errout; } - if (cmd != NULL) - printf(" command args: %s\n", cmd); - if ((status = bs->HandleProtocol(loaderhandle, &LoadedImageGUID, (VOID**)&loaded_image)) != EFI_SUCCESS) { printf("Failed to query LoadedImage provided by %s (%lu)\n", mod->name, EFI_ERROR_CODE(status)); - return; + goto errout; } + if (cmd != NULL) + printf(" command args: %s\n", cmd); + loaded_image->DeviceHandle = dev->devhandle; loaded_image->LoadOptionsSize = cmdsize; loaded_image->LoadOptions = cmd; + DPRINTF("Starting '%s' in 5 seconds...", PATH_LOADER_EFI); + DSTALL(1000000); + DPRINTF("."); + DSTALL(1000000); + DPRINTF("."); + DSTALL(1000000); + DPRINTF("."); + DSTALL(1000000); + DPRINTF("."); + DSTALL(1000000); + DPRINTF(".\n"); + if ((status = bs->StartImage(loaderhandle, NULL, NULL)) != EFI_SUCCESS) { printf("Failed to start image provided by %s (%lu)\n", mod->name, EFI_ERROR_CODE(status)); - free(cmd); loaded_image->LoadOptionsSize = 0; loaded_image->LoadOptions = NULL; - return; } + +errout: + if (cmd != NULL) + free(cmd); + if (buf != NULL) + free(buf); + if (loaderbuf != NULL) + free(loaderbuf); + + return (status); +} + +/* + * probe_handle determines if the passed handle represents a logical partition + * if it does it uses each module in order to probe it and if successful it + * returns EFI_SUCCESS. + */ +static EFI_STATUS +probe_handle(EFI_HANDLE h, EFI_DEVICE_PATH *imgpath, BOOLEAN *preferred) +{ + dev_info_t *devinfo; + EFI_BLOCK_IO *blkio; + EFI_DEVICE_PATH *devpath; + EFI_STATUS status; + UINTN i; + + /* Figure out if we're dealing with an actual partition. */ + status = bs->HandleProtocol(h, &DevicePathGUID, (void **)&devpath); + if (status == EFI_UNSUPPORTED) + return (status); + + if (status != EFI_SUCCESS) { + DPRINTF("\nFailed to query DevicePath (%lu)\n", + EFI_ERROR_CODE(status)); + return (status); + } + + DPRINTF("probing: %s\n", devpath_str(devpath)); + + status = bs->HandleProtocol(h, &BlockIoProtocolGUID, (void **)&blkio); + if (status == EFI_UNSUPPORTED) + return (status); + + if (status != EFI_SUCCESS) { + DPRINTF("\nFailed to query BlockIoProtocol (%lu)\n", + EFI_ERROR_CODE(status)); + return (status); + } + + if (!blkio->Media->LogicalPartition) + return (EFI_UNSUPPORTED); + + *preferred = device_paths_match(imgpath, devpath); + + /* Run through each module, see if it can load this partition */ + for (i = 0; i < NUM_BOOT_MODULES; i++) { + if (boot_modules[i] == NULL) + continue; + + if ((status = bs->AllocatePool(EfiLoaderData, + sizeof(*devinfo), (void **)&devinfo)) != + EFI_SUCCESS) { + DPRINTF("\nFailed to allocate devinfo (%lu)\n", + EFI_ERROR_CODE(status)); + continue; + } + devinfo->dev = blkio; + devinfo->devpath = devpath; + devinfo->devhandle = h; + devinfo->devdata = NULL; + devinfo->preferred = *preferred; + devinfo->next = NULL; + + status = boot_modules[i]->probe(devinfo); + if (status == EFI_SUCCESS) + return (EFI_SUCCESS); + (void)bs->FreePool(devinfo); + } + + return (EFI_UNSUPPORTED); +} + +/* + * probe_handle_status calls probe_handle and outputs the returned status + * of the call. + */ +static void +probe_handle_status(EFI_HANDLE h, EFI_DEVICE_PATH *imgpath) +{ + EFI_STATUS status; + BOOLEAN preferred; + + status = probe_handle(h, imgpath, &preferred); + + DPRINTF("probe: "); + switch (status) { + case EFI_UNSUPPORTED: + printf("."); + DPRINTF(" not supported\n"); + break; + case EFI_SUCCESS: + if (preferred) { + printf("%c", '*'); + DPRINTF(" supported (preferred)\n"); + } else { + printf("%c", '+'); + DPRINTF(" supported\n"); + } + break; + default: + printf("x"); + DPRINTF(" error (%lu)\n", EFI_ERROR_CODE(status)); + break; + } + DSTALL(500000); } EFI_STATUS efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab) { EFI_HANDLE *handles; + EFI_LOADED_IMAGE *img; + EFI_DEVICE_PATH *imgpath; EFI_STATUS status; EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl = NULL; SIMPLE_TEXT_OUTPUT_INTERFACE *conout = NULL; @@ -254,20 +647,22 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_T /* Scan all partitions, probing with all modules. */ nhandles = hsize / sizeof(*handles); printf(" Probing %zu block devices...", nhandles); - for (i = 0; i < nhandles; i++) { - status = probe_handle(handles[i]); - switch (status) { - case EFI_UNSUPPORTED: - printf("."); - break; - case EFI_SUCCESS: - printf("+"); - break; - default: - printf("x"); - break; - } + DPRINTF("\n"); + + /* Determine the devpath of our image so we can prefer it. */ + status = bs->HandleProtocol(image, &LoadedImageGUID, (VOID**)&img); + imgpath = NULL; + if (status == EFI_SUCCESS) { + status = bs->HandleProtocol(img->DeviceHandle, &DevicePathGUID, + (void **)&imgpath); + if (status != EFI_SUCCESS) + DPRINTF("Failed to get image DevicePath (%lu)\n", + EFI_ERROR_CODE(status)); + DPRINTF("boot1 imagepath: %s\n", devpath_str(imgpath)); } + + for (i = 0; i < nhandles; i++) + probe_handle_status(handles[i], imgpath); printf(" done\n"); /* Status summary. */ @@ -278,78 +673,15 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_T } } - /* Select a partition to boot by trying each module in order. */ - for (i = 0; i < NUM_BOOT_MODULES; i++) - if (boot_modules[i] != NULL) - try_load(boot_modules[i]); + try_boot(); /* If we get here, we're out of luck... */ panic("No bootable partitions found!"); } -static EFI_STATUS -probe_handle(EFI_HANDLE h) -{ - dev_info_t *devinfo; - EFI_BLOCK_IO *blkio; - EFI_DEVICE_PATH *devpath; - EFI_STATUS status; - UINTN i; - - /* Figure out if we're dealing with an actual partition. */ - status = bs->HandleProtocol(h, &DevicePathGUID, (void **)&devpath); - if (status == EFI_UNSUPPORTED) - return (status); - - if (status != EFI_SUCCESS) { - DPRINTF("\nFailed to query DevicePath (%lu)\n", - EFI_ERROR_CODE(status)); - return (status); - } - - while (!IsDevicePathEnd(NextDevicePathNode(devpath))) - devpath = NextDevicePathNode(devpath); - - status = bs->HandleProtocol(h, &BlockIoProtocolGUID, (void **)&blkio); - if (status == EFI_UNSUPPORTED) - return (status); - - if (status != EFI_SUCCESS) { - DPRINTF("\nFailed to query BlockIoProtocol (%lu)\n", - EFI_ERROR_CODE(status)); - return (status); - } - - if (!blkio->Media->LogicalPartition) - return (EFI_UNSUPPORTED); - - /* Run through each module, see if it can load this partition */ - for (i = 0; i < NUM_BOOT_MODULES; i++) { - if (boot_modules[i] == NULL) - continue; - - if ((status = bs->AllocatePool(EfiLoaderData, - sizeof(*devinfo), (void **)&devinfo)) != - EFI_SUCCESS) { - DPRINTF("\nFailed to allocate devinfo (%lu)\n", - EFI_ERROR_CODE(status)); - continue; - } - devinfo->dev = blkio; - devinfo->devpath = devpath; - devinfo->devhandle = h; - devinfo->devdata = NULL; - devinfo->next = NULL; - - status = boot_modules[i]->probe(devinfo); - if (status == EFI_SUCCESS) - return (EFI_SUCCESS); - (void)bs->FreePool(devinfo); - } - - return (EFI_UNSUPPORTED); -} - +/* + * add_device adds a device to the passed devinfo list. + */ void add_device(dev_info_t **devinfop, dev_info_t *devinfo) { Modified: head/sys/boot/efi/boot1/boot_module.h ============================================================================== --- head/sys/boot/efi/boot1/boot_module.h Fri Feb 5 14:57:41 2016 (r295319) +++ head/sys/boot/efi/boot1/boot_module.h Fri Feb 5 15:35:33 2016 (r295320) @@ -36,9 +36,11 @@ #include #ifdef EFI_DEBUG -#define DPRINTF(fmt, ...) printf(fmt, __VA_ARGS__) +#define DPRINTF(fmt, args...) printf(fmt, ##args) +#define DSTALL(d) bs->Stall(d) #else #define DPRINTF(fmt, ...) {} +#define DSTALL(d) {} #endif /* EFI device info */ @@ -48,6 +50,7 @@ typedef struct dev_info EFI_DEVICE_PATH *devpath; EFI_HANDLE *devhandle; void *devdata; + BOOLEAN preferred; struct dev_info *next; } dev_info_t; @@ -75,19 +78,21 @@ typedef struct boot_module_t /* * load should select the best out of a set of devices that probe - * indicated were loadable and load it. + * indicated were loadable and load the specified file. * * Return codes: * EFI_SUCCESS = The module can handle the device. * EFI_NOT_FOUND = The module can not handle the device. * Other = The module encountered an error. */ - EFI_STATUS (*load)(const char *loader_path, dev_info_t **devinfo, + EFI_STATUS (*load)(const char *filepath, dev_info_t *devinfo, void **buf, size_t *bufsize); /* status outputs information about the probed devices. */ void (*status)(); + /* valid devices as found by probe. */ + dev_info_t *(*devices)(); } boot_module_t; /* Standard boot modules. */ @@ -107,4 +112,6 @@ extern int vsnprintf(char *str, size_t s extern EFI_SYSTEM_TABLE *systab; extern EFI_BOOT_SERVICES *bs; +extern int devpath_strlcat(char *buf, size_t size, EFI_DEVICE_PATH *devpath); +extern char *devpath_str(EFI_DEVICE_PATH *devpath); #endif Modified: head/sys/boot/efi/boot1/ufs_module.c ============================================================================== --- head/sys/boot/efi/boot1/ufs_module.c Fri Feb 5 14:57:41 2016 (r295319) +++ head/sys/boot/efi/boot1/ufs_module.c Fri Feb 5 15:35:33 2016 (r295320) @@ -93,7 +93,7 @@ probe(dev_info_t* dev) } static EFI_STATUS -try_load(dev_info_t *dev, const char *loader_path, void **bufp, size_t *bufsize) +load(const char *filepath, dev_info_t *dev, void **bufp, size_t *bufsize) { ufs_ino_t ino; EFI_STATUS status; @@ -101,59 +101,46 @@ try_load(dev_info_t *dev, const char *lo ssize_t read; void *buf; - if (init_dev(dev) < 0) + DPRINTF("Loading '%s' from %s\n", filepath, devpath_str(dev->devpath)); + + if (init_dev(dev) < 0) { + DPRINTF("Failed to init device\n"); return (EFI_UNSUPPORTED); + } - if ((ino = lookup(loader_path)) == 0) + if ((ino = lookup(filepath)) == 0) { + DPRINTF("Failed to lookup '%s' (file not found?)\n", filepath); return (EFI_NOT_FOUND); + } if (fsread_size(ino, NULL, 0, &size) < 0 || size <= 0) { - printf("Failed to read size of '%s' ino: %d\n", loader_path, - ino); + printf("Failed to read size of '%s' ino: %d\n", filepath, ino); return (EFI_INVALID_PARAMETER); } if ((status = bs->AllocatePool(EfiLoaderData, size, &buf)) != EFI_SUCCESS) { - printf("Failed to allocate read buffer (%lu)\n", - EFI_ERROR_CODE(status)); + printf("Failed to allocate read buffer %zu for '%s' (%lu)\n", + size, filepath, EFI_ERROR_CODE(status)); return (status); } read = fsread(ino, buf, size); if ((size_t)read != size) { - printf("Failed to read '%s' (%zd != %zu)\n", loader_path, read, + printf("Failed to read '%s' (%zd != %zu)\n", filepath, read, size); (void)bs->FreePool(buf); return (EFI_INVALID_PARAMETER); } + DPRINTF("Load complete\n"); + *bufp = buf; *bufsize = size; return (EFI_SUCCESS); } -static EFI_STATUS -load(const char *loader_path, dev_info_t **devinfop, void **buf, - size_t *bufsize) -{ - dev_info_t *dev; - EFI_STATUS status; - - for (dev = devices; dev != NULL; dev = dev->next) { - status = try_load(dev, loader_path, buf, bufsize); - if (status == EFI_SUCCESS) { - *devinfop = dev; - return (EFI_SUCCESS); - } else if (status != EFI_NOT_FOUND) { - return (status); - } - } - - return (EFI_NOT_FOUND); -} - static void status() { @@ -176,10 +163,18 @@ status() } } +static dev_info_t * +_devices() +{ + + return (devices); +} + const boot_module_t ufs_module = { .name = "UFS", .probe = probe, .load = load, - .status = status + .status = status, + .devices = _devices }; Modified: head/sys/boot/efi/boot1/zfs_module.c ============================================================================== --- head/sys/boot/efi/boot1/zfs_module.c Fri Feb 5 14:57:41 2016 (r295319) +++ head/sys/boot/efi/boot1/zfs_module.c Fri Feb 5 15:35:33 2016 (r295320) @@ -91,7 +91,7 @@ probe(dev_info_t *dev) } static EFI_STATUS -try_load(dev_info_t *devinfo, const char *loader_path, void **bufp, size_t *bufsize) +load(const char *filepath, dev_info_t *devinfo, void **bufp, size_t *bufsize) { spa_t *spa; struct zfsmount zfsmount; @@ -102,32 +102,41 @@ try_load(dev_info_t *devinfo, const char EFI_STATUS status; spa = devinfo->devdata; - if (zfs_spa_init(spa) != 0) { - /* Init failed, don't report this loudly. */ + + DPRINTF("load: '%s' spa: '%s', devpath: %s\n", filepath, spa->spa_name, + devpath_str(devinfo->devpath)); + + if ((err = zfs_spa_init(spa)) != 0) { + DPRINTF("Failed to load pool '%s' (%d)\n", spa->spa_name, err); return (EFI_NOT_FOUND); } - if (zfs_mount(spa, 0, &zfsmount) != 0) { - /* Mount failed, don't report this loudly. */ + if ((err = zfs_mount(spa, 0, &zfsmount)) != 0) { + DPRINTF("Failed to mount pool '%s' (%d)\n", spa->spa_name, err); return (EFI_NOT_FOUND); } - if ((err = zfs_lookup(&zfsmount, loader_path, &dn)) != 0) { - printf("Failed to lookup %s on pool %s (%d)\n", loader_path, + if ((err = zfs_lookup(&zfsmount, filepath, &dn)) != 0) { + if (err == ENOENT) { + DPRINTF("Failed to find '%s' on pool '%s' (%d)\n", + filepath, spa->spa_name, err); + return (EFI_NOT_FOUND); + } + printf("Failed to lookup '%s' on pool '%s' (%d)\n", filepath, spa->spa_name, err); return (EFI_INVALID_PARAMETER); } if ((err = zfs_dnode_stat(spa, &dn, &st)) != 0) { - printf("Failed to lookup %s on pool %s (%d)\n", loader_path, + printf("Failed to stat '%s' on pool '%s' (%d)\n", filepath, spa->spa_name, err); return (EFI_INVALID_PARAMETER); } if ((status = bs->AllocatePool(EfiLoaderData, (UINTN)st.st_size, &buf)) != EFI_SUCCESS) { - printf("Failed to allocate load buffer for pool %s (%lu)\n", - spa->spa_name, EFI_ERROR_CODE(status)); + printf("Failed to allocate load buffer %zu for pool '%s' for '%s' " + "(%lu)\n", st.st_size, spa->spa_name, filepath, EFI_ERROR_CODE(status)); return (EFI_INVALID_PARAMETER); } @@ -144,26 +153,6 @@ try_load(dev_info_t *devinfo, const char return (EFI_SUCCESS); } -static EFI_STATUS -load(const char *loader_path, dev_info_t **devinfop, void **bufp, - size_t *bufsize) -{ - dev_info_t *devinfo; - EFI_STATUS status; - - for (devinfo = devices; devinfo != NULL; devinfo = devinfo->next) { - status = try_load(devinfo, loader_path, bufp, bufsize); - if (status == EFI_SUCCESS) { - *devinfop = devinfo; - return (EFI_SUCCESS); - } else if (status != EFI_NOT_FOUND) { - return (status); - } - } - - return (EFI_NOT_FOUND); -} - static void status() { @@ -189,11 +178,19 @@ init() zfs_init(); } +static dev_info_t * +_devices() +{ + + return (devices); +} + const boot_module_t zfs_module = { .name = "ZFS", .init = init, .probe = probe, .load = load, - .status = status + .status = status, + .devices = _devices }; Modified: head/sys/boot/efi/include/efidevp.h ============================================================================== --- head/sys/boot/efi/include/efidevp.h Fri Feb 5 14:57:41 2016 (r295319) +++ head/sys/boot/efi/include/efidevp.h Fri Feb 5 15:35:33 2016 (r295320) @@ -40,9 +40,7 @@ typedef struct _EFI_DEVICE_PATH { #define EFI_DP_TYPE_MASK 0x7F #define EFI_DP_TYPE_UNPACKED 0x80 -//#define END_DEVICE_PATH_TYPE 0xff #define END_DEVICE_PATH_TYPE 0x7f -//#define END_DEVICE_PATH_TYPE_UNPACKED 0x7f #define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xff #define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01 @@ -56,8 +54,8 @@ typedef struct _EFI_DEVICE_PATH { #define DevicePathSubType(a) ( (a)->SubType ) #define DevicePathNodeLength(a) ( ((a)->Length[0]) | ((a)->Length[1] << 8) ) #define NextDevicePathNode(a) ( (EFI_DEVICE_PATH *) ( ((UINT8 *) (a)) + DevicePathNodeLength(a))) -//#define IsDevicePathEndType(a) ( DevicePathType(a) == END_DEVICE_PATH_TYPE_UNPACKED ) -#define IsDevicePathEndType(a) ( DevicePathType(a) == END_DEVICE_PATH_TYPE ) +#define IsDevicePathType(a, t) ( DevicePathType(a) == t ) +#define IsDevicePathEndType(a) IsDevicePathType(a, END_DEVICE_PATH_TYPE) #define IsDevicePathEndSubType(a) ( (a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE ) #define IsDevicePathEnd(a) ( IsDevicePathEndType(a) && IsDevicePathEndSubType(a) ) #define IsDevicePathUnpacked(a) ( (a)->Type & EFI_DP_TYPE_UNPACKED ) @@ -285,6 +283,13 @@ typedef struct _UART_DEVICE_PATH { #define DEVICE_PATH_MESSAGING_VT_UTF8 \ { 0xad15a0d6, 0x8bec, 0x4acf, {0xa0, 0x73, 0xd0, 0x1d, 0xe7, 0x7e, 0x2d, 0x88} } +#define MSG_SATA_DP 0x12 +typedef struct _SATA_DEVICE_PATH { + EFI_DEVICE_PATH Header; + UINT16 HBAPortNumber; + UINT16 PortMultiplierPortNumber; + UINT16 Lun; +} SATA_DEVICE_PATH; #define MEDIA_DEVICE_PATH 0x04 From owner-svn-src-all@freebsd.org Fri Feb 5 15:38:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F169A77763; Fri, 5 Feb 2016 15:38:30 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F77532F; Fri, 5 Feb 2016 15:38:29 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u15FcTC9057393; Fri, 5 Feb 2016 15:38:29 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u15FcT8v057392; Fri, 5 Feb 2016 15:38:29 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201602051538.u15FcT8v057392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 5 Feb 2016 15:38:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295321 - head/sys/arm64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 15:38:30 -0000 Author: andrew Date: Fri Feb 5 15:38:28 2016 New Revision: 295321 URL: https://svnweb.freebsd.org/changeset/base/295321 Log: Implement kdb_cpu_sync_icache on arm64. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/include/kdb.h Modified: head/sys/arm64/include/kdb.h ============================================================================== --- head/sys/arm64/include/kdb.h Fri Feb 5 15:35:33 2016 (r295320) +++ head/sys/arm64/include/kdb.h Fri Feb 5 15:38:28 2016 (r295321) @@ -43,6 +43,8 @@ void kdb_cpu_set_singlestep(void); static __inline void kdb_cpu_sync_icache(unsigned char *addr, size_t size) { + + cpu_icache_sync_range((vm_offset_t)addr, size); } static __inline void From owner-svn-src-all@freebsd.org Fri Feb 5 17:11:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1278A77CE0; Fri, 5 Feb 2016 17:11:43 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 924BFD8B; Fri, 5 Feb 2016 17:11:43 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [64.201.244.132] (port=55800 helo=[10.0.0.113]) by shxd.cx with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1aRjv3-000ERH-Da; Fri, 05 Feb 2016 09:11:41 -0800 Message-ID: <1454692300.9388.110.camel@FreeBSD.org> Subject: Re: svn commit: r294560 - head/etc/rc.d From: Devin Teske To: Slawa Olhovchenkov , Bryan Drewery Cc: Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Devin Teske Date: Fri, 05 Feb 2016 09:11:40 -0800 In-Reply-To: <20160205102536.GY37895@zxy.spb.ru> References: <201601221214.u0MCE8Jk054031@repo.freebsd.org> <56B3DE8E.9020603@FreeBSD.org> <56B3E55F.3040004@FreeBSD.org> <20160205102536.GY37895@zxy.spb.ru> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: devin@shxd.cx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 17:11:43 -0000 On Fri, 2016-02-05 at 13:25 +0300, Slawa Olhovchenkov wrote: > On Thu, Feb 04, 2016 at 03:57:19PM -0800, Bryan Drewery wrote: >=20 > > On 2/4/2016 3:28 PM, Bryan Drewery wrote: > > > On 1/22/2016 4:14 AM, Dag-Erling Sm=F8rgrav wrote: > > > > Author: des > > > > Date: Fri Jan 22 12:14:08 2016 > > > > New Revision: 294560 > > > > URL: https://svnweb.freebsd.org/changeset/base/294560 > > > >=20 > > > > Log: > > > > Do not generate RSA1 or DSA keys by default. > > > >=20 > > > > Modified: > > > > head/etc/rc.d/sshd > > > >=20 > > > > Modified: head/etc/rc.d/sshd > > > > =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/etc/rc.d/sshd Fri Jan 22 12:00:56 2016 ( > > > > r294559) > > > > +++ head/etc/rc.d/sshd Fri Jan 22 12:14:08 2016 ( > > > > r294560) > > > > @@ -20,9 +20,9 @@ configtest_cmd=3D"sshd_configtest" > > > > pidfile=3D"/var/run/${name}.pid" > > > > extra_commands=3D"configtest keygen reload" > > > > =20 > > > > -: ${sshd_rsa1_enable:=3D"yes"} > > > > +: ${sshd_rsa1_enable:=3D"no"} > > > > : ${sshd_rsa_enable:=3D"yes"} > > > > -: ${sshd_dsa_enable:=3D"yes"} > > > > +: ${sshd_dsa_enable:=3D"no"} > > > > : ${sshd_ecdsa_enable:=3D"yes"} > > > > : ${sshd_ed25519_enable:=3D"yes"} > > > > =20 > > > >=20 > > >=20 > > > I think perhaps you should also remove these as having default > > > paths in > > > the .c as well and require they be enabled in the config. > > > Otherwise a > > > warning is given: > > >=20 > > > Feb 4 15:25:22 VM sshd[874]: error: Could not load host key: > > > /etc/ssh/ssh_host_dsa_key > >=20 > > This happens on every login even. It's quite annoying. >=20 > And no login too. >=20 At work, IT just provisioned an Ubuntu 15.10 box, where I had to diagnost the _exact_ same problem. Looks like Ubuntu tried the same thing and it had the same negative result. --=20 Devin From owner-svn-src-all@freebsd.org Fri Feb 5 17:14:39 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D79B6A77E8F; Fri, 5 Feb 2016 17:14:39 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A10FA1E9; Fri, 5 Feb 2016 17:14:39 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u15HEceb088512; Fri, 5 Feb 2016 17:14:38 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u15HEbRD088498; Fri, 5 Feb 2016 17:14:37 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201602051714.u15HEbRD088498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Fri, 5 Feb 2016 17:14:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295323 - head/sys/dev/e1000 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 17:14:39 -0000 Author: erj Date: Fri Feb 5 17:14:37 2016 New Revision: 295323 URL: https://svnweb.freebsd.org/changeset/base/295323 Log: Update em(4) to 7.6.1; update igb(4) to 2.5.3. Major changes: - Add i219/i219(2) hardware support. (Found on Skylake generation and newer chipsets.) - Further to the last Skylake support diff, this one also includes support for the Lewisburg chipset (i219(3)). - Add a workaround to an igb hardware errata. All 1G server products need to have IPv6 extension header parsing turned off. This should be listed in the specification updates for current 1G server products, e.g. for i350 it's errata #37 in this document: http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/ethernet-controller-i350-spec-update.pdf - Avoton (i354) PHY errata workaround added And a bunch of minor fixes, as well as #defines for things that the current em(4)/igb(4) drivers don't implement. Differential Revision: https://reviews.freebsd.org/D3162 Reviewed by: sbruno, marius, gnn Approved by: gnn MFC after: 2 weeks Sponsored by: Intel Corporation Modified: head/sys/dev/e1000/e1000_80003es2lan.c head/sys/dev/e1000/e1000_82540.c head/sys/dev/e1000/e1000_82541.c head/sys/dev/e1000/e1000_82542.c head/sys/dev/e1000/e1000_82543.c head/sys/dev/e1000/e1000_82571.h head/sys/dev/e1000/e1000_82575.c head/sys/dev/e1000/e1000_82575.h head/sys/dev/e1000/e1000_api.c head/sys/dev/e1000/e1000_defines.h head/sys/dev/e1000/e1000_hw.h head/sys/dev/e1000/e1000_i210.c head/sys/dev/e1000/e1000_ich8lan.c head/sys/dev/e1000/e1000_ich8lan.h head/sys/dev/e1000/e1000_mac.h head/sys/dev/e1000/e1000_mbx.c head/sys/dev/e1000/e1000_nvm.h head/sys/dev/e1000/e1000_osdep.h head/sys/dev/e1000/e1000_phy.c head/sys/dev/e1000/e1000_regs.h head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_em.h head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/e1000_80003es2lan.c ============================================================================== --- head/sys/dev/e1000/e1000_80003es2lan.c Fri Feb 5 16:48:03 2016 (r295322) +++ head/sys/dev/e1000/e1000_80003es2lan.c Fri Feb 5 17:14:37 2016 (r295323) @@ -851,11 +851,17 @@ static s32 e1000_reset_hw_80003es2lan(st e1000_release_phy_80003es2lan(hw); /* Disable IBIST slave mode (far-end loopback) */ - e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, - &kum_reg_data); - kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE; - e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, - kum_reg_data); + ret_val = e1000_read_kmrn_reg_80003es2lan(hw, + E1000_KMRNCTRLSTA_INBAND_PARAM, &kum_reg_data); + if (!ret_val) { + kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE; + ret_val = e1000_write_kmrn_reg_80003es2lan(hw, + E1000_KMRNCTRLSTA_INBAND_PARAM, + kum_reg_data); + if (ret_val) + DEBUGOUT("Error disabling far-end loopback\n"); + } else + DEBUGOUT("Error disabling far-end loopback\n"); ret_val = e1000_get_auto_rd_done_generic(hw); if (ret_val) @@ -911,11 +917,18 @@ static s32 e1000_init_hw_80003es2lan(str return ret_val; /* Disable IBIST slave mode (far-end loopback) */ - e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, - &kum_reg_data); - kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE; - e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, - kum_reg_data); + ret_val = + e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, + &kum_reg_data); + if (!ret_val) { + kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE; + ret_val = e1000_write_kmrn_reg_80003es2lan(hw, + E1000_KMRNCTRLSTA_INBAND_PARAM, + kum_reg_data); + if (ret_val) + DEBUGOUT("Error disabling far-end loopback\n"); + } else + DEBUGOUT("Error disabling far-end loopback\n"); /* Set the transmit descriptor write-back policy */ reg_data = E1000_READ_REG(hw, E1000_TXDCTL(0)); Modified: head/sys/dev/e1000/e1000_82540.c ============================================================================== --- head/sys/dev/e1000/e1000_82540.c Fri Feb 5 16:48:03 2016 (r295322) +++ head/sys/dev/e1000/e1000_82540.c Fri Feb 5 17:14:37 2016 (r295323) @@ -66,7 +66,7 @@ static s32 e1000_read_mac_addr_82540(st static s32 e1000_init_phy_params_82540(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; phy->addr = 1; phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; @@ -329,7 +329,7 @@ static s32 e1000_init_hw_82540(struct e1 { struct e1000_mac_info *mac = &hw->mac; u32 txdctl, ctrl_ext; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; u16 i; DEBUGFUNC("e1000_init_hw_82540"); @@ -411,7 +411,7 @@ static s32 e1000_init_hw_82540(struct e1 static s32 e1000_setup_copper_link_82540(struct e1000_hw *hw) { u32 ctrl; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; u16 data; DEBUGFUNC("e1000_setup_copper_link_82540"); @@ -498,7 +498,7 @@ out: **/ static s32 e1000_adjust_serdes_amplitude_82540(struct e1000_hw *hw) { - s32 ret_val = E1000_SUCCESS; + s32 ret_val; u16 nvm_data; DEBUGFUNC("e1000_adjust_serdes_amplitude_82540"); @@ -528,7 +528,7 @@ out: **/ static s32 e1000_set_vco_speed_82540(struct e1000_hw *hw) { - s32 ret_val = E1000_SUCCESS; + s32 ret_val; u16 default_page = 0; u16 phy_data; Modified: head/sys/dev/e1000/e1000_82541.c ============================================================================== --- head/sys/dev/e1000/e1000_82541.c Fri Feb 5 16:48:03 2016 (r295322) +++ head/sys/dev/e1000/e1000_82541.c Fri Feb 5 17:14:37 2016 (r295323) @@ -85,7 +85,7 @@ static const u16 e1000_igp_cable_length_ static s32 e1000_init_phy_params_82541(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; DEBUGFUNC("e1000_init_phy_params_82541"); @@ -295,7 +295,7 @@ void e1000_init_function_pointers_82541( **/ static s32 e1000_reset_hw_82541(struct e1000_hw *hw) { - u32 ledctl, ctrl, icr, manc; + u32 ledctl, ctrl, manc; DEBUGFUNC("e1000_reset_hw_82541"); @@ -317,6 +317,7 @@ static s32 e1000_reset_hw_82541(struct e /* Must reset the Phy before resetting the MAC */ if ((hw->mac.type == e1000_82541) || (hw->mac.type == e1000_82547)) { E1000_WRITE_REG(hw, E1000_CTRL, (ctrl | E1000_CTRL_PHY_RST)); + E1000_WRITE_FLUSH(hw); msec_delay(5); } @@ -359,7 +360,7 @@ static s32 e1000_reset_hw_82541(struct e E1000_WRITE_REG(hw, E1000_IMC, 0xFFFFFFFF); /* Clear any pending interrupt events. */ - icr = E1000_READ_REG(hw, E1000_ICR); + E1000_READ_REG(hw, E1000_ICR); return E1000_SUCCESS; } Modified: head/sys/dev/e1000/e1000_82542.c ============================================================================== --- head/sys/dev/e1000/e1000_82542.c Fri Feb 5 16:48:03 2016 (r295322) +++ head/sys/dev/e1000/e1000_82542.c Fri Feb 5 17:14:37 2016 (r295323) @@ -317,7 +317,7 @@ static s32 e1000_init_hw_82542(struct e1 static s32 e1000_setup_link_82542(struct e1000_hw *hw) { struct e1000_mac_info *mac = &hw->mac; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; DEBUGFUNC("e1000_setup_link_82542"); @@ -565,7 +565,7 @@ static void e1000_clear_hw_cntrs_82542(s * * Reads the device MAC address from the EEPROM and stores the value. **/ -static s32 e1000_read_mac_addr_82542(struct e1000_hw *hw) +s32 e1000_read_mac_addr_82542(struct e1000_hw *hw) { s32 ret_val = E1000_SUCCESS; u16 offset, nvm_data, i; Modified: head/sys/dev/e1000/e1000_82543.c ============================================================================== --- head/sys/dev/e1000/e1000_82543.c Fri Feb 5 16:48:03 2016 (r295322) +++ head/sys/dev/e1000/e1000_82543.c Fri Feb 5 17:14:37 2016 (r295323) @@ -900,7 +900,7 @@ static s32 e1000_phy_hw_reset_82543(stru **/ static s32 e1000_reset_hw_82543(struct e1000_hw *hw) { - u32 ctrl, icr; + u32 ctrl; s32 ret_val = E1000_SUCCESS; DEBUGFUNC("e1000_reset_hw_82543"); @@ -942,7 +942,7 @@ static s32 e1000_reset_hw_82543(struct e /* Masking off and clearing any pending interrupts */ E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff); - icr = E1000_READ_REG(hw, E1000_ICR); + E1000_READ_REG(hw, E1000_ICR); return ret_val; } Modified: head/sys/dev/e1000/e1000_82571.h ============================================================================== --- head/sys/dev/e1000/e1000_82571.h Fri Feb 5 16:48:03 2016 (r295322) +++ head/sys/dev/e1000/e1000_82571.h Fri Feb 5 17:14:37 2016 (r295323) @@ -50,9 +50,10 @@ #define E1000_EIAC_82574 0x000DC /* Ext. Interrupt Auto Clear - RW */ #define E1000_EIAC_MASK_82574 0x01F00000 -#define E1000_NVM_INIT_CTRL2_MNGM 0x6000 /* Manageability Operation Mode mask */ +#define E1000_IVAR_INT_ALLOC_VALID 0x8 -#define E1000_RXCFGL 0x0B634 /* TimeSync Rx EtherType & Msg Type Reg - RW */ +/* Manageability Operation Mode mask */ +#define E1000_NVM_INIT_CTRL2_MNGM 0x6000 #define E1000_BASE1000T_STATUS 10 #define E1000_IDLE_ERROR_COUNT_MASK 0xFF Modified: head/sys/dev/e1000/e1000_82575.c ============================================================================== --- head/sys/dev/e1000/e1000_82575.c Fri Feb 5 16:48:03 2016 (r295322) +++ head/sys/dev/e1000/e1000_82575.c Fri Feb 5 17:14:37 2016 (r295323) @@ -278,6 +278,11 @@ static s32 e1000_init_phy_params_82575(s if (ret_val) goto out; } + if (phy->id == M88E1543_E_PHY_ID) { + ret_val = e1000_initialize_M88E1543_phy(hw); + if (ret_val) + goto out; + } break; case IGP03E1000_E_PHY_ID: case IGP04E1000_E_PHY_ID: @@ -1235,7 +1240,7 @@ static s32 e1000_check_for_link_media_sw DEBUGFUNC("e1000_check_for_link_media_swap"); - /* Check the copper medium. */ + /* Check for copper. */ ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0); if (ret_val) return ret_val; @@ -1247,7 +1252,7 @@ static s32 e1000_check_for_link_media_sw if (data & E1000_M88E1112_STATUS_LINK) port = E1000_MEDIA_PORT_COPPER; - /* Check the other medium. */ + /* Check for other. */ ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 1); if (ret_val) return ret_val; @@ -1256,11 +1261,6 @@ static s32 e1000_check_for_link_media_sw if (ret_val) return ret_val; - /* reset page to 0 */ - ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0); - if (ret_val) - return ret_val; - if (data & E1000_M88E1112_STATUS_LINK) port = E1000_MEDIA_PORT_OTHER; @@ -1268,8 +1268,20 @@ static s32 e1000_check_for_link_media_sw if (port && (hw->dev_spec._82575.media_port != port)) { hw->dev_spec._82575.media_port = port; hw->dev_spec._82575.media_changed = TRUE; + } + + if (port == E1000_MEDIA_PORT_COPPER) { + /* reset page to 0 */ + ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0); + if (ret_val) + return ret_val; + e1000_check_for_link_82575(hw); } else { - ret_val = e1000_check_for_link_82575(hw); + e1000_check_for_link_82575(hw); + /* reset page to 0 */ + ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0); + if (ret_val) + return ret_val; } return E1000_SUCCESS; @@ -2136,7 +2148,13 @@ void e1000_rx_fifo_flush_82575(struct e1 u32 rctl, rlpml, rxdctl[4], rfctl, temp_rctl, rx_enabled; int i, ms_wait; - DEBUGFUNC("e1000_rx_fifo_workaround_82575"); + DEBUGFUNC("e1000_rx_fifo_flush_82575"); + + /* disable IPv6 options as per hardware errata */ + rfctl = E1000_READ_REG(hw, E1000_RFCTL); + rfctl |= E1000_RFCTL_IPV6_EX_DIS; + E1000_WRITE_REG(hw, E1000_RFCTL, rfctl); + if (hw->mac.type != e1000_82575 || !(E1000_READ_REG(hw, E1000_MANC) & E1000_MANC_RCV_TCO_EN)) return; @@ -2164,7 +2182,6 @@ void e1000_rx_fifo_flush_82575(struct e1 * incoming packets are rejected. Set enable and wait 2ms so that * any packet that was coming in as RCTL.EN was set is flushed */ - rfctl = E1000_READ_REG(hw, E1000_RFCTL); E1000_WRITE_REG(hw, E1000_RFCTL, rfctl & ~E1000_RFCTL_LEF); rlpml = E1000_READ_REG(hw, E1000_RLPML); @@ -2806,7 +2823,7 @@ s32 e1000_read_emi_reg(struct e1000_hw * * e1000_initialize_M88E1512_phy - Initialize M88E1512 PHY * @hw: pointer to the HW structure * - * Initialize Marverl 1512 to work correctly with Avoton. + * Initialize Marvell 1512 to work correctly with Avoton. **/ s32 e1000_initialize_M88E1512_phy(struct e1000_hw *hw) { @@ -2892,13 +2909,114 @@ out: } /** + * e1000_initialize_M88E1543_phy - Initialize M88E1543 PHY + * @hw: pointer to the HW structure + * + * Initialize Marvell 1543 to work correctly with Avoton. + **/ +s32 e1000_initialize_M88E1543_phy(struct e1000_hw *hw) +{ + struct e1000_phy_info *phy = &hw->phy; + s32 ret_val = E1000_SUCCESS; + + DEBUGFUNC("e1000_initialize_M88E1543_phy"); + + /* Check if this is correct PHY. */ + if (phy->id != M88E1543_E_PHY_ID) + goto out; + + /* Switch to PHY page 0xFF. */ + ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0x00FF); + if (ret_val) + goto out; + + ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0x214B); + if (ret_val) + goto out; + + ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x2144); + if (ret_val) + goto out; + + ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0x0C28); + if (ret_val) + goto out; + + ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x2146); + if (ret_val) + goto out; + + ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0xB233); + if (ret_val) + goto out; + + ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x214D); + if (ret_val) + goto out; + + ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0xDC0C); + if (ret_val) + goto out; + + ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x2159); + if (ret_val) + goto out; + + /* Switch to PHY page 0xFB. */ + ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0x00FB); + if (ret_val) + goto out; + + ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_3, 0xC00D); + if (ret_val) + goto out; + + /* Switch to PHY page 0x12. */ + ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0x12); + if (ret_val) + goto out; + + /* Change mode to SGMII-to-Copper */ + ret_val = phy->ops.write_reg(hw, E1000_M88E1512_MODE, 0x8001); + if (ret_val) + goto out; + + /* Switch to PHY page 1. */ + ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0x1); + if (ret_val) + goto out; + + /* Change mode to 1000BASE-X/SGMII and autoneg enable; reset */ + ret_val = phy->ops.write_reg(hw, E1000_M88E1543_FIBER_CTRL, 0x9140); + if (ret_val) + goto out; + + /* Return the PHY to page 0. */ + ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0); + if (ret_val) + goto out; + + ret_val = phy->ops.commit(hw); + if (ret_val) { + DEBUGOUT("Error committing the PHY changes\n"); + return ret_val; + } + + msec_delay(1000); +out: + return ret_val; +} + +/** * e1000_set_eee_i350 - Enable/disable EEE support * @hw: pointer to the HW structure + * @adv1g: boolean flag enabling 1G EEE advertisement + * @adv100m: boolean flag enabling 100M EEE advertisement * * Enable/disable EEE based on setting in dev_spec structure. * **/ -s32 e1000_set_eee_i350(struct e1000_hw *hw) +s32 e1000_set_eee_i350(struct e1000_hw *hw, bool adv1G, bool adv100M) { u32 ipcnfg, eeer; @@ -2914,7 +3032,16 @@ s32 e1000_set_eee_i350(struct e1000_hw * if (!(hw->dev_spec._82575.eee_disable)) { u32 eee_su = E1000_READ_REG(hw, E1000_EEE_SU); - ipcnfg |= (E1000_IPCNFG_EEE_1G_AN | E1000_IPCNFG_EEE_100M_AN); + if (adv100M) + ipcnfg |= E1000_IPCNFG_EEE_100M_AN; + else + ipcnfg &= ~E1000_IPCNFG_EEE_100M_AN; + + if (adv1G) + ipcnfg |= E1000_IPCNFG_EEE_1G_AN; + else + ipcnfg &= ~E1000_IPCNFG_EEE_1G_AN; + eeer |= (E1000_EEER_TX_LPI_EN | E1000_EEER_RX_LPI_EN | E1000_EEER_LPI_FC); @@ -2938,11 +3065,13 @@ out: /** * e1000_set_eee_i354 - Enable/disable EEE support * @hw: pointer to the HW structure + * @adv1g: boolean flag enabling 1G EEE advertisement + * @adv100m: boolean flag enabling 100M EEE advertisement * * Enable/disable EEE legacy mode based on setting in dev_spec structure. * **/ -s32 e1000_set_eee_i354(struct e1000_hw *hw) +s32 e1000_set_eee_i354(struct e1000_hw *hw, bool adv1G, bool adv100M) { struct e1000_phy_info *phy = &hw->phy; s32 ret_val = E1000_SUCCESS; @@ -2984,8 +3113,16 @@ s32 e1000_set_eee_i354(struct e1000_hw * if (ret_val) goto out; - phy_data |= E1000_EEE_ADV_100_SUPPORTED | - E1000_EEE_ADV_1000_SUPPORTED; + if (adv100M) + phy_data |= E1000_EEE_ADV_100_SUPPORTED; + else + phy_data &= ~E1000_EEE_ADV_100_SUPPORTED; + + if (adv1G) + phy_data |= E1000_EEE_ADV_1000_SUPPORTED; + else + phy_data &= ~E1000_EEE_ADV_1000_SUPPORTED; + ret_val = e1000_write_xmdio_reg(hw, E1000_EEE_ADV_ADDR_I354, E1000_EEE_ADV_DEV_I354, phy_data); Modified: head/sys/dev/e1000/e1000_82575.h ============================================================================== --- head/sys/dev/e1000/e1000_82575.h Fri Feb 5 16:48:03 2016 (r295322) +++ head/sys/dev/e1000/e1000_82575.h Fri Feb 5 17:14:37 2016 (r295323) @@ -495,10 +495,11 @@ void e1000_rlpml_set_vf(struct e1000_hw s32 e1000_promisc_set_vf(struct e1000_hw *, enum e1000_promisc_type type); u16 e1000_rxpbs_adjust_82580(u32 data); s32 e1000_read_emi_reg(struct e1000_hw *hw, u16 addr, u16 *data); -s32 e1000_set_eee_i350(struct e1000_hw *); -s32 e1000_set_eee_i354(struct e1000_hw *); +s32 e1000_set_eee_i350(struct e1000_hw *hw, bool adv1G, bool adv100M); +s32 e1000_set_eee_i354(struct e1000_hw *hw, bool adv1G, bool adv100M); s32 e1000_get_eee_status_i354(struct e1000_hw *, bool *); s32 e1000_initialize_M88E1512_phy(struct e1000_hw *hw); +s32 e1000_initialize_M88E1543_phy(struct e1000_hw *hw); /* I2C SDA and SCL timing parameters for standard mode */ #define E1000_I2C_T_HD_STA 4 Modified: head/sys/dev/e1000/e1000_api.c ============================================================================== --- head/sys/dev/e1000/e1000_api.c Fri Feb 5 16:48:03 2016 (r295322) +++ head/sys/dev/e1000/e1000_api.c Fri Feb 5 17:14:37 2016 (r295323) @@ -299,6 +299,13 @@ s32 e1000_set_mac_type(struct e1000_hw * case E1000_DEV_ID_PCH_I218_V3: mac->type = e1000_pch_lpt; break; + case E1000_DEV_ID_PCH_SPT_I219_LM: + case E1000_DEV_ID_PCH_SPT_I219_V: + case E1000_DEV_ID_PCH_SPT_I219_LM2: + case E1000_DEV_ID_PCH_SPT_I219_V2: + case E1000_DEV_ID_PCH_LBG_I219_LM3: + mac->type = e1000_pch_spt; + break; case E1000_DEV_ID_82575EB_COPPER: case E1000_DEV_ID_82575EB_FIBER_SERDES: case E1000_DEV_ID_82575GB_QUAD_COPPER: @@ -449,6 +456,7 @@ s32 e1000_setup_init_funcs(struct e1000_ case e1000_pchlan: case e1000_pch2lan: case e1000_pch_lpt: + case e1000_pch_spt: e1000_init_function_pointers_ich8lan(hw); break; case e1000_82575: Modified: head/sys/dev/e1000/e1000_defines.h ============================================================================== --- head/sys/dev/e1000/e1000_defines.h Fri Feb 5 16:48:03 2016 (r295322) +++ head/sys/dev/e1000/e1000_defines.h Fri Feb 5 17:14:37 2016 (r295323) @@ -197,6 +197,8 @@ #define E1000_RCTL_LBM_TCVR 0x000000C0 /* tcvr loopback mode */ #define E1000_RCTL_DTYP_PS 0x00000400 /* Packet Split descriptor */ #define E1000_RCTL_RDMTS_HALF 0x00000000 /* Rx desc min thresh size */ +#define E1000_RCTL_RDMTS_HEX 0x00010000 +#define E1000_RCTL_RDMTS1_HEX E1000_RCTL_RDMTS_HEX #define E1000_RCTL_MO_SHIFT 12 /* multicast offset shift */ #define E1000_RCTL_MO_3 0x00003000 /* multicast offset 15:4 */ #define E1000_RCTL_BAM 0x00008000 /* broadcast enable */ @@ -753,6 +755,12 @@ #define E1000_TSYNCTXCTL_VALID 0x00000001 /* Tx timestamp valid */ #define E1000_TSYNCTXCTL_ENABLED 0x00000010 /* enable Tx timestamping */ +/* HH Time Sync */ +#define E1000_TSYNCTXCTL_MAX_ALLOWED_DLY_MASK 0x0000F000 /* max delay */ +#define E1000_TSYNCTXCTL_SYNC_COMP_ERR 0x20000000 /* sync err */ +#define E1000_TSYNCTXCTL_SYNC_COMP 0x40000000 /* sync complete */ +#define E1000_TSYNCTXCTL_START_SYNC 0x80000000 /* initiate sync */ + #define E1000_TSYNCRXCTL_VALID 0x00000001 /* Rx timestamp valid */ #define E1000_TSYNCRXCTL_TYPE_MASK 0x0000000E /* Rx type mask */ #define E1000_TSYNCRXCTL_TYPE_L2_V2 0x00 @@ -849,6 +857,7 @@ #define E1000_M88E1543_PAGE_ADDR 0x16 /* Page Offset Register */ #define E1000_M88E1543_EEE_CTRL_1 0x0 #define E1000_M88E1543_EEE_CTRL_1_MS 0x0001 /* EEE Master/Slave */ +#define E1000_M88E1543_FIBER_CTRL 0x0 /* Fiber Control Register */ #define E1000_EEE_ADV_DEV_I354 7 #define E1000_EEE_ADV_ADDR_I354 60 #define E1000_EEE_ADV_100_SUPPORTED (1 << 1) /* 100BaseTx EEE Supported */ @@ -1020,9 +1029,7 @@ /* NVM Addressing bits based on type 0=small, 1=large */ #define E1000_EECD_ADDR_BITS 0x00000400 #define E1000_EECD_TYPE 0x00002000 /* NVM Type (1-SPI, 0-Microwire) */ -#ifndef E1000_NVM_GRANT_ATTEMPTS #define E1000_NVM_GRANT_ATTEMPTS 1000 /* NVM # attempts to gain grant */ -#endif #define E1000_EECD_AUTO_RD 0x00000200 /* NVM Auto Read done */ #define E1000_EECD_SIZE_EX_MASK 0x00007800 /* NVM Size */ #define E1000_EECD_SIZE_EX_SHIFT 11 Modified: head/sys/dev/e1000/e1000_hw.h ============================================================================== --- head/sys/dev/e1000/e1000_hw.h Fri Feb 5 16:48:03 2016 (r295322) +++ head/sys/dev/e1000/e1000_hw.h Fri Feb 5 17:14:37 2016 (r295323) @@ -137,6 +137,11 @@ struct e1000_hw; #define E1000_DEV_ID_PCH_I218_V2 0x15A1 #define E1000_DEV_ID_PCH_I218_LM3 0x15A2 /* Wildcat Point PCH */ #define E1000_DEV_ID_PCH_I218_V3 0x15A3 /* Wildcat Point PCH */ +#define E1000_DEV_ID_PCH_SPT_I219_LM 0x156F /* Sunrise Point PCH */ +#define E1000_DEV_ID_PCH_SPT_I219_V 0x1570 /* Sunrise Point PCH */ +#define E1000_DEV_ID_PCH_SPT_I219_LM2 0x15B7 /* Sunrise Point-H PCH */ +#define E1000_DEV_ID_PCH_SPT_I219_V2 0x15B8 /* Sunrise Point-H PCH */ +#define E1000_DEV_ID_PCH_LBG_I219_LM3 0x15B9 /* LEWISBURG PCH */ #define E1000_DEV_ID_82576 0x10C9 #define E1000_DEV_ID_82576_FIBER 0x10E6 #define E1000_DEV_ID_82576_SERDES 0x10E7 @@ -222,6 +227,7 @@ enum e1000_mac_type { e1000_pchlan, e1000_pch2lan, e1000_pch_lpt, + e1000_pch_spt, e1000_82575, e1000_82576, e1000_82580, @@ -805,7 +811,7 @@ struct e1000_mac_info { enum e1000_serdes_link_state serdes_link_state; bool serdes_has_link; bool tx_pkt_filtering; - u32 max_frame_size; + u32 max_frame_size; }; struct e1000_phy_info { Modified: head/sys/dev/e1000/e1000_i210.c ============================================================================== --- head/sys/dev/e1000/e1000_i210.c Fri Feb 5 16:48:03 2016 (r295322) +++ head/sys/dev/e1000/e1000_i210.c Fri Feb 5 17:14:37 2016 (r295323) @@ -883,6 +883,35 @@ static s32 e1000_pll_workaround_i210(str } /** + * e1000_get_cfg_done_i210 - Read config done bit + * @hw: pointer to the HW structure + * + * Read the management control register for the config done bit for + * completion status. NOTE: silicon which is EEPROM-less will fail trying + * to read the config done bit, so an error is *ONLY* logged and returns + * E1000_SUCCESS. If we were to return with error, EEPROM-less silicon + * would not be able to be reset or change link. + **/ +static s32 e1000_get_cfg_done_i210(struct e1000_hw *hw) +{ + s32 timeout = PHY_CFG_TIMEOUT; + u32 mask = E1000_NVM_CFG_DONE_PORT_0; + + DEBUGFUNC("e1000_get_cfg_done_i210"); + + while (timeout) { + if (E1000_READ_REG(hw, E1000_EEMNGCTL_I210) & mask) + break; + msec_delay(1); + timeout--; + } + if (!timeout) + DEBUGOUT("MNG configuration cycle has not completed.\n"); + + return E1000_SUCCESS; +} + +/** * e1000_init_hw_i210 - Init hw for I210/I211 * @hw: pointer to the HW structure * @@ -899,6 +928,7 @@ s32 e1000_init_hw_i210(struct e1000_hw * if (ret_val != E1000_SUCCESS) return ret_val; } + hw->phy.ops.get_cfg_done = e1000_get_cfg_done_i210; ret_val = e1000_init_hw_82575(hw); return ret_val; } Modified: head/sys/dev/e1000/e1000_ich8lan.c ============================================================================== --- head/sys/dev/e1000/e1000_ich8lan.c Fri Feb 5 16:48:03 2016 (r295322) +++ head/sys/dev/e1000/e1000_ich8lan.c Fri Feb 5 17:14:37 2016 (r295323) @@ -92,10 +92,13 @@ static s32 e1000_set_d3_lplu_state_ich8 bool active); static s32 e1000_read_nvm_ich8lan(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); +static s32 e1000_read_nvm_spt(struct e1000_hw *hw, u16 offset, u16 words, + u16 *data); static s32 e1000_write_nvm_ich8lan(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); static s32 e1000_validate_nvm_checksum_ich8lan(struct e1000_hw *hw); static s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw); +static s32 e1000_update_nvm_checksum_spt(struct e1000_hw *hw); static s32 e1000_valid_led_default_ich8lan(struct e1000_hw *hw, u16 *data); static s32 e1000_id_led_init_pchlan(struct e1000_hw *hw); @@ -123,6 +126,14 @@ static s32 e1000_read_flash_byte_ich8la u32 offset, u8 *data); static s32 e1000_read_flash_data_ich8lan(struct e1000_hw *hw, u32 offset, u8 size, u16 *data); +static s32 e1000_read_flash_data32_ich8lan(struct e1000_hw *hw, u32 offset, + u32 *data); +static s32 e1000_read_flash_dword_ich8lan(struct e1000_hw *hw, + u32 offset, u32 *data); +static s32 e1000_write_flash_data32_ich8lan(struct e1000_hw *hw, + u32 offset, u32 data); +static s32 e1000_retry_write_flash_dword_ich8lan(struct e1000_hw *hw, + u32 offset, u32 dword); static s32 e1000_read_flash_word_ich8lan(struct e1000_hw *hw, u32 offset, u16 *data); static s32 e1000_retry_write_flash_byte_ich8lan(struct e1000_hw *hw, @@ -232,16 +243,21 @@ static bool e1000_phy_is_accessible_pchl if (ret_val) return FALSE; out: - if (hw->mac.type == e1000_pch_lpt) { - /* Unforce SMBus mode in PHY */ - hw->phy.ops.read_reg_locked(hw, CV_SMB_CTRL, &phy_reg); - phy_reg &= ~CV_SMB_CTRL_FORCE_SMBUS; - hw->phy.ops.write_reg_locked(hw, CV_SMB_CTRL, phy_reg); + if ((hw->mac.type == e1000_pch_lpt) || + (hw->mac.type == e1000_pch_spt)) { + /* Only unforce SMBus if ME is not active */ + if (!(E1000_READ_REG(hw, E1000_FWSM) & + E1000_ICH_FWSM_FW_VALID)) { + /* Unforce SMBus mode in PHY */ + hw->phy.ops.read_reg_locked(hw, CV_SMB_CTRL, &phy_reg); + phy_reg &= ~CV_SMB_CTRL_FORCE_SMBUS; + hw->phy.ops.write_reg_locked(hw, CV_SMB_CTRL, phy_reg); - /* Unforce SMBus mode in MAC */ - mac_reg = E1000_READ_REG(hw, E1000_CTRL_EXT); - mac_reg &= ~E1000_CTRL_EXT_FORCE_SMBUS; - E1000_WRITE_REG(hw, E1000_CTRL_EXT, mac_reg); + /* Unforce SMBus mode in MAC */ + mac_reg = E1000_READ_REG(hw, E1000_CTRL_EXT); + mac_reg &= ~E1000_CTRL_EXT_FORCE_SMBUS; + E1000_WRITE_REG(hw, E1000_CTRL_EXT, mac_reg); + } } return TRUE; @@ -328,6 +344,7 @@ static s32 e1000_init_phy_workarounds_pc */ switch (hw->mac.type) { case e1000_pch_lpt: + case e1000_pch_spt: if (e1000_phy_is_accessible_pchlan(hw)) break; @@ -475,6 +492,7 @@ static s32 e1000_init_phy_params_pchlan( /* fall-through */ case e1000_pch2lan: case e1000_pch_lpt: + case e1000_pch_spt: /* In case the PHY needs to be in mdio slow mode, * set slow mode and try to get the PHY id again. */ @@ -617,36 +635,57 @@ static s32 e1000_init_nvm_params_ich8lan struct e1000_dev_spec_ich8lan *dev_spec = &hw->dev_spec.ich8lan; u32 gfpreg, sector_base_addr, sector_end_addr; u16 i; + u32 nvm_size; DEBUGFUNC("e1000_init_nvm_params_ich8lan"); - /* Can't read flash registers if the register set isn't mapped. */ nvm->type = e1000_nvm_flash_sw; - if (!hw->flash_address) { - DEBUGOUT("ERROR: Flash registers not mapped\n"); - return -E1000_ERR_CONFIG; - } - gfpreg = E1000_READ_FLASH_REG(hw, ICH_FLASH_GFPREG); + if (hw->mac.type == e1000_pch_spt) { + /* in SPT, gfpreg doesn't exist. NVM size is taken from the + * STRAP register. This is because in SPT the GbE Flash region + * is no longer accessed through the flash registers. Instead, + * the mechanism has changed, and the Flash region access + * registers are now implemented in GbE memory space. + */ + nvm->flash_base_addr = 0; + nvm_size = + (((E1000_READ_REG(hw, E1000_STRAP) >> 1) & 0x1F) + 1) + * NVM_SIZE_MULTIPLIER; + nvm->flash_bank_size = nvm_size / 2; + /* Adjust to word count */ + nvm->flash_bank_size /= sizeof(u16); + /* Set the base address for flash register access */ + hw->flash_address = hw->hw_addr + E1000_FLASH_BASE_ADDR; + } else { + /* Can't read flash registers if register set isn't mapped. */ + if (!hw->flash_address) { + DEBUGOUT("ERROR: Flash registers not mapped\n"); + return -E1000_ERR_CONFIG; + } + + gfpreg = E1000_READ_FLASH_REG(hw, ICH_FLASH_GFPREG); - /* sector_X_addr is a "sector"-aligned address (4096 bytes) - * Add 1 to sector_end_addr since this sector is included in - * the overall size. - */ - sector_base_addr = gfpreg & FLASH_GFPREG_BASE_MASK; - sector_end_addr = ((gfpreg >> 16) & FLASH_GFPREG_BASE_MASK) + 1; - - /* flash_base_addr is byte-aligned */ - nvm->flash_base_addr = sector_base_addr << FLASH_SECTOR_ADDR_SHIFT; - - /* find total size of the NVM, then cut in half since the total - * size represents two separate NVM banks. - */ - nvm->flash_bank_size = ((sector_end_addr - sector_base_addr) - << FLASH_SECTOR_ADDR_SHIFT); - nvm->flash_bank_size /= 2; - /* Adjust to word count */ - nvm->flash_bank_size /= sizeof(u16); + /* sector_X_addr is a "sector"-aligned address (4096 bytes) + * Add 1 to sector_end_addr since this sector is included in + * the overall size. + */ + sector_base_addr = gfpreg & FLASH_GFPREG_BASE_MASK; + sector_end_addr = ((gfpreg >> 16) & FLASH_GFPREG_BASE_MASK) + 1; + + /* flash_base_addr is byte-aligned */ + nvm->flash_base_addr = sector_base_addr + << FLASH_SECTOR_ADDR_SHIFT; + + /* find total size of the NVM, then cut in half since the total + * size represents two separate NVM banks. + */ + nvm->flash_bank_size = ((sector_end_addr - sector_base_addr) + << FLASH_SECTOR_ADDR_SHIFT); + nvm->flash_bank_size /= 2; + /* Adjust to word count */ + nvm->flash_bank_size /= sizeof(u16); + } nvm->word_size = E1000_SHADOW_RAM_WORDS; @@ -662,8 +701,13 @@ static s32 e1000_init_nvm_params_ich8lan /* Function Pointers */ nvm->ops.acquire = e1000_acquire_nvm_ich8lan; nvm->ops.release = e1000_release_nvm_ich8lan; - nvm->ops.read = e1000_read_nvm_ich8lan; - nvm->ops.update = e1000_update_nvm_checksum_ich8lan; + if (hw->mac.type == e1000_pch_spt) { + nvm->ops.read = e1000_read_nvm_spt; + nvm->ops.update = e1000_update_nvm_checksum_spt; + } else { + nvm->ops.read = e1000_read_nvm_ich8lan; + nvm->ops.update = e1000_update_nvm_checksum_ich8lan; + } nvm->ops.valid_led_default = e1000_valid_led_default_ich8lan; nvm->ops.validate = e1000_validate_nvm_checksum_ich8lan; nvm->ops.write = e1000_write_nvm_ich8lan; @@ -681,9 +725,6 @@ static s32 e1000_init_nvm_params_ich8lan static s32 e1000_init_mac_params_ich8lan(struct e1000_hw *hw) { struct e1000_mac_info *mac = &hw->mac; -#if defined(QV_RELEASE) || !defined(NO_PCH_LPT_B0_SUPPORT) - u16 pci_cfg; -#endif /* QV_RELEASE || !defined(NO_PCH_LPT_B0_SUPPORT) */ DEBUGFUNC("e1000_init_mac_params_ich8lan"); @@ -752,15 +793,12 @@ static s32 e1000_init_mac_params_ich8lan mac->ops.rar_set = e1000_rar_set_pch2lan; /* fall-through */ case e1000_pch_lpt: + case e1000_pch_spt: /* multicast address update for pch2 */ mac->ops.update_mc_addr_list = e1000_update_mc_addr_list_pch2lan; + /* fall-through */ case e1000_pchlan: -#if defined(QV_RELEASE) || !defined(NO_PCH_LPT_B0_SUPPORT) - /* save PCH revision_id */ - e1000_read_pci_cfg(hw, E1000_PCI_REVISION_ID_REG, &pci_cfg); - hw->revision_id = (u8)(pci_cfg &= 0x000F); -#endif /* QV_RELEASE || !defined(NO_PCH_LPT_B0_SUPPORT) */ /* check management mode */ mac->ops.check_mng_mode = e1000_check_mng_mode_pchlan; /* ID LED init */ @@ -777,7 +815,8 @@ static s32 e1000_init_mac_params_ich8lan break; } - if (mac->type == e1000_pch_lpt) { + if ((mac->type == e1000_pch_lpt) || + (mac->type == e1000_pch_spt)) { mac->rar_entry_count = E1000_PCH_LPT_RAR_ENTRIES; mac->ops.rar_set = e1000_rar_set_pch_lpt; mac->ops.setup_physical_interface = e1000_setup_copper_link_pch_lpt; @@ -1007,8 +1046,9 @@ release: /* clear FEXTNVM6 bit 8 on link down or 10/100 */ fextnvm6 &= ~E1000_FEXTNVM6_REQ_PLL_CLK; - if (!link || ((status & E1000_STATUS_SPEED_100) && - (status & E1000_STATUS_FD))) + if ((hw->phy.revision > 5) || !link || + ((status & E1000_STATUS_SPEED_100) && + (status & E1000_STATUS_FD))) goto update_fextnvm6; ret_val = hw->phy.ops.read_reg(hw, I217_INBAND_CTRL, ®); @@ -1221,6 +1261,7 @@ s32 e1000_enable_ulp_lpt_lp(struct e1000 u32 mac_reg; s32 ret_val = E1000_SUCCESS; u16 phy_reg; + u16 oem_reg = 0; if ((hw->mac.type < e1000_pch_lpt) || (hw->device_id == E1000_DEV_ID_PCH_LPT_I217_LM) || @@ -1276,6 +1317,25 @@ s32 e1000_enable_ulp_lpt_lp(struct e1000 mac_reg |= E1000_CTRL_EXT_FORCE_SMBUS; E1000_WRITE_REG(hw, E1000_CTRL_EXT, mac_reg); + /* Si workaround for ULP entry flow on i127/rev6 h/w. Enable + * LPLU and disable Gig speed when entering ULP + */ + if ((hw->phy.type == e1000_phy_i217) && (hw->phy.revision == 6)) { + ret_val = e1000_read_phy_reg_hv_locked(hw, HV_OEM_BITS, + &oem_reg); + if (ret_val) + goto release; + + phy_reg = oem_reg; + phy_reg |= HV_OEM_BITS_LPLU | HV_OEM_BITS_GBE_DIS; + + ret_val = e1000_write_phy_reg_hv_locked(hw, HV_OEM_BITS, + phy_reg); + + if (ret_val) + goto release; + } + /* Set Inband ULP Exit, Reset to SMBus mode and * Disable SMBus Release on PERST# in PHY */ @@ -1287,10 +1347,15 @@ s32 e1000_enable_ulp_lpt_lp(struct e1000 if (to_sx) { if (E1000_READ_REG(hw, E1000_WUFC) & E1000_WUFC_LNKC) phy_reg |= I218_ULP_CONFIG1_WOL_HOST; + else + phy_reg &= ~I218_ULP_CONFIG1_WOL_HOST; phy_reg |= I218_ULP_CONFIG1_STICKY_ULP; + phy_reg &= ~I218_ULP_CONFIG1_INBAND_EXIT; } else { phy_reg |= I218_ULP_CONFIG1_INBAND_EXIT; + phy_reg &= ~I218_ULP_CONFIG1_STICKY_ULP; + phy_reg &= ~I218_ULP_CONFIG1_WOL_HOST; } e1000_write_phy_reg_hv_locked(hw, I218_ULP_CONFIG1, phy_reg); @@ -1302,6 +1367,15 @@ s32 e1000_enable_ulp_lpt_lp(struct e1000 /* Commit ULP changes in PHY by starting auto ULP configuration */ phy_reg |= I218_ULP_CONFIG1_START; e1000_write_phy_reg_hv_locked(hw, I218_ULP_CONFIG1, phy_reg); + + if ((hw->phy.type == e1000_phy_i217) && (hw->phy.revision == 6) && + to_sx && (E1000_READ_REG(hw, E1000_STATUS) & E1000_STATUS_LU)) { + ret_val = e1000_write_phy_reg_hv_locked(hw, HV_OEM_BITS, + oem_reg); + if (ret_val) + goto release; + } + release: hw->phy.ops.release(hw); out: @@ -1352,10 +1426,10 @@ s32 e1000_disable_ulp_lpt_lp(struct e100 E1000_WRITE_REG(hw, E1000_H2ME, mac_reg); } - /* Poll up to 100msec for ME to clear ULP_CFG_DONE */ + /* Poll up to 300msec for ME to clear ULP_CFG_DONE. */ while (E1000_READ_REG(hw, E1000_FWSM) & E1000_FWSM_ULP_CFG_DONE) { - if (i++ == 10) { + if (i++ == 30) { ret_val = -E1000_ERR_PHY; goto out; } @@ -1429,6 +1503,8 @@ s32 e1000_disable_ulp_lpt_lp(struct e100 I218_ULP_CONFIG1_RESET_TO_SMBUS | I218_ULP_CONFIG1_WOL_HOST | I218_ULP_CONFIG1_INBAND_EXIT | + I218_ULP_CONFIG1_EN_ULP_LANPHYPC | + I218_ULP_CONFIG1_DIS_CLR_STICKY_ON_PERST | I218_ULP_CONFIG1_DISABLE_SMB_PERST); e1000_write_phy_reg_hv_locked(hw, I218_ULP_CONFIG1, phy_reg); @@ -1467,7 +1543,8 @@ out: static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw) { struct e1000_mac_info *mac = &hw->mac; - s32 ret_val; + s32 ret_val, tipg_reg = 0; + u16 emi_addr, emi_val = 0; bool link; u16 phy_reg; @@ -1500,35 +1577,119 @@ static s32 e1000_check_for_copper_link_i * the IPG and reduce Rx latency in the PHY. */ if (((hw->mac.type == e1000_pch2lan) || - (hw->mac.type == e1000_pch_lpt)) && link) { - u32 reg; - reg = E1000_READ_REG(hw, E1000_STATUS); - if (!(reg & (E1000_STATUS_FD | E1000_STATUS_SPEED_MASK))) { - u16 emi_addr; - - reg = E1000_READ_REG(hw, E1000_TIPG); - reg &= ~E1000_TIPG_IPGT_MASK; - reg |= 0xFF; - E1000_WRITE_REG(hw, E1000_TIPG, reg); + (hw->mac.type == e1000_pch_lpt) || + (hw->mac.type == e1000_pch_spt)) && link) { + u16 speed, duplex; + + e1000_get_speed_and_duplex_copper_generic(hw, &speed, &duplex); + tipg_reg = E1000_READ_REG(hw, E1000_TIPG); + tipg_reg &= ~E1000_TIPG_IPGT_MASK; + if (duplex == HALF_DUPLEX && speed == SPEED_10) { + tipg_reg |= 0xFF; /* Reduce Rx latency in analog PHY */ - ret_val = hw->phy.ops.acquire(hw); - if (ret_val) - return ret_val; + emi_val = 0; + } else if (hw->mac.type == e1000_pch_spt && + duplex == FULL_DUPLEX && speed != SPEED_1000) { + tipg_reg |= 0xC; + emi_val = 1; + } else { + /* Roll back the default values */ + tipg_reg |= 0x08; + emi_val = 1; + } - if (hw->mac.type == e1000_pch2lan) - emi_addr = I82579_RX_CONFIG; + E1000_WRITE_REG(hw, E1000_TIPG, tipg_reg); + + ret_val = hw->phy.ops.acquire(hw); + if (ret_val) + return ret_val; + + if (hw->mac.type == e1000_pch2lan) + emi_addr = I82579_RX_CONFIG; + else + emi_addr = I217_RX_CONFIG; + ret_val = e1000_write_emi_reg_locked(hw, emi_addr, emi_val); + + if (hw->mac.type == e1000_pch_lpt || + hw->mac.type == e1000_pch_spt) { + u16 phy_reg; + + hw->phy.ops.read_reg_locked(hw, I217_PLL_CLOCK_GATE_REG, + &phy_reg); + phy_reg &= ~I217_PLL_CLOCK_GATE_MASK; + if (speed == SPEED_100 || speed == SPEED_10) + phy_reg |= 0x3E8; else *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Feb 5 17:28:13 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D984A9C415; Fri, 5 Feb 2016 17:28:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B6C6EC2; Fri, 5 Feb 2016 17:28:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u15HSBZ4092021; Fri, 5 Feb 2016 17:28:11 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u15HSBvm092020; Fri, 5 Feb 2016 17:28:11 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201602051728.u15HSBvm092020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 5 Feb 2016 17:28:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295324 - head/etc/periodic/daily X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 17:28:13 -0000 Author: mav Date: Fri Feb 5 17:28:11 2016 New Revision: 295324 URL: https://svnweb.freebsd.org/changeset/base/295324 Log: Add error check to not leak logs with syntax errors in case of failed `zpool history`. MFC after: 1 month Modified: head/etc/periodic/daily/800.scrub-zfs Modified: head/etc/periodic/daily/800.scrub-zfs ============================================================================== --- head/etc/periodic/daily/800.scrub-zfs Fri Feb 5 17:14:37 2016 (r295323) +++ head/etc/periodic/daily/800.scrub-zfs Fri Feb 5 17:28:11 2016 (r295324) @@ -63,6 +63,11 @@ case "$daily_scrub_zfs_enable" in _last_scrub=$(zpool history ${pool} | \ sed -ne '2s/ .*$//p') fi + if [ -z "${_last_scrub}" ]; then + echo " skipping scrubbing of pool '${pool}':" + echo " can't get last scrubbing date" + continue + fi # Now minus last scrub (both in seconds) converted to days. _scrub_diff=$(expr -e \( $(date +%s) - \ From owner-svn-src-all@freebsd.org Fri Feb 5 18:17:38 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E635A9D654; Fri, 5 Feb 2016 18:17:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B9C11563; Fri, 5 Feb 2016 18:17:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u15IHbjN008200; Fri, 5 Feb 2016 18:17:37 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u15IHbOZ008199; Fri, 5 Feb 2016 18:17:37 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201602051817.u15IHbOZ008199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 5 Feb 2016 18:17:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295329 - head/etc/periodic/daily X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 18:17:38 -0000 Author: mav Date: Fri Feb 5 18:17:37 2016 New Revision: 295329 URL: https://svnweb.freebsd.org/changeset/base/295329 Log: Update script for modern `zpool status` output. Modified: head/etc/periodic/daily/800.scrub-zfs Modified: head/etc/periodic/daily/800.scrub-zfs ============================================================================== --- head/etc/periodic/daily/800.scrub-zfs Fri Feb 5 18:13:55 2016 (r295328) +++ head/etc/periodic/daily/800.scrub-zfs Fri Feb 5 18:17:37 2016 (r295329) @@ -78,11 +78,14 @@ case "$daily_scrub_zfs_enable" in continue fi - _status="$(zpool status ${pool} | grep scrub:)" + _status="$(zpool status ${pool} | grep scan:)" case "${_status}" in *"scrub in progress"*) echo " scrubbing of pool '${pool}' already in progress, skipping:" ;; + *"resilver in progress"*) + echo " resilvering of pool '${pool}' is in progress, skipping:" + ;; *"none requested"*) echo " starting first scrub (since reboot) of pool '${pool}':" zpool scrub ${pool} From owner-svn-src-all@freebsd.org Fri Feb 5 18:26:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAB7DA9DBDB; Fri, 5 Feb 2016 18:26:18 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ob0-x232.google.com (mail-ob0-x232.google.com [IPv6:2607:f8b0:4003:c01::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A21C734B; Fri, 5 Feb 2016 18:26:18 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-ob0-x232.google.com with SMTP id wb13so97186939obb.1; Fri, 05 Feb 2016 10:26:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=O60aX5ENCAY/QrZ73jkmZdKpOIah48rc9pV4MpStZ6s=; b=uyVHHlGiD0Bqd8cTif/8bTqYIRuhXsViU2ydSEFi1HPOKBtAsudr+29vHQsBCFcvu0 z0x/PAPA0Sv8kFk0crqZ/WchoaXNqZJ2njxyE1y4BaxEv+eWv3LjTi7V4Jye/zuUecag N819Eah6c/3llaOtwTVMhNXp63LVzxU/l9/sL5C/QApNSQ4HflhA4Ppgjy07YXxJ05zk XngkGdV91oSmECBXyhdC3KCDlNqcRHRtEK5I6MamAcNpwdTnW0wvMkBIg+ysyjNEMWha xv9K69xucxBIaBIJqxFovbhUdcM22rr4JtO9LqOFNe9V8w9Uly7uWtZuYbSgROHSEqtC +zgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=O60aX5ENCAY/QrZ73jkmZdKpOIah48rc9pV4MpStZ6s=; b=P1bBpsKfMCZQwRwdbGWK/v2CANLWdHjE4lXyZvMrvaJpM1bChAf54LvcVZ5GNF5IIU Gik5plc9U9vFmIDbFp4daIpTGIgGYak4gGVHnI/cJ7okER42DbB2ntAydRDmBgRthJ8B GzDW0Az0it4lmHhe3WGV5/6HTvswFAYG62OUlu/A0JzPFXxylcNmQqu6OukFNu2h3+Bg OwSDrCtQU4emcCAwV9sRs5q2IWuo1LBda6KHdKv/+ABf/77pA77k8T58qNnjcFONWD7u p9920fZzMMmgLOv8dyKcSd07DPlTBE4Kt3QEbSpBWpqyjGyROVVUrZDtCfzsvkZPO2PM 4TeQ== X-Gm-Message-State: AG10YOTQUMZssBweRPs8JDHBBByRvyZ1Cron5xlXGrgQusDcvkk/cO35LlQdEyt8ou9nzMjzxQ3WaQN3AYeFOA== MIME-Version: 1.0 X-Received: by 10.60.127.166 with SMTP id nh6mr13183822oeb.64.1454696777851; Fri, 05 Feb 2016 10:26:17 -0800 (PST) Sender: asomers@gmail.com Received: by 10.202.210.79 with HTTP; Fri, 5 Feb 2016 10:26:17 -0800 (PST) In-Reply-To: <201602051714.u15HEbRD088498@repo.freebsd.org> References: <201602051714.u15HEbRD088498@repo.freebsd.org> Date: Fri, 5 Feb 2016 11:26:17 -0700 X-Google-Sender-Auth: YUSfK95QudE6vUKvYiu2btCt4aY Message-ID: Subject: Re: svn commit: r295323 - head/sys/dev/e1000 From: Alan Somers To: Eric Joyner Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 18:26:19 -0000 On Fri, Feb 5, 2016 at 10:14 AM, Eric Joyner wrote: > Author: erj > Date: Fri Feb 5 17:14:37 2016 > New Revision: 295323 > URL: https://svnweb.freebsd.org/changeset/base/295323 > > Log: > Update em(4) to 7.6.1; update igb(4) to 2.5.3. > > Major changes: > > - Add i219/i219(2) hardware support. (Found on Skylake generation and newer > chipsets.) > - Further to the last Skylake support diff, this one also includes support for > the Lewisburg chipset (i219(3)). > > - Add a workaround to an igb hardware errata. > All 1G server products need to have IPv6 extension header parsing turned off. > This should be listed in the specification updates for current 1G server > products, e.g. for i350 it's errata #37 in this document: > http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/ethernet-controller-i350-spec-update.pdf > > - Avoton (i354) PHY errata workaround added > > And a bunch of minor fixes, as well as #defines for things that the current > em(4)/igb(4) drivers don't implement. > > Differential Revision: https://reviews.freebsd.org/D3162 > Reviewed by: sbruno, marius, gnn > Approved by: gnn > MFC after: 2 weeks > Sponsored by: Intel Corporation > > Modified: > head/sys/dev/e1000/e1000_80003es2lan.c > head/sys/dev/e1000/e1000_82540.c > head/sys/dev/e1000/e1000_82541.c > head/sys/dev/e1000/e1000_82542.c > head/sys/dev/e1000/e1000_82543.c > head/sys/dev/e1000/e1000_82571.h > head/sys/dev/e1000/e1000_82575.c > head/sys/dev/e1000/e1000_82575.h > head/sys/dev/e1000/e1000_api.c > head/sys/dev/e1000/e1000_defines.h > head/sys/dev/e1000/e1000_hw.h > head/sys/dev/e1000/e1000_i210.c > head/sys/dev/e1000/e1000_ich8lan.c > head/sys/dev/e1000/e1000_ich8lan.h > head/sys/dev/e1000/e1000_mac.h > head/sys/dev/e1000/e1000_mbx.c > head/sys/dev/e1000/e1000_nvm.h > head/sys/dev/e1000/e1000_osdep.h > head/sys/dev/e1000/e1000_phy.c > head/sys/dev/e1000/e1000_regs.h > head/sys/dev/e1000/if_em.c > head/sys/dev/e1000/if_em.h > head/sys/dev/e1000/if_igb.c > By any chance, might this change fix https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205759 ? From owner-svn-src-all@freebsd.org Fri Feb 5 19:35:54 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E38B9A9CB26; Fri, 5 Feb 2016 19:35:54 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5118FA6; Fri, 5 Feb 2016 19:35:54 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u15JZrKK032702; Fri, 5 Feb 2016 19:35:53 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u15JZr85032701; Fri, 5 Feb 2016 19:35:53 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201602051935.u15JZr85032701@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 5 Feb 2016 19:35:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295330 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 19:35:55 -0000 Author: markj Date: Fri Feb 5 19:35:53 2016 New Revision: 295330 URL: https://svnweb.freebsd.org/changeset/base/295330 Log: Plug a vm_page leak introduced in r292373. Reported by: vangyzen Modified: head/sys/vm/sg_pager.c Modified: head/sys/vm/sg_pager.c ============================================================================== --- head/sys/vm/sg_pager.c Fri Feb 5 18:17:37 2016 (r295329) +++ head/sys/vm/sg_pager.c Fri Feb 5 19:35:53 2016 (r295330) @@ -189,6 +189,9 @@ sg_pager_getpages(vm_object_t object, vm VM_OBJECT_WLOCK(object); TAILQ_INSERT_TAIL(&object->un_pager.sgp.sgp_pglist, page, plinks.q); vm_page_replace_checked(page, object, offset, m[0]); + vm_page_lock(m[0]); + vm_page_free(m[0]); + vm_page_unlock(m[0]); m[0] = page; page->valid = VM_PAGE_BITS_ALL; From owner-svn-src-all@freebsd.org Fri Feb 5 20:26:39 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF672A77C62; Fri, 5 Feb 2016 20:26:39 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A9DCA11FF; Fri, 5 Feb 2016 20:26:39 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id u15KQcNY077860 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 5 Feb 2016 12:26:39 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id u15KQc0R077859; Fri, 5 Feb 2016 12:26:38 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 5 Feb 2016 12:26:38 -0800 From: Gleb Smirnoff To: Mark Johnston Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r295330 - head/sys/vm Message-ID: <20160205202638.GM72286@FreeBSD.org> References: <201602051935.u15JZr85032701@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201602051935.u15JZr85032701@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 20:26:39 -0000 Mark, thanks! Me culpa :( On Fri, Feb 05, 2016 at 07:35:53PM +0000, Mark Johnston wrote: M> Author: markj M> Date: Fri Feb 5 19:35:53 2016 M> New Revision: 295330 M> URL: https://svnweb.freebsd.org/changeset/base/295330 M> M> Log: M> Plug a vm_page leak introduced in r292373. M> M> Reported by: vangyzen M> M> Modified: M> head/sys/vm/sg_pager.c M> M> Modified: head/sys/vm/sg_pager.c M> ============================================================================== M> --- head/sys/vm/sg_pager.c Fri Feb 5 18:17:37 2016 (r295329) M> +++ head/sys/vm/sg_pager.c Fri Feb 5 19:35:53 2016 (r295330) M> @@ -189,6 +189,9 @@ sg_pager_getpages(vm_object_t object, vm M> VM_OBJECT_WLOCK(object); M> TAILQ_INSERT_TAIL(&object->un_pager.sgp.sgp_pglist, page, plinks.q); M> vm_page_replace_checked(page, object, offset, m[0]); M> + vm_page_lock(m[0]); M> + vm_page_free(m[0]); M> + vm_page_unlock(m[0]); M> m[0] = page; M> page->valid = VM_PAGE_BITS_ALL; M> M> _______________________________________________ M> svn-src-all@freebsd.org mailing list M> https://lists.freebsd.org/mailman/listinfo/svn-src-all M> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Fri Feb 5 20:38:10 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F8D5A9C147; Fri, 5 Feb 2016 20:38:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5739B18D3; Fri, 5 Feb 2016 20:38:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u15Kc9kZ050031; Fri, 5 Feb 2016 20:38:09 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u15Kc96f050029; Fri, 5 Feb 2016 20:38:09 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201602052038.u15Kc96f050029@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 5 Feb 2016 20:38:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295331 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 20:38:10 -0000 Author: jhb Date: Fri Feb 5 20:38:09 2016 New Revision: 295331 URL: https://svnweb.freebsd.org/changeset/base/295331 Log: Rename aiocblist to kaiocb and use consistent variable names. Typically list is used for a structure that holds a list head in FreeBSD, not for members of a list. As such, rename 'struct aiocblist' to 'struct kaiocb' (the kernel version of 'struct aiocb'). While here, use more consistent variable names for AIO control blocks: - Use 'job' instead of 'aiocbe', 'cb', 'cbe', or 'iocb' for kernel job objects. - Use 'jobn' instead of 'cbn' for use with TAILQ_FOREACH_SAFE(). - Use 'sjob' and 'sjobn' instead of 'scb' and 'scbn' for fsync jobs. - Use 'ujob' instead of 'aiocbp', 'job', 'uaiocb', or 'uuaiocb' to hold a user pointer to a 'struct aiocb'. - Use 'ujobp' instead of 'aiocbp' for a user pointer to a 'struct aiocb *'. Reviewed by: kib Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D5125 Modified: head/sys/kern/vfs_aio.c head/sys/sys/event.h head/sys/sys/socketvar.h Modified: head/sys/kern/vfs_aio.c ============================================================================== --- head/sys/kern/vfs_aio.c Fri Feb 5 19:35:53 2016 (r295330) +++ head/sys/kern/vfs_aio.c Fri Feb 5 20:38:09 2016 (r295331) @@ -196,7 +196,7 @@ typedef struct oaiocb { } oaiocb_t; /* - * Below is a key of locks used to protect each member of struct aiocblist + * Below is a key of locks used to protect each member of struct kaiocb * aioliojob and kaioinfo and any backends. * * * - need not protected @@ -219,10 +219,10 @@ typedef struct oaiocb { * daemons. */ -struct aiocblist { - TAILQ_ENTRY(aiocblist) list; /* (b) internal list of for backend */ - TAILQ_ENTRY(aiocblist) plist; /* (a) list of jobs for each backend */ - TAILQ_ENTRY(aiocblist) allist; /* (a) list of all jobs in proc */ +struct kaiocb { + TAILQ_ENTRY(kaiocb) list; /* (b) internal list of for backend */ + TAILQ_ENTRY(kaiocb) plist; /* (a) list of jobs for each backend */ + TAILQ_ENTRY(kaiocb) allist; /* (a) list of all jobs in proc */ int jobflags; /* (a) job flags */ int jobstate; /* (b) job state */ int inputcharge; /* (*) input blockes */ @@ -235,7 +235,7 @@ struct aiocblist { struct ucred *cred; /* (*) active credential when created */ struct file *fd_file; /* (*) pointer to file structure */ struct aioliojob *lio; /* (*) optional lio job */ - struct aiocb *uuaiocb; /* (*) pointer in userspace of aiocb */ + struct aiocb *ujob; /* (*) pointer in userspace of aiocb */ struct knlist klist; /* (a) list of knotes */ struct aiocb uaiocb; /* (*) kernel I/O control block */ ksiginfo_t ksi; /* (a) realtime signal info */ @@ -244,10 +244,10 @@ struct aiocblist { }; /* jobflags */ -#define AIOCBLIST_DONE 0x01 -#define AIOCBLIST_BUFDONE 0x02 -#define AIOCBLIST_RUNDOWN 0x04 -#define AIOCBLIST_CHECKSYNC 0x08 +#define KAIOCB_DONE 0x01 +#define KAIOCB_BUFDONE 0x02 +#define KAIOCB_RUNDOWN 0x04 +#define KAIOCB_CHECKSYNC 0x08 /* * AIO process info @@ -289,12 +289,12 @@ struct kaioinfo { int kaio_count; /* (a) size of AIO queue */ int kaio_ballowed_count; /* (*) maximum number of buffers */ int kaio_buffer_count; /* (a) number of physio buffers */ - TAILQ_HEAD(,aiocblist) kaio_all; /* (a) all AIOs in a process */ - TAILQ_HEAD(,aiocblist) kaio_done; /* (a) done queue for process */ + TAILQ_HEAD(,kaiocb) kaio_all; /* (a) all AIOs in a process */ + TAILQ_HEAD(,kaiocb) kaio_done; /* (a) done queue for process */ TAILQ_HEAD(,aioliojob) kaio_liojoblist; /* (a) list of lio jobs */ - TAILQ_HEAD(,aiocblist) kaio_jobqueue; /* (a) job queue for process */ - TAILQ_HEAD(,aiocblist) kaio_bufqueue; /* (a) buffer job queue */ - TAILQ_HEAD(,aiocblist) kaio_syncqueue; /* (a) queue for aio_fsync */ + TAILQ_HEAD(,kaiocb) kaio_jobqueue; /* (a) job queue for process */ + TAILQ_HEAD(,kaiocb) kaio_bufqueue; /* (a) buffer job queue */ + TAILQ_HEAD(,kaiocb) kaio_syncqueue; /* (a) queue for aio_fsync */ struct task kaio_task; /* (*) task to kick aio processes */ }; @@ -323,28 +323,28 @@ struct aiocb_ops { static TAILQ_HEAD(,aioproc) aio_freeproc; /* (c) Idle daemons */ static struct sema aio_newproc_sem; static struct mtx aio_job_mtx; -static TAILQ_HEAD(,aiocblist) aio_jobs; /* (c) Async job list */ +static TAILQ_HEAD(,kaiocb) aio_jobs; /* (c) Async job list */ static struct unrhdr *aiod_unr; void aio_init_aioinfo(struct proc *p); static int aio_onceonly(void); -static int aio_free_entry(struct aiocblist *aiocbe); -static void aio_process_rw(struct aiocblist *aiocbe); -static void aio_process_sync(struct aiocblist *aiocbe); -static void aio_process_mlock(struct aiocblist *aiocbe); +static int aio_free_entry(struct kaiocb *job); +static void aio_process_rw(struct kaiocb *job); +static void aio_process_sync(struct kaiocb *job); +static void aio_process_mlock(struct kaiocb *job); static int aio_newproc(int *); -int aio_aqueue(struct thread *td, struct aiocb *job, +int aio_aqueue(struct thread *td, struct aiocb *ujob, struct aioliojob *lio, int type, struct aiocb_ops *ops); static void aio_physwakeup(struct bio *bp); static void aio_proc_rundown(void *arg, struct proc *p); static void aio_proc_rundown_exec(void *arg, struct proc *p, struct image_params *imgp); -static int aio_qphysio(struct proc *p, struct aiocblist *iocb); +static int aio_qphysio(struct proc *p, struct kaiocb *job); static void aio_daemon(void *param); static void aio_swake_cb(struct socket *, struct sockbuf *); static int aio_unload(void); -static void aio_bio_done_notify(struct proc *userp, - struct aiocblist *aiocbe, int type); +static void aio_bio_done_notify(struct proc *userp, struct kaiocb *job, + int type); #define DONE_BUF 1 #define DONE_QUEUE 2 static int aio_kick(struct proc *userp); @@ -488,7 +488,7 @@ aio_onceonly(void) NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); aiop_zone = uma_zcreate("AIOP", sizeof(struct aioproc), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); - aiocb_zone = uma_zcreate("AIOCB", sizeof(struct aiocblist), NULL, NULL, + aiocb_zone = uma_zcreate("AIOCB", sizeof(struct kaiocb), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); aiol_zone = uma_zcreate("AIOL", AIO_LISTIO_MAX*sizeof(intptr_t) , NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); @@ -625,29 +625,29 @@ aio_sendsig(struct proc *p, struct sigev * restart the queue scan. */ static int -aio_free_entry(struct aiocblist *aiocbe) +aio_free_entry(struct kaiocb *job) { struct kaioinfo *ki; struct aioliojob *lj; struct proc *p; - p = aiocbe->userproc; + p = job->userproc; MPASS(curproc == p); ki = p->p_aioinfo; MPASS(ki != NULL); AIO_LOCK_ASSERT(ki, MA_OWNED); - MPASS(aiocbe->jobstate == JOBST_JOBFINISHED); + MPASS(job->jobstate == JOBST_JOBFINISHED); atomic_subtract_int(&num_queue_count, 1); ki->kaio_count--; MPASS(ki->kaio_count >= 0); - TAILQ_REMOVE(&ki->kaio_done, aiocbe, plist); - TAILQ_REMOVE(&ki->kaio_all, aiocbe, allist); + TAILQ_REMOVE(&ki->kaio_done, job, plist); + TAILQ_REMOVE(&ki->kaio_all, job, allist); - lj = aiocbe->lio; + lj = job->lio; if (lj) { lj->lioj_count--; lj->lioj_finished_count--; @@ -663,14 +663,14 @@ aio_free_entry(struct aiocblist *aiocbe) } } - /* aiocbe is going away, we need to destroy any knotes */ - knlist_delete(&aiocbe->klist, curthread, 1); + /* job is going away, we need to destroy any knotes */ + knlist_delete(&job->klist, curthread, 1); PROC_LOCK(p); - sigqueue_take(&aiocbe->ksi); + sigqueue_take(&job->ksi); PROC_UNLOCK(p); - MPASS(aiocbe->bp == NULL); - aiocbe->jobstate = JOBST_NULL; + MPASS(job->bp == NULL); + job->jobstate = JOBST_NULL; AIO_UNLOCK(ki); /* @@ -682,7 +682,7 @@ aio_free_entry(struct aiocblist *aiocbe) * another process. * * Currently, all the callers of this function call it to remove - * an aiocblist from the current process' job list either via a + * a kaiocb from the current process' job list either via a * syscall or due to the current process calling exit() or * execve(). Thus, we know that p == curproc. We also know that * curthread can't exit since we are curthread. @@ -693,10 +693,10 @@ aio_free_entry(struct aiocblist *aiocbe) * at open time, but this is already true of file descriptors in * a multithreaded process. */ - if (aiocbe->fd_file) - fdrop(aiocbe->fd_file, curthread); - crfree(aiocbe->cred); - uma_zfree(aiocb_zone, aiocbe); + if (job->fd_file) + fdrop(job->fd_file, curthread); + crfree(job->cred); + uma_zfree(aiocb_zone, job); AIO_LOCK(ki); return (0); @@ -717,7 +717,7 @@ aio_proc_rundown(void *arg, struct proc { struct kaioinfo *ki; struct aioliojob *lj; - struct aiocblist *cbe, *cbn; + struct kaiocb *job, *jobn; struct file *fp; struct socket *so; int remove; @@ -737,30 +737,30 @@ restart: * Try to cancel all pending requests. This code simulates * aio_cancel on all pending I/O requests. */ - TAILQ_FOREACH_SAFE(cbe, &ki->kaio_jobqueue, plist, cbn) { + TAILQ_FOREACH_SAFE(job, &ki->kaio_jobqueue, plist, jobn) { remove = 0; mtx_lock(&aio_job_mtx); - if (cbe->jobstate == JOBST_JOBQGLOBAL) { - TAILQ_REMOVE(&aio_jobs, cbe, list); + if (job->jobstate == JOBST_JOBQGLOBAL) { + TAILQ_REMOVE(&aio_jobs, job, list); remove = 1; - } else if (cbe->jobstate == JOBST_JOBQSOCK) { - fp = cbe->fd_file; + } else if (job->jobstate == JOBST_JOBQSOCK) { + fp = job->fd_file; MPASS(fp->f_type == DTYPE_SOCKET); so = fp->f_data; - TAILQ_REMOVE(&so->so_aiojobq, cbe, list); + TAILQ_REMOVE(&so->so_aiojobq, job, list); remove = 1; - } else if (cbe->jobstate == JOBST_JOBQSYNC) { - TAILQ_REMOVE(&ki->kaio_syncqueue, cbe, list); + } else if (job->jobstate == JOBST_JOBQSYNC) { + TAILQ_REMOVE(&ki->kaio_syncqueue, job, list); remove = 1; } mtx_unlock(&aio_job_mtx); if (remove) { - cbe->jobstate = JOBST_JOBFINISHED; - cbe->uaiocb._aiocb_private.status = -1; - cbe->uaiocb._aiocb_private.error = ECANCELED; - TAILQ_REMOVE(&ki->kaio_jobqueue, cbe, plist); - aio_bio_done_notify(p, cbe, DONE_QUEUE); + job->jobstate = JOBST_JOBFINISHED; + job->uaiocb._aiocb_private.status = -1; + job->uaiocb._aiocb_private.error = ECANCELED; + TAILQ_REMOVE(&ki->kaio_jobqueue, job, plist); + aio_bio_done_notify(p, job, DONE_QUEUE); } } @@ -773,8 +773,8 @@ restart: } /* Free all completed I/O requests. */ - while ((cbe = TAILQ_FIRST(&ki->kaio_done)) != NULL) - aio_free_entry(cbe); + while ((job = TAILQ_FIRST(&ki->kaio_done)) != NULL) + aio_free_entry(job); while ((lj = TAILQ_FIRST(&ki->kaio_liojoblist)) != NULL) { if (lj->lioj_count == 0) { @@ -799,27 +799,27 @@ restart: /* * Select a job to run (called by an AIO daemon). */ -static struct aiocblist * +static struct kaiocb * aio_selectjob(struct aioproc *aiop) { - struct aiocblist *aiocbe; + struct kaiocb *job; struct kaioinfo *ki; struct proc *userp; mtx_assert(&aio_job_mtx, MA_OWNED); - TAILQ_FOREACH(aiocbe, &aio_jobs, list) { - userp = aiocbe->userproc; + TAILQ_FOREACH(job, &aio_jobs, list) { + userp = job->userproc; ki = userp->p_aioinfo; if (ki->kaio_active_count < ki->kaio_maxactive_count) { - TAILQ_REMOVE(&aio_jobs, aiocbe, list); + TAILQ_REMOVE(&aio_jobs, job, list); /* Account for currently active jobs. */ ki->kaio_active_count++; - aiocbe->jobstate = JOBST_JOBRUNNING; + job->jobstate = JOBST_JOBRUNNING; break; } } - return (aiocbe); + return (job); } /* @@ -857,7 +857,7 @@ drop: * XXX I don't think it works well for socket, pipe, and fifo. */ static void -aio_process_rw(struct aiocblist *aiocbe) +aio_process_rw(struct kaiocb *job) { struct ucred *td_savedcred; struct thread *td; @@ -871,15 +871,15 @@ aio_process_rw(struct aiocblist *aiocbe) int oublock_st, oublock_end; int inblock_st, inblock_end; - KASSERT(aiocbe->uaiocb.aio_lio_opcode == LIO_READ || - aiocbe->uaiocb.aio_lio_opcode == LIO_WRITE, - ("%s: opcode %d", __func__, aiocbe->uaiocb.aio_lio_opcode)); + KASSERT(job->uaiocb.aio_lio_opcode == LIO_READ || + job->uaiocb.aio_lio_opcode == LIO_WRITE, + ("%s: opcode %d", __func__, job->uaiocb.aio_lio_opcode)); td = curthread; td_savedcred = td->td_ucred; - td->td_ucred = aiocbe->cred; - cb = &aiocbe->uaiocb; - fp = aiocbe->fd_file; + td->td_ucred = job->cred; + cb = &job->uaiocb; + fp = job->fd_file; aiov.iov_base = (void *)(uintptr_t)cb->aio_buf; aiov.iov_len = cb->aio_nbytes; @@ -913,8 +913,8 @@ aio_process_rw(struct aiocblist *aiocbe) inblock_end = td->td_ru.ru_inblock; oublock_end = td->td_ru.ru_oublock; - aiocbe->inputcharge = inblock_end - inblock_st; - aiocbe->outputcharge = oublock_end - oublock_st; + job->inputcharge = inblock_end - inblock_st; + job->outputcharge = oublock_end - oublock_st; if ((error) && (auio.uio_resid != cnt)) { if (error == ERESTART || error == EINTR || error == EWOULDBLOCK) @@ -927,9 +927,9 @@ aio_process_rw(struct aiocblist *aiocbe) sigpipe = 0; } if (sigpipe) { - PROC_LOCK(aiocbe->userproc); - kern_psignal(aiocbe->userproc, SIGPIPE); - PROC_UNLOCK(aiocbe->userproc); + PROC_LOCK(job->userproc); + kern_psignal(job->userproc, SIGPIPE); + PROC_UNLOCK(job->userproc); } } } @@ -941,18 +941,18 @@ aio_process_rw(struct aiocblist *aiocbe) } static void -aio_process_sync(struct aiocblist *aiocbe) +aio_process_sync(struct kaiocb *job) { struct thread *td = curthread; struct ucred *td_savedcred = td->td_ucred; - struct aiocb *cb = &aiocbe->uaiocb; - struct file *fp = aiocbe->fd_file; + struct aiocb *cb = &job->uaiocb; + struct file *fp = job->fd_file; int error = 0; - KASSERT(aiocbe->uaiocb.aio_lio_opcode == LIO_SYNC, - ("%s: opcode %d", __func__, aiocbe->uaiocb.aio_lio_opcode)); + KASSERT(job->uaiocb.aio_lio_opcode == LIO_SYNC, + ("%s: opcode %d", __func__, job->uaiocb.aio_lio_opcode)); - td->td_ucred = aiocbe->cred; + td->td_ucred = job->cred; if (fp->f_vnode != NULL) error = aio_fsync_vnode(td, fp->f_vnode); cb->_aiocb_private.error = error; @@ -961,31 +961,31 @@ aio_process_sync(struct aiocblist *aiocb } static void -aio_process_mlock(struct aiocblist *aiocbe) +aio_process_mlock(struct kaiocb *job) { - struct aiocb *cb = &aiocbe->uaiocb; + struct aiocb *cb = &job->uaiocb; int error; - KASSERT(aiocbe->uaiocb.aio_lio_opcode == LIO_MLOCK, - ("%s: opcode %d", __func__, aiocbe->uaiocb.aio_lio_opcode)); + KASSERT(job->uaiocb.aio_lio_opcode == LIO_MLOCK, + ("%s: opcode %d", __func__, job->uaiocb.aio_lio_opcode)); - error = vm_mlock(aiocbe->userproc, aiocbe->cred, + error = vm_mlock(job->userproc, job->cred, __DEVOLATILE(void *, cb->aio_buf), cb->aio_nbytes); cb->_aiocb_private.error = error; cb->_aiocb_private.status = 0; } static void -aio_bio_done_notify(struct proc *userp, struct aiocblist *aiocbe, int type) +aio_bio_done_notify(struct proc *userp, struct kaiocb *job, int type) { struct aioliojob *lj; struct kaioinfo *ki; - struct aiocblist *scb, *scbn; + struct kaiocb *sjob, *sjobn; int lj_done; ki = userp->p_aioinfo; AIO_LOCK_ASSERT(ki, MA_OWNED); - lj = aiocbe->lio; + lj = job->lio; lj_done = 0; if (lj) { lj->lioj_finished_count++; @@ -993,21 +993,21 @@ aio_bio_done_notify(struct proc *userp, lj_done = 1; } if (type == DONE_QUEUE) { - aiocbe->jobflags |= AIOCBLIST_DONE; + job->jobflags |= KAIOCB_DONE; } else { - aiocbe->jobflags |= AIOCBLIST_BUFDONE; + job->jobflags |= KAIOCB_BUFDONE; } - TAILQ_INSERT_TAIL(&ki->kaio_done, aiocbe, plist); - aiocbe->jobstate = JOBST_JOBFINISHED; + TAILQ_INSERT_TAIL(&ki->kaio_done, job, plist); + job->jobstate = JOBST_JOBFINISHED; if (ki->kaio_flags & KAIO_RUNDOWN) goto notification_done; - if (aiocbe->uaiocb.aio_sigevent.sigev_notify == SIGEV_SIGNAL || - aiocbe->uaiocb.aio_sigevent.sigev_notify == SIGEV_THREAD_ID) - aio_sendsig(userp, &aiocbe->uaiocb.aio_sigevent, &aiocbe->ksi); + if (job->uaiocb.aio_sigevent.sigev_notify == SIGEV_SIGNAL || + job->uaiocb.aio_sigevent.sigev_notify == SIGEV_THREAD_ID) + aio_sendsig(userp, &job->uaiocb.aio_sigevent, &job->ksi); - KNOTE_LOCKED(&aiocbe->klist, 1); + KNOTE_LOCKED(&job->klist, 1); if (lj_done) { if (lj->lioj_signal.sigev_notify == SIGEV_KEVENT) { @@ -1024,16 +1024,16 @@ aio_bio_done_notify(struct proc *userp, } notification_done: - if (aiocbe->jobflags & AIOCBLIST_CHECKSYNC) { - TAILQ_FOREACH_SAFE(scb, &ki->kaio_syncqueue, list, scbn) { - if (aiocbe->fd_file == scb->fd_file && - aiocbe->seqno < scb->seqno) { - if (--scb->pending == 0) { + if (job->jobflags & KAIOCB_CHECKSYNC) { + TAILQ_FOREACH_SAFE(sjob, &ki->kaio_syncqueue, list, sjobn) { + if (job->fd_file == sjob->fd_file && + job->seqno < sjob->seqno) { + if (--sjob->pending == 0) { mtx_lock(&aio_job_mtx); - scb->jobstate = JOBST_JOBQGLOBAL; - TAILQ_REMOVE(&ki->kaio_syncqueue, scb, + sjob->jobstate = JOBST_JOBQGLOBAL; + TAILQ_REMOVE(&ki->kaio_syncqueue, sjob, list); - TAILQ_INSERT_TAIL(&aio_jobs, scb, list); + TAILQ_INSERT_TAIL(&aio_jobs, sjob, list); aio_kick_nowait(userp); mtx_unlock(&aio_job_mtx); } @@ -1047,10 +1047,10 @@ notification_done: } static void -aio_switch_vmspace(struct aiocblist *aiocbe) +aio_switch_vmspace(struct kaiocb *job) { - vmspace_switch_aio(aiocbe->userproc->p_vmspace); + vmspace_switch_aio(job->userproc->p_vmspace); } /* @@ -1060,7 +1060,7 @@ aio_switch_vmspace(struct aiocblist *aio static void aio_daemon(void *_id) { - struct aiocblist *aiocbe; + struct kaiocb *job; struct aioproc *aiop; struct kaioinfo *ki; struct proc *p, *userp; @@ -1105,28 +1105,28 @@ aio_daemon(void *_id) /* * Check for jobs. */ - while ((aiocbe = aio_selectjob(aiop)) != NULL) { + while ((job = aio_selectjob(aiop)) != NULL) { mtx_unlock(&aio_job_mtx); - userp = aiocbe->userproc; + userp = job->userproc; /* * Connect to process address space for user program. */ - aio_switch_vmspace(aiocbe); + aio_switch_vmspace(job); ki = userp->p_aioinfo; /* Do the I/O function. */ - switch(aiocbe->uaiocb.aio_lio_opcode) { + switch(job->uaiocb.aio_lio_opcode) { case LIO_READ: case LIO_WRITE: - aio_process_rw(aiocbe); + aio_process_rw(job); break; case LIO_SYNC: - aio_process_sync(aiocbe); + aio_process_sync(job); break; case LIO_MLOCK: - aio_process_mlock(aiocbe); + aio_process_mlock(job); break; } @@ -1136,8 +1136,8 @@ aio_daemon(void *_id) mtx_unlock(&aio_job_mtx); AIO_LOCK(ki); - TAILQ_REMOVE(&ki->kaio_jobqueue, aiocbe, plist); - aio_bio_done_notify(userp, aiocbe, DONE_QUEUE); + TAILQ_REMOVE(&ki->kaio_jobqueue, job, plist); + aio_bio_done_notify(userp, job, DONE_QUEUE); AIO_UNLOCK(ki); mtx_lock(&aio_job_mtx); @@ -1226,7 +1226,7 @@ aio_newproc(int *start) * duration of this call. */ static int -aio_qphysio(struct proc *p, struct aiocblist *aiocbe) +aio_qphysio(struct proc *p, struct kaiocb *job) { struct aiocb *cb; struct file *fp; @@ -1240,8 +1240,8 @@ aio_qphysio(struct proc *p, struct aiocb int error, ref, unmap, poff; vm_prot_t prot; - cb = &aiocbe->uaiocb; - fp = aiocbe->fd_file; + cb = &job->uaiocb; + fp = job->fd_file; if (fp == NULL || fp->f_type != DTYPE_VNODE) return (-1); @@ -1286,9 +1286,9 @@ aio_qphysio(struct proc *p, struct aiocb goto unref; } } - aiocbe->bp = bp = g_alloc_bio(); + job->bp = bp = g_alloc_bio(); if (!unmap) { - aiocbe->pbuf = pbuf = (struct buf *)getpbuf(NULL); + job->pbuf = pbuf = (struct buf *)getpbuf(NULL); BUF_KERNPROC(pbuf); } @@ -1296,12 +1296,12 @@ aio_qphysio(struct proc *p, struct aiocb ki->kaio_count++; if (!unmap) ki->kaio_buffer_count++; - lj = aiocbe->lio; + lj = job->lio; if (lj) lj->lioj_count++; - TAILQ_INSERT_TAIL(&ki->kaio_bufqueue, aiocbe, plist); - TAILQ_INSERT_TAIL(&ki->kaio_all, aiocbe, allist); - aiocbe->jobstate = JOBST_JOBQBUF; + TAILQ_INSERT_TAIL(&ki->kaio_bufqueue, job, plist); + TAILQ_INSERT_TAIL(&ki->kaio_all, job, allist); + job->jobstate = JOBST_JOBQBUF; cb->_aiocb_private.status = cb->aio_nbytes; AIO_UNLOCK(ki); @@ -1312,25 +1312,25 @@ aio_qphysio(struct proc *p, struct aiocb bp->bio_offset = cb->aio_offset; bp->bio_cmd = cb->aio_lio_opcode == LIO_WRITE ? BIO_WRITE : BIO_READ; bp->bio_dev = dev; - bp->bio_caller1 = (void *)aiocbe; + bp->bio_caller1 = (void *)job; prot = VM_PROT_READ; if (cb->aio_lio_opcode == LIO_READ) prot |= VM_PROT_WRITE; /* Less backwards than it looks */ - if ((aiocbe->npages = vm_fault_quick_hold_pages( + if ((job->npages = vm_fault_quick_hold_pages( &curproc->p_vmspace->vm_map, - (vm_offset_t)bp->bio_data, bp->bio_length, prot, aiocbe->pages, - sizeof(aiocbe->pages)/sizeof(aiocbe->pages[0]))) < 0) { + (vm_offset_t)bp->bio_data, bp->bio_length, prot, job->pages, + sizeof(job->pages)/sizeof(job->pages[0]))) < 0) { error = EFAULT; goto doerror; } if (!unmap) { pmap_qenter((vm_offset_t)pbuf->b_data, - aiocbe->pages, aiocbe->npages); + job->pages, job->npages); bp->bio_data = pbuf->b_data + poff; } else { - bp->bio_ma = aiocbe->pages; - bp->bio_ma_n = aiocbe->npages; + bp->bio_ma = job->pages; + bp->bio_ma_n = job->npages; bp->bio_ma_offset = poff; bp->bio_data = unmapped_buf; bp->bio_flags |= BIO_UNMAPPED; @@ -1347,9 +1347,9 @@ aio_qphysio(struct proc *p, struct aiocb doerror: AIO_LOCK(ki); - aiocbe->jobstate = JOBST_NULL; - TAILQ_REMOVE(&ki->kaio_bufqueue, aiocbe, plist); - TAILQ_REMOVE(&ki->kaio_all, aiocbe, allist); + job->jobstate = JOBST_NULL; + TAILQ_REMOVE(&ki->kaio_bufqueue, job, plist); + TAILQ_REMOVE(&ki->kaio_all, job, allist); ki->kaio_count--; if (!unmap) ki->kaio_buffer_count--; @@ -1358,10 +1358,10 @@ doerror: AIO_UNLOCK(ki); if (pbuf) { relpbuf(pbuf, NULL); - aiocbe->pbuf = NULL; + job->pbuf = NULL; } g_destroy_bio(bp); - aiocbe->bp = NULL; + job->bp = NULL; unref: dev_relthread(dev, ref); return (error); @@ -1373,7 +1373,7 @@ unref: static void aio_swake_cb(struct socket *so, struct sockbuf *sb) { - struct aiocblist *cb, *cbn; + struct kaiocb *job, *jobn; int opcode; SOCKBUF_LOCK_ASSERT(sb); @@ -1384,18 +1384,18 @@ aio_swake_cb(struct socket *so, struct s sb->sb_flags &= ~SB_AIO; mtx_lock(&aio_job_mtx); - TAILQ_FOREACH_SAFE(cb, &so->so_aiojobq, list, cbn) { - if (opcode == cb->uaiocb.aio_lio_opcode) { - if (cb->jobstate != JOBST_JOBQSOCK) + TAILQ_FOREACH_SAFE(job, &so->so_aiojobq, list, jobn) { + if (opcode == job->uaiocb.aio_lio_opcode) { + if (job->jobstate != JOBST_JOBQSOCK) panic("invalid queue value"); /* XXX * We don't have actual sockets backend yet, * so we simply move the requests to the generic * file I/O backend. */ - TAILQ_REMOVE(&so->so_aiojobq, cb, list); - TAILQ_INSERT_TAIL(&aio_jobs, cb, list); - aio_kick_nowait(cb->userproc); + TAILQ_REMOVE(&so->so_aiojobq, job, list); + TAILQ_INSERT_TAIL(&aio_jobs, job, list); + aio_kick_nowait(job->userproc); } } mtx_unlock(&aio_job_mtx); @@ -1515,14 +1515,14 @@ static struct aiocb_ops aiocb_ops_osigev * technique is done in this code. */ int -aio_aqueue(struct thread *td, struct aiocb *job, struct aioliojob *lj, +aio_aqueue(struct thread *td, struct aiocb *ujob, struct aioliojob *lj, int type, struct aiocb_ops *ops) { struct proc *p = td->td_proc; cap_rights_t rights; struct file *fp; struct socket *so; - struct aiocblist *aiocbe, *cb; + struct kaiocb *job, *job2; struct kaioinfo *ki; struct kevent kev; struct sockbuf *sb; @@ -1537,57 +1537,57 @@ aio_aqueue(struct thread *td, struct aio ki = p->p_aioinfo; - ops->store_status(job, -1); - ops->store_error(job, 0); - ops->store_kernelinfo(job, -1); + ops->store_status(ujob, -1); + ops->store_error(ujob, 0); + ops->store_kernelinfo(ujob, -1); if (num_queue_count >= max_queue_count || ki->kaio_count >= ki->kaio_qallowed_count) { - ops->store_error(job, EAGAIN); + ops->store_error(ujob, EAGAIN); return (EAGAIN); } - aiocbe = uma_zalloc(aiocb_zone, M_WAITOK | M_ZERO); - knlist_init_mtx(&aiocbe->klist, AIO_MTX(ki)); + job = uma_zalloc(aiocb_zone, M_WAITOK | M_ZERO); + knlist_init_mtx(&job->klist, AIO_MTX(ki)); - error = ops->copyin(job, &aiocbe->uaiocb); + error = ops->copyin(ujob, &job->uaiocb); if (error) { - ops->store_error(job, error); - uma_zfree(aiocb_zone, aiocbe); + ops->store_error(ujob, error); + uma_zfree(aiocb_zone, job); return (error); } /* XXX: aio_nbytes is later casted to signed types. */ - if (aiocbe->uaiocb.aio_nbytes > INT_MAX) { - uma_zfree(aiocb_zone, aiocbe); + if (job->uaiocb.aio_nbytes > INT_MAX) { + uma_zfree(aiocb_zone, job); return (EINVAL); } - if (aiocbe->uaiocb.aio_sigevent.sigev_notify != SIGEV_KEVENT && - aiocbe->uaiocb.aio_sigevent.sigev_notify != SIGEV_SIGNAL && - aiocbe->uaiocb.aio_sigevent.sigev_notify != SIGEV_THREAD_ID && - aiocbe->uaiocb.aio_sigevent.sigev_notify != SIGEV_NONE) { - ops->store_error(job, EINVAL); - uma_zfree(aiocb_zone, aiocbe); + if (job->uaiocb.aio_sigevent.sigev_notify != SIGEV_KEVENT && + job->uaiocb.aio_sigevent.sigev_notify != SIGEV_SIGNAL && + job->uaiocb.aio_sigevent.sigev_notify != SIGEV_THREAD_ID && + job->uaiocb.aio_sigevent.sigev_notify != SIGEV_NONE) { + ops->store_error(ujob, EINVAL); + uma_zfree(aiocb_zone, job); return (EINVAL); } - if ((aiocbe->uaiocb.aio_sigevent.sigev_notify == SIGEV_SIGNAL || - aiocbe->uaiocb.aio_sigevent.sigev_notify == SIGEV_THREAD_ID) && - !_SIG_VALID(aiocbe->uaiocb.aio_sigevent.sigev_signo)) { - uma_zfree(aiocb_zone, aiocbe); + if ((job->uaiocb.aio_sigevent.sigev_notify == SIGEV_SIGNAL || + job->uaiocb.aio_sigevent.sigev_notify == SIGEV_THREAD_ID) && + !_SIG_VALID(job->uaiocb.aio_sigevent.sigev_signo)) { + uma_zfree(aiocb_zone, job); return (EINVAL); } - ksiginfo_init(&aiocbe->ksi); + ksiginfo_init(&job->ksi); /* Save userspace address of the job info. */ - aiocbe->uuaiocb = job; + job->ujob = ujob; /* Get the opcode. */ if (type != LIO_NOP) - aiocbe->uaiocb.aio_lio_opcode = type; - opcode = aiocbe->uaiocb.aio_lio_opcode; + job->uaiocb.aio_lio_opcode = type; + opcode = job->uaiocb.aio_lio_opcode; /* * Validate the opcode and fetch the file object for the specified @@ -1597,7 +1597,7 @@ aio_aqueue(struct thread *td, struct aio * retrieve a file descriptor without knowing what the capabiltity * should be. */ - fd = aiocbe->uaiocb.aio_fildes; + fd = job->uaiocb.aio_fildes; switch (opcode) { case LIO_WRITE: error = fget_write(td, fd, @@ -1620,8 +1620,8 @@ aio_aqueue(struct thread *td, struct aio error = EINVAL; } if (error) { - uma_zfree(aiocb_zone, aiocbe); - ops->store_error(job, error); + uma_zfree(aiocb_zone, job); + ops->store_error(ujob, error); return (error); } @@ -1630,60 +1630,60 @@ aio_aqueue(struct thread *td, struct aio goto aqueue_fail; } - if (opcode != LIO_SYNC && aiocbe->uaiocb.aio_offset == -1LL) { + if (opcode != LIO_SYNC && job->uaiocb.aio_offset == -1LL) { error = EINVAL; goto aqueue_fail; } - aiocbe->fd_file = fp; + job->fd_file = fp; mtx_lock(&aio_job_mtx); jid = jobrefid++; - aiocbe->seqno = jobseqno++; + job->seqno = jobseqno++; mtx_unlock(&aio_job_mtx); - error = ops->store_kernelinfo(job, jid); + error = ops->store_kernelinfo(ujob, jid); if (error) { error = EINVAL; goto aqueue_fail; } - aiocbe->uaiocb._aiocb_private.kernelinfo = (void *)(intptr_t)jid; + job->uaiocb._aiocb_private.kernelinfo = (void *)(intptr_t)jid; if (opcode == LIO_NOP) { fdrop(fp, td); - uma_zfree(aiocb_zone, aiocbe); + uma_zfree(aiocb_zone, job); return (0); } - if (aiocbe->uaiocb.aio_sigevent.sigev_notify != SIGEV_KEVENT) + if (job->uaiocb.aio_sigevent.sigev_notify != SIGEV_KEVENT) goto no_kqueue; - evflags = aiocbe->uaiocb.aio_sigevent.sigev_notify_kevent_flags; + evflags = job->uaiocb.aio_sigevent.sigev_notify_kevent_flags; if ((evflags & ~(EV_CLEAR | EV_DISPATCH | EV_ONESHOT)) != 0) { error = EINVAL; goto aqueue_fail; } - kqfd = aiocbe->uaiocb.aio_sigevent.sigev_notify_kqueue; - kev.ident = (uintptr_t)aiocbe->uuaiocb; + kqfd = job->uaiocb.aio_sigevent.sigev_notify_kqueue; + kev.ident = (uintptr_t)job->ujob; kev.filter = EVFILT_AIO; kev.flags = EV_ADD | EV_ENABLE | EV_FLAG1 | evflags; - kev.data = (intptr_t)aiocbe; - kev.udata = aiocbe->uaiocb.aio_sigevent.sigev_value.sival_ptr; + kev.data = (intptr_t)job; + kev.udata = job->uaiocb.aio_sigevent.sigev_value.sival_ptr; error = kqfd_register(kqfd, &kev, td, 1); aqueue_fail: if (error) { if (fp) fdrop(fp, td); - uma_zfree(aiocb_zone, aiocbe); - ops->store_error(job, error); + uma_zfree(aiocb_zone, job); + ops->store_error(ujob, error); goto done; } no_kqueue: - ops->store_error(job, EINPROGRESS); - aiocbe->uaiocb._aiocb_private.error = EINPROGRESS; - aiocbe->userproc = p; - aiocbe->cred = crhold(td->td_ucred); - aiocbe->jobflags = 0; - aiocbe->lio = lj; + ops->store_error(ujob, EINPROGRESS); + job->uaiocb._aiocb_private.error = EINPROGRESS; + job->userproc = p; + job->cred = crhold(td->td_ucred); + job->jobflags = 0; + job->lio = lj; if (opcode == LIO_SYNC) goto queueit; @@ -1695,7 +1695,7 @@ no_kqueue: * socket is ready to be read or written (based on the requested * operation). * - * If it is not ready for io, then queue the aiocbe on the + * If it is not ready for io, then queue the job on the * socket, and set the flags so we get a call when sbnotify() * happens. * @@ -1710,13 +1710,13 @@ no_kqueue: sb->sb_flags |= SB_AIO; mtx_lock(&aio_job_mtx); - TAILQ_INSERT_TAIL(&so->so_aiojobq, aiocbe, list); + TAILQ_INSERT_TAIL(&so->so_aiojobq, job, list); mtx_unlock(&aio_job_mtx); AIO_LOCK(ki); - TAILQ_INSERT_TAIL(&ki->kaio_all, aiocbe, allist); - TAILQ_INSERT_TAIL(&ki->kaio_jobqueue, aiocbe, plist); - aiocbe->jobstate = JOBST_JOBQSOCK; + TAILQ_INSERT_TAIL(&ki->kaio_all, job, allist); + TAILQ_INSERT_TAIL(&ki->kaio_jobqueue, job, plist); + job->jobstate = JOBST_JOBQSOCK; ki->kaio_count++; if (lj) lj->lioj_count++; @@ -1729,12 +1729,12 @@ no_kqueue: SOCKBUF_UNLOCK(sb); } - if ((error = aio_qphysio(p, aiocbe)) == 0) + if ((error = aio_qphysio(p, job)) == 0) goto done; #if 0 if (error > 0) { - aiocbe->uaiocb._aiocb_private.error = error; - ops->store_error(job, error); + job->uaiocb._aiocb_private.error = error; + ops->store_error(ujob, error); goto done; } #endif @@ -1745,35 +1745,35 @@ queueit: ki->kaio_count++; if (lj) lj->lioj_count++; - TAILQ_INSERT_TAIL(&ki->kaio_jobqueue, aiocbe, plist); - TAILQ_INSERT_TAIL(&ki->kaio_all, aiocbe, allist); + TAILQ_INSERT_TAIL(&ki->kaio_jobqueue, job, plist); + TAILQ_INSERT_TAIL(&ki->kaio_all, job, allist); if (opcode == LIO_SYNC) { - TAILQ_FOREACH(cb, &ki->kaio_jobqueue, plist) { - if (cb->fd_file == aiocbe->fd_file && - cb->uaiocb.aio_lio_opcode != LIO_SYNC && - cb->seqno < aiocbe->seqno) { - cb->jobflags |= AIOCBLIST_CHECKSYNC; - aiocbe->pending++; + TAILQ_FOREACH(job2, &ki->kaio_jobqueue, plist) { + if (job2->fd_file == job->fd_file && + job2->uaiocb.aio_lio_opcode != LIO_SYNC && + job2->seqno < job->seqno) { + job2->jobflags |= KAIOCB_CHECKSYNC; + job->pending++; } } - TAILQ_FOREACH(cb, &ki->kaio_bufqueue, plist) { - if (cb->fd_file == aiocbe->fd_file && - cb->uaiocb.aio_lio_opcode != LIO_SYNC && - cb->seqno < aiocbe->seqno) { - cb->jobflags |= AIOCBLIST_CHECKSYNC; - aiocbe->pending++; + TAILQ_FOREACH(job2, &ki->kaio_bufqueue, plist) { + if (job2->fd_file == job->fd_file && + job2->uaiocb.aio_lio_opcode != LIO_SYNC && + job2->seqno < job->seqno) { + job2->jobflags |= KAIOCB_CHECKSYNC; + job->pending++; } } - if (aiocbe->pending != 0) { - TAILQ_INSERT_TAIL(&ki->kaio_syncqueue, aiocbe, list); - aiocbe->jobstate = JOBST_JOBQSYNC; + if (job->pending != 0) { + TAILQ_INSERT_TAIL(&ki->kaio_syncqueue, job, list); + job->jobstate = JOBST_JOBQSYNC; AIO_UNLOCK(ki); goto done; } } mtx_lock(&aio_job_mtx); - TAILQ_INSERT_TAIL(&aio_jobs, aiocbe, list); - aiocbe->jobstate = JOBST_JOBQGLOBAL; + TAILQ_INSERT_TAIL(&aio_jobs, job, list); + job->jobstate = JOBST_JOBQGLOBAL; aio_kick_nowait(p); mtx_unlock(&aio_job_mtx); AIO_UNLOCK(ki); @@ -1848,10 +1848,10 @@ aio_kick_helper(void *context, int pendi * released. */ static int -kern_aio_return(struct thread *td, struct aiocb *uaiocb, struct aiocb_ops *ops) +kern_aio_return(struct thread *td, struct aiocb *ujob, struct aiocb_ops *ops) { struct proc *p = td->td_proc; - struct aiocblist *cb; + struct kaiocb *job; struct kaioinfo *ki; int status, error; @@ -1859,26 +1859,26 @@ kern_aio_return(struct thread *td, struc if (ki == NULL) return (EINVAL); AIO_LOCK(ki); - TAILQ_FOREACH(cb, &ki->kaio_done, plist) { - if (cb->uuaiocb == uaiocb) + TAILQ_FOREACH(job, &ki->kaio_done, plist) { + if (job->ujob == ujob) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Feb 5 20:54:52 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72ED7A9CAB2; Fri, 5 Feb 2016 20:54:52 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44AADBC1; Fri, 5 Feb 2016 20:54:52 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u15Kspc2056374; Fri, 5 Feb 2016 20:54:51 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u15KspE8056373; Fri, 5 Feb 2016 20:54:51 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201602052054.u15KspE8056373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 5 Feb 2016 20:54:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295334 - head/contrib/elftoolchain/readelf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 20:54:52 -0000 Author: emaste Date: Fri Feb 5 20:54:51 2016 New Revision: 295334 URL: https://svnweb.freebsd.org/changeset/base/295334 Log: readelf: avoid accidental fallthrough in RISC-V relocations This would have printed an unknown RISC-V relocation type as a SPARC relocation. CID: 1331398 Obtained from: ELF Tool Chain r3283 Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Fri Feb 5 20:39:33 2016 (r295333) +++ head/contrib/elftoolchain/readelf/readelf.c Fri Feb 5 20:54:51 2016 (r295334) @@ -1452,6 +1452,7 @@ r_type(unsigned int mach, unsigned int t case 43: return "R_RISCV_ALIGN"; case 44: return "R_RISCV_RVC_BRANCH"; case 45: return "R_RISCV_RVC_JUMP"; + default: return ""; } case EM_SPARC: case EM_SPARCV9: From owner-svn-src-all@freebsd.org Fri Feb 5 20:56:13 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BCE5A9CB43; Fri, 5 Feb 2016 20:56:13 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06903D2D; Fri, 5 Feb 2016 20:56:12 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u15KuCYg056481; Fri, 5 Feb 2016 20:56:12 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u15KuCHm056480; Fri, 5 Feb 2016 20:56:12 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201602052056.u15KuCHm056480@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 5 Feb 2016 20:56:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295335 - head/contrib/elftoolchain/readelf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 20:56:13 -0000 Author: emaste Date: Fri Feb 5 20:56:11 2016 New Revision: 295335 URL: https://svnweb.freebsd.org/changeset/base/295335 Log: readelf: report value of unknown relocation types Obtained from: ELF Tool Chain r3387 Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Fri Feb 5 20:54:51 2016 (r295334) +++ head/contrib/elftoolchain/readelf/readelf.c Fri Feb 5 20:56:11 2016 (r295335) @@ -1053,8 +1053,9 @@ static struct { static const char * r_type(unsigned int mach, unsigned int type) { + static char s_type[32]; + switch(mach) { - case EM_NONE: return ""; case EM_386: case EM_IAMCU: switch(type) { @@ -1089,8 +1090,8 @@ r_type(unsigned int mach, unsigned int t case 35: return "R_386_TLS_DTPMOD32"; case 36: return "R_386_TLS_DTPOFF32"; case 37: return "R_386_TLS_TPOFF32"; - default: return ""; } + break; case EM_AARCH64: switch(type) { case 0: return "R_AARCH64_NONE"; @@ -1154,8 +1155,8 @@ r_type(unsigned int mach, unsigned int t case 1030: return "R_AARCH64_TLS_TPREL64"; case 1031: return "R_AARCH64_TLSDESC"; case 1032: return "R_AARCH64_IRELATIVE"; - default: return ""; } + break; case EM_ARM: switch(type) { case 0: return "R_ARM_NONE"; @@ -1206,8 +1207,8 @@ r_type(unsigned int mach, unsigned int t case 253: return "R_ARM_RABS32"; case 254: return "R_ARM_RPC24"; case 255: return "R_ARM_RBASE"; - default: return ""; } + break; case EM_IA_64: switch(type) { case 0: return "R_IA_64_NONE"; @@ -1290,8 +1291,8 @@ r_type(unsigned int mach, unsigned int t case 182: return "R_IA_64_DTPREL64MSB"; case 183: return "R_IA_64_DTPREL64LSB"; case 186: return "R_IA_64_LTOFF_DTPREL22"; - default: return ""; } + break; case EM_MIPS: switch(type) { case 0: return "R_MIPS_NONE"; @@ -1324,9 +1325,8 @@ r_type(unsigned int mach, unsigned int t case 48: return "R_MIPS_TLS_TPREL64"; case 49: return "R_MIPS_TLS_TPREL_HI16"; case 50: return "R_MIPS_TLS_TPREL_LO16"; - - default: return ""; } + break; case EM_PPC: switch(type) { case 0: return "R_PPC_NONE"; @@ -1406,8 +1406,8 @@ r_type(unsigned int mach, unsigned int t case 114: return "R_PPC_EMB_RELST_HA"; case 115: return "R_PPC_EMB_BIT_FLD"; case 116: return "R_PPC_EMB_RELSDA"; - default: return ""; } + break; case EM_RISCV: switch(type) { case 0: return "R_RISCV_NONE"; @@ -1452,8 +1452,8 @@ r_type(unsigned int mach, unsigned int t case 43: return "R_RISCV_ALIGN"; case 44: return "R_RISCV_RVC_BRANCH"; case 45: return "R_RISCV_RVC_JUMP"; - default: return ""; } + break; case EM_SPARC: case EM_SPARCV9: switch(type) { @@ -1537,8 +1537,8 @@ r_type(unsigned int mach, unsigned int t case 77: return "R_SPARC_TLS_DTPOFF64"; case 78: return "R_SPARC_TLS_TPOFF32"; case 79: return "R_SPARC_TLS_TPOFF64"; - default: return ""; } + break; case EM_X86_64: switch(type) { case 0: return "R_X86_64_NONE"; @@ -1579,10 +1579,12 @@ r_type(unsigned int mach, unsigned int t case 35: return "R_X86_64_TLSDESC_CALL"; case 36: return "R_X86_64_TLSDESC"; case 37: return "R_X86_64_IRELATIVE"; - default: return ""; } - default: return ""; + break; } + + snprintf(s_type, sizeof(s_type), "", type); + return (s_type); } static const char * From owner-svn-src-all@freebsd.org Fri Feb 5 20:57:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF0CEA9CBC0; Fri, 5 Feb 2016 20:57:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0486EA5; Fri, 5 Feb 2016 20:57:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u15KvLon056561; Fri, 5 Feb 2016 20:57:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u15KvLHu056560; Fri, 5 Feb 2016 20:57:21 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201602052057.u15KvLHu056560@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 5 Feb 2016 20:57:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295336 - head/contrib/elftoolchain/readelf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 20:57:23 -0000 Author: emaste Date: Fri Feb 5 20:57:21 2016 New Revision: 295336 URL: https://svnweb.freebsd.org/changeset/base/295336 Log: readelf: decode AArch64 TLS descriptor relocations From ELF for the ARM(R) 64-bit Architecture, table 4-19. Obtained from: ELF Tool Chain r3386 Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Fri Feb 5 20:56:11 2016 (r295335) +++ head/contrib/elftoolchain/readelf/readelf.c Fri Feb 5 20:57:21 2016 (r295336) @@ -1146,6 +1146,16 @@ r_type(unsigned int mach, unsigned int t case 311: return "R_AARCH64_ADR_GOT_PAGE"; case 312: return "R_AARCH64_LD64_GOT_LO12_NC"; case 313: return "R_AARCH64_LD64_GOTPAGE_LO15"; + case 560: return "R_AARCH64_TLSDESC_LD_PREL19"; + case 561: return "R_AARCH64_TLSDESC_ADR_PREL21"; + case 562: return "R_AARCH64_TLSDESC_ADR_PAGE21"; + case 563: return "R_AARCH64_TLSDESC_LD64_LO12"; + case 564: return "R_AARCH64_TLSDESC_ADD_LO12"; + case 565: return "R_AARCH64_TLSDESC_OFF_G1"; + case 566: return "R_AARCH64_TLSDESC_OFF_G0_NC"; + case 567: return "R_AARCH64_TLSDESC_LDR"; + case 568: return "R_AARCH64_TLSDESC_ADD"; + case 569: return "R_AARCH64_TLSDESC_CALL"; case 1024: return "R_AARCH64_COPY"; case 1025: return "R_AARCH64_GLOB_DAT"; case 1026: return "R_AARCH64_JUMP_SLOT"; From owner-svn-src-all@freebsd.org Fri Feb 5 21:22:13 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85C31A9E4B7; Fri, 5 Feb 2016 21:22:13 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x235.google.com (mail-pf0-x235.google.com [IPv6:2607:f8b0:400e:c00::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 57C8EFDD; Fri, 5 Feb 2016 21:22:13 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x235.google.com with SMTP id n128so74402893pfn.3; Fri, 05 Feb 2016 13:22:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=KoCraDauKZUQWHQoPl3qygjQrsO95RDhKqs7h4UerL0=; b=BZOC4oscEaDNL3XoxPzEsjbPP2hvHwf2unChPlMhqE87UBV2H3efP9RfeHi3GmZZW8 2L97FGJJaGbW2diPAIe5HuUI5xmygw6pble4fHeyeUHbYjeu2kP7AKqwGkbWU1+CBXJ1 d3YvQF6/o6ISCk3BxOg3Jx+yIrqtehgKvD8QMKoZiZ++rYyKqpipNXxYPNEE6fSXh13Q GFjad/I3hTmrfnBB5D2AumyiXcs8nY+sitQO9Sz5OCKWrpCw0KihqZ+JBzyBOqRbbLNt c0QCfkDG0CdIRWuDyolKJbHZByIHxj+eoB4xfcZ/+zvbm5XgjtUs8BcBpRP8MQ1yo2V2 v1AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=KoCraDauKZUQWHQoPl3qygjQrsO95RDhKqs7h4UerL0=; b=TmDwc48k6kJg4sbDEbj9s8jDf46pyacbSQXtsd2uEwe5OEsvoJFDYVMSxMP9engzpA K/CEla3GPbaAjahFdo9ufkNFw+Fgi+uYs4LEhgN2T5M+zvA0PrbKAWDBo5TpsvBIF05v 1TOSCy2CQURhX9n0qnTfobqCZKrp+R7Ko9M1qPu5c586KsAOys+Kv2ZY5z3OWcESi3fH 0bqYTPeFF2MpBrnCj76+WXQN1HXqUXDQoYUqUILKtMxFOMcXchN+u7RtFdJ5MM6PUqq5 ImjVAL5gWbUiI4s0cf6iqLYC+Wmsra6c6nH/7iSvzzQKA/be3l8TXO5KGqb1U9710Eg/ /OAg== X-Gm-Message-State: AG10YOS2Hu+M8hQIlmmikxpFZBeEmxxTz/StfmzWU2pV+w/Is0Ai64l52WBSB26OYlZ8yw== X-Received: by 10.98.43.88 with SMTP id r85mr22754776pfr.7.1454707332934; Fri, 05 Feb 2016 13:22:12 -0800 (PST) Received: from [192.168.100.83] ([199.231.240.59]) by smtp.gmail.com with ESMTPSA id tv6sm26640801pab.4.2016.02.05.13.22.10 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 05 Feb 2016 13:22:11 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r294981 - in stable/10/sys/boot: common efi efi/boot1 efi/include efi/libefi efi/loader efi/loader/arch/amd64 fdt i386/libi386 From: NGie Cooper In-Reply-To: <201601281211.u0SCBhQG058154@repo.freebsd.org> Date: Fri, 5 Feb 2016 13:22:09 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org, FreeBSD Release Engineering Team Content-Transfer-Encoding: quoted-printable Message-Id: <88C90200-1BC4-4C95-B37B-71AC33868217@gmail.com> References: <201601281211.u0SCBhQG058154@repo.freebsd.org> To: Steven Hartland X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 21:22:13 -0000 > On Jan 28, 2016, at 04:11, Steven Hartland wrote: >=20 > Author: smh > Date: Thu Jan 28 12:11:42 2016 > New Revision: 294981 > URL: https://svnweb.freebsd.org/changeset/base/294981 >=20 > Log: > MFC r281169, r293724, r293796, r294029, r294041, r294058 >=20 > MFC r281169 (by andrew): > Make global variabled only used in this file static >=20 > MFC r294058: > Make common boot file_loadraw name parameter const >=20 > MFC r294041: > Remove unused reg param from fdt_fixup_memory >=20 > MFC r293724: > Enable warnings in EFI boot code >=20 > MFC r293796: > Fix typo in libefi.c >=20 > MFC r294029: > Only build EFI components on supported compilers >=20 > Sponsored by: Multiplay This commit broke tinderbox with arm:armeb on universe10a.freebsd.org: cc1: warnings being treated as errors In file included from = /scratch/tmp/ngie/svn/sys/boot/arm/uboot/../../common/load_elf32.c:7: /scratch/tmp/ngie/svn/sys/boot/arm/uboot/../../common/load_elf.c: In = function 'elf32_parse_modmetadata': /scratch/tmp/ngie/svn/sys/boot/arm/uboot/../../common/load_elf.c:859: = warning: cast to pointer from integer of different size *** [load_elf32.o] Error code 1 Given the issues that we have with ia64 not being able to build right = now, I would consider pulling this out of ^/stable/10, fully fixing it, = then reintegrating it. Thanks, -Ngie= From owner-svn-src-all@freebsd.org Fri Feb 5 21:57:51 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEDECA9E021; Fri, 5 Feb 2016 21:57:51 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81AFF872; Fri, 5 Feb 2016 21:57:51 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u15LvoPT074392; Fri, 5 Feb 2016 21:57:50 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u15LvoXV074391; Fri, 5 Feb 2016 21:57:50 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201602052157.u15LvoXV074391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 5 Feb 2016 21:57:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295338 - head/usr.sbin/freebsd-update X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 21:57:51 -0000 Author: glebius Date: Fri Feb 5 21:57:50 2016 New Revision: 295338 URL: https://svnweb.freebsd.org/changeset/base/295338 Log: Provide a future release as an example, instead of a historical one. Modified: head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.sh Fri Feb 5 21:01:08 2016 (r295337) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Fri Feb 5 21:57:50 2016 (r295338) @@ -45,7 +45,7 @@ Options: (default: /etc/freebsd-update.conf) -F -- Force a fetch operation to proceed -k KEY -- Trust an RSA key with SHA256 hash of KEY - -r release -- Target for upgrade (e.g., 6.2-RELEASE) + -r release -- Target for upgrade (e.g., 11.1-RELEASE) -s server -- Server from which to fetch updates (default: update.FreeBSD.org) -t address -- Mail output of cron command, if any, to address From owner-svn-src-all@freebsd.org Fri Feb 5 23:50:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B46E7A9C251; Fri, 5 Feb 2016 23:50:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 871D4996; Fri, 5 Feb 2016 23:50:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u15NoFFP007072; Fri, 5 Feb 2016 23:50:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u15NoFIG007071; Fri, 5 Feb 2016 23:50:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201602052350.u15NoFIG007071@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 5 Feb 2016 23:50:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295341 - head/tests/sys/acl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 23:50:16 -0000 Author: ngie Date: Fri Feb 5 23:50:15 2016 New Revision: 295341 URL: https://svnweb.freebsd.org/changeset/base/295341 Log: Require /bin/getfacl and /bin/setfacl when running the acl tests For cases where these utilities aren't installed, the tests would fail today in a non-intuitive manner on sub-testcase #3 in each of the test scripts MFC after: 1 week Reviewed by: markj Sponsored by: EMC / Isilon Storage Division Modified: head/tests/sys/acl/Makefile Modified: head/tests/sys/acl/Makefile ============================================================================== --- head/tests/sys/acl/Makefile Fri Feb 5 23:46:33 2016 (r295340) +++ head/tests/sys/acl/Makefile Fri Feb 5 23:50:15 2016 (r295341) @@ -22,8 +22,14 @@ TAP_TESTS_SH+= 04 TEST_METADATA.$t+= required_user="root" .endfor +_ACL_PROGS= /bin/getfacl /bin/setfacl + .for t in 01 03 04 -TEST_METADATA.$t+= required_programs="/sbin/zpool" +TEST_METADATA.$t+= required_programs="/sbin/zpool ${_ACL_PROGS}" +.endfor + +.for t in 00 02 +TEST_METADATA.$t+= required_programs="${_ACL_PROGS}" .endfor .include From owner-svn-src-all@freebsd.org Sat Feb 6 02:16:50 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A524A9E4AB; Sat, 6 Feb 2016 02:16:50 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1812BB0; Sat, 6 Feb 2016 02:16:49 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u162GmTf049838; Sat, 6 Feb 2016 02:16:48 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u162Gm6c049837; Sat, 6 Feb 2016 02:16:48 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201602060216.u162Gm6c049837@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Sat, 6 Feb 2016 02:16:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295342 - head/etc/defaults X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2016 02:16:50 -0000 Author: dteske Date: Sat Feb 6 02:16:48 2016 New Revision: 295342 URL: https://svnweb.freebsd.org/changeset/base/295342 Log: Allow rc_conf_files to be redefined in rc.conf(5) With this change, it's possible to redefine rc_conf_files (e.g., sysrc rc_conf_files+=/etc/rc.conf.other) and have the boot process pick up settings in extra files. The sysrc(8) tool can be used to query/enumerate/find/manage extra files configured in this manner. Relnotes: yes Modified: head/etc/defaults/rc.conf Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Fri Feb 5 23:50:15 2016 (r295341) +++ head/etc/defaults/rc.conf Sat Feb 6 02:16:48 2016 (r295342) @@ -716,5 +716,17 @@ if [ -z "${source_rc_confs_defined}" ]; ;; esac done + for i in ${rc_conf_files}; do + case ${sourced_files} in + *:$i:*) + ;; + *) + sourced_files="${sourced_files}:$i:" + if [ -r $i ]; then + . $i + fi + ;; + esac + done } fi From owner-svn-src-all@freebsd.org Sat Feb 6 02:32:14 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAB7DA9EA53; Sat, 6 Feb 2016 02:32:14 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A95691213; Sat, 6 Feb 2016 02:32:14 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u162WDqS055373; Sat, 6 Feb 2016 02:32:13 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u162WDPw055372; Sat, 6 Feb 2016 02:32:13 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201602060232.u162WDPw055372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Sat, 6 Feb 2016 02:32:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295343 - head/etc/defaults X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2016 02:32:15 -0000 Author: dteske Date: Sat Feb 6 02:32:13 2016 New Revision: 295343 URL: https://svnweb.freebsd.org/changeset/base/295343 Log: Add comment to explain functionality of code Thanks to: rpokala Modified: head/etc/defaults/rc.conf Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Sat Feb 6 02:16:48 2016 (r295342) +++ head/etc/defaults/rc.conf Sat Feb 6 02:32:13 2016 (r295343) @@ -716,6 +716,7 @@ if [ -z "${source_rc_confs_defined}" ]; ;; esac done + # Re-do process to pick up [possibly] redined $rc_conf_files for i in ${rc_conf_files}; do case ${sourced_files} in *:$i:*) From owner-svn-src-all@freebsd.org Sat Feb 6 02:35:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C102A9EB8F; Sat, 6 Feb 2016 02:35:53 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E0C0144E; Sat, 6 Feb 2016 02:35:53 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u162Zq83055549; Sat, 6 Feb 2016 02:35:52 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u162ZqKI055548; Sat, 6 Feb 2016 02:35:52 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201602060235.u162ZqKI055548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Sat, 6 Feb 2016 02:35:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295344 - head/etc/defaults X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2016 02:35:53 -0000 Author: dteske Date: Sat Feb 6 02:35:52 2016 New Revision: 295344 URL: https://svnweb.freebsd.org/changeset/base/295344 Log: Fix typo in a comment; s/redined/redefined/ Thanks to: rpokala Modified: head/etc/defaults/rc.conf Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Sat Feb 6 02:32:13 2016 (r295343) +++ head/etc/defaults/rc.conf Sat Feb 6 02:35:52 2016 (r295344) @@ -716,7 +716,7 @@ if [ -z "${source_rc_confs_defined}" ]; ;; esac done - # Re-do process to pick up [possibly] redined $rc_conf_files + # Re-do process to pick up [possibly] redefined $rc_conf_files for i in ${rc_conf_files}; do case ${sourced_files} in *:$i:*) From owner-svn-src-all@freebsd.org Sat Feb 6 04:13:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3E97A9D4CE; Sat, 6 Feb 2016 04:13:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 959E627C; Sat, 6 Feb 2016 04:13:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u164DKBg084565; Sat, 6 Feb 2016 04:13:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u164DKk0084564; Sat, 6 Feb 2016 04:13:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201602060413.u164DKk0084564@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 6 Feb 2016 04:13:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295345 - head/tests/sys/acl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2016 04:13:21 -0000 Author: ngie Date: Sat Feb 6 04:13:20 2016 New Revision: 295345 URL: https://svnweb.freebsd.org/changeset/base/295345 Log: Use basenames for getfacl, setfacl, and zpool to work around the fact that Jenkins hardcodes image sizes to 2GB with the FreeBSD_HEAD job This is to stop the unnecessary failure emails because we've gone over the 2GB limit MFC after: 1 week X-MFC with: r295341 Sponsored by: EMC / Isilon Storage Division Modified: head/tests/sys/acl/Makefile Modified: head/tests/sys/acl/Makefile ============================================================================== --- head/tests/sys/acl/Makefile Sat Feb 6 02:35:52 2016 (r295344) +++ head/tests/sys/acl/Makefile Sat Feb 6 04:13:20 2016 (r295345) @@ -22,10 +22,10 @@ TAP_TESTS_SH+= 04 TEST_METADATA.$t+= required_user="root" .endfor -_ACL_PROGS= /bin/getfacl /bin/setfacl +_ACL_PROGS= getfacl setfacl .for t in 01 03 04 -TEST_METADATA.$t+= required_programs="/sbin/zpool ${_ACL_PROGS}" +TEST_METADATA.$t+= required_programs="zpool ${_ACL_PROGS}" .endfor .for t in 00 02 From owner-svn-src-all@freebsd.org Sat Feb 6 04:17:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE849A9D5D9; Sat, 6 Feb 2016 04:17:06 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-lb0-x231.google.com (mail-lb0-x231.google.com [IPv6:2a00:1450:4010:c04::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 771EE8EC; Sat, 6 Feb 2016 04:17:06 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-lb0-x231.google.com with SMTP id dx2so59699525lbd.3; Fri, 05 Feb 2016 20:17:06 -0800 (PST) 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=MjmT629OucaPvojCOtEtmeMYPLnkR9ziZwVn0UcnLlA=; b=uOL/T1GhU3nO7sm5Jvk50Ljv9y1EFT74789/5KRFlTknLh20ahK1m+JQPyw9EuHUSU u+dlz7Rm+vUq/w7+Elvw2b8zcZn9Fv1PQmEJjAGDjb2UaW8mZr7IcafMPjlc6Q+qcbeQ HCaLfMCEgZQYsyOulan8Kmm4jCbXIbhyiNWDus3G6BacEKw6pTfy3NgGvTXItc27b2Ga Vu/KOnFlce+e5ghSvB3L1giL9CStPH/YlCrEFPFvwG3n0rYiBkAI1Kwe9y62xWImv9y3 Xn9Wtwguk7qNuJDCC0VQaE6y/MZMi/glbRECM0mr8iC6QQCsG8J+KKU9DJ7VXc4HtTwY WyfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=MjmT629OucaPvojCOtEtmeMYPLnkR9ziZwVn0UcnLlA=; b=BmCqwa3YzGUPhj23KyyiQsQe49SVkjByym+gEWic2xmhD7tmWt/nO0jktK8Go2UEf/ K3Wf4NgPCdRcJlg7JLc6Zpu/MBek0B+aTOwX073lbaYuJ7wQMSSybnFOZ6gFPHuNl/gf 7D4xbGTX29MoYPfRb9hHFlfhIwx4LEzDwF+c/DR6WlW6eKUvvrnLE648qOR5J5kTJmn3 ifhjYYiRUuGYYzdN03psaBClaaMhNFx2ScNt/r53v44octBNNpQJadd8V4idmGxsbttM fHgxVRB78Bnj1CLFJBYUxNnPodqrDAiz/HbEDKOct75Vx3ClzGEbjjeZU5Zlw9GvVVWp 8msQ== X-Gm-Message-State: AG10YOTCKICvY0uWYhtE18mT3a+HRo8PZfE0PHc7Ib1gWVIiclWsAn7TYwFkkYg+AK/H8qZd8iNWeTNliL4qSA== MIME-Version: 1.0 X-Received: by 10.112.140.41 with SMTP id rd9mr7533061lbb.138.1454732224550; Fri, 05 Feb 2016 20:17:04 -0800 (PST) Received: by 10.112.160.133 with HTTP; Fri, 5 Feb 2016 20:17:04 -0800 (PST) In-Reply-To: <201602060413.u164DKk0084564@repo.freebsd.org> References: <201602060413.u164DKk0084564@repo.freebsd.org> Date: Fri, 5 Feb 2016 20:17:04 -0800 Message-ID: Subject: Re: svn commit: r295345 - head/tests/sys/acl From: Ngie Cooper To: Garrett Cooper Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , "jenkins-admin@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2016 04:17:07 -0000 On Fri, Feb 5, 2016 at 8:13 PM, Garrett Cooper wrote: > Author: ngie > Date: Sat Feb 6 04:13:20 2016 > New Revision: 295345 > URL: https://svnweb.freebsd.org/changeset/base/295345 > > Log: > Use basenames for getfacl, setfacl, and zpool to work around the > fact that Jenkins hardcodes image sizes to 2GB with the FreeBSD_HEAD > job > > This is to stop the unnecessary failure emails because we've gone > over the 2GB limit > > MFC after: 1 week > X-MFC with: r295341 > Sponsored by: EMC / Isilon Storage Division Ugh... I misread the Jenkins output. This isn't true: /builds/workspace/FreeBSD_HEAD/image/src/test.img: 2048.0MB (4194304 sectors) block size 32768, fragment size 4096 using 4 cylinder groups of 626.31MB, 20042 blks, 80256 inodes. super-block backups (for fsck -b #) at: Aborted by rodrigc <----------------------------------------------- HERE 64, 1282752, 2565440, 3848128,Sending interrupt signal to process I wish this was more apparent. From owner-svn-src-all@freebsd.org Sat Feb 6 08:58:12 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCEA2A9E295; Sat, 6 Feb 2016 08:58:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACB071D60; Sat, 6 Feb 2016 08:58:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u168wAWl066071; Sat, 6 Feb 2016 08:58:10 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u168wAsL066069; Sat, 6 Feb 2016 08:58:10 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201602060858.u168wAsL066069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 6 Feb 2016 08:58:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295346 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2016 08:58:12 -0000 Author: hselasky Date: Sat Feb 6 08:58:10 2016 New Revision: 295346 URL: https://svnweb.freebsd.org/changeset/base/295346 Log: MFC r294915: Fix generation of dependency rules for the LinuxKPI, the MLX5 driver and all of OFED except MLX4[EN/IB]. Sponsored by: Mellanox Technologies Approved by: re (marius) Modified: stable/10/sys/conf/files stable/10/sys/conf/kern.post.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Sat Feb 6 04:13:20 2016 (r295345) +++ stable/10/sys/conf/files Sat Feb 6 08:58:10 2016 (r295346) @@ -3646,128 +3646,91 @@ nlm/sm_inter_xdr.c optional nfslockd | # OpenFabrics Enterprise Distribution (Infiniband) ofed/include/linux/linux_compat.c optional ofed | compat_linuxkpi \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/include/linux/linux_idr.c optional ofed | compat_linuxkpi \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/include/linux/linux_radix.c optional ofed | compat_linuxkpi \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/core/addr.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/agent.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/cache.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" # XXX Mad.c must be ordered before cm.c for sysinit sets to occur in # the correct order. ofed/drivers/infiniband/core/mad.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/cm.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/ -Wno-unused-function" ofed/drivers/infiniband/core/cma.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/device.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/fmr_pool.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/iwcm.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/local_sa.c optional ofed \ no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/mad_rmpp.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/multicast.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/notice.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/packer.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/sa_query.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/smi.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/sysfs.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/ucm.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/ucma.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/ud_header.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/umem.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/user_mad.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/uverbs_cmd.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/uverbs_main.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/uverbs_marshall.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/verbs.c optional ofed \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c optional ipoib \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" #ofed/drivers/infiniband/ulp/ipoib/ipoib_fs.c optional ipoib \ -# no-depend \ # compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c optional ipoib \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c optional ipoib \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c optional ipoib \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/ipoib/ipoib_verbs.c optional ipoib \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" #ofed/drivers/infiniband/ulp/ipoib/ipoib_vlan.c optional ipoib \ -# no-depend \ # compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/sdp/sdp_bcopy.c optional sdp inet \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" ofed/drivers/infiniband/ulp/sdp/sdp_main.c optional sdp inet \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" ofed/drivers/infiniband/ulp/sdp/sdp_rx.c optional sdp inet \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" ofed/drivers/infiniband/ulp/sdp/sdp_cma.c optional sdp inet \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" ofed/drivers/infiniband/ulp/sdp/sdp_tx.c optional sdp inet \ - no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" ofed/drivers/infiniband/hw/mlx4/alias_GUID.c optional mlx4ib \ @@ -3897,95 +3860,95 @@ ofed/drivers/net/mlx4/en_tx.c optional compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" dev/mlx5/mlx5_core/mlx5_alloc.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_cmd.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_cq.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_eq.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_flow_table.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_fw.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_health.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_mad.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_main.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_mcg.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_mr.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_pagealloc.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_pd.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_port.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_qp.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_srq.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_transobj.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_uar.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_vport.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_wq.c optional mlx5 pci \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_ethtool.c optional mlx5en pci inet inet6 \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_main.c optional mlx5en pci inet inet6 \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_tx.c optional mlx5en pci inet inet6 \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_flow_table.c optional mlx5en pci inet inet6 \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_rx.c optional mlx5en pci inet inet6 \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_txrx.c optional mlx5en pci inet inet6 \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_allocator.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_av.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_catas.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_cmd.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_cq.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_eq.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_mad.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_main.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_mcg.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_memfree.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_mr.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_pd.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_profile.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_provider.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_qp.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_reset.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_srq.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_uar.c optional mthca \ - no-depend compile-with "${OFED_C}" + compile-with "${OFED_C}" # crypto support opencrypto/cast.c optional crypto | ipsec Modified: stable/10/sys/conf/kern.post.mk ============================================================================== --- stable/10/sys/conf/kern.post.mk Sat Feb 6 04:13:20 2016 (r295345) +++ stable/10/sys/conf/kern.post.mk Sat Feb 6 08:58:10 2016 (r295346) @@ -183,12 +183,20 @@ genassym.o: $S/$M/$M/genassym.c ${SYSTEM_OBJS} genassym.o vers.o: opt_global.h -# We have "special" -I include paths for opensolaris/zfs files in 'depend'. -CFILES_NOZFS= ${CFILES:N*/opensolaris/*} -SFILES_NOZFS= ${SFILES:N*/opensolaris/*} +# Normal files first +CFILES_NORMAL= ${CFILES:N*/opensolaris/*:N*/ofed/*:N*/dev/mlx5/*} +SFILES_NORMAL= ${SFILES:N*/opensolaris/*} + +# We have "special" -I include paths for zfs/dtrace files in 'depend'. CFILES_ZFS= ${CFILES:M*/opensolaris/*} SFILES_ZFS= ${SFILES:M*/opensolaris/*} +# We have "special" -I include paths for OFED. +CFILES_OFED=${CFILES:M*/ofed/*} + +# We have "special" -I include paths for MLX5. +CFILES_MLX5=${CFILES:M*/dev/mlx5/*} + kernel-depend: .depend # The argument list can be very long, so use make -V and xargs to # pass it to mkdep. @@ -196,17 +204,21 @@ SRCS= assym.s vnode_if.h ${BEFORE_DEPEND ${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} \ ${MFILES:T:S/.m$/.h/} .depend: .PRECIOUS ${SRCS} - rm -f .newdep - ${MAKE} -V CFILES_NOZFS -V SYSTEM_CFILES -V GEN_CFILES | \ - MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f .newdep ${CFLAGS} + rm -f ${.TARGET}.tmp +# C files + ${MAKE} -V CFILES_NORMAL -V SYSTEM_CFILES -V GEN_CFILES | \ + MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f ${.TARGET}.tmp ${CFLAGS} ${MAKE} -V CFILES_ZFS | \ - MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f .newdep ${ZFS_CFLAGS} - ${MAKE} -V SFILES_NOZFS | \ - MKDEP_CPP="${CC} -E" xargs mkdep -a -f .newdep ${ASM_CFLAGS} + MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f ${.TARGET}.tmp ${ZFS_CFLAGS} + ${MAKE} -V CFILES_OFED -V CFILES_MLX5 | \ + MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f ${.TARGET}.tmp \ + ${CFLAGS} ${OFEDINCLUDES} +# Assembly files + ${MAKE} -V SFILES_NORMAL | \ + MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f ${.TARGET}.tmp ${ASM_CFLAGS} ${MAKE} -V SFILES_ZFS | \ - MKDEP_CPP="${CC} -E" xargs mkdep -a -f .newdep ${ZFS_ASM_CFLAGS} - rm -f .depend - mv .newdep .depend + MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f ${.TARGET}.tmp ${ZFS_ASM_CFLAGS} + mv ${.TARGET}.tmp ${.TARGET} _ILINKS= machine .if ${MACHINE} != ${MACHINE_CPUARCH} From owner-svn-src-all@freebsd.org Sat Feb 6 09:01:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EB7AA9E71B; Sat, 6 Feb 2016 09:01:04 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53BFB1EF; Sat, 6 Feb 2016 09:01:04 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u16913ws068170; Sat, 6 Feb 2016 09:01:03 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u169131k068169; Sat, 6 Feb 2016 09:01:03 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201602060901.u169131k068169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 6 Feb 2016 09:01:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295347 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2016 09:01:04 -0000 Author: mjg Date: Sat Feb 6 09:01:03 2016 New Revision: 295347 URL: https://svnweb.freebsd.org/changeset/base/295347 Log: fork: ansify sys_pdfork No functional changes. Modified: head/sys/kern/kern_fork.c Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Sat Feb 6 08:58:10 2016 (r295346) +++ head/sys/kern/kern_fork.c Sat Feb 6 09:01:03 2016 (r295347) @@ -117,9 +117,7 @@ sys_fork(struct thread *td, struct fork_ /* ARGUSED */ int -sys_pdfork(td, uap) - struct thread *td; - struct pdfork_args *uap; +sys_pdfork(struct thread *td, struct pdfork_args *uap) { struct fork_req fr; int error, fd, pid; From owner-svn-src-all@freebsd.org Sat Feb 6 11:16:17 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D56CA9FB8E; Sat, 6 Feb 2016 11:16:17 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2AD41B78; Sat, 6 Feb 2016 11:16:16 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u16BGF35007056; Sat, 6 Feb 2016 11:16:15 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u16BGFvt007055; Sat, 6 Feb 2016 11:16:15 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201602061116.u16BGFvt007055@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sat, 6 Feb 2016 11:16:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295348 - head/sys/cddl/dev/fbt/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2016 11:16:17 -0000 Author: mmel Date: Sat Feb 6 11:16:15 2016 New Revision: 295348 URL: https://svnweb.freebsd.org/changeset/base/295348 Log: ARM: Rename remaining ARMv4 specific function in DTrace code. I missed it in r295319. Pointed by: tuexen Modified: head/sys/cddl/dev/fbt/arm/fbt_isa.c Modified: head/sys/cddl/dev/fbt/arm/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/arm/fbt_isa.c Sat Feb 6 09:01:03 2016 (r295347) +++ head/sys/cddl/dev/fbt/arm/fbt_isa.c Sat Feb 6 11:16:15 2016 (r295348) @@ -83,7 +83,7 @@ fbt_patch_tracepoint(fbt_probe_t *fbt, f { *fbt->fbtp_patchpoint = val; - cpu_icache_sync_range((vm_offset_t)fbt->fbtp_patchpoint, sizeof(val)); + icache_sync((vm_offset_t)fbt->fbtp_patchpoint, sizeof(val)); } int From owner-svn-src-all@freebsd.org Sat Feb 6 14:03:32 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA280A9ED42; Sat, 6 Feb 2016 14:03:32 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6FE87F4; Sat, 6 Feb 2016 14:03:32 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u16E3V6N056484; Sat, 6 Feb 2016 14:03:31 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u16E3VIp056483; Sat, 6 Feb 2016 14:03:31 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201602061403.u16E3VIp056483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Sat, 6 Feb 2016 14:03:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295350 - stable/10/lib/libc/string X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2016 14:03:33 -0000 Author: wblock (doc committer) Date: Sat Feb 6 14:03:31 2016 New Revision: 295350 URL: https://svnweb.freebsd.org/changeset/base/295350 Log: MFC r294597: Add a standards compliance note for strtok_r Approved by: re (marius@) Modified: stable/10/lib/libc/string/strtok.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/string/strtok.3 ============================================================================== --- stable/10/lib/libc/string/strtok.3 Sat Feb 6 13:39:20 2016 (r295349) +++ stable/10/lib/libc/string/strtok.3 Sat Feb 6 14:03:31 2016 (r295350) @@ -44,7 +44,7 @@ .\" @(#)strtok.3 8.2 (Berkeley) 2/3/94 .\" $FreeBSD$ .\" -.Dd November 27, 1998 +.Dd January 22, 2016 .Dt STRTOK 3 .Os .Sh NAME @@ -149,6 +149,11 @@ The function conforms to .St -isoC . +The +.Fn strtok_r +function +conforms to +.St -p1003.1-2001 . .Sh AUTHORS .An Wes Peters , Softweyr LLC: From owner-svn-src-all@freebsd.org Sat Feb 6 14:19:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 327BFA9F458; Sat, 6 Feb 2016 14:19:22 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id F2CEAE02; Sat, 6 Feb 2016 14:19:21 +0000 (UTC) (envelope-from des@des.no) Received: from desk.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 91C4E5CAC; Sat, 6 Feb 2016 14:19:14 +0000 (UTC) Received: by desk.des.no (Postfix, from userid 1001) id 083344B2B4; Sat, 6 Feb 2016 15:19:13 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Bryan Drewery Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r294560 - head/etc/rc.d References: <201601221214.u0MCE8Jk054031@repo.freebsd.org> <56B3DE8E.9020603@FreeBSD.org> Date: Sat, 06 Feb 2016 15:19:13 +0100 In-Reply-To: <56B3DE8E.9020603@FreeBSD.org> (Bryan Drewery's message of "Thu, 4 Feb 2016 15:28:14 -0800") Message-ID: <86lh6xsyzi.fsf@desk.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2016 14:19:22 -0000 Bryan Drewery writes: > I think perhaps you should also remove these as having default paths in > the .c as well and require they be enabled in the config. Otherwise a > warning is given: > > Feb 4 15:25:22 VM sshd[874]: error: Could not load host key: > /etc/ssh/ssh_host_dsa_key > > Or always generate them but only load them if enabled in the config. I did this because I wanted to move away from DSA keys without disabling them in the default config (which can break existing setups). The problem is that apparently OpenSSH doesn't interpret HostKey as "try to load these keys" but as "you must load these keys", even when it wasn't explicitly set; I would have expected the default to be "load whatever is available". I'll see if I can patch OpenSSH to do what I want, and revert this if not. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@freebsd.org Sat Feb 6 15:39:05 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C892A9F665; Sat, 6 Feb 2016 15:39:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E4A01126; Sat, 6 Feb 2016 15:39:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u16Fd4UD082745; Sat, 6 Feb 2016 15:39:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u16Fd47L082744; Sat, 6 Feb 2016 15:39:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201602061539.u16Fd47L082744@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 6 Feb 2016 15:39:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295352 - head/sys/dev/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2016 15:39:05 -0000 Author: kib Date: Sat Feb 6 15:39:04 2016 New Revision: 295352 URL: https://svnweb.freebsd.org/changeset/base/295352 Log: Do not call vn_fullpath(9) (through the pmc_getfilename() wrapper) when its result is immediately ignored, i.e. for kernel processes forked from the user process. Do not test for non-null before freeing string. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/dev/hwpmc/hwpmc_mod.c Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Sat Feb 6 14:07:17 2016 (r295351) +++ head/sys/dev/hwpmc/hwpmc_mod.c Sat Feb 6 15:39:04 2016 (r295352) @@ -1009,14 +1009,14 @@ pmc_attach_one_process(struct proc *p, s /* issue an attach event to a configured log file */ if (pm->pm_owner->po_flags & PMC_PO_OWNS_LOGFILE) { - pmc_getfilename(p->p_textvp, &fullpath, &freepath); if (p->p_flag & P_KTHREAD) { fullpath = kernelname; freepath = NULL; - } else + } else { + pmc_getfilename(p->p_textvp, &fullpath, &freepath); pmclog_process_pmcattach(pm, p->p_pid, fullpath); - if (freepath) - free(freepath, M_TEMP); + } + free(freepath, M_TEMP); if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) pmc_log_process_mappings(pm->pm_owner, p); } From owner-svn-src-all@freebsd.org Sat Feb 6 16:58:57 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4D29A9F31D; Sat, 6 Feb 2016 16:58:57 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B605118E; Sat, 6 Feb 2016 16:58:57 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u16Gwug2006968; Sat, 6 Feb 2016 16:58:56 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u16GwuhB006967; Sat, 6 Feb 2016 16:58:56 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201602061658.u16GwuhB006967@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 6 Feb 2016 16:58:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295353 - stable/10/sys/fs/ext2fs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2016 16:58:57 -0000 Author: pfg Date: Sat Feb 6 16:58:56 2016 New Revision: 295353 URL: https://svnweb.freebsd.org/changeset/base/295353 Log: MFC r295209; Revert r294695; passthrough any extra timestamps to the dinode struct. The original ext2fs change worked fine on disks formated with default values, but it was the cause of a regression when inodes are small. Revert it for now, while we figure out safer ways pass such values, PR: 206820 Approved by: re Modified: stable/10/sys/fs/ext2fs/ext2_inode_cnv.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/ext2fs/ext2_inode_cnv.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_inode_cnv.c Sat Feb 6 15:39:04 2016 (r295352) +++ stable/10/sys/fs/ext2fs/ext2_inode_cnv.c Sat Feb 6 16:58:56 2016 (r295353) @@ -149,11 +149,13 @@ ext2_i2ei(struct inode *ip, struct ext2f ei->e2di_atime = ip->i_atime; ei->e2di_mtime = ip->i_mtime; ei->e2di_ctime = ip->i_ctime; - ei->e2di_ctime_extra = NSEC_TO_XTIME(ip->i_ctimensec); - ei->e2di_mtime_extra = NSEC_TO_XTIME(ip->i_mtimensec); - ei->e2di_atime_extra = NSEC_TO_XTIME(ip->i_atimensec); - ei->e2di_crtime = ip->i_birthtime; - ei->e2di_crtime_extra = NSEC_TO_XTIME(ip->i_birthnsec); + if (E2DI_HAS_XTIME(ip)) { + ei->e2di_ctime_extra = NSEC_TO_XTIME(ip->i_ctimensec); + ei->e2di_mtime_extra = NSEC_TO_XTIME(ip->i_mtimensec); + ei->e2di_atime_extra = NSEC_TO_XTIME(ip->i_atimensec); + ei->e2di_crtime = ip->i_birthtime; + ei->e2di_crtime_extra = NSEC_TO_XTIME(ip->i_birthnsec); + } ei->e2di_flags = 0; ei->e2di_flags |= (ip->i_flags & SF_APPEND) ? EXT2_APPEND: 0; ei->e2di_flags |= (ip->i_flags & SF_IMMUTABLE) ? EXT2_IMMUTABLE: 0; From owner-svn-src-all@freebsd.org Sat Feb 6 17:10:48 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31087A9FA88; Sat, 6 Feb 2016 17:10:48 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1C531968; Sat, 6 Feb 2016 17:10:47 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u16HAkHt010227; Sat, 6 Feb 2016 17:10:46 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u16HAkX6010226; Sat, 6 Feb 2016 17:10:46 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201602061710.u16HAkX6010226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 6 Feb 2016 17:10:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r295354 - stable/9/sys/fs/ext2fs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2016 17:10:48 -0000 Author: pfg Date: Sat Feb 6 17:10:46 2016 New Revision: 295354 URL: https://svnweb.freebsd.org/changeset/base/295354 Log: MFC r295209; Revert r294695; passthrough any extra timestamps to the dinode struct. The original ext2fs change worked fine on disks formated with default values, but it was the cause of a regression when inodes are small. Revert it for now, while we figure out safer ways pass such values, PR: 206820 Modified: stable/9/sys/fs/ext2fs/ext2_inode_cnv.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/ext2fs/ext2_inode_cnv.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_inode_cnv.c Sat Feb 6 16:58:56 2016 (r295353) +++ stable/9/sys/fs/ext2fs/ext2_inode_cnv.c Sat Feb 6 17:10:46 2016 (r295354) @@ -149,11 +149,13 @@ ext2_i2ei(struct inode *ip, struct ext2f ei->e2di_atime = ip->i_atime; ei->e2di_mtime = ip->i_mtime; ei->e2di_ctime = ip->i_ctime; - ei->e2di_ctime_extra = NSEC_TO_XTIME(ip->i_ctimensec); - ei->e2di_mtime_extra = NSEC_TO_XTIME(ip->i_mtimensec); - ei->e2di_atime_extra = NSEC_TO_XTIME(ip->i_atimensec); - ei->e2di_crtime = ip->i_birthtime; - ei->e2di_crtime_extra = NSEC_TO_XTIME(ip->i_birthnsec); + if (E2DI_HAS_XTIME(ip)) { + ei->e2di_ctime_extra = NSEC_TO_XTIME(ip->i_ctimensec); + ei->e2di_mtime_extra = NSEC_TO_XTIME(ip->i_mtimensec); + ei->e2di_atime_extra = NSEC_TO_XTIME(ip->i_atimensec); + ei->e2di_crtime = ip->i_birthtime; + ei->e2di_crtime_extra = NSEC_TO_XTIME(ip->i_birthnsec); + } ei->e2di_flags = 0; ei->e2di_flags |= (ip->i_flags & SF_APPEND) ? EXT2_APPEND: 0; ei->e2di_flags |= (ip->i_flags & SF_IMMUTABLE) ? EXT2_IMMUTABLE: 0; From owner-svn-src-all@freebsd.org Sat Feb 6 21:54:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5651AA0BFF; Sat, 6 Feb 2016 21:54:03 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97E463CD; Sat, 6 Feb 2016 21:54:03 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u16Ls2Q3095142; Sat, 6 Feb 2016 21:54:02 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u16Ls2fm095141; Sat, 6 Feb 2016 21:54:02 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201602062154.u16Ls2fm095141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 6 Feb 2016 21:54:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295355 - head/sys/fs/msdosfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2016 21:54:03 -0000 Author: pfg Date: Sat Feb 6 21:54:02 2016 New Revision: 295355 URL: https://svnweb.freebsd.org/changeset/base/295355 Log: msdosfs_rename: Unused value Assigned value to pmp, is immediatedly overwritten before it can be used. CID: 1304892 Modified: head/sys/fs/msdosfs/msdosfs_vnops.c Modified: head/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vnops.c Sat Feb 6 17:10:46 2016 (r295354) +++ head/sys/fs/msdosfs/msdosfs_vnops.c Sat Feb 6 21:54:02 2016 (r295355) @@ -947,7 +947,6 @@ msdosfs_rename(struct vop_rename_args *a struct buf *bp; fddep = VTODE(ap->a_fdvp); - pmp = fddep->de_pmp; pmp = VFSTOMSDOSFS(fdvp->v_mount); From owner-svn-src-all@freebsd.org Sat Feb 6 22:01:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D8C7AA0FE0; Sat, 6 Feb 2016 22:01:26 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F9BA99C; Sat, 6 Feb 2016 22:01:26 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u16M1PK7097439; Sat, 6 Feb 2016 22:01:25 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u16M1PYS097437; Sat, 6 Feb 2016 22:01:25 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201602062201.u16M1PYS097437@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sat, 6 Feb 2016 22:01:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295356 - in head/sys/boot: common efi/boot1 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2016 22:01:26 -0000 Author: smh Date: Sat Feb 6 22:01:25 2016 New Revision: 295356 URL: https://svnweb.freebsd.org/changeset/base/295356 Log: Fix EFI platform build failures With warnings now enabled some plaforms where failing due to warnings. * Fix st_size printed as a size_t when its actually an off_t. * Fix pointer conversion in load_elf for some 32bit platforms due to 64bit off in ef. MFC after: 2 days X-MFC-With: Sponsored by: Multiplay Modified: head/sys/boot/common/load_elf.c head/sys/boot/efi/boot1/zfs_module.c Modified: head/sys/boot/common/load_elf.c ============================================================================== --- head/sys/boot/common/load_elf.c Sat Feb 6 21:54:02 2016 (r295355) +++ head/sys/boot/common/load_elf.c Sat Feb 6 22:01:25 2016 (r295356) @@ -886,7 +886,7 @@ __elfN(parse_modmetadata)(struct preload error = __elfN(reloc_ptr)(fp, ef, v, &md, sizeof(md)); if (error == EOPNOTSUPP) { md.md_cval += ef->off; - md.md_data = (void *)((uintptr_t)md.md_data + ef->off); + md.md_data = (void *)((uintptr_t)md.md_data + (uintptr_t)ef->off); } else if (error != 0) return (error); #endif Modified: head/sys/boot/efi/boot1/zfs_module.c ============================================================================== --- head/sys/boot/efi/boot1/zfs_module.c Sat Feb 6 21:54:02 2016 (r295355) +++ head/sys/boot/efi/boot1/zfs_module.c Sat Feb 6 22:01:25 2016 (r295356) @@ -135,7 +135,7 @@ load(const char *filepath, dev_info_t *d if ((status = bs->AllocatePool(EfiLoaderData, (UINTN)st.st_size, &buf)) != EFI_SUCCESS) { - printf("Failed to allocate load buffer %zu for pool '%s' for '%s' " + printf("Failed to allocate load buffer %zd for pool '%s' for '%s' " "(%lu)\n", st.st_size, spa->spa_name, filepath, EFI_ERROR_CODE(status)); return (EFI_INVALID_PARAMETER); } From owner-svn-src-all@freebsd.org Sat Feb 6 22:06:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D0ACA9F246 for ; Sat, 6 Feb 2016 22:06:18 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wm0-x235.google.com (mail-wm0-x235.google.com [IPv6:2a00:1450:400c:c09::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0CCB5C3F for ; Sat, 6 Feb 2016 22:06:17 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x235.google.com with SMTP id g62so89703527wme.0 for ; Sat, 06 Feb 2016 14:06:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=from:subject:to:references:cc:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=Am9S6Uv5jMNxIKFcDvCZ+/zd8FS5dOBBdL6mYr11R1Q=; b=z8fzgtNuzJAHio4rQMdzGKhlrYrbl7bOKqp0syxLc12Dlf9dSskck6mrqYvBFRoFAB Io3fAE7bK8U3Dx2b4rjhN7yQJk/957clwTRFKODQ/uEz9QNE9kft4XUFI9blWixokNnK IIFuBgtCINGUDonhjpXPtfndz+ExdD/grdlYFwZpcBpo3nDyvLqzGLZlx9lXsMbn7/Cd C/DmyvZxFOFGdqBGwU66uJqvOH2Aw9EDS/DQw5oWcauJhyKIU5gcFEClyypd/MmqYP0J AWDL+wKBKxjo0W0Z37OeONmJ+IwjV8K6i8maWPkd15sqmrYBUREg3lLuvFOOxToaJnJv b+bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=Am9S6Uv5jMNxIKFcDvCZ+/zd8FS5dOBBdL6mYr11R1Q=; b=JLu+TSNhjjsNnu0xhqmrE0qVUoN4ktefkkYX2D/plHcHcJRkS/xpYgC+q6JUZ2Xr8A SqT7T8p7/jRweFC5U7YKZ5T5d3zW+0+6wQMb7oraQgAxZO1SuaTtSn+jDtYlof8DfqRs styFDsEhSaKK8zgADVrXPWC5JN/UWlIZSjr79SNOpSqzQvtzlZ3W/nmyPs4UNJeCsWq6 n+tkq5MggpciGFDHvZ5iyuRdtuohyX8OI8jxbm2GPZWJdBkZex0RcmdNBAAbhMU7ZRRm DD/EL1X96eJfylPwSCXlQOOlUdg9eAYmwDC21h1A8tZff8whBAyqNe58/uoAC528qHSb yPOQ== X-Gm-Message-State: AG10YOSinocDovaSfy/bqAXrW/I2SuMYypdbXQUm8x8smsS3IKhrf0+CkstmijHFyM+rr6zR X-Received: by 10.28.148.130 with SMTP id w124mr4224091wmd.71.1454796376251; Sat, 06 Feb 2016 14:06:16 -0800 (PST) Received: from [10.10.1.58] (liv3d.labs.multiplay.co.uk. [82.69.141.171]) by smtp.gmail.com with ESMTPSA id t205sm4972641wmt.23.2016.02.06.14.06.14 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 06 Feb 2016 14:06:14 -0800 (PST) From: Steven Hartland X-Google-Original-From: Steven Hartland Subject: Re: svn commit: r294981 - in stable/10/sys/boot: common efi efi/boot1 efi/include efi/libefi efi/loader efi/loader/arch/amd64 fdt i386/libi386 To: NGie Cooper References: <201601281211.u0SCBhQG058154@repo.freebsd.org> <88C90200-1BC4-4C95-B37B-71AC33868217@gmail.com> Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org, FreeBSD Release Engineering Team Message-ID: <56B66E71.2050802@freebsd.org> Date: Sat, 6 Feb 2016 22:06:41 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <88C90200-1BC4-4C95-B37B-71AC33868217@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2016 22:06:18 -0000 After waiting 6 1/2 hours for a tinderbox build the fix for this is in r295356. I'm now kicking off a stable/10 tinderbox with this + ia64 (stable/10) fix. I'll know by tomorrow morning, apologies for the breakage. Regards Steve On 05/02/2016 21:22, NGie Cooper wrote: >> On Jan 28, 2016, at 04:11, Steven Hartland wrote: >> >> Author: smh >> Date: Thu Jan 28 12:11:42 2016 >> New Revision: 294981 >> URL: https://svnweb.freebsd.org/changeset/base/294981 >> >> Log: >> MFC r281169, r293724, r293796, r294029, r294041, r294058 >> >> MFC r281169 (by andrew): >> Make global variabled only used in this file static >> >> MFC r294058: >> Make common boot file_loadraw name parameter const >> >> MFC r294041: >> Remove unused reg param from fdt_fixup_memory >> >> MFC r293724: >> Enable warnings in EFI boot code >> >> MFC r293796: >> Fix typo in libefi.c >> >> MFC r294029: >> Only build EFI components on supported compilers >> >> Sponsored by: Multiplay > This commit broke tinderbox with arm:armeb on universe10a.freebsd.org: > > cc1: warnings being treated as errors > In file included from /scratch/tmp/ngie/svn/sys/boot/arm/uboot/../../common/load_elf32.c:7: > /scratch/tmp/ngie/svn/sys/boot/arm/uboot/../../common/load_elf.c: In function 'elf32_parse_modmetadata': > /scratch/tmp/ngie/svn/sys/boot/arm/uboot/../../common/load_elf.c:859: warning: cast to pointer from integer of different size > *** [load_elf32.o] Error code 1 > > Given the issues that we have with ia64 not being able to build right now, I would consider pulling this out of ^/stable/10, fully fixing it, then reintegrating it. > > Thanks, > -Ngie