svn commit: r251452 - in head/sys: dev/drm2/i915 dev/drm2/ttm fs/tmpfs kern
Author: alc Date: Thu Jun 6 06:17:20 2013 New Revision: 251452 URL: http://svnweb.freebsd.org/changeset/base/251452 Log: Don't busy the page unless we are likely to release the object lock. Reviewed by: kib Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/drm2/i915/i915_gem.c head/sys/dev/drm2/ttm/ttm_tt.c head/sys/fs/tmpfs/tmpfs_vnops.c head/sys/kern/kern_exec.c Modified: head/sys/dev/drm2/i915/i915_gem.c == --- head/sys/dev/drm2/i915/i915_gem.c Thu Jun 6 06:11:43 2013 (r251451) +++ head/sys/dev/drm2/i915/i915_gem.c Thu Jun 6 06:17:20 2013 (r251452) @@ -2487,8 +2487,10 @@ i915_gem_wire_page(vm_object_t object, v int rv; VM_OBJECT_ASSERT_WLOCKED(object); - m = vm_page_grab(object, pindex, VM_ALLOC_NORMAL | VM_ALLOC_RETRY); + m = vm_page_grab(object, pindex, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | + VM_ALLOC_RETRY); if (m-valid != VM_PAGE_BITS_ALL) { + vm_page_busy(m); if (vm_pager_has_page(object, pindex, NULL, NULL)) { rv = vm_pager_get_pages(object, m, 1, 0); m = vm_page_lookup(object, pindex); @@ -2505,11 +2507,11 @@ i915_gem_wire_page(vm_object_t object, v m-valid = VM_PAGE_BITS_ALL; m-dirty = 0; } + vm_page_wakeup(m); } vm_page_lock(m); vm_page_wire(m); vm_page_unlock(m); - vm_page_wakeup(m); atomic_add_long(i915_gem_wired_pages_cnt, 1); return (m); } Modified: head/sys/dev/drm2/ttm/ttm_tt.c == --- head/sys/dev/drm2/ttm/ttm_tt.c Thu Jun 6 06:11:43 2013 (r251451) +++ head/sys/dev/drm2/ttm/ttm_tt.c Thu Jun 6 06:17:20 2013 (r251452) @@ -288,8 +288,10 @@ int ttm_tt_swapin(struct ttm_tt *ttm) VM_OBJECT_WLOCK(obj); vm_object_pip_add(obj, 1); for (i = 0; i ttm-num_pages; ++i) { - from_page = vm_page_grab(obj, i, VM_ALLOC_RETRY); + from_page = vm_page_grab(obj, i, VM_ALLOC_NOBUSY | + VM_ALLOC_RETRY); if (from_page-valid != VM_PAGE_BITS_ALL) { + vm_page_busy(from_page); if (vm_pager_has_page(obj, i, NULL, NULL)) { rv = vm_pager_get_pages(obj, from_page, 1, 0); if (rv != VM_PAGER_OK) { @@ -301,15 +303,14 @@ int ttm_tt_swapin(struct ttm_tt *ttm) } } else vm_page_zero_invalid(from_page, TRUE); + vm_page_wakeup(from_page); } to_page = ttm-pages[i]; if (unlikely(to_page == NULL)) { - vm_page_wakeup(from_page); ret = -ENOMEM; goto err_ret; } pmap_copy_page(from_page, to_page); - vm_page_wakeup(from_page); } vm_object_pip_wakeup(obj); VM_OBJECT_WUNLOCK(obj); Modified: head/sys/fs/tmpfs/tmpfs_vnops.c == --- head/sys/fs/tmpfs/tmpfs_vnops.c Thu Jun 6 06:11:43 2013 (r251451) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Thu Jun 6 06:17:20 2013 (r251452) @@ -460,8 +460,9 @@ tmpfs_nocacheread(vm_object_t tobj, vm_p * type object. */ m = vm_page_grab(tobj, idx, VM_ALLOC_NORMAL | VM_ALLOC_RETRY | - VM_ALLOC_IGN_SBUSY); + VM_ALLOC_IGN_SBUSY | VM_ALLOC_NOBUSY); if (m-valid != VM_PAGE_BITS_ALL) { + vm_page_busy(m); if (vm_pager_has_page(tobj, idx, NULL, NULL)) { rv = vm_pager_get_pages(tobj, m, 1, 0); m = vm_page_lookup(tobj, idx); @@ -483,10 +484,10 @@ tmpfs_nocacheread(vm_object_t tobj, vm_p } } else vm_page_zero_invalid(m, TRUE); + vm_page_wakeup(m); } vm_page_lock(m); vm_page_hold(m); - vm_page_wakeup(m); vm_page_unlock(m); VM_OBJECT_WUNLOCK(tobj); error = uiomove_fromphys(m, offset, tlen, uio); @@ -574,8 +575,10 @@ tmpfs_mappedwrite(vm_object_t tobj, size tlen = MIN(PAGE_SIZE - offset, len); VM_OBJECT_WLOCK(tobj); - tpg = vm_page_grab(tobj, idx, VM_ALLOC_NORMAL | VM_ALLOC_RETRY); + tpg = vm_page_grab(tobj, idx, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | + VM_ALLOC_RETRY); if (tpg-valid != VM_PAGE_BITS_ALL) { + vm_page_busy(tpg); if (vm_pager_has_page(tobj, idx, NULL, NULL)) { rv = vm_pager_get_pages(tobj,
Re: svn commit: r251438 - in head/gnu: lib/libregex lib/libregex/posix usr.bin/diff usr.bin/grep
On Wed, Jun 05, 2013 at 11:27:52PM -0400, Glen Barber wrote: On Wed, Jun 05, 2013 at 09:31:06PM +, Jung-uk Kim wrote: Author: jkim Date: Wed Jun 5 21:31:06 2013 New Revision: 251438 URL: http://svnweb.freebsd.org/changeset/base/251438 Log: Connect libgnuregex 2.17 to the build. I think this breaks the build. I am seeing the following: /usr/obj/usr/src/tmp/usr/include/gnu/posix/regex.h:369:3: error: declaration does not declare anything [-Werror,-Wmissing-declarations] unsigned long int __REPB_PREFIX(used); ^ I think this is a local problem. Sorry for the noise. Glen pgpycmmNBWbOH.pgp Description: PGP signature
svn commit: r251468 - in head: gnu/usr.bin/diff gnu/usr.bin/grep usr.bin/grep
Author: jkim Date: Thu Jun 6 11:59:38 2013 New Revision: 251468 URL: http://svnweb.freebsd.org/changeset/base/251468 Log: Adjust CFLAGS to pick up correct regex.h and posix/regex.h. Note this actually reverts r250860 and r250861. Reported by: gjb, tinderbox Modified: head/gnu/usr.bin/diff/Makefile head/gnu/usr.bin/grep/Makefile head/usr.bin/grep/Makefile Modified: head/gnu/usr.bin/diff/Makefile == --- head/gnu/usr.bin/diff/Makefile Thu Jun 6 11:47:54 2013 (r251467) +++ head/gnu/usr.bin/diff/Makefile Thu Jun 6 11:59:38 2013 (r251468) @@ -17,11 +17,10 @@ CFLAGS+=-funsigned-char CFLAGS+=-DHAVE_CONFIG_H CFLAGS+=-DPR_PROGRAM=\/usr/bin/pr\ -CFLAGS+=-D__USE_GNU CFLAGS+=-I${.CURDIR}/../../../contrib/diff CFLAGS+=-I${.CURDIR}/../../../contrib/diff/src CFLAGS+=-I${.CURDIR}/../../../contrib/diff/lib -CFLAGS+=-I${.CURDIR}/../../../contrib/libgnuregex +CFLAGS+=-I${DESTDIR}/usr/include/gnu SUBDIR+=doc Modified: head/gnu/usr.bin/grep/Makefile == --- head/gnu/usr.bin/grep/Makefile Thu Jun 6 11:47:54 2013 (r251467) +++ head/gnu/usr.bin/grep/Makefile Thu Jun 6 11:59:38 2013 (r251468) @@ -13,8 +13,7 @@ SRCS= closeout.c dfa.c error.c exclude.c isdir.c kwset.c obstack.c quotearg.c savedir.c search.c xmalloc.c \ xstrtoumax.c -CFLAGS+=-I${.CURDIR} -I${.CURDIR}/../../../contrib/libgnuregex -CFLAGS+=-DHAVE_CONFIG_H -D__USE_GNU +CFLAGS+=-I${.CURDIR} -I${DESTDIR}/usr/include/gnu -DHAVE_CONFIG_H .if ${MK_BSD_GREP} != yes LINKS+=${BINDIR}/grep ${BINDIR}/egrep \ Modified: head/usr.bin/grep/Makefile == --- head/usr.bin/grep/Makefile Thu Jun 6 11:47:54 2013(r251467) +++ head/usr.bin/grep/Makefile Thu Jun 6 11:59:38 2013(r251468) @@ -74,7 +74,7 @@ CFLAGS+= -DWITHOUT_BZIP2 .endif .if !defined(WITHOUT_GNU_COMPAT) -CFLAGS+= -I/usr/include/gnu +CFLAGS+= -I${DESTDIR}/usr/include/gnu LDADD+=-lgnuregex DPADD+=${LIBGNUREGEX} .endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r250991 - in head: contrib/jemalloc/include/jemalloc include lib/libc/stdlib/jemalloc
On 2013-06-03 16:50, Marcel Moolenaar wrote: On Jun 3, 2013, at 6:25 AM, Dimitry Andric d...@freebsd.org wrote: On 2013-05-25 20:59, Marcel Moolenaar wrote: Author: marcel Date: Sat May 25 18:59:11 2013 New Revision: 250991 URL: http://svnweb.freebsd.org/changeset/base/250991 Log: Make the malloc(3) family of functions weak and make their non-weak implementations visible for use by applications. The functions $F that are now weak symbols are: allocm, calloc, dallocm, free, malloc, malloc_usable_size, nallocm, posix_memalign, rallocm, realloc, sallocm The non-weak implementations of $F are exported as __$F. Hi Marcel, This commit seems to lead to various problems in ports, and possibly other software. For example, with Firefox I now always get a few messages like: firefox in free(): warning: malloc() has never been called Another example is the devel/talloc port, which now dies with: It looks like the python build is broken. The net effect is that _ctypes.so has a strong definition of malloc, free, et al. This is not intentional, but a side-effect of the what seems to be a bug in fficonfig.py.in (see patch below). To elaborate: _ctypes.so incorporates the libffi functionality for what I presume is the basis for Python bindings. libffi includes dlmalloc.c, an open source allocator. dlmalloc.c is incuded by closures.c and closures.c defines USE_DL_PREFIX. On top of that closures.c makes all allocator functions static. This, by design there's no problem. In short: dlmalloc.c never gets compiler separately/independently. The python build however compiles dlmalloc.c separately/independently. As such, dlmalloc.c now defines and exports malloc et al and it also get linked into _ctypes.so. Once _ctypes.so gets dynamically loaded, things start to break. Unfortunately, this means python needs to be recompiled from ports with the following fix: Index: files/patch-Modules-_ctypes-libffi-fficonfig.py.in === --- files/patch-Modules-_ctypes-libffi-fficonfig.py.in(revision 0) +++ files/patch-Modules-_ctypes-libffi-fficonfig.py.in(working copy) @@ -0,0 +1,10 @@ +--- Modules/_ctypes/libffi/fficonfig.py.in.orig 2013-06-03 07:16:44.0 -0700 Modules/_ctypes/libffi/fficonfig.py.in 2013-06-03 07:17:03.0 -0700 +@@ -1,7 +1,6 @@ + ffi_sources = + src/prep_cif.c + src/closures.c +-src/dlmalloc.c + .split() + + ffi_platforms = { This has been tested with python-2.7.5. I can't say anything about other versions. Do people concur that this is the right fix? Maybe you should send this patch to python@. They should know if it's the right fix. It worked for me anyway. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r251470 - head/sys/kern
Author: jhb Date: Thu Jun 6 14:43:19 2013 New Revision: 251470 URL: http://svnweb.freebsd.org/changeset/base/251470 Log: Do not compare the existing mask of a cpuset with a new mask when changing the mask of a cpuset. Also, change the cpuset's mask before updating the masks of all children. Previously changing a cpuset's mask first required setting the mask to a super-set of both the old and new masks and then changing it a second time to the new mask. Modified: head/sys/kern/kern_cpuset.c Modified: head/sys/kern/kern_cpuset.c == --- head/sys/kern/kern_cpuset.c Thu Jun 6 13:47:36 2013(r251469) +++ head/sys/kern/kern_cpuset.c Thu Jun 6 14:43:19 2013(r251470) @@ -303,7 +303,7 @@ cpuset_create(struct cpuset **setp, stru * empty as well as RDONLY flags. */ static int -cpuset_testupdate(struct cpuset *set, cpuset_t *mask) +cpuset_testupdate(struct cpuset *set, cpuset_t *mask, int check_mask) { struct cpuset *nset; cpuset_t newmask; @@ -312,13 +312,16 @@ cpuset_testupdate(struct cpuset *set, cp mtx_assert(cpuset_lock, MA_OWNED); if (set-cs_flags CPU_SET_RDONLY) return (EPERM); - if (!CPU_OVERLAP(set-cs_mask, mask)) - return (EDEADLK); - CPU_COPY(set-cs_mask, newmask); - CPU_AND(newmask, mask); + if (check_mask) { + if (!CPU_OVERLAP(set-cs_mask, mask)) + return (EDEADLK); + CPU_COPY(set-cs_mask, newmask); + CPU_AND(newmask, mask); + } else + CPU_COPY(mask, newmask); error = 0; LIST_FOREACH(nset, set-cs_children, cs_siblings) - if ((error = cpuset_testupdate(nset, newmask)) != 0) + if ((error = cpuset_testupdate(nset, newmask, 1)) != 0) break; return (error); } @@ -370,11 +373,11 @@ cpuset_modify(struct cpuset *set, cpuset if (root !CPU_SUBSET(root-cs_mask, mask)) return (EINVAL); mtx_lock_spin(cpuset_lock); - error = cpuset_testupdate(set, mask); + error = cpuset_testupdate(set, mask, 0); if (error) goto out; - cpuset_update(set, mask); CPU_COPY(mask, set-cs_mask); + cpuset_update(set, mask); out: mtx_unlock_spin(cpuset_lock); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r251470 - head/sys/kern
On Thursday, June 06, 2013 10:43:19 am John Baldwin wrote: Author: jhb Date: Thu Jun 6 14:43:19 2013 New Revision: 251470 URL: http://svnweb.freebsd.org/changeset/base/251470 Log: Do not compare the existing mask of a cpuset with a new mask when changing the mask of a cpuset. Also, change the cpuset's mask before updating the masks of all children. Previously changing a cpuset's mask first required setting the mask to a super-set of both the old and new masks and then changing it a second time to the new mask. Oof, meant to add: Reviewed by: davidxu MFC after: 1 week -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r251471 - head/sys/vm
Author: attilio Date: Thu Jun 6 18:19:26 2013 New Revision: 251471 URL: http://svnweb.freebsd.org/changeset/base/251471 Log: Complete r251452: Avoid to busy/unbusy a page in cases where there is no need to drop the vm_obj lock, more nominally when the page is full valid after vm_page_grab(). Sponsored by: EMC / Isilon storage division Reviewed by: alc Modified: head/sys/vm/swap_pager.c head/sys/vm/vm_glue.c Modified: head/sys/vm/swap_pager.c == --- head/sys/vm/swap_pager.cThu Jun 6 14:43:19 2013(r251470) +++ head/sys/vm/swap_pager.cThu Jun 6 18:19:26 2013(r251471) @@ -1706,18 +1706,19 @@ swp_pager_force_pagein(vm_object_t objec vm_page_t m; vm_object_pip_add(object, 1); - m = vm_page_grab(object, pindex, VM_ALLOC_NORMAL|VM_ALLOC_RETRY); + m = vm_page_grab(object, pindex, VM_ALLOC_NORMAL | VM_ALLOC_RETRY | + VM_ALLOC_NOBUSY); if (m-valid == VM_PAGE_BITS_ALL) { vm_object_pip_subtract(object, 1); vm_page_dirty(m); vm_page_lock(m); vm_page_activate(m); vm_page_unlock(m); - vm_page_wakeup(m); vm_pager_page_unswapped(m); return; } + vm_page_busy(m); if (swap_pager_getpages(object, m, 1, 0) != VM_PAGER_OK) panic(swap_pager_force_pagein: read from swap failed);/*XXX*/ vm_object_pip_subtract(object, 1); Modified: head/sys/vm/vm_glue.c == --- head/sys/vm/vm_glue.c Thu Jun 6 14:43:19 2013(r251470) +++ head/sys/vm/vm_glue.c Thu Jun 6 18:19:26 2013(r251471) @@ -241,8 +241,10 @@ vm_imgact_hold_page(vm_object_t object, VM_OBJECT_WLOCK(object); pindex = OFF_TO_IDX(offset); - m = vm_page_grab(object, pindex, VM_ALLOC_NORMAL | VM_ALLOC_RETRY); + m = vm_page_grab(object, pindex, VM_ALLOC_NORMAL | VM_ALLOC_RETRY | + VM_ALLOC_NOBUSY); if (m-valid != VM_PAGE_BITS_ALL) { + vm_page_busy(m); ma[0] = m; rv = vm_pager_get_pages(object, ma, 1, 0); m = vm_page_lookup(object, pindex); @@ -255,11 +257,11 @@ vm_imgact_hold_page(vm_object_t object, m = NULL; goto out; } + vm_page_wakeup(m); } vm_page_lock(m); vm_page_hold(m); vm_page_unlock(m); - vm_page_wakeup(m); out: VM_OBJECT_WUNLOCK(object); return (m); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r251438 - in head/gnu: lib/libregex lib/libregex/posix usr.bin/diff usr.bin/grep
On Jun 6, 2013, at 12:50 PM, Glen Barber wrote: On Wed, Jun 05, 2013 at 11:27:52PM -0400, Glen Barber wrote: On Wed, Jun 05, 2013 at 09:31:06PM +, Jung-uk Kim wrote: Author: jkim Date: Wed Jun 5 21:31:06 2013 New Revision: 251438 URL: http://svnweb.freebsd.org/changeset/base/251438 Log: Connect libgnuregex 2.17 to the build. I think this breaks the build. I am seeing the following: /usr/obj/usr/src/tmp/usr/include/gnu/posix/regex.h:369:3: error: declaration does not declare anything [-Werror,-Wmissing-declarations] unsigned long int __REPB_PREFIX(used); ^ I think this is a local problem. Sorry for the noise. I do see the same problem when cross building for ARM. How did you fix it? Best regards Michael Glen ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r251438 - in head/gnu: lib/libregex lib/libregex/posix usr.bin/diff usr.bin/grep
On Jun 6, 2013, at 11:18 AM, Michael Tuexen wrote: On Jun 6, 2013, at 12:50 PM, Glen Barber wrote: On Wed, Jun 05, 2013 at 11:27:52PM -0400, Glen Barber wrote: On Wed, Jun 05, 2013 at 09:31:06PM +, Jung-uk Kim wrote: Author: jkim Date: Wed Jun 5 21:31:06 2013 New Revision: 251438 URL: http://svnweb.freebsd.org/changeset/base/251438 Log: Connect libgnuregex 2.17 to the build. I think this breaks the build. I am seeing the following: /usr/obj/usr/src/tmp/usr/include/gnu/posix/regex.h:369:3: error: declaration does not declare anything [-Werror,-Wmissing-declarations] unsigned long int __REPB_PREFIX(used); ^ I think this is a local problem. Sorry for the noise. I do see the same problem when cross building for ARM. How did you fix it? See r251468. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r251438 - in head/gnu: lib/libregex lib/libregex/posix usr.bin/diff usr.bin/grep
On Jun 6, 2013, at 8:30 PM, Garrett Cooper wrote: On Jun 6, 2013, at 11:18 AM, Michael Tuexen wrote: On Jun 6, 2013, at 12:50 PM, Glen Barber wrote: On Wed, Jun 05, 2013 at 11:27:52PM -0400, Glen Barber wrote: On Wed, Jun 05, 2013 at 09:31:06PM +, Jung-uk Kim wrote: Author: jkim Date: Wed Jun 5 21:31:06 2013 New Revision: 251438 URL: http://svnweb.freebsd.org/changeset/base/251438 Log: Connect libgnuregex 2.17 to the build. I think this breaks the build. I am seeing the following: /usr/obj/usr/src/tmp/usr/include/gnu/posix/regex.h:369:3: error: declaration does not declare anything [-Werror,-Wmissing-declarations] unsigned long int __REPB_PREFIX(used); ^ I think this is a local problem. Sorry for the noise. I do see the same problem when cross building for ARM. How did you fix it? See r251468. Thanks! Best regards Michael ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r251475 - in head: lib/libc/net lib/libkvm tools/tools/pciroms
Author: emaste Date: Thu Jun 6 21:09:27 2013 New Revision: 251475 URL: http://svnweb.freebsd.org/changeset/base/251475 Log: Switch to 2-clause license and standard text Approved by: bms@ Modified: head/lib/libc/net/getifmaddrs.c head/lib/libkvm/kvm_mips.c head/tools/tools/pciroms/pciroms.c Modified: head/lib/libc/net/getifmaddrs.c == --- head/lib/libc/net/getifmaddrs.c Thu Jun 6 20:14:40 2013 (r251474) +++ head/lib/libc/net/getifmaddrs.c Thu Jun 6 21:09:27 2013 (r251475) @@ -11,17 +11,17 @@ *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 BRUCE M. SIMPSON AND AFFILIATES - * ``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 BRUCE M. SIMPSON 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. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include sys/cdefs.h Modified: head/lib/libkvm/kvm_mips.c == --- head/lib/libkvm/kvm_mips.c Thu Jun 6 20:14:40 2013(r251474) +++ head/lib/libkvm/kvm_mips.c Thu Jun 6 21:09:27 2013(r251475) @@ -10,22 +10,18 @@ * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in the *documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - *must display the following acknowledgement: - * This product includes software developed by Bruce M. Simpson. - * 4. The name of Bruce M. Simpson may not be used to endorse or promote products - *derived from this software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY BRUCE M. SIMPSON ``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 BRUCE M. SIMPSON 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. + * 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. */ /* Modified: head/tools/tools/pciroms/pciroms.c == --- head/tools/tools/pciroms/pciroms.c Thu Jun 6 20:14:40 2013
svn commit: r251476 - head/usr.sbin/gssd
Author: rmacklem Date: Thu Jun 6 22:02:03 2013 New Revision: 251476 URL: http://svnweb.freebsd.org/changeset/base/251476 Log: Fix r251444 so that gssd.c still builds for WITHOUT_KERBEROS. Reported by: bf1...@gmail.com MFC after:2 weeks Modified: head/usr.sbin/gssd/gssd.c Modified: head/usr.sbin/gssd/gssd.c == --- head/usr.sbin/gssd/gssd.c Thu Jun 6 21:09:27 2013(r251475) +++ head/usr.sbin/gssd/gssd.c Thu Jun 6 22:02:03 2013(r251476) @@ -42,6 +42,7 @@ __FBSDID($FreeBSD$); #include krb5.h #endif #include pwd.h +#include stdarg.h #include stdio.h #include stdlib.h #include string.h ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r251478 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: delphij Date: Thu Jun 6 23:21:41 2013 New Revision: 251478 URL: http://svnweb.freebsd.org/changeset/base/251478 Log: MFV r251474: * Illumos zfs issue #3137 L2ARC compression Whether or not to compress buffers entering the L2ARC is controlled by compression setting on the dataset, when compression is not off, L2ARC compression is enabled. The compress method is always LZ4 for L2ARC when enabled because it works best for the scenario. MFC after:2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Jun 6 22:31:52 2013(r251477) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Jun 6 23:21:41 2013(r251478) @@ -22,6 +22,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ /* @@ -120,6 +121,7 @@ #include sys/spa.h #include sys/zio.h +#include sys/zio_compress.h #include sys/zfs_context.h #include sys/arc.h #include sys/refcount.h @@ -322,7 +324,11 @@ typedef struct arc_stats { kstat_named_t arcstat_l2_cksum_bad; kstat_named_t arcstat_l2_io_error; kstat_named_t arcstat_l2_size; + kstat_named_t arcstat_l2_asize; kstat_named_t arcstat_l2_hdr_size; + kstat_named_t arcstat_l2_compress_successes; + kstat_named_t arcstat_l2_compress_zeros; + kstat_named_t arcstat_l2_compress_failures; kstat_named_t arcstat_l2_write_trylock_fail; kstat_named_t arcstat_l2_write_passed_headroom; kstat_named_t arcstat_l2_write_spa_mismatch; @@ -395,7 +401,11 @@ static arc_stats_t arc_stats = { { l2_cksum_bad, KSTAT_DATA_UINT64 }, { l2_io_error,KSTAT_DATA_UINT64 }, { l2_size,KSTAT_DATA_UINT64 }, + { l2_asize, KSTAT_DATA_UINT64 }, { l2_hdr_size,KSTAT_DATA_UINT64 }, + { l2_compress_successes, KSTAT_DATA_UINT64 }, + { l2_compress_zeros, KSTAT_DATA_UINT64 }, + { l2_compress_failures, KSTAT_DATA_UINT64 }, { l2_write_trylock_fail, KSTAT_DATA_UINT64 }, { l2_write_passed_headroom, KSTAT_DATA_UINT64 }, { l2_write_spa_mismatch, KSTAT_DATA_UINT64 }, @@ -474,6 +484,9 @@ static arc_state_t *arc_l2c_only; #definearc_c_min ARCSTAT(arcstat_c_min) /* min target cache size */ #definearc_c_max ARCSTAT(arcstat_c_max) /* max target cache size */ +#defineL2ARC_IS_VALID_COMPRESS(_c_) \ + ((_c_) == ZIO_COMPRESS_LZ4 || (_c_) == ZIO_COMPRESS_EMPTY) + static int arc_no_grow;/* Don't try to grow cache size */ static uint64_tarc_tempreserve; static uint64_tarc_loaned_bytes; @@ -636,7 +649,12 @@ uint64_t zfs_crc64_table[256]; */ #defineL2ARC_WRITE_SIZE(8 * 1024 * 1024) /* initial write max */ -#defineL2ARC_HEADROOM 2 /* num of writes */ +#defineL2ARC_HEADROOM 2 /* num of writes */ +/* + * If we discover during ARC scan any buffers to be compressed, we boost + * our headroom for the next scanning cycle by this percentage multiple. + */ +#defineL2ARC_HEADROOM_BOOST200 #defineL2ARC_FEED_SECS 1 /* caching interval secs */ #defineL2ARC_FEED_MIN_MS 200 /* min caching interval ms */ @@ -649,6 +667,7 @@ uint64_t zfs_crc64_table[256]; uint64_t l2arc_write_max = L2ARC_WRITE_SIZE; /* default max write size */ uint64_t l2arc_write_boost = L2ARC_WRITE_SIZE; /* extra write during warmup */ uint64_t l2arc_headroom = L2ARC_HEADROOM; /* number of dev writes */ +uint64_t l2arc_headroom_boost = L2ARC_HEADROOM_BOOST; uint64_t l2arc_feed_secs = L2ARC_FEED_SECS;/* interval seconds */ uint64_t l2arc_feed_min_ms = L2ARC_FEED_MIN_MS;/* min interval milliseconds */ boolean_t l2arc_noprefetch = B_TRUE; /* don't cache prefetch bufs */ @@ -722,8 +741,6 @@ typedef struct l2arc_dev { vdev_t *l2ad_vdev;
svn commit: r251479 - in head/sys/cam: . scsi
Author: scottl Date: Fri Jun 7 00:22:38 2013 New Revision: 251479 URL: http://svnweb.freebsd.org/changeset/base/251479 Log: Simplify the checking of flags for cam_periph_mapmem(). This gets rid of a lot of code redundancy and grossness at very minor expense. Reviewed by: smh Obtained from:Netflix MFC after:3 days Modified: head/sys/cam/cam_periph.c head/sys/cam/scsi/scsi_pass.c head/sys/cam/scsi/scsi_sg.c head/sys/cam/scsi/scsi_target.c Modified: head/sys/cam/cam_periph.c == --- head/sys/cam/cam_periph.c Thu Jun 6 23:21:41 2013(r251478) +++ head/sys/cam/cam_periph.c Fri Jun 7 00:22:38 2013(r251479) @@ -681,9 +681,9 @@ camperiphfree(struct cam_periph *periph) /* * Map user virtual pointers into kernel virtual address space, so we can - * access the memory. This won't work on physical pointers, for now it's - * up to the caller to check for that. (XXX KDM -- should we do that here - * instead?) This also only works for up to MAXPHYS memory. Since we use + * access the memory. This is now a generic function that centralizes most + * of the sanity checks on the data flags, if any. + * This also only works for up to MAXPHYS memory. Since we use * buffers to map stuff in and out, we're limited to the buffer size. */ int @@ -728,9 +728,8 @@ cam_periph_mapmem(union ccb *ccb, struct case XPT_CONT_TARGET_IO: if ((ccb-ccb_h.flags CAM_DIR_MASK) == CAM_DIR_NONE) return(0); - KASSERT((ccb-ccb_h.flags CAM_DATA_MASK) == CAM_DATA_VADDR, - (not VADDR for SCSI_IO %p %x\n, ccb, ccb-ccb_h.flags)); - + if ((ccb-ccb_h.flags CAM_DATA_MASK) != CAM_DATA_VADDR) + return (EINVAL); data_ptrs[0] = ccb-csio.data_ptr; lengths[0] = ccb-csio.dxfer_len; dirs[0] = ccb-ccb_h.flags CAM_DIR_MASK; @@ -739,9 +738,8 @@ cam_periph_mapmem(union ccb *ccb, struct case XPT_ATA_IO: if ((ccb-ccb_h.flags CAM_DIR_MASK) == CAM_DIR_NONE) return(0); - KASSERT((ccb-ccb_h.flags CAM_DATA_MASK) == CAM_DATA_VADDR, - (not VADDR for ATA_IO %p %x\n, ccb, ccb-ccb_h.flags)); - + if ((ccb-ccb_h.flags CAM_DATA_MASK) != CAM_DATA_VADDR) + return (EINVAL); data_ptrs[0] = ccb-ataio.data_ptr; lengths[0] = ccb-ataio.dxfer_len; dirs[0] = ccb-ccb_h.flags CAM_DIR_MASK; @@ -812,8 +810,12 @@ cam_periph_mapmem(union ccb *ccb, struct } - /* this keeps the current process from getting swapped */ /* +* This keeps the the kernel stack of current thread from getting +* swapped. In low-memory situations where the kernel stack might +* otherwise get swapped out, this holds it and allows the thread +* to make progress and release the kernel mapped pages sooner. +* * XXX KDM should I use P_NOSWAP instead? */ PHOLD(curproc); @@ -885,8 +887,7 @@ cam_periph_unmapmem(union ccb *ccb, stru u_int8_t **data_ptrs[CAM_PERIPH_MAXMAPS]; if (mapinfo-num_bufs_used = 0) { - /* allow ourselves to be swapped once again */ - PRELE(curproc); + /* nothing to free and the process wasn't held. */ return; } Modified: head/sys/cam/scsi/scsi_pass.c == --- head/sys/cam/scsi/scsi_pass.c Thu Jun 6 23:21:41 2013 (r251478) +++ head/sys/cam/scsi/scsi_pass.c Fri Jun 7 00:22:38 2013 (r251479) @@ -668,12 +668,11 @@ passsendccb(struct cam_periph *periph, u { struct pass_softc *softc; struct cam_periph_map_info mapinfo; - int error, need_unmap; + xpt_opcode fc; + int error; softc = (struct pass_softc *)periph-softc; - need_unmap = 0; - /* * There are some fields in the CCB header that need to be * preserved, the rest we get from the user. @@ -687,28 +686,13 @@ passsendccb(struct cam_periph *periph, u ccb-ccb_h.cbfcnp = passdone; /* -* We only attempt to map the user memory into kernel space -* if they haven't passed in a physical memory pointer, -* and if there is actually an I/O operation to perform. -* cam_periph_mapmem() supports SCSI, ATA, SMP, ADVINFO and device -* match CCBs. For the SCSI, ATA and ADVINFO CCBs, we only pass the -* CCB in if there's actually data to map. cam_periph_mapmem() will -* do the right thing, even if there isn't data to map, but since CCBs -* without data are a reasonably common occurrence (e.g. test unit -* ready), it will save a few cycles if we check for it here. -
svn commit: r251480 - head/gnu/usr.bin/cc/include
Author: pfg Date: Fri Jun 7 00:48:01 2013 New Revision: 251480 URL: http://svnweb.freebsd.org/changeset/base/251480 Log: gcc: install AMD intrinsics header ammintrin.h This file was included in the changes from r251212 and originated in the pre-GPLv3 gcc43 branch. MFC after:2 weeks Modified: head/gnu/usr.bin/cc/include/Makefile Modified: head/gnu/usr.bin/cc/include/Makefile == --- head/gnu/usr.bin/cc/include/MakefileFri Jun 7 00:22:38 2013 (r251479) +++ head/gnu/usr.bin/cc/include/MakefileFri Jun 7 00:48:01 2013 (r251480) @@ -9,8 +9,8 @@ INCSDIR=${INCLUDEDIR}/gcc/${GCCVER} .PATH: ${GCCDIR}/config/${GCC_CPU} .if ${TARGET_ARCH} == i386 || ${TARGET_ARCH} == amd64 -INCS= emmintrin.h mmintrin.h mm3dnow.h pmmintrin.h tmmintrin.h xmmintrin.h \ - mm_malloc.h +INCS= ammintrin.h emmintrin.h mmintrin.h mm3dnow.h pmmintrin.h \ + tmmintrin.h xmmintrin.h mm_malloc.h .elif ${TARGET_ARCH} == ia64 INCS= ia64intrin.h .elif ${TARGET_ARCH} == arm ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r251481 - head/sys/dev/bge
Author: yongari Date: Fri Jun 7 01:01:39 2013 New Revision: 251481 URL: http://svnweb.freebsd.org/changeset/base/251481 Log: Do not report current link status if driver is not running. Reporting link status in driver has a side-effect that makes mii(4) check current link status. mii(4) will call link status change callback when it sees link state change. Normally this wouldn't have problems. However, ASF/IPMI firmware can actively access PHY regardless of driver's running state such that reporting link status for not-running interface can generate meaningless link UP/DOWN messages. This change also makes dhclient think driver got a valid link regardless of link establishment so it will bypass dhclient's initial link status check. I think that wouldn't be issue though. Tested by:Daniel Braniss da...@cs.huji.ac.il Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c == --- head/sys/dev/bge/if_bge.c Fri Jun 7 00:48:01 2013(r251480) +++ head/sys/dev/bge/if_bge.c Fri Jun 7 01:01:39 2013(r251481) @@ -5583,6 +5583,10 @@ bge_ifmedia_sts(struct ifnet *ifp, struc BGE_LOCK(sc); + if ((ifp-if_flags IFF_UP) == 0) { + BGE_UNLOCK(sc); + return; + } if (sc-bge_flags BGE_FLAG_TBI) { ifmr-ifm_status = IFM_AVALID; ifmr-ifm_active = IFM_ETHER; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r251482 - head/sys/dev/bge
Author: yongari Date: Fri Jun 7 01:21:09 2013 New Revision: 251482 URL: http://svnweb.freebsd.org/changeset/base/251482 Log: Correct setting TX random backoff register. This register is implemented as a 10 bits linear feedback shift register so only lower 10 bits are valid. Because this register is used to initialize random backoff interval register only when resolved duplex is half-duplex, it wouldn't have caused issues in these days. Submitted by: Masanobu SAITOH msai...@netbsd.org Modified: head/sys/dev/bge/if_bge.c head/sys/dev/bge/if_bgereg.h Modified: head/sys/dev/bge/if_bge.c == --- head/sys/dev/bge/if_bge.c Fri Jun 7 01:01:39 2013(r251481) +++ head/sys/dev/bge/if_bge.c Fri Jun 7 01:21:09 2013(r251482) @@ -2280,9 +2280,9 @@ bge_blockinit(struct bge_softc *sc) /* Set random backoff seed for TX */ CSR_WRITE_4(sc, BGE_TX_RANDOM_BACKOFF, - IF_LLADDR(sc-bge_ifp)[0] + IF_LLADDR(sc-bge_ifp)[1] + + (IF_LLADDR(sc-bge_ifp)[0] + IF_LLADDR(sc-bge_ifp)[1] + IF_LLADDR(sc-bge_ifp)[2] + IF_LLADDR(sc-bge_ifp)[3] + - IF_LLADDR(sc-bge_ifp)[4] + IF_LLADDR(sc-bge_ifp)[5] + + IF_LLADDR(sc-bge_ifp)[4] + IF_LLADDR(sc-bge_ifp)[5]) BGE_TX_BACKOFF_SEED_MASK); /* Set inter-packet gap */ Modified: head/sys/dev/bge/if_bgereg.h == --- head/sys/dev/bge/if_bgereg.hFri Jun 7 01:01:39 2013 (r251481) +++ head/sys/dev/bge/if_bgereg.hFri Jun 7 01:21:09 2013 (r251482) @@ -797,7 +797,7 @@ #defineBGE_LEDCTL_BLINKPERIOD_OVERRIDE 0x8000 /* TX backoff seed register */ -#defineBGE_TX_BACKOFF_SEED_MASK0x3F +#defineBGE_TX_BACKOFF_SEED_MASK0x3FF /* Autopoll status register */ #defineBGE_AUTOPOLLSTS_ERROR 0x0001 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r251483 - in head/sys/dev/ath/ath_hal: . ar5416 ar9002
Author: adrian Date: Fri Jun 7 05:17:58 2013 New Revision: 251483 URL: http://svnweb.freebsd.org/changeset/base/251483 Log: Add bluetooth fixes to the AR5416/AR92xx HAL: * Call the bluetooth setup function during the reset path, so the bluetooth settings are actually initialised. * Call the AR9285 diversity functions during bluetooth setup; so the AR9285 diversity and antenna configuration registers are correctly programmed * Misc debugging info. Tested: * AR9285+AR3011 bluetooth combo; this code itself doesn't enable bluetooth coexistence but it's part of what I'm currently using. Modified: head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.c head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c Modified: head/sys/dev/ath/ath_hal/ah.h == --- head/sys/dev/ath/ath_hal/ah.h Fri Jun 7 01:21:09 2013 (r251482) +++ head/sys/dev/ath/ath_hal/ah.h Fri Jun 7 05:17:58 2013 (r251483) @@ -1581,7 +1581,7 @@ struct ath_hal { uint32_t); void__ahdecl(*ah_btCoexSetBmissThresh)(struct ath_hal *, uint32_t); - void__ahdecl(*ah_btcoexSetParameter)(struct ath_hal *, + void__ahdecl(*ah_btCoexSetParameter)(struct ath_hal *, uint32_t, uint32_t); void__ahdecl(*ah_btCoexDisable)(struct ath_hal *); int __ahdecl(*ah_btCoexEnable)(struct ath_hal *); Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Fri Jun 7 01:21:09 2013(r251482) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Fri Jun 7 05:17:58 2013(r251483) @@ -207,7 +207,7 @@ ar5416InitState(struct ath_hal_5416 *ahp ah-ah_btCoexSetQcuThresh = ar5416BTCoexSetQcuThresh; ah-ah_btCoexSetWeights = ar5416BTCoexSetWeights; ah-ah_btCoexSetBmissThresh = ar5416BTCoexSetupBmissThresh; - ah-ah_btcoexSetParameter = ar5416BTCoexSetParameter; + ah-ah_btCoexSetParameter = ar5416BTCoexSetParameter; ah-ah_btCoexDisable= ar5416BTCoexDisable; ah-ah_btCoexEnable = ar5416BTCoexEnable; AH5416(ah)-ah_btCoexSetDiversity = ar5416BTCoexAntennaDiversity; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.c Fri Jun 7 01:21:09 2013(r251482) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.c Fri Jun 7 05:17:58 2013(r251483) @@ -328,6 +328,11 @@ ar5416InitBTCoex(struct ath_hal *ah) { struct ath_hal_5416 *ahp = AH5416(ah); + HALDEBUG(ah, HAL_DEBUG_BT_COEX, + %s: called; configType=%d\n, + __func__, + ahp-ah_btCoexConfigType); + if (ahp-ah_btCoexConfigType == HAL_BT_COEX_CFG_3WIRE) { OS_REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL, (AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB | Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Fri Jun 7 01:21:09 2013(r251482) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Fri Jun 7 05:17:58 2013(r251483) @@ -289,6 +289,12 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO ar5416StartTsf2(ah); #endif + /* +* Enable Bluetooth Coexistence if it's enabled. +*/ + if (AH5416(ah)-ah_btCoexConfigType != HAL_BT_COEX_CFG_NONE) + ar5416InitBTCoex(ah); + /* Restore previous antenna */ OS_REG_WRITE(ah, AR_DEF_ANTENNA, saveDefAntenna); Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c == --- head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Fri Jun 7 01:21:09 2013(r251482) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Fri Jun 7 05:17:58 2013(r251483) @@ -172,14 +172,14 @@ ar9285Attach(uint16_t devid, HAL_SOFTC s /* override with 9285 specific state */ AH5416(ah)-ah_initPLL = ar9280InitPLL; - AH5416(ah)-ah_btCoexSetDiversity = ar5416BTCoexAntennaDiversity; + AH5416(ah)-ah_btCoexSetDiversity = ar9285BTCoexAntennaDiversity; ah-ah_setAntennaSwitch = ar9285SetAntennaSwitch; ah-ah_configPCIE = ar9285ConfigPCIE; ah-ah_disablePCIE = ar9285DisablePCIE;
svn commit: r251484 - head/sys/dev/ath
Author: adrian Date: Fri Jun 7 05:18:07 2013 New Revision: 251484 URL: http://svnweb.freebsd.org/changeset/base/251484 Log: Add accessor macros for the bluetooth coexistence routines. Modified: head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_athvar.h == --- head/sys/dev/ath/if_athvar.hFri Jun 7 05:17:58 2013 (r251483) +++ head/sys/dev/ath/if_athvar.hFri Jun 7 05:18:07 2013 (r251484) @@ -1437,4 +1437,25 @@ void ath_intr(void *); #defineath_hal_spectral_stop(_ah) \ ((*(_ah)-ah_spectralStop)((_ah))) +#defineath_hal_btcoex_supported(_ah) \ + (ath_hal_getcapability(_ah, HAL_CAP_BT_COEX, 0, NULL) == HAL_OK) +#defineath_hal_btcoex_set_info(_ah, _info) \ + ((*(_ah)-ah_btCoexSetInfo)((_ah), (_info))) +#defineath_hal_btcoex_set_config(_ah, _cfg) \ + ((*(_ah)-ah_btCoexSetConfig)((_ah), (_cfg))) +#defineath_hal_btcoex_set_qcu_thresh(_ah, _qcuid) \ + ((*(_ah)-ah_btCoexSetQcuThresh)((_ah), (_qcuid))) +#defineath_hal_btcoex_set_weights(_ah, _weight) \ + ((*(_ah)-ah_btCoexSetWeights)((_ah), (_weight))) +#defineath_hal_btcoex_set_weights(_ah, _weight) \ + ((*(_ah)-ah_btCoexSetWeights)((_ah), (_weight))) +#defineath_hal_btcoex_set_bmiss_thresh(_ah, _thr) \ + ((*(_ah)-ah_btCoexSetBmissThresh)((_ah), (_thr))) +#defineath_hal_btcoex_set_parameter(_ah, _attrib, _val) \ + ((*(_ah)-ah_btCoexSetParameter)((_ah), (_attrib), (_val))) +#defineath_hal_btcoex_enable(_ah) \ + ((*(_ah)-ah_btCoexEnable)((_ah))) +#defineath_hal_btcoex_disable(_ah) \ + ((*(_ah)-ah_btCoexDisable)((_ah))) + #endif /* _DEV_ATH_ATHVAR_H */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org