Re: svn commit: r304510 - head/sys/dev/ixl
It's weird that the gcc message is mentioning "ixlv_media_change", but I'll do something about it shortly. On Wed, Aug 31, 2016 at 2:16 PM Dimitry Andricwrote: > On 31 Aug 2016, at 18:53, Ed Maste wrote: > > > > On 19 August 2016 at 20:08, Eric Joyner wrote: > >> Author: erj > >> Date: Sat Aug 20 00:08:10 2016 > >> New Revision: 304510 > >> URL: https://svnweb.freebsd.org/changeset/base/304510 > >> > >> Log: > >> ixlv(4): Fix ixlv(4) not loading when loaded as a kernel module and > netmap is enabled. > > > > I did not confirm it's this commit, but kernel builds currently have > > this warning: > > > > if_ixlv.o: warning: common of `ixl_crcstrip' overridden by definition > > if_ixl.o: warning: defined here > > if_ixlv.o: warning: multiple common of `ixl_rx_miss' > > if_ixl.o: warning: previous common is here > > if_ixlv.o: warning: multiple common of `ixl_rx_miss_bufs' > > if_ixl.o: warning: previous common is here > > Interestingly, with the external gcc build, it is even an error: > > --- kernel.full --- > linking kernel.full > if_ixlv.o:(.bss+0x0): multiple definition of `ixl_crcstrip' > if_ixl.o:(.data+0xb8): first defined here > if_ixlv.o: In function `ixlv_media_change': > /builds/FreeBSD_HEAD_amd64_gcc/sys/dev/ixl/if_ixlv.c:2252: multiple > definition of `ixl_rx_miss_bufs' > if_ixl.o:/builds/FreeBSD_HEAD_amd64_gcc/sys/dev/ixl/if_ixl.c:680: first > defined here > if_ixlv.o: In function `ixlv_media_change': > /builds/FreeBSD_HEAD_amd64_gcc/sys/dev/ixl/if_ixlv.c:2262: multiple > definition of `ixl_rx_miss' > if_ixl.o:/builds/FreeBSD_HEAD_amd64_gcc/sys/dev/ixl/if_ixl.c:681: first > defined here > *** [kernel.full] Error code 1 > > See e.g. > https://jenkins.freebsd.org/job/FreeBSD_HEAD_amd64_gcc/1505/console > > -Dimitry > > ___ 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: r305171 - head/sys/kern
Author: emaste Date: Thu Sep 1 02:51:50 2016 New Revision: 305171 URL: https://svnweb.freebsd.org/changeset/base/305171 Log: allow kern.proc.nfds sysctl in capability mode Reviewed by: allanjude MFC after:1 week Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D7733 Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c == --- head/sys/kern/kern_descrip.cThu Sep 1 02:42:11 2016 (r305170) +++ head/sys/kern/kern_descrip.cThu Sep 1 02:51:50 2016 (r305171) @@ -3178,7 +3178,7 @@ sysctl_kern_proc_nfds(SYSCTL_HANDLER_ARG } static SYSCTL_NODE(_kern_proc, KERN_PROC_NFDS, nfds, -CTLFLAG_RD|CTLFLAG_MPSAFE, sysctl_kern_proc_nfds, +CTLFLAG_RD|CTLFLAG_CAPRD|CTLFLAG_MPSAFE, sysctl_kern_proc_nfds, "Number of open file descriptors"); /* ___ 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: r305170 - head/lib/atf/libatf-c
Author: ngie Date: Thu Sep 1 02:42:11 2016 New Revision: 305170 URL: https://svnweb.freebsd.org/changeset/base/305170 Log: Don't bake all of CC/CPP/CXX into CFLAGS Capture executable names for CC, CPP, CXX (assumed to be the first non-CCACHE_BIN word). This change strips out all of the cross-compiler arguments, (-target, -B, etc), added to ${CC}, etc via ${CROSSENV} in Makefile.inc1, so it doesn't infect the build and subsequently the test. Add comments noting why this logic is being added, and why the logic in r305041 was necessary/what it was trying to achieve. This is required after recent changes made to the toolchain to always specify --sysroot, -target, -B, etc with clang in buildworld (presumably r304681). Reviewed by: rodrigc (earlier version) Reported by: Jenkins (FreeBSD_HEAD job from 559+) MFC after:12 days X-MFC with: r304681, r305041 Sponsored by: EMC / Isilon Storage Division Differential Revision:https://reviews.freebsd.org/D7732 Modified: head/lib/atf/libatf-c/Makefile Modified: head/lib/atf/libatf-c/Makefile == --- head/lib/atf/libatf-c/Makefile Thu Sep 1 02:05:46 2016 (r305169) +++ head/lib/atf/libatf-c/Makefile Thu Sep 1 02:42:11 2016 (r305170) @@ -28,6 +28,18 @@ .include .include +# Store the toolchain executable in ATF_BUILD_{CC,CPP,CXX} to ensure other +# values -- like -target, -B ..., etc -- don't get leaked into the tests. +# +# Be sure to omit ${CCACHE_BIN} (if specified) from the variable as it gets +# automatically appended to the variables in bsd.compiler.mk when +# ${MK_CCACHE_BUILD} != no. +ATF_BUILD_CC:= ${CC:N${CCACHE_BIN}:[1]} +ATF_BUILD_CPP:=${CPP:N${CCACHE_BIN}:[1]} +ATF_BUILD_CXX:=${CXX:N${CCACHE_BIN}:[1]} + +# Only capture defines, includes, linker flags, optimization levels, warnings +# and preprocessor flags when building ATF_BUILD_{C,CPP,CXX}FLAGS. ATF_BUILD_CFLAGS:= ${CFLAGS:M-[DILOWf]*} ATF_BUILD_CPPFLAGS:= ${CPPFLAGS:M-[DILOWf]*} ATF_BUILD_CXXFLAGS:= ${CXXFLAGS:M-[DILOWf]*} @@ -41,11 +53,11 @@ ATF=${SRCTOP}/contrib/atf .PATH: ${ATF}/atf-c .PATH: ${ATF}/atf-c/detail -CFLAGS+= -DATF_BUILD_CC='"${CC}"' +CFLAGS+= -DATF_BUILD_CC='"${ATF_BUILD_CC}"' CFLAGS+= -DATF_BUILD_CFLAGS='"${ATF_BUILD_CFLAGS}"' -CFLAGS+= -DATF_BUILD_CPP='"${CPP}"' +CFLAGS+= -DATF_BUILD_CPP='"${ATF_BUILD_CPP}"' CFLAGS+= -DATF_BUILD_CPPFLAGS='"${ATF_BUILD_CPPFLAGS}"' -CFLAGS+= -DATF_BUILD_CXX='"${CXX}"' +CFLAGS+= -DATF_BUILD_CXX='"${ATF_BUILD_CXX}"' CFLAGS+= -DATF_BUILD_CXXFLAGS='"${ATF_BUILD_CXXFLAGS}"' CFLAGS+= -I${ATF} CFLAGS+= -I${.CURDIR} ___ 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: r301752 - head/contrib/netbsd-tests/lib/libc/string
> On Aug 31, 2016, at 7:11 PM, Craig Rodrigueswrote: > > Ngie, > > Can you please MFC this to stable/10 branch? > I believe this has been causing a test failure in this branch > since June. Shoot — I’ll verify the issue and commit the change. Thanks, -Ngie ___ 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: r301752 - head/contrib/netbsd-tests/lib/libc/string
Ngie, Can you please MFC this to stable/10 branch? I believe this has been causing a test failure in this branch since June. Thanks. -- Craig On Thu, Jun 9, 2016 at 11:35 AM, Garrett Cooperwrote: > Author: ngie > Date: Thu Jun 9 18:35:37 2016 > New Revision: 301752 > URL: https://svnweb.freebsd.org/changeset/base/301752 > > Log: > Update `goodResult` after recent changes made to the PRNG in libc > > The PRNG was changed in r300953/r300956, and subsequently, the numbers > generated have changed. This is expected ABI breakage per ache > > X-MFC with: r300953, r300956 > Tested with: amd64, i386 > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/contrib/netbsd-tests/lib/libc/string/t_memcpy.c > > Modified: head/contrib/netbsd-tests/lib/libc/string/t_memcpy.c > > == > --- head/contrib/netbsd-tests/lib/libc/string/t_memcpy.cThu Jun > 9 18:27:41 2016(r301751) > +++ head/contrib/netbsd-tests/lib/libc/string/t_memcpy.cThu Jun > 9 18:35:37 2016(r301752) > @@ -54,7 +54,7 @@ char result[100]; > #ifdef __NetBSD__ > const char goodResult[] = "7b405d24bc03195474c70ddae9e1f8fb"; > #else > -const char goodResult[] = "217b4fbe456916bf62a2f85df752e4ab"; > +const char goodResult[] = "5ab4443f0e3e058d94087d9f2a11ef5e"; > #endif > > static 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: r305169 - head/sys/kern
Author: pkelsey Date: Thu Sep 1 02:05:46 2016 New Revision: 305169 URL: https://svnweb.freebsd.org/changeset/base/305169 Log: _taskqueue_start_threads() now fails if it doesn't actually start any threads. Reviewed by: jhb MFC after:1 week Differential Revision:https://reviews.freebsd.org/D7701 Modified: head/sys/kern/subr_taskqueue.c Modified: head/sys/kern/subr_taskqueue.c == --- head/sys/kern/subr_taskqueue.c Thu Sep 1 01:08:18 2016 (r305168) +++ head/sys/kern/subr_taskqueue.c Thu Sep 1 02:05:46 2016 (r305169) @@ -625,6 +625,11 @@ _taskqueue_start_threads(struct taskqueu } else tq->tq_tcount++; } + if (tq->tq_tcount == 0) { + free(tq->tq_threads, M_TASKQUEUE); + tq->tq_threads = NULL; + return (ENOMEM); + } for (i = 0; i < count; i++) { if (tq->tq_threads[i] == NULL) continue; ___ 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: r305168 - in head/sys/dev: ixl netmap
Author: erj Date: Thu Sep 1 01:08:18 2016 New Revision: 305168 URL: https://svnweb.freebsd.org/changeset/base/305168 Log: Fix linker warnings (errors on gcc) that resulted from r304510. The variables that are extern in the netmap header file should be defined in ixl_txrx.c (the file that is included in both ixl(4)/ixlv(4), not in the main driver source files. Reported by: ed@, dim@, ngie@ Modified: head/sys/dev/ixl/if_ixlv.c head/sys/dev/ixl/ixl_txrx.c head/sys/dev/netmap/if_ixl_netmap.h Modified: head/sys/dev/ixl/if_ixlv.c == --- head/sys/dev/ixl/if_ixlv.c Thu Sep 1 00:51:59 2016(r305167) +++ head/sys/dev/ixl/if_ixlv.c Thu Sep 1 01:08:18 2016(r305168) @@ -217,11 +217,6 @@ TUNABLE_INT("hw.ixlv.tx_itr", _tx_i SYSCTL_INT(_hw_ixlv, OID_AUTO, tx_itr, CTLFLAG_RDTUN, _tx_itr, 0, "TX Interrupt Rate"); -/* Fix when building as a standalone module when netmap is enabled */ -#if defined(DEV_NETMAP) && !defined(NETMAP_IXL_MAIN) -int ixl_rx_miss, ixl_rx_miss_bufs, ixl_crcstrip; -#endif - /* * Device identification routine * Modified: head/sys/dev/ixl/ixl_txrx.c == --- head/sys/dev/ixl/ixl_txrx.c Thu Sep 1 00:51:59 2016(r305167) +++ head/sys/dev/ixl/ixl_txrx.c Thu Sep 1 01:08:18 2016(r305168) @@ -69,6 +69,7 @@ static inline u32 ixl_get_tx_head(struct #ifdef DEV_NETMAP #include +int ixl_rx_miss, ixl_rx_miss_bufs, ixl_crcstrip = 1; #endif /* DEV_NETMAP */ /* Modified: head/sys/dev/netmap/if_ixl_netmap.h == --- head/sys/dev/netmap/if_ixl_netmap.h Thu Sep 1 00:51:59 2016 (r305167) +++ head/sys/dev/netmap/if_ixl_netmap.h Thu Sep 1 01:08:18 2016 (r305168) @@ -71,7 +71,6 @@ SYSCTL_DECL(_dev_netmap); /* * The xl driver by default strips CRCs and we do not override it. */ -int ixl_rx_miss, ixl_rx_miss_bufs, ixl_crcstrip = 1; #if 0 SYSCTL_INT(_dev_netmap, OID_AUTO, ixl_crcstrip, CTLFLAG_RW, _crcstrip, 1, "strip CRC on rx frames"); ___ 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: r305167 - head/sys/dev/cxgbe/tom
Author: np Date: Thu Sep 1 00:51:59 2016 New Revision: 305167 URL: https://svnweb.freebsd.org/changeset/base/305167 Log: cxgbe/t4_tom: Two new routines to allocate and write page pods for a buffer in the kernel's address space. Modified: head/sys/dev/cxgbe/tom/t4_ddp.c head/sys/dev/cxgbe/tom/t4_tom.h Modified: head/sys/dev/cxgbe/tom/t4_ddp.c == --- head/sys/dev/cxgbe/tom/t4_ddp.c Wed Aug 31 23:23:46 2016 (r305166) +++ head/sys/dev/cxgbe/tom/t4_ddp.c Thu Sep 1 00:51:59 2016 (r305167) @@ -936,6 +936,64 @@ have_pgsz: return (1); } +int +t4_alloc_page_pods_for_buf(struct ppod_region *pr, vm_offset_t buf, int len, +struct ppod_reservation *prsv) +{ + int hcf, seglen, idx, npages, nppods; + uintptr_t start_pva, end_pva, pva, p1; + + MPASS(buf > 0); + MPASS(len > 0); + + /* +* The DDP page size is unrelated to the VM page size. We combine +* contiguous physical pages into larger segments to get the best DDP +* page size possible. This is the largest of the four sizes in +* A_ULP_RX_ISCSI_PSZ that evenly divides the HCF of the segment sizes +* in the page list. +*/ + hcf = 0; + start_pva = trunc_page(buf); + end_pva = trunc_page(buf + len - 1); + pva = start_pva; + while (pva <= end_pva) { + seglen = PAGE_SIZE; + p1 = pmap_kextract(pva); + pva += PAGE_SIZE; + while (pva <= end_pva && p1 + seglen == pmap_kextract(pva)) { + seglen += PAGE_SIZE; + pva += PAGE_SIZE; + } + + hcf = calculate_hcf(hcf, seglen); + if (hcf < (1 << pr->pr_page_shift[1])) { + idx = 0; + goto have_pgsz; /* give up, short circuit */ + } + } + +#define PR_PAGE_MASK(x) ((1 << pr->pr_page_shift[(x)]) - 1) + MPASS((hcf & PR_PAGE_MASK(0)) == 0); /* PAGE_SIZE is >= 4K everywhere */ + for (idx = nitems(pr->pr_page_shift) - 1; idx > 0; idx--) { + if ((hcf & PR_PAGE_MASK(idx)) == 0) + break; + } +#undef PR_PAGE_MASK + +have_pgsz: + MPASS(idx <= M_PPOD_PGSZ); + + npages = 1; + npages += (end_pva - start_pva) >> pr->pr_page_shift[idx]; + nppods = howmany(npages, PPOD_PAGES); + if (alloc_page_pods(pr, nppods, idx, prsv) != 0) + return (ENOMEM); + MPASS(prsv->prsv_nppods > 0); + + return (0); +} + void t4_free_page_pods(struct ppod_reservation *prsv) { @@ -1036,6 +1094,94 @@ t4_write_page_pods_for_ps(struct adapter return (0); } +int +t4_write_page_pods_for_buf(struct adapter *sc, struct sge_wrq *wrq, int tid, +struct ppod_reservation *prsv, vm_offset_t buf, int buflen) +{ + struct wrqe *wr; + struct ulp_mem_io *ulpmc; + struct ulptx_idata *ulpsc; + struct pagepod *ppod; + int i, j, k, n, chunk, len, ddp_pgsz; + u_int ppod_addr, offset; + uint32_t cmd; + struct ppod_region *pr = prsv->prsv_pr; + uintptr_t end_pva, pva, pa; + + cmd = htobe32(V_ULPTX_CMD(ULP_TX_MEM_WRITE)); + if (is_t4(sc)) + cmd |= htobe32(F_ULP_MEMIO_ORDER); + else + cmd |= htobe32(F_T5_ULP_MEMIO_IMM); + ddp_pgsz = 1 << pr->pr_page_shift[G_PPOD_PGSZ(prsv->prsv_tag)]; + offset = buf & PAGE_MASK; + ppod_addr = pr->pr_start + (prsv->prsv_tag & pr->pr_tag_mask); + pva = trunc_page(buf); + end_pva = trunc_page(buf + buflen - 1); + for (i = 0; i < prsv->prsv_nppods; ppod_addr += chunk) { + + /* How many page pods are we writing in this cycle */ + n = min(prsv->prsv_nppods - i, NUM_ULP_TX_SC_IMM_PPODS); + MPASS(n > 0); + chunk = PPOD_SZ(n); + len = roundup2(sizeof(*ulpmc) + sizeof(*ulpsc) + chunk, 16); + + wr = alloc_wrqe(len, wrq); + if (wr == NULL) + return (ENOMEM);/* ok to just bail out */ + ulpmc = wrtod(wr); + + INIT_ULPTX_WR(ulpmc, len, 0, 0); + ulpmc->cmd = cmd; + ulpmc->dlen = htobe32(V_ULP_MEMIO_DATA_LEN(chunk / 32)); + ulpmc->len16 = htobe32(howmany(len - sizeof(ulpmc->wr), 16)); + ulpmc->lock_addr = htobe32(V_ULP_MEMIO_ADDR(ppod_addr >> 5)); + + ulpsc = (struct ulptx_idata *)(ulpmc + 1); + ulpsc->cmd_more = htobe32(V_ULPTX_CMD(ULP_TX_SC_IMM)); + ulpsc->len = htobe32(chunk); + + ppod = (struct pagepod *)(ulpsc + 1); + for (j = 0; j < n; i++, j++, ppod++) { + ppod->vld_tid_pgsz_tag_color = htobe64(F_PPOD_VALID | + V_PPOD_TID(tid) | +
svn commit: r305166 - in head/sys/dev/cxgbe: cxgbei tom
Author: np Date: Wed Aug 31 23:23:46 2016 New Revision: 305166 URL: https://svnweb.freebsd.org/changeset/base/305166 Log: cxgbe/t4_tom: Add general purpose routines to deal with page pod regions and allocations within them. Switch to these routines to manage the TOE DDP region. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.c head/sys/dev/cxgbe/tom/t4_ddp.c head/sys/dev/cxgbe/tom/t4_tom.c head/sys/dev/cxgbe/tom/t4_tom.h Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.c == --- head/sys/dev/cxgbe/cxgbei/cxgbei.c Wed Aug 31 22:18:50 2016 (r305165) +++ head/sys/dev/cxgbe/cxgbei/cxgbei.c Wed Aug 31 23:23:46 2016 (r305166) @@ -157,7 +157,6 @@ ulp_mem_io_set_hdr(struct adapter *sc, i idata->len = htonl(dlen); } -#define PPOD_SIZE sizeof(struct pagepod) #define ULPMEM_IDATA_MAX_NPPODS 1 /* 256/PPOD_SIZE */ #define PCIE_MEMWIN_MAX_NPPODS 16 /* 1024/PPOD_SIZE */ Modified: head/sys/dev/cxgbe/tom/t4_ddp.c == --- head/sys/dev/cxgbe/tom/t4_ddp.c Wed Aug 31 22:18:50 2016 (r305165) +++ head/sys/dev/cxgbe/tom/t4_ddp.c Wed Aug 31 23:23:46 2016 (r305166) @@ -85,44 +85,11 @@ static void ddp_complete_all(struct toep static void t4_aio_cancel_active(struct kaiocb *job); static void t4_aio_cancel_queued(struct kaiocb *job); -#define PPOD_SZ(n) ((n) * sizeof(struct pagepod)) -#define PPOD_SIZE (PPOD_SZ(1)) - static TAILQ_HEAD(, pageset) ddp_orphan_pagesets; static struct mtx ddp_orphan_pagesets_lock; static struct task ddp_orphan_task; #define MAX_DDP_BUFFER_SIZE(M_TCB_RX_DDP_BUF0_LEN) -static int -alloc_ppods(struct tom_data *td, int n, u_int *ppod_addr) -{ - vmem_addr_t v; - int rc; - - MPASS(n > 0); - - rc = vmem_alloc(td->ppod_arena, PPOD_SZ(n), M_NOWAIT | M_FIRSTFIT, ); - *ppod_addr = (u_int)v; - - return (rc); -} - -static void -free_ppods(struct tom_data *td, u_int ppod_addr, int n) -{ - - MPASS(n > 0); - - vmem_free(td->ppod_arena, (vmem_addr_t)ppod_addr, PPOD_SZ(n)); -} - -static inline int -pages_to_nppods(int npages, int ddp_pgsz) -{ - int nsegs = npages * PAGE_SIZE / ddp_pgsz; - - return (howmany(nsegs, PPOD_PAGES)); -} /* * A page set holds information about a buffer used for DDP. The page @@ -147,8 +114,8 @@ free_pageset(struct tom_data *td, struct vm_page_t p; int i; - if (ps->nppods > 0) - free_ppods(td, ps->ppod_addr, ps->nppods); + if (ps->prsv.prsv_nppods > 0) + t4_free_page_pods(>prsv); if (ps->flags & PS_WIRED) { for (i = 0; i < ps->npages; i++) { @@ -483,7 +450,7 @@ mk_update_tcb_for_ddp(struct adapter *sc ulpmc = mk_set_tcb_field_ulp(ulpmc, toep, W_TCB_RX_DDP_BUF0_TAG + db_idx, V_TCB_RX_DDP_BUF0_TAG(M_TCB_RX_DDP_BUF0_TAG), - V_TCB_RX_DDP_BUF0_TAG(ps->tag)); + V_TCB_RX_DDP_BUF0_TAG(ps->prsv.prsv_tag)); /* Update the current offset in the DDP buffer and its total length */ if (db_idx == 0) @@ -879,13 +846,52 @@ calculate_hcf(int n1, int n2) return (b); } +static inline int +pages_to_nppods(int npages, int ddp_page_shift) +{ + + MPASS(ddp_page_shift >= PAGE_SHIFT); + + return (howmany(npages >> (ddp_page_shift - PAGE_SHIFT), PPOD_PAGES)); +} + static int -alloc_page_pods(struct tom_data *td, struct pageset *ps) +alloc_page_pods(struct ppod_region *pr, u_int nppods, u_int pgsz_idx, +struct ppod_reservation *prsv) { - int i, hcf, seglen, idx, ppod, nppods; - u_int ppod_addr; + vmem_addr_t addr; /* relative to start of region */ + + if (vmem_alloc(pr->pr_arena, PPOD_SZ(nppods), M_NOWAIT | M_FIRSTFIT, + ) != 0) + return (ENOMEM); + + CTR5(KTR_CXGBE, "%-17s arena %p, addr 0x%08x, nppods %d, pgsz %d", + __func__, pr->pr_arena, (uint32_t)addr & pr->pr_tag_mask, + nppods, 1 << pr->pr_page_shift[pgsz_idx]); + + /* +* The hardware tagmask includes an extra invalid bit but the arena was +* seeded with valid values only. An allocation out of this arena will +* fit inside the tagmask but won't have the invalid bit set. +*/ + MPASS((addr & pr->pr_tag_mask) == addr); + MPASS((addr & pr->pr_invalid_bit) == 0); + + prsv->prsv_pr = pr; + prsv->prsv_tag = V_PPOD_PGSZ(pgsz_idx) | addr; + prsv->prsv_nppods = nppods; + + return (0); +} + +int +t4_alloc_page_pods_for_ps(struct ppod_region *pr, struct pageset *ps) +{ + int i, hcf, seglen, idx, nppods; + struct ppod_reservation *prsv = >prsv; - KASSERT(ps->nppods == 0, ("%s: page pods already allocated", __func__)); + KASSERT(prsv->prsv_nppods == 0, +
Re: svn commit: r304510 - head/sys/dev/ixl
On Wed, Aug 31, 2016 at 2:15 PM, Dimitry Andricwrote: ... > Interestingly, with the external gcc build, it is even an error: > > --- kernel.full --- > linking kernel.full > if_ixlv.o:(.bss+0x0): multiple definition of `ixl_crcstrip' > if_ixl.o:(.data+0xb8): first defined here > if_ixlv.o: In function `ixlv_media_change': > /builds/FreeBSD_HEAD_amd64_gcc/sys/dev/ixl/if_ixlv.c:2252: multiple > definition of `ixl_rx_miss_bufs' > if_ixl.o:/builds/FreeBSD_HEAD_amd64_gcc/sys/dev/ixl/if_ixl.c:680: first > defined here > if_ixlv.o: In function `ixlv_media_change': > /builds/FreeBSD_HEAD_amd64_gcc/sys/dev/ixl/if_ixlv.c:2262: multiple > definition of `ixl_rx_miss' > if_ixl.o:/builds/FreeBSD_HEAD_amd64_gcc/sys/dev/ixl/if_ixl.c:681: first > defined here > *** [kernel.full] Error code 1 > > See e.g. https://jenkins.freebsd.org/job/FreeBSD_HEAD_amd64_gcc/1505/console +1: linking kernel.full if_ixlv.o: warning: common of `ixl_crcstrip' overridden by definition if_ixl.o: warning: defined here if_ixlv.o: warning: multiple common of `ixl_rx_miss' if_ixl.o: warning: previous common is here if_ixlv.o: warning: multiple common of `ixl_rx_miss_bufs' if_ixl.o: warning: previous common is here ___ 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: r305165 - in stable: 10/sbin/resolvconf 11/sbin/resolvconf
Author: badger Date: Wed Aug 31 22:18:50 2016 New Revision: 305165 URL: https://svnweb.freebsd.org/changeset/base/305165 Log: MFC r304652: Fix missing substitution of @SBINDIR@ in resolvconf scripts Certain features, such as resolv_conf_passthrough=NULL, do not work correctly due to this missing substitution. Also remove the @PREFIX@ substitution, which is no longer needed. Approved by: vangyzen (mentor) Sponsored by: Dell Inc. Modified: stable/10/sbin/resolvconf/Makefile Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sbin/resolvconf/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/10/sbin/resolvconf/Makefile == --- stable/10/sbin/resolvconf/Makefile Wed Aug 31 21:48:22 2016 (r305164) +++ stable/10/sbin/resolvconf/Makefile Wed Aug 31 22:18:50 2016 (r305165) @@ -15,6 +15,7 @@ CLEANFILES= ${SCRIPTS} ${FILES} ${MAN} SYSCONFDIR=/etc RCDIR= ${SYSCONFDIR}/rc.d VARDIR=/var/run/resolvconf +SBINDIR= /sbin # We don't assume to restart the services in /sbin. So, though # our service(8) is in /usr/sbin, we can use it, here. @@ -24,12 +25,12 @@ RESTARTCMD= /usr/sbin/service ${CMD1} \& .for f in ${SCRIPTS} ${FILES} ${MAN} ${f}: ${f}.in - sed -e 's:@PREFIX@::g' \ - -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' \ + sed -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' \ -e 's:@LIBEXECDIR@:${FILESDIR}:g' \ -e 's:@VARDIR@:${VARDIR}:g' \ -e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD}:g' \ -e 's:@RCDIR@:${RCDIR}:g' \ + -e 's:@SBINDIR@:${SBINDIR}:g' \ -e 's: vpn : ng[0-9]*&:g' \ ${DIST}/$@.in > $@ .endfor ___ 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: r305165 - in stable: 10/sbin/resolvconf 11/sbin/resolvconf
Author: badger Date: Wed Aug 31 22:18:50 2016 New Revision: 305165 URL: https://svnweb.freebsd.org/changeset/base/305165 Log: MFC r304652: Fix missing substitution of @SBINDIR@ in resolvconf scripts Certain features, such as resolv_conf_passthrough=NULL, do not work correctly due to this missing substitution. Also remove the @PREFIX@ substitution, which is no longer needed. Approved by: vangyzen (mentor) Sponsored by: Dell Inc. Modified: stable/11/sbin/resolvconf/Makefile Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sbin/resolvconf/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/11/sbin/resolvconf/Makefile == --- stable/11/sbin/resolvconf/Makefile Wed Aug 31 21:48:22 2016 (r305164) +++ stable/11/sbin/resolvconf/Makefile Wed Aug 31 22:18:50 2016 (r305165) @@ -16,6 +16,7 @@ CLEANFILES= ${SCRIPTS} ${FILES} ${MAN} SYSCONFDIR=/etc RCDIR= ${SYSCONFDIR}/rc.d VARDIR=/var/run/resolvconf +SBINDIR= /sbin # We don't assume to restart the services in /sbin. So, though # our service(8) is in /usr/sbin, we can use it, here. @@ -28,13 +29,13 @@ RESTARTCMD= "/usr/sbin/service ${CMD1} \ .for f in ${SCRIPTS} ${FILES} ${MAN} ${f}: ${f}.in - sed -e 's:@PREFIX@::g' \ - -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' \ + sed -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' \ -e 's:@LIBEXECDIR@:${FILESDIR}:g' \ -e 's:@VARDIR@:${VARDIR}:g' \ -e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD_WITH_ARG}:g' \ -e 's:@RESTARTCMD@:${RESTARTCMD}:g' \ -e 's:@RCDIR@:${RCDIR}:g' \ + -e 's:@SBINDIR@:${SBINDIR}:g' \ -e 's: vpn : ng[0-9]*&:g' \ ${DIST}/$@.in > $@ .endfor ___ 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: r305012 - in head/lib/libc: amd64/sys arm/sys i386/sys include mips/sys powerpc/sys powerpc64/sys sparc64/sys sys
On 8/29/16 11:47 AM, Konstantin Belousov wrote: > Author: kib > Date: Mon Aug 29 18:47:51 2016 > New Revision: 305012 > URL: https://svnweb.freebsd.org/changeset/base/305012 > > Log: > Rewrite ptrace(2) wrappers in C. > Besides removing hand-translation to assembler, this also adds missing > wrappers for arm64 and risc-v. > > Reviewed by:emaste, jhb > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Differential revision: https://reviews.freebsd.org/D7694 > > Added: > head/lib/libc/sys/ptrace.c (contents, props changed) > Deleted: > head/lib/libc/amd64/sys/ptrace.S > head/lib/libc/arm/sys/ptrace.S > head/lib/libc/i386/sys/ptrace.S > head/lib/libc/mips/sys/ptrace.S > head/lib/libc/powerpc/sys/ptrace.S > head/lib/libc/powerpc64/sys/ptrace.S > head/lib/libc/sparc64/sys/ptrace.S There is a known bug with "FAST_DEPEND" (which is default and the only way now) which may result in something like: > cc: error: no such file or directory: '/usr/src/lib/libc/amd64/sys/ptrace.S' I am working on a fix, but in the meantime a workaround is 'make cleandepend', or removing the .depend.ptrace.* files in the lib/libc object directories. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r305164 - head/sys/kern
Author: markj Date: Wed Aug 31 21:48:22 2016 New Revision: 305164 URL: https://svnweb.freebsd.org/changeset/base/305164 Log: Rename unp_dispose_so() to unp_dispose(). It implements the dom_dispose method for local socket domain, so its name should match the method name. Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c == --- head/sys/kern/uipc_usrreq.c Wed Aug 31 21:41:32 2016(r305163) +++ head/sys/kern/uipc_usrreq.c Wed Aug 31 21:48:22 2016(r305164) @@ -277,8 +277,8 @@ static int unp_connectat(int, struct soc struct thread *); static int unp_connect2(struct socket *so, struct socket *so2, int); static voidunp_disconnect(struct unpcb *unp, struct unpcb *unp2); -static voidunp_dispose(struct mbuf *); -static voidunp_dispose_so(struct socket *so); +static voidunp_dispose(struct socket *so); +static voidunp_dispose_mbuf(struct mbuf *); static voidunp_shutdown(struct unpcb *); static voidunp_drop(struct unpcb *); static voidunp_gc(__unused void *, int); @@ -335,7 +335,7 @@ static struct domain localdomain = { .dom_name = "local", .dom_init = unp_init, .dom_externalize = unp_externalize, - .dom_dispose = unp_dispose_so, + .dom_dispose = unp_dispose, .dom_protosw = localsw, .dom_protoswNPROTOSW = [nitems(localsw)] }; @@ -1051,7 +1051,7 @@ uipc_send(struct socket *so, int flags, UNP_LINK_RUNLOCK(); if (control != NULL && error != 0) - unp_dispose(control); + unp_dispose_mbuf(control); release: if (control != NULL) @@ -2352,7 +2352,7 @@ unp_gc(__unused void *arg, int pending) } static void -unp_dispose(struct mbuf *m) +unp_dispose_mbuf(struct mbuf *m) { if (m) @@ -2363,7 +2363,7 @@ unp_dispose(struct mbuf *m) * Synchronize against unp_gc, which can trip over data as we are freeing it. */ static void -unp_dispose_so(struct socket *so) +unp_dispose(struct socket *so) { struct unpcb *unp; @@ -2371,7 +2371,7 @@ unp_dispose_so(struct socket *so) UNP_LIST_LOCK(); unp->unp_gcflag |= UNPGC_IGNORE_RIGHTS; UNP_LIST_UNLOCK(); - unp_dispose(so->so_rcv.sb_mb); + unp_dispose_mbuf(so->so_rcv.sb_mb); } static 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: r305163 - vendor-sys/acpica/20160831
Author: jkim Date: Wed Aug 31 21:41:32 2016 New Revision: 305163 URL: https://svnweb.freebsd.org/changeset/base/305163 Log: Tag ACPICA 20160831. Added: vendor-sys/acpica/20160831/ - copied from r305162, vendor-sys/acpica/dist/ ___ 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: r305162 - in vendor-sys/acpica/dist: . generate/unix/acpidump generate/unix/acpiexamples generate/unix/acpiexec generate/unix/acpisrc generate/unix/acpixtract generate/unix/iasl source/...
Author: jkim Date: Wed Aug 31 21:40:51 2016 New Revision: 305162 URL: https://svnweb.freebsd.org/changeset/base/305162 Log: Import ACPICA 20160831. Added: vendor-sys/acpica/dist/source/compiler/aslhelp.c (contents, props changed) vendor-sys/acpica/dist/source/components/utilities/utstrtoul64.c (contents, props changed) Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/generate/unix/acpidump/Makefile vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile vendor-sys/acpica/dist/generate/unix/acpisrc/Makefile vendor-sys/acpica/dist/generate/unix/acpixtract/Makefile vendor-sys/acpica/dist/generate/unix/iasl/Makefile vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/aslmain.c vendor-sys/acpica/dist/source/compiler/aslopt.c vendor-sys/acpica/dist/source/compiler/asloptions.c vendor-sys/acpica/dist/source/compiler/aslstubs.c vendor-sys/acpica/dist/source/compiler/aslutils.c vendor-sys/acpica/dist/source/compiler/dtcompiler.h vendor-sys/acpica/dist/source/compiler/dtfield.c vendor-sys/acpica/dist/source/compiler/dtparser.y vendor-sys/acpica/dist/source/compiler/dtutils.c vendor-sys/acpica/dist/source/compiler/prparser.y vendor-sys/acpica/dist/source/components/debugger/dbconvert.c vendor-sys/acpica/dist/source/components/debugger/dbexec.c vendor-sys/acpica/dist/source/components/debugger/dbinput.c vendor-sys/acpica/dist/source/components/debugger/dbmethod.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl2.c vendor-sys/acpica/dist/source/components/dispatcher/dsmethod.c vendor-sys/acpica/dist/source/components/dispatcher/dswexec.c vendor-sys/acpica/dist/source/components/dispatcher/dswload2.c vendor-sys/acpica/dist/source/components/events/evgpe.c vendor-sys/acpica/dist/source/components/events/evgpeinit.c vendor-sys/acpica/dist/source/components/events/evrgnini.c vendor-sys/acpica/dist/source/components/events/evxfgpe.c vendor-sys/acpica/dist/source/components/executer/exconcat.c vendor-sys/acpica/dist/source/components/executer/exconfig.c vendor-sys/acpica/dist/source/components/executer/exconvrt.c vendor-sys/acpica/dist/source/components/executer/exmisc.c vendor-sys/acpica/dist/source/components/executer/exoparg1.c vendor-sys/acpica/dist/source/components/executer/exresop.c vendor-sys/acpica/dist/source/components/executer/extrace.c vendor-sys/acpica/dist/source/components/executer/exutils.c vendor-sys/acpica/dist/source/components/hardware/hwgpe.c vendor-sys/acpica/dist/source/components/namespace/nsconvert.c vendor-sys/acpica/dist/source/components/namespace/nsload.c vendor-sys/acpica/dist/source/components/namespace/nsparse.c vendor-sys/acpica/dist/source/components/namespace/nsutils.c vendor-sys/acpica/dist/source/components/parser/psparse.c vendor-sys/acpica/dist/source/components/parser/psxface.c vendor-sys/acpica/dist/source/components/tables/tbdata.c vendor-sys/acpica/dist/source/components/tables/tbfadt.c vendor-sys/acpica/dist/source/components/tables/tbfind.c vendor-sys/acpica/dist/source/components/tables/tbinstal.c vendor-sys/acpica/dist/source/components/tables/tbxfload.c vendor-sys/acpica/dist/source/components/utilities/utaddress.c vendor-sys/acpica/dist/source/components/utilities/uthex.c vendor-sys/acpica/dist/source/components/utilities/utnonansi.c vendor-sys/acpica/dist/source/components/utilities/utosi.c vendor-sys/acpica/dist/source/components/utilities/utxfinit.c vendor-sys/acpica/dist/source/include/acdebug.h vendor-sys/acpica/dist/source/include/acevents.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acnamesp.h vendor-sys/acpica/dist/source/include/acparser.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/actables.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/acutils.h vendor-sys/acpica/dist/source/include/platform/acefi.h vendor-sys/acpica/dist/source/include/platform/acefiex.h vendor-sys/acpica/dist/source/tools/acpidump/apdump.c vendor-sys/acpica/dist/source/tools/acpidump/apmain.c vendor-sys/acpica/dist/source/tools/acpiexec/aeexec.c vendor-sys/acpica/dist/source/tools/acpiexec/aehandlers.c vendor-sys/acpica/dist/source/tools/acpiexec/aeinitfile.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c Modified: vendor-sys/acpica/dist/changes.txt == --- vendor-sys/acpica/dist/changes.txt Wed Aug 31 21:35:51 2016 (r305161) +++ vendor-sys/acpica/dist/changes.txt Wed Aug 31 21:40:51 2016 (r305162) @@ -1,7 +1,72 @@ -29 July 2016. Summary of changes for version 20160729: +31 August 2016. Summary of changes for version 20160831: -This release
svn commit: r305161 - in stable/10/sys: kern sys
Author: markj Date: Wed Aug 31 21:35:51 2016 New Revision: 305161 URL: https://svnweb.freebsd.org/changeset/base/305161 Log: MFC 303855: Handle races with listening socket close when connecting a unix socket. PR: 211531 Modified: stable/10/sys/kern/uipc_usrreq.c stable/10/sys/sys/unpcb.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/uipc_usrreq.c == --- stable/10/sys/kern/uipc_usrreq.cWed Aug 31 21:35:38 2016 (r305160) +++ stable/10/sys/kern/uipc_usrreq.cWed Aug 31 21:35:51 2016 (r305161) @@ -429,6 +429,8 @@ uipc_attach(struct socket *so, int proto unp->unp_socket = so; so->so_pcb = unp; unp->unp_refcount = 1; + if (so->so_head != NULL) + unp->unp_flags |= UNP_NASCENT; UNP_LIST_LOCK(); unp->unp_gencnt = ++unp_gencnt; @@ -651,14 +653,22 @@ uipc_detach(struct socket *so) unp = sotounpcb(so); KASSERT(unp != NULL, ("uipc_detach: unp == NULL")); - UNP_LINK_WLOCK(); + vp = NULL; + local_unp_rights = 0; + UNP_LIST_LOCK(); - UNP_PCB_LOCK(unp); LIST_REMOVE(unp, unp_link); unp->unp_gencnt = ++unp_gencnt; --unp_count; UNP_LIST_UNLOCK(); + if ((unp->unp_flags & UNP_NASCENT) != 0) { + UNP_PCB_LOCK(unp); + goto teardown; + } + UNP_LINK_WLOCK(); + UNP_PCB_LOCK(unp); + /* * XXXRW: Should assert vp->v_socket == so. */ @@ -686,6 +696,7 @@ uipc_detach(struct socket *so) } local_unp_rights = unp_rights; UNP_LINK_WUNLOCK(); +teardown: unp->unp_socket->so_pcb = NULL; saved_unp_addr = unp->unp_addr; unp->unp_addr = NULL; @@ -1441,6 +1452,7 @@ unp_connect2(struct socket *so, struct s if (so2->so_type != so->so_type) return (EPROTOTYPE); + unp2->unp_flags &= ~UNP_NASCENT; unp->unp_conn = unp2; switch (so->so_type) { Modified: stable/10/sys/sys/unpcb.h == --- stable/10/sys/sys/unpcb.h Wed Aug 31 21:35:38 2016(r305160) +++ stable/10/sys/sys/unpcb.h Wed Aug 31 21:35:51 2016(r305161) @@ -103,10 +103,6 @@ struct unpcb { #defineUNP_WANTCRED0x004 /* credentials wanted */ #defineUNP_CONNWAIT0x008 /* connect blocks until accepted */ -#defineUNPGC_REF 0x1 /* unpcb has external ref. */ -#defineUNPGC_DEAD 0x2 /* unpcb might be dead. */ -#defineUNPGC_SCANNED 0x4 /* Has been scanned. */ - /* * These flags are used to handle non-atomicity in connect() and bind() * operations on a socket: in particular, to avoid races between multiple @@ -114,6 +110,14 @@ struct unpcb { */ #defineUNP_CONNECTING 0x010 /* Currently connecting. */ #defineUNP_BINDING 0x020 /* Currently binding. */ +#defineUNP_NASCENT 0x040 /* Newborn child socket. */ + +/* + * Flags in unp_gcflag. + */ +#defineUNPGC_REF 0x1 /* unpcb has external ref. */ +#defineUNPGC_DEAD 0x2 /* unpcb might be dead. */ +#defineUNPGC_SCANNED 0x4 /* Has been scanned. */ #definesotounpcb(so) ((struct unpcb *)((so)->so_pcb)) ___ 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: r305160 - in head/sys/boot/efi: boot1 loader
Author: emaste Date: Wed Aug 31 21:35:38 2016 New Revision: 305160 URL: https://svnweb.freebsd.org/changeset/base/305160 Log: Set UEFI boot loader PE/COFF timestamps to known value for reproducible builds Reviewed by: rpokala MFC after:1 week Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D7633 Modified: head/sys/boot/efi/boot1/Makefile head/sys/boot/efi/loader/Makefile Modified: head/sys/boot/efi/boot1/Makefile == --- head/sys/boot/efi/boot1/MakefileWed Aug 31 21:35:12 2016 (r305159) +++ head/sys/boot/efi/boot1/MakefileWed Aug 31 21:35:38 2016 (r305160) @@ -89,11 +89,15 @@ EFI_TARGET= efi-app-ia32 EFI_TARGET=binary .endif +# Arbitrarily set the PE/COFF header timestamps to 1 Jan 2016 00:00:00 +# for build reproducibility. +SOURCE_DATE_EPOCH?=1451606400 boot1.efi: ${PROG} if ${NM} ${.ALLSRC} | grep ' U '; then \ echo "Undefined symbols in ${.ALLSRC}"; \ exit 1; \ fi + SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH} \ ${OBJCOPY} -j .peheader -j .text -j .sdata -j .data \ -j .dynamic -j .dynsym -j .rel.dyn \ -j .rela.dyn -j .reloc -j .eh_frame \ Modified: head/sys/boot/efi/loader/Makefile == --- head/sys/boot/efi/loader/Makefile Wed Aug 31 21:35:12 2016 (r305159) +++ head/sys/boot/efi/loader/Makefile Wed Aug 31 21:35:38 2016 (r305160) @@ -131,11 +131,15 @@ EFI_TARGET= efi-app-ia32 EFI_TARGET=binary .endif +# Arbitrarily set the PE/COFF header timestamps to 1 Jan 2016 00:00:00 +# for build reproducibility. +SOURCE_DATE_EPOCH?=1451606400 loader.efi: ${PROG} if ${NM} ${.ALLSRC} | grep ' U '; then \ echo "Undefined symbols in ${.ALLSRC}"; \ exit 1; \ fi + SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH} \ ${OBJCOPY} -j .peheader -j .text -j .sdata -j .data \ -j .dynamic -j .dynsym -j .rel.dyn \ -j .rela.dyn -j .reloc -j .eh_frame -j set_Xcommand_set \ ___ 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: r305159 - in stable/11/sys: kern sys
Author: markj Date: Wed Aug 31 21:35:12 2016 New Revision: 305159 URL: https://svnweb.freebsd.org/changeset/base/305159 Log: MFC r303855: Handle races with listening socket close when connecting a unix socket. PR: 211531 Modified: stable/11/sys/kern/uipc_usrreq.c stable/11/sys/sys/unpcb.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/uipc_usrreq.c == --- stable/11/sys/kern/uipc_usrreq.cWed Aug 31 21:18:38 2016 (r305158) +++ stable/11/sys/kern/uipc_usrreq.cWed Aug 31 21:35:12 2016 (r305159) @@ -430,6 +430,8 @@ uipc_attach(struct socket *so, int proto unp->unp_socket = so; so->so_pcb = unp; unp->unp_refcount = 1; + if (so->so_head != NULL) + unp->unp_flags |= UNP_NASCENT; UNP_LIST_LOCK(); unp->unp_gencnt = ++unp_gencnt; @@ -652,14 +654,22 @@ uipc_detach(struct socket *so) unp = sotounpcb(so); KASSERT(unp != NULL, ("uipc_detach: unp == NULL")); - UNP_LINK_WLOCK(); + vp = NULL; + local_unp_rights = 0; + UNP_LIST_LOCK(); - UNP_PCB_LOCK(unp); LIST_REMOVE(unp, unp_link); unp->unp_gencnt = ++unp_gencnt; --unp_count; UNP_LIST_UNLOCK(); + if ((unp->unp_flags & UNP_NASCENT) != 0) { + UNP_PCB_LOCK(unp); + goto teardown; + } + UNP_LINK_WLOCK(); + UNP_PCB_LOCK(unp); + /* * XXXRW: Should assert vp->v_socket == so. */ @@ -687,6 +697,7 @@ uipc_detach(struct socket *so) } local_unp_rights = unp_rights; UNP_LINK_WUNLOCK(); +teardown: unp->unp_socket->so_pcb = NULL; saved_unp_addr = unp->unp_addr; unp->unp_addr = NULL; @@ -1473,6 +1484,7 @@ unp_connect2(struct socket *so, struct s if (so2->so_type != so->so_type) return (EPROTOTYPE); + unp2->unp_flags &= ~UNP_NASCENT; unp->unp_conn = unp2; switch (so->so_type) { Modified: stable/11/sys/sys/unpcb.h == --- stable/11/sys/sys/unpcb.h Wed Aug 31 21:18:38 2016(r305158) +++ stable/11/sys/sys/unpcb.h Wed Aug 31 21:35:12 2016(r305159) @@ -103,11 +103,6 @@ struct unpcb { #defineUNP_WANTCRED0x004 /* credentials wanted */ #defineUNP_CONNWAIT0x008 /* connect blocks until accepted */ -#defineUNPGC_REF 0x1 /* unpcb has external ref. */ -#defineUNPGC_DEAD 0x2 /* unpcb might be dead. */ -#defineUNPGC_SCANNED 0x4 /* Has been scanned. */ -#defineUNPGC_IGNORE_RIGHTS 0x8 /* Attached rights are freed */ - /* * These flags are used to handle non-atomicity in connect() and bind() * operations on a socket: in particular, to avoid races between multiple @@ -115,6 +110,15 @@ struct unpcb { */ #defineUNP_CONNECTING 0x010 /* Currently connecting. */ #defineUNP_BINDING 0x020 /* Currently binding. */ +#defineUNP_NASCENT 0x040 /* Newborn child socket. */ + +/* + * Flags in unp_gcflag. + */ +#defineUNPGC_REF 0x1 /* unpcb has external ref. */ +#defineUNPGC_DEAD 0x2 /* unpcb might be dead. */ +#defineUNPGC_SCANNED 0x4 /* Has been scanned. */ +#defineUNPGC_IGNORE_RIGHTS 0x8 /* Attached rights are freed */ #definesotounpcb(so) ((struct unpcb *)((so)->so_pcb)) ___ 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: r304510 - head/sys/dev/ixl
On 31 Aug 2016, at 18:53, Ed Mastewrote: > > On 19 August 2016 at 20:08, Eric Joyner wrote: >> Author: erj >> Date: Sat Aug 20 00:08:10 2016 >> New Revision: 304510 >> URL: https://svnweb.freebsd.org/changeset/base/304510 >> >> Log: >> ixlv(4): Fix ixlv(4) not loading when loaded as a kernel module and netmap >> is enabled. > > I did not confirm it's this commit, but kernel builds currently have > this warning: > > if_ixlv.o: warning: common of `ixl_crcstrip' overridden by definition > if_ixl.o: warning: defined here > if_ixlv.o: warning: multiple common of `ixl_rx_miss' > if_ixl.o: warning: previous common is here > if_ixlv.o: warning: multiple common of `ixl_rx_miss_bufs' > if_ixl.o: warning: previous common is here Interestingly, with the external gcc build, it is even an error: --- kernel.full --- linking kernel.full if_ixlv.o:(.bss+0x0): multiple definition of `ixl_crcstrip' if_ixl.o:(.data+0xb8): first defined here if_ixlv.o: In function `ixlv_media_change': /builds/FreeBSD_HEAD_amd64_gcc/sys/dev/ixl/if_ixlv.c:2252: multiple definition of `ixl_rx_miss_bufs' if_ixl.o:/builds/FreeBSD_HEAD_amd64_gcc/sys/dev/ixl/if_ixl.c:680: first defined here if_ixlv.o: In function `ixlv_media_change': /builds/FreeBSD_HEAD_amd64_gcc/sys/dev/ixl/if_ixlv.c:2262: multiple definition of `ixl_rx_miss' if_ixl.o:/builds/FreeBSD_HEAD_amd64_gcc/sys/dev/ixl/if_ixl.c:681: first defined here *** [kernel.full] Error code 1 See e.g. https://jenkins.freebsd.org/job/FreeBSD_HEAD_amd64_gcc/1505/console -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r305157 - stable/11/sys/vm
Author: markj Date: Wed Aug 31 21:14:16 2016 New Revision: 305157 URL: https://svnweb.freebsd.org/changeset/base/305157 Log: MFC r304053, r304054: Initialize busy lock state and strengthen busy lock assertions. Modified: stable/11/sys/vm/vm_page.c stable/11/sys/vm/vm_phys.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_page.c == --- stable/11/sys/vm/vm_page.c Wed Aug 31 21:12:50 2016(r305156) +++ stable/11/sys/vm/vm_page.c Wed Aug 31 21:14:16 2016(r305157) @@ -1712,8 +1712,7 @@ vm_page_alloc(vm_object_t object, vm_pin ("vm_page_alloc: page %p has unexpected queue %d", m, m->queue)); KASSERT(m->wire_count == 0, ("vm_page_alloc: page %p is wired", m)); KASSERT(m->hold_count == 0, ("vm_page_alloc: page %p is held", m)); - KASSERT(!vm_page_sbusied(m), - ("vm_page_alloc: page %p is busy", m)); + KASSERT(!vm_page_busied(m), ("vm_page_alloc: page %p is busy", m)); KASSERT(m->dirty == 0, ("vm_page_alloc: page %p is dirty", m)); KASSERT(pmap_page_get_memattr(m) == VM_MEMATTR_DEFAULT, ("vm_page_alloc: page %p has unexpected memattr %d", m, @@ -2021,7 +2020,7 @@ vm_page_alloc_init(vm_page_t m) ("vm_page_alloc_init: page %p is wired", m)); KASSERT(m->hold_count == 0, ("vm_page_alloc_init: page %p is held", m)); - KASSERT(!vm_page_sbusied(m), + KASSERT(!vm_page_busied(m), ("vm_page_alloc_init: page %p is busy", m)); KASSERT(m->dirty == 0, ("vm_page_alloc_init: page %p is dirty", m)); Modified: stable/11/sys/vm/vm_phys.c == --- stable/11/sys/vm/vm_phys.c Wed Aug 31 21:12:50 2016(r305156) +++ stable/11/sys/vm/vm_phys.c Wed Aug 31 21:14:16 2016(r305157) @@ -741,6 +741,7 @@ vm_phys_add_page(vm_paddr_t pa) vm_cnt.v_page_count++; m = vm_phys_paddr_to_vm_page(pa); + m->busy_lock = VPB_UNBUSIED; m->phys_addr = pa; m->queue = PQ_NONE; m->segind = vm_phys_paddr_to_segind(pa); ___ 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: r305156 - head/usr.bin
Author: emaste Date: Wed Aug 31 21:12:50 2016 New Revision: 305156 URL: https://svnweb.freebsd.org/changeset/base/305156 Log: users: don't build when we don't have a C++ toolchain (On RISC-V MK_CXX is in BROKEN_OPTIONS, so users remains skipped there.) Reviewed by: bdrewery Differential Revision:https://reviews.freebsd.org/D7725 Modified: head/usr.bin/Makefile Modified: head/usr.bin/Makefile == --- head/usr.bin/Makefile Wed Aug 31 21:04:58 2016(r305155) +++ head/usr.bin/Makefile Wed Aug 31 21:12:50 2016(r305156) @@ -294,7 +294,7 @@ SUBDIR.${MK_VT}+= vtfontcvt SUBDIR.${MK_USB}+= usbhidaction SUBDIR.${MK_USB}+= usbhidctl SUBDIR.${MK_UTMPX}+= last -.if ${MACHINE_CPUARCH} != "riscv" # RISCVTODO users does not build +.if ${MK_CXX} != "no" SUBDIR.${MK_UTMPX}+= users .endif SUBDIR.${MK_UTMPX}+= who ___ 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: r305155 - head/contrib/elftoolchain/readelf
Author: emaste Date: Wed Aug 31 21:04:58 2016 New Revision: 305155 URL: https://svnweb.freebsd.org/changeset/base/305155 Log: readelf: silence GCC 4.2.1 uninitialized variable warning Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c == --- head/contrib/elftoolchain/readelf/readelf.c Wed Aug 31 20:38:40 2016 (r305154) +++ head/contrib/elftoolchain/readelf/readelf.c Wed Aug 31 21:04:58 2016 (r305155) @@ -2831,6 +2831,8 @@ dump_rel(struct readelf *re, struct sect type2 = (type >> 8) & 0xFF; type3 = (type >> 16) & 0xFF; type = type & 0xFF; + } else { + type2 = type3 = 0; } if (re->options & RE_WW) printf("%16.16jx %16.16jx %-24.24s" @@ -2914,6 +2916,8 @@ dump_rela(struct readelf *re, struct sec type2 = (type >> 8) & 0xFF; type3 = (type >> 16) & 0xFF; type = type & 0xFF; + } else { + type2 = type3 = 0; } if (re->options & RE_WW) printf("%16.16jx %16.16jx %-24.24s" ___ 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: r305154 - head/lib/libc/gen
Author: jilles Date: Wed Aug 31 20:38:40 2016 New Revision: 305154 URL: https://svnweb.freebsd.org/changeset/base/305154 Log: directory(3): Deprecate readdir_r(). Clarify dirent buffers. In existing implementations including FreeBSD, there is no reason to use readdir_r() in the common case where potentially multiple threads each list their own directory. Code using readdir() is simpler. What's more, lthough readdir_r() can safely be used on FreeBSD because NAME_MAX is forced to 255, it cannot be used safely on systems where {NAME_MAX} is not fixed. As a concrete example, FAT/NTFS filenames can be up to 255 UTF-16 code units long, which can be up to 765 UTF-8 bytes. Deprecating readdir_r() in POSIX has been proposed in http://www.austingroupbugs.net/view.php?id=696 and glibc wants to deprecate it as well. Reviewed by: ed, wblock MFC after:1 week Differential Revision:https://reviews.freebsd.org/D7678 Modified: head/lib/libc/gen/directory.3 Modified: head/lib/libc/gen/directory.3 == --- head/lib/libc/gen/directory.3 Wed Aug 31 20:33:59 2016 (r305153) +++ head/lib/libc/gen/directory.3 Wed Aug 31 20:38:40 2016 (r305154) @@ -28,7 +28,7 @@ .\" @(#)directory.38.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd February 19, 2016 +.Dd August 31, 2016 .Dt DIRECTORY 3 .Os .Sh NAME @@ -68,6 +68,15 @@ .Ft int .Fn dirfd "DIR *dirp" .Sh DESCRIPTION +.Bf -symbolic +The +.Fn readdir_r +interface is deprecated +because it cannot be used correctly unless +.Brq Va NAME_MAX +is a fixed value. +.Ef +.Pp The .Fn opendir function @@ -122,7 +131,13 @@ The .Fn readdir function returns a pointer to the next directory entry. -It returns +The directory entry remains valid until the next call to +.Fn readdir +or +.Fn closedir +on the same +.Em directory stream . +The function returns .Dv NULL upon reaching the end of the directory or on error. In the event of an error, @@ -139,6 +154,13 @@ provides the same functionality as but the caller must provide a directory .Fa entry buffer to store the results in. +The buffer must be large enough for a +.Vt struct dirent +with a +.Va d_name +array with +.Brq Va NAME_MAX ++ 1 elements. If the read succeeds, .Fa result is pointed at the ___ 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: r305153 - in stable/11/secure/lib/libcrypto: . amd64 arm i386
Author: jkim Date: Wed Aug 31 20:33:59 2016 New Revision: 305153 URL: https://svnweb.freebsd.org/changeset/base/305153 Log: MFC: r304638, r304640 Fix white spaces and prefer C-style comments in assembly sources. Modified: stable/11/secure/lib/libcrypto/Makefile.asm stable/11/secure/lib/libcrypto/amd64/aes-x86_64.S stable/11/secure/lib/libcrypto/amd64/aesni-gcm-x86_64.S stable/11/secure/lib/libcrypto/amd64/aesni-mb-x86_64.S stable/11/secure/lib/libcrypto/amd64/aesni-sha1-x86_64.S stable/11/secure/lib/libcrypto/amd64/aesni-sha256-x86_64.S stable/11/secure/lib/libcrypto/amd64/aesni-x86_64.S stable/11/secure/lib/libcrypto/amd64/bsaes-x86_64.S stable/11/secure/lib/libcrypto/amd64/cmll-x86_64.S stable/11/secure/lib/libcrypto/amd64/ecp_nistz256-x86_64.S stable/11/secure/lib/libcrypto/amd64/ghash-x86_64.S stable/11/secure/lib/libcrypto/amd64/md5-x86_64.S stable/11/secure/lib/libcrypto/amd64/rc4-md5-x86_64.S stable/11/secure/lib/libcrypto/amd64/rc4-x86_64.S stable/11/secure/lib/libcrypto/amd64/rsaz-avx2.S stable/11/secure/lib/libcrypto/amd64/rsaz-x86_64.S stable/11/secure/lib/libcrypto/amd64/sha1-mb-x86_64.S stable/11/secure/lib/libcrypto/amd64/sha1-x86_64.S stable/11/secure/lib/libcrypto/amd64/sha256-mb-x86_64.S stable/11/secure/lib/libcrypto/amd64/sha256-x86_64.S stable/11/secure/lib/libcrypto/amd64/sha512-x86_64.S stable/11/secure/lib/libcrypto/amd64/vpaes-x86_64.S stable/11/secure/lib/libcrypto/amd64/wp-x86_64.S stable/11/secure/lib/libcrypto/amd64/x86_64-gf2m.S stable/11/secure/lib/libcrypto/amd64/x86_64-mont.S stable/11/secure/lib/libcrypto/amd64/x86_64-mont5.S stable/11/secure/lib/libcrypto/amd64/x86_64cpuid.S stable/11/secure/lib/libcrypto/arm/aes-armv4.S stable/11/secure/lib/libcrypto/arm/aesv8-armx.S stable/11/secure/lib/libcrypto/arm/armv4-gf2m.S stable/11/secure/lib/libcrypto/arm/armv4-mont.S stable/11/secure/lib/libcrypto/arm/bsaes-armv7.S stable/11/secure/lib/libcrypto/arm/ghash-armv4.S stable/11/secure/lib/libcrypto/arm/ghashv8-armx.S stable/11/secure/lib/libcrypto/arm/sha1-armv4-large.S stable/11/secure/lib/libcrypto/arm/sha256-armv4.S stable/11/secure/lib/libcrypto/arm/sha512-armv4.S stable/11/secure/lib/libcrypto/i386/aes-586.S stable/11/secure/lib/libcrypto/i386/aesni-x86.S stable/11/secure/lib/libcrypto/i386/bf-586.S stable/11/secure/lib/libcrypto/i386/bf-686.S stable/11/secure/lib/libcrypto/i386/bn-586.S stable/11/secure/lib/libcrypto/i386/cmll-x86.S stable/11/secure/lib/libcrypto/i386/co-586.S stable/11/secure/lib/libcrypto/i386/crypt586.S stable/11/secure/lib/libcrypto/i386/des-586.S stable/11/secure/lib/libcrypto/i386/ghash-x86.S stable/11/secure/lib/libcrypto/i386/md5-586.S stable/11/secure/lib/libcrypto/i386/rc4-586.S stable/11/secure/lib/libcrypto/i386/rc5-586.S stable/11/secure/lib/libcrypto/i386/rmd-586.S stable/11/secure/lib/libcrypto/i386/sha1-586.S stable/11/secure/lib/libcrypto/i386/sha256-586.S stable/11/secure/lib/libcrypto/i386/sha512-586.S stable/11/secure/lib/libcrypto/i386/vpaes-x86.S stable/11/secure/lib/libcrypto/i386/wp-mmx.S stable/11/secure/lib/libcrypto/i386/x86-gf2m.S stable/11/secure/lib/libcrypto/i386/x86-mont.S stable/11/secure/lib/libcrypto/i386/x86cpuid.S Directory Properties: stable/11/ (props changed) Modified: stable/11/secure/lib/libcrypto/Makefile.asm == --- stable/11/secure/lib/libcrypto/Makefile.asm Wed Aug 31 20:30:49 2016 (r305152) +++ stable/11/secure/lib/libcrypto/Makefile.asm Wed Aug 31 20:33:59 2016 (r305153) @@ -64,8 +64,8 @@ CLEANFILES= ${ASM} ${SHA_ASM:S/$/.s/} .SUFFIXES: .pl .pl.S: - ( echo '# $$'FreeBSD'$$' ;\ - echo '# Do not modify. This file is auto-generated from ${.IMPSRC:T}.' ;\ + ( echo '/* $$'FreeBSD'$$ */' ;\ + echo '/* Do not modify. This file is auto-generated from ${.IMPSRC:T}. */' ;\ env CC=cc perl ${.IMPSRC} elf ) > ${.TARGET} ${SHA_TMP}: ${SHA_SRC} @@ -73,8 +73,8 @@ ${SHA_TMP}: ${SHA_SRC} .for s in ${SHA_ASM} ${s}.S: ${s}.s - ( echo '# $$'FreeBSD'$$' ;\ - echo ' # Do not modify. This file is auto-generated from ${SHA_SRC}.' ;\ + ( echo '/* $$'FreeBSD'$$ */' ;\ + echo '/* Do not modify. This file is auto-generated from ${SHA_SRC}. */' ;\ cat ${s}.s ) > ${.TARGET} .endfor @@ -108,14 +108,14 @@ CLEANFILES= ${ASM} ${SRCS:R:S/$/.s/} .SUFFIXES: .pl aes-armv4.S: aes-armv4.pl - ( echo '# $$'FreeBSD'$$' ;\ - echo '# Do not modify. This file is auto-generated from ${.ALLSRC:T}.' ;\ + ( echo '/* $$'FreeBSD'$$ */' ;\ + echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T}. */' ;\ env CC=cc perl ${.ALLSRC} elf ) > ${.TARGET} .pl.S: env CC=cc perl ${.IMPSRC} elf ${.TARGET:R:S/$/.s/} - ( echo '# $$'FreeBSD'$$' ;\ - echo ' # Do not
svn commit: r305152 - in stable/11: crypto/openssl/crypto/bn/asm crypto/openssl/crypto/sha/asm secure/lib/libcrypto secure/lib/libcrypto/arm
Author: jkim Date: Wed Aug 31 20:30:49 2016 New Revision: 305152 URL: https://svnweb.freebsd.org/changeset/base/305152 Log: MFC: r304636 Build OpenSSL assembly sources for arm. Added: stable/11/secure/lib/libcrypto/arm/ - copied from r304636, head/secure/lib/libcrypto/arm/ Modified: stable/11/crypto/openssl/crypto/bn/asm/armv4-gf2m.pl stable/11/crypto/openssl/crypto/sha/asm/sha256-armv4.pl stable/11/secure/lib/libcrypto/Makefile stable/11/secure/lib/libcrypto/Makefile.asm stable/11/secure/lib/libcrypto/Makefile.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/crypto/openssl/crypto/bn/asm/armv4-gf2m.pl == --- stable/11/crypto/openssl/crypto/bn/asm/armv4-gf2m.plWed Aug 31 20:25:37 2016(r305151) +++ stable/11/crypto/openssl/crypto/bn/asm/armv4-gf2m.plWed Aug 31 20:30:49 2016(r305152) @@ -213,8 +213,8 @@ $code.=<<___; .align 5 .LNEON: ldr r12, [sp] @ 5th argument - vmov.32 $a, r2, r1 - vmov.32 $b, r12, r3 + vmov$a, r2, r1 + vmov$b, r12, r3 vmov.i64$k48, #0x vmov.i64$k32, #0x vmov.i64$k16, #0x Modified: stable/11/crypto/openssl/crypto/sha/asm/sha256-armv4.pl == --- stable/11/crypto/openssl/crypto/sha/asm/sha256-armv4.pl Wed Aug 31 20:25:37 2016(r305151) +++ stable/11/crypto/openssl/crypto/sha/asm/sha256-armv4.pl Wed Aug 31 20:30:49 2016(r305152) @@ -595,7 +595,7 @@ sha256_block_data_order_armv8: adr $Ktbl,.LARMv8 sub $Ktbl,$Ktbl,#.LARMv8-K256 # else - adrl$Ktbl,K256 + sub $Ktbl,$Ktbl,#256+32 # endif add $len,$inp,$len,lsl#6@ len to point at the end of inp Modified: stable/11/secure/lib/libcrypto/Makefile == --- stable/11/secure/lib/libcrypto/Makefile Wed Aug 31 20:25:37 2016 (r305151) +++ stable/11/secure/lib/libcrypto/Makefile Wed Aug 31 20:30:49 2016 (r305152) @@ -24,6 +24,8 @@ SRCS= cpt_err.c cryptlib.c cversion.c ex o_fips.c o_init.c o_str.c o_time.c uid.c .if defined(ASM_amd64) SRCS+= x86_64cpuid.S +.elif defined(ASM_arm) +SRCS+= armcap.c armv4cpuid.S .elif defined(ASM_i386) SRCS+= x86cpuid.S .else @@ -36,6 +38,8 @@ SRCS+=aes_cfb.c aes_ctr.c aes_ecb.c aes .if defined(ASM_amd64) SRCS+= aes-x86_64.S aesni-mb-x86_64.S aesni-sha1-x86_64.S \ aesni-sha256-x86_64.S aesni-x86_64.S bsaes-x86_64.S vpaes-x86_64.S +.elif defined(ASM_arm) +SRCS+= aes-armv4.S aes_cbc.c aesv8-armx.S bsaes-armv7.S .elif defined(ASM_i386) SRCS+= aes-586.S aesni-x86.S vpaes-x86.S .else @@ -85,6 +89,8 @@ SRCS+=bn_add.c bn_blind.c bn_const.c bn .if defined(ASM_amd64) SRCS+= rsaz-avx2.S rsaz-x86_64.S rsaz_exp.c x86_64-gcc.c x86_64-gf2m.S \ x86_64-mont.S x86_64-mont5.S +.elif defined(ASM_arm) +SRCS+= armv4-mont.S armv4-gf2m.S bn_asm.c .elif defined(ASM_i386) SRCS+= bn-586.S co-586.S x86-gf2m.S x86-mont.S .else @@ -234,6 +240,8 @@ SRCS+= cbc128.c ccm128.c cfb128.c ctr128 wrap128.c xts128.c .if defined(ASM_amd64) SRCS+= aesni-gcm-x86_64.S ghash-x86_64.S +.elif defined(ASM_arm) +SRCS+= ghash-armv4.S ghashv8-armx.S .elif defined(ASM_i386) SRCS+= ghash-x86.S .endif @@ -319,6 +327,8 @@ SRCS+= sha1_one.c sha1dgst.c sha256.c sh .if defined(ASM_amd64) SRCS+= sha1-mb-x86_64.S sha1-x86_64.S sha256-mb-x86_64.S sha256-x86_64.S \ sha512-x86_64.S +.elif defined(ASM_arm) +SRCS+= sha1-armv4-large.S sha256-armv4.S sha512-armv4.S .elif defined(ASM_i386) SRCS+= sha1-586.S sha256-586.S sha512-586.S .endif Modified: stable/11/secure/lib/libcrypto/Makefile.asm == --- stable/11/secure/lib/libcrypto/Makefile.asm Wed Aug 31 20:25:37 2016 (r305151) +++ stable/11/secure/lib/libcrypto/Makefile.asm Wed Aug 31 20:30:49 2016 (r305152) @@ -78,6 +78,46 @@ ${s}.S: ${s}.s cat ${s}.s ) > ${.TARGET} .endfor +.elif defined(ASM_arm) + +.PATH: ${LCRYPTO_SRC}/crypto \ + ${LCRYPTO_SRC}/crypto/aes/asm \ + ${LCRYPTO_SRC}/crypto/bn/asm \ + ${LCRYPTO_SRC}/crypto/modes/asm \ + ${LCRYPTO_SRC}/crypto/sha/asm + +PERLPATH= -I${LCRYPTO_SRC}/crypto/perlasm + +# aes +SRCS= aesv8-armx.pl bsaes-armv7.pl + +# bn +SRCS+= armv4-mont.pl armv4-gf2m.pl + +# modes +SRCS+= ghash-armv4.pl ghashv8-armx.pl + +# sha +SRCS+= sha1-armv4-large.pl sha256-armv4.pl sha512-armv4.pl + +ASM= aes-armv4.S ${SRCS:R:S/$/.S/} + +all: ${ASM} + +CLEANFILES=${ASM} ${SRCS:R:S/$/.s/} +.SUFFIXES: .pl + +aes-armv4.S: aes-armv4.pl + ( echo '# $$'FreeBSD'$$' ;\ + echo
svn commit: r305151 - stable/11/share/man/man4
Author: kib Date: Wed Aug 31 20:25:37 2016 New Revision: 305151 URL: https://svnweb.freebsd.org/changeset/base/305151 Log: MFC r304315 (by jilles): rights(4): CAP_FSYNC also permits fdatasync(2). Modified: stable/11/share/man/man4/rights.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/rights.4 == --- stable/11/share/man/man4/rights.4 Wed Aug 31 20:21:03 2016 (r305150) +++ stable/11/share/man/man4/rights.4 Wed Aug 31 20:25:37 2016 (r305151) @@ -32,7 +32,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 27, 2015 +.Dd August 17, 2016 .Dt RIGHTS 4 .Os .Sh NAME @@ -254,6 +254,7 @@ Permit .It Dv CAP_FSYNC Permit .Xr aio_fsync 2 , +.Xr fdatasync 2 , .Xr fsync 2 and .Xr openat 2 ___ 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: r305150 - stable/11/secure/lib/libcrypto
Author: jkim Date: Wed Aug 31 20:21:03 2016 New Revision: 305150 URL: https://svnweb.freebsd.org/changeset/base/305150 Log: MFC: r304320 Disable assembly sources when compiler/assembler cannot compile certain instructions. For example, GCC 4.2.1 + binutils 2.17.50 does not support AVX instructions. Added: stable/11/secure/lib/libcrypto/opensslconf-aarch64.h.in - copied unchanged from r304320, head/secure/lib/libcrypto/opensslconf-aarch64.h.in stable/11/secure/lib/libcrypto/opensslconf-arm.h.in - copied unchanged from r304320, head/secure/lib/libcrypto/opensslconf-arm.h.in stable/11/secure/lib/libcrypto/opensslconf-mips.h.in - copied unchanged from r304320, head/secure/lib/libcrypto/opensslconf-mips.h.in stable/11/secure/lib/libcrypto/opensslconf-powerpc.h.in - copied unchanged from r304320, head/secure/lib/libcrypto/opensslconf-powerpc.h.in stable/11/secure/lib/libcrypto/opensslconf-riscv.h.in - copied unchanged from r304320, head/secure/lib/libcrypto/opensslconf-riscv.h.in stable/11/secure/lib/libcrypto/opensslconf-sparc64.h.in - copied unchanged from r304320, head/secure/lib/libcrypto/opensslconf-sparc64.h.in stable/11/secure/lib/libcrypto/opensslconf-x86.h.in - copied unchanged from r304320, head/secure/lib/libcrypto/opensslconf-x86.h.in Deleted: stable/11/secure/lib/libcrypto/opensslconf-aarch64.h stable/11/secure/lib/libcrypto/opensslconf-arm.h stable/11/secure/lib/libcrypto/opensslconf-mips.h stable/11/secure/lib/libcrypto/opensslconf-powerpc.h stable/11/secure/lib/libcrypto/opensslconf-riscv.h stable/11/secure/lib/libcrypto/opensslconf-sparc64.h stable/11/secure/lib/libcrypto/opensslconf-x86.h Modified: stable/11/secure/lib/libcrypto/Makefile stable/11/secure/lib/libcrypto/Makefile.asm stable/11/secure/lib/libcrypto/Makefile.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/secure/lib/libcrypto/Makefile == --- stable/11/secure/lib/libcrypto/Makefile Wed Aug 31 19:37:10 2016 (r305149) +++ stable/11/secure/lib/libcrypto/Makefile Wed Aug 31 20:21:03 2016 (r305150) @@ -22,9 +22,9 @@ MAN+= config.5 des_modes.7 # base sources SRCS= cpt_err.c cryptlib.c cversion.c ex_data.c mem.c mem_dbg.c o_dir.c \ o_fips.c o_init.c o_str.c o_time.c uid.c -.if ${MACHINE_CPUARCH} == "amd64" +.if defined(ASM_amd64) SRCS+= x86_64cpuid.S -.elif ${MACHINE_CPUARCH} == "i386" +.elif defined(ASM_i386) SRCS+= x86cpuid.S .else SRCS+= mem_clr.c @@ -33,10 +33,10 @@ INCS+= crypto.h ebcdic.h opensslv.h ossl # aes SRCS+= aes_cfb.c aes_ctr.c aes_ecb.c aes_ige.c aes_misc.c aes_ofb.c aes_wrap.c -.if ${MACHINE_CPUARCH} == "amd64" +.if defined(ASM_amd64) SRCS+= aes-x86_64.S aesni-mb-x86_64.S aesni-sha1-x86_64.S \ aesni-sha256-x86_64.S aesni-x86_64.S bsaes-x86_64.S vpaes-x86_64.S -.elif ${MACHINE_CPUARCH} == "i386" +.elif defined(ASM_i386) SRCS+= aes-586.S aesni-x86.S vpaes-x86.S .else SRCS+= aes_cbc.c aes_core.c @@ -60,7 +60,7 @@ INCS+=asn1.h asn1_mac.h asn1t.h # bf SRCS+= bf_cfb64.c bf_ecb.c bf_ofb64.c bf_skey.c -.if ${MACHINE_CPUARCH} == "i386" +.if defined(ASM_i386) .if ${MACHINE_CPU:Mi686} SRCS+= bf-686.S .else @@ -82,10 +82,10 @@ SRCS+= bn_add.c bn_blind.c bn_const.c bn bn_exp.c bn_exp2.c bn_gcd.c bn_gf2m.c bn_kron.c bn_lib.c bn_mod.c \ bn_mont.c bn_mpi.c bn_mul.c bn_nist.c bn_prime.c bn_print.c bn_rand.c \ bn_recp.c bn_shift.c bn_sqr.c bn_sqrt.c bn_word.c bn_x931p.c -.if ${MACHINE_CPUARCH} == "amd64" +.if defined(ASM_amd64) SRCS+= rsaz-avx2.S rsaz-x86_64.S rsaz_exp.c x86_64-gcc.c x86_64-gf2m.S \ x86_64-mont.S x86_64-mont5.S -.elif ${MACHINE_CPUARCH} == "i386" +.elif defined(ASM_i386) SRCS+= bn-586.S co-586.S x86-gf2m.S x86-mont.S .else SRCS+= bn_asm.c @@ -98,9 +98,9 @@ INCS+=buffer.h # camellia SRCS+= cmll_cfb.c cmll_ctr.c cmll_ecb.c cmll_ofb.c cmll_utl.c -.if ${MACHINE_CPUARCH} == "amd64" +.if defined(ASM_amd64) SRCS+= cmll_misc.c cmll-x86_64.S -.elif ${MACHINE_CPUARCH} == "i386" +.elif defined(ASM_i386) SRCS+= cmll-x86.S .else SRCS+= camellia.c cmll_cbc.c cmll_misc.c @@ -135,7 +135,7 @@ SRCS+= cbc_cksm.c cbc_enc.c cfb64ede.c c des_old2.c ecb3_enc.c ecb_enc.c ede_cbcm_enc.c enc_read.c enc_writ.c \ fcrypt.c ofb64ede.c ofb64enc.c ofb_enc.c pcbc_enc.c qud_cksm.c \ rand_key.c read2pwd.c rpc_enc.c set_key.c str2key.c xcbc_enc.c -.if ${MACHINE_CPUARCH} == "i386" +.if defined(ASM_i386) SRCS+= crypt586.S des-586.S .else SRCS+= des_enc.c fcrypt_b.c @@ -161,7 +161,7 @@ SRCS+= ec2_mult.c ec2_oct.c ec2_smpl.c e ec_curve.c ec_cvt.c ec_err.c ec_key.c ec_lib.c ec_mult.c ec_oct.c \ ec_pmeth.c ec_print.c eck_prn.c ecp_mont.c ecp_nist.c ecp_oct.c \ ecp_smpl.c -.if ${MACHINE_CPUARCH} == "amd64" +.if defined(ASM_amd64) SRCS+= ecp_nistz256.c ecp_nistz256-x86_64.S .endif
Re: svn commit: r305114 - head/sys/arm/ti
On Wed, Aug 31, 2016 at 3:54 PM, wrote: > >> On Aug 31, 2016, at 12:22 AM, Luiz Otavio O Souza wrote: >> >> Author: loos >> Date: Wed Aug 31 07:22:14 2016 >> New Revision: 305114 >> URL: https://svnweb.freebsd.org/changeset/base/305114 >> >> Log: >> Allow the use of control module extensions to cope with specific platform >> features. >> >> Sponsored by:Rubicon Communications, LLC (Netgate) >> >> Modified: >> head/sys/arm/ti/ti_scm.c >> >> Modified: head/sys/arm/ti/ti_scm.c >> == >> --- head/sys/arm/ti/ti_scm.c Wed Aug 31 07:03:06 2016(r305113) >> +++ head/sys/arm/ti/ti_scm.c Wed Aug 31 07:22:14 2016(r305114) >> @@ -131,7 +131,11 @@ ti_scm_attach(device_t dev) >> >> ti_scm_sc = sc; >> >> - return (0); >> + /* Attach platform extensions, if any. */ >> + bus_generic_probe(dev); >> + bus_enumerate_hinted_children(dev); >> + >> + return (bus_generic_attach(dev)); >> } > > Is bus_enumerate_hinted_children really required? I think all TI platforms > are FDT-compatible No, it is not required. Fixed in r305149. Thanks! Luiz ___ 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: r305149 - head/sys/arm/ti
Author: loos Date: Wed Aug 31 19:37:10 2016 New Revision: 305149 URL: https://svnweb.freebsd.org/changeset/base/305149 Log: All the TI platforms are FDT based and it is not necessary to enumerate the hinted children (there wont be any). Spotted by: gonzo Modified: head/sys/arm/ti/ti_scm.c Modified: head/sys/arm/ti/ti_scm.c == --- head/sys/arm/ti/ti_scm.cWed Aug 31 19:30:59 2016(r305148) +++ head/sys/arm/ti/ti_scm.cWed Aug 31 19:37:10 2016(r305149) @@ -133,7 +133,6 @@ ti_scm_attach(device_t dev) /* Attach platform extensions, if any. */ bus_generic_probe(dev); - bus_enumerate_hinted_children(dev); return (bus_generic_attach(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: r305147 - in head: . share/mk
Author: bdrewery Date: Wed Aug 31 19:30:52 2016 New Revision: 305147 URL: https://svnweb.freebsd.org/changeset/base/305147 Log: Add a 'make print-dir' that simply traverses all directories and prints them. This is useful for finding connected directories. MFC after:1 week Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile head/share/mk/bsd.dep.mk head/share/mk/bsd.init.mk head/share/mk/bsd.subdir.mk head/share/mk/local.meta.sys.mk head/share/mk/sys.mk Modified: head/Makefile == --- head/Makefile Wed Aug 31 19:30:46 2016(r305146) +++ head/Makefile Wed Aug 31 19:30:52 2016(r305147) @@ -109,7 +109,8 @@ # Note: we use this awkward construct to be compatible with FreeBSD's # old make used in 10.0 and 9.2 and earlier. -.if defined(MK_DIRDEPS_BUILD) && ${MK_DIRDEPS_BUILD} == "yes" && !make(showconfig) +.if defined(MK_DIRDEPS_BUILD) && ${MK_DIRDEPS_BUILD} == "yes" && \ +!make(showconfig) && !make(print-dir) # targets/Makefile plays the role of top-level .include "targets/Makefile" .else @@ -132,7 +133,7 @@ TGTS= all all-man buildenv buildenvvars xdev-links native-xtools stageworld stagekernel stage-packages \ create-world-packages create-kernel-packages create-packages \ packages installconfig real-packages sign-packages package-pkg \ - test-system-compiler + print-dir test-system-compiler # XXX: r156740: This can't work since bsd.subdir.mk is not included ever. # It will only work for SUBDIR_TARGETS in make.conf. @@ -257,6 +258,10 @@ _TARGET_ARCH= ${XDEV_ARCH} _TARGET?= ${MACHINE} _TARGET_ARCH?= ${MACHINE_ARCH} +.if make(print-dir) +.SILENT: +.endif + # # Make sure we have an up-to-date make(1). Only world and buildworld # should do this as those are the initial targets used for upgrades. Modified: head/share/mk/bsd.dep.mk == --- head/share/mk/bsd.dep.mkWed Aug 31 19:30:46 2016(r305146) +++ head/share/mk/bsd.dep.mkWed Aug 31 19:30:52 2016(r305147) @@ -82,9 +82,9 @@ _meta_filemon=1 # since it will track dependencies itself. OBJS_DEPEND_GUESS is still used. .if !empty(.MAKEFLAGS:M-V${_V_READ_DEPEND}) || make(obj) || make(clean*) || \ ${.TARGETS:M*install*} == ${.TARGETS} || \ -make(analyze) || defined(_meta_filemon) +make(analyze) || defined(_meta_filemon) || make(print-dir) _SKIP_READ_DEPEND= 1 -.if ${MK_DIRDEPS_BUILD} == "no" +.if ${MK_DIRDEPS_BUILD} == "no" || make(analyze) || make(print-dir) .MAKE.DEPENDFILE= /dev/null .endif .endif @@ -198,7 +198,7 @@ CFLAGS+=${DEPEND_CFLAGS} .endif # !defined(_meta_filemon) .endif # defined(SRCS) -.if ${MK_DIRDEPS_BUILD} == "yes" +.if ${MK_DIRDEPS_BUILD} == "yes" && !make(analyze) && !make(print-dir) # Prevent meta.autodep.mk from tracking "local dependencies". .depend: .include Modified: head/share/mk/bsd.init.mk == --- head/share/mk/bsd.init.mk Wed Aug 31 19:30:46 2016(r305146) +++ head/share/mk/bsd.init.mk Wed Aug 31 19:30:52 2016(r305147) @@ -31,7 +31,7 @@ _SKIP_BUILD = not building at level 0 .if ${MK_META_MODE} == "yes" .if !exists(/dev/filemon) && \ ${UPDATE_DEPENDFILE:Uyes:tl} != "no" && !defined(NO_FILEMON) && \ -!make(showconfig) && ${.MAKEFLAGS:M-V} == "" +!make(showconfig) && !make(print-dir) && ${.MAKEFLAGS:M-V} == "" .warning The filemon module (/dev/filemon) is not loaded. .warning META_MODE is less useful for incremental builds without filemon. .warning 'kldload filemon' or pass -DNO_FILEMON to suppress this warning. Modified: head/share/mk/bsd.subdir.mk == --- head/share/mk/bsd.subdir.mk Wed Aug 31 19:30:46 2016(r305146) +++ head/share/mk/bsd.subdir.mk Wed Aug 31 19:30:52 2016(r305147) @@ -42,15 +42,15 @@ SUBDIR_TARGETS+= \ all all-man analyze buildconfig buildfiles buildincludes \ checkdpadd clean cleandepend cleandir cleanilinks \ cleanobj depend distribute files includes installconfig \ - installfiles installincludes realinstall lint maninstall \ - manlint obj objlink tags \ + installfiles installincludes print-dir realinstall lint \ + maninstall manlint obj objlink tags \ # Described above. STANDALONE_SUBDIR_TARGETS+= \ all-man buildconfig buildfiles buildincludes check checkdpadd \ clean cleandepend cleandir cleanilinks cleanobj files includes \ - installconfig installincludes installfiles maninstall manlint \ - obj objlink \ + installconfig installincludes installfiles print-dir \ +
svn commit: r305146 - in head: cddl/usr.sbin/dtrace cddl/usr.sbin/lockstat cddl/usr.sbin/plockstat lib/clang/libclangformat lib/clang/libclangtoolingcore lib/libc/tests/stdlib lib/libproc lib/libpr...
Author: bdrewery Date: Wed Aug 31 19:30:46 2016 New Revision: 305146 URL: https://svnweb.freebsd.org/changeset/base/305146 Log: DIRDEPS_BUILD: Update dependencies. Sponsored by: EMC / Isilon Storage Division Modified: head/cddl/usr.sbin/dtrace/Makefile.depend head/cddl/usr.sbin/lockstat/Makefile.depend head/cddl/usr.sbin/plockstat/Makefile.depend head/lib/clang/libclangformat/Makefile.depend head/lib/clang/libclangtoolingcore/Makefile.depend head/lib/libc/tests/stdlib/Makefile.depend head/lib/libproc/Makefile.depend head/lib/libproc/tests/Makefile.depend head/lib/librtld_db/Makefile.depend head/secure/usr.bin/ssh/Makefile.depend head/usr.bin/nfsstat/Makefile.depend head/usr.bin/tar/tests/Makefile.depend head/usr.sbin/bhyve/Makefile.depend head/usr.sbin/pw/tests/Makefile.depend Modified: head/cddl/usr.sbin/dtrace/Makefile.depend == --- head/cddl/usr.sbin/dtrace/Makefile.depend Wed Aug 31 19:30:00 2016 (r305145) +++ head/cddl/usr.sbin/dtrace/Makefile.depend Wed Aug 31 19:30:46 2016 (r305146) @@ -13,7 +13,9 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/libcxxrt \ lib/libelf \ + lib/libkvm \ lib/libproc \ + lib/libprocstat \ lib/librtld_db \ lib/libthr \ lib/libutil \ Modified: head/cddl/usr.sbin/lockstat/Makefile.depend == --- head/cddl/usr.sbin/lockstat/Makefile.depend Wed Aug 31 19:30:00 2016 (r305145) +++ head/cddl/usr.sbin/lockstat/Makefile.depend Wed Aug 31 19:30:46 2016 (r305146) @@ -13,7 +13,9 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/libcxxrt \ lib/libelf \ + lib/libkvm \ lib/libproc \ + lib/libprocstat \ lib/librt \ lib/librtld_db \ lib/libthr \ Modified: head/cddl/usr.sbin/plockstat/Makefile.depend == --- head/cddl/usr.sbin/plockstat/Makefile.dependWed Aug 31 19:30:00 2016(r305145) +++ head/cddl/usr.sbin/plockstat/Makefile.dependWed Aug 31 19:30:46 2016(r305146) @@ -13,7 +13,9 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/libcxxrt \ lib/libelf \ + lib/libkvm \ lib/libproc \ + lib/libprocstat \ lib/librtld_db \ lib/libthr \ lib/libutil \ Modified: head/lib/clang/libclangformat/Makefile.depend == --- head/lib/clang/libclangformat/Makefile.depend Wed Aug 31 19:30:00 2016(r305145) +++ head/lib/clang/libclangformat/Makefile.depend Wed Aug 31 19:30:46 2016(r305146) @@ -6,6 +6,7 @@ DIRDEPS = \ include/xlocale \ lib/libc++ \ lib/msun \ + usr.bin/clang/clang-tblgen.host \ .include Modified: head/lib/clang/libclangtoolingcore/Makefile.depend == --- head/lib/clang/libclangtoolingcore/Makefile.depend Wed Aug 31 19:30:00 2016(r305145) +++ head/lib/clang/libclangtoolingcore/Makefile.depend Wed Aug 31 19:30:46 2016(r305146) @@ -6,6 +6,7 @@ DIRDEPS = \ include/xlocale \ lib/libc++ \ lib/msun \ + usr.bin/clang/clang-tblgen.host \ .include Modified: head/lib/libc/tests/stdlib/Makefile.depend == --- head/lib/libc/tests/stdlib/Makefile.depend Wed Aug 31 19:30:00 2016 (r305145) +++ head/lib/libc/tests/stdlib/Makefile.depend Wed Aug 31 19:30:46 2016 (r305146) @@ -11,9 +11,10 @@ DIRDEPS = \ lib/atf/libatf-c++ \ lib/libc \ lib/libc++ \ - lib/libthr \ lib/libcompiler_rt \ + lib/libcxxrt \ lib/libnetbsd \ + lib/libthr \ lib/libutil \ lib/msun \ Modified: head/lib/libproc/Makefile.depend == --- head/lib/libproc/Makefile.dependWed Aug 31 19:30:00 2016 (r305145) +++ head/lib/libproc/Makefile.dependWed Aug 31 19:30:46 2016 (r305146) @@ -12,6 +12,7 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/libcxxrt \ lib/libelf \ + lib/libprocstat \ lib/librtld_db \ lib/libutil \ Modified: head/lib/libproc/tests/Makefile.depend == --- head/lib/libproc/tests/Makefile.depend Wed Aug 31 19:30:00 2016 (r305145) +++ head/lib/libproc/tests/Makefile.depend Wed Aug 31 19:30:46 2016 (r305146) @@ -13,7 +13,9 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/libcxxrt \ lib/libelf \ + lib/libkvm \ lib/libproc \ +
svn commit: r305148 - in head: cddl/usr.sbin/zfsd libexec/rtld-elf/tests/libpythagoras libexec/rtld-elf/tests/target targets/pseudo/tests targets/pseudo/userland targets/pseudo/userland/cddl target...
Author: bdrewery Date: Wed Aug 31 19:30:59 2016 New Revision: 305148 URL: https://svnweb.freebsd.org/changeset/base/305148 Log: DIRDEPS_BUILD: Add some missing dirctories to the build. Sponsored by: EMC / Isilon Storage Division Added: head/cddl/usr.sbin/zfsd/Makefile.depend (contents, props changed) head/libexec/rtld-elf/tests/libpythagoras/Makefile.depend (contents, props changed) head/libexec/rtld-elf/tests/target/Makefile.depend (contents, props changed) head/tests/sys/pjdfstest/pjdfstest/Makefile.depend (contents, props changed) head/tests/sys/sys/Makefile.depend (contents, props changed) head/usr.bin/bsdcat/tests/Makefile.depend (contents, props changed) head/usr.bin/sdiff/tests/Makefile.depend (contents, props changed) head/usr.bin/xinstall/tests/Makefile.depend (contents, props changed) head/usr.sbin/extattr/tests/Makefile.depend (contents, props changed) head/usr.sbin/pmcstudy/Makefile.depend (contents, props changed) head/usr.sbin/ypldap/Makefile.depend (contents, props changed) Modified: head/targets/pseudo/tests/Makefile.depend head/targets/pseudo/userland/Makefile.depend head/targets/pseudo/userland/cddl/Makefile.depend head/targets/pseudo/userland/libexec/Makefile.depend Added: head/cddl/usr.sbin/zfsd/Makefile.depend == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/usr.sbin/zfsd/Makefile.depend Wed Aug 31 19:30:59 2016 (r305148) @@ -0,0 +1,35 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + cddl/lib/libavl \ + cddl/lib/libnvpair \ + cddl/lib/libumem \ + cddl/lib/libuutil \ + cddl/lib/libzfs \ + cddl/lib/libzfs_core \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libc++ \ + lib/libcompiler_rt \ + lib/libcxxrt \ + lib/libdevdctl \ + lib/libexpat \ + lib/libgeom \ + lib/libmd \ + lib/libsbuf \ + lib/libthr \ + lib/libutil \ + lib/libz \ + lib/msun \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/libexec/rtld-elf/tests/libpythagoras/Makefile.depend == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/rtld-elf/tests/libpythagoras/Makefile.depend Wed Aug 31 19:30:59 2016(r305148) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/msun \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/libexec/rtld-elf/tests/target/Makefile.depend == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/rtld-elf/tests/target/Makefile.depend Wed Aug 31 19:30:59 2016(r305148) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + libexec/rtld-elf/tests/libpythagoras \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Modified: head/targets/pseudo/tests/Makefile.depend == --- head/targets/pseudo/tests/Makefile.depend Wed Aug 31 19:30:52 2016 (r305147) +++ head/targets/pseudo/tests/Makefile.depend Wed Aug 31 19:30:59 2016 (r305148) @@ -166,6 +166,8 @@ DIRDEPS= \ libexec/atf/atf-sh/tests \ libexec/atf/tests \ libexec/rtld-elf/tests \ + libexec/rtld-elf/tests/libpythagoras \ + libexec/rtld-elf/tests/target \ libexec/tests \ sbin/devd/tests \ sbin/dhclient/tests \ @@ -213,6 +215,7 @@ DIRDEPS= \ tests/sys/mqueue \ tests/sys/netinet \ tests/sys/opencrypto \ + tests/sys/pjdfstest/pjdfstest \ tests/sys/pjdfstest/tests \ tests/sys/pjdfstest/tests/chflags \ tests/sys/pjdfstest/tests/chmod \ @@ -230,6 +233,7 @@ DIRDEPS= \ tests/sys/pjdfstest/tests/truncate \ tests/sys/pjdfstest/tests/unlink \ tests/sys/posixshm \ + tests/sys/sys \ tests/sys/vfs \ tests/sys/vm \ usr.bin/apply/tests \ @@ -303,6 +307,7 @@ DIRDEPS= \ usr.bin/mkimg/tests \ usr.bin/ncal/tests \ usr.bin/printf/tests \ + usr.bin/sdiff/tests \ usr.bin/sed/tests \
svn commit: r305145 - head/gnu/lib/libgcc
Author: bdrewery Date: Wed Aug 31 19:30:00 2016 New Revision: 305145 URL: https://svnweb.freebsd.org/changeset/base/305145 Log: DIRDEPS_BUILD: Avoid cyclic dependency with libc++. The DIRDEPS_BUILD does not have a 'make includes' phase, so it would otherwise want libc++ to be fully built/staged before building libgcc. Using the header directly works. MFC after:3 days Sponsored by: EMC / Isilon Storage Division Modified: head/gnu/lib/libgcc/Makefile Modified: head/gnu/lib/libgcc/Makefile == --- head/gnu/lib/libgcc/MakefileWed Aug 31 18:49:50 2016 (r305144) +++ head/gnu/lib/libgcc/MakefileWed Aug 31 19:30:00 2016 (r305145) @@ -95,6 +95,10 @@ CXXFLAGS+= -std=c++11 .endif CXXFLAGS+= -fno-rtti STATIC_CXXFLAGS+= -fvisibility=hidden -fPIC +.if ${MK_DIRDEPS_BUILD} == "yes" +# Avoid dependency on lib/libc++ +CFLAGS+= -I${SRCTOP}/contrib/libc++/include +.endif .else # MK_LLVM_LIBUNWIND ___ 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: r305114 - head/sys/arm/ti
> On Aug 31, 2016, at 12:22 AM, Luiz Otavio O Souzawrote: > > Author: loos > Date: Wed Aug 31 07:22:14 2016 > New Revision: 305114 > URL: https://svnweb.freebsd.org/changeset/base/305114 > > Log: > Allow the use of control module extensions to cope with specific platform > features. > > Sponsored by:Rubicon Communications, LLC (Netgate) > > Modified: > head/sys/arm/ti/ti_scm.c > > Modified: head/sys/arm/ti/ti_scm.c > == > --- head/sys/arm/ti/ti_scm.c Wed Aug 31 07:03:06 2016(r305113) > +++ head/sys/arm/ti/ti_scm.c Wed Aug 31 07:22:14 2016(r305114) > @@ -131,7 +131,11 @@ ti_scm_attach(device_t dev) > > ti_scm_sc = sc; > > - return (0); > + /* Attach platform extensions, if any. */ > + bus_generic_probe(dev); > + bus_enumerate_hinted_children(dev); > + > + return (bus_generic_attach(dev)); > } Is bus_enumerate_hinted_children really required? I think all TI platforms are FDT-compatible ___ 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: r305144 - head/lib/libc/net
Author: ache Date: Wed Aug 31 18:49:50 2016 New Revision: 305144 URL: https://svnweb.freebsd.org/changeset/base/305144 Log: 'addrlen' does not matter when we need to find the first non-zero bit in the byte from the left and 'addrlen' already counted in 'lim'. PR: 212121 Submitted by: herbie.robin...@stratus.com MFC after: 7 days Modified: head/lib/libc/net/getaddrinfo.c head/lib/libc/net/name6.c Modified: head/lib/libc/net/getaddrinfo.c == --- head/lib/libc/net/getaddrinfo.c Wed Aug 31 18:37:51 2016 (r305143) +++ head/lib/libc/net/getaddrinfo.c Wed Aug 31 18:49:50 2016 (r305144) @@ -949,7 +949,7 @@ matchlen(struct sockaddr *src, struct so while (s < lim) if ((r = (*d++ ^ *s++)) != 0) { - while (r < addrlen * 8) { + while ((r & 0x80) == 0) { match++; r <<= 1; } Modified: head/lib/libc/net/name6.c == --- head/lib/libc/net/name6.c Wed Aug 31 18:37:51 2016(r305143) +++ head/lib/libc/net/name6.c Wed Aug 31 18:49:50 2016(r305144) @@ -930,7 +930,7 @@ matchlen(struct sockaddr *src, struct so while (s < lim) if ((r = (*d++ ^ *s++)) != 0) { - while (r < addrlen * 8) { + while ((r & 0x80) == 0) { match++; r <<= 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: r305143 - head/sys/kern
Author: emaste Date: Wed Aug 31 18:37:51 2016 New Revision: 305143 URL: https://svnweb.freebsd.org/changeset/base/305143 Log: Regnerate after r305140, getdtablesize in capability mode Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/init_sysent.c Modified: head/sys/kern/init_sysent.c == --- head/sys/kern/init_sysent.c Wed Aug 31 18:37:04 2016(r305142) +++ head/sys/kern/init_sysent.c Wed Aug 31 18:37:51 2016(r305143) @@ -135,7 +135,7 @@ struct sysent sysent[] = { { AS(getitimer_args), (sy_call_t *)sys_getitimer, AUE_GETITIMER, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 86 = getitimer */ { compat(AS(gethostname_args),gethostname), AUE_SYSCTL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },/* 87 = old gethostname */ { compat(AS(sethostname_args),sethostname), AUE_SYSCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 88 = old sethostname */ - { 0, (sy_call_t *)sys_getdtablesize, AUE_GETDTABLESIZE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 89 = getdtablesize */ + { 0, (sy_call_t *)sys_getdtablesize, AUE_GETDTABLESIZE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },/* 89 = getdtablesize */ { AS(dup2_args), (sy_call_t *)sys_dup2, AUE_DUP2, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 90 = dup2 */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 91 = getdopt */ { AS(fcntl_args), (sy_call_t *)sys_fcntl, AUE_FCNTL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 92 = fcntl */ ___ 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: r305142 - in stable: 10/sbin/hastd 11/sbin/hastd
Author: dim Date: Wed Aug 31 18:37:04 2016 New Revision: 305142 URL: https://svnweb.freebsd.org/changeset/base/305142 Log: MFC r304969: Define hastd's STRICT_ALIGN macro in a defined and portable way. Modified: stable/10/sbin/hastd/lzf.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sbin/hastd/lzf.h Directory Properties: stable/11/ (props changed) Modified: stable/10/sbin/hastd/lzf.h == --- stable/10/sbin/hastd/lzf.h Wed Aug 31 18:35:41 2016(r305141) +++ stable/10/sbin/hastd/lzf.h Wed Aug 31 18:37:04 2016(r305142) @@ -132,7 +132,11 @@ lzf_decompress (const void *const in_dat * Unconditionally aligning does not cost very much, so do it if unsure */ #ifndef STRICT_ALIGN -# define STRICT_ALIGN !(defined(__i386) || defined (__amd64)) +# if !(defined(__i386) || defined (__amd64)) +# define STRICT_ALIGN 1 +# else +# define STRICT_ALIGN 0 +# endif #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"
svn commit: r305142 - in stable: 10/sbin/hastd 11/sbin/hastd
Author: dim Date: Wed Aug 31 18:37:04 2016 New Revision: 305142 URL: https://svnweb.freebsd.org/changeset/base/305142 Log: MFC r304969: Define hastd's STRICT_ALIGN macro in a defined and portable way. Modified: stable/11/sbin/hastd/lzf.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sbin/hastd/lzf.h Directory Properties: stable/10/ (props changed) Modified: stable/11/sbin/hastd/lzf.h == --- stable/11/sbin/hastd/lzf.h Wed Aug 31 18:35:41 2016(r305141) +++ stable/11/sbin/hastd/lzf.h Wed Aug 31 18:37:04 2016(r305142) @@ -132,7 +132,11 @@ lzf_decompress (const void *const in_dat * Unconditionally aligning does not cost very much, so do it if unsure */ #ifndef STRICT_ALIGN -# define STRICT_ALIGN !(defined(__i386) || defined (__amd64)) +# if !(defined(__i386) || defined (__amd64)) +# define STRICT_ALIGN 1 +# else +# define STRICT_ALIGN 0 +# endif #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"
svn commit: r305141 - head/sys/arm/ti/am335x
Author: loos Date: Wed Aug 31 18:35:41 2016 New Revision: 305141 URL: https://svnweb.freebsd.org/changeset/base/305141 Log: Fix the build. Works better when the file with the #define is actually included... Modified: head/sys/arm/ti/am335x/am335x_prcm.c Modified: head/sys/arm/ti/am335x/am335x_prcm.c == --- head/sys/arm/ti/am335x/am335x_prcm.cWed Aug 31 18:33:15 2016 (r305140) +++ head/sys/arm/ti/am335x/am335x_prcm.cWed Aug 31 18:35:41 2016 (r305141) @@ -52,6 +52,8 @@ __FBSDID("$FreeBSD$"); #include +#include "am335x_scm.h" + #define CM_PER 0 #define CM_PER_L4LS_CLKSTCTRL (CM_PER + 0x000) #define CM_PER_L3S_CLKSTCTRL (CM_PER + 0x004) ___ 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: r305140 - head/sys/kern
Author: emaste Date: Wed Aug 31 18:33:15 2016 New Revision: 305140 URL: https://svnweb.freebsd.org/changeset/base/305140 Log: Allow getdtablesize in capability mode getdtablesize is "trivial global state" and is similar to getrlimit(RLIMIT_NOFILE), so should be permitted in capability mode. Reviewed by: oshogbo MFC after:1 week Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D7719 Modified: head/sys/kern/capabilities.conf Modified: head/sys/kern/capabilities.conf == --- head/sys/kern/capabilities.conf Wed Aug 31 18:10:41 2016 (r305139) +++ head/sys/kern/capabilities.conf Wed Aug 31 18:33:15 2016 (r305140) @@ -248,6 +248,7 @@ getdirentries ## Allow querying certain trivial global state. ## getdomainname +getdtablesize ## ## Allow querying current process credential state. ___ 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: r305107 - head/sys/boot/forth
> On Aug 31, 2016, at 7:43 AM, Warner Loshwrote: > > On Wed, Aug 31, 2016 at 8:41 AM, Devin Teske wrote: >> Please remove the following: >> >> "Unsure why we don't just have start" >> >> Others beside yourself have great understanding of the Forth and we don't >> need questioning comments in the code. > > To be fair, it was just left in there accidentally. However, could you > explain it to me? That answer is insulting without being actually > helpful in resolving the situation. > Many apologies, I did not mean to be insulting -- just under the gun and short on time for eloquence (poor excuse, I know). Let me try and put something together that better answers any question(s) you may have about the Forth. If you have some time later, maybe we can catch up on IRC and we can either improve the code, the comments, or understanding thereof not only for ourselves but for others as well. -- Cheers, Devin ___ 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: r305139 - head/bin/df
Author: cem Date: Wed Aug 31 18:10:41 2016 New Revision: 305139 URL: https://svnweb.freebsd.org/changeset/base/305139 Log: df(1): Allow duplicate -l flags gracefully Rather than producing a misleading error message when duplicate -l flags are provided to df(1), simply ignore extra flags and proceed as if only one was specified. This seems most reasonable given the usage for -l: -l Only display information about locally-mounted file systems. l and t flags still conflict, as before. PR: 208169 Reported by: by at reorigin.com Reviewed by: allanjude Modified: head/bin/df/df.c Modified: head/bin/df/df.c == --- head/bin/df/df.cWed Aug 31 18:00:41 2016(r305138) +++ head/bin/df/df.cWed Aug 31 18:10:41 2016(r305139) @@ -166,6 +166,9 @@ main(int argc, char *argv[]) hflag = 0; break; case 'l': + /* Ignore duplicate -l */ + if (lflag) + break; if (vfslist != NULL) xo_errx(1, "-l and -t are mutually exclusive."); vfslist = makevfslist(makenetvfslist()); ___ 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: r305138 - in stable: 10/contrib/ipfilter 10/sys/contrib/ipfilter/netinet 11/contrib/ipfilter 11/sys/contrib/ipfilter/netinet
Author: dim Date: Wed Aug 31 18:00:41 2016 New Revision: 305138 URL: https://svnweb.freebsd.org/changeset/base/305138 Log: MFC r304953: Define ipfilter's SOLARIS macro in a defined and portable way. Reviewed by: cy Differential Revision: https://reviews.freebsd.org/D7671 MFC r304959 (by kib): Complete r304953. Sponsored by: The FreeBSD Foundation MFC r304964: Follow-up to r304953, in which I broke the build: apparently the SOLARIS macro is defined in lots of different places in ipfilter, so replace all of the nonportable definitions with portable ones. Pointy hat to:dim Modified: stable/10/contrib/ipfilter/opts.h stable/10/sys/contrib/ipfilter/netinet/ip_compat.h stable/10/sys/contrib/ipfilter/netinet/ip_fil.h stable/10/sys/contrib/ipfilter/netinet/ip_log.c stable/10/sys/contrib/ipfilter/netinet/ip_nat.h stable/10/sys/contrib/ipfilter/netinet/ip_proxy.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/ipfilter/opts.h stable/11/sys/contrib/ipfilter/netinet/ip_compat.h stable/11/sys/contrib/ipfilter/netinet/ip_fil.h stable/11/sys/contrib/ipfilter/netinet/ip_log.c stable/11/sys/contrib/ipfilter/netinet/ip_nat.h stable/11/sys/contrib/ipfilter/netinet/ip_proxy.h Directory Properties: stable/11/ (props changed) Modified: stable/10/contrib/ipfilter/opts.h == --- stable/10/contrib/ipfilter/opts.h Wed Aug 31 17:52:11 2016 (r305137) +++ stable/10/contrib/ipfilter/opts.h Wed Aug 31 18:00:41 2016 (r305138) @@ -12,7 +12,11 @@ #define__OPTS_H__ #ifndefSOLARIS -#defineSOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4))) +# if defined(sun) && (defined(__svr4__) || defined(__SVR4)) +# define SOLARIS 1 +# else +# define SOLARIS 0 +# endif #endif #defineOPT_REMOVE 0x01 #defineOPT_DEBUG 0x02 Modified: stable/10/sys/contrib/ipfilter/netinet/ip_compat.h == --- stable/10/sys/contrib/ipfilter/netinet/ip_compat.h Wed Aug 31 17:52:11 2016(r305137) +++ stable/10/sys/contrib/ipfilter/netinet/ip_compat.h Wed Aug 31 18:00:41 2016(r305138) @@ -32,7 +32,13 @@ # define __KERNEL__ #endif -#defineSOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4))) +#ifndefSOLARIS +# if defined(sun) && (defined(__svr4__) || defined(__SVR4)) +# define SOLARIS 1 +# else +# define SOLARIS 0 +# endif +#endif #if defined(__SVR4) || defined(__svr4__) || defined(__sgi) Modified: stable/10/sys/contrib/ipfilter/netinet/ip_fil.h == --- stable/10/sys/contrib/ipfilter/netinet/ip_fil.h Wed Aug 31 17:52:11 2016(r305137) +++ stable/10/sys/contrib/ipfilter/netinet/ip_fil.h Wed Aug 31 18:00:41 2016(r305138) @@ -29,7 +29,11 @@ #endif #ifndefSOLARIS -# define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4))) +# if defined(sun) && (defined(__svr4__) || defined(__SVR4)) +# define SOLARIS 1 +# else +# define SOLARIS 0 +# endif #endif #ifndef__P Modified: stable/10/sys/contrib/ipfilter/netinet/ip_log.c == --- stable/10/sys/contrib/ipfilter/netinet/ip_log.c Wed Aug 31 17:52:11 2016(r305137) +++ stable/10/sys/contrib/ipfilter/netinet/ip_log.c Wed Aug 31 18:00:41 2016(r305138) @@ -19,7 +19,11 @@ # include #endif #ifndef SOLARIS -# define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4))) +# if defined(sun) && (defined(__svr4__) || defined(__SVR4)) +# define SOLARIS 1 +# else +# define SOLARIS 0 +# endif #endif #include #include Modified: stable/10/sys/contrib/ipfilter/netinet/ip_nat.h == --- stable/10/sys/contrib/ipfilter/netinet/ip_nat.h Wed Aug 31 17:52:11 2016(r305137) +++ stable/10/sys/contrib/ipfilter/netinet/ip_nat.h Wed Aug 31 18:00:41 2016(r305138) @@ -13,8 +13,12 @@ #ifndef__IP_NAT_H__ #define__IP_NAT_H__ -#ifndef SOLARIS -#defineSOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4))) +#ifndefSOLARIS +# if defined(sun) && (defined(__svr4__) || defined(__SVR4)) +# define SOLARIS 1 +# else +# define SOLARIS 0 +# endif #endif #if defined(__STDC__) || defined(__GNUC__) || defined(_AIX51) Modified: stable/10/sys/contrib/ipfilter/netinet/ip_proxy.h == ---
svn commit: r305138 - in stable: 10/contrib/ipfilter 10/sys/contrib/ipfilter/netinet 11/contrib/ipfilter 11/sys/contrib/ipfilter/netinet
Author: dim Date: Wed Aug 31 18:00:41 2016 New Revision: 305138 URL: https://svnweb.freebsd.org/changeset/base/305138 Log: MFC r304953: Define ipfilter's SOLARIS macro in a defined and portable way. Reviewed by: cy Differential Revision: https://reviews.freebsd.org/D7671 MFC r304959 (by kib): Complete r304953. Sponsored by: The FreeBSD Foundation MFC r304964: Follow-up to r304953, in which I broke the build: apparently the SOLARIS macro is defined in lots of different places in ipfilter, so replace all of the nonportable definitions with portable ones. Pointy hat to:dim Modified: stable/11/contrib/ipfilter/opts.h stable/11/sys/contrib/ipfilter/netinet/ip_compat.h stable/11/sys/contrib/ipfilter/netinet/ip_fil.h stable/11/sys/contrib/ipfilter/netinet/ip_log.c stable/11/sys/contrib/ipfilter/netinet/ip_nat.h stable/11/sys/contrib/ipfilter/netinet/ip_proxy.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/ipfilter/opts.h stable/10/sys/contrib/ipfilter/netinet/ip_compat.h stable/10/sys/contrib/ipfilter/netinet/ip_fil.h stable/10/sys/contrib/ipfilter/netinet/ip_log.c stable/10/sys/contrib/ipfilter/netinet/ip_nat.h stable/10/sys/contrib/ipfilter/netinet/ip_proxy.h Directory Properties: stable/10/ (props changed) Modified: stable/11/contrib/ipfilter/opts.h == --- stable/11/contrib/ipfilter/opts.h Wed Aug 31 17:52:11 2016 (r305137) +++ stable/11/contrib/ipfilter/opts.h Wed Aug 31 18:00:41 2016 (r305138) @@ -12,7 +12,11 @@ #define__OPTS_H__ #ifndefSOLARIS -#defineSOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4))) +# if defined(sun) && (defined(__svr4__) || defined(__SVR4)) +# define SOLARIS 1 +# else +# define SOLARIS 0 +# endif #endif #defineOPT_REMOVE 0x01 #defineOPT_DEBUG 0x02 Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h == --- stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Wed Aug 31 17:52:11 2016(r305137) +++ stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Wed Aug 31 18:00:41 2016(r305138) @@ -32,7 +32,13 @@ # define __KERNEL__ #endif -#defineSOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4))) +#ifndefSOLARIS +# if defined(sun) && (defined(__svr4__) || defined(__SVR4)) +# define SOLARIS 1 +# else +# define SOLARIS 0 +# endif +#endif #if defined(__SVR4) || defined(__svr4__) || defined(__sgi) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_fil.h == --- stable/11/sys/contrib/ipfilter/netinet/ip_fil.h Wed Aug 31 17:52:11 2016(r305137) +++ stable/11/sys/contrib/ipfilter/netinet/ip_fil.h Wed Aug 31 18:00:41 2016(r305138) @@ -29,7 +29,11 @@ #endif #ifndefSOLARIS -# define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4))) +# if defined(sun) && (defined(__svr4__) || defined(__SVR4)) +# define SOLARIS 1 +# else +# define SOLARIS 0 +# endif #endif #ifndef__P Modified: stable/11/sys/contrib/ipfilter/netinet/ip_log.c == --- stable/11/sys/contrib/ipfilter/netinet/ip_log.c Wed Aug 31 17:52:11 2016(r305137) +++ stable/11/sys/contrib/ipfilter/netinet/ip_log.c Wed Aug 31 18:00:41 2016(r305138) @@ -19,7 +19,11 @@ # include #endif #ifndef SOLARIS -# define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4))) +# if defined(sun) && (defined(__svr4__) || defined(__SVR4)) +# define SOLARIS 1 +# else +# define SOLARIS 0 +# endif #endif #include #include Modified: stable/11/sys/contrib/ipfilter/netinet/ip_nat.h == --- stable/11/sys/contrib/ipfilter/netinet/ip_nat.h Wed Aug 31 17:52:11 2016(r305137) +++ stable/11/sys/contrib/ipfilter/netinet/ip_nat.h Wed Aug 31 18:00:41 2016(r305138) @@ -13,8 +13,12 @@ #ifndef__IP_NAT_H__ #define__IP_NAT_H__ -#ifndef SOLARIS -#defineSOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4))) +#ifndefSOLARIS +# if defined(sun) && (defined(__svr4__) || defined(__SVR4)) +# define SOLARIS 1 +# else +# define SOLARIS 0 +# endif #endif #if defined(__STDC__) || defined(__GNUC__) || defined(_AIX51) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_proxy.h == ---
svn commit: r305137 - head/sys/kern
Author: allanjude Date: Wed Aug 31 17:52:11 2016 New Revision: 305137 URL: https://svnweb.freebsd.org/changeset/base/305137 Log: Eliminate unnecessary loop in _cap_check() Calling cap_rights_contains() several times with the same inputs is not going to produce a different output. The variable being iterated, i, is never used inside the for loop. The loop is actually done in cap_rights_contains() Submitted by: Ryan MoellerReviewed by: oshogbo, ed MFC after:1 month Differential Revision:https://reviews.freebsd.org/D7369 Modified: head/sys/kern/sys_capability.c Modified: head/sys/kern/sys_capability.c == --- head/sys/kern/sys_capability.c Wed Aug 31 17:36:43 2016 (r305136) +++ head/sys/kern/sys_capability.c Wed Aug 31 17:52:11 2016 (r305137) @@ -150,16 +150,13 @@ static inline int _cap_check(const cap_rights_t *havep, const cap_rights_t *needp, enum ktr_cap_fail_type type) { - int i; - for (i = 0; i < nitems(havep->cr_rights); i++) { - if (!cap_rights_contains(havep, needp)) { + if (!cap_rights_contains(havep, needp)) { #ifdef KTRACE - if (KTRPOINT(curthread, KTR_CAPFAIL)) - ktrcapfail(type, needp, havep); + if (KTRPOINT(curthread, KTR_CAPFAIL)) + ktrcapfail(type, needp, havep); #endif - return (ENOTCAPABLE); - } + return (ENOTCAPABLE); } return (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: r305136 - in stable/11/sys: arm64/arm64 arm64/cavium arm64/include dev/pci
Author: andrew Date: Wed Aug 31 17:36:43 2016 New Revision: 305136 URL: https://svnweb.freebsd.org/changeset/base/305136 Log: MFC 302847, 302848, 302852, 302853: Remove the remaining non-INTRNG support from the arm64 code. Modified: stable/11/sys/arm64/arm64/autoconf.c stable/11/sys/arm64/arm64/gic_v3.c stable/11/sys/arm64/arm64/gic_v3_fdt.c stable/11/sys/arm64/arm64/gic_v3_var.h stable/11/sys/arm64/arm64/mp_machdep.c stable/11/sys/arm64/arm64/nexus.c stable/11/sys/arm64/cavium/thunder_pcie_pem_fdt.c stable/11/sys/arm64/include/intr.h stable/11/sys/dev/pci/pci_host_generic.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm64/arm64/autoconf.c == --- stable/11/sys/arm64/arm64/autoconf.cWed Aug 31 17:30:21 2016 (r305135) +++ stable/11/sys/arm64/arm64/autoconf.cWed Aug 31 17:36:43 2016 (r305136) @@ -81,12 +81,8 @@ static void configure_final(void *dummy) { -#ifdef INTRNG /* Enable interrupt reception on this CPU */ intr_enable(); -#else - arm_enable_intr(); -#endif cninit_finish(); if (bootverbose) Modified: stable/11/sys/arm64/arm64/gic_v3.c == --- stable/11/sys/arm64/arm64/gic_v3.c Wed Aug 31 17:30:21 2016 (r305135) +++ stable/11/sys/arm64/arm64/gic_v3.c Wed Aug 31 17:36:43 2016 (r305136) @@ -69,7 +69,6 @@ __FBSDID("$FreeBSD$"); static bus_read_ivar_t gic_v3_read_ivar; -#ifdef INTRNG static pic_disable_intr_t gic_v3_disable_intr; static pic_enable_intr_t gic_v3_enable_intr; static pic_map_intr_t gic_v3_map_intr; @@ -90,18 +89,6 @@ static u_int gic_irq_cpu; static u_int sgi_to_ipi[GIC_LAST_SGI - GIC_FIRST_SGI + 1]; static u_int sgi_first_unused = GIC_FIRST_SGI; #endif -#else -/* Device and PIC methods */ -static int gic_v3_bind(device_t, u_int, u_int); -static void gic_v3_dispatch(device_t, struct trapframe *); -static void gic_v3_eoi(device_t, u_int); -static void gic_v3_mask_irq(device_t, u_int); -static void gic_v3_unmask_irq(device_t, u_int); -#ifdef SMP -static void gic_v3_init_secondary(device_t); -static void gic_v3_ipi_send(device_t, cpuset_t, u_int); -#endif -#endif static device_method_t gic_v3_methods[] = { /* Device interface */ @@ -110,7 +97,6 @@ static device_method_t gic_v3_methods[] /* Bus interface */ DEVMETHOD(bus_read_ivar,gic_v3_read_ivar), -#ifdef INTRNG /* Interrupt controller interface */ DEVMETHOD(pic_disable_intr, gic_v3_disable_intr), DEVMETHOD(pic_enable_intr, gic_v3_enable_intr), @@ -126,18 +112,6 @@ static device_method_t gic_v3_methods[] DEVMETHOD(pic_ipi_send, gic_v3_ipi_send), DEVMETHOD(pic_ipi_setup,gic_v3_ipi_setup), #endif -#else - /* PIC interface */ - DEVMETHOD(pic_bind, gic_v3_bind), - DEVMETHOD(pic_dispatch, gic_v3_dispatch), - DEVMETHOD(pic_eoi, gic_v3_eoi), - DEVMETHOD(pic_mask, gic_v3_mask_irq), - DEVMETHOD(pic_unmask, gic_v3_unmask_irq), -#ifdef SMP - DEVMETHOD(pic_init_secondary, gic_v3_init_secondary), - DEVMETHOD(pic_ipi_send, gic_v3_ipi_send), -#endif -#endif /* End */ DEVMETHOD_END @@ -188,7 +162,6 @@ static gic_v3_initseq_t gic_v3_secondary }; #endif -#ifdef INTRNG uint32_t gic_r_read_4(device_t dev, bus_size_t offset) { @@ -224,7 +197,6 @@ gic_r_write_8(device_t dev, bus_size_t o sc = device_get_softc(dev); bus_write_8(sc->gic_redists.pcpu[PCPU_GET(cpuid)], offset, val); } -#endif /* * Device interface. @@ -238,10 +210,8 @@ gic_v3_attach(device_t dev) int rid; int err; size_t i; -#ifdef INTRNG u_int irq; const char *name; -#endif sc = device_get_softc(dev); sc->gic_registered = FALSE; @@ -290,7 +260,6 @@ gic_v3_attach(device_t dev) if (sc->gic_nirqs > GIC_I_NUM_MAX) sc->gic_nirqs = GIC_I_NUM_MAX; -#ifdef INTRNG sc->gic_irqs = malloc(sizeof(*sc->gic_irqs) * sc->gic_nirqs, M_GIC_V3, M_WAITOK | M_ZERO); name = device_get_nameunit(dev); @@ -318,7 +287,6 @@ gic_v3_attach(device_t dev) return (err); } } -#endif /* Get the number of supported interrupt identifier bits */ sc->gic_idbits = GICD_TYPER_IDBITS(typer); @@ -334,14 +302,6 @@ gic_v3_attach(device_t dev) if (err != 0) return (err); } - /* -* Full success. -* Now register PIC to the interrupts handling layer. -*/ -#ifndef INTRNG - arm_register_root_pic(dev, sc->gic_nirqs); - sc->gic_registered = TRUE; -#endif return (0); } @@ -394,7 +354,6 @@
svn commit: r305135 - in stable/11/sys/arm64: arm64 include
Author: andrew Date: Wed Aug 31 17:30:21 2016 New Revision: 305135 URL: https://svnweb.freebsd.org/changeset/base/305135 Log: MFC 302789: Add memmmap on arm64 so we can mmap /dev/mem and /dev/kmem. Modified: stable/11/sys/arm64/arm64/mem.c stable/11/sys/arm64/include/memdev.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm64/arm64/mem.c == --- stable/11/sys/arm64/arm64/mem.c Wed Aug 31 16:56:54 2016 (r305134) +++ stable/11/sys/arm64/arm64/mem.c Wed Aug 31 17:30:21 2016 (r305135) @@ -114,3 +114,19 @@ memrw(struct cdev *dev, struct uio *uio, return (error); } +/* + * allow user processes to MMAP some memory sections + * instead of going through read/write + */ +/* ARGSUSED */ +int +memmmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, +int prot __unused, vm_memattr_t *memattr __unused) +{ + if (dev2unit(dev) == CDEV_MINOR_MEM) + *paddr = offset; + else if (dev2unit(dev) == CDEV_MINOR_KMEM) + *paddr = vtophys(offset); + /* else panic! */ + return (0); +} Modified: stable/11/sys/arm64/include/memdev.h == --- stable/11/sys/arm64/include/memdev.hWed Aug 31 16:56:54 2016 (r305134) +++ stable/11/sys/arm64/include/memdev.hWed Aug 31 17:30:21 2016 (r305135) @@ -35,6 +35,6 @@ d_open_t memopen; d_read_t memrw; #definememioctl(d_ioctl_t *)NULL -#definememmmap (d_mmap_t *)NULL +d_mmap_t memmmap; #endif /* _MACHINE_MEMDEV_H_ */ ___ 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: r305134 - in head/sys/boot/fdt/dts: . arm64
Author: jmcneill Date: Wed Aug 31 16:56:54 2016 New Revision: 305134 URL: https://svnweb.freebsd.org/changeset/base/305134 Log: Add Allwinner A64 (sun50i) and Pine64 dts files. Reviewed by: andrew, imp, manu, wca Differential Revision:https://reviews.freebsd.org/D7169 Added: head/sys/boot/fdt/dts/arm64/ head/sys/boot/fdt/dts/arm64/Makefile (contents, props changed) head/sys/boot/fdt/dts/arm64/a64.dtsi (contents, props changed) head/sys/boot/fdt/dts/arm64/pine64_plus.dts (contents, props changed) head/sys/boot/fdt/dts/arm64/sun50i-a64-pine64-common.dtsi (contents, props changed) head/sys/boot/fdt/dts/arm64/sun50i-a64-pine64-plus.dts (contents, props changed) head/sys/boot/fdt/dts/arm64/sun50i-a64-pine64.dts (contents, props changed) head/sys/boot/fdt/dts/arm64/sun50i-a64.dtsi (contents, props changed) Modified: head/sys/boot/fdt/dts/Makefile Modified: head/sys/boot/fdt/dts/Makefile == --- head/sys/boot/fdt/dts/Makefile Wed Aug 31 15:47:58 2016 (r305133) +++ head/sys/boot/fdt/dts/Makefile Wed Aug 31 16:56:54 2016 (r305134) @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR=arm mips powerpc +SUBDIR=arm arm64 mips powerpc .include Added: head/sys/boot/fdt/dts/arm64/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/arm64/MakefileWed Aug 31 16:56:54 2016 (r305134) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +DTS!=ls *.dts + +all: test-dts + +.include Added: head/sys/boot/fdt/dts/arm64/a64.dtsi == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/arm64/a64.dtsiWed Aug 31 16:56:54 2016 (r305134) @@ -0,0 +1,151 @@ +/*- + * Copyright (c) 2016 Jared McNeill+ * 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$ + */ + +/ { + clocks { + pll_hsic: clk@01c20044 { + #clock-cells = <0>; + compatible = "allwinner,sun50i-a64-pllhsic-clk"; + reg = <0x01c20044 0x4>; + clocks = <>; + clock-output-names = "pll_hsic"; + }; + + usb_clk: clk@01c200cc { + #clock-cells = <1>; + #reset-cells = <1>; + compatible = "allwinner,sun8i-a83t-usb-clk"; + reg = <0x01c200cc 0x4>; + clocks = <>, <_hsic>; + clock-indices = <8>, <9>, + <10>, <11>, + <16>, <17>; + clock-output-names = "usb_phy0", "usb_phy1", +"usb_hsic_pll", "usb_hsic_12m", +"usb_otg_ohci", "usb_ohci0"; + }; + }; + + soc { + watchdog: watchdog@01c20ca0 { + compatible = "allwinner,sun6i-a31-wdt"; + reg = <0x01c20ca0 0x20>; + interrupts = ; + clocks = <>; + }; + + nmi_intc: interrupt-controller@01f00c0c { + compatible = "allwinner,sun6i-a31-sc-nmi"; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x01f00c0c 0x38>; +
Re: svn commit: r304510 - head/sys/dev/ixl
On 19 August 2016 at 20:08, Eric Joynerwrote: > Author: erj > Date: Sat Aug 20 00:08:10 2016 > New Revision: 304510 > URL: https://svnweb.freebsd.org/changeset/base/304510 > > Log: > ixlv(4): Fix ixlv(4) not loading when loaded as a kernel module and netmap > is enabled. I did not confirm it's this commit, but kernel builds currently have this warning: if_ixlv.o: warning: common of `ixl_crcstrip' overridden by definition if_ixl.o: warning: defined here if_ixlv.o: warning: multiple common of `ixl_rx_miss' if_ixl.o: warning: previous common is here if_ixlv.o: warning: multiple common of `ixl_rx_miss_bufs' if_ixl.o: warning: previous common is here ___ 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: r305129 - head/sys/vm
On Thu, Sep 01, 2016 at 01:38:31AM +1000, Bruce Evans wrote: > On Wed, 31 Aug 2016, Konstantin Belousov wrote: > > > Log: > > Make swapoff reliable. > > > > The swap_pager_swapoff() function uses trylock for the object lock > > before pagein, which means that either i/o to md(4) over swap, or > > intensive page faults over swap pager objects might prevent swapoff() > > from making any progress. Then the retry < 100 check fails and machine > > panics. > > > > If trylock fails, acquire the object lock in the blockable way and > > restart the hash bucket walk. Keep retries logic for now. > > Trylock is difficult to use. When it fails, there is no way for the > caller to tell how long it should wait before retrying (much like EAGAIN > errors for userland). Sometimes there is deadlock so retrying is worse > than useless. Sometimes trylock can detect deadlock, but callers never > can (otherwise they wouldn't try). It is actually a way for the caller to tell how long to wait. The lock should be taken in blockable or sleepable way. Issue is that we have to drop other locks, to avoid LOR, and restart the algorithm. This approach, i.e. try fast to get lock with trylock, and do the slow reset on failure with the required lock already held or not, is very common pattern. E.g. it is used in vm_fault() to handle LOR between vnode lock and vm map lock, it is used in ufs_rename() to avoid LORs between all vnode locks participating in rename, and in many other places. > > My version of mtx_trylock_spin_flags() has a timeout in usec. It returns > immediately if deadlock is detected. The timeout is just for convenience > in simple cases where the caller want to aquire the lock normally but > doesn't want the unbounded timeout or panic given by > mtx_trylock_spin(). The important thing is to return error codes like: > - EDEADLK for deadlock detected (e.g., when the CPU running the thread >holding the lock is stopped) > - EMAYBEDEADLK when deadlock is almost detected (e.g., when CPUs are being >stopped) > - EAGAIN when no problem is detected but the lock is held > - ERECURSE when the lock is held but acquiring it recursively would work >if the caller asked for that > - ELOR if acquiring the lock would work but give a LOR, and the caller didn't >ask for LORs. > > The current return value is positive logic for success and doesn't allow > returning error codes. Your use of trylock for console locks is very specific. It is implied by the intent of console output working in any context, which is not needed for typical trylock usage. > > In my applications in console drivers, the caller doesn't want the lock if > it would give a LOR. Without WITNESS, it is too hard to tell if the lock > would give a LOR, but some errors are easy to detect. E.g., acquiring > sleep lock in a critical section. Indeed. ___ 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: r305133 - head/lib/libc/net
Author: ache Date: Wed Aug 31 15:47:58 2016 New Revision: 305133 URL: https://svnweb.freebsd.org/changeset/base/305133 Log: Apply the same qsort() usage fix as in r304911 getaddrinfo.c qsort() can't be stabilized with just return(-1) alone. MFC after: 3 days Modified: head/lib/libc/net/name6.c Modified: head/lib/libc/net/name6.c == --- head/lib/libc/net/name6.c Wed Aug 31 15:32:52 2016(r305132) +++ head/lib/libc/net/name6.c Wed Aug 31 15:47:58 2016(r305133) @@ -185,6 +185,7 @@ struct hp_order { #define aio_sa aio_un.aiou_sa int aio_matchlen; char *aio_h_addr; + int aio_initial_sequence; }; static struct hostent *_hpcopy(struct hostent *, int *); @@ -711,6 +712,7 @@ _hpreorder(struct hostent *hp) aio[i].aio_dstscope = gai_addr2scopetype(sa); aio[i].aio_dstpolicy = match_addrselectpolicy(sa, ); set_source([i], ); + aio[i].aio_initial_sequence = i; } /* perform sorting. */ @@ -1045,6 +1047,23 @@ comp_dst(const void *arg1, const void *a } /* Rule 10: Otherwise, leave the order unchanged. */ + + /* +* Note that qsort is unstable; so, we can't return zero and +* expect the order to be unchanged. +* That also means we can't depend on the current position of +* dst2 being after dst1. We must enforce the initial order +* with an explicit compare on the original position. +* The qsort specification requires that "When the same objects +* (consisting of width bytes, irrespective of their current +* positions in the array) are passed more than once to the +* comparison function, the results shall be consistent with one +* another." +* In other words, If A < B, then we must also return B > A. +*/ + if (dst2->aio_initial_sequence < dst1->aio_initial_sequence) + return(1); + return(-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"
Re: svn commit: r305129 - head/sys/vm
On Wed, 31 Aug 2016, Konstantin Belousov wrote: Log: Make swapoff reliable. The swap_pager_swapoff() function uses trylock for the object lock before pagein, which means that either i/o to md(4) over swap, or intensive page faults over swap pager objects might prevent swapoff() from making any progress. Then the retry < 100 check fails and machine panics. If trylock fails, acquire the object lock in the blockable way and restart the hash bucket walk. Keep retries logic for now. Trylock is difficult to use. When it fails, there is no way for the caller to tell how long it should wait before retrying (much like EAGAIN errors for userland). Sometimes there is deadlock so retrying is worse than useless. Sometimes trylock can detect deadlock, but callers never can (otherwise they wouldn't try). My version of mtx_trylock_spin_flags() has a timeout in usec. It returns immediately if deadlock is detected. The timeout is just for convenience in simple cases where the caller want to aquire the lock normally but doesn't want the unbounded timeout or panic given by mtx_trylock_spin(). The important thing is to return error codes like: - EDEADLK for deadlock detected (e.g., when the CPU running the thread holding the lock is stopped) - EMAYBEDEADLK when deadlock is almost detected (e.g., when CPUs are being stopped) - EAGAIN when no problem is detected but the lock is held - ERECURSE when the lock is held but acquiring it recursively would work if the caller asked for that - ELOR if acquiring the lock would work but give a LOR, and the caller didn't ask for LORs. The current return value is positive logic for success and doesn't allow returning error codes. In my applications in console drivers, the caller doesn't want the lock if it would give a LOR. Without WITNESS, it is too hard to tell if the lock would give a LOR, but some errors are easy to detect. E.g., acquiring sleep lock in a critical section. Bruce ___ 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: r305132 - head/sys/boot/forth
Author: imp Date: Wed Aug 31 15:32:52 2016 New Revision: 305132 URL: https://svnweb.freebsd.org/changeset/base/305132 Log: Remove accidentally committed stray comment. Noticed by: dteske@ Modified: head/sys/boot/forth/loader.4th Modified: head/sys/boot/forth/loader.4th == --- head/sys/boot/forth/loader.4th Wed Aug 31 15:06:24 2016 (r305131) +++ head/sys/boot/forth/loader.4th Wed Aug 31 15:32:52 2016 (r305132) @@ -167,8 +167,7 @@ only forth definitions also support-func \ \ Overrides support.4th initialization word with one that does \ everything start one does, short of loading the kernel and -\ modules. Returns a flag. Unsure why we don't just have start -\ call this... +\ modules. Returns a flag. : initialize ( -- flag ) s" /boot/defaults/loader.conf" initialize ___ 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: r297225 - in head/sys: net netinet netinet6
On Thu, Mar 24, 2016 at 07:54:56AM +, George V. Neville-Neil wrote: > Author: gnn > Date: Thu Mar 24 07:54:56 2016 > New Revision: 297225 > URL: https://svnweb.freebsd.org/changeset/base/297225 > > Log: > FreeBSD previously provided route caching for TCP (and UDP). Re-add > route caching for TCP, with some improvements. In particular, invalidate > the route cache if a new route is added, which might be a better match. > The cache is automatically invalidated if the old route is deleted. > > Submitted by: Mike Karels > Reviewed by:gnn > Differential Revision: https://reviews.freebsd.org/D4306 Can this mergered to stable/10 (in private branch, I mean ABI breakage)? Have any dependecis of this commit? ___ 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: r304436 - in head: . sys/netinet
On Sun, Aug 28, 2016 at 10:20:08AM -0700, Adrian Chadd wrote: > Hi, > > There are some no brainers here so far(tm): > > working from the bottom up: > > * yeah, the ixgbe locking is a bit silly. Kip's work with iflib and > converting ixgbe to use that instead of its own locking for managing > things should remove the bottom two locks > * the rtalloc1_fib thing - that's odd, because it shouldn't be > contending there unless there's some temporary redirect that's been > learnt. What's the routing table look like on your machine? I Remember As I understund this code: === static struct radix_node * in_matroute(void *v_arg, struct radix_node_head *head) { struct radix_node *rn = rn_match(v_arg, head); struct rtentry *rt = (struct rtentry *)rn; if (rt) { RT_LOCK(rt); if (rt->rt_flags & RTPRF_OURS) { rt->rt_flags &= ~RTPRF_OURS; rt->rt_expire = 0; } RT_UNLOCK(rt); } return rn; } === lock congestion will be created for any route: for any route captured captured exclusive lock (for test). ___ 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: r305130 - in head: contrib/elftoolchain/common contrib/elftoolchain/elfcopy contrib/elftoolchain/elfdump contrib/elftoolchain/libelf contrib/elftoolchain/libelftc contrib/elftoolchain/r...
Author: emaste Date: Wed Aug 31 15:05:04 2016 New Revision: 305130 URL: https://svnweb.freebsd.org/changeset/base/305130 Log: Update to ELF Tool Chain r3490 Improvements include: * readelf: report all relocation types in rel/rela for MIPS N64 * readelf: add ELFOSABI_ARM_AEABI * elfdump: add ELFOSABI_ARM_AEABI and ELFOSABI_ARM * Add recent RISC-V relocations * elfcopy: use elftc_timestamp, to support SOURCE_DATE_EPOCH Sponsored by: The FreeBSD Foundation Added: head/contrib/elftoolchain/libelftc/elftc_timestamp.3 - copied unchanged from r305126, vendor/elftoolchain/dist/libelftc/elftc_timestamp.3 head/contrib/elftoolchain/libelftc/elftc_timestamp.c - copied unchanged from r305126, vendor/elftoolchain/dist/libelftc/elftc_timestamp.c Modified: head/contrib/elftoolchain/common/elfdefinitions.h head/contrib/elftoolchain/elfcopy/archive.c head/contrib/elftoolchain/elfcopy/ascii.c head/contrib/elftoolchain/elfcopy/pe.c head/contrib/elftoolchain/elfdump/elfdump.c head/contrib/elftoolchain/libelf/elf_flagdata.3 head/contrib/elftoolchain/libelftc/Makefile head/contrib/elftoolchain/libelftc/elftc_bfd_find_target.3 head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c head/contrib/elftoolchain/libelftc/libelftc.h head/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c head/contrib/elftoolchain/readelf/readelf.1 head/contrib/elftoolchain/readelf/readelf.c head/lib/libelftc/Makefile head/lib/libelftc/elftc_version.c Directory Properties: head/contrib/elftoolchain/ (props changed) head/contrib/elftoolchain/elfdump/ (props changed) Modified: head/contrib/elftoolchain/common/elfdefinitions.h == --- head/contrib/elftoolchain/common/elfdefinitions.h Wed Aug 31 14:49:58 2016(r305129) +++ head/contrib/elftoolchain/common/elfdefinitions.h Wed Aug 31 15:05:04 2016(r305130) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: elfdefinitions.h 3455 2016-05-09 13:47:29Z emaste $ + * $Id: elfdefinitions.h 3485 2016-08-18 13:38:52Z emaste $ */ /* @@ -2091,7 +2091,10 @@ _ELF_DEFINE_RELOC(R_RISCV_GNU_VTINHERIT, _ELF_DEFINE_RELOC(R_RISCV_GNU_VTENTRY, 42) \ _ELF_DEFINE_RELOC(R_RISCV_ALIGN, 43) \ _ELF_DEFINE_RELOC(R_RISCV_RVC_BRANCH, 44) \ -_ELF_DEFINE_RELOC(R_RISCV_RVC_JUMP,45) +_ELF_DEFINE_RELOC(R_RISCV_RVC_JUMP,45) \ +_ELF_DEFINE_RELOC(R_RISCV_RVC_LUI, 46) \ +_ELF_DEFINE_RELOC(R_RISCV_GPREL_I, 47) \ +_ELF_DEFINE_RELOC(R_RISCV_GPREL_S, 48) #define_ELF_DEFINE_SPARC_RELOCATIONS() \ _ELF_DEFINE_RELOC(R_SPARC_NONE,0) \ Modified: head/contrib/elftoolchain/elfcopy/archive.c == --- head/contrib/elftoolchain/elfcopy/archive.c Wed Aug 31 14:49:58 2016 (r305129) +++ head/contrib/elftoolchain/elfcopy/archive.c Wed Aug 31 15:05:04 2016 (r305130) @@ -38,7 +38,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: archive.c 3287 2015-12-31 16:58:48Z emaste $"); +ELFTC_VCSID("$Id: archive.c 3490 2016-08-31 00:12:22Z emaste $"); #define _ARMAG_LEN 8 /* length of ar magic string */ #define _ARHDR_LEN 60 /* length of ar header */ @@ -440,6 +440,7 @@ ac_write_objs(struct elfcopy *ecp, int o struct archive *a; struct archive_entry*entry; struct ar_obj *obj; + time_t timestamp; int nr; if ((a = archive_write_new()) == NULL) @@ -450,7 +451,9 @@ ac_write_objs(struct elfcopy *ecp, int o /* Write the archive symbol table, even if it's empty. */ entry = archive_entry_new(); archive_entry_copy_pathname(entry, "/"); - archive_entry_set_mtime(entry, time(NULL), 0); + if (elftc_timestamp() != 0) + err(EXIT_FAILURE, "elftc_timestamp"); + archive_entry_set_mtime(entry, timestamp, 0); archive_entry_set_size(entry, (ecp->s_cnt + 1) * sizeof(uint32_t) + ecp->s_sn_sz); AC(archive_write_header(a, entry)); Modified: head/contrib/elftoolchain/elfcopy/ascii.c == --- head/contrib/elftoolchain/elfcopy/ascii.c Wed Aug 31 14:49:58 2016 (r305129) +++ head/contrib/elftoolchain/elfcopy/ascii.c Wed Aug 31 15:05:04 2016 (r305130) @@ -36,7 +36,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: ascii.c 3446 2016-05-03 01:31:17Z emaste $"); +ELFTC_VCSID("$Id: ascii.c 3487 2016-08-24 18:12:08Z emaste $"); static void append_data(struct section *s, const void *buf, size_t sz); static char hex_digit(uint8_t n); @@ -251,7
svn commit: r305129 - head/sys/vm
Author: kib Date: Wed Aug 31 14:49:58 2016 New Revision: 305129 URL: https://svnweb.freebsd.org/changeset/base/305129 Log: Make swapoff reliable. The swap_pager_swapoff() function uses trylock for the object lock before pagein, which means that either i/o to md(4) over swap, or intensive page faults over swap pager objects might prevent swapoff() from making any progress. Then the retry < 100 check fails and machine panics. If trylock fails, acquire the object lock in the blockable way and restart the hash bucket walk. Keep retries logic for now. Reported and tested by: pho Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after:2 weeks Differential revision:https://reviews.freebsd.org/D7688 Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c == --- head/sys/vm/swap_pager.cWed Aug 31 13:58:32 2016(r305128) +++ head/sys/vm/swap_pager.cWed Aug 31 14:49:58 2016(r305129) @@ -1688,36 +1688,49 @@ static void swap_pager_swapoff(struct swdevt *sp) { struct swblock *swap; + vm_object_t locked_obj, object; + vm_pindex_t pindex; int i, j, retries; sx_assert(_syscall_lock, SA_XLOCKED); retries = 0; + locked_obj = NULL; full_rescan: mtx_lock(_mtx); for (i = 0; i <= swhash_mask; i++) { /* '<=' is correct here */ restart: for (swap = swhash[i]; swap != NULL; swap = swap->swb_hnext) { - vm_object_t object = swap->swb_object; - vm_pindex_t pindex = swap->swb_index; + object = swap->swb_object; + pindex = swap->swb_index; for (j = 0; j < SWAP_META_PAGES; ++j) { - if (swp_pager_isondev(swap->swb_pages[j], sp)) { - /* avoid deadlock */ + if (!swp_pager_isondev(swap->swb_pages[j], sp)) + continue; + if (locked_obj != object) { + if (locked_obj != NULL) + VM_OBJECT_WUNLOCK(locked_obj); + locked_obj = object; if (!VM_OBJECT_TRYWLOCK(object)) { - break; - } else { mtx_unlock(_mtx); - swp_pager_force_pagein(object, - pindex + j); - VM_OBJECT_WUNLOCK(object); + /* Depends on type-stability. */ + VM_OBJECT_WLOCK(object); mtx_lock(_mtx); goto restart; } } + MPASS(locked_obj == object); + mtx_unlock(_mtx); + swp_pager_force_pagein(object, pindex + j); + mtx_lock(_mtx); + goto restart; } } } mtx_unlock(_mtx); + if (locked_obj != NULL) { + VM_OBJECT_WUNLOCK(locked_obj); + locked_obj = NULL; + } if (sp->sw_used) { /* * Objects may be locked or paging to the device being ___ 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: r305107 - head/sys/boot/forth
On Wed, Aug 31, 2016 at 8:41 AM, Devin Teskewrote: > Please remove the following: > > "Unsure why we don't just have start" > > Others beside yourself have great understanding of the Forth and we don't > need questioning comments in the code. To be fair, it was just left in there accidentally. However, could you explain it to me? That answer is insulting without being actually helpful in resolving the situation. Warner ___ 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: r305107 - head/sys/boot/forth
Please remove the following: "Unsure why we don't just have start" Others beside yourself have great understanding of the Forth and we don't need questioning comments in the code. -- Devin > On Aug 30, 2016, at 8:55 PM, Warner Loshwrote: > > Unsure why we don't just have start ___ 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: r305128 - head/sys/arm64/arm64
Author: andrew Date: Wed Aug 31 13:58:32 2016 New Revision: 305128 URL: https://svnweb.freebsd.org/changeset/base/305128 Log: Also handle instruction traps. We might hit these when the page we are executing is being promoted to a superpage. Obtained from:ABT Systems Ltd MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/trap.c Modified: head/sys/arm64/arm64/trap.c == --- head/sys/arm64/arm64/trap.c Wed Aug 31 13:51:41 2016(r305127) +++ head/sys/arm64/arm64/trap.c Wed Aug 31 13:58:32 2016(r305128) @@ -285,6 +285,7 @@ do_el1h_sync(struct trapframe *frame) print_registers(frame); printf(" esr: %.8lx\n", esr); panic("VFP exception in the kernel"); + case EXCP_INSN_ABORT: case EXCP_DATA_ABORT: far = READ_SPECIALREG(far_el1); intr_enable(); ___ 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: r305127 - vendor/elftoolchain/elftoolchain-r3490
Author: emaste Date: Wed Aug 31 13:51:41 2016 New Revision: 305127 URL: https://svnweb.freebsd.org/changeset/base/305127 Log: Tag ELF Tool Chain r3490 Added: vendor/elftoolchain/elftoolchain-r3490/ - copied from r305126, vendor/elftoolchain/dist/ ___ 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: r305126 - in vendor/elftoolchain/dist: common elfcopy elfdump libelf libelftc readelf
Author: emaste Date: Wed Aug 31 13:50:23 2016 New Revision: 305126 URL: https://svnweb.freebsd.org/changeset/base/305126 Log: Import ELF Tool Chain snapshot at revision 3490 From http://svn.code.sf.net/p/elftoolchain/code/ Added: vendor/elftoolchain/dist/libelftc/elftc_timestamp.3 (contents, props changed) vendor/elftoolchain/dist/libelftc/elftc_timestamp.c (contents, props changed) Modified: vendor/elftoolchain/dist/common/elfdefinitions.h vendor/elftoolchain/dist/elfcopy/archive.c vendor/elftoolchain/dist/elfcopy/ascii.c vendor/elftoolchain/dist/elfcopy/pe.c vendor/elftoolchain/dist/elfdump/elfdump.c vendor/elftoolchain/dist/libelf/elf_flagdata.3 vendor/elftoolchain/dist/libelftc/Makefile vendor/elftoolchain/dist/libelftc/elftc_bfd_find_target.3 vendor/elftoolchain/dist/libelftc/elftc_reloc_type_str.c vendor/elftoolchain/dist/libelftc/libelftc.h vendor/elftoolchain/dist/libelftc/libelftc_bfdtarget.c vendor/elftoolchain/dist/libelftc/libelftc_dem_gnu3.c vendor/elftoolchain/dist/readelf/readelf.1 vendor/elftoolchain/dist/readelf/readelf.c Modified: vendor/elftoolchain/dist/common/elfdefinitions.h == --- vendor/elftoolchain/dist/common/elfdefinitions.hWed Aug 31 13:16:40 2016(r305125) +++ vendor/elftoolchain/dist/common/elfdefinitions.hWed Aug 31 13:50:23 2016(r305126) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: elfdefinitions.h 3455 2016-05-09 13:47:29Z emaste $ + * $Id: elfdefinitions.h 3485 2016-08-18 13:38:52Z emaste $ */ /* @@ -2091,7 +2091,10 @@ _ELF_DEFINE_RELOC(R_RISCV_GNU_VTINHERIT, _ELF_DEFINE_RELOC(R_RISCV_GNU_VTENTRY, 42) \ _ELF_DEFINE_RELOC(R_RISCV_ALIGN, 43) \ _ELF_DEFINE_RELOC(R_RISCV_RVC_BRANCH, 44) \ -_ELF_DEFINE_RELOC(R_RISCV_RVC_JUMP,45) +_ELF_DEFINE_RELOC(R_RISCV_RVC_JUMP,45) \ +_ELF_DEFINE_RELOC(R_RISCV_RVC_LUI, 46) \ +_ELF_DEFINE_RELOC(R_RISCV_GPREL_I, 47) \ +_ELF_DEFINE_RELOC(R_RISCV_GPREL_S, 48) #define_ELF_DEFINE_SPARC_RELOCATIONS() \ _ELF_DEFINE_RELOC(R_SPARC_NONE,0) \ Modified: vendor/elftoolchain/dist/elfcopy/archive.c == --- vendor/elftoolchain/dist/elfcopy/archive.c Wed Aug 31 13:16:40 2016 (r305125) +++ vendor/elftoolchain/dist/elfcopy/archive.c Wed Aug 31 13:50:23 2016 (r305126) @@ -38,7 +38,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: archive.c 3287 2015-12-31 16:58:48Z emaste $"); +ELFTC_VCSID("$Id: archive.c 3490 2016-08-31 00:12:22Z emaste $"); #define _ARMAG_LEN 8 /* length of ar magic string */ #define _ARHDR_LEN 60 /* length of ar header */ @@ -440,6 +440,7 @@ ac_write_objs(struct elfcopy *ecp, int o struct archive *a; struct archive_entry*entry; struct ar_obj *obj; + time_t timestamp; int nr; if ((a = archive_write_new()) == NULL) @@ -450,7 +451,9 @@ ac_write_objs(struct elfcopy *ecp, int o /* Write the archive symbol table, even if it's empty. */ entry = archive_entry_new(); archive_entry_copy_pathname(entry, "/"); - archive_entry_set_mtime(entry, time(NULL), 0); + if (elftc_timestamp() != 0) + err(EXIT_FAILURE, "elftc_timestamp"); + archive_entry_set_mtime(entry, timestamp, 0); archive_entry_set_size(entry, (ecp->s_cnt + 1) * sizeof(uint32_t) + ecp->s_sn_sz); AC(archive_write_header(a, entry)); Modified: vendor/elftoolchain/dist/elfcopy/ascii.c == --- vendor/elftoolchain/dist/elfcopy/ascii.cWed Aug 31 13:16:40 2016 (r305125) +++ vendor/elftoolchain/dist/elfcopy/ascii.cWed Aug 31 13:50:23 2016 (r305126) @@ -36,7 +36,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: ascii.c 3446 2016-05-03 01:31:17Z emaste $"); +ELFTC_VCSID("$Id: ascii.c 3487 2016-08-24 18:12:08Z emaste $"); static void append_data(struct section *s, const void *buf, size_t sz); static char hex_digit(uint8_t n); @@ -251,6 +251,7 @@ create_elf_from_srec(struct elfcopy *ecp sec_index = 1; sec_addr = entry = 0; while (fgets(line, _LINE_BUFSZ, ifp) != NULL) { + sz = 0; if (line[0] == '\r' || line[0] == '\n') continue; if (line[0] == '$' && line[1] == '$') { Modified: vendor/elftoolchain/dist/elfcopy/pe.c == --- vendor/elftoolchain/dist/elfcopy/pe.c Wed Aug 31 13:16:40 2016 (r305125) +++ vendor/elftoolchain/dist/elfcopy/pe.c
Re: svn commit: r304436 - in head: . sys/netinet
On Sun, Aug 28, 2016 at 10:20:08AM -0700, Adrian Chadd wrote: > Then the rest of the big entries are just a combination of rtentry > locking, tcp timer locking, zfs locking and madvise locking. There's > some sowakeup locking there as well, from the socket producer/consumer > locking. On some high network speed I am see like kevent's congestion: 22.79% [89522]__mtx_lock_sleep @ /boot/kernel.VSTREAM/kernel 82.99% [74295] knote 99.97% [74269] sowakeup 99.07% [73581] tcp_do_segment 100.0% [73581]tcp_input 100.0% [73581] ip_input 100.0% [73581] netisr_dispatch_src 100.0% [73581] ether_demux 100.0% [73581]ether_nh_input 100.0% [73581] netisr_dispatch_src 68.88% [50683] t4_eth_rx @ /boot/kernel.VSTREAM/if_cxgbe.ko 100.0% [50683] service_iq 100.0% [50683]t4_intr 100.0% [50683] intr_event_execute_handlers @ /boot/kernel.VSTREAM/kernel 100.0% [50683] ithread_loop 100.0% [50683] fork_exit 31.12% [22898] tcp_lro_flush 97.30% [22280] service_iq @ /boot/kernel.VSTREAM/if_cxgbe.ko 100.0% [22280]t4_intr 100.0% [22280] intr_event_execute_handlers @ /boot/kernel.VSTREAM/kernel 100.0% [22280] ithread_loop 100.0% [22280] fork_exit 01.55% [354] tcp_lro_flush_inactive 100.0% [354] service_iq @ /boot/kernel.VSTREAM/if_cxgbe.ko 100.0% [354] t4_intr 100.0% [354]intr_event_execute_handlers @ /boot/kernel.VSTREAM/kernel 100.0% [354] ithread_loop 01.15% [264] tcp_lro_rx 100.0% [264] t4_eth_rx @ /boot/kernel.VSTREAM/if_cxgbe.ko 100.0% [264] service_iq 100.0% [264]t4_intr 100.0% [264] intr_event_execute_handlers @ /boot/kernel.VSTREAM/kernel Can I do some recomendation? ___ 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: r305125 - in head: lib/libstand sys/boot/common sys/boot/efi/libefi sys/boot/efi/loader sys/boot/i386/libi386 sys/boot/i386/loader sys/boot/pc98/loader
On Wed, Aug 31, 2016 at 01:16:40PM +, Baptiste Daroussin wrote: > Author: bapt > Date: Wed Aug 31 13:16:40 2016 > New Revision: 305125 > URL: https://svnweb.freebsd.org/changeset/base/305125 > > Log: > Netboot: allow both tftpfs and nfs in both pxeboot and loader.efi > > Add a new 'netproto' variable which can be set for now to > NET_TFTP or NET_NFS (default to NET_NONE) > > From the dhcp options if one sets the root-path option to: > "ip:path", the loader will consider it is booting over NFS > (meaning same behaviour as the default current behaviour) > > if the dhcp option "tftp server address" is set (option 150) > the loader will consider it is booting over tftpfs, it will then > consider the root-path options with 2 possible case > 1. "path" then the IP of the tftp server will be the one passed by > the option 150, and the files will be retrieved under "path" on the tftp > server > 2. "ip:path" then the IP of the tftp server will be the one passed in > the option "overwritting the IP from the option 150. > > We could not "abuse" the rootpath option in the form or tftp://ip:path > because > this is already used for other purpose by iPXE preventing any chainload from > iPXE to the FreeBSD loader. > > Given at each open(), the loader loops over all available filesystems and > keep > the "best" error, we needed to prevent tftpfs to fallback on nfs and vice > versa. > the tftpfs and nfs implementation in libstand now return EINVAL early if > 'netproto' for that purpose. > > Reviewed by:tsoome > Relnotes: yes > Sponsored by: Gandi.net > Differential Revision: https://reviews.freebsd.org/D7628 I forgot to mention a guard was added to libstand's net.h, because it is included multiple times for some loaders Best regards, Bapt signature.asc Description: PGP signature
svn commit: r305125 - in head: lib/libstand sys/boot/common sys/boot/efi/libefi sys/boot/efi/loader sys/boot/i386/libi386 sys/boot/i386/loader sys/boot/pc98/loader
Author: bapt Date: Wed Aug 31 13:16:40 2016 New Revision: 305125 URL: https://svnweb.freebsd.org/changeset/base/305125 Log: Netboot: allow both tftpfs and nfs in both pxeboot and loader.efi Add a new 'netproto' variable which can be set for now to NET_TFTP or NET_NFS (default to NET_NONE) From the dhcp options if one sets the root-path option to: "ip:path", the loader will consider it is booting over NFS (meaning same behaviour as the default current behaviour) if the dhcp option "tftp server address" is set (option 150) the loader will consider it is booting over tftpfs, it will then consider the root-path options with 2 possible case 1. "path" then the IP of the tftp server will be the one passed by the option 150, and the files will be retrieved under "path" on the tftp server 2. "ip:path" then the IP of the tftp server will be the one passed in the option "overwritting the IP from the option 150. We could not "abuse" the rootpath option in the form or tftp://ip:path because this is already used for other purpose by iPXE preventing any chainload from iPXE to the FreeBSD loader. Given at each open(), the loader loops over all available filesystems and keep the "best" error, we needed to prevent tftpfs to fallback on nfs and vice versa. the tftpfs and nfs implementation in libstand now return EINVAL early if 'netproto' for that purpose. Reviewed by: tsoome Relnotes: yes Sponsored by: Gandi.net Differential Revision:https://reviews.freebsd.org/D7628 Modified: head/lib/libstand/bootp.c head/lib/libstand/bootp.h head/lib/libstand/globals.c head/lib/libstand/net.h head/lib/libstand/nfs.c head/lib/libstand/tftp.c head/sys/boot/common/dev_net.c head/sys/boot/efi/libefi/Makefile head/sys/boot/efi/loader/Makefile head/sys/boot/efi/loader/conf.c head/sys/boot/i386/libi386/pxe.c head/sys/boot/i386/loader/conf.c head/sys/boot/pc98/loader/conf.c Modified: head/lib/libstand/bootp.c == --- head/lib/libstand/bootp.c Wed Aug 31 12:29:04 2016(r305124) +++ head/lib/libstand/bootp.c Wed Aug 31 13:16:40 2016(r305125) @@ -411,6 +411,10 @@ vend_rfc1048(cp, len) bcopy(cp, _serverip.s_addr, sizeof(dhcp_serverip.s_addr)); } + if (tag == TAG_TFTP_SERVER) { + bcopy(cp, _addr, + sizeof(tftpip.s_addr)); + } #endif cp += size; } Modified: head/lib/libstand/bootp.h == --- head/lib/libstand/bootp.h Wed Aug 31 12:29:04 2016(r305124) +++ head/lib/libstand/bootp.h Wed Aug 31 13:16:40 2016(r305125) @@ -106,6 +106,7 @@ struct bootp { #define TAG_T2 ((unsigned char) 59) #define TAG_CLASSID((unsigned char) 60) #define TAG_CLIENTID ((unsigned char) 61) +#define TAG_TFTP_SERVER((unsigned char) 150) #endif #define TAG_END((unsigned char) 255) Modified: head/lib/libstand/globals.c == --- head/lib/libstand/globals.c Wed Aug 31 12:29:04 2016(r305124) +++ head/lib/libstand/globals.c Wed Aug 31 13:16:40 2016(r305125) @@ -25,12 +25,14 @@ charhostname[FNAME_SIZE]; /* our hostn inthostnamelen; char domainname[FNAME_SIZE]; /* our DNS domain */ intdomainnamelen; +intnetproto = NET_NONE;/* Network prototol */ char ifname[IFNAME_SIZE];/* name of interface (e.g. "le0") */ struct in_addr myip; /* my ip address */ struct in_addr nameip; /* DNS server ip address */ struct in_addr rootip; /* root ip address */ struct in_addr swapip; /* swap ip address */ struct in_addr gateip; /* gateway ip address */ +struct in_addr tftpip; /* TFTP ip address */ n_long netmask = 0xff00; /* subnet or net mask */ u_int intf_mtu; /* interface mtu from bootp/dhcp */ interrno; /* our old friend */ Modified: head/lib/libstand/net.h == --- head/lib/libstand/net.h Wed Aug 31 12:29:04 2016(r305124) +++ head/lib/libstand/net.h Wed Aug 31 13:16:40 2016(r305125) @@ -36,6 +36,8 @@ * $FreeBSD$ */ +#ifndef _STAND_NET_H +#define _STAND_NET_H #ifndef _KERNEL/* XXX - see */ #undef __IPADDR #define __IPADDR(x)htonl((u_int32_t)(x)) @@ -45,6 +47,12 @@ #define BA { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } +enum net_proto { + NET_NONE, + NET_NFS, + NET_TFTP +}; + /* Returns
svn commit: r305124 - head/sys/sys
Author: mjg Date: Wed Aug 31 12:29:04 2016 New Revision: 305124 URL: https://svnweb.freebsd.org/changeset/base/305124 Log: fd: effectively revert r305091 Turns out fd_lastfile can survive being -1 for some processes, giving incorrect results with the cast. Noted by: cem Modified: head/sys/sys/filedesc.h Modified: head/sys/sys/filedesc.h == --- head/sys/sys/filedesc.h Wed Aug 31 11:55:31 2016(r305123) +++ head/sys/sys/filedesc.h Wed Aug 31 12:29:04 2016(r305124) @@ -201,7 +201,7 @@ fget_locked(struct filedesc *fdp, int fd FILEDESC_LOCK_ASSERT(fdp); - if ((u_int)fd > fdp->fd_lastfile) + if (fd < 0 || fd > fdp->fd_lastfile) return (NULL); return (fdp->fd_ofiles[fd].fde_file); @@ -213,7 +213,7 @@ fdeget_locked(struct filedesc *fdp, int FILEDESC_LOCK_ASSERT(fdp); - if ((u_int)fd > fdp->fd_lastfile) + if (fd < 0 || fd > fdp->fd_lastfile) return (NULL); return (>fd_ofiles[fd]); ___ 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: r305123 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Wed Aug 31 11:55:31 2016 New Revision: 305123 URL: https://svnweb.freebsd.org/changeset/base/305123 Log: Fix kernel panic when inheriting properties without default. There are two writable hidden properties "iscsioptions" and "stmf_sbd_lu", that have no default string value. Attempt to unset them or replicate caused kernel panic. This simple bandaid seems fixes the problem nicely. MFC after:2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c Wed Aug 31 11:51:52 2016(r305122) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c Wed Aug 31 11:55:31 2016(r305123) @@ -54,6 +54,8 @@ dodefault(zfs_prop_t prop, int intsz, in return (SET_ERROR(ENOENT)); if (zfs_prop_get_type(prop) == PROP_TYPE_STRING) { + if (zfs_prop_default_string(prop) == NULL) + return (SET_ERROR(ENOENT)); if (intsz != 1) return (SET_ERROR(EOVERFLOW)); (void) strncpy(buf, zfs_prop_default_string(prop), ___ 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: r305122 - head/sys/netipsec
Author: ae Date: Wed Aug 31 11:51:52 2016 New Revision: 305122 URL: https://svnweb.freebsd.org/changeset/base/305122 Log: Remove redundant sanity checks from ipsec[46]_common_input_cb(). This check already has been done in the each protocol callback. Modified: head/sys/netipsec/ipsec_input.c Modified: head/sys/netipsec/ipsec_input.c == --- head/sys/netipsec/ipsec_input.c Wed Aug 31 11:10:39 2016 (r305121) +++ head/sys/netipsec/ipsec_input.c Wed Aug 31 11:51:52 2016 (r305122) @@ -334,14 +334,6 @@ ipsec4_common_input_cb(struct mbuf *m, s sproto == IPPROTO_IPCOMP, ("unexpected security protocol %u", sproto)); - /* Sanity check */ - if (m == NULL) { - DPRINTF(("%s: null mbuf", __func__)); - IPSEC_ISTAT(sproto, badkcr); - KEY_FREESAV(); - return EINVAL; - } - if (skip != 0) { /* * Fix IPv4 header @@ -615,14 +607,6 @@ ipsec6_common_input_cb(struct mbuf *m, s sproto == IPPROTO_IPCOMP, ("unexpected security protocol %u", sproto)); - /* Sanity check */ - if (m == NULL) { - DPRINTF(("%s: null mbuf", __func__)); - IPSEC_ISTAT(sproto, badkcr); - error = EINVAL; - goto bad; - } - /* Fix IPv6 header */ if (m->m_len < sizeof(struct ip6_hdr) && (m = m_pullup(m, sizeof(struct ip6_hdr))) == NULL) { ___ 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: r305121 - head/sys/dev/syscons
Author: bde Date: Wed Aug 31 11:10:39 2016 New Revision: 305121 URL: https://svnweb.freebsd.org/changeset/base/305121 Log: Add some locking to sc_cngetc(). Keyboard input needs Giant locking, and that is not possible to do correctly here. Use mtx_trylock() and proceed unlocked as before if we can't acquire Giant (non-recursively), except in kdb mode don't even try to acquire Giant. Everything here is a hack, but it often works. Even if mtx_trylock() succeeds, this might be a LOR. Keyboard input also needs screen locking, to handle screen updates and switches. Add this, using the same simplistic screen locking as for sc_cnputc(). Giant must be acquired before the screen lock, and the screen lock must be dropped when calling the keyboard driver (else it would get a harmless LOR if it tries to acquire Giant). It was intended that sc cn open/close hide the locking calls, and they do for i/o functions functions except for this complication. Non-console keyboard input is still only Giant-locked, with screen locking in some called functions. This is correct for the keyboard parts only. When Giant cannot be acquired properly, atkbd and kbdmux tend to race and work (they assume that the caller acquired Giant properly and don't try to acquire it again or check that it has been acquired, and the races rarely matter), while ukbd tends to deadlock or panic (since it does the opposite, and has other usb threads to deadlock with). The keyboard (Giant) locking here does very little, but the screen locking completes screen locking for console mode except for not detecting or handling deadlock. Modified: head/sys/dev/syscons/syscons.c head/sys/dev/syscons/syscons.h Modified: head/sys/dev/syscons/syscons.c == --- head/sys/dev/syscons/syscons.c Wed Aug 31 10:45:53 2016 (r305120) +++ head/sys/dev/syscons/syscons.c Wed Aug 31 11:10:39 2016 (r305121) @@ -1649,11 +1649,33 @@ sc_cnterm(struct consdev *cp) static void sccnclose(sc_softc_t *sc, struct sc_cnstate *sp); static int sc_cngetc_locked(struct sc_cnstate *sp); +static void sccnkbdlock(sc_softc_t *sc, struct sc_cnstate *sp); +static void sccnkbdunlock(sc_softc_t *sc, struct sc_cnstate *sp); static void sccnopen(sc_softc_t *sc, struct sc_cnstate *sp, int flags); static void sccnscrlock(sc_softc_t *sc, struct sc_cnstate *sp); static void sccnscrunlock(sc_softc_t *sc, struct sc_cnstate *sp); static void +sccnkbdlock(sc_softc_t *sc, struct sc_cnstate *sp) +{ +/* + * Locking method: hope for the best. + * The keyboard is supposed to be Giant locked. We can't handle that + * in general. The kdb_active case here is not safe, and we will + * proceed without the lock in all cases. + */ +sp->kbd_locked = !kdb_active && mtx_trylock(); +} + +static void +sccnkbdunlock(sc_softc_t *sc, struct sc_cnstate *sp) +{ +if (sp->kbd_locked) + mtx_unlock(); +sp->kbd_locked = FALSE; +} + +static void sccnscrlock(sc_softc_t *sc, struct sc_cnstate *sp) { SC_VIDEO_LOCK(sc); @@ -1674,11 +1696,14 @@ sccnopen(sc_softc_t *sc, struct sc_cnsta sp->kbd_opened = FALSE; sp->scr_opened = FALSE; +sp->kbd_locked = FALSE; /* Opening the keyboard is optional. */ if (!(flags & 1) || sc->kbd == NULL) goto over_keyboard; +sccnkbdlock(sc, sp); + /* * Make sure the keyboard is accessible even when the kbd device * driver is disabled. @@ -1726,6 +1751,7 @@ sccnclose(sc_softc_t *sc, struct sc_cnst kbdd_disable(sc->kbd); sp->kbd_opened = FALSE; +sccnkbdunlock(sc, sp); } /* @@ -1751,6 +1777,7 @@ sc_cngrab(struct consdev *cp) if (lev >= 0 && lev < 2) { sccnopen(sc, >grab_state[lev], 1 | 2); sccnscrunlock(sc, >grab_state[lev]); + sccnkbdunlock(sc, >grab_state[lev]); } } @@ -1763,6 +1790,7 @@ sc_cnungrab(struct consdev *cp) sc = sc_console->sc; lev = atomic_load_acq_int(>grab_level) - 1; if (lev >= 0 && lev < 2) { + sccnkbdlock(sc, >grab_state[lev]); sccnscrlock(sc, >grab_state[lev]); sccnclose(sc, >grab_state[lev]); } @@ -1825,16 +1853,20 @@ sc_cnputc(struct consdev *cd, int c) static int sc_cngetc(struct consdev *cd) { +struct sc_cnstate st; int c, s; /* assert(sc_console != NULL) */ +sccnopen(sc_console->sc, , 1); s = spltty(); /* block sckbdevent and scrn_timer while we poll */ -if (sc_console->sc->kbd == NULL) { +if (!st.kbd_opened) { splx(s); - return -1; + sccnclose(sc_console->sc, ); + return -1; /* means no keyboard since we fudged the locking */ } -c = sc_cngetc_locked(NULL); +c = sc_cngetc_locked(); splx(s); +sccnclose(sc_console->sc, ); return c; } @@ -1858,7 +1890,7 @@ sc_cngetc_locked(struct sc_cnstate *sp) if
svn commit: r305120 - head/sys/arm/allwinner
Author: jmcneill Date: Wed Aug 31 10:45:53 2016 New Revision: 305120 URL: https://svnweb.freebsd.org/changeset/base/305120 Log: Add support for Allwinner A64 USB PHY. Reviewed by: manu Modified: head/sys/arm/allwinner/aw_usbphy.c Modified: head/sys/arm/allwinner/aw_usbphy.c == --- head/sys/arm/allwinner/aw_usbphy.c Wed Aug 31 10:45:33 2016 (r305119) +++ head/sys/arm/allwinner/aw_usbphy.c Wed Aug 31 10:45:53 2016 (r305120) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -53,25 +54,89 @@ __FBSDID("$FreeBSD$"); #include "phy_if.h" #defineUSBPHY_NPHYS4 +#defineUSBPHY_NRES USBPHY_NPHYS + +enum awusbphy_type { + AWUSBPHY_TYPE_A10 = 1, + AWUSBPHY_TYPE_A13, + AWUSBPHY_TYPE_A20, + AWUSBPHY_TYPE_A31, + AWUSBPHY_TYPE_A83T, + AWUSBPHY_TYPE_H3, + AWUSBPHY_TYPE_A64 +}; static struct ofw_compat_data compat_data[] = { - { "allwinner,sun4i-a10-usb-phy",1 }, - { "allwinner,sun5i-a13-usb-phy",1 }, - { "allwinner,sun6i-a31-usb-phy",1 }, - { "allwinner,sun7i-a20-usb-phy",1 }, - { "allwinner,sun8i-a83t-usb-phy", 1 }, - { "allwinner,sun8i-h3-usb-phy", 1 }, + { "allwinner,sun4i-a10-usb-phy",AWUSBPHY_TYPE_A10 }, + { "allwinner,sun5i-a13-usb-phy",AWUSBPHY_TYPE_A13 }, + { "allwinner,sun6i-a31-usb-phy",AWUSBPHY_TYPE_A31 }, + { "allwinner,sun7i-a20-usb-phy",AWUSBPHY_TYPE_A20 }, + { "allwinner,sun8i-a83t-usb-phy", AWUSBPHY_TYPE_A83T }, + { "allwinner,sun8i-h3-usb-phy", AWUSBPHY_TYPE_H3 }, + { "allwinner,sun50i-a64-usb-phy", AWUSBPHY_TYPE_A64 }, { NULL, 0 } }; struct awusbphy_softc { + struct resource * res[USBPHY_NRES]; regulator_t reg[USBPHY_NPHYS]; gpio_pin_t id_det_pin; int id_det_valid; gpio_pin_t vbus_det_pin; int vbus_det_valid; + enum awusbphy_type phy_type; }; +static struct resource_spec awusbphy_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_MEMORY, 1, RF_ACTIVE }, + { SYS_RES_MEMORY, 2, RF_ACTIVE | RF_OPTIONAL }, + { SYS_RES_MEMORY, 3, RF_ACTIVE | RF_OPTIONAL }, + { -1, 0 } +}; + +#defineRD4(sc, i, o) bus_read_4((sc)->res[(i)], (o)) +#defineWR4(sc, i, o, v)bus_write_4((sc)->res[(i)], (o), (v)) +#defineCLR4(sc, i, o, m) WR4(sc, i, o, RD4(sc, i, o) & ~(m)) +#defineSET4(sc, i, o, m) WR4(sc, i, o, RD4(sc, i, o) | (m)) + +#defineOTG_PHY_CFG 0x20 +#define OTG_PHY_ROUTE_OTG (1 << 0) +#definePMU_IRQ_ENABLE 0x00 +#define PMU_AHB_INCR8 (1 << 10) +#define PMU_AHB_INCR4 (1 << 9) +#define PMU_AHB_INCRX_ALIGN(1 << 8) +#define PMU_ULPI_BYPASS(1 << 0) +#definePMU_UNK_H3 0x10 +#define PMU_UNK_H3_CLR 0x2 + +static void +awusbphy_configure(device_t dev, int phyno) +{ + struct awusbphy_softc *sc; + + sc = device_get_softc(dev); + + if (sc->res[phyno] == NULL) + return; + + if (sc->phy_type == AWUSBPHY_TYPE_A64) { + CLR4(sc, phyno, PMU_UNK_H3, PMU_UNK_H3_CLR); + + /* EHCI0 and OTG share a PHY */ + if (phyno == 0) + SET4(sc, 0, OTG_PHY_CFG, OTG_PHY_ROUTE_OTG); + else if (phyno == 1) + CLR4(sc, 0, OTG_PHY_CFG, OTG_PHY_ROUTE_OTG); + } + + if (phyno > 0) { + /* Enable passby */ + SET4(sc, phyno, PMU_IRQ_ENABLE, PMU_ULPI_BYPASS | + PMU_AHB_INCR8 | PMU_AHB_INCR4 | PMU_AHB_INCRX_ALIGN); + } +} + static int awusbphy_init(device_t dev) { @@ -86,6 +151,8 @@ awusbphy_init(device_t dev) sc = device_get_softc(dev); node = ofw_bus_get_node(dev); + sc->phy_type = ofw_bus_search_compatible(dev, compat_data)->ocd_data; + /* Enable clocks */ for (off = 0; clk_get_by_ofw_index(dev, 0, off, ) == 0; off++) { error = clk_enable(clk); @@ -123,6 +190,10 @@ awusbphy_init(device_t dev) if (error == 0) sc->vbus_det_valid = 1; + /* Allocate resources */ + if (bus_alloc_resources(dev, awusbphy_spec, sc->res) != 0) + device_printf(dev, "couldn't allocate resources\n"); + return (0); } @@ -159,6 +230,9 @@ awusbphy_phy_enable(device_t dev, intptr sc = device_get_softc(dev); + /* Configure PHY */ + awusbphy_configure(dev, phy); + /* Regulators are optional. If
svn commit: r305119 - in head/sys/arm/ti: am335x cpsw
Author: bz Date: Wed Aug 31 10:45:33 2016 New Revision: 305119 URL: https://svnweb.freebsd.org/changeset/base/305119 Log: After r305113, try to properly replace the magic numbers with proper #defines for this driver (not using the wrong header). Modified: head/sys/arm/ti/am335x/am335x_scm.h head/sys/arm/ti/cpsw/if_cpsw.c head/sys/arm/ti/cpsw/if_cpswreg.h Modified: head/sys/arm/ti/am335x/am335x_scm.h == --- head/sys/arm/ti/am335x/am335x_scm.h Wed Aug 31 09:50:02 2016 (r305118) +++ head/sys/arm/ti/am335x/am335x_scm.h Wed Aug 31 10:45:33 2016 (r305119) @@ -42,8 +42,6 @@ #defineSCM_USB_STS00x624 #defineSCM_USB_CTRL1 0x628 #defineSCM_USB_STS10x62C -#defineSCM_MAC_ID0_LO 0x630 -#defineSCM_MAC_ID0_HI 0x634 #defineSCM_PWMSS_CTRL 0x664 #endif /* __AM335X_SCM_H__ */ Modified: head/sys/arm/ti/cpsw/if_cpsw.c == --- head/sys/arm/ti/cpsw/if_cpsw.c Wed Aug 31 09:50:02 2016 (r305118) +++ head/sys/arm/ti/cpsw/if_cpsw.c Wed Aug 31 10:45:33 2016 (r305119) @@ -1019,14 +1019,14 @@ cpswp_attach(device_t dev) IFQ_SET_READY(>if_snd); /* Get high part of MAC address from control module (mac_id[0|1]_hi) */ - ti_scm_reg_read_4(SCM_MAC_ID0_HI + sc->unit * 8, ); + ti_scm_reg_read_4(CPSW_MAC_ID0_HI + sc->unit * 8, ); mac_addr[0] = reg & 0xFF; mac_addr[1] = (reg >> 8) & 0xFF; mac_addr[2] = (reg >> 16) & 0xFF; mac_addr[3] = (reg >> 24) & 0xFF; /* Get low part of MAC address from control module (mac_id[0|1]_lo) */ - ti_scm_reg_read_4(SCM_MAC_ID0_LO + sc->unit * 8, ); + ti_scm_reg_read_4(CPSW_MAC_ID0_LO + sc->unit * 8, ); mac_addr[4] = reg & 0xFF; mac_addr[5] = (reg >> 8) & 0xFF; Modified: head/sys/arm/ti/cpsw/if_cpswreg.h == --- head/sys/arm/ti/cpsw/if_cpswreg.h Wed Aug 31 09:50:02 2016 (r305118) +++ head/sys/arm/ti/cpsw/if_cpswreg.h Wed Aug 31 10:45:33 2016 (r305119) @@ -46,6 +46,9 @@ #defineCPSW_PORT_P_SA_LO(p)(CPSW_PORT_OFFSET + 0x120 + ((p-1) * 0x100)) #defineCPSW_PORT_P_SA_HI(p)(CPSW_PORT_OFFSET + 0x124 + ((p-1) * 0x100)) +#defineCPSW_MAC_ID0_LO 0x0630 +#defineCPSW_MAC_ID0_HI 0x0634 + #defineCPSW_CPDMA_OFFSET 0x0800 #defineCPSW_CPDMA_TX_CONTROL (CPSW_CPDMA_OFFSET + 0x04) #defineCPSW_CPDMA_TX_TEARDOWN (CPSW_CPDMA_OFFSET + 0x08) ___ 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: r305113 - in head/sys/arm/ti: am335x cpsw
On 31 Aug 2016, at 7:03, Luiz Otavio O Souza wrote: Author: loos Date: Wed Aug 31 07:03:06 2016 New Revision: 305113 URL: https://svnweb.freebsd.org/changeset/base/305113 Log: Replace more magic numbers with the proper register names. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/arm/ti/am335x/am335x_scm.h head/sys/arm/ti/cpsw/if_cpsw.c Was this the right header file? Looks like it wasn’t to me :( /scratch/tmp/bz/head.svn/sys/modules/cpsw/../../arm/ti/cpsw/if_cpsw.c:1022:20: error: use of undeclared identifier 'SCM_MAC_ID0_HI' /scratch/tmp/bz/head.svn/sys/modules/cpsw/../../arm/ti/cpsw/if_cpsw.c:1029:20: error: use of undeclared identifier 'SCM_MAC_ID0_LO' Modified: head/sys/arm/ti/am335x/am335x_scm.h == --- head/sys/arm/ti/am335x/am335x_scm.h Wed Aug 31 06:46:47 2016 (r305112) +++ head/sys/arm/ti/am335x/am335x_scm.h Wed Aug 31 07:03:06 2016 (r305113) @@ -34,6 +34,8 @@ #defineSCM_USB_STS00x624 #defineSCM_USB_CTRL1 0x628 #defineSCM_USB_STS10x62C +#defineSCM_MAC_ID0_LO 0x630 +#defineSCM_MAC_ID0_HI 0x634 #defineSCM_PWMSS_CTRL 0x664 #endif /* __AM335X_SCM_H__ */ ___ 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: r305118 - stable/10/sbin/camcontrol
Author: mav Date: Wed Aug 31 09:50:02 2016 New Revision: 305118 URL: https://svnweb.freebsd.org/changeset/base/305118 Log: MFC r304751: Fix minor copy/paste bug. Modified: stable/10/sbin/camcontrol/camcontrol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/camcontrol/camcontrol.c == --- stable/10/sbin/camcontrol/camcontrol.c Wed Aug 31 09:49:26 2016 (r305117) +++ stable/10/sbin/camcontrol/camcontrol.c Wed Aug 31 09:50:02 2016 (r305118) @@ -7352,7 +7352,7 @@ smpphycontrol(struct cam_device *device, response = malloc(sizeof(*response)); if (response == NULL) { warn("%s: unable to allocate %zd bytes", __func__, -sizeof(*request)); +sizeof(*response)); retval = 1; goto bailout; } ___ 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: r305117 - stable/11/sbin/camcontrol
Author: mav Date: Wed Aug 31 09:49:26 2016 New Revision: 305117 URL: https://svnweb.freebsd.org/changeset/base/305117 Log: MFC r304751: Fix minor copy/paste bug. Modified: stable/11/sbin/camcontrol/camcontrol.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/camcontrol/camcontrol.c == --- stable/11/sbin/camcontrol/camcontrol.c Wed Aug 31 09:23:09 2016 (r305116) +++ stable/11/sbin/camcontrol/camcontrol.c Wed Aug 31 09:49:26 2016 (r305117) @@ -7515,7 +7515,7 @@ smpphycontrol(struct cam_device *device, response = malloc(sizeof(*response)); if (response == NULL) { warn("%s: unable to allocate %zd bytes", __func__, -sizeof(*request)); +sizeof(*response)); retval = 1; goto bailout; } ___ 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: r305116 - head/lib/libstand
Author: tsoome Date: Wed Aug 31 09:23:09 2016 New Revision: 305116 URL: https://svnweb.freebsd.org/changeset/base/305116 Log: recvtftp() is broken for large files, report file size The tftp download for large files will cause internal block id to wrap to 0 as the data type is unsigned short. Also provide file size information for stat. PR: 200500 Reported by: tsoome Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision:https://reviews.freebsd.org/D7660 Modified: head/lib/libstand/tftp.c Modified: head/lib/libstand/tftp.c == --- head/lib/libstand/tftp.cWed Aug 31 07:42:46 2016(r305115) +++ head/lib/libstand/tftp.cWed Aug 31 09:23:09 2016(r305116) @@ -200,7 +200,7 @@ recvtftp(struct tftp_handle *h, void *pk case DATA: { int got; - if (htons(t->th_block) != d->xid) { + if (htons(t->th_block) != (u_short) d->xid) { /* * Expected block? */ @@ -560,7 +560,7 @@ tftp_stat(struct open_file *f, struct st sb->st_nlink = 1; sb->st_uid = 0; sb->st_gid = 0; - sb->st_size = -1; + sb->st_size = (off_t) tftpfile->tftp_tsize; return (0); } @@ -731,6 +731,8 @@ tftp_parse_oack(struct tftp_handle *h, c } else if (strcasecmp(tftp_options[i], "tsize") == 0) { if (i + 1 < option_idx) tsize = strtol(tftp_options[i + 1], (char **)NULL, 10); + if (tsize != 0) + h->tftp_tsize = tsize; } else { /* Do not allow any options we did not expect to be ACKed. */ printf("unexpected tftp option '%s'\n", tftp_options[i]); ___ 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: r305115 - head/sys/arm/ti/am335x
Author: loos Date: Wed Aug 31 07:42:46 2016 New Revision: 305115 URL: https://svnweb.freebsd.org/changeset/base/305115 Log: Add a driver for the AM335x bandgap sensor, an on-die temperature sensor as part of the AM335x control module extension. TI says that the bandgap sensor is not very accurate on AM335x, but in our tests it seems to be a good reference for the SoC temperature. TI details: http://processors.wiki.ti.com/index.php/AM335x_Thermal_Considerations#Measuring_Case_Temperature Sponsored by: Rubicon Communications, LLC (Netgate) Added: head/sys/arm/ti/am335x/am335x_scm.c (contents, props changed) Modified: head/sys/arm/ti/am335x/am335x_scm.h head/sys/arm/ti/am335x/files.am335x Added: head/sys/arm/ti/am335x/am335x_scm.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/ti/am335x/am335x_scm.c Wed Aug 31 07:42:46 2016 (r305115) @@ -0,0 +1,169 @@ +/*- + * Copyright (c) 2016 Rubicon Communications, LLC (Netgate) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#defineTZ_ZEROC2731 + +struct am335x_scm_softc { + int sc_last_temp; + struct sysctl_oid *sc_temp_oid; +}; + +static int +am335x_scm_temp_sysctl(SYSCTL_HANDLER_ARGS) +{ + device_t dev; + int i, temp; + struct am335x_scm_softc *sc; + uint32_t reg; + + dev = (device_t)arg1; + sc = device_get_softc(dev); + + /* Read the temperature and convert to Kelvin. */ + for(i = 50; i > 0; i--) { + ti_scm_reg_read_4(SCM_BGAP_CTRL, ); + if ((reg & SCM_BGAP_EOCZ) == 0) + break; + DELAY(50); + } + if ((reg & SCM_BGAP_EOCZ) == 0) { + sc->sc_last_temp = + (reg >> SCM_BGAP_TEMP_SHIFT) & SCM_BGAP_TEMP_MASK; + sc->sc_last_temp *= 10; + } + temp = sc->sc_last_temp + TZ_ZEROC; + + return (sysctl_handle_int(oidp, , 0, req)); +} + +static void +am335x_scm_identify(driver_t *driver, device_t parent) +{ + device_t child; + + /* AM335x only. */ + if (ti_chip() != CHIP_AM335X) + return; + + /* Make sure we attach only once. */ + if (device_find_child(parent, "am335x_scm", -1) != NULL) + return; + + child = device_add_child(parent, "am335x_scm", -1); + if (child == NULL) + device_printf(parent, "cannot add ti_scm child\n"); +} + +static int +am335x_scm_probe(device_t dev) +{ + + device_set_desc(dev, "AM335x Control Module Extension"); + + return (BUS_PROBE_DEFAULT); +} + +static int +am335x_scm_attach(device_t dev) +{ + struct am335x_scm_softc *sc; + struct sysctl_ctx_list *ctx; + struct sysctl_oid_list *tree; + uint32_t reg; + + /* Set ADC to continous mode, clear output reset. */ + reg = SCM_BGAP_CLRZ | SCM_BGAP_CONTCONV; + ti_scm_reg_write_4(SCM_BGAP_CTRL, reg); + /* Flush write. */ + ti_scm_reg_read_4(SCM_BGAP_CTRL, ); + /* Start the ADC conversion. */ + reg = SCM_BGAP_CLRZ | SCM_BGAP_CONTCONV | SCM_BGAP_SOC; + ti_scm_reg_write_4(SCM_BGAP_CTRL, reg); + + /* Temperature sysctl. */ + sc = device_get_softc(dev); +ctx = device_get_sysctl_ctx(dev); + tree = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); + sc->sc_temp_oid = SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, +
svn commit: r305114 - head/sys/arm/ti
Author: loos Date: Wed Aug 31 07:22:14 2016 New Revision: 305114 URL: https://svnweb.freebsd.org/changeset/base/305114 Log: Allow the use of control module extensions to cope with specific platform features. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/arm/ti/ti_scm.c Modified: head/sys/arm/ti/ti_scm.c == --- head/sys/arm/ti/ti_scm.cWed Aug 31 07:03:06 2016(r305113) +++ head/sys/arm/ti/ti_scm.cWed Aug 31 07:22:14 2016(r305114) @@ -131,7 +131,11 @@ ti_scm_attach(device_t dev) ti_scm_sc = sc; - return (0); + /* Attach platform extensions, if any. */ + bus_generic_probe(dev); + bus_enumerate_hinted_children(dev); + + return (bus_generic_attach(dev)); } 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"
Re: svn commit: r305084 - head/tools/regression/capsicum/syscalls
On Tue, Aug 30, 2016 at 06:04:50PM -0700, Ngie Cooper wrote: > On Tue, Aug 30, 2016 at 12:58 PM, Mariusz Zaborski> wrote: > > Author: oshogbo > > Date: Tue Aug 30 19:58:41 2016 > > New Revision: 305084 > > URL: https://svnweb.freebsd.org/changeset/base/305084 > > > > Log: > > Fix Capsicum syscalls test suite. > > Do you plan on MFCing the change? emaste@ suggested to change it to the kyua tests, what would you think about MFCing after that? > Thanks, > -Ngie Thanks, -- Mariusz Zaborski oshogbo//vx | http://oshogbo.vexillium.org FreeBSD commiter| https://freebsd.org Software developer | http://wheelsystems.com If it's not broken, let's fix it till it is!!1 signature.asc Description: PGP signature
svn commit: r305113 - in head/sys/arm/ti: am335x cpsw
Author: loos Date: Wed Aug 31 07:03:06 2016 New Revision: 305113 URL: https://svnweb.freebsd.org/changeset/base/305113 Log: Replace more magic numbers with the proper register names. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/arm/ti/am335x/am335x_scm.h head/sys/arm/ti/cpsw/if_cpsw.c Modified: head/sys/arm/ti/am335x/am335x_scm.h == --- head/sys/arm/ti/am335x/am335x_scm.h Wed Aug 31 06:46:47 2016 (r305112) +++ head/sys/arm/ti/am335x/am335x_scm.h Wed Aug 31 07:03:06 2016 (r305113) @@ -34,6 +34,8 @@ #defineSCM_USB_STS00x624 #defineSCM_USB_CTRL1 0x628 #defineSCM_USB_STS10x62C +#defineSCM_MAC_ID0_LO 0x630 +#defineSCM_MAC_ID0_HI 0x634 #defineSCM_PWMSS_CTRL 0x664 #endif /* __AM335X_SCM_H__ */ Modified: head/sys/arm/ti/cpsw/if_cpsw.c == --- head/sys/arm/ti/cpsw/if_cpsw.c Wed Aug 31 06:46:47 2016 (r305112) +++ head/sys/arm/ti/cpsw/if_cpsw.c Wed Aug 31 07:03:06 2016 (r305113) @@ -1019,14 +1019,14 @@ cpswp_attach(device_t dev) IFQ_SET_READY(>if_snd); /* Get high part of MAC address from control module (mac_id[0|1]_hi) */ - ti_scm_reg_read_4(0x634 + sc->unit * 8, ); + ti_scm_reg_read_4(SCM_MAC_ID0_HI + sc->unit * 8, ); mac_addr[0] = reg & 0xFF; mac_addr[1] = (reg >> 8) & 0xFF; mac_addr[2] = (reg >> 16) & 0xFF; mac_addr[3] = (reg >> 24) & 0xFF; /* Get low part of MAC address from control module (mac_id[0|1]_lo) */ - ti_scm_reg_read_4(0x630 + sc->unit * 8, ); + ti_scm_reg_read_4(SCM_MAC_ID0_LO + sc->unit * 8, ); mac_addr[4] = reg & 0xFF; mac_addr[5] = (reg >> 8) & 0xFF; ___ 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: r305112 - head/sys/arm/ti/am335x
Author: loos Date: Wed Aug 31 06:46:47 2016 New Revision: 305112 URL: https://svnweb.freebsd.org/changeset/base/305112 Log: Replace a magic number with the proper register name. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/arm/ti/am335x/am335x_prcm.c head/sys/arm/ti/am335x/am335x_scm.h Modified: head/sys/arm/ti/am335x/am335x_prcm.c == --- head/sys/arm/ti/am335x/am335x_prcm.cWed Aug 31 06:00:20 2016 (r305111) +++ head/sys/arm/ti/am335x/am335x_prcm.cWed Aug 31 06:46:47 2016 (r305112) @@ -619,10 +619,9 @@ am335x_clk_get_sysclk_freq(struct ti_clo { uint32_t ctrl_status; - /* Read the input clock freq from the control module */ - /* control_status reg (0x40) */ - if (ti_scm_reg_read_4(0x40, _status)) - return ENXIO; + /* Read the input clock freq from the control module. */ + if (ti_scm_reg_read_4(SCM_CTRL_STATUS, _status)) + return (ENXIO); switch ((ctrl_status>>22) & 0x3) { case 0x0: Modified: head/sys/arm/ti/am335x/am335x_scm.h == --- head/sys/arm/ti/am335x/am335x_scm.h Wed Aug 31 06:00:20 2016 (r305111) +++ head/sys/arm/ti/am335x/am335x_scm.h Wed Aug 31 06:46:47 2016 (r305112) @@ -29,6 +29,7 @@ #define __AM335X_SCM_H__ /* AM335x-specific registers for control module (scm) */ +#defineSCM_CTRL_STATUS 0x40 #defineSCM_USB_CTRL0 0x620 #defineSCM_USB_STS00x624 #defineSCM_USB_CTRL1 0x628 ___ 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: r305091 - head/sys/sys
On Wed, 31 Aug 2016, Mateusz Guzik wrote: On Tue, Aug 30, 2016 at 03:35:39PM -0700, Conrad Meyer wrote: On Tue, Aug 30, 2016 at 2:48 PM, Mateusz Guzikwrote: Author: mjg Date: Tue Aug 30 21:48:10 2016 New Revision: 305091 URL: https://svnweb.freebsd.org/changeset/base/305091 Log: fd: simplify fd testing in fget_locked by casting to u_int Modified: head/sys/sys/filedesc.h Modified: head/sys/sys/filedesc.h == --- head/sys/sys/filedesc.h Tue Aug 30 21:43:57 2016(r305090) +++ head/sys/sys/filedesc.h Tue Aug 30 21:48:10 2016(r305091) @@ -201,7 +201,7 @@ fget_locked(struct filedesc *fdp, int fd FILEDESC_LOCK_ASSERT(fdp); - if (fd < 0 || fd > fdp->fd_lastfile) + if ((u_int)fd > fdp->fd_lastfile) return (NULL); return (fdp->fd_ofiles[fd].fde_file); This was correct. Now it is obfuscated by a bogus cast. Let the compiler do a strength reduction to a single comparison operator iff that is best. The cast is like using "register". In 1980's code I wrote lots of such unsigned casts since compilers were not so good and didn't do the strength reduction. I notice that fd_lastfile is an 'int'. Won't this trigger warnings about the differing signedness of the two sides of the comparison? Should fd_lastfile just be u_int as well? (If not (there is some valid negative value), this change may be invalid.) Ugh. fd_lastfile has the correct for a file descriptor (int). Making it unsigned would just require many more bogus casts to break warnings when comparing it with file descriptors. Almost all uses of unsigned types are errors. At best, the unsigned type doubles the range of non-negative values and gives arithmetic modulo 2**N instead of normal arithmetic. It is -1 just after inception and is supposed to grow immediately after. That is, the table with -1 should never be accessible. But now that you mention it I agree this is bad style. This unnecessarily differs from the check in fget_unlocked so I'll just unify it. Don't break the latter too. I already had to fix it once there. It had 2 commits just to move the bogus cast back and forth before I removed it. following churning: - created in r89969. This used 1 bogus cast. It was copied from a bad example in kern_descrip.c. It did a redundant check that (fd < 0). I had committed fixes for some bad examples like this in kern, but not this one. - I complained about this to Albert, but he didn't understand and changed it to the above in r89969. This works, but it is obscure. It depends on both fd and fdp->fd_lastfile having type int. So both operands are promoted to u_int and unsigned magic works. - some compilers apparently object to the implicit conversion of the second operand. So it was changed to use 2 bogus casts in r100072. This works, but it still depends on both fd and fdp->fd_lastfile having type int. Otherwise the cast might truncate 1 or both of them, or if they are smaller than int (perhaps int32_t) then it isn't clear if the cast works as intended. - I got tired of giving lessons and committed what I wanted in r126592. See the log message for r126592 for less details. Bruce ___ 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: r305111 - head/sys/dev/hyperv/utilities
Author: sephe Date: Wed Aug 31 06:00:20 2016 New Revision: 305111 URL: https://svnweb.freebsd.org/changeset/base/305111 Log: hyperv/timesync: Rework time adjustment policy - By default, adjust time upon SYNC request. It can be disabled through hw.hvtimesync.ignore_sync_req. SYNC request will be sent by hypervisor the host is resumed, rebooted, etc. - By default, adjust time upon SAMPLE request, if there is 100ms difference between VM time and hypervisor time. This can be disabled through hw.hvtimesync.sample_drift. And nuke the unnecessary task, since channel callback is running in a Hyper-V taskqueue nowadays. Submitted by: YanZhe Chen Discussed with: Dexuan Cui , Hongjiang Zhang , sephe MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7707 Modified: head/sys/dev/hyperv/utilities/hv_timesync.c Modified: head/sys/dev/hyperv/utilities/hv_timesync.c == --- head/sys/dev/hyperv/utilities/hv_timesync.c Wed Aug 31 05:27:30 2016 (r305110) +++ head/sys/dev/hyperv/utilities/hv_timesync.c Wed Aug 31 06:00:20 2016 (r305111) @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include @@ -52,11 +52,7 @@ #define HV_ICTIMESYNCFLAG_SYNC 1 #define HV_ICTIMESYNCFLAG_SAMPLE2 #define HV_NANO_SEC_PER_SEC 10 - -/* Time Sync data */ -typedef struct { - uint64_t data; -} time_sync_data; +#define HV_NANO_SEC_PER_MILLI_SEC 100 static const struct vmbus_ic_desc vmbus_timesync_descs[] = { { @@ -75,22 +71,43 @@ struct hv_ictimesync_data { uint8_t flags; } __packed; -typedef struct hv_timesync_sc { - hv_util_sc util_sc; - struct task task; - time_sync_data time_msg; -} hv_timesync_sc; +/* + * Globals + */ +SYSCTL_NODE(_hw, OID_AUTO, hvtimesync, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, +"Hyper-V timesync interface"); + +/* Ignore the sync request when set to 1. */ +static int ignore_sync_req = 0; +SYSCTL_INT(_hw_hvtimesync, OID_AUTO, ignore_sync_req, CTLFLAG_RWTUN, +_sync_req, 0, +"Ignore the sync request when set to 1."); + +/* + * Trigger sample sync when drift exceeds threshold (ms). + * Ignore the sample request when set to 0. + */ +static int sample_drift = 100; +SYSCTL_INT(_hw_hvtimesync, OID_AUTO, sample_drift, CTLFLAG_RWTUN, +_drift, 0, +"Threshold that makes sample request trigger the sync."); /** - * Set host time based on time sync message from host + * @brief Synchronize time with host after reboot, restore, etc. + * + * ICTIMESYNCFLAG_SYNC flag bit indicates reboot, restore events of the VM. + * After reboot the flag ICTIMESYNCFLAG_SYNC is included in the first time + * message after the timesync channel is opened. Since the hv_utils module is + * loaded after hv_vmbus, the first message is usually missed. The other + * thing is, systime is automatically set to emulated hardware clock which may + * not be UTC time or in the same time zone. So, to override these effects, we + * use the first 50 time samples for initial system time setting. */ -static void -hv_set_host_time(void *context, int pending) +static inline +void hv_adj_guesttime(hv_util_sc *sc, uint64_t hosttime, uint8_t flags) { - hv_timesync_sc *softc = (hv_timesync_sc*)context; - uint64_t hosttime = softc->time_msg.data; struct timespec guest_ts, host_ts; - uint64_t host_tns; + uint64_t host_tns, guest_tns; int64_t diff; int error; @@ -99,37 +116,35 @@ hv_set_host_time(void *context, int pend host_ts.tv_nsec = (long)(host_tns%HV_NANO_SEC_PER_SEC); nanotime(_ts); + guest_tns = guest_ts.tv_sec * HV_NANO_SEC_PER_SEC + guest_ts.tv_nsec; - diff = (int64_t)host_ts.tv_sec - (int64_t)guest_ts.tv_sec; + if ((flags & HV_ICTIMESYNCFLAG_SYNC) != 0 && ignore_sync_req == 0) { + if (bootverbose) { + device_printf(sc->ic_dev, "handle sync request " + "{host: %ju, guest: %ju}\n", + (uintmax_t)host_tns, (uintmax_t)guest_tns); + } - /* -* If host differs by 5 seconds then make the guest catch up -*/ - if (diff > 5 || diff < -5) { error = kern_clock_settime(curthread, CLOCK_REALTIME, _ts); + return; } -} -/** - * @brief Synchronize time with host after reboot, restore, etc. - * - * ICTIMESYNCFLAG_SYNC flag bit indicates reboot, restore events of the VM. - * After reboot the flag ICTIMESYNCFLAG_SYNC is included in the first time - * message after the timesync channel is opened. Since the hv_utils module is - * loaded after hv_vmbus, the first message is usually missed. The other - * thing is, systime is automatically set to emulated hardware clock which