svn commit: r254177 - head/lib/libproc
Author: rpaulo Date: Sat Aug 10 07:39:15 2013 New Revision: 254177 URL: http://svnweb.freebsd.org/changeset/base/254177 Log: Fix the return value when we found a symbol in .dynstr. This nasty bug was preventing a lot of symbol lookups in dtruss -s, for example. Modified: head/lib/libproc/proc_sym.c Modified: head/lib/libproc/proc_sym.c == --- head/lib/libproc/proc_sym.c Sat Aug 10 06:48:20 2013(r254176) +++ head/lib/libproc/proc_sym.c Sat Aug 10 07:39:15 2013(r254177) @@ -299,6 +299,7 @@ proc_addr2sym(struct proc_handle *p, uin * the function. */ symcopy->st_value = rsym; + error = 0; goto out; } } ___ 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: r254025 - in head/sys: amd64/amd64 arm/arm arm/at91 arm/mv/armadaxp arm/s3c2xx0 arm/xscale/i80321 arm/xscale/i8134x arm/xscale/ixp425 cddl/compat/opensolaris/kern cddl/compat/opensolar
2013/8/10 Olivier Houchard > On Fri, Aug 09, 2013 at 10:27:48AM +0200, Zbigniew Bodek wrote: > > 2013/8/8 Zbyszek Bodek > > > > > On 07.08.2013 20:55, Jeff Roberson wrote: > > > > On Wed, 7 Aug 2013, Zbyszek Bodek wrote: > > > > > > > >> On 07.08.2013 08:21, Jeff Roberson wrote: > > > >>> Author: jeff > > > >>> Date: Wed Aug 7 06:21:20 2013 > > > >>> New Revision: 254025 > > > >>> URL: http://svnweb.freebsd.org/changeset/base/254025 > > > >>> > > > >>> Log: > > > >>> Replace kernel virtual address space allocation with vmem. This > > > >>> provides > > > >>> transparent layering and better fragmentation. > > > >>> > > > >>>- Normalize functions that allocate memory to use kmem_* > > > >>>- Those that allocate address space are named kva_* > > > >>>- Those that operate on maps are named kmap_* > > > >>>- Implement recursive allocation handling for kmem_arena in > vmem. > > > >>> > > > >>> Reviewed by:alc > > > >>> Tested by:pho > > > >>> Sponsored by:EMC / Isilon Storage Division > > > >>> > > > >> > > > >> Hello Jeff, > > > >> > > > >> I'm having some trouble on my ARM platform staring from this commit. > > > >> Kernel panics on assertion very early. Please check out log below > (as > > > >> you can see bt doesn't look helpful but assertion message is > visible. I > > > >> can send you which functions are in bt if it is necessary). > > > > > > > > It would be very helpful to know which function is passing the > unaligned > > > > value. I will resolve this later today if you can get me that > > > information. > > > > > > > > Thanks, > > > > Jeff > > > > > > Hi, > > I think I fixed all the issues with vmem on arm, at least I can now boot my > board. Zbyszek, can you confirm it works for you too ? > > Thanks ! > > Olivier > Hello, Thanks a lot. Now everything works fine for me. Best regards Zbyszek Bodek ___ 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: r254182 - in head/sys: amd64/amd64 dev/drm2/ttm dev/virtio/balloon i386/i386 vm
Author: kib Date: Sat Aug 10 17:36:42 2013 New Revision: 254182 URL: http://svnweb.freebsd.org/changeset/base/254182 Log: Different consumers of the struct vm_page abuse pageq member to keep additional information, when the page is guaranteed to not belong to a paging queue. Usually, this results in a lot of type casts which make reasoning about the code correctness harder. Sometimes m->object is used instead of pageq, which could cause real and confusing bugs if non-NULL m->object is leaked. See r141955 and r253140 for examples. Change the pageq member into a union containing explicitly-typed members. Use them instead of type-punning or abusing m->object in x86 pmaps, uma and vm_page_alloc_contig(). Requested and reviewed by:alc Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/amd64/pmap.c head/sys/dev/drm2/ttm/ttm_page_alloc.c head/sys/dev/virtio/balloon/virtio_balloon.c head/sys/i386/i386/pmap.c head/sys/vm/device_pager.c head/sys/vm/memguard.c head/sys/vm/sg_pager.c head/sys/vm/uma_core.c head/sys/vm/uma_int.h head/sys/vm/vm_page.c head/sys/vm/vm_page.h head/sys/vm/vm_pageout.c head/sys/vm/vm_phys.c Modified: head/sys/amd64/amd64/pmap.c == --- head/sys/amd64/amd64/pmap.c Sat Aug 10 16:23:29 2013(r254181) +++ head/sys/amd64/amd64/pmap.c Sat Aug 10 17:36:42 2013(r254182) @@ -295,13 +295,12 @@ static boolean_t pmap_protect_pde(pmap_t vm_prot_t prot); static void pmap_pte_attr(pt_entry_t *pte, int cache_bits); static int pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offset_t sva, - vm_page_t *free, struct rwlock **lockp); -static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, - vm_offset_t sva, pd_entry_t ptepde, vm_page_t *free, - struct rwlock **lockp); +struct spglist *free, struct rwlock **lockp); +static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, vm_offset_t sva, +pd_entry_t ptepde, struct spglist *free, struct rwlock **lockp); static void pmap_remove_pt_page(pmap_t pmap, vm_page_t mpte); static void pmap_remove_page(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, -vm_page_t *free); +struct spglist *free); static boolean_t pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, vm_page_t m, struct rwlock **lockp); static void pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, @@ -316,8 +315,8 @@ static vm_page_t pmap_allocpte(pmap_t pm struct rwlock **lockp); static void _pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, -vm_page_t *free); -static int pmap_unuse_pt(pmap_t, vm_offset_t, pd_entry_t, vm_page_t *); +struct spglist *free); +static int pmap_unuse_pt(pmap_t, vm_offset_t, pd_entry_t, struct spglist *); static vm_offset_t pmap_kmem_choose(vm_offset_t addr); /* @@ -1490,14 +1489,12 @@ pmap_qremove(vm_offset_t sva, int count) * Page table page management routines. ***/ static __inline void -pmap_free_zero_pages(vm_page_t free) +pmap_free_zero_pages(struct spglist *free) { vm_page_t m; - while (free != NULL) { - m = free; - free = (void *)m->object; - m->object = NULL; + while ((m = SLIST_FIRST(free)) != NULL) { + SLIST_REMOVE_HEAD(free, plinks.s.ss); /* Preserve the page's PG_ZERO setting. */ vm_page_free_toq(m); } @@ -1509,15 +1506,15 @@ pmap_free_zero_pages(vm_page_t free) * physical memory manager after the TLB has been updated. */ static __inline void -pmap_add_delayed_free_list(vm_page_t m, vm_page_t *free, boolean_t set_PG_ZERO) +pmap_add_delayed_free_list(vm_page_t m, struct spglist *free, +boolean_t set_PG_ZERO) { if (set_PG_ZERO) m->flags |= PG_ZERO; else m->flags &= ~PG_ZERO; - m->object = (void *)*free; - *free = m; + SLIST_INSERT_HEAD(free, m, plinks.s.ss); } /* @@ -1567,7 +1564,7 @@ pmap_remove_pt_page(pmap_t pmap, vm_page * page table page was unmapped and FALSE otherwise. */ static inline boolean_t -pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_page_t *free) +pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, struct spglist *free) { --m->wire_count; @@ -1579,7 +1576,7 @@ pmap_unwire_ptp(pmap_t pmap, vm_offset_t } static void -_pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_page_t *free) +_pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, struct spglist *free) { PMAP_LOCK_ASSERT(pmap, MA_OWNED); @@ -1637,7 +1634,8 @@ _pmap_unwire_ptp(pmap_t pmap, vm_offset_ * conditionally free the page, and manage the hold/wire counts. */ static int -pmap_unuse_pt(pmap_t pmap, vm_offset_t va, pd_entry_t ptepde, vm_page_t *free) +pmap_unuse_pt(pm
Re: svn commit: r253550 - head/sys/dev/mps
On Mon, Jul 22, 2013 at 06:41:54PM +, Kenneth D. Merry wrote: > Author: ken > Date: Mon Jul 22 18:41:53 2013 > New Revision: 253550 > URL: http://svnweb.freebsd.org/changeset/base/253550 > > Log: > Merge in phase 14+ -> 16 mps driver fixes from LSI: > Submitted by: LSI > MFC after: 1 week Not done? ___ 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: r254185 - head/sys/modules/random
Author: kib Date: Sat Aug 10 18:23:28 2013 New Revision: 254185 URL: http://svnweb.freebsd.org/changeset/base/254185 Log: Restore the ability to kldload random.ko, by linking in the newly added random_adaptors.c. Modified: head/sys/modules/random/Makefile Modified: head/sys/modules/random/Makefile == --- head/sys/modules/random/MakefileSat Aug 10 18:23:18 2013 (r254184) +++ head/sys/modules/random/MakefileSat Aug 10 18:23:28 2013 (r254185) @@ -5,7 +5,7 @@ .PATH: ${.CURDIR}/../../crypto/sha2 KMOD= random -SRCS= randomdev.c probe.c +SRCS= randomdev.c random_adaptors.c probe.c .if ${MACHINE} == "amd64" || ${MACHINE} == "i386" SRCS+= nehemiah.c SRCS+= ivy.c ___ 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: r254184 - head/sys/conf
Author: gjb Date: Sat Aug 10 18:23:18 2013 New Revision: 254184 URL: http://svnweb.freebsd.org/changeset/base/254184 Log: Fix a typo. The script should run /usr/bin/svnliteversion instead of /usr/bin/svnversion in the affected section. Reported by: lev, Dan Mack Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh == --- head/sys/conf/newvers.shSat Aug 10 17:45:54 2013(r254183) +++ head/sys/conf/newvers.shSat Aug 10 18:23:18 2013(r254184) @@ -105,7 +105,7 @@ for dir in /usr/bin /usr/local/bin; do done if [ -z "${svnversion}" ] && [ -x /usr/bin/svnliteversion ] ; then - /usr/bin/svnversion $(basename ${0}) >/dev/null 2>&1 + /usr/bin/svnliteversion $(basename ${0}) >/dev/null 2>&1 if [ $? -eq 0 ]; then svnversion=/usr/bin/svnliteversion else ___ 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: r254185 - head/sys/modules/random
On Sat, Aug 10, 2013 at 11:23 AM, Konstantin Belousov wrote: > Author: kib > Date: Sat Aug 10 18:23:28 2013 > New Revision: 254185 > URL: http://svnweb.freebsd.org/changeset/base/254185 > > Log: > Restore the ability to kldload random.ko, by linking in the newly > added random_adaptors.c. > > Modified: > head/sys/modules/random/Makefile > > Modified: head/sys/modules/random/Makefile > == > --- head/sys/modules/random/MakefileSat Aug 10 18:23:18 2013 > (r254184) > +++ head/sys/modules/random/MakefileSat Aug 10 18:23:28 2013 > (r254185) > @@ -5,7 +5,7 @@ > .PATH: ${.CURDIR}/../../crypto/sha2 > > KMOD= random > -SRCS= randomdev.c probe.c > +SRCS= randomdev.c random_adaptors.c probe.c > .if ${MACHINE} == "amd64" || ${MACHINE} == "i386" > SRCS+= nehemiah.c > SRCS+= ivy.c However, random_adapters.c is "standard": # grep random files dev/random/harvest.cstandard dev/random/hash.c optional random dev/random/probe.c optional random dev/random/random_adaptors.cstandard dev/random/randomdev.c optional random dev/random/randomdev_soft.c optional random dev/random/yarrow.c optional random I understand why harvest.c is standard - it's called by drivers. But wouldn't your change to the module above duplicate the module list into two separate namespaces? -- Peter Wemm - pe...@wemm.org; pe...@freebsd.org; pe...@yahoo-inc.com; KI6FJV UTF-8: for when a ' just won\342\200\231t do. ZFS must be the bacon of file systems. "everything's better with ZFS" ___ 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: r254185 - head/sys/modules/random
On Sat, Aug 10, 2013 at 12:27:54PM -0700, Peter Wemm wrote: > On Sat, Aug 10, 2013 at 11:23 AM, Konstantin Belousov > wrote: > > Author: kib > > Date: Sat Aug 10 18:23:28 2013 > > New Revision: 254185 > > URL: http://svnweb.freebsd.org/changeset/base/254185 > > > > Log: > > Restore the ability to kldload random.ko, by linking in the newly > > added random_adaptors.c. > > > > Modified: > > head/sys/modules/random/Makefile > > > > Modified: head/sys/modules/random/Makefile > > == > > --- head/sys/modules/random/MakefileSat Aug 10 18:23:18 2013 > > (r254184) > > +++ head/sys/modules/random/MakefileSat Aug 10 18:23:28 2013 > > (r254185) > > @@ -5,7 +5,7 @@ > > .PATH: ${.CURDIR}/../../crypto/sha2 > > > > KMOD= random > > -SRCS= randomdev.c probe.c > > +SRCS= randomdev.c random_adaptors.c probe.c > > .if ${MACHINE} == "amd64" || ${MACHINE} == "i386" > > SRCS+= nehemiah.c > > SRCS+= ivy.c > > However, random_adapters.c is "standard": > # grep random files > dev/random/harvest.c standard > dev/random/hash.c optional random > dev/random/probe.coptional random > dev/random/random_adaptors.c standard > dev/random/randomdev.coptional random > dev/random/randomdev_soft.c optional random > dev/random/yarrow.c optional random > > I understand why harvest.c is standard - it's called by drivers. But > wouldn't your change to the module above duplicate the module list > into two separate namespaces? Oops, my change is wrong. Apparently, I did not re-configured my kernel where the random.ko module failed the load. Reverting now, thank you for noticing. pgpcJJaOUlO4w.pgp Description: PGP signature
svn commit: r254190 - head/sys/modules/random
Author: kib Date: Sat Aug 10 19:38:29 2013 New Revision: 254190 URL: http://svnweb.freebsd.org/changeset/base/254190 Log: The random_adapters.c is standard in the conf/files. Revert wrong r254185. Pointed out by: peter Modified: head/sys/modules/random/Makefile Modified: head/sys/modules/random/Makefile == --- head/sys/modules/random/MakefileSat Aug 10 19:08:38 2013 (r254189) +++ head/sys/modules/random/MakefileSat Aug 10 19:38:29 2013 (r254190) @@ -5,7 +5,7 @@ .PATH: ${.CURDIR}/../../crypto/sha2 KMOD= random -SRCS= randomdev.c random_adaptors.c probe.c +SRCS= randomdev.c probe.c .if ${MACHINE} == "amd64" || ${MACHINE} == "i386" SRCS+= nehemiah.c SRCS+= ivy.c ___ 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: r254191 - head/sys/dev/cpuctl
Author: kib Date: Sat Aug 10 20:54:15 2013 New Revision: 254191 URL: http://svnweb.freebsd.org/changeset/base/254191 Log: Match malloc(9) calls with free(9), not contigfree(9). Also remove unneeded checks for NULL, free(9) can handle NULL pointers on its own, and the regions were allocated with M_WAITOK flag as well. Reported and tested by: Larry Rosenman MFC after:1 week Modified: head/sys/dev/cpuctl/cpuctl.c Modified: head/sys/dev/cpuctl/cpuctl.c == --- head/sys/dev/cpuctl/cpuctl.cSat Aug 10 19:38:29 2013 (r254190) +++ head/sys/dev/cpuctl/cpuctl.cSat Aug 10 20:54:15 2013 (r254191) @@ -346,8 +346,7 @@ update_intel(int cpu, cpuctl_update_args else ret = EEXIST; fail: - if (ptr != NULL) - contigfree(ptr, args->size, M_CPUCTL); + free(ptr, M_CPUCTL); return (ret); } @@ -476,8 +475,7 @@ update_via(int cpu, cpuctl_update_args_t else ret = 0; fail: - if (ptr != NULL) - contigfree(ptr, args->size, M_CPUCTL); + free(ptr, M_CPUCTL); return (ret); } ___ 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: r254194 - in head: contrib/bmake usr.bin/bmake
Author: sjg Date: Sat Aug 10 21:31:35 2013 New Revision: 254194 URL: http://svnweb.freebsd.org/changeset/base/254194 Log: ParseGetLine: don't treat a zero byte as end of buffer if P_end says it isn't. Consume up to next newline, and issue a parse warning. If no newline found before P_end, carry on as before. Modified: head/contrib/bmake/parse.c head/usr.bin/bmake/Makefile Modified: head/contrib/bmake/parse.c == --- head/contrib/bmake/parse.c Sat Aug 10 21:13:18 2013(r254193) +++ head/contrib/bmake/parse.c Sat Aug 10 21:31:35 2013(r254194) @@ -2582,6 +2582,16 @@ ParseGetLine(int flags, int *length) if (cf->P_end == NULL) /* End of string (aka for loop) data */ break; + /* see if there is more we can parse */ + while (ptr++ < cf->P_end) { + if ((ch = *ptr) == '\n') { + if (ptr > line && ptr[-1] == '\\') + continue; + Parse_Error(PARSE_WARNING, + "Zero byte read from file, skipping rest of line."); + break; + } + } if (cf->nextbuf != NULL) { /* * End of this buffer; return EOF and outer logic Modified: head/usr.bin/bmake/Makefile == --- head/usr.bin/bmake/Makefile Sat Aug 10 21:13:18 2013(r254193) +++ head/usr.bin/bmake/Makefile Sat Aug 10 21:31:35 2013(r254194) @@ -17,7 +17,7 @@ CLEANFILES+= bootstrap # $Id: Makefile,v 1.17 2013/07/30 19:13:53 sjg Exp $ # Base version on src date -MAKE_VERSION= 20130730 +MAKE_VERSION= 20130810 PROG?= ${.CURDIR:T} ___ 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: r254195 - head/sys/kern
Author: kib Date: Sat Aug 10 21:42:14 2013 New Revision: 254195 URL: http://svnweb.freebsd.org/changeset/base/254195 Log: The r254167 moved initialization of the sleepqueues before the witness is operational. init_sleepqueues() initializes 256 mutexes, which, due to witness still being cold, started to overflow the pending_locks array. As stated in the reported panic message, increase WITNESS_PENDLIST from 768 to 1024, which provides space for additional 256 locks. Reported by: many Tested by:rakuco, bdrewery Modified: head/sys/kern/subr_witness.c Modified: head/sys/kern/subr_witness.c == --- head/sys/kern/subr_witness.cSat Aug 10 21:31:35 2013 (r254194) +++ head/sys/kern/subr_witness.cSat Aug 10 21:42:14 2013 (r254195) @@ -135,7 +135,7 @@ __FBSDID("$FreeBSD$"); #defineWITNESS_COUNT 1024 #defineWITNESS_CHILDCOUNT (WITNESS_COUNT * 4) #defineWITNESS_HASH_SIZE 251 /* Prime, gives load factor < 2 */ -#defineWITNESS_PENDLIST768 +#defineWITNESS_PENDLIST1024 /* Allocate 256 KB of stack data space */ #defineWITNESS_LO_DATA_COUNT 2048 ___ 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: r254196 - head/sys/net80211
Author: adrian Date: Sat Aug 10 21:46:58 2013 New Revision: 254196 URL: http://svnweb.freebsd.org/changeset/base/254196 Log: Add in missing m_free()'s during error conditions. Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c == --- head/sys/net80211/ieee80211_output.cSat Aug 10 21:42:14 2013 (r254195) +++ head/sys/net80211/ieee80211_output.cSat Aug 10 21:46:58 2013 (r254196) @@ -396,6 +396,9 @@ ieee80211_start_pkt(struct ieee80211vap * Start method for vap's. All packets from the stack come * through here. We handle common processing of the packets * before dispatching them to the underlying device. + * + * if_transmit() requires that the mbuf be consumed by this call + * regardless of the return condition. */ int ieee80211_vap_transmit(struct ifnet *ifp, struct mbuf *m) @@ -410,6 +413,7 @@ ieee80211_vap_transmit(struct ifnet *ifp "%s: ignore queue, parent %s not up+running\n", __func__, parent->if_xname); /* XXX stat */ + m_freem(m); return (EINVAL); } if (vap->iv_state == IEEE80211_S_SLEEP) { @@ -417,6 +421,7 @@ ieee80211_vap_transmit(struct ifnet *ifp * In power save, wakeup device for transmit. */ ieee80211_new_state(vap, IEEE80211_S_RUN, 0); + m_freem(m); return (0); } /* @@ -435,6 +440,7 @@ ieee80211_vap_transmit(struct ifnet *ifp vap->iv_stats.is_tx_badstate++; IEEE80211_UNLOCK(ic); ifp->if_drv_flags |= IFF_DRV_OACTIVE; + m_freem(m); return (EINVAL); } IEEE80211_UNLOCK(ic); ___ 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: r254197 - head/cddl/contrib/opensolaris/lib/libdtrace/common
Author: rpaulo Date: Sat Aug 10 23:17:09 2013 New Revision: 254197 URL: http://svnweb.freebsd.org/changeset/base/254197 Log: Load the dtraceall module if /dev/dtrace/dtrace doesn't exist. MFC after:3 days Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c == --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.cSat Aug 10 21:46:58 2013(r254196) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.cSat Aug 10 23:17:09 2013(r254197) @@ -1086,7 +1086,17 @@ dt_vopen(int version, int flags, int *er dtfd = open("/dev/dtrace/dtrace", O_RDWR); err = errno; /* save errno from opening dtfd */ - +#if defined(__FreeBSD__) + /* +* Automatically load the 'dtraceall' module if we couldn't open the +* char device. +*/ + if (err == ENOENT && modfind("dtraceall") < 0) { + kldload("dtraceall"); /* ignore the error */ + dtfd = open("/dev/dtrace/dtrace", O_RDWR); + err = errno; + } +#endif #if defined(sun) ftfd = open("/dev/dtrace/provider/fasttrap", O_RDWR); #else ___ 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: r254198 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace
Author: rpaulo Date: Sun Aug 11 00:57:01 2013 New Revision: 254198 URL: http://svnweb.freebsd.org/changeset/base/254198 Log: fasttrap_fork(): unlock the processes before removing the tracepoints. In the future, we'll need to come up with new proc_*() functions that accept locked processes. For now, this prevents postgresql + DTrace from crashing the system. MFC after:1 month Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c == --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Sat Aug 10 23:17:09 2013(r254197) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Sun Aug 11 00:57:01 2013(r254198) @@ -502,7 +502,13 @@ fasttrap_fork(proc_t *p, proc_t *cp) sprlock_proc(cp); mtx_unlock_spin(&cp->p_slock); #else + /* +* fasttrap_tracepoint_remove() expects the child process to be +* unlocked and the VM then expects curproc to be unlocked. +*/ _PHOLD(cp); + PROC_UNLOCK(cp); + PROC_UNLOCK(p); #endif /* @@ -537,6 +543,8 @@ fasttrap_fork(proc_t *p, proc_t *cp) mutex_enter(&cp->p_lock); sprunlock(cp); #else + PROC_LOCK(p); + PROC_LOCK(cp); _PRELE(cp); #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"
svn commit: r254200 - head/sys/contrib/dev/iwn
Author: adrian Date: Sun Aug 11 01:04:07 2013 New Revision: 254200 URL: http://svnweb.freebsd.org/changeset/base/254200 Log: Remove a now-unused firmware. Deleted: head/sys/contrib/dev/iwn/iwlwifi-6000g2a-17.168.5.3.fw.uu ___ 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: r254204 - head/sys/dev/iwn
Author: adrian Date: Sun Aug 11 01:57:54 2013 New Revision: 254204 URL: http://svnweb.freebsd.org/changeset/base/254204 Log: Prepare for the PAN (personal area network) support for iwn(4). * Break out the single, static RX context into a pointer, and .. * .. extend it to two RX contexts - a default and a PAN context. Whilst here, add a few extra fields in preparation for further iwn(4) work. Tested: * Intel 4965, STA mode - same level of stability * Intel 5100, STA mode - no change Submitted by: Cedric Gross Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwnvar.h Modified: head/sys/dev/iwn/if_iwn.c == --- head/sys/dev/iwn/if_iwn.c Sun Aug 11 01:14:46 2013(r254203) +++ head/sys/dev/iwn/if_iwn.c Sun Aug 11 01:57:54 2013(r254204) @@ -1,4 +1,6 @@ /*- + * Copyright (c) 2013 Cedric GROSS + * Copyright (c) 2011 Intel Corporation * Copyright (c) 2007-2009 * Damien Bergamini * Copyright (c) 2008 @@ -521,6 +523,7 @@ iwn_attach(device_t dev) /* Read hardware revision and attach. */ sc->hw_type = (IWN_READ(sc, IWN_HW_REV) >> IWN_HW_REV_TYPE_SHIFT) & IWN_HW_REV_TYPE_MASK; + sc->subdevice_id = pci_get_subdevice(dev); if (sc->hw_type == IWN_HW_REV_TYPE_4965) error = iwn4965_attach(sc, pci_get_device(dev)); else @@ -908,19 +911,27 @@ iwn_vap_create(struct ieee80211com *ic, { struct iwn_vap *ivp; struct ieee80211vap *vap; + uint8_t mac1[IEEE80211_ADDR_LEN]; + struct iwn_softc *sc = ic->ic_ifp->if_softc; if (!TAILQ_EMPTY(&ic->ic_vaps)) /* only one at a time */ return NULL; + + IEEE80211_ADDR_COPY(mac1, mac); + ivp = (struct iwn_vap *) malloc(sizeof(struct iwn_vap), M_80211_VAP, M_NOWAIT | M_ZERO); if (ivp == NULL) return NULL; vap = &ivp->iv_vap; - ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac); + ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac1); + ivp->ctx = IWN_RXON_BSS_CTX; + IEEE80211_ADDR_COPY(ivp->macaddr, mac1); vap->iv_bmissthreshold = 10;/* override default */ /* Override with driver methods. */ ivp->iv_newstate = vap->iv_newstate; vap->iv_newstate = iwn_newstate; + sc->ivap[IWN_RXON_BSS_CTX] = vap; ieee80211_ratectl_init(vap); /* Complete setup. */ @@ -2339,6 +2350,8 @@ iwn_newstate(struct ieee80211vap *vap, e IWN_LOCK(sc); callout_stop(&sc->calib_to); + sc->rxon = &sc->rx_on[IWN_RXON_BSS_CTX]; + switch (nstate) { case IEEE80211_S_ASSOC: if (vap->iv_state != IEEE80211_S_RUN) @@ -2352,8 +2365,8 @@ iwn_newstate(struct ieee80211vap *vap, e * !AUTH -> AUTH transition requires state reset to handle * reassociations correctly. */ - sc->rxon.associd = 0; - sc->rxon.filter &= ~htole32(IWN_FILTER_BSS); + sc->rxon->associd = 0; + sc->rxon->filter &= ~htole32(IWN_FILTER_BSS); sc->calib.state = IWN_CALIB_STATE_INIT; if ((error = iwn_auth(sc, vap)) != 0) { @@ -4367,6 +4380,8 @@ iwn_add_broadcast_node(struct iwn_softc DPRINTF(sc, IWN_DEBUG_TRACE, "->%s begin\n", __func__); + sc->rxon = &sc->rx_on[IWN_RXON_BSS_CTX]; + memset(&node, 0, sizeof node); IEEE80211_ADDR_COPY(node.macaddr, ifp->if_broadcastaddr); node.id = sc->broadcast_id; @@ -4550,8 +4565,9 @@ iwn4965_set_txpower(struct iwn_softc *sc int i, c, grp, maxpwr; uint8_t chan; + sc->rxon = &sc->rx_on[IWN_RXON_BSS_CTX]; /* Retrieve current channel from last RXON. */ - chan = sc->rxon.chan; + chan = sc->rxon->chan; DPRINTF(sc, IWN_DEBUG_RESET, "setting TX power for channel %d\n", chan); @@ -4910,8 +4926,8 @@ iwn_collect_noise(struct iwn_softc *sc, #ifdef notyet /* XXX Disable RX chains with no antennas connected. */ - sc->rxon.rxchain = htole16(IWN_RXCHAIN_SEL(sc->chainmask)); - (void)iwn_cmd(sc, IWN_CMD_RXON, &sc->rxon, sc->rxonsz, 1); + sc->rxon->rxchain = htole16(IWN_RXCHAIN_SEL(sc->chainmask)); + (void)iwn_cmd(sc, IWN_CMD_RXON, sc->rxon, sc->rxonsz, 1); #endif /* Enable power-saving mode if requested by user. */ @@ -5440,39 +5456,40 @@ iwn_config(struct iwn_softc *sc) } /* Set mode, channel, RX filter and enable RX. */ - memset(&sc->rxon, 0, sizeof (struct iwn_rxon)); - IEEE80211_ADDR_COPY(sc->rxon.myaddr, IF_LLADDR(ifp)); - IEEE80211_ADDR_COPY(sc->rxon.wlap, IF_LLADDR(ifp)); - sc->rxon.chan = ieee80211_chan2ieee(ic, ic->ic_curchan); - sc->rxon.flags = htole32(IWN_RXON_TSF | IWN_RXON_CTS_TO_SELF); + sc->
svn commit: r254206 - head/sys/dev/iwn
Author: adrian Date: Sun Aug 11 03:39:28 2013 New Revision: 254206 URL: http://svnweb.freebsd.org/changeset/base/254206 Log: Use the correct structure size when flipping the BT coex state machine. This showed up when doing some basic testing on the Intel 6230. Tested: * Intel 6230, STA mode Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c == --- head/sys/dev/iwn/if_iwn.c Sun Aug 11 02:53:18 2013(r254205) +++ head/sys/dev/iwn/if_iwn.c Sun Aug 11 03:39:28 2013(r254206) @@ -5372,7 +5372,7 @@ iwn_send_advanced_btcoex(struct iwn_soft return error; /* Force BT state machine change. */ - memset(&btprot, 0, sizeof btprio); + memset(&btprot, 0, sizeof btprot); btprot.open = 1; btprot.type = 1; error = iwn_cmd(sc, IWN_CMD_BT_COEX_PROT, &btprot, sizeof(btprot), 1); ___ 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: r254207 - head/sys/dev/pci
Author: rpaulo Date: Sun Aug 11 06:57:57 2013 New Revision: 254207 URL: http://svnweb.freebsd.org/changeset/base/254207 Log: Use device_printf(). Modified: head/sys/dev/pci/fixup_pci.c Modified: head/sys/dev/pci/fixup_pci.c == --- head/sys/dev/pci/fixup_pci.cSun Aug 11 03:39:28 2013 (r254206) +++ head/sys/dev/pci/fixup_pci.cSun Aug 11 06:57:57 2013 (r254207) @@ -92,13 +92,13 @@ fixwsc_natoma(device_t dev) pmccfg = pci_read_config(dev, 0x50, 2); #if defined(SMP) if (pmccfg & 0x8000) { - printf("Correcting Natoma config for SMP\n"); + device_printf(dev, "correcting Natoma config for SMP\n"); pmccfg &= ~0x8000; pci_write_config(dev, 0x50, pmccfg, 2); } #else if ((pmccfg & 0x8000) == 0) { - printf("Correcting Natoma config for non-SMP\n"); + device_printf(dev, "correcting Natoma config for non-SMP\n"); pmccfg |= 0x8000; pci_write_config(dev, 0x50, pmccfg, 2); } @@ -132,7 +132,8 @@ fixc1_nforce2(device_t dev) pci_get_function(dev) == 0) { val = pci_read_config(dev, 0x6c, 4); if (val & 0x000e) { - printf("Correcting nForce2 C1 CPU disconnect hangs\n"); + device_printf(dev, + "correcting nForce2 C1 CPU disconnect hangs\n"); val &= ~0x000e; pci_write_config(dev, 0x6c, val, 4); } ___ 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"