svn commit: r290386 - stable/10/usr.sbin/bhyve
Author: ngie Date: Thu Nov 5 08:27:45 2015 New Revision: 290386 URL: https://svnweb.freebsd.org/changeset/base/290386 Log: MFC r289746: Exit with a user-friendly message instead of tripping an assert if vm_activate_cpu(..) fails when called from fbsdrun_addcpu(..) PR: 203884 Reviewed by: grehan Submitted by: William OrrModified: stable/10/usr.sbin/bhyve/bhyverun.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/bhyverun.c == --- stable/10/usr.sbin/bhyve/bhyverun.c Thu Nov 5 07:48:48 2015 (r290385) +++ stable/10/usr.sbin/bhyve/bhyverun.c Thu Nov 5 08:27:45 2015 (r290386) @@ -258,7 +258,8 @@ fbsdrun_addcpu(struct vmctx *ctx, int fr * with vm_suspend(). */ error = vm_activate_cpu(ctx, newcpu); - assert(error == 0); + if (error != 0) + err(EX_OSERR, "could not activate CPU %d", newcpu); CPU_SET_ATOMIC(newcpu, ); ___ 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-unsubscr...@freebsd.org"
svn commit: r290387 - head/sys/cam/scsi
Author: mav Date: Thu Nov 5 09:07:53 2015 New Revision: 290387 URL: https://svnweb.freebsd.org/changeset/base/290387 Log: Extend mask of VMware virtual disks. Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c == --- head/sys/cam/scsi/scsi_da.c Thu Nov 5 08:27:45 2015(r290386) +++ head/sys/cam/scsi/scsi_da.c Thu Nov 5 09:07:53 2015(r290387) @@ -368,7 +368,7 @@ static struct da_quirk_entry da_quirk_ta * VMware returns BUSY status when storage has transient * connectivity problems, so better wait. */ - {T_DIRECT, SIP_MEDIA_FIXED, "VMware", "Virtual disk", "*"}, + {T_DIRECT, SIP_MEDIA_FIXED, "VMware*", "*", "*"}, /*quirks*/ DA_Q_RETRY_BUSY }, /* USB mass storage devices supported by umass(4) */ ___ 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-unsubscr...@freebsd.org"
svn commit: r290392 - in head/sys: x86/xen xen
Author: royger Date: Thu Nov 5 14:33:46 2015 New Revision: 290392 URL: https://svnweb.freebsd.org/changeset/base/290392 Log: xen/intr: fix the event channel enabled per-cpu mask Fix two issues with the current event channel code, first ENABLED_SETSIZE is not correctly defined and then using a BITSET to store the per-cpu masks is not portable to other arches, since on arm32 the event channel arrays shared with the hypervisor are of type uint64_t and not long. Partially restore the previous code but switch the bit operations to use the recently introduced xen_{set/clear/test}_bit versions. Reviewed by: Julien GrallSponsored by: Citrix Systems R Differential Revision:https://reviews.freebsd.org/D4080 Modified: head/sys/x86/xen/xen_intr.c head/sys/xen/xen-os.h Modified: head/sys/x86/xen/xen_intr.c == --- head/sys/x86/xen/xen_intr.c Thu Nov 5 11:06:46 2015(r290391) +++ head/sys/x86/xen/xen_intr.c Thu Nov 5 14:33:46 2015(r290392) @@ -71,9 +71,6 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_XENINTR, "xen_intr", "Xen Interrupt Services"); -#define ENABLED_SETSIZE(sizeof(u_long) * 8) -BITSET_DEFINE(enabledbits, ENABLED_SETSIZE); - /** * Per-cpu event channel processing state. */ @@ -98,7 +95,7 @@ struct xen_intr_pcpu_data { * A bitmap of ports that can be serviced from this CPU. * A set bit means interrupt handling is enabled. */ - struct enabledbits evtchn_enabled; + u_long evtchn_enabled[sizeof(u_long) * 8]; }; /* @@ -215,7 +212,7 @@ evtchn_cpu_mask_port(u_int cpu, evtchn_p struct xen_intr_pcpu_data *pcpu; pcpu = DPCPU_ID_PTR(cpu, xen_intr_pcpu); - BIT_CLR_ATOMIC(ENABLED_SETSIZE, port, >evtchn_enabled); + xen_clear_bit(port, pcpu->evtchn_enabled); } /** @@ -237,7 +234,7 @@ evtchn_cpu_unmask_port(u_int cpu, evtchn struct xen_intr_pcpu_data *pcpu; pcpu = DPCPU_ID_PTR(cpu, xen_intr_pcpu); - BIT_SET_ATOMIC(ENABLED_SETSIZE, port, >evtchn_enabled); + xen_set_bit(port, pcpu->evtchn_enabled); } /** @@ -499,9 +496,14 @@ static inline u_long xen_intr_active_ports(struct xen_intr_pcpu_data *pcpu, shared_info_t *sh, u_int idx) { + + CTASSERT(sizeof(sh->evtchn_mask[0]) == sizeof(sh->evtchn_pending[0])); + CTASSERT(sizeof(sh->evtchn_mask[0]) == sizeof(pcpu->evtchn_enabled[0])); + CTASSERT(sizeof(sh->evtchn_mask) == sizeof(sh->evtchn_pending)); + CTASSERT(sizeof(sh->evtchn_mask) == sizeof(pcpu->evtchn_enabled)); return (sh->evtchn_pending[idx] & ~sh->evtchn_mask[idx] - & pcpu->evtchn_enabled.__bits[idx]); + & pcpu->evtchn_enabled[idx]); } /** @@ -637,10 +639,8 @@ xen_intr_init(void *dummy __unused) */ CPU_FOREACH(i) { pcpu = DPCPU_ID_PTR(i, xen_intr_pcpu); - if (i == 0) - BIT_FILL(ENABLED_SETSIZE, >evtchn_enabled); - else - BIT_ZERO(ENABLED_SETSIZE, >evtchn_enabled); + memset(pcpu->evtchn_enabled, i == 0 ? ~0 : 0, + sizeof(pcpu->evtchn_enabled)); xen_intr_intrcnt_add(i); } @@ -753,11 +753,8 @@ xen_intr_resume(struct pic *unused, bool struct xen_intr_pcpu_data *pcpu; pcpu = DPCPU_ID_PTR(i, xen_intr_pcpu); - - if (i == 0) - BIT_FILL(ENABLED_SETSIZE, >evtchn_enabled); - else - BIT_ZERO(ENABLED_SETSIZE, >evtchn_enabled); + memset(pcpu->evtchn_enabled, i == 0 ? ~0 : 0, + sizeof(pcpu->evtchn_enabled)); } /* Mask all event channels. */ @@ -1612,8 +1609,7 @@ xen_intr_dump_port(struct xenisrc *isrc) CPU_FOREACH(i) { pcpu = DPCPU_ID_PTR(i, xen_intr_pcpu); db_printf("cpu#%d: %d ", i, - BIT_ISSET(ENABLED_SETSIZE, isrc->xi_port, - >evtchn_enabled)); + !!xen_test_bit(isrc->xi_port, pcpu->evtchn_enabled)); } db_printf("\n"); } Modified: head/sys/xen/xen-os.h == --- head/sys/xen/xen-os.h Thu Nov 5 11:06:46 2015(r290391) +++ head/sys/xen/xen-os.h Thu Nov 5 14:33:46 2015(r290392) @@ -112,6 +112,12 @@ xen_set_bit(int bit, volatile long *addr atomic_set_long([bit / NBPL], 1UL << (bit % NBPL)); } +static inline void +xen_clear_bit(int bit, volatile long *addr) +{ + atomic_clear_long([bit / NBPL], 1UL << (bit % NBPL)); +} + #undef NPBL /* ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to
svn commit: r290393 - head/sys/dev/xen/netfront
Author: royger Date: Thu Nov 5 14:37:17 2015 New Revision: 290393 URL: https://svnweb.freebsd.org/changeset/base/290393 Log: xen-netfront: remove unused header files Submitted by: Wei LiuReviewed by: royger Sponsored by: Citrix Systems R Differential Revision:https://reviews.freebsd.org/D4079 Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c == --- head/sys/dev/xen/netfront/netfront.cThu Nov 5 14:33:46 2015 (r290392) +++ head/sys/dev/xen/netfront/netfront.cThu Nov 5 14:37:17 2015 (r290393) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet6.h" #include -#include #include #include #include @@ -40,22 +39,17 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include -#include #include #include #include #include -#include #include #include #include -#include #include #include #include @@ -65,16 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include /* for DELAY */ -#include -#include -#include -#include - #include -#include - -#include #include #include ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r289759 - in head/sys/arm: arm include
On Thu, Nov 5, 2015 at 1:11 AM, Jason Harmeningwrote: > > On Wed, Nov 4, 2015 at 2:17 PM, Svatopluk Kraus wrote: >> >> On Tue, Nov 3, 2015 at 8:45 AM, Jason Harmening >> wrote: >> > >> > On Sun, Nov 1, 2015 at 8:11 AM, Ian Lepore wrote: >> >> >> >> >> >> It's almost certainly not related to sysinit ordering. This exception >> >> is happening during mmc probing after interrupts are enabled. >> >> >> >> It appears that the problem is the faulting code is running on one of >> >> the very early pre-allocated kernel stacks (perhaps in an interrupt >> >> handler on an idle thread stack), and these stacks are not in memory >> >> represented in the vm page arrays. The mmc code is using a 64-byte >> >> buffer on the stack and mapping it for DMA. Normally that causes a >> >> bounce for cacheline alignment, but unluckily in this case that buffer >> >> on the stack just happened to be aligned to a cacheline boundary and a >> >> multiple of the cacheline size, so no bounce. That causes the new sync >> >> logic that is based on keeping vm_page_t pointers and offsets to get a >> >> NULL pointer back from PHYS_TO_VM_PAGE when mapping, then it dies at >> >> sync time trying to dereference that. It used to work because the sync >> >> logic used to use the vaddr, not a page pointer. >> >> >> >> Michal was working on a patch yesterday. >> >> >> > >> > Ah, thanks for pointing that out Ian. I was left scratching my head >> > (admittedly on the road and w/o easy access to the code) wondering what >> > on >> > earth would be trying to do DMA during SI_SUB_CPU. >> > >> >> >> Using of fictitious pages is not so easy here as in case pointed by >> kib@ where they are allocated and freed inside one function. For sync >> list sake, they must be allocated when a buffer is loaded and freed >> when is unloaded. >> >> Michal uses pmap_kextract() in case when KVA of buffer is not zero in >> his proof-of-concept patch: >> https://gist.github.com/strejda/d5ca3ed202427a2e0557 >> When KVA of buffer is not zero, temporary mapping is not used at all, >> so vm_page_t array is not needed too. >> >> IMO, buffer's physical address can be saved in sync list to be used >> when its KVA is not zero. Thus pmap_kextract() won't be called in >> dma_dcache_sync(). > > > I like the idea of storing off the physical address. If you want to save > space in the sync list, I think you can place busaddr and pages in a union, > using vaddr == 0 to select which field to use. Some people frown upon use > of unions, though. > > Any reason the panics on PHYS_TO_VM_PAGE in load_buffer() and load_phys() > shouldn't be KASSERTs instead? KASSERTs are fine. I have looked at Michal's patch again and only KASSERT should be in load_phys() as such buffers are unmapped, temporary mapping must be used and so, they must be in vm_page_array. And maybe some inline function for getting PA from sync list would be nice too. I would like to review final patch if you are going to make it. And it would be nice if Ganbold will test it. Phabricator? ___ 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-unsubscr...@freebsd.org"
svn commit: r290389 - head/usr.bin/netstat
Author: ume Date: Thu Nov 5 11:02:28 2015 New Revision: 290389 URL: https://svnweb.freebsd.org/changeset/base/290389 Log: Use returned network name from getnetbyaddr() correctly. Modified: head/usr.bin/netstat/route.c Modified: head/usr.bin/netstat/route.c == --- head/usr.bin/netstat/route.cThu Nov 5 10:58:19 2015 (r290388) +++ head/usr.bin/netstat/route.cThu Nov 5 11:02:28 2015 (r290389) @@ -637,14 +637,13 @@ netname4(in_addr_t in, in_addr_t mask) trimdomain(cp, strlen(cp)); } } - inet_ntop(AF_INET, , nline, sizeof(line)); - if (cp != NULL) { - if (strcpy(cp, nline) != 0) - return (line); + if (cp != NULL) strlcpy(line, cp, sizeof(line)); - } else + else { + inet_ntop(AF_INET, , nline, sizeof(nline)); strlcpy(line, nline, sizeof(line)); - domask(line + strlen(line), i, ntohl(mask)); + domask(line + strlen(line), i, ntohl(mask)); + } return (line); } ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r290387 - head/sys/cam/scsi
On 5/11/2015 8:07 PM, Alexander Motin wrote: > Author: mav > Date: Thu Nov 5 09:07:53 2015 > New Revision: 290387 > URL: https://svnweb.freebsd.org/changeset/base/290387 > > Log: > Extend mask of VMware virtual disks. > > Modified: > head/sys/cam/scsi/scsi_da.c > > Modified: head/sys/cam/scsi/scsi_da.c > == > --- head/sys/cam/scsi/scsi_da.c Thu Nov 5 08:27:45 2015 > (r290386) > +++ head/sys/cam/scsi/scsi_da.c Thu Nov 5 09:07:53 2015 > (r290387) > @@ -368,7 +368,7 @@ static struct da_quirk_entry da_quirk_ta >* VMware returns BUSY status when storage has transient >* connectivity problems, so better wait. >*/ > - {T_DIRECT, SIP_MEDIA_FIXED, "VMware", "Virtual disk", "*"}, > + {T_DIRECT, SIP_MEDIA_FIXED, "VMware*", "*", "*"}, > /*quirks*/ DA_Q_RETRY_BUSY > }, > /* USB mass storage devices supported by umass(4) */ > ___ > svn-src-h...@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org" > Ooo, thank you! I forgot to test your patch :) ___ 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-unsubscr...@freebsd.org"
svn commit: r290388 - head/usr.bin/netstat
Author: ume Date: Thu Nov 5 10:58:19 2015 New Revision: 290388 URL: https://svnweb.freebsd.org/changeset/base/290388 Log: Revert previous workaround. This problem was fixed by r290318. Modified: head/usr.bin/netstat/route.c Modified: head/usr.bin/netstat/route.c == --- head/usr.bin/netstat/route.cThu Nov 5 09:07:53 2015 (r290387) +++ head/usr.bin/netstat/route.cThu Nov 5 10:58:19 2015 (r290388) @@ -527,10 +527,6 @@ routename(struct sockaddr *sa, int flags static char line[NI_MAXHOST]; int error, f; - /* XXX: sa->sa_len doesn't match sizeof(struct sockaddr_dl) */ - if (sa->sa_family == AF_LINK) - sa->sa_len = sizeof(struct sockaddr_dl); - f = (flags) ? NI_NUMERICHOST : 0; error = getnameinfo(sa, sa->sa_len, line, sizeof(line), NULL, 0, f); ___ 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-unsubscr...@freebsd.org"
svn commit: r290390 - head/usr.bin/netstat
Author: ume Date: Thu Nov 5 11:04:43 2015 New Revision: 290390 URL: https://svnweb.freebsd.org/changeset/base/290390 Log: Fix alignment of `Drop' header. Modified: head/usr.bin/netstat/if.c Modified: head/usr.bin/netstat/if.c == --- head/usr.bin/netstat/if.c Thu Nov 5 11:02:28 2015(r290389) +++ head/usr.bin/netstat/if.c Thu Nov 5 11:04:43 2015(r290390) @@ -308,7 +308,7 @@ intpr(void (*pfunc)(char *), int af) xo_emit(" {T:/%10.10s}","Obytes"); xo_emit(" {T:/%5s}", "Coll"); if (dflag) - xo_emit(" {T:/%s}", "Drop"); + xo_emit(" {T:/%5.5s}", "Drop"); xo_emit("\n"); } ___ 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-unsubscr...@freebsd.org"
svn commit: r290391 - head/usr.bin/netstat
Author: ume Date: Thu Nov 5 11:06:46 2015 New Revision: 290391 URL: https://svnweb.freebsd.org/changeset/base/290391 Log: Give enough room for addresses when -W option is specified. Modified: head/usr.bin/netstat/if.c Modified: head/usr.bin/netstat/if.c == --- head/usr.bin/netstat/if.c Thu Nov 5 11:04:43 2015(r290390) +++ head/usr.bin/netstat/if.c Thu Nov 5 11:06:46 2015(r290391) @@ -272,6 +272,7 @@ intpr(void (*pfunc)(char *), int af) struct ifaddrs *ifap, *ifa; struct ifmaddrs *ifmap, *ifma; u_int ifn_len_max = 5, ifn_len; + u_int has_ipv6 = 0, net_len = 13, addr_len = 17; if (interval) return sidewaysintpr(); @@ -292,15 +293,23 @@ intpr(void (*pfunc)(char *), int af) if ((ifa->ifa_flags & IFF_UP) == 0) ++ifn_len; ifn_len_max = MAX(ifn_len_max, ifn_len); + if (ifa->ifa_addr->sa_family == AF_INET6) + has_ipv6 = 1; } + if (has_ipv6) { + net_len = 24; + addr_len = 39; + } else + net_len = 18; } xo_open_list("interface"); if (!pfunc) { xo_emit("{T:/%-*.*s}", ifn_len_max, ifn_len_max, "Name"); - xo_emit(" {T:/%5.5s} {T:/%-13.13s} {T:/%-17.17s} {T:/%8.8s} " + xo_emit(" {T:/%5.5s} {T:/%-*.*s} {T:/%-*.*s} {T:/%8.8s} " "{T:/%5.5s} {T:/%5.5s}", - "Mtu", "Network", "Address", "Ipkts", "Ierrs", "Idrop"); + "Mtu", net_len, net_len, "Network", addr_len, addr_len, + "Address", "Ipkts", "Ierrs", "Idrop"); if (bflag) xo_emit(" {T:/%10.10s}","Ibytes"); xo_emit(" {T:/%8.8s} {T:/%5.5s}", "Opkts", "Oerrs"); @@ -357,22 +366,26 @@ intpr(void (*pfunc)(char *), int af) switch (ifa->ifa_addr->sa_family) { case AF_UNSPEC: - xo_emit("{:network/%-13.13s} ", "none"); - xo_emit("{:address/%-15.15s} ", "none"); + xo_emit("{:network/%-*.*s} ", net_len, net_len, + "none"); + xo_emit("{:address/%-*.*s} ", addr_len, addr_len, + "none"); break; case AF_INET: #ifdef INET6 case AF_INET6: #endif /* INET6 */ if (Wflag) { - xo_emit("{t:network/%-13s} ", + xo_emit("{t:network/%-*s} ", net_len, netname(ifa->ifa_addr, ifa->ifa_netmask)); - xo_emit("{t:address/%-17s} ", + xo_emit("{t:address/%-*s} ", addr_len, routename(ifa->ifa_addr, numeric_addr)); } else { - xo_emit("{t:network/%-13.13s} ", + xo_emit("{t:network/%-*.*s} ", + net_len, net_len, netname(ifa->ifa_addr, ifa->ifa_netmask)); - xo_emit("{t:address/%-17.17s} ", + xo_emit("{t:address/%-*.*s} ", + addr_len, addr_len, routename(ifa->ifa_addr, numeric_addr)); } @@ -385,14 +398,15 @@ intpr(void (*pfunc)(char *), int af) sdl = (struct sockaddr_dl *)ifa->ifa_addr; sprintf(linknum, "", sdl->sdl_index); - xo_emit("{t:network/%-13.13s} ", linknum); + xo_emit("{t:network/%-*.*s} ", net_len, net_len, + linknum); if (sdl->sdl_nlen == 0 && sdl->sdl_alen == 0 && sdl->sdl_slen == 0) xo_emit("{P: }"); else - xo_emit("{:address/%-17.17s} ", - routename(ifa->ifa_addr, 1)); + xo_emit("{:address/%-*.*s} ", addr_len, + addr_len, routename(ifa->ifa_addr, 1)); link = true; break; } ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r289759 - in head/sys/arm: arm include
Userspace buffers in load_buffer() also need temporary mappings, so it might be nice to keep the panic/KASSERT there for completeness. I don't see how anything coming from userspace would be outside vm_page_array though, so that is up to you and Michal. Since Michal's already made the initial patch, I think he should make the commit. That seems only right, plus I'm still busy trying to get everything set up at my new place. I'd like to be on the phabricator review, though. On Thu, Nov 5, 2015 at 3:58 AM, Svatopluk Krauswrote: > On Thu, Nov 5, 2015 at 1:11 AM, Jason Harmening > wrote: > > > > On Wed, Nov 4, 2015 at 2:17 PM, Svatopluk Kraus > wrote: > >> > >> On Tue, Nov 3, 2015 at 8:45 AM, Jason Harmening > >> wrote: > >> > > >> > On Sun, Nov 1, 2015 at 8:11 AM, Ian Lepore wrote: > >> >> > >> >> > >> >> It's almost certainly not related to sysinit ordering. This > exception > >> >> is happening during mmc probing after interrupts are enabled. > >> >> > >> >> It appears that the problem is the faulting code is running on one of > >> >> the very early pre-allocated kernel stacks (perhaps in an interrupt > >> >> handler on an idle thread stack), and these stacks are not in memory > >> >> represented in the vm page arrays. The mmc code is using a 64-byte > >> >> buffer on the stack and mapping it for DMA. Normally that causes a > >> >> bounce for cacheline alignment, but unluckily in this case that > buffer > >> >> on the stack just happened to be aligned to a cacheline boundary and > a > >> >> multiple of the cacheline size, so no bounce. That causes the new > sync > >> >> logic that is based on keeping vm_page_t pointers and offsets to get > a > >> >> NULL pointer back from PHYS_TO_VM_PAGE when mapping, then it dies at > >> >> sync time trying to dereference that. It used to work because the > sync > >> >> logic used to use the vaddr, not a page pointer. > >> >> > >> >> Michal was working on a patch yesterday. > >> >> > >> > > >> > Ah, thanks for pointing that out Ian. I was left scratching my head > >> > (admittedly on the road and w/o easy access to the code) wondering > what > >> > on > >> > earth would be trying to do DMA during SI_SUB_CPU. > >> > > >> > >> > >> Using of fictitious pages is not so easy here as in case pointed by > >> kib@ where they are allocated and freed inside one function. For sync > >> list sake, they must be allocated when a buffer is loaded and freed > >> when is unloaded. > >> > >> Michal uses pmap_kextract() in case when KVA of buffer is not zero in > >> his proof-of-concept patch: > >> https://gist.github.com/strejda/d5ca3ed202427a2e0557 > >> When KVA of buffer is not zero, temporary mapping is not used at all, > >> so vm_page_t array is not needed too. > >> > >> IMO, buffer's physical address can be saved in sync list to be used > >> when its KVA is not zero. Thus pmap_kextract() won't be called in > >> dma_dcache_sync(). > > > > > > I like the idea of storing off the physical address. If you want to save > > space in the sync list, I think you can place busaddr and pages in a > union, > > using vaddr == 0 to select which field to use. Some people frown upon > use > > of unions, though. > > > > Any reason the panics on PHYS_TO_VM_PAGE in load_buffer() and load_phys() > > shouldn't be KASSERTs instead? > > > KASSERTs are fine. I have looked at Michal's patch again and only > KASSERT should be in load_phys() as such buffers are unmapped, > temporary mapping must be used and so, they must be in vm_page_array. > And maybe some inline function for getting PA from sync list would be > nice too. I would like to review final patch if you are going to make > it. And it would be nice if Ganbold will test it. Phabricator? > ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r289759 - in head/sys/arm: arm include
Just as an FYI for you guys, since we're all splashing around in busdma code lately The things on my near-term (next several weeks) to-do list for busdma are: Add "small bounce" support to help reduce the bounce preallocation overhead for handling bounces due to cacheline alignment. Almost all arm and mips bounces are triggered by cache alignment restrictions and involve buffers smaller than a page (usually 256 bytes or less), and we currently allocate full pages for bouncing. Instead we can use the same small-buffer uma pools that are used for bus_dmamem_alloc(). The armv6 busdma implementation can be shared by armv4, armv6, and mips. The only thing blocking this right now is the small-bounce stuff; armv4 and mips boards often have only 32-128MB of ram, and they can't afford the bounce-page allocation overhead of the current armv6 implementation. Once the small-bounce support is in place, we can use this implementation for all these platforms (and basically for any platform that comes along that has a similar requirement for software -assisted cache coherency for DMA). -- Ian On Thu, 2015-11-05 at 08:08 -0800, Jason Harmening wrote: > Userspace buffers in load_buffer() also need temporary mappings, so > it > might be nice to keep the panic/KASSERT there for completeness. I > don't > see how anything coming from userspace would be outside > vm_page_array > though, so that is up to you and Michal. > > Since Michal's already made the initial patch, I think he should make > the > commit. That seems only right, plus I'm still busy trying to get > everything set up at my new place. I'd like to be on the phabricator > review, though. > > On Thu, Nov 5, 2015 at 3:58 AM, Svatopluk Kraus> wrote: > > > On Thu, Nov 5, 2015 at 1:11 AM, Jason Harmening > > wrote: > > > > > > On Wed, Nov 4, 2015 at 2:17 PM, Svatopluk Kraus > > > > > wrote: > > > > > > > > On Tue, Nov 3, 2015 at 8:45 AM, Jason Harmening > > > > wrote: > > > > > > > > > > On Sun, Nov 1, 2015 at 8:11 AM, Ian Lepore > > > > > wrote: > > > > > > > > > > > > > > > > > > It's almost certainly not related to sysinit ordering. > > > > > > This > > exception > > > > > > is happening during mmc probing after interrupts are > > > > > > enabled. > > > > > > > > > > > > It appears that the problem is the faulting code is running > > > > > > on one of > > > > > > the very early pre-allocated kernel stacks (perhaps in an > > > > > > interrupt > > > > > > handler on an idle thread stack), and these stacks are not > > > > > > in memory > > > > > > represented in the vm page arrays. The mmc code is using a > > > > > > 64-byte > > > > > > buffer on the stack and mapping it for DMA. Normally that > > > > > > causes a > > > > > > bounce for cacheline alignment, but unluckily in this case > > > > > > that > > buffer > > > > > > on the stack just happened to be aligned to a cacheline > > > > > > boundary and > > a > > > > > > multiple of the cacheline size, so no bounce. That causes > > > > > > the new > > sync > > > > > > logic that is based on keeping vm_page_t pointers and > > > > > > offsets to get > > a > > > > > > NULL pointer back from PHYS_TO_VM_PAGE when mapping, then > > > > > > it dies at > > > > > > sync time trying to dereference that. It used to work > > > > > > because the > > sync > > > > > > logic used to use the vaddr, not a page pointer. > > > > > > > > > > > > Michal was working on a patch yesterday. > > > > > > > > > > > > > > > > Ah, thanks for pointing that out Ian. I was left scratching > > > > > my head > > > > > (admittedly on the road and w/o easy access to the code) > > > > > wondering > > what > > > > > on > > > > > earth would be trying to do DMA during SI_SUB_CPU. > > > > > > > > > > > > > > > > > Using of fictitious pages is not so easy here as in case > > > > pointed by > > > > kib@ where they are allocated and freed inside one function. > > > > For sync > > > > list sake, they must be allocated when a buffer is loaded and > > > > freed > > > > when is unloaded. > > > > > > > > Michal uses pmap_kextract() in case when KVA of buffer is not > > > > zero in > > > > his proof-of-concept patch: > > > > https://gist.github.com/strejda/d5ca3ed202427a2e0557 > > > > When KVA of buffer is not zero, temporary mapping is not used > > > > at all, > > > > so vm_page_t array is not needed too. > > > > > > > > IMO, buffer's physical address can be saved in sync list to be > > > > used > > > > when its KVA is not zero. Thus pmap_kextract() won't be called > > > > in > > > > dma_dcache_sync(). > > > > > > > > > I like the idea of storing off the physical address. If you want > > > to save > > > space in the sync list, I think you can place busaddr and pages > > > in a > > union, > > > using vaddr == 0 to select which field to use. Some people frown > > > upon > > use > > > of unions, though. > > > > > >
svn commit: r290404 - head/usr.bin/rctl
Author: trasz Date: Thu Nov 5 17:26:56 2015 New Revision: 290404 URL: https://svnweb.freebsd.org/changeset/base/290404 Log: Fix markup in rctl(8) - the 'rule' or 'filter' arguments are not optional. MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/rctl/rctl.8 Modified: head/usr.bin/rctl/rctl.8 == --- head/usr.bin/rctl/rctl.8Thu Nov 5 17:23:02 2015(r290403) +++ head/usr.bin/rctl/rctl.8Thu Nov 5 17:26:56 2015(r290404) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 14, 2015 +.Dd November 5, 2015 .Dt RCTL 8 .Os .Sh NAME @@ -38,19 +38,19 @@ .Op Ar filter .Nm .Fl a -.Op Ar rule +.Ar rule .Nm .Fl l .Op Fl h .Op Fl n -.Op Ar filter +.Ar filter .Nm .Fl r -.Op Ar filter +.Ar filter .Nm .Fl u .Op Fl h -.Op Ar filter +.Ar filter .Pp .Nm requires the kernel to be compiled with: ___ 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-unsubscr...@freebsd.org"
svn commit: r290395 - stable/10/usr.sbin/bluetooth/sdpcontrol
Author: emax Date: Thu Nov 5 16:08:38 2015 New Revision: 290395 URL: https://svnweb.freebsd.org/changeset/base/290395 Log: MFC r289637 check boundaries while parsing SDP responses Reported by: hps Reviewed by: hps Modified: stable/10/usr.sbin/bluetooth/sdpcontrol/search.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bluetooth/sdpcontrol/search.c == --- stable/10/usr.sbin/bluetooth/sdpcontrol/search.cThu Nov 5 14:55:58 2015(r290394) +++ stable/10/usr.sbin/bluetooth/sdpcontrol/search.cThu Nov 5 16:08:38 2015(r290395) @@ -102,6 +102,12 @@ print_service_class_id_list(uint8_t cons /* NOT REACHED */ } + if (len > (end - start)) { + fprintf(stderr, "Invalid Service Class ID List. " \ + "Too long len=%d\n", len); + return; + } + while (start < end) { SDP_GET8(type, start); switch (type) { @@ -258,28 +264,31 @@ print_protocol_descriptor(uint8_t const case SDP_DATA_STR8: case SDP_DATA_URL8: SDP_GET8(len, start); - fprintf(stdout, "%*.*s\n", len, len, (char *) start); - start += len; + for (; start < end && len > 0; start ++, len --) + fprintf(stdout, "%c", *start); + fprintf(stdout, "\n"); break; case SDP_DATA_STR16: case SDP_DATA_URL16: SDP_GET16(len, start); - fprintf(stdout, "%*.*s\n", len, len, (char *) start); - start += len; + for (; start < end && len > 0; start ++, len --) + fprintf(stdout, "%c", *start); + fprintf(stdout, "\n"); break; case SDP_DATA_STR32: case SDP_DATA_URL32: SDP_GET32(len, start); - fprintf(stdout, "%*.*s\n", len, len, (char *) start); - start += len; + for (; start < end && len > 0; start ++, len --) + fprintf(stdout, "%c", *start); + fprintf(stdout, "\n"); break; case SDP_DATA_SEQ8: case SDP_DATA_ALT8: SDP_GET8(len, start); - for (; len > 0; start ++, len --) + for (; start < end && len > 0; start ++, len --) fprintf(stdout, "%#2.2x ", *start); fprintf(stdout, "\n"); break; @@ -287,7 +296,7 @@ print_protocol_descriptor(uint8_t const case SDP_DATA_SEQ16: case SDP_DATA_ALT16: SDP_GET16(len, start); - for (; len > 0; start ++, len --) + for (; start < end && len > 0; start ++, len --) fprintf(stdout, "%#2.2x ", *start); fprintf(stdout, "\n"); break; @@ -295,7 +304,7 @@ print_protocol_descriptor(uint8_t const case SDP_DATA_SEQ32: case SDP_DATA_ALT32: SDP_GET32(len, start); - for (; len > 0; start ++, len --) + for (; start < end && len > 0; start ++, len --) fprintf(stdout, "%#2.2x ", *start); fprintf(stdout, "\n"); break; @@ -341,6 +350,12 @@ print_protocol_descriptor_list(uint8_t c /* NOT REACHED */ } + if (len > (end - start)) { + fprintf(stderr, "Invalid Protocol Descriptor List. " \ + "Too long, len=%d\n", len); + return; + } + while (start < end) { SDP_GET8(type, start); switch (type) { @@ -363,6 +378,12 @@ print_protocol_descriptor_list(uint8_t c /* NOT REACHED */ } + if (len > (end - start)) { + fprintf(stderr, "Invalid Protocol Descriptor List. " \ + "Too long, len=%d\n", len); + return; + } + print_protocol_descriptor(start, start + len); start += len; } @@ -415,6 +436,12 @@ print_bluetooth_profile_descriptor_list( /* NOT REACHED */ } + if (len > (end - start)) { + fprintf(stderr, "Invalid Bluetooth Profile Descriptor List. " \ + "Too long, len=%d\n", len); +
svn commit: r290399 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: smh Date: Thu Nov 5 17:00:42 2015 New Revision: 290399 URL: https://svnweb.freebsd.org/changeset/base/290399 Log: Allow zfs_recover to be changed at runtime MFC after:1 week Sponsored by: Multiplay Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Thu Nov 5 17:00:38 2015(r290398) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Thu Nov 5 17:00:42 2015(r290399) @@ -255,7 +255,7 @@ int zfs_flags = 0; */ boolean_t zfs_recover = B_FALSE; SYSCTL_DECL(_vfs_zfs); -SYSCTL_INT(_vfs_zfs, OID_AUTO, recover, CTLFLAG_RDTUN, _recover, 0, +SYSCTL_INT(_vfs_zfs, OID_AUTO, recover, CTLFLAG_RWTUN, _recover, 0, "Try to recover from otherwise-fatal errors."); static int ___ 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-unsubscr...@freebsd.org"
svn commit: r290398 - head/lib/libedit
Author: brooks Date: Thu Nov 5 17:00:38 2015 New Revision: 290398 URL: https://svnweb.freebsd.org/changeset/base/290398 Log: Revert r290298. Per discussion on tech-userle...@netbsd.org this change was incorrect. Modified: head/lib/libedit/eln.c Modified: head/lib/libedit/eln.c == --- head/lib/libedit/eln.c Thu Nov 5 16:55:27 2015(r290397) +++ head/lib/libedit/eln.c Thu Nov 5 17:00:38 2015(r290398) @@ -325,11 +325,11 @@ el_get(EditLine *el, int op, ...) ret = el_wget(el, op, va_arg(ap, const char **)); break; - case EL_SIGNAL: /* int */ + case EL_SIGNAL: /* int * */ case EL_EDITMODE: case EL_UNBUFFERED: case EL_PREP_TERM: - ret = el_wget(el, op, va_arg(ap, int)); + ret = el_wget(el, op, va_arg(ap, int *)); break; case EL_GETTC: { ___ 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-unsubscr...@freebsd.org"
svn commit: r290403 - head/sys/netinet
Author: smh Date: Thu Nov 5 17:23:02 2015 New Revision: 290403 URL: https://svnweb.freebsd.org/changeset/base/290403 Log: Add MTU support to carp interfaces MFC after:2 weeks Sponsored by: Multiplay Modified: head/sys/netinet/ip_carp.c Modified: head/sys/netinet/ip_carp.c == --- head/sys/netinet/ip_carp.c Thu Nov 5 17:19:08 2015(r290402) +++ head/sys/netinet/ip_carp.c Thu Nov 5 17:23:02 2015(r290403) @@ -1769,6 +1769,13 @@ carp_ioctl(struct ifreq *ifr, u_long cmd } break; } + case SIOCSIFMTU: + if (ifr->ifr_mtu > ETHERMTU_JUMBO) { + error = EINVAL; + } else { + ifp->if_mtu = ifr->ifr_mtu; + } + break; default: error = EINVAL; } ___ 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-unsubscr...@freebsd.org"
svn commit: r290396 - stable/10/sys/kern
Author: smh Date: Thu Nov 5 16:50:09 2015 New Revision: 290396 URL: https://svnweb.freebsd.org/changeset/base/290396 Log: MFC r273118 (by mjg) Don't take devmtx unnecessarily in vn_isdisk. Sponsored by: Multiplay Modified: stable/10/sys/kern/vfs_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_subr.c == --- stable/10/sys/kern/vfs_subr.c Thu Nov 5 16:08:38 2015 (r290395) +++ stable/10/sys/kern/vfs_subr.c Thu Nov 5 16:50:09 2015 (r290396) @@ -3836,17 +3836,20 @@ vn_isdisk(struct vnode *vp, int *errp) { int error; + if (vp->v_type != VCHR) { + error = ENOTBLK; + goto out; + } error = 0; dev_lock(); - if (vp->v_type != VCHR) - error = ENOTBLK; - else if (vp->v_rdev == NULL) + if (vp->v_rdev == NULL) error = ENXIO; else if (vp->v_rdev->si_devsw == NULL) error = ENXIO; else if (!(vp->v_rdev->si_devsw->d_flags & D_DISK)) error = ENOTBLK; dev_unlock(); +out: if (errp != NULL) *errp = error; return (error == 0); ___ 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-unsubscr...@freebsd.org"
svn commit: r290402 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: smh Date: Thu Nov 5 17:19:08 2015 New Revision: 290402 URL: https://svnweb.freebsd.org/changeset/base/290402 Log: MFC r276450 Correct zpool list displaying invalid EXPANDSZ for unavailable pool vdevs Sponsored by: Multiplay Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c == --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Thu Nov 5 17:12:41 2015(r290401) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Thu Nov 5 17:19:08 2015(r290402) @@ -2808,7 +2808,8 @@ vdev_get_stats(vdev_t *vd, vdev_stat_t * vs->vs_rsize = vdev_get_min_asize(vd); if (vd->vdev_ops->vdev_op_leaf) vs->vs_rsize += VDEV_LABEL_START_SIZE + VDEV_LABEL_END_SIZE; - vs->vs_esize = vd->vdev_max_asize - vd->vdev_asize; + if (vd->vdev_max_asize != 0) + vs->vs_esize = vd->vdev_max_asize - vd->vdev_asize; vs->vs_configured_ashift = vd->vdev_top != NULL ? vd->vdev_top->vdev_ashift : vd->vdev_ashift; vs->vs_logical_ashift = vd->vdev_logical_ashift; ___ 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-unsubscr...@freebsd.org"
svn commit: r290406 - head/sys/geom/eli
Author: smh Date: Thu Nov 5 17:37:35 2015 New Revision: 290406 URL: https://svnweb.freebsd.org/changeset/base/290406 Log: Fix g_eli error loss conditions * Ensure that error information isn't lost. * Log the error code in all cases. * Don't overwrite bio_completed set to 0 from the error condition. MFC after:2 weeks Sponsored by: Multiplay Modified: head/sys/geom/eli/g_eli.c Modified: head/sys/geom/eli/g_eli.c == --- head/sys/geom/eli/g_eli.c Thu Nov 5 17:37:14 2015(r290405) +++ head/sys/geom/eli/g_eli.c Thu Nov 5 17:37:35 2015(r290406) @@ -195,7 +195,7 @@ g_eli_read_done(struct bio *bp) G_ELI_LOGREQ(2, bp, "Request done."); pbp = bp->bio_parent; - if (pbp->bio_error == 0) + if (pbp->bio_error == 0 && bp->bio_error != 0) pbp->bio_error = bp->bio_error; g_destroy_bio(bp); /* @@ -206,7 +206,8 @@ g_eli_read_done(struct bio *bp) return; sc = pbp->bio_to->geom->softc; if (pbp->bio_error != 0) { - G_ELI_LOGREQ(0, pbp, "%s() failed", __func__); + G_ELI_LOGREQ(0, pbp, "%s() failed (error=%d)", __func__, + pbp->bio_error); pbp->bio_completed = 0; if (pbp->bio_driver2 != NULL) { free(pbp->bio_driver2, M_ELI); @@ -235,10 +236,8 @@ g_eli_write_done(struct bio *bp) G_ELI_LOGREQ(2, bp, "Request done."); pbp = bp->bio_parent; - if (pbp->bio_error == 0) { - if (bp->bio_error != 0) - pbp->bio_error = bp->bio_error; - } + if (pbp->bio_error == 0 && bp->bio_error != 0) + pbp->bio_error = bp->bio_error; g_destroy_bio(bp); /* * Do we have all sectors already? @@ -249,14 +248,15 @@ g_eli_write_done(struct bio *bp) free(pbp->bio_driver2, M_ELI); pbp->bio_driver2 = NULL; if (pbp->bio_error != 0) { - G_ELI_LOGREQ(0, pbp, "Crypto WRITE request failed (error=%d).", + G_ELI_LOGREQ(0, pbp, "%s() failed (error=%d)", __func__, pbp->bio_error); pbp->bio_completed = 0; - } + } else + pbp->bio_completed = pbp->bio_length; + /* * Write is finished, send it up. */ - pbp->bio_completed = pbp->bio_length; sc = pbp->bio_to->geom->softc; g_io_deliver(pbp, pbp->bio_error); atomic_subtract_int(>sc_inflight, 1); ___ 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-unsubscr...@freebsd.org"
svn commit: r290405 - head/etc/periodic/security
Author: lidl Date: Thu Nov 5 17:37:14 2015 New Revision: 290405 URL: https://svnweb.freebsd.org/changeset/base/290405 Log: Restrict 520.pfdenied to only list rules that blocked traffic. Before this change, the 520.pfdenied script listed all rules that matched /^block/ in the rule. Restrict the printed output to only those rules that result in packets being dropped. PR: conf/187224 Approved by: rpaulo (mentor) Differential Revision:https://reviews.freebsd.org/D4068 Modified: head/etc/periodic/security/520.pfdenied Modified: head/etc/periodic/security/520.pfdenied == --- head/etc/periodic/security/520.pfdenied Thu Nov 5 17:26:56 2015 (r290404) +++ head/etc/periodic/security/520.pfdenied Thu Nov 5 17:37:14 2015 (r290405) @@ -44,7 +44,7 @@ rc=0 if check_yesno_period security_status_pfdenied_enable then TMP=`mktemp -t security` - if pfctl -sr -v 2>/dev/null | nawk '{if (/^block/) {buf=$0; getline; gsub(" +"," ",$0); print buf$0;} }' > ${TMP}; then + if pfctl -sr -v 2>/dev/null | nawk '{if (/^block/) {buf=$0; getline; gsub(" +"," ",$0); if ($5 > 0) print buf$0;} }' > ${TMP}; then check_diff new_only pf ${TMP} "${host} pf denied packets:" fi rc=$? ___ 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-unsubscr...@freebsd.org"
svn commit: r290407 - in head/sys/dev: iwi otus usb/wlan
Author: avos Date: Thu Nov 5 17:58:18 2015 New Revision: 290407 URL: https://svnweb.freebsd.org/changeset/base/290407 Log: net80211: WME callback cleanup in various drivers Since r288350, ic_wme_task() is called via ieee80211_runtask(), so, any additional deferring from the driver side is not needed. Approved by: adrian (mentor) Differential Revision:https://reviews.freebsd.org/D4072 Modified: head/sys/dev/iwi/if_iwi.c head/sys/dev/iwi/if_iwivar.h head/sys/dev/otus/if_otus.c head/sys/dev/otus/if_otusreg.h head/sys/dev/usb/wlan/if_rum.c head/sys/dev/usb/wlan/if_rumvar.h head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/iwi/if_iwi.c == --- head/sys/dev/iwi/if_iwi.c Thu Nov 5 17:37:35 2015(r290406) +++ head/sys/dev/iwi/if_iwi.c Thu Nov 5 17:58:18 2015(r290407) @@ -155,7 +155,6 @@ static void iwi_media_status(struct ifne static int iwi_newstate(struct ieee80211vap *, enum ieee80211_state, int); static voidiwi_wme_init(struct iwi_softc *); static int iwi_wme_setparams(struct iwi_softc *); -static voidiwi_update_wme(void *, int); static int iwi_wme_update(struct ieee80211com *); static uint16_tiwi_read_prom_word(struct iwi_softc *, uint8_t); static voidiwi_frame_intr(struct iwi_softc *, struct iwi_rx_data *, int, @@ -286,7 +285,6 @@ iwi_attach(device_t dev) TASK_INIT(>sc_radiofftask, 0, iwi_radio_off, sc); TASK_INIT(>sc_restarttask, 0, iwi_restart, sc); TASK_INIT(>sc_disassoctask, 0, iwi_disassoc, sc); - TASK_INIT(>sc_wmetask, 0, iwi_update_wme, sc); TASK_INIT(>sc_monitortask, 0, iwi_monitor_scan, sc); callout_init_mtx(>sc_wdtimer, >sc_mtx, 0); @@ -1060,22 +1058,12 @@ iwi_wme_setparams(struct iwi_softc *sc) #undef IWI_USEC #undef IWI_EXP2 -static void -iwi_update_wme(void *arg, int npending) -{ - struct iwi_softc *sc = arg; - IWI_LOCK_DECL; - - IWI_LOCK(sc); - (void) iwi_wme_setparams(sc); - IWI_UNLOCK(sc); -} - static int iwi_wme_update(struct ieee80211com *ic) { struct iwi_softc *sc = ic->ic_softc; struct ieee80211vap *vap = TAILQ_FIRST(>ic_vaps); + IWI_LOCK_DECL; /* * We may be called to update the WME parameters in @@ -1085,8 +1073,11 @@ iwi_wme_update(struct ieee80211com *ic) * to the adapter as part of the work iwi_auth_and_assoc * does. */ - if (vap->iv_state == IEEE80211_S_RUN) - ieee80211_runtask(ic, >sc_wmetask); + if (vap->iv_state == IEEE80211_S_RUN) { + IWI_LOCK(sc); + iwi_wme_setparams(sc); + IWI_UNLOCK(sc); + } return (0); } Modified: head/sys/dev/iwi/if_iwivar.h == --- head/sys/dev/iwi/if_iwivar.hThu Nov 5 17:37:35 2015 (r290406) +++ head/sys/dev/iwi/if_iwivar.hThu Nov 5 17:58:18 2015 (r290407) @@ -192,7 +192,6 @@ struct iwi_softc { struct task sc_radiofftask; /* radio off processing */ struct task sc_restarttask; /* restart adapter processing */ struct task sc_disassoctask; - struct task sc_wmetask; /* set wme parameters */ struct task sc_monitortask; unsigned intsc_running : 1, /* initialized */ Modified: head/sys/dev/otus/if_otus.c == --- head/sys/dev/otus/if_otus.c Thu Nov 5 17:37:35 2015(r290406) +++ head/sys/dev/otus/if_otus.c Thu Nov 5 17:58:18 2015(r290407) @@ -155,7 +155,6 @@ static void otus_free_txcmd(struct otus_ void otus_next_scan(void *, int); static voidotus_tx_task(void *, int pending); -static voidotus_wme_update_task(void *, int pending); void otus_do_async(struct otus_softc *, void (*)(struct otus_softc *, void *), void *, int); intotus_newstate(struct ieee80211vap *, enum ieee80211_state, @@ -177,8 +176,9 @@ static int otus_tx(struct otus_softc *, const struct ieee80211_bpf_params *); intotus_ioctl(struct ifnet *, u_long, caddr_t); intotus_set_multi(struct otus_softc *); -static voidotus_updateedca(struct otus_softc *sc); -static voidotus_updateslot(struct otus_softc *sc); +static int otus_updateedca(struct ieee80211com *); +static voidotus_updateedca_locked(struct otus_softc *); +static voidotus_updateslot(struct otus_softc *); intotus_init_mac(struct otus_softc *); uint32_t otus_phy_get_def(struct otus_softc *, uint32_t); intotus_set_board_values(struct otus_softc *, @@ -300,7 +300,6 @@ otus_attach(device_t self) TIMEOUT_TASK_INIT(taskqueue_thread, >scan_to, 0,
svn commit: r290400 - head/share/man/man4
Author: asomers Date: Thu Nov 5 17:04:18 2015 New Revision: 290400 URL: https://svnweb.freebsd.org/changeset/base/290400 Log: Update authors' contact info and fix grammar bugs. MFC after:2 weeks Sponsored by: Spectra Logic Modified: head/share/man/man4/xnb.4 Modified: head/share/man/man4/xnb.4 == --- head/share/man/man4/xnb.4 Thu Nov 5 17:00:42 2015(r290399) +++ head/share/man/man4/xnb.4 Thu Nov 5 17:04:18 2015(r290400) @@ -57,12 +57,12 @@ will run on Domain 0 and the netfront dr However, it is also possible to run .Nm on a guest domain. -It may be bridged or routed to provide the netfront's +It may be bridged or routed to provide the netfront domain access to other guest domains or to a physical network. .Pp In most respects, the .Nm -device appears to the OS as an other Ethernet device. +device appears to the OS as any other Ethernet device. It can be configured at runtime entirely with .Xr ifconfig 8 . In particular, it supports MAC changing, arbitrary MTU sizes, checksum @@ -101,9 +101,8 @@ device driver first appeared in The .Nm driver was written by -.An Alan Somers Aq Mt al...@spectralogic.com -and -.An John Suykerbuyk Aq Mt jo...@spectralogic.com . +.An Alan Somers Aq Mt asom...@freebsd.org +and John Suykerbuyk. .Sh CAVEATS Packets sent through Xennet pass over shared memory, so the protocol includes no form of link-layer checksum or CRC. ___ 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-unsubscr...@freebsd.org"
svn commit: r290401 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: smh Date: Thu Nov 5 17:12:41 2015 New Revision: 290401 URL: https://svnweb.freebsd.org/changeset/base/290401 Log: Provide information about bad DVA Provide information about which vdev has an issue with a bad DVA. MFC after:1 week Sponsored by: Multiplay Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Thu Nov 5 17:04:18 2015(r290400) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Thu Nov 5 17:12:41 2015(r290401) @@ -1835,7 +1835,13 @@ dva_get_dsize_sync(spa_t *spa, const dva ASSERT(spa_config_held(spa, SCL_ALL, RW_READER) != 0); if (asize != 0 && spa->spa_deflate) { - vdev_t *vd = vdev_lookup_top(spa, DVA_GET_VDEV(dva)); + uint64_t vdev = DVA_GET_VDEV(dva); + vdev_t *vd = vdev_lookup_top(spa, vdev); + if (vd == NULL) { + zfs_panic_recover( + "dva_get_dsize_sync(): bad DVA %llu:%llu", + (u_longlong_t)vdev, (u_longlong_t)asize); + } dsize = (asize >> SPA_MINBLOCKSHIFT) * vd->vdev_deflate_ratio; } ___ 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-unsubscr...@freebsd.org"
svn commit: r290397 - in head/sys: cddl/contrib/opensolaris/common/atomic/aarch64 conf
Author: andrew Date: Thu Nov 5 16:55:27 2015 New Revision: 290397 URL: https://svnweb.freebsd.org/changeset/base/290397 Log: Fix the open solaris atomic functions on arm64. Without this we may use the wrong value in the comparison, leading to incorrectly setting the new value. This has been observed in the ZFS code. Without this we can lose track of the reference count in a zrlock object. We should move to use the generic atomic functions, however as this has been observed I would prefer to have this working, then move to the generic functions. PR: 204037 Sponsored by: ABT Systems Ltd Added: head/sys/cddl/contrib/opensolaris/common/atomic/aarch64/ head/sys/cddl/contrib/opensolaris/common/atomic/aarch64/opensolaris_atomic.S Modified: head/sys/conf/files.arm64 Added: head/sys/cddl/contrib/opensolaris/common/atomic/aarch64/opensolaris_atomic.S == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/cddl/contrib/opensolaris/common/atomic/aarch64/opensolaris_atomic.S Thu Nov 5 16:55:27 2015(r290397) @@ -0,0 +1,87 @@ +/*- + * Copyright (C) 2015 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include + +/* + * uint64_t atomic_add_64_nv(volatile uint64_t *target, int64_t delta) + */ +ENTRY(atomic_add_64_nv) +1: ldxrx2, [x0]/* Load *target */ + add x2, x2, x1 /* x2 = x2 + delta */ + stxrw3, x2, [x0]/* Store *target */ + cbnzw3, 1b /* Check if the store succeeded */ + mov x0, x2 /* Return the new value */ + ret +END(atomic_add_64_nv) + +/* + * uint32_t + * atomic_cas_32(volatile uint32_t *target, uint32_t cmp, uint32_t newval) + */ +ENTRY(atomic_cas_32) +1: ldxrw3, [x0]/* Load *target */ + cmp w3, w1 /* Does *targe == cmp? */ + b.ne2f /* If not exit */ + stxrw4, w2, [x0]/* Store newval to *target */ + cbnzw4, 1b /* Check if the store succeeded */ +2: mov w0, w3 /* Return the old value */ + ret +END(atomic_cas_32) + +/* + * uint64_t + * atomic_cas_64(volatile uint64_t *target, uint64_t cmp, uint64_t newval) + */ +ENTRY(atomic_cas_64) +1: ldxrx3, [x0]/* Load *target */ + cmp x3, x1 /* Does *targe == cmp? */ + b.ne2f /* If not exit */ + stxrw4, x2, [x0]/* Store newval to *target */ + cbnzw4, 1b /* Check if the store succeeded */ +2: mov x0, x3 /* Return the old value */ + ret +END(atomic_cas_64) + +/* + * uint8_t atomic_or_8_nv(volatile uint8_t *target, uint8_t value) + */ +ENTRY(atomic_or_8_nv) +1: ldxrb w2, [x0]/* Load *target */ + orr w2, w2, w1 /* x2 = x2 | delta */ + stxrb w3, w2, [x0]/* Store *target */ + cbnzw3, 1b /* Check if the store succeeded */ + mov w0, w2 /* Return the new value */ + ret +END(atomic_or_8_nv) + +ENTRY(membar_producer) + dmb ish + ret +END(membar_producer) + Modified: head/sys/conf/files.arm64 == --- head/sys/conf/files.arm64 Thu Nov 5 16:50:09 2015(r290396) +++ head/sys/conf/files.arm64 Thu Nov 5 16:55:27 2015(r290397) @@ -88,7 +88,7 @@ libkern/flsl.cstandard libkern/flsll.cstandard libkern/memmove.c standard libkern/memset.c standard
svn commit: r290409 - head
Author: jhb Date: Thu Nov 5 19:52:18 2015 New Revision: 290409 URL: https://svnweb.freebsd.org/changeset/base/290409 Log: Start a cleanup of the MAINTAINERS file. This adds an "OLD" line at the top of the list. Any entries in the list that are still below this line after December 5th will be removed. Approved by: core Modified: head/MAINTAINERS Modified: head/MAINTAINERS == --- head/MAINTAINERSThu Nov 5 19:15:39 2015(r290408) +++ head/MAINTAINERSThu Nov 5 19:52:18 2015(r290409) @@ -26,6 +26,7 @@ sub-system. subsystem login notes - + OLD kqueue jmg Pre-commit review requested. Documentation Required. libc/posix1e rwatson Pre-commit review requested. POSIX.1e ACLs rwatson Pre-commit review requested. ___ 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-unsubscr...@freebsd.org"
svn commit: r290412 - head/usr.sbin/pciconf
Author: jhb Date: Thu Nov 5 20:24:56 2015 New Revision: 290412 URL: https://svnweb.freebsd.org/changeset/base/290412 Log: Note if relaxed ordering or no snoop is enabled for each PCI-express device. MFC after:1 week Modified: head/usr.sbin/pciconf/cap.c Modified: head/usr.sbin/pciconf/cap.c == --- head/usr.sbin/pciconf/cap.c Thu Nov 5 20:21:43 2015(r290411) +++ head/usr.sbin/pciconf/cap.c Thu Nov 5 20:24:56 2015(r290412) @@ -460,6 +460,10 @@ cap_express(int fd, struct pci_conf *p, MAX_PAYLOAD(cap & PCIEM_CAP_MAX_PAYLOAD)); if ((cap & PCIEM_CAP_FLR) != 0) printf(" FLR"); + if (ctl & PCIEM_CTL_RELAXED_ORD_ENABLE) + printf(" RO"); + if (ctl & PCIEM_CTL_NOSNOOP_ENABLE) + printf(" NS"); cap = read_config(fd, >pc_sel, ptr + PCIER_LINK_CAP, 4); sta = read_config(fd, >pc_sel, ptr + PCIER_LINK_STA, 2); printf(" link x%d(x%d)", (sta & PCIEM_LINK_STA_WIDTH) >> 4, ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r290373 - head/sys/dev/ofw
I'm not sure this is the best way to do this: we have AIM systems that use FDT, for example. Can we make it a quirk in the host-bus driver? Or do a run-time check to see if the root node has MacRISC in its compatible property? -Nathan On 11/04/15 14:46, Andreas Tobler wrote: Author: andreast Date: Wed Nov 4 22:46:30 2015 New Revision: 290373 URL: https://svnweb.freebsd.org/changeset/base/290373 Log: Add a compile time switch to distinguish between 7-bit and 8-bit I2C address usage. The comment in the code should explain the situation. Discussed with: ian@ Modified: head/sys/dev/ofw/ofw_iicbus.c Modified: head/sys/dev/ofw/ofw_iicbus.c == --- head/sys/dev/ofw/ofw_iicbus.c Wed Nov 4 19:09:42 2015 (r290372) +++ head/sys/dev/ofw/ofw_iicbus.c Wed Nov 4 22:46:30 2015 (r290373) @@ -148,10 +148,16 @@ ofw_iicbus_attach(device_t dev) if (dinfo == NULL) continue; /* -* OFW uses 7-bit I2C address format (see ePAPR), -* but system expect 8-bit. +* FreeBSD drivers expect I2C addresses to be expressed as +* 8-bit values. Apple OFW data contains 8-bit values, but +* Linux FDT data contains 7-bit values, so shift them up to +* 8-bit format. */ +#ifdef AIM + dinfo->opd_dinfo.addr = paddr; +#else dinfo->opd_dinfo.addr = paddr << 1; +#endif if (ofw_bus_gen_setup_devinfo(>opd_obdinfo, child) != 0) { free(dinfo, M_DEVBUF); ___ 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-unsubscr...@freebsd.org"
svn commit: r290411 - stable/10/sys/boot/amd64/efi
Author: jhb Date: Thu Nov 5 20:21:43 2015 New Revision: 290411 URL: https://svnweb.freebsd.org/changeset/base/290411 Log: MFC 288372: Use EFI page size constants instead of hardcoding 4096. Modified: stable/10/sys/boot/amd64/efi/copy.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/amd64/efi/copy.c == --- stable/10/sys/boot/amd64/efi/copy.c Thu Nov 5 19:55:45 2015 (r290410) +++ stable/10/sys/boot/amd64/efi/copy.c Thu Nov 5 20:21:43 2015 (r290411) @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); #defineEFI_STAGING_SIZE48 #endif -#defineSTAGE_PAGES ((EFI_STAGING_SIZE) * 1024 * 1024 / 4096) +#defineSTAGE_PAGES EFI_SIZE_TO_PAGES((EFI_STAGING_SIZE) * 1024 * 1024) EFI_PHYSICAL_ADDRESS staging, staging_end; intstage_offset_set = 0; @@ -59,7 +59,7 @@ x86_efi_copy_init(void) (unsigned long)(status & EFI_ERROR_MASK)); return (status); } - staging_end = staging + STAGE_PAGES * 4096; + staging_end = staging + STAGE_PAGES * EFI_PAGE_SIZE; return (0); } @@ -114,7 +114,7 @@ x86_efi_copy_finish(void) src = (uint64_t *)staging; dst = (uint64_t *)(staging - stage_offset); - last = (uint64_t *)(staging + STAGE_PAGES * EFI_PAGE_SIZE); + last = (uint64_t *)staging_end; while (src < last) *dst++ = *src++; ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r289759 - in head/sys/arm: arm include
On Thu, Nov 5, 2015 at 9:21 AM, Ian Leporewrote: > Just as an FYI for you guys, since we're all splashing around in busdma > code lately The things on my near-term (next several weeks) to-do > list for busdma are: > > Add "small bounce" support to help reduce the bounce preallocation > overhead for handling bounces due to cacheline alignment. Almost all > arm and mips bounces are triggered by cache alignment restrictions and > involve buffers smaller than a page (usually 256 bytes or less), and we > currently allocate full pages for bouncing. Instead we can use the > same small-buffer uma pools that are used for bus_dmamem_alloc(). > I like that. Along similar (but definitely not the same) lines, I had a suggestion in https://reviews.freebsd.org/D888 to coalesce bounce buffers, similar to how addseg already coalesces adjacent segments. Would something like that help here (in addition to small-bounce) to cut down on bounce buffer overhead, when the total buffer size is still a page or larger? > > The armv6 busdma implementation can be shared by armv4, armv6, and > mips. The only thing blocking this right now is the small-bounce > stuff; armv4 and mips boards often have only 32-128MB of ram, and they > can't afford the bounce-page allocation overhead of the current armv6 > implementation. Once the small-bounce support is in place, we can use > this implementation for all these platforms (and basically for any > platform that comes along that has a similar requirement for software > -assisted cache coherency for DMA). > Do you plan to merge armv6 and mips soonish? If so, then https://reviews.freebsd.org/D3986 can go away. That will also fix the problems mips busdma has with the cacheline copies in sync_buf() not being threadsafe. Code duplication in busdma is a huge pain right now. It seems like we have 3 broad classes of busdma support: bounce/coherent, bounce/non-coherent, and iommu. bounce/coherent could probably share all the same code. You might need a light dusting of platform-specific code (e.g. powerpc issues a sync instruction at the end of bus_dmamap_sync), but otherwise it should be the same. bounce/noncoherent could share the same code, as long as you define a set of macros or inline funcs that abstract the cache maintenance. That'll already be needed to cover the cache differences between armv4, armv6, and mips anyway. iommu is always going to be hardware-specific and need its own implementation for each kind of iommu. Then there's some logic that could probably be shared everywhere: a lot of the bus_dmamem_alloc()/bufalloc code strikes me as falling into that category. You might need MD wrappers that call MI helper functions, so for example the MD code can decide whether BUS_DMA_COHERENT means VM_MEMATTR_UNCACHEABLE, or whether allocated buffers really need to be physically contiguous (not needed for iommu). On top of all that, it makes sense to generalize the vtable approach already used for x86 and arm64. In a lot of cases the vtable would just point to the common bounce/coherent or bounce/noncoherent functions, or in some cases lightweight MD wrappers around those. Then for example it would be easy to add bounce/noncoherent support for arm64 if we end up needing it, and somewhat easier to add arm/mips/ppc iommu support. I'm definitely not suggesting you do all that stuff right now, just throwing ideas out there :) > > -- Ian > > On Thu, 2015-11-05 at 08:08 -0800, Jason Harmening wrote: > > Userspace buffers in load_buffer() also need temporary mappings, so > > it > > might be nice to keep the panic/KASSERT there for completeness. I > > don't > > see how anything coming from userspace would be outside > > vm_page_array > > though, so that is up to you and Michal. > > > > Since Michal's already made the initial patch, I think he should make > > the > > commit. That seems only right, plus I'm still busy trying to get > > everything set up at my new place. I'd like to be on the phabricator > > review, though. > > > > On Thu, Nov 5, 2015 at 3:58 AM, Svatopluk Kraus > > wrote: > > > > > On Thu, Nov 5, 2015 at 1:11 AM, Jason Harmening > > > wrote: > > > > > > > > On Wed, Nov 4, 2015 at 2:17 PM, Svatopluk Kraus > > > > > > > wrote: > > > > > > > > > > On Tue, Nov 3, 2015 at 8:45 AM, Jason Harmening > > > > > wrote: > > > > > > > > > > > > On Sun, Nov 1, 2015 at 8:11 AM, Ian Lepore > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > It's almost certainly not related to sysinit ordering. > > > > > > > This > > > exception > > > > > > > is happening during mmc probing after interrupts are > > > > > > > enabled. > > > > > > > > > > > > > > It appears that the problem is the faulting code is running > > > > > > > on one of > > > > > > > the very early pre-allocated kernel stacks (perhaps in an > > > > > > > interrupt > > > >
Re: svn commit: r290245 - in head/sys/contrib/vchiq/interface: vchi vchiq_arm
On Monday, November 02, 2015 11:37:38 AM Oleksandr Tymoshenko wrote: > > > On Nov 2, 2015, at 1:36 AM, Andrew Turnerwrote: > > > > On Sun, 1 Nov 2015 22:17:39 + (UTC) > > Oleksandr Tymoshenko wrote: > > > >> Author: gonzo > >> Date: Sun Nov 1 22:17:39 2015 > >> New Revision: 290245 > >> URL: https://svnweb.freebsd.org/changeset/base/290245 > >> > >> Log: > >> Synchronize with latest upstream VCHI code: > >> > >> - Add LIB_VERSION ioctl > >> - Add CLOSE_DELIVERED ioctl > >> - Bump code version > >> > >> Upstream version: 3782f2ad42c08f4d32f64138f8be7341afc380f5 > > > > Was there a reason we don't use the vendor-sys area for vchiq? > > What Adrian said: original code is not very portable and I have to go through > manual merge in my staging repo and only then merge to sys/ area One benefit of keeping a corresponding area in vendor-sys in sync is it makes it easier for other folks to pick this up in the future if need be. Noting the upstream version in each update is probably equivalent in functionality, though it is not how we do it in the rest of the tree. Also, Adrian, most of us do a lot of this work (FreeBSD) as volunteers. Even if some of us work on some of it for ${WORK} we work on other bits in our spare time for $0 as well, so that's a lame cop out. Part of the reason we do this in our spare time is because it's a chance to do things "right", not just quick hacks to satisfy a business-deadline at ${WORK} (to paraphrase gibbs@). -- John Baldwin ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r290252 - in head: . etc/defaults etc/periodic/daily tools/build/mk
On 11/4/15 4:40 PM, NGie Cooper wrote: > On Wed, Nov 4, 2015 at 4:21 PM, Bryan Drewerywrote: > > ... > >> This seems a bit gratuitous and against POLA. > > Unfortunately it was more POLA when the pediodic script was deleted > after it was added to OptionalObsoleteFiles.inc in the last few > months. > > I could add a backwards compatible variable when MFCing the change to > avoid breaking POLA on stable/9 and stable/10 though. I think a backwards compat var on head should be done as well. This periodic script came into the tree in least 1997. -- Regards, Bryan Drewery ___ 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-unsubscr...@freebsd.org"
svn commit: r290408 - head/usr.bin/rctl
Author: trasz Date: Thu Nov 5 19:15:39 2015 New Revision: 290408 URL: https://svnweb.freebsd.org/changeset/base/290408 Log: Make rctl(8) use more reasonable buffer size for retrieving the rules. Reviewed by: mjg@ MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/rctl/rctl.c Modified: head/usr.bin/rctl/rctl.c == --- head/usr.bin/rctl/rctl.cThu Nov 5 17:58:18 2015(r290407) +++ head/usr.bin/rctl/rctl.cThu Nov 5 19:15:39 2015(r290408) @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include -#defineRCTL_DEFAULT_BUFSIZE4096 +#defineRCTL_DEFAULT_BUFSIZE128 * 1024 static id_t parse_user(const char *s) ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r290245 - in head/sys/contrib/vchiq/interface: vchi vchiq_arm
On 5 November 2015 at 10:49, John Baldwinwrote: > On Monday, November 02, 2015 11:37:38 AM Oleksandr Tymoshenko wrote: >> >> > On Nov 2, 2015, at 1:36 AM, Andrew Turner wrote: >> > >> > On Sun, 1 Nov 2015 22:17:39 + (UTC) >> > Oleksandr Tymoshenko wrote: >> > >> >> Author: gonzo >> >> Date: Sun Nov 1 22:17:39 2015 >> >> New Revision: 290245 >> >> URL: https://svnweb.freebsd.org/changeset/base/290245 >> >> >> >> Log: >> >> Synchronize with latest upstream VCHI code: >> >> >> >> - Add LIB_VERSION ioctl >> >> - Add CLOSE_DELIVERED ioctl >> >> - Bump code version >> >> >> >> Upstream version: 3782f2ad42c08f4d32f64138f8be7341afc380f5 >> > >> > Was there a reason we don't use the vendor-sys area for vchiq? >> >> What Adrian said: original code is not very portable and I have to go >> through manual merge in my staging repo and only then merge to sys/ area > > One benefit of keeping a corresponding area in vendor-sys in sync is it > makes it easier for other folks to pick this up in the future if need be. > > Noting the upstream version in each update is probably equivalent in > functionality, though it is not how we do it in the rest of the tree. > > Also, Adrian, most of us do a lot of this work (FreeBSD) as volunteers. Even > if some of us work on some of it for ${WORK} we work on other bits in our > spare time for $0 as well, so that's a lame cop out. Part of the reason we > do this in our spare time is because it's a chance to do things "right", not > just quick hacks to satisfy a business-deadline at ${WORK} (to paraphrase > gibbs@). Sure, but that's a case by case basis. This is definitely not the only example of code which we don't maintain as vendor imports because of the sheer amount of changes being done. At some point gonzo@, I or someone may end up taking the videocore stuff and re-porting with to minimize diffs. Same as the dri code - it's not in vendor. Same as (IIRC) the scsi drivers; same as the intel ethernet drivers, etc, etc. The vendor stuff seems to work fine with userland code that requires minimal changes. I'd love for that to change, but porting linux code doesn't always give us that opportunity. :) -adrian ___ 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-unsubscr...@freebsd.org"
svn commit: r290410 - stable/10/sys/boot/amd64/efi
Author: jhb Date: Thu Nov 5 19:55:45 2015 New Revision: 290410 URL: https://svnweb.freebsd.org/changeset/base/290410 Log: MFC 287934: The EFI boot loader allocates a single chunk of contiguous memory to hold the kernel, modules, and any other loaded data. This memory block is relocated to the kernel's expected location during the transfer of control from the loader to the kernel. The GENERIC kernel on amd64 has recently grown such that a kernel + zfs.ko no longer fits in the default staging size. Bump the default size from 32MB to 48MB to provide more breathing room. PR: 201679 Modified: stable/10/sys/boot/amd64/efi/copy.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/amd64/efi/copy.c == --- stable/10/sys/boot/amd64/efi/copy.c Thu Nov 5 19:52:18 2015 (r290409) +++ stable/10/sys/boot/amd64/efi/copy.c Thu Nov 5 19:55:45 2015 (r290410) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #include #ifndef EFI_STAGING_SIZE -#defineEFI_STAGING_SIZE32 +#defineEFI_STAGING_SIZE48 #endif #defineSTAGE_PAGES ((EFI_STAGING_SIZE) * 1024 * 1024 / 4096) ___ 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-unsubscr...@freebsd.org"
svn commit: r290425 - head
Author: jkim Date: Thu Nov 5 22:36:09 2015 New Revision: 290425 URL: https://svnweb.freebsd.org/changeset/base/290425 Log: OpenSSL is still maintained by us. Modified: head/MAINTAINERS Modified: head/MAINTAINERS == --- head/MAINTAINERSThu Nov 5 22:28:31 2015(r290424) +++ head/MAINTAINERSThu Nov 5 22:36:09 2015(r290425) @@ -35,6 +35,7 @@ iwn(4)adrian Pre-commit review request iwm(4) adrian Pre-commit review requested, send to freebsd-wirel...@freebsd.org otus(4)adrian Pre-commit review requested, send to freebsd-wirel...@freebsd.org dev/usb/wlan adrian Pre-commit review requested, send to freebsd-wirel...@freebsd.org +opensslbenl,jkim Pre-commit review requested. OLD libc/posix1e rwatson Pre-commit review requested. POSIX.1e ACLs rwatson Pre-commit review requested. @@ -108,7 +109,6 @@ linux emul emulation Please discuss chan bs{diff,patch} cpercivaPre-commit review requested. portsnap cpercivaPre-commit review requested. freebsd-update cpercivaPre-commit review requested. -opensslbenl,jkim Pre-commit review requested. sys/dev/usbhselaskyIf in doubt, ask. sys/dev/sound/usb hselaskyIf in doubt, ask. sys/compat/linuxkpihselaskyIf in doubt, ask. ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r290428 - head/share/man/man9
On Friday, November 06, 2015 09:37:17 AM O'Connor, Daniel wrote: > Presumably the intent was to have an extra line after the \ so diffs are > reduced for future additions. No, it was just a copy and paste bug. :( Thanks for fixing it Adrian. > > On 6 Nov 2015, at 09:20, Adrian Chaddwrote: > > > > Author: adrian > > Date: Thu Nov 5 22:50:21 2015 > > New Revision: 290428 > > URL: https://svnweb.freebsd.org/changeset/base/290428 > > > > Log: > > remove \, it confuses things. > > > > Modified: > > head/share/man/man9/Makefile > > > > Modified: head/share/man/man9/Makefile > > == > > --- head/share/man/man9/MakefileThu Nov 5 22:44:36 2015 > > (r290427) > > +++ head/share/man/man9/MakefileThu Nov 5 22:50:21 2015 > > (r290428) > > @@ -1294,7 +1294,7 @@ MLINKS+=pci.9 pci_alloc_msi.9 \ > > pci.9 pci_write_config.9 \ > > pci.9 pcie_adjust_config.9 \ > > pci.9 pcie_read_config.9 \ > > - pci.9 pcie_write_config.9 \ > > + pci.9 pcie_write_config.9 > > MLINKS+=pci_iov_schema.9 pci_iov_schema_alloc_node.9 \ > > pci_iov_schema.9 pci_iov_schema_add_bool.9 \ > > pci_iov_schema.9 pci_iov_schema_add_string.9 \ > > ___ > > 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-unsubscr...@freebsd.org" > > -- > Daniel O'Connor > "The nice thing about standards is that there > are so many of them to choose from." > -- Andrew Tanenbaum > GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C > > -- John Baldwin ___ 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-unsubscr...@freebsd.org"
svn commit: r290430 - head
Author: gjb Date: Thu Nov 5 23:28:48 2015 New Revision: 290430 URL: https://svnweb.freebsd.org/changeset/base/290430 Log: Update MAINTAINERS file to reflect re (gjb) wants to review changes to release.sh Sponsored by: The FreeBSD Foundation Modified: head/MAINTAINERS Modified: head/MAINTAINERS == --- head/MAINTAINERSThu Nov 5 23:12:23 2015(r290429) +++ head/MAINTAINERSThu Nov 5 23:28:48 2015(r290430) @@ -36,6 +36,8 @@ iwm(4)adrian Pre-commit review request otus(4)adrian Pre-commit review requested, send to freebsd-wirel...@freebsd.org dev/usb/wlan adrian Pre-commit review requested, send to freebsd-wirel...@freebsd.org opensslbenl,jkim Pre-commit review requested. +release/release.sh gjb,re Pre-commit review and regression tests + requested. OLD libc/posix1e rwatson Pre-commit review requested. POSIX.1e ACLs rwatson Pre-commit review requested. @@ -136,7 +138,5 @@ sh(1) jilles Pre-commit review request nvme(4)jimharris Pre-commit review requested. nvd(4) jimharris Pre-commit review requested. nvmecontrol(8) jimharris Pre-commit review requested. -release/release.sh gjb Pre-commit review and regression tests - requested. nanobsdimp Pre-commit review requested for coordination. vmm(4) neel,grehan Pre-commit review requested. ___ 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-unsubscr...@freebsd.org"
svn commit: r290427 - head/sys/dev/iwn
Author: avos Date: Thu Nov 5 22:44:36 2015 New Revision: 290427 URL: https://svnweb.freebsd.org/changeset/base/290427 Log: iwn(4): various simple fixes - Fix mbuf leaks in iwn_raw_xmit() and iwn_xmit_task() (regression since r288178). - Check IWN_FLAG_RUNNING flag under lock. - Remove m->m_pkthdr.rcvif initialization (fixed in r283994). - Enclose some values in return statements into parentheses. Approved by: adrian (mentor) Differential Revision:https://reviews.freebsd.org/D4069 Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c == --- head/sys/dev/iwn/if_iwn.c Thu Nov 5 22:42:40 2015(r290426) +++ head/sys/dev/iwn/if_iwn.c Thu Nov 5 22:44:36 2015(r290427) @@ -4852,6 +4852,7 @@ iwn_xmit_task(void *arg0, int pending) if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); ieee80211_free_node(ni); + m_freem(m); } } @@ -4872,16 +4873,13 @@ iwn_raw_xmit(struct ieee80211_node *ni, DPRINTF(sc, IWN_DEBUG_XMIT | IWN_DEBUG_TRACE, "->%s begin\n", __func__); + IWN_LOCK(sc); if ((sc->sc_flags & IWN_FLAG_RUNNING) == 0) { m_freem(m); - return ENETDOWN; + IWN_UNLOCK(sc); + return (ENETDOWN); } - /* XXX? net80211 doesn't set this on xmit'ed raw frames? */ - m->m_pkthdr.rcvif = (void *) ni; - - IWN_LOCK(sc); - /* queue frame if we have to */ if (sc->sc_beacon_wait) { if (iwn_xmit_queue_enqueue(sc, m) != 0) { @@ -4909,12 +4907,14 @@ iwn_raw_xmit(struct ieee80211_node *ni, } if (error == 0) sc->sc_tx_timer = 5; + else + m_freem(m); IWN_UNLOCK(sc); DPRINTF(sc, IWN_DEBUG_TRACE | IWN_DEBUG_XMIT, "->%s: end\n",__func__); - return error; + return (error); } /* ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r290373 - head/sys/dev/ofw
On 05.11.15 22:47, Nathan Whitehorn wrote: On 11/05/15 13:24, Andreas Tobler wrote: Hi Nathan, Warner, first, I had the feeling that I have to provide a fast solution which makes PowerMacs usable again. I am aware that the committed version doesn't win a prize. Thank you! Also, I didn't know that we have AIM & FDT, Nathan which one? PS3 and POWER8 systems are AIM+FDT. Neither of these have I2C busses in their FDTs, so the impact is low for now, but it makes me a little nervous. Ah, maybe I have luck to convince my son to handover the PS3 to me. He has a PS4 too... About the POWER8, well, far away from my budget. On 05.11.15 21:26, Warner Losh wrote: I'd suggested that this be driven off a global quirk like u_int fdt_quirks; #define FDT_QUIRK_8BIT_IIC_ADDR 1 ... In openfirm.h? I'd really prefer an explicit platform check in ofw_iicbus.c for this by looking at the compatible property of the root node. If this ever comes up on another system, we can modify it, but I think it won't. Attached a working proposal. It does work with the Apple 8-bit I2C addresses and the fan regulation works. But I need a kind soul to test this on an arm board with Linux based FDT I2C devices which have 7-bit addresses. Ian? Thanks in advance, Andreas if (fdt_quirks & FDT_QUIRK_8BIT_IIC_ADDR) dinfo->opd_dinfo.addr = paddr; else dinfo->opd_dinfo.addr = paddr << 1; And the platform code, whatever that means, would set it when it "knows" this is the case. If I get that right, I'd have to set the fdt_quirk in each I2C parent, like kiic.c and smu.c? On Thu, Nov 5, 2015 at 12:56 PM, Nathan Whitehorn> wrote: I'm not sure this is the best way to do this: we have AIM systems that use FDT, for example. Can we make it a quirk in the host-bus driver? Or do a run-time check to see if the root node has MacRISC in its compatible property? The 'compatible property' approach would be limited/isolated to one file (ofw_iicbus.c) in comparison to the quirk approach where I'd have to adapt at least (known now) four files. I can go either way, just my thoughts. Index: sys/dev/ofw/ofw_iicbus.c === --- sys/dev/ofw/ofw_iicbus.c(revision 290373) +++ sys/dev/ofw/ofw_iicbus.c(working copy) @@ -101,9 +101,13 @@ { struct iicbus_softc *sc = IICBUS_SOFTC(dev); struct ofw_iicbus_devinfo *dinfo; - phandle_t child, node; + phandle_t child, node, root; pcell_t freq, paddr; device_t childdev; + ssize_t compatlen; + char compat[255]; + char *curstr; + u_int iic_addr_8bit = 0; sc->dev = dev; mtx_init(>lock, "iicbus", NULL, MTX_DEF); @@ -125,6 +129,21 @@ bus_enumerate_hinted_children(dev); /* +* Check if we're running on a PowerMac, needed for the I2C +* address below. +*/ + root = OF_peer(0); + compatlen = OF_getprop(root, "compatible", compat, + sizeof(compat)); + if (compatlen != -1) { + for (curstr = compat; curstr < compat + compatlen; + curstr += strlen(curstr) + 1) { + if (strncmp(curstr, "MacRISC", 7) == 0) + iic_addr_8bit = 1; + } + } + + /* * Attach those children represented in the device tree. */ for (child = OF_child(node); child != 0; child = OF_peer(child)) { @@ -153,11 +172,11 @@ * Linux FDT data contains 7-bit values, so shift them up to * 8-bit format. */ -#ifdef AIM - dinfo->opd_dinfo.addr = paddr; -#else - dinfo->opd_dinfo.addr = paddr << 1; -#endif + if (iic_addr_8bit) + dinfo->opd_dinfo.addr = paddr; + else + dinfo->opd_dinfo.addr = paddr << 1; + if (ofw_bus_gen_setup_devinfo(>opd_obdinfo, child) != 0) { free(dinfo, M_DEVBUF); ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r290428 - head/share/man/man9
On Thu, Nov 5, 2015 at 2:50 PM, Adrian Chaddwrote: > Author: adrian > Date: Thu Nov 5 22:50:21 2015 > New Revision: 290428 > URL: https://svnweb.freebsd.org/changeset/base/290428 > > Log: > remove \, it confuses things. "breaks installworld" might have been a better description.. ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r290428 - head/share/man/man9
On 11/5/2015 3:28 PM, Ian Lepore wrote: > On Fri, 2015-11-06 at 09:37 +1030, O'Connor, Daniel wrote: >> Presumably the intent was to have an extra line after the \ so diffs >> are reduced for future additions. >> > > Yeah. I wish we did that pretty much universally wherever lists of > things appear (SRCS and OBJS lists in makefiles, a trailing comma on ar > ray and enum init lists in C, etc). > Me too. It leads to bugs like this though when an empty line does not follow. We've done this pattern at work but I avoid doing so here. > >>> On 6 Nov 2015, at 09:20, Adrian Chaddwrote: >>> >>> Author: adrian >>> Date: Thu Nov 5 22:50:21 2015 >>> New Revision: 290428 >>> URL: https://svnweb.freebsd.org/changeset/base/290428 >>> >>> Log: >>> remove \, it confuses things. >>> >>> Modified: >>> head/share/man/man9/Makefile >>> >>> Modified: head/share/man/man9/Makefile >>> === >>> === >>> --- head/share/man/man9/MakefileThu Nov 5 22:44:36 2015 >>> (r290427) >>> +++ head/share/man/man9/MakefileThu Nov 5 22:50:21 2015 >>> (r290428) >>> @@ -1294,7 +1294,7 @@ MLINKS+=pci.9 pci_alloc_msi.9 \ >>> pci.9 pci_write_config.9 \ >>> pci.9 pcie_adjust_config.9 \ >>> pci.9 pcie_read_config.9 \ >>> - pci.9 pcie_write_config.9 \ >>> + pci.9 pcie_write_config.9 >>> MLINKS+=pci_iov_schema.9 pci_iov_schema_alloc_node.9 \ >>> pci_iov_schema.9 pci_iov_schema_add_bool.9 \ >>> pci_iov_schema.9 pci_iov_schema_add_string.9 \ -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r290426 - head/share/mk
Author: bdrewery Date: Thu Nov 5 22:42:40 2015 New Revision: 290426 URL: https://svnweb.freebsd.org/changeset/base/290426 Log: Correct a comment which appears to be mistakingly mechanically changed in r265420. MFC after:1 week Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.own.mk == --- head/share/mk/bsd.own.mkThu Nov 5 22:36:09 2015(r290425) +++ head/share/mk/bsd.own.mkThu Nov 5 22:42:40 2015(r290426) @@ -1,6 +1,6 @@ # $FreeBSD$ # -# The include file set common variables for owner, +# The include file set common variables for owner, # group, mode, and directories. Defaults are in brackets. # # ___ 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-unsubscr...@freebsd.org"
svn commit: r290428 - head/share/man/man9
Author: adrian Date: Thu Nov 5 22:50:21 2015 New Revision: 290428 URL: https://svnweb.freebsd.org/changeset/base/290428 Log: remove \, it confuses things. Modified: head/share/man/man9/Makefile Modified: head/share/man/man9/Makefile == --- head/share/man/man9/MakefileThu Nov 5 22:44:36 2015 (r290427) +++ head/share/man/man9/MakefileThu Nov 5 22:50:21 2015 (r290428) @@ -1294,7 +1294,7 @@ MLINKS+=pci.9 pci_alloc_msi.9 \ pci.9 pci_write_config.9 \ pci.9 pcie_adjust_config.9 \ pci.9 pcie_read_config.9 \ - pci.9 pcie_write_config.9 \ + pci.9 pcie_write_config.9 MLINKS+=pci_iov_schema.9 pci_iov_schema_alloc_node.9 \ pci_iov_schema.9 pci_iov_schema_add_bool.9 \ pci_iov_schema.9 pci_iov_schema_add_string.9 \ ___ 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-unsubscr...@freebsd.org"
svn commit: r290429 - in head: share/man/man4 sys/kern
Author: jhb Date: Thu Nov 5 23:12:23 2015 New Revision: 290429 URL: https://svnweb.freebsd.org/changeset/base/290429 Log: When dumping an rman in DDB, include the RID of each resource. Submitted by: Ravi Pokala (rpok...@panasas.com) Reviewed by: imp MFC after:1 week Differential Revision:https://reviews.freebsd.org/D4086 Modified: head/share/man/man4/ddb.4 head/sys/kern/subr_rman.c Modified: head/share/man/man4/ddb.4 == --- head/share/man/man4/ddb.4 Thu Nov 5 22:50:21 2015(r290428) +++ head/share/man/man4/ddb.4 Thu Nov 5 23:12:23 2015(r290429) @@ -60,7 +60,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 16, 2015 +.Dd November 5, 2015 .Dt DDB 4 .Os .Sh NAME @@ -560,8 +560,8 @@ The same as "show pcpu", but for every C .Pp .It Ic show Cm allrman Show information related with resource management, including -interrupt request lines, DMA request lines, I/O ports and I/O memory -addresses. +interrupt request lines, DMA request lines, I/O ports, I/O memory +addresses, and Resource IDs. .\" .Pp .It Ic show Cm apic Modified: head/sys/kern/subr_rman.c == --- head/sys/kern/subr_rman.c Thu Nov 5 22:50:21 2015(r290428) +++ head/sys/kern/subr_rman.c Thu Nov 5 23:12:23 2015(r290429) @@ -1051,7 +1051,8 @@ dump_rman(struct rman *rm) devname = "nomatch"; } else devname = NULL; - db_printf("0x%lx-0x%lx ", r->r_start, r->r_end); + db_printf("0x%lx-0x%lx (RID=%d) ", + r->r_start, r->r_end, r->r_rid); if (devname != NULL) db_printf("(%s)\n", devname); else ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r290373 - head/sys/dev/ofw
On Thu, 2015-11-05 at 23:43 +0100, Andreas Tobler wrote: > On 05.11.15 22:47, Nathan Whitehorn wrote: > > On 11/05/15 13:24, Andreas Tobler wrote: > > > Hi Nathan, Warner, > > > > > > first, I had the feeling that I have to provide a fast solution > > > which > > > makes PowerMacs usable again. I am aware that the committed > > > version > > > doesn't win a prize. > > > > Thank you! > > > > > Also, I didn't know that we have AIM & FDT, Nathan which one? > > > > PS3 and POWER8 systems are AIM+FDT. Neither of these have I2C > > busses in > > their FDTs, so the impact is low for now, but it makes me a little > > nervous. > > Ah, maybe I have luck to convince my son to handover the PS3 to me. > He > has a PS4 too... > > About the POWER8, well, far away from my budget. > > > > On 05.11.15 21:26, Warner Losh wrote: > > > > I'd suggested that this be driven off a global quirk like > > > > > > > > u_int fdt_quirks; > > > > #define FDT_QUIRK_8BIT_IIC_ADDR 1 > > > > ... > > > > > > In openfirm.h? > > > > I'd really prefer an explicit platform check in ofw_iicbus.c for > > this by > > looking at the compatible property of the root node. If this ever > > comes > > up on another system, we can modify it, but I think it won't. > > Attached a working proposal. > It does work with the Apple 8-bit I2C addresses and the fan > regulation > works. > > But I need a kind soul to test this on an arm board with Linux based > FDT > I2C devices which have 7-bit addresses. > > Ian? > Yeah, that looks good to me (strange that we have no helper function that can do all that compatible stuff given a node handle instead of a device_t). -- Ian > Thanks in advance, > Andreas > > > > > if (fdt_quirks & FDT_QUIRK_8BIT_IIC_ADDR) > > > > dinfo->opd_dinfo.addr = paddr; > > > > else > > > > dinfo->opd_dinfo.addr = paddr << 1; > > > > > > > > And the platform code, whatever that means, would set it when > > > > it "knows" > > > > this is the case. > > > > > > If I get that right, I'd have to set the fdt_quirk in each I2C > > > parent, > > > like kiic.c and smu.c? > > > > > > > On Thu, Nov 5, 2015 at 12:56 PM, Nathan Whitehorn > > > >> wrote: > > > > > > > > I'm not sure this is the best way to do this: we have AIM > > > > systems > > > > that use FDT, for example. Can we make it a quirk in the > > > > host-bus > > > > driver? Or do a run-time check to see if the root node has > > > > MacRISC > > > > in its compatible property? > > > > > > The 'compatible property' approach would be limited/isolated to > > > one > > > file (ofw_iicbus.c) in comparison to the quirk approach where I'd > > > have > > > to adapt at least (known now) four files. > > > > > > I can go either way, just my thoughts. > > ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r290373 - head/sys/dev/ofw
Hi Nathan, Warner, first, I had the feeling that I have to provide a fast solution which makes PowerMacs usable again. I am aware that the committed version doesn't win a prize. Also, I didn't know that we have AIM & FDT, Nathan which one? On 05.11.15 21:26, Warner Losh wrote: I'd suggested that this be driven off a global quirk like u_int fdt_quirks; #define FDT_QUIRK_8BIT_IIC_ADDR 1 ... In openfirm.h? if (fdt_quirks & FDT_QUIRK_8BIT_IIC_ADDR) dinfo->opd_dinfo.addr = paddr; else dinfo->opd_dinfo.addr = paddr << 1; And the platform code, whatever that means, would set it when it "knows" this is the case. If I get that right, I'd have to set the fdt_quirk in each I2C parent, like kiic.c and smu.c? On Thu, Nov 5, 2015 at 12:56 PM, Nathan Whitehorn> wrote: I'm not sure this is the best way to do this: we have AIM systems that use FDT, for example. Can we make it a quirk in the host-bus driver? Or do a run-time check to see if the root node has MacRISC in its compatible property? The 'compatible property' approach would be limited/isolated to one file (ofw_iicbus.c) in comparison to the quirk approach where I'd have to adapt at least (known now) four files. I can go either way, just my thoughts. Andreas ___ 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-unsubscr...@freebsd.org"
svn commit: r290416 - head/sys/dev/cxgbe
Author: jhb Date: Thu Nov 5 21:33:15 2015 New Revision: 290416 URL: https://svnweb.freebsd.org/changeset/base/290416 Log: Chelsio T5 chips do not properly echo the No Snoop and Relaxed Ordering attributes when replying to a TLP from a Root Port. As a workaround, disable No Snoop and Relaxed Ordering in the Root Port of each T5 adapter during attach so that CPU-initiated requests do not contain these flags. Note that this affects CPU-initiated requests to all devices under this root port. Reviewed by: np MFC after:1 week Sponsored by: Chelsio Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c == --- head/sys/dev/cxgbe/t4_main.cThu Nov 5 21:27:25 2015 (r290415) +++ head/sys/dev/cxgbe/t4_main.cThu Nov 5 21:33:15 2015 (r290416) @@ -573,6 +573,33 @@ t5_probe(device_t dev) return (ENXIO); } +static void +t5_attribute_workaround(device_t dev) +{ + device_t root_port; + uint32_t v; + + /* +* The T5 chips do not properly echo the No Snoop and Relaxed +* Ordering attributes when replying to a TLP from a Root +* Port. As a workaround, find the parent Root Port and +* disable No Snoop and Relaxed Ordering. Note that this +* affects all devices under this root port. +*/ + root_port = pci_find_pcie_root_port(dev); + if (root_port == NULL) { + device_printf(dev, "Unable to find parent root port\n"); + return; + } + + v = pcie_adjust_config(root_port, PCIER_DEVICE_CTL, + PCIEM_CTL_RELAXED_ORD_ENABLE | PCIEM_CTL_NOSNOOP_ENABLE, 0, 2); + if ((v & (PCIEM_CTL_RELAXED_ORD_ENABLE | PCIEM_CTL_NOSNOOP_ENABLE)) != + 0) + device_printf(dev, "Disabled No Snoop/Relaxed Ordering on %s\n", + device_get_nameunit(root_port)); +} + static int t4_attach(device_t dev) { @@ -591,6 +618,8 @@ t4_attach(device_t dev) sc->dev = dev; TUNABLE_INT_FETCH("hw.cxgbe.debug_flags", >debug_flags); + if ((pci_get_device(dev) & 0xff00) == 0x5400) + t5_attribute_workaround(dev); pci_enable_busmaster(dev); if (pci_find_cap(dev, PCIY_EXPRESS, ) == 0) { uint32_t v; ___ 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-unsubscr...@freebsd.org"
svn commit: r290418 - head
Author: imp Date: Thu Nov 5 21:50:11 2015 New Revision: 290418 URL: https://svnweb.freebsd.org/changeset/base/290418 Log: make is hard, so definitely move it. Still mulling moving vs deleting the rest of mine. Modified: head/MAINTAINERS Modified: head/MAINTAINERS == --- head/MAINTAINERSThu Nov 5 21:48:12 2015(r290417) +++ head/MAINTAINERSThu Nov 5 21:50:11 2015(r290418) @@ -26,6 +26,7 @@ sub-system. subsystem login notes - +share/mk imp, bapt, bdrewery, emaste, sjgMake is hard. OLD kqueue jmg Pre-commit review requested. Documentation Required. libc/posix1e rwatson Pre-commit review requested. @@ -71,7 +72,6 @@ net80211 adrian Pre-commit review reques nvipeter Try not to break it. libz peter Try not to break it. groff ru Recommends pre-commit review. -share/mk imp, bapt, bdrewery, emaste, sjgMake is hard. ipfw ipfwPre-commit review preferred. send to i...@freebsd.org drmrnoland Just keep me informed of changes, try not to break it. unifdef(1) fanfPre-commit review requested. ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r290428 - head/share/man/man9
Presumably the intent was to have an extra line after the \ so diffs are reduced for future additions. > On 6 Nov 2015, at 09:20, Adrian Chaddwrote: > > Author: adrian > Date: Thu Nov 5 22:50:21 2015 > New Revision: 290428 > URL: https://svnweb.freebsd.org/changeset/base/290428 > > Log: > remove \, it confuses things. > > Modified: > head/share/man/man9/Makefile > > Modified: head/share/man/man9/Makefile > == > --- head/share/man/man9/Makefile Thu Nov 5 22:44:36 2015 > (r290427) > +++ head/share/man/man9/Makefile Thu Nov 5 22:50:21 2015 > (r290428) > @@ -1294,7 +1294,7 @@ MLINKS+=pci.9 pci_alloc_msi.9 \ > pci.9 pci_write_config.9 \ > pci.9 pcie_adjust_config.9 \ > pci.9 pcie_read_config.9 \ > - pci.9 pcie_write_config.9 \ > + pci.9 pcie_write_config.9 > MLINKS+=pci_iov_schema.9 pci_iov_schema_alloc_node.9 \ > pci_iov_schema.9 pci_iov_schema_add_bool.9 \ > pci_iov_schema.9 pci_iov_schema_add_string.9 \ > ___ > 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-unsubscr...@freebsd.org" -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r290428 - head/share/man/man9
On Fri, 2015-11-06 at 09:37 +1030, O'Connor, Daniel wrote: > Presumably the intent was to have an extra line after the \ so diffs > are reduced for future additions. > Yeah. I wish we did that pretty much universally wherever lists of things appear (SRCS and OBJS lists in makefiles, a trailing comma on ar ray and enum init lists in C, etc). -- Ian > > On 6 Nov 2015, at 09:20, Adrian Chaddwrote: > > > > Author: adrian > > Date: Thu Nov 5 22:50:21 2015 > > New Revision: 290428 > > URL: https://svnweb.freebsd.org/changeset/base/290428 > > > > Log: > > remove \, it confuses things. > > > > Modified: > > head/share/man/man9/Makefile > > > > Modified: head/share/man/man9/Makefile > > === > > === > > --- head/share/man/man9/MakefileThu Nov 5 22:44:36 2015 > > (r290427) > > +++ head/share/man/man9/MakefileThu Nov 5 22:50:21 2015 > > (r290428) > > @@ -1294,7 +1294,7 @@ MLINKS+=pci.9 pci_alloc_msi.9 \ > > pci.9 pci_write_config.9 \ > > pci.9 pcie_adjust_config.9 \ > > pci.9 pcie_read_config.9 \ > > - pci.9 pcie_write_config.9 \ > > + pci.9 pcie_write_config.9 > > MLINKS+=pci_iov_schema.9 pci_iov_schema_alloc_node.9 \ > > pci_iov_schema.9 pci_iov_schema_add_bool.9 \ > > pci_iov_schema.9 pci_iov_schema_add_string.9 \ > > ___ > > 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-unsubscr...@freebsd.org" > > -- > Daniel O'Connor > "The nice thing about standards is that there > are so many of them to choose from." > -- Andrew Tanenbaum > GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C > > > ___ 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-unsubscr...@freebsd.org"
svn commit: r290431 - head/usr.bin/svn/lib
Author: bdrewery Date: Fri Nov 6 00:06:10 2015 New Revision: 290431 URL: https://svnweb.freebsd.org/changeset/base/290431 Log: Add SUBDIR_PARALLEL. None of these libraries depend on each other. Submitted by: Jia-Shiun LiMFC after:2 weeks Modified: head/usr.bin/svn/lib/Makefile Modified: head/usr.bin/svn/lib/Makefile == --- head/usr.bin/svn/lib/Makefile Thu Nov 5 23:28:48 2015 (r290430) +++ head/usr.bin/svn/lib/Makefile Fri Nov 6 00:06:10 2015 (r290431) @@ -4,5 +4,6 @@ SUBDIR= libapr libapr_util libserf \ libsvn_client libsvn_delta libsvn_diff libsvn_fs libsvn_fs_fs \ libsvn_fs_util libsvn_fs_x libsvn_ra libsvn_ra_local libsvn_ra_serf \ libsvn_ra_svn libsvn_repos libsvn_subr libsvn_wc +SUBDIR_PARALLEL= .include ___ 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-unsubscr...@freebsd.org"
svn commit: r290419 - head
Author: adrian Date: Thu Nov 5 21:54:35 2015 New Revision: 290419 URL: https://svnweb.freebsd.org/changeset/base/290419 Log: Add wifi bits. Modified: head/MAINTAINERS Modified: head/MAINTAINERS == --- head/MAINTAINERSThu Nov 5 21:50:11 2015(r290418) +++ head/MAINTAINERSThu Nov 5 21:54:35 2015(r290419) @@ -27,6 +27,12 @@ sub-system. subsystem login notes - share/mk imp, bapt, bdrewery, emaste, sjgMake is hard. +ath(4) adrian Pre-commit review requested, send to freebsd-wirel...@freebsd.org +net80211 adrian Pre-commit review requested, send to freebsd-wirel...@freebsd.org +iwn(4) adrian Pre-commit review requested, send to freebsd-wirel...@freebsd.org +iwm(4) adrian Pre-commit review requested, send to freebsd-wirel...@freebsd.org +otus(4)adrian Pre-commit review requested, send to freebsd-wirel...@freebsd.org +dev/usb/wlan adrian Pre-commit review requested, send to freebsd-wirel...@freebsd.org OLD kqueue jmg Pre-commit review requested. Documentation Required. libc/posix1e rwatson Pre-commit review requested. @@ -36,7 +42,6 @@ MAC Framework rwatson Pre-commit review MAC Modulesrwatson Pre-commit review requested. contrib/openbsmrwatson Pre-commit review requested. sys/security/audit rwatson Pre-commit review requested. -ath(4) adrian Pre-commit review requested, send to freebsd-wirel...@freebsd.org ahc(4) gibbs Pre-commit review requested. ahd(4) gibbs Pre-commit review requested. pci busimp,jhb Pre-commit review requested. @@ -68,7 +73,6 @@ procfsdes Pre-commit review requested. linprocfs des Pre-commit review requested. lprgad Pre-commit review requested, particularly for lpd/recvjob.c and lpd/printjob.c. -net80211 adrian Pre-commit review requested, send to freebsd-wirel...@freebsd.org nvipeter Try not to break it. libz peter Try not to break it. groff ru Recommends pre-commit review. ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r290373 - head/sys/dev/ofw
On 11/05/15 13:24, Andreas Tobler wrote: Hi Nathan, Warner, first, I had the feeling that I have to provide a fast solution which makes PowerMacs usable again. I am aware that the committed version doesn't win a prize. Thank you! Also, I didn't know that we have AIM & FDT, Nathan which one? PS3 and POWER8 systems are AIM+FDT. Neither of these have I2C busses in their FDTs, so the impact is low for now, but it makes me a little nervous. On 05.11.15 21:26, Warner Losh wrote: I'd suggested that this be driven off a global quirk like u_int fdt_quirks; #define FDT_QUIRK_8BIT_IIC_ADDR 1 ... In openfirm.h? I'd really prefer an explicit platform check in ofw_iicbus.c for this by looking at the compatible property of the root node. If this ever comes up on another system, we can modify it, but I think it won't. -Nathan if (fdt_quirks & FDT_QUIRK_8BIT_IIC_ADDR) dinfo->opd_dinfo.addr = paddr; else dinfo->opd_dinfo.addr = paddr << 1; And the platform code, whatever that means, would set it when it "knows" this is the case. If I get that right, I'd have to set the fdt_quirk in each I2C parent, like kiic.c and smu.c? On Thu, Nov 5, 2015 at 12:56 PM, Nathan Whitehorn> wrote: I'm not sure this is the best way to do this: we have AIM systems that use FDT, for example. Can we make it a quirk in the host-bus driver? Or do a run-time check to see if the root node has MacRISC in its compatible property? The 'compatible property' approach would be limited/isolated to one file (ofw_iicbus.c) in comparison to the quirk approach where I'd have to adapt at least (known now) four files. I can go either way, just my thoughts. Andreas ___ 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-unsubscr...@freebsd.org"
svn commit: r290417 - head
Author: imp Date: Thu Nov 5 21:48:12 2015 New Revision: 290417 URL: https://svnweb.freebsd.org/changeset/base/290417 Log: Fix CC being wrong during install* targets. Move CROSS_TOOLS stuff to top of file (before bsd.compiler.mk) so that decisions made by bsd.compiler.mk can properly affect the defaults in src.opts.mk. Move that to after bsd.compiler.mk. Add a comment about why we include bsd.compiler.mk here despite the fact that src.opts.mk currently does too. Also remove bsd.arch.inc.mk that's been OBE. Differential Revision: https://reviews.freebsd.org/D4087 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Nov 5 21:33:15 2015(r290416) +++ head/Makefile.inc1 Thu Nov 5 21:48:12 2015(r290417) @@ -48,9 +48,15 @@ .error "Both TARGET and TARGET_ARCH must be defined." .endif -.include "share/mk/src.opts.mk" -.include -.include +# Cross toolchain changes must be in effect before bsd.compiler.mk +# so that gets the right CC, and pass CROSS_TOOLCHAIN to submakes. +.if defined(CROSS_TOOLCHAIN) +LOCALBASE?=/usr/local +.include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk" +CROSSENV+=CROSS_TOOLCHAIN="${CROSS_TOOLCHAIN}" +.endif +.include # don't depend on src.opts.mk doing it +.include "share/mk/src.opts.mk" # We must do lib/ and libexec/ before bin/ in case of a mid-install error to # keep the users system reasonably usable. For static->dynamic root upgrades, @@ -254,7 +260,7 @@ INSTALLTMP!=/usr/bin/mktemp -d -u -t in BOOTSTRAPPING?=0 # Common environment for world related stages -CROSSENV= MAKEOBJDIRPREFIX=${OBJTREE} \ +CROSSENV+= MAKEOBJDIRPREFIX=${OBJTREE} \ MACHINE_ARCH=${TARGET_ARCH} \ MACHINE=${TARGET} \ CPUTYPE=${TARGET_CPUTYPE} @@ -329,10 +335,6 @@ HMAKE= PATH=${TMPPATH} ${MAKE} LOCAL_MT HMAKE+=PATH=${TMPPATH} METALOG=${METALOG} -DNO_ROOT .endif -.if defined(CROSS_TOOLCHAIN) -LOCALBASE?=/usr/local -.include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk" -.endif .if defined(CROSS_TOOLCHAIN_PREFIX) CROSS_COMPILER_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} @@ -369,7 +371,7 @@ X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX}${ X${BINUTIL}?= ${${BINUTIL}} .endif .endfor -WMAKEENV+= CC="${XCC} ${XCFLAGS}" CXX="${XCXX} ${XCFLAGS} ${XCXXFLAGS}" \ +CROSSENV+= CC="${XCC} ${XCFLAGS}" CXX="${XCXX} ${XCFLAGS} ${XCXXFLAGS}" \ DEPFLAGS="${DEPFLAGS}" \ CPP="${XCPP} ${XCFLAGS}" \ AS="${XAS}" AR="${XAR}" LD="${XLD}" NM=${XNM} \ ___ 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-unsubscr...@freebsd.org"
svn commit: r290424 - in head: . share/mk
Author: bdrewery Date: Thu Nov 5 22:28:31 2015 New Revision: 290424 URL: https://svnweb.freebsd.org/changeset/base/290424 Log: Allow 'make buildenv' to work anywhere in the src tree. Sponsored by: EMC / Isilon Storage Division Added: head/share/mk/src.init.mk (contents, props changed) Modified: head/Makefile.inc1 head/share/mk/local.init.mk Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Nov 5 22:09:00 2015(r290423) +++ head/Makefile.inc1 Thu Nov 5 22:28:31 2015(r290424) @@ -773,7 +773,7 @@ buildworld_epilogue: # modification of the current environment's PATH. In addition, we need # to quote multiword values. # -buildenvvars: +buildenvvars: .PHONY @echo ${WMAKEENV:Q} ${.MAKE.EXPORTED:@v@$v=\"${$v}\"@} .if ${.TARGETS:Mbuildenv} @@ -781,9 +781,11 @@ buildenvvars: .error The buildenv target is incompatible with -j .endif .endif -buildenv: +BUILDENV_DIR?= ${.CURDIR} +buildenv: .PHONY @echo Entering world for ${TARGET_ARCH}:${TARGET} - @cd ${.CURDIR} && env ${WMAKEENV} BUILDENV=1 ${BUILDENV_SHELL} || true + @cd ${BUILDENV_DIR} && env ${WMAKEENV} BUILDENV=1 ${BUILDENV_SHELL} \ + || true TOOLCHAIN_TGTS=${WMAKE_TGTS:N_depend:Neverything:Nbuild32} toolchain: ${TOOLCHAIN_TGTS} Modified: head/share/mk/local.init.mk == --- head/share/mk/local.init.mk Thu Nov 5 22:09:00 2015(r290423) +++ head/share/mk/local.init.mk Thu Nov 5 22:28:31 2015(r290424) @@ -38,3 +38,5 @@ CPP= ${HOST_CPP} HOST_CFLAGS+= -DHOSTPROG CFLAGS+= ${HOST_CFLAGS} .endif + +.-include "src.init.mk" Added: head/share/mk/src.init.mk == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/mk/src.init.mk Thu Nov 5 22:28:31 2015(r290424) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +.if !target() +: + +.if !target(buildenv) +buildenv: .PHONY + @env BUILDENV_DIR=${.CURDIR} ${MAKE} -C ${SRCTOP} buildenv +.endif + +.endif # !target() ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r290373 - head/sys/dev/ofw
I'd suggested that this be driven off a global quirk like u_int fdt_quirks; #define FDT_QUIRK_8BIT_IIC_ADDR 1 ... if (fdt_quirks & FDT_QUIRK_8BIT_IIC_ADDR) dinfo->opd_dinfo.addr = paddr; else dinfo->opd_dinfo.addr = paddr << 1; And the platform code, whatever that means, would set it when it "knows" this is the case. Warner On Thu, Nov 5, 2015 at 12:56 PM, Nathan Whitehornwrote: > I'm not sure this is the best way to do this: we have AIM systems that use > FDT, for example. Can we make it a quirk in the host-bus driver? Or do a > run-time check to see if the root node has MacRISC in its compatible > property? > -Nathan > > On 11/04/15 14:46, Andreas Tobler wrote: > >> Author: andreast >> Date: Wed Nov 4 22:46:30 2015 >> New Revision: 290373 >> URL: https://svnweb.freebsd.org/changeset/base/290373 >> >> Log: >>Add a compile time switch to distinguish between 7-bit and 8-bit I2C >> address >>usage. The comment in the code should explain the situation. >> Discussed with:ian@ >> >> Modified: >>head/sys/dev/ofw/ofw_iicbus.c >> >> Modified: head/sys/dev/ofw/ofw_iicbus.c >> >> == >> --- head/sys/dev/ofw/ofw_iicbus.c Wed Nov 4 19:09:42 2015 >> (r290372) >> +++ head/sys/dev/ofw/ofw_iicbus.c Wed Nov 4 22:46:30 2015 >> (r290373) >> @@ -148,10 +148,16 @@ ofw_iicbus_attach(device_t dev) >> if (dinfo == NULL) >> continue; >> /* >> -* OFW uses 7-bit I2C address format (see ePAPR), >> -* but system expect 8-bit. >> +* FreeBSD drivers expect I2C addresses to be expressed as >> +* 8-bit values. Apple OFW data contains 8-bit values, >> but >> +* Linux FDT data contains 7-bit values, so shift them up >> to >> +* 8-bit format. >> */ >> +#ifdef AIM >> + dinfo->opd_dinfo.addr = paddr; >> +#else >> dinfo->opd_dinfo.addr = paddr << 1; >> +#endif >> if (ofw_bus_gen_setup_devinfo(>opd_obdinfo, child) >> != >> 0) { >> free(dinfo, M_DEVBUF); >> >> > > ___ 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-unsubscr...@freebsd.org"
svn commit: r290413 - in stable: 10/gnu/usr.bin/gdb/kgdb 9/gnu/usr.bin/gdb/kgdb
Author: jhb Date: Thu Nov 5 21:22:23 2015 New Revision: 290413 URL: https://svnweb.freebsd.org/changeset/base/290413 Log: MFC 288371: When XSAVE support was added on amd64, the FPU save area was moved out of 'struct pcb' and into a variable-sized region after the structure. The kgdb code currently only reads the pcb. It does not read in the FPU save area but instead passes stack garbage as the FPU's saved context. Fixing this would mean determining the proper size of the area and fetching it. However, this state is not saved for running CPUs in stoppcbs[], so the callback would also have to know to ignore those pcbs. Instead, just remove the call since it is of limited usefulness. It results in kgdb reporting the state of the FPU/SIMD registers in userland, not their current values in the kernel. In particular, it does not report the correct state for any code in the kernel which does use the FPU and would report incorrect values in that case. Modified: stable/10/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Directory Properties: stable/9/gnu/usr.bin/gdb/kgdb/ (props changed) Modified: stable/10/gnu/usr.bin/gdb/kgdb/trgt_amd64.c == --- stable/10/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Thu Nov 5 20:24:56 2015 (r290412) +++ stable/10/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Thu Nov 5 21:22:23 2015 (r290413) @@ -72,7 +72,6 @@ kgdb_trgt_fetch_registers(int regno __un supply_register(AMD64_R8_REGNUM + 6, (char *)_r14); supply_register(AMD64_R15_REGNUM, (char *)_r15); supply_register(AMD64_RIP_REGNUM, (char *)_rip); - amd64_supply_fxsave(current_regcache, -1, (struct fpusave *)( + 1)); } void ___ 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-unsubscr...@freebsd.org"
svn commit: r290413 - in stable: 10/gnu/usr.bin/gdb/kgdb 9/gnu/usr.bin/gdb/kgdb
Author: jhb Date: Thu Nov 5 21:22:23 2015 New Revision: 290413 URL: https://svnweb.freebsd.org/changeset/base/290413 Log: MFC 288371: When XSAVE support was added on amd64, the FPU save area was moved out of 'struct pcb' and into a variable-sized region after the structure. The kgdb code currently only reads the pcb. It does not read in the FPU save area but instead passes stack garbage as the FPU's saved context. Fixing this would mean determining the proper size of the area and fetching it. However, this state is not saved for running CPUs in stoppcbs[], so the callback would also have to know to ignore those pcbs. Instead, just remove the call since it is of limited usefulness. It results in kgdb reporting the state of the FPU/SIMD registers in userland, not their current values in the kernel. In particular, it does not report the correct state for any code in the kernel which does use the FPU and would report incorrect values in that case. Modified: stable/9/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Directory Properties: stable/9/gnu/usr.bin/gdb/kgdb/ (props changed) Changes in other areas also in this revision: Modified: stable/10/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Directory Properties: stable/10/ (props changed) Modified: stable/9/gnu/usr.bin/gdb/kgdb/trgt_amd64.c == --- stable/9/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Thu Nov 5 20:24:56 2015 (r290412) +++ stable/9/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Thu Nov 5 21:22:23 2015 (r290413) @@ -66,7 +66,6 @@ kgdb_trgt_fetch_registers(int regno __un supply_register(AMD64_R8_REGNUM + 6, (char *)_r14); supply_register(AMD64_R15_REGNUM, (char *)_r15); supply_register(AMD64_RIP_REGNUM, (char *)_rip); - amd64_supply_fxsave(current_regcache, -1, (struct fpusave *)( + 1)); } void ___ 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-unsubscr...@freebsd.org"
svn commit: r290415 - in head: share/man/man9 sys/dev/pci
Author: jhb Date: Thu Nov 5 21:27:25 2015 New Revision: 290415 URL: https://svnweb.freebsd.org/changeset/base/290415 Log: Add a new helper function for PCI devices to locate the upstream PCI-express root port of a given PCI device. Reviewed by: kib, imp MFC after:1 week Sponsored by: Chelsio Differential Revision:https://reviews.freebsd.org/D4089 Modified: head/share/man/man9/Makefile head/share/man/man9/pci.9 head/sys/dev/pci/pci.c head/sys/dev/pci/pcivar.h Modified: head/share/man/man9/Makefile == --- head/share/man/man9/MakefileThu Nov 5 21:26:06 2015 (r290414) +++ head/share/man/man9/MakefileThu Nov 5 21:27:25 2015 (r290415) @@ -1274,6 +1274,7 @@ MLINKS+=pci.9 pci_alloc_msi.9 \ pci.9 pci_find_device.9 \ pci.9 pci_find_extcap.9 \ pci.9 pci_find_htcap.9 \ + pci.9 pci_find_pcie_root_port.9 \ pci.9 pci_get_max_read_req.9 \ pci.9 pci_get_powerstate.9 \ pci.9 pci_get_vpd_ident.9 \ Modified: head/share/man/man9/pci.9 == --- head/share/man/man9/pci.9 Thu Nov 5 21:26:06 2015(r290414) +++ head/share/man/man9/pci.9 Thu Nov 5 21:27:25 2015(r290415) @@ -42,6 +42,7 @@ .Nm pci_find_device , .Nm pci_find_extcap , .Nm pci_find_htcap , +.Nm pci_find_pcie_root_port , .Nm pci_get_max_read_req , .Nm pci_get_powerstate , .Nm pci_get_vpd_ident , @@ -91,6 +92,8 @@ .Fn pci_find_extcap "device_t dev" "int capability" "int *capreg" .Ft int .Fn pci_find_htcap "device_t dev" "int capability" "int *capreg" +.Ft device_t +.Fn pci_find_pcie_root_port "device_t dev" .Ft int .Fn pci_get_max_read_req "device_t dev" .Ft int @@ -338,6 +341,16 @@ If the capability is not found or the de returns an error. .Pp The +.Fn pci_find_pcie_root_port +function walks up the PCI device hierarchy to locate the PCI-express root +port upstream of +.Fa dev . +If a root port is not found, +.Fn pci_find_pcie_root_port +returns +.Dv NULL . +.Pp +The .Fn pci_get_vpd_ident function is used to fetch a device's Vital Product Data .Pq VPD Modified: head/sys/dev/pci/pci.c == --- head/sys/dev/pci/pci.c Thu Nov 5 21:26:06 2015(r290414) +++ head/sys/dev/pci/pci.c Thu Nov 5 21:27:25 2015(r290415) @@ -5431,3 +5431,44 @@ pci_get_rid_method(device_t dev, device_ return (PCIB_GET_RID(device_get_parent(dev), child)); } + +/* Find the upstream port of a given PCI device in a root complex. */ +device_t +pci_find_pcie_root_port(device_t dev) +{ + struct pci_devinfo *dinfo; + devclass_t pci_class; + device_t pcib, bus; + + pci_class = devclass_find("pci"); + KASSERT(device_get_devclass(device_get_parent(dev)) == pci_class, + ("%s: non-pci device %s", __func__, device_get_nameunit(dev))); + + /* +* Walk the bridge hierarchy until we find a PCI-e root +* port or a non-PCI device. +*/ + for (;;) { + bus = device_get_parent(dev); + KASSERT(bus != NULL, ("%s: null parent of %s", __func__, + device_get_nameunit(dev))); + + pcib = device_get_parent(bus); + KASSERT(pcib != NULL, ("%s: null bridge of %s", __func__, + device_get_nameunit(bus))); + + /* +* pcib's parent must be a PCI bus for this to be a +* PCI-PCI bridge. +*/ + if (device_get_devclass(device_get_parent(pcib)) != pci_class) + return (NULL); + + dinfo = device_get_ivars(pcib); + if (dinfo->cfg.pcie.pcie_location != 0 && + dinfo->cfg.pcie.pcie_type == PCIEM_TYPE_ROOT_PORT) + return (pcib); + + dev = pcib; + } +} Modified: head/sys/dev/pci/pcivar.h == --- head/sys/dev/pci/pcivar.h Thu Nov 5 21:26:06 2015(r290414) +++ head/sys/dev/pci/pcivar.h Thu Nov 5 21:27:25 2015(r290415) @@ -547,6 +547,7 @@ int pci_msix_device_blacklisted(device_t void pci_ht_map_msi(device_t dev, uint64_t addr); +device_t pci_find_pcie_root_port(device_t dev); intpci_get_max_read_req(device_t dev); void pci_restore_state(device_t dev); void pci_save_state(device_t dev); ___ 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-unsubscr...@freebsd.org"
svn commit: r290422 - head/sys/arm/at91
Author: cognet Date: Thu Nov 5 22:03:42 2015 New Revision: 290422 URL: https://svnweb.freebsd.org/changeset/base/290422 Log: Make if_macb work with FDT. Modified: head/sys/arm/at91/if_macb.c Modified: head/sys/arm/at91/if_macb.c == --- head/sys/arm/at91/if_macb.c Thu Nov 5 22:03:27 2015(r290421) +++ head/sys/arm/at91/if_macb.c Thu Nov 5 22:03:42 2015(r290422) @@ -24,6 +24,8 @@ * SUCH DAMAGE. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -72,6 +74,12 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#endif + /* "device miibus" required. See GENERIC if you get errors here. */ #include "miibus_if.h" @@ -1196,6 +1204,11 @@ macbioctl(struct ifnet * ifp, u_long cmd static int macb_probe(device_t dev) { +#ifdef FDT +if (!ofw_bus_is_compatible(dev, "cdns,at32ap7000-macb")) +return (ENXIO); +#endif + device_set_desc(dev, "macb"); return (0); } @@ -1546,7 +1559,11 @@ static driver_t macb_driver = { }; +#ifdef FDT +DRIVER_MODULE(macb, simplebus, macb_driver, macb_devclass, NULL, NULL); +#else DRIVER_MODULE(macb, atmelarm, macb_driver, macb_devclass, 0, 0); +#endif DRIVER_MODULE(miibus, macb, miibus_driver, miibus_devclass, 0, 0); MODULE_DEPEND(macb, miibus, 1, 1, 1); MODULE_DEPEND(macb, ether, 1, 1, 1); ___ 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-unsubscr...@freebsd.org"
svn commit: r290420 - head/sys/arm/at91
Author: cognet Date: Thu Nov 5 22:03:20 2015 New Revision: 290420 URL: https://svnweb.freebsd.org/changeset/base/290420 Log: Make at91_pmc probe any at91 pmc device we support, not just at91rm9200. MFC after:1 week Modified: head/sys/arm/at91/at91_pmc.c Modified: head/sys/arm/at91/at91_pmc.c == --- head/sys/arm/at91/at91_pmc.cThu Nov 5 21:54:35 2015 (r290419) +++ head/sys/arm/at91/at91_pmc.cThu Nov 5 22:03:20 2015 (r290420) @@ -661,7 +661,10 @@ static int at91_pmc_probe(device_t dev) { #ifdef FDT - if (!ofw_bus_is_compatible(dev, "atmel,at91rm9200-pmc")) + if (!ofw_bus_is_compatible(dev, "atmel,at91rm9200-pmc") && + !ofw_bus_is_compatible(dev, "atmel,at91sam9260-pmc") && + !ofw_bus_is_compatible(dev, "atmel,at91sam9g45-pmc") && + !ofw_bus_is_compatible(dev, "atmel,at91sam9x5-pmc")) return (ENXIO); #endif device_set_desc(dev, "PMC"); ___ 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-unsubscr...@freebsd.org"
svn commit: r290421 - head
Author: jmg Date: Thu Nov 5 22:03:27 2015 New Revision: 290421 URL: https://svnweb.freebsd.org/changeset/base/290421 Log: I'm still maintaining these... Modified: head/MAINTAINERS Modified: head/MAINTAINERS == --- head/MAINTAINERSThu Nov 5 22:03:20 2015(r290420) +++ head/MAINTAINERSThu Nov 5 22:03:27 2015(r290421) @@ -26,6 +26,8 @@ sub-system. subsystem login notes - +opencrypto jmg Pre-commit review requested. Documentation Required. +kqueue jmg Pre-commit review requested. Documentation Required. share/mk imp, bapt, bdrewery, emaste, sjgMake is hard. ath(4) adrian Pre-commit review requested, send to freebsd-wirel...@freebsd.org net80211 adrian Pre-commit review requested, send to freebsd-wirel...@freebsd.org @@ -34,7 +36,6 @@ iwm(4)adrian Pre-commit review request otus(4)adrian Pre-commit review requested, send to freebsd-wirel...@freebsd.org dev/usb/wlan adrian Pre-commit review requested, send to freebsd-wirel...@freebsd.org OLD -kqueue jmg Pre-commit review requested. Documentation Required. libc/posix1e rwatson Pre-commit review requested. POSIX.1e ACLs rwatson Pre-commit review requested. UFS EAsrwatson Pre-commit review requested. @@ -139,4 +140,3 @@ release/release.sh gjb Pre-commit review requested. nanobsdimp Pre-commit review requested for coordination. vmm(4) neel,grehan Pre-commit review requested. -opencrypto jmg Pre-commit review requested. Documentation Required. ___ 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-unsubscr...@freebsd.org"
svn commit: r290414 - in head: share/man/man9 sys/dev/pci
Author: jhb Date: Thu Nov 5 21:26:06 2015 New Revision: 290414 URL: https://svnweb.freebsd.org/changeset/base/290414 Log: Add helper routines for PCI device drivers to read, write, and modify PCI-Express capability registers (that is, PCI config registers in the standard PCI config space belonging to the PCI-Express capability register set). Note that all of the current PCI-e registers are either 16 or 32-bits, so only widths of 2 or 4 bytes are supported. Reviewed by: imp MFC after:1 week Sponsored by: Chelsio Differential Revision:https://reviews.freebsd.org/D4088 Modified: head/share/man/man9/Makefile head/share/man/man9/pci.9 head/sys/dev/pci/pci.c head/sys/dev/pci/pcivar.h Modified: head/share/man/man9/Makefile == --- head/share/man/man9/MakefileThu Nov 5 21:22:23 2015 (r290413) +++ head/share/man/man9/MakefileThu Nov 5 21:26:06 2015 (r290414) @@ -1290,7 +1290,10 @@ MLINKS+=pci.9 pci_alloc_msi.9 \ pci.9 pci_save_state.9 \ pci.9 pci_set_powerstate.9 \ pci.9 pci_set_max_read_req.9 \ - pci.9 pci_write_config.9 + pci.9 pci_write_config.9 \ + pci.9 pcie_adjust_config.9 \ + pci.9 pcie_read_config.9 \ + pci.9 pcie_write_config.9 \ MLINKS+=pci_iov_schema.9 pci_iov_schema_alloc_node.9 \ pci_iov_schema.9 pci_iov_schema_add_bool.9 \ pci_iov_schema.9 pci_iov_schema_add_string.9 \ Modified: head/share/man/man9/pci.9 == --- head/share/man/man9/pci.9 Thu Nov 5 21:22:23 2015(r290413) +++ head/share/man/man9/pci.9 Thu Nov 5 21:26:06 2015(r290414) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 8, 2015 +.Dd November 5, 2015 .Dt PCI 9 .Os .Sh NAME @@ -58,7 +58,10 @@ .Nm pci_save_state , .Nm pci_set_max_read_req , .Nm pci_set_powerstate , -.Nm pci_write_config +.Nm pci_write_config , +.Nm pcie_adjust_config , +.Nm pcie_read_config , +.Nm pcie_write_config .Nd PCI bus interface .Sh SYNOPSIS .In sys/bus.h @@ -118,6 +121,18 @@ .Fn pci_set_powerstate "device_t dev" "int state" .Ft void .Fn pci_write_config "device_t dev" "int reg" "uint32_t val" "int width" +.Ft uint32_t +.Fo pcie_adjust_config +.Fa "device_t dev" +.Fa "int reg" +.Fa "uint32_t mask" +.Fa "uint32_t val" +.Fa "int width" +.Fc +.Ft uint32_t +.Fn pcie_read_config "device_t dev" "int reg" "int width" +.Ft void +.Fn pcie_write_config "device_t dev" "int reg" "uint32_t val" "int width" .In dev/pci/pci_iov.h .Ft int .Fn pci_iov_attach "device_t dev" "nvlist_t *pf_schema" "nvlist_t *vf_schema" @@ -159,6 +174,48 @@ with .Fa width specifying the size of the access. .Pp +The +.Fn pcie_adjust_config +function is used to modify the value of a register in the PCI-express +capability register set of device +.Fa dev . +The offset +.Fa reg +specifies a relative offset in the register set with +.Fa width +specifying the size of the access. +The new value of the register is computed by modifying bits set in +.Fa mask +to the value in +.Fa val . +Any bits not specified in +.Fa mask +are preserved. +The previous value of the register is returned. +.Pp +The +.Fn pcie_read_config +function is used to read the value of a register in the PCI-express +capability register set of device +.Fa dev . +The offset +.Fa reg +specifies a relative offset in the register set with +.Fa width +specifying the size of the access. +.Pp +The +.Fn pcie_write_config +function is used to write the value +.Fa val +to a register in the PCI-express capability register set of device +.Fa dev . +The offset +.Fa reg +specifies a relative offset in the register set with +.Fa width +specifying the size of the access. +.Pp .Em NOTE : Device drivers should only use these functions for functionality that is not available via another Modified: head/sys/dev/pci/pci.c == --- head/sys/dev/pci/pci.c Thu Nov 5 21:22:23 2015(r290413) +++ head/sys/dev/pci/pci.c Thu Nov 5 21:26:06 2015(r290414) @@ -1917,6 +1917,63 @@ pci_set_max_read_req(device_t dev, int s return (size); } +uint32_t +pcie_read_config(device_t dev, int reg, int width) +{ + struct pci_devinfo *dinfo = device_get_ivars(dev); + int cap; + + cap = dinfo->cfg.pcie.pcie_location; + if (cap == 0) { + if (width == 2) + return (0x); + return (0x); + } + + return (pci_read_config(dev, cap + reg, width)); +} + +void +pcie_write_config(device_t dev, int reg, uint32_t value, int width) +{ + struct pci_devinfo *dinfo = device_get_ivars(dev); + int cap; + + cap = dinfo->cfg.pcie.pcie_location; + if (cap == 0) + return; + pci_write_config(dev, cap + reg, value, width);
svn commit: r290423 - head
Author: bdrewery Date: Thu Nov 5 22:09:00 2015 New Revision: 290423 URL: https://svnweb.freebsd.org/changeset/base/290423 Log: Allow 'make buildenv' to default to the caller's shell by using SHELL. Also pass BUILDENV=1 into the sub-shell to allow modifying PS1 in .profile such as: if [ -n "${BUILDENV}" ]; then PS1="(buildenv) ${PS1}" fi SHELL defaults to 'sh' in share/mk/sys.mk, but is typically passed down by the shell invoking make as well. Rather than forcing all 'buildenv' users to use plain /bin/sh, let them use their favorite shell. MFC after:2 weeks Sponsored by: EMC / Isilon Storage Division Discussed with: imp Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Nov 5 22:03:42 2015(r290422) +++ head/Makefile.inc1 Thu Nov 5 22:09:00 2015(r290423) @@ -27,7 +27,7 @@ # when NO_ROOT is set. (default: ${DESTDIR}/METALOG) # TARGET="machine" to crossbuild world for a different machine type # TARGET_ARCH= may be required when a TARGET supports multiple endians -# BUILDENV_SHELL= shell to launch for the buildenv target (def:/bin/sh) +# BUILDENV_SHELL= shell to launch for the buildenv target (def:${SHELL}) # WORLD_FLAGS= additional flags to pass to make(1) during buildworld # KERNEL_FLAGS= additional flags to pass to make(1) during buildkernel # SUBDIR_OVERRIDE="list of dirs" to build rather than everything. @@ -145,7 +145,7 @@ CLEANDIR= cleandir LOCAL_TOOL_DIRS?= -BUILDENV_SHELL?=/bin/sh +BUILDENV_SHELL?=${SHELL} SVN?= /usr/local/bin/svn SVNFLAGS?= -r HEAD @@ -783,7 +783,7 @@ buildenvvars: .endif buildenv: @echo Entering world for ${TARGET_ARCH}:${TARGET} - @cd ${.CURDIR} && env ${WMAKEENV} ${BUILDENV_SHELL} || true + @cd ${.CURDIR} && env ${WMAKEENV} BUILDENV=1 ${BUILDENV_SHELL} || true TOOLCHAIN_TGTS=${WMAKE_TGTS:N_depend:Neverything:Nbuild32} toolchain: ${TOOLCHAIN_TGTS} ___ 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-unsubscr...@freebsd.org"
svn commit: r290433 - in head: share/mk sys/conf tools/build/options
Author: bdrewery Date: Fri Nov 6 04:45:29 2015 New Revision: 290433 URL: https://svnweb.freebsd.org/changeset/base/290433 Log: Add a FAST_DEPEND option, off by default, which speeds up the build significantly. This speeds up buildworld by 16% on my system and buildkernel by 35%. Rather than calling mkdep(1), which is just a wrapper around 'cc -E', use the modern -MD -MT -MF flags to gather and generate dependencies during compilation. This flag was introduced in GCC "a long time ago", in GCC 3.0, and is also supported by Clang. (It appears that ICC also supports this but I do not have access to test it). This avoids running the preprocessor *twice* for every build, in both 'make depend' and 'make all'. This is especially noticeable when using ccache since it does not cache preprocessor results from mkdep(1) / 'cc -E', but still speeds up compilation with the -MD flags. For 'make depend' a tree-walk is still done to ensure that all DPSRCS are generated when expected, and that beforedepend/afterdepend and _EXTRADEPEND are all still respected. In time this may change but for now I've been conservative. The time for a tree-walk with -j combined with SUBDIR_PARALLEL is not significant. For example, it takes about 9 seconds with -j15 to walk all of src/ for 'make depend' now on my system. A .depend file is still generated with the various rules that apply to the final target, or custom rules. Otherwise there are now per-built-object-file .depend files, such as .depend.filename.o. These are included directly by make rather than populating .depend with a loop and .depend lines, which only added overhead to the now almost-NOP 'make depend' phase. Before this I experimented with having mkdep(1) called in parallel per-file. While this improved the kernel and lib/libc 'make depend' phase, it resulted in slower build times overall. The -M flags are removed from CFLAGS when linking since they have no effect. Enabling this by default, for src or out-of-src, can be done once more testing has been done, such as a ports exp-run, and with more compilers. The system I used for testing was: WITNESS Build options: -j20 WITH_LLDB=yes WITH_DEBUG_FILES=yes WITH_FAST_DEPEND=yes DISK: ZFS 3-way mirror with very slow disks using SSD l2arc/log. The arc was fully populated with src tree files. RAM: 76GiB CPU: Intel(R) Xeon(R) CPU L5520 @2.27GHz 2 package(s) x 4 core(s) x 2 SMT threads = hw.ncpu=16 buildworld: x buildworld-before + buildworld-fastdep +---+ |+ | |+ | |+ xx x| | |_MA___|| |A | +---+ N Min MaxMedian AvgStddev x 3 3744.13 3794.31 3752.25 3763.5633 26.935139 + 3 3153.34 3155.163154.2 3154.23330.91045776 Difference at 95.0% confidence -609.33 +/- 43.1943 -16.1902% +/- 1.1477% (Student's t, pooled s = 19.0569) buildkernel: x buildkernel-before + buildkernel-fastdep +---+ |+ x | |++ xx| | A|| |A| | +---+ N Min MaxMedian AvgStddev x 3571.57573.94571.79 572.4 1.3094401 + 3369.12370.57 369.3 369.663330.79033748 Difference at 95.0% confidence -202.77 +/- 2.45131 -35.4225% +/- 0.428227% (Student's t, pooled s = 1.0815) Sponsored by: EMC / Isilon Storage Division MFC after:3 weeks Relnotes: yes Added: head/tools/build/options/WITH_FAST_DEPEND (contents, props changed) Modified: head/share/mk/bsd.dep.mk head/share/mk/bsd.lib.mk head/share/mk/bsd.opts.mk head/share/mk/bsd.prog.mk head/sys/conf/kern.opts.mk head/sys/conf/kern.post.mk Modified: head/share/mk/bsd.dep.mk
svn commit: r290434 - head/sys/powerpc/powerpc
Author: jhibbits Date: Fri Nov 6 04:56:52 2015 New Revision: 290434 URL: https://svnweb.freebsd.org/changeset/base/290434 Log: Write 2- and 4-byte aligned values as single writes in ddb(4) On the mpc85xx SoC family, writes to any part of a word in the CCSR affect the full word. This prevents single-byte writes from taking the desired effect. Code copied directly from ARM. Modified: head/sys/powerpc/powerpc/db_interface.c Modified: head/sys/powerpc/powerpc/db_interface.c == --- head/sys/powerpc/powerpc/db_interface.c Fri Nov 6 04:45:29 2015 (r290433) +++ head/sys/powerpc/powerpc/db_interface.c Fri Nov 6 04:56:52 2015 (r290434) @@ -67,8 +67,14 @@ db_write_bytes(vm_offset_t addr, size_t dst = (char *)addr; cnt = size; - while (cnt-- > 0) - *dst++ = *data++; + if (size == 4 && (addr & 3) == 0 && ((uintptr_t)data & 3) == 0) + *((int*)dst) = *((int*)data); + else + if (size == 2 && (addr & 1) == 0 && ((uintptr_t)data & 1) == 0) + *((short*)dst) = *((short*)data); + else + while (cnt-- > 0) + *dst++ = *data++; kdb_cpu_sync_icache((void *)addr, size); } (void)kdb_jmpbuf(prev_jb); ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r290433 - in head: share/mk sys/conf tools/build/options
On 11/5/15 8:59 PM, Dmitry Sivachenko wrote: > >> On 06 Nov 2015, at 07:45, Bryan Drewerywrote: >> >> Author: bdrewery >> Date: Fri Nov 6 04:45:29 2015 >> New Revision: 290433 >> URL: https://svnweb.freebsd.org/changeset/base/290433 >> >> Log: >> Add a FAST_DEPEND option, off by default, which speeds up the build >> significantly. >> > > > Well, if it just a speedup, what is the reason to introduce a new option for > that? > "Enabling this by default, for src or out-of-src, can be done once more testing has been done, such as a ports exp-run, and with more compilers." -- Regards, Bryan Drewery ___ 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-unsubscr...@freebsd.org"
svn commit: r290435 - head/tools/build/options
Author: bdrewery Date: Fri Nov 6 05:28:08 2015 New Revision: 290435 URL: https://svnweb.freebsd.org/changeset/base/290435 Log: Don't allow environment-set options to bleed into src.conf.5 generation. MFC after:2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/tools/build/options/makeman Modified: head/tools/build/options/makeman == --- head/tools/build/options/makemanFri Nov 6 04:56:52 2015 (r290434) +++ head/tools/build/options/makemanFri Nov 6 05:28:08 2015 (r290435) @@ -33,7 +33,7 @@ show_options() ALL_TARGETS=$(echo $(${make} targets | tail -n +2)) rm -f $t/settings for target in ${ALL_TARGETS} ; do - ${make} showconfig \ + env -i ${make} showconfig \ SRC_ENV_CONF=/dev/null SRCCONF=/dev/null \ __MAKE_CONF=/dev/null \ TARGET_ARCH=${target#*/} TARGET=${target%/*} | @@ -97,7 +97,7 @@ show() exit 1 ;; esac - ${make} .MAKE.MODE=normal "$@" showconfig __MAKE_CONF=/dev/null \ + env -i ${make} .MAKE.MODE=normal "$@" showconfig __MAKE_CONF=/dev/null \ SRCCONF=/dev/null | while read var _ val ; do opt=${var#MK_} ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r290433 - in head: share/mk sys/conf tools/build/options
> 6 нояб. 2015 г., в 8:00, Bryan Dreweryнаписал(а): > >> On 11/5/15 8:59 PM, Dmitry Sivachenko wrote: >> >>> On 06 Nov 2015, at 07:45, Bryan Drewery wrote: >>> >>> Author: bdrewery >>> Date: Fri Nov 6 04:45:29 2015 >>> New Revision: 290433 >>> URL: https://svnweb.freebsd.org/changeset/base/290433 >>> >>> Log: >>> Add a FAST_DEPEND option, off by default, which speeds up the build >>> significantly. >> >> >> Well, if it just a speedup, what is the reason to introduce a new option for >> that? > > "Enabling this by default, for src or out-of-src, can be done once more > testing has been done, such as a ports exp-run, and with more compilers." Well, this is what -current is for. Just let it settle longer before MFC. ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r290433 - in head: share/mk sys/conf tools/build/options
> On 06 Nov 2015, at 07:45, Bryan Drewerywrote: > > Author: bdrewery > Date: Fri Nov 6 04:45:29 2015 > New Revision: 290433 > URL: https://svnweb.freebsd.org/changeset/base/290433 > > Log: > Add a FAST_DEPEND option, off by default, which speeds up the build > significantly. > Well, if it just a speedup, what is the reason to introduce a new option for that? ___ 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-unsubscr...@freebsd.org"
svn commit: r290436 - head/share/man/man5
Author: bdrewery Date: Fri Nov 6 05:32:18 2015 New Revision: 290436 URL: https://svnweb.freebsd.org/changeset/base/290436 Log: Regenerate for WITH_FAST_DEPEND in r290433. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Fri Nov 6 05:28:08 2015 (r290435) +++ head/share/man/man5/src.conf.5 Fri Nov 6 05:32:18 2015 (r290436) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: head/tools/build/options/makeman 287942 2015-09-17 22:04:46Z bdrewery +.\" from FreeBSD: head/tools/build/options/makeman 290435 2015-11-06 05:28:08Z bdrewery .\" $FreeBSD$ -.Dd September 18, 2015 +.Dd November 5, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -484,6 +484,14 @@ arm64/aarch64. .\" from FreeBSD: head/tools/build/options/WITHOUT_EXAMPLES 156938 2006-03-21 09:06:24Z ru Set to avoid installing examples to .Pa /usr/share/examples/ . +.It Va WITH_FAST_DEPEND +.\" from FreeBSD: head/tools/build/options/WITH_FAST_DEPEND 290433 2015-11-06 04:45:29Z bdrewery +Set to generate +.Sy .depend +files in the build during compilation instead of the +historial +.Xr mkdep 1 +call during the "make depend" phase. .It Va WITHOUT_FDT .\" from FreeBSD: head/tools/build/options/WITHOUT_FDT 221539 2011-05-06 19:10:27Z ru Set to not build Flattened Device Tree support as part of the base system. ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r290435 - head/tools/build/options
Thank you > On Nov 5, 2015, at 21:28, Bryan Drewerywrote: > > Author: bdrewery > Date: Fri Nov 6 05:28:08 2015 > New Revision: 290435 > URL: https://svnweb.freebsd.org/changeset/base/290435 > > Log: > Don't allow environment-set options to bleed into src.conf.5 generation. > > MFC after:2 weeks > Sponsored by:EMC / Isilon Storage Division > > Modified: > head/tools/build/options/makeman > > Modified: head/tools/build/options/makeman > == > --- head/tools/build/options/makemanFri Nov 6 04:56:52 2015(r290434) > +++ head/tools/build/options/makemanFri Nov 6 05:28:08 2015(r290435) > @@ -33,7 +33,7 @@ show_options() >ALL_TARGETS=$(echo $(${make} targets | tail -n +2)) >rm -f $t/settings >for target in ${ALL_TARGETS} ; do > -${make} showconfig \ > +env -i ${make} showconfig \ >SRC_ENV_CONF=/dev/null SRCCONF=/dev/null \ >__MAKE_CONF=/dev/null \ >TARGET_ARCH=${target#*/} TARGET=${target%/*} | > @@ -97,7 +97,7 @@ show() >exit 1 >;; >esac > -${make} .MAKE.MODE=normal "$@" showconfig __MAKE_CONF=/dev/null \ > +env -i ${make} .MAKE.MODE=normal "$@" showconfig __MAKE_CONF=/dev/null \ >SRCCONF=/dev/null | >while read var _ val ; do >opt=${var#MK_} > ___ 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-unsubscr...@freebsd.org"
svn commit: r290432 - head/sys/dev/otus
Author: adrian Date: Fri Nov 6 03:09:26 2015 New Revision: 290432 URL: https://svnweb.freebsd.org/changeset/base/290432 Log: otus(4) - add flags for RX filter, configuration and sniffer. Obtained from:Linux carl9170 Modified: head/sys/dev/otus/if_otusreg.h Modified: head/sys/dev/otus/if_otusreg.h == --- head/sys/dev/otus/if_otusreg.h Fri Nov 6 00:06:10 2015 (r290431) +++ head/sys/dev/otus/if_otusreg.h Fri Nov 6 03:09:26 2015 (r290432) @@ -59,6 +59,8 @@ #define AR_MAC_REG_RX_PE_DELAY (AR_MAC_REG_BASE + 0x64c) #define AR_MAC_REG_DYNAMIC_SIFS_ACK(AR_MAC_REG_BASE + 0x658) #define AR_MAC_REG_SNIFFER (AR_MAC_REG_BASE + 0x674) +#define AR_MAC_SNIFFER_DEFAULTS0x0200 +#define AR_MAC_SNIFFER_ENABLE_PROMISC 0x1 #define AR_MAC_REG_ENCRYPTION (AR_MAC_REG_BASE + 0x678) #define AR_MAC_REG_MISC_680(AR_MAC_REG_BASE + 0x680) #define AR_MAC_REG_FRAMETYPE_FILTER(AR_MAC_REG_BASE + 0x68c) @@ -69,6 +71,11 @@ #define AR_MAC_REG_BUSY_EXT(AR_MAC_REG_BASE + 0x6ec) #define AR_MAC_REG_SLOT_TIME (AR_MAC_REG_BASE + 0x6f0) #define AR_MAC_REG_CAM_MODE(AR_MAC_REG_BASE + 0x700) +#define AR_MAC_CAM_DEFAULTS(0xf << 24) +#define AR_MAC_CAM_IBSS0xe0 +#define AR_MAC_CAM_AP 0xa1 +#define AR_MAC_CAM_STA 0x2 +#define AR_MAC_CAM_AP_WDS 0x3 #define AR_MAC_REG_AC0_CW (AR_MAC_REG_BASE + 0xb00) #define AR_MAC_REG_AC1_CW (AR_MAC_REG_BASE + 0xb04) #define AR_MAC_REG_AC2_CW (AR_MAC_REG_BASE + 0xb08) @@ -86,6 +93,12 @@ #define AR_MAC_REG_AMPDU_FACTOR(AR_MAC_REG_BASE + 0xb9c) #define AR_MAC_REG_FCS_SELECT (AR_MAC_REG_BASE + 0xbb0) #define AR_MAC_REG_RX_CONTROL (AR_MAC_REG_BASE + 0xc40) +#define AR_MAC_RX_CTRL_DEAGG 0x1 +#define AR_MAC_RX_CTRL_SHORT_FILTER0x2 +#define AR_MAC_RX_CTRL_SA_DA_SEARCH0x20 +#define AR_MAC_RX_CTRL_PASS_TO_HOST(1 << 28) +#define AR_MAC_RX_CTRL_ACK_IN_SNIFFER (1 << 30) + #define AR_MAC_REG_AMPDU_RX_THRESH (AR_MAC_REG_BASE + 0xc50) #define AR_MAC_REG_OFDM_PHY_ERRORS (AR_MAC_REG_BASE + 0xcb4) #define AR_MAC_REG_CCK_PHY_ERRORS (AR_MAC_REG_BASE + 0xcb8) ___ 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-unsubscr...@freebsd.org"
svn commit: r290394 - in head: include sys/sys
Author: pfg Date: Thu Nov 5 14:55:58 2015 New Revision: 290394 URL: https://svnweb.freebsd.org/changeset/base/290394 Log: Rename __sentinel to __null_sentinel GCC 5 uses a conflicting __sentinel definition in include/c++/bits/stl_algo.h Reported by: matteo Modified: head/include/unistd.h head/sys/sys/cdefs.h Modified: head/include/unistd.h == --- head/include/unistd.h Thu Nov 5 14:37:17 2015(r290393) +++ head/include/unistd.h Thu Nov 5 14:55:58 2015(r290394) @@ -327,9 +327,9 @@ int close(int); voidclosefrom(int); int dup(int); int dup2(int, int); -int execl(const char *, const char *, ...) __sentinel; +int execl(const char *, const char *, ...) __null_sentinel; int execle(const char *, const char *, ...); -int execlp(const char *, const char *, ...) __sentinel; +int execlp(const char *, const char *, ...) __null_sentinel; int execv(const char *, char * const *); int execve(const char *, char * const *, char * const *); int execvp(const char *, char * const *); Modified: head/sys/sys/cdefs.h == --- head/sys/sys/cdefs.hThu Nov 5 14:37:17 2015(r290393) +++ head/sys/sys/cdefs.hThu Nov 5 14:55:58 2015(r290394) @@ -459,11 +459,11 @@ #endif #if __GNUC_PREREQ__(4, 0) -#define__sentinel __attribute__((__sentinel__)) +#define__null_sentinel __attribute__((__sentinel__)) #define__exported __attribute__((__visibility__("default"))) #define__hidden__attribute__((__visibility__("hidden"))) #else -#define__sentinel +#define__null_sentinel #define__exported #define__hidden #endif ___ 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-unsubscr...@freebsd.org"