svn commit: r351925 - stable/11/usr.bin/last
Author: eugen Date: Fri Sep 6 05:34:31 2019 New Revision: 351925 URL: https://svnweb.freebsd.org/changeset/base/351925 Log: MFC r351413,351459,351467: unbreak last(1) for 8-bit locales Ouput format of last's broken for non UTF-8 locales since it got libxo(3) support. It uses strftime(3) that produces non UTF-8 strings passed to xo_emit(3) with wrong %s format - it should be %hs in this case, so xo_emit(3) produces empty output. This change is basically no-op when locale is of UTF-8 type, f.e. en_GB.UTF-8 or ru_RU.UTF-8 or sr_RS.UTF-8@latin. Also it is no-op for C/POSIX locale that's a subset of UTF-8. It fixes output for other locales. Modified: stable/11/usr.bin/last/last.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/last/last.c == --- stable/11/usr.bin/last/last.c Fri Sep 6 05:30:06 2019 (r351924) +++ stable/11/usr.bin/last/last.c Fri Sep 6 05:34:31 2019 (r351925) @@ -88,6 +88,7 @@ static const char *crmsg;/* cause of last reboot */ static time_t currentout; /* current logout value */ static longmaxrec; /* records to display */ static const char *file = NULL; /* utx.log file */ +static int noctfix = 0;/* locale is C or UTF-8 */ static int sflag = 0; /* show delta in seconds */ static int width = 5; /* show seconds in delta */ static int yflag; /* show year */ @@ -99,6 +100,7 @@ static time_tsnaptime; /* if != 0, we will only */ static void addarg(int, char *); +static const char *ctf(const char *); static time_t dateconv(char *); static void doentry(struct utmpx *); static void hostconv(char *); @@ -108,6 +110,31 @@ static int want(struct utmpx *); static void usage(void); static void wtmp(void); +static const char* +ctf(const char *fmt) { + static char buf[31]; + const char *src, *end; + char*dst; + + if (noctfix) + return (fmt); + + end = buf + sizeof(buf); + for (src = fmt, dst = buf; dst < end; *dst++ = *src++) { + if (*src == '\0') { + *dst = '\0'; + break; + } else if (*src == '%' && *(src+1) == 's') { + *dst++ = '%'; + *dst++ = 'h'; + *dst++ = 's'; + strlcpy(dst, src+2, end - dst); + return (buf); + } + } + return (buf); +} + static void usage(void) { @@ -126,6 +153,11 @@ main(int argc, char *argv[]) (void) setlocale(LC_TIME, ""); d_first = (*nl_langinfo(D_MD_ORDER) == 'd'); + (void) setlocale(LC_CTYPE, ""); + p = nl_langinfo(CODESET); + if (strcmp(p, "UTF-8") == 0 || strcmp(p, "US-ASCII") == 0) + noctfix = 1; + argc = xo_parse_args(argc, argv); if (argc < 0) exit(1); @@ -247,7 +279,7 @@ wtmp(void) (void) strftime(ct, sizeof(ct), "%+", tm); xo_emit("\n{:utxdb/%s}", (file == NULL) ? "utx.log" : file); xo_attr("seconds", "%lu", (unsigned long) t); - xo_emit(" begins {:begins/%s}\n", ct); + xo_emit(ctf(" begins {:begins/%s}\n"), ct); xo_close_container("last-information"); } @@ -364,7 +396,7 @@ printentry(struct utmpx *bp, struct idtab *tt) break; } xo_attr("seconds", "%lu", (unsigned long)t); - xo_emit(" {:login-time/%s%c/%s}", ct, tt == NULL ? '\n' : ' '); + xo_emit(ctf(" {:login-time/%s%c/%s}"), ct, tt == NULL ? '\n' : ' '); if (tt == NULL) goto end; if (!tt->logout) { @@ -378,7 +410,7 @@ printentry(struct utmpx *bp, struct idtab *tt) tm = localtime(>logout); (void) strftime(ct, sizeof(ct), "%R", tm); xo_attr("seconds", "%lu", (unsigned long)tt->logout); - xo_emit("- {:logout-time/%s}", ct); + xo_emit(ctf("- {:logout-time/%s}"), ct); } delta = tt->logout - bp->ut_tv.tv_sec; xo_attr("seconds", "%ld", (long)delta); @@ -388,9 +420,9 @@ printentry(struct utmpx *bp, struct idtab *tt) tm = gmtime(); (void) strftime(ct, sizeof(ct), width >= 8 ? "%T" : "%R", tm); if (delta < 86400) - xo_emit(" ({:session-length/%s})\n", ct); + xo_emit(ctf(" ({:session-length/%s})\n"), ct); else - xo_emit(" ({:session-length/%ld+%s})\n", + xo_emit(ctf(" ({:session-length/%ld+%s})\n"), (long)delta /
svn commit: r351924 - stable/12/usr.bin/last
Author: eugen Date: Fri Sep 6 05:30:06 2019 New Revision: 351924 URL: https://svnweb.freebsd.org/changeset/base/351924 Log: MFC r351413,351459,351467: unbreak last(1) for 8-bit locales Ouput format of last's broken for non UTF-8 locales since it got libxo(3) support. It uses strftime(3) that produces non UTF-8 strings passed to xo_emit(3) with wrong %s format - it should be %hs in this case, so xo_emit(3) produces empty output. This change is basically no-op when locale is of UTF-8 type, f.e. en_GB.UTF-8 or ru_RU.UTF-8 or sr_RS.UTF-8@latin. Also it is no-op for C/POSIX locale that's a subset of UTF-8. It fixes output for other locales. Modified: stable/12/usr.bin/last/last.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/last/last.c == --- stable/12/usr.bin/last/last.c Fri Sep 6 03:02:12 2019 (r351923) +++ stable/12/usr.bin/last/last.c Fri Sep 6 05:30:06 2019 (r351924) @@ -92,6 +92,7 @@ static const char *crmsg;/* cause of last reboot */ static time_t currentout; /* current logout value */ static longmaxrec; /* records to display */ static const char *file = NULL; /* utx.log file */ +static int noctfix = 0;/* locale is C or UTF-8 */ static int sflag = 0; /* show delta in seconds */ static int width = 5; /* show seconds in delta */ static int yflag; /* show year */ @@ -103,6 +104,7 @@ static time_t snaptime; /* if != 0, we will only */ static void addarg(int, char *); +static const char *ctf(const char *); static time_t dateconv(char *); static void doentry(struct utmpx *); static void hostconv(char *); @@ -112,6 +114,31 @@ static int want(struct utmpx *); static void usage(void); static void wtmp(void); +static const char* +ctf(const char *fmt) { + static char buf[31]; + const char *src, *end; + char*dst; + + if (noctfix) + return (fmt); + + end = buf + sizeof(buf); + for (src = fmt, dst = buf; dst < end; *dst++ = *src++) { + if (*src == '\0') { + *dst = '\0'; + break; + } else if (*src == '%' && *(src+1) == 's') { + *dst++ = '%'; + *dst++ = 'h'; + *dst++ = 's'; + strlcpy(dst, src+2, end - dst); + return (buf); + } + } + return (buf); +} + static void usage(void) { @@ -130,6 +157,11 @@ main(int argc, char *argv[]) (void) setlocale(LC_TIME, ""); d_first = (*nl_langinfo(D_MD_ORDER) == 'd'); + (void) setlocale(LC_CTYPE, ""); + p = nl_langinfo(CODESET); + if (strcmp(p, "UTF-8") == 0 || strcmp(p, "US-ASCII") == 0) + noctfix = 1; + argc = xo_parse_args(argc, argv); if (argc < 0) exit(1); @@ -262,7 +294,7 @@ wtmp(void) (void) strftime(ct, sizeof(ct), "%+", tm); xo_emit("\n{:utxdb/%s}", (file == NULL) ? "utx.log" : file); xo_attr("seconds", "%lu", (unsigned long) t); - xo_emit(" begins {:begins/%s}\n", ct); + xo_emit(ctf(" begins {:begins/%s}\n"), ct); xo_close_container("last-information"); } @@ -379,7 +411,7 @@ printentry(struct utmpx *bp, struct idtab *tt) break; } xo_attr("seconds", "%lu", (unsigned long)t); - xo_emit(" {:login-time/%s%c/%s}", ct, tt == NULL ? '\n' : ' '); + xo_emit(ctf(" {:login-time/%s%c/%s}"), ct, tt == NULL ? '\n' : ' '); if (tt == NULL) goto end; if (!tt->logout) { @@ -393,7 +425,7 @@ printentry(struct utmpx *bp, struct idtab *tt) tm = localtime(>logout); (void) strftime(ct, sizeof(ct), "%R", tm); xo_attr("seconds", "%lu", (unsigned long)tt->logout); - xo_emit("- {:logout-time/%s}", ct); + xo_emit(ctf("- {:logout-time/%s}"), ct); } delta = tt->logout - bp->ut_tv.tv_sec; xo_attr("seconds", "%ld", (long)delta); @@ -403,9 +435,9 @@ printentry(struct utmpx *bp, struct idtab *tt) tm = gmtime(); (void) strftime(ct, sizeof(ct), width >= 8 ? "%T" : "%R", tm); if (delta < 86400) - xo_emit(" ({:session-length/%s})\n", ct); + xo_emit(ctf(" ({:session-length/%s})\n"), ct); else - xo_emit(" ({:session-length/%ld+%s})\n", + xo_emit(ctf(" ({:session-length/%ld+%s})\n"), (long)delta /
Re: svn commit: r351918 - head/sys/kern
On 2019-09-06 11:15:12 (+0800), Ian Lepore wrote: On Fri, 2019-09-06 at 01:19 +, Philip Paeps wrote: Author: philip Date: Fri Sep 6 01:19:31 2019 New Revision: 351918 URL: https://svnweb.freebsd.org/changeset/base/351918 Log: riscv: default to HZ=100 Most current RISC-V development platforms are not fast enough to benefit from the increased granularity provided by HZ=1000. Sponsored by: Axiado Modified: head/sys/kern/subr_param.c Modified: head/sys/kern/subr_param.c = = --- head/sys/kern/subr_param.c Fri Sep 6 00:06:55 2019(r351 917) +++ head/sys/kern/subr_param.c Fri Sep 6 01:19:31 2019(r351 918) @@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$"); */ #ifndef HZ -# if defined(__mips__) || defined(__arm__) +# if defined(__mips__) || defined(__arm__) || defined(__riscv) #defineHZ 100 # else #defineHZ 1000 This seems like a bad idea. I've run a 90mhz armv4 chip with HZ=1000 and didn't notice any performance hit from doing so. Almost all arm kernel config files set HZ as an option, so that define doesn't do much for arm these days. It probably does still set HZ for various mips platforms. I would think 1000 is appropriate for anything modern running at 200mhz or more. Setting it to 100 has the bad side effect of making things like msleep(), tsleep(), and pause() (which show up in plenty of drivers) all have a minimum timeout of 10ms, which is a long long time on modern hardware. What benefit do you think you'll get from the lower number? On systems running at 10s of MHz (or slower, ick), with HZ=1000 you spend an awful lot of time servicing the timer interrupt and not very much time doing anything else. My rationale was that most RISC-V systems (including emulation and FPGA prototypes) I've encountered are running slower than the tipping point where HZ=1000 makes sense. With the default of HZ=100, faster exceptions can still set HZ=1000 in their individual configs. When the RISC-V world evolves to having more actual silicon and fewer slow prototypes, I definitely agree this default should be flipped again for HZ=1000 by default and HZ=100 in the config files for the exceptions. Philip -- Philip Paeps Senior Reality Engineer Alternative Enterprises ___ 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: r351918 - head/sys/kern
On Fri, 2019-09-06 at 01:19 +, Philip Paeps wrote: > Author: philip > Date: Fri Sep 6 01:19:31 2019 > New Revision: 351918 > URL: https://svnweb.freebsd.org/changeset/base/351918 > > Log: > riscv: default to HZ=100 > > Most current RISC-V development platforms are not fast enough to > benefit > from the increased granularity provided by HZ=1000. > > Sponsored by: Axiado > > Modified: > head/sys/kern/subr_param.c > > Modified: head/sys/kern/subr_param.c > = > = > --- head/sys/kern/subr_param.cFri Sep 6 00:06:55 2019(r351 > 917) > +++ head/sys/kern/subr_param.cFri Sep 6 01:19:31 2019(r351 > 918) > @@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$"); > */ > > #ifndef HZ > -# if defined(__mips__) || defined(__arm__) > +# if defined(__mips__) || defined(__arm__) || defined(__riscv) > #define HZ 100 > # else > #define HZ 1000 > This seems like a bad idea. I've run a 90mhz armv4 chip with HZ=1000 and didn't notice any performance hit from doing so. Almost all arm kernel config files set HZ as an option, so that define doesn't do much for arm these days. It probably does still set HZ for various mips platforms. I would think 1000 is appropriate for anything modern running at 200mhz or more. Setting it to 100 has the bad side effect of making things like msleep(), tsleep(), and pause() (which show up in plenty of drivers) all have a minimum timeout of 10ms, which is a long long time on modern hardware. What benefit do you think you'll get from the lower number? -- Ian ___ 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: r351901 - head/sys/fs/nfsserver
Rick Macklem wrote: >Author: rmacklem >Date: Thu Sep 5 22:25:19 2019 >New Revision: 351901 >URL: https://svnweb.freebsd.org/changeset/base/351901 > >Log: > Delete the unused "nd" argument for nfsrv_proxyds(). > > The "nd" argument for nfsrv_proxyds() is no longer used by the function. > This patch deletes it. This allows a subsequent patch to delete the "nd" > argument from nfsvno_getattr(), since it's only use of "nd" was to pass it > to nfsrv_proxyds(). > Getting rid of the "nd" argument from nfsvno_getattr() avoids confusion > over why it might need "nd". Actually, I just looked and nfsvno_getattr() still uses the "nd" argument. However, the other uses are straightforward, so I think getting rid of the unused "nd" argument for nfsrv_proxyds() will simplify the code. rick ___ 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: r351923 - head/sys/powerpc/aim
Author: jhibbits Date: Fri Sep 6 03:02:12 2019 New Revision: 351923 URL: https://svnweb.freebsd.org/changeset/base/351923 Log: powerpc64/pmap: Fix a WITNESS error in alloc_pvo_entry() We only call alloc_pvo_entry() with M_WAITOK from one location. However, this can be called while holding nonsleepable locks. Rather than passing M_WAITOK down, use vm_wait() and loop. Modified: head/sys/powerpc/aim/mmu_oea64.c Modified: head/sys/powerpc/aim/mmu_oea64.c == --- head/sys/powerpc/aim/mmu_oea64.cFri Sep 6 02:52:20 2019 (r351922) +++ head/sys/powerpc/aim/mmu_oea64.cFri Sep 6 03:02:12 2019 (r351923) @@ -374,16 +374,10 @@ vm_page_to_pvoh(vm_page_t m) } static struct pvo_entry * -alloc_pvo_entry(int bootstrap, int flags) +alloc_pvo_entry(int bootstrap) { struct pvo_entry *pvo; - KASSERT(bootstrap || (flags & M_WAITOK) || (flags & M_NOWAIT), - ("Either M_WAITOK or M_NOWAIT flag must be specified " -"when bootstrap is 0")); - KASSERT(!bootstrap || !(flags & M_WAITOK), - ("M_WAITOK can't be used with bootstrap")); - if (!moea64_initialized || bootstrap) { if (moea64_bpvo_pool_index >= moea64_bpvo_pool_size) { panic("moea64_enter: bpvo pool exhausted, %d, %d, %zd", @@ -395,7 +389,7 @@ alloc_pvo_entry(int bootstrap, int flags) bzero(pvo, sizeof(*pvo)); pvo->pvo_vaddr = PVO_BOOTSTRAP; } else - pvo = uma_zalloc(moea64_pvo_zone, flags | M_ZERO); + pvo = uma_zalloc(moea64_pvo_zone, M_NOWAIT | M_ZERO); return (pvo); } @@ -663,7 +657,7 @@ moea64_setup_direct_map(mmu_t mmup, vm_offset_t kernel pregions[i].mr_size; pa += moea64_large_page_size) { pte_lo = LPTE_M; - pvo = alloc_pvo_entry(1 /* bootstrap */, 0); + pvo = alloc_pvo_entry(1 /* bootstrap */); pvo->pvo_vaddr |= PVO_WIRED | PVO_LARGE; init_pvo_entry(pvo, kernel_pmap, PHYS_TO_DMAP(pa)); @@ -1404,7 +1398,7 @@ moea64_enter(mmu_t mmu, pmap_t pmap, vm_offset_t va, v if ((m->oflags & VPO_UNMANAGED) == 0 && !vm_page_xbusied(m)) VM_OBJECT_ASSERT_LOCKED(m->object); - pvo = alloc_pvo_entry(0, M_NOWAIT); + pvo = alloc_pvo_entry(0); if (pvo == NULL) return (KERN_RESOURCE_SHORTAGE); pvo->pvo_pmap = NULL; /* to be filled in later */ @@ -1631,7 +1625,7 @@ moea64_uma_page_alloc(uma_zone_t zone, vm_size_t bytes va = VM_PAGE_TO_PHYS(m); - pvo = alloc_pvo_entry(1 /* bootstrap */, 0); + pvo = alloc_pvo_entry(1 /* bootstrap */); pvo->pvo_pte.prot = VM_PROT_READ | VM_PROT_WRITE; pvo->pvo_pte.pa = VM_PAGE_TO_PHYS(m) | LPTE_M; @@ -1863,7 +1857,11 @@ moea64_kenter_attr(mmu_t mmu, vm_offset_t va, vm_paddr int error; struct pvo_entry *pvo, *oldpvo; - pvo = alloc_pvo_entry(0, M_WAITOK); + do { + pvo = alloc_pvo_entry(0); + if (pvo == NULL) + vm_wait(NULL); + } while (pvo == NULL); pvo->pvo_pte.prot = VM_PROT_READ | VM_PROT_WRITE | VM_PROT_EXECUTE; pvo->pvo_pte.pa = (pa & ~ADDR_POFF) | moea64_calc_wimg(pa, ma); pvo->pvo_vaddr |= PVO_WIRED; ___ 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: r351921 - head/sys/powerpc/aim
Author: jhibbits Date: Fri Sep 6 02:45:46 2019 New Revision: 351921 URL: https://svnweb.freebsd.org/changeset/base/351921 Log: powerpc64/pmap: Simplify the code path for moea64_pte_replace_native() Summary: MOEA64_PTE_REPLACE() is called often with the pmap lock held, and sometimes with the page pv lock held. The less work done while holding a lock, the better. Since we are intending to replace the same PTE (same hash index), we don't need to recalculate anything, just flat replace the PTE. This cuts more than 200 instructions off the invalidating code path. In addition, we don't need to replace a PTE that's not occupied by this PVO. Reviewed by: luporl Differential Revision:https://reviews.freebsd.org/D21515 Modified: head/sys/powerpc/aim/moea64_native.c Modified: head/sys/powerpc/aim/moea64_native.c == --- head/sys/powerpc/aim/moea64_native.cFri Sep 6 02:28:03 2019 (r351920) +++ head/sys/powerpc/aim/moea64_native.cFri Sep 6 02:45:46 2019 (r351921) @@ -358,6 +358,45 @@ moea64_pte_unset_native(mmu_t mmu, struct pvo_entry *p } static int64_t +moea64_pte_replace_inval_native(mmu_t mmu, struct pvo_entry *pvo, +volatile struct lpte *pt) +{ + struct lpte properpt; + uint64_t ptelo; + + moea64_pte_from_pvo(pvo, ); + + rw_rlock(_eviction_lock); + if ((be64toh(pt->pte_hi & LPTE_AVPN_MASK)) != + (properpt.pte_hi & LPTE_AVPN_MASK)) { + /* Evicted */ + STAT_MOEA64(moea64_pte_overflow--); + rw_runlock(_eviction_lock); + return (-1); + } + + /* +* Replace the pte, briefly locking it to collect RC bits. No +* atomics needed since this is protected against eviction by the lock. +*/ + isync(); + critical_enter(); + pt->pte_hi = be64toh((pt->pte_hi & ~LPTE_VALID) | LPTE_LOCKED); + PTESYNC(); + TLBIE(pvo->pvo_vpn); + ptelo = be64toh(pt->pte_lo); + EIEIO(); + pt->pte_lo = htobe64(properpt.pte_lo); + EIEIO(); + pt->pte_hi = htobe64(properpt.pte_hi); /* Release lock */ + PTESYNC(); + critical_exit(); + rw_runlock(_eviction_lock); + + return (ptelo & (LPTE_CHG | LPTE_REF)); +} + +static int64_t moea64_pte_replace_native(mmu_t mmu, struct pvo_entry *pvo, int flags) { volatile struct lpte *pt = moea64_pteg_table + pvo->pvo_pte.slot; @@ -379,8 +418,7 @@ moea64_pte_replace_native(mmu_t mmu, struct pvo_entry rw_runlock(_eviction_lock); } else { /* Otherwise, need reinsertion and deletion */ - ptelo = moea64_pte_unset_native(mmu, pvo); - moea64_pte_insert_native(mmu, pvo); + ptelo = moea64_pte_replace_inval_native(mmu, pvo, pt); } return (ptelo); ___ 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: r351920 - head/stand/common
Author: jhibbits Date: Fri Sep 6 02:28:03 2019 New Revision: 351920 URL: https://svnweb.freebsd.org/changeset/base/351920 Log: Loader: Add load offset to powerpc kernel entry point Summary: There is logic in ELF loadimage() to relocate kernels, but currently only type ET_EXEC. PowerPC kernels are ET_DYN, and can be relocated anywhere. Add the load offset to kernel entry points on this platform. Reviewed by: imp, ian Differential Revision:https://reviews.freebsd.org/D21286 Modified: head/stand/common/load_elf.c Modified: head/stand/common/load_elf.c == --- head/stand/common/load_elf.cFri Sep 6 01:22:16 2019 (r351919) +++ head/stand/common/load_elf.cFri Sep 6 02:28:03 2019 (r351920) @@ -455,7 +455,11 @@ __elfN(loadimage)(struct preloaded_file *fp, elf_file_ ret = 0; firstaddr = lastaddr = 0; ehdr = ef->ehdr; +#ifdef __powerpc__ + if (ef->kernel) { +#else if (ehdr->e_type == ET_EXEC) { +#endif #if defined(__i386__) || defined(__amd64__) #if __ELF_WORD_SIZE == 64 /* x86_64 relocates after locore */ @@ -481,12 +485,11 @@ __elfN(loadimage)(struct preloaded_file *fp, elf_file_ * it's loaded at a 16MB boundary for now... */ off += 0x0100; - ehdr->e_entry += off; + } + ehdr->e_entry += off; #ifdef ELF_VERBOSE - printf("Converted entry 0x%jx\n", (uintmax_t)ehdr->e_entry); + printf("Converted entry 0x%jx\n", (uintmax_t)ehdr->e_entry); #endif - } else - off = 0; #elif defined(__arm__) && !defined(EFI) /* * The elf headers in arm kernels specify virtual addresses in ___ 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: r351919 - head/sys/riscv/conf
Author: philip Date: Fri Sep 6 01:22:16 2019 New Revision: 351919 URL: https://svnweb.freebsd.org/changeset/base/351919 Log: QEMU: use default HZ HZ=100 by default on riscv since r351918. Modified: head/sys/riscv/conf/QEMU Modified: head/sys/riscv/conf/QEMU == --- head/sys/riscv/conf/QEMUFri Sep 6 01:19:31 2019(r351918) +++ head/sys/riscv/conf/QEMUFri Sep 6 01:22:16 2019(r351919) @@ -6,5 +6,4 @@ include "GENERIC" ident QEMU -optionsHZ=100 optionsROOTDEVNAME=\"ufs:/dev/vtbd0\" ___ 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: r351918 - head/sys/kern
Author: philip Date: Fri Sep 6 01:19:31 2019 New Revision: 351918 URL: https://svnweb.freebsd.org/changeset/base/351918 Log: riscv: default to HZ=100 Most current RISC-V development platforms are not fast enough to benefit from the increased granularity provided by HZ=1000. Sponsored by: Axiado Modified: head/sys/kern/subr_param.c Modified: head/sys/kern/subr_param.c == --- head/sys/kern/subr_param.c Fri Sep 6 00:06:55 2019(r351917) +++ head/sys/kern/subr_param.c Fri Sep 6 01:19:31 2019(r351918) @@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$"); */ #ifndef HZ -# if defined(__mips__) || defined(__arm__) +# if defined(__mips__) || defined(__arm__) || defined(__riscv) #defineHZ 100 # else #defineHZ 1000 ___ 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: r351917 - stable/11/sys/dev/pci
Author: imp Date: Fri Sep 6 00:06:55 2019 New Revision: 351917 URL: https://svnweb.freebsd.org/changeset/base/351917 Log: MFC r349845: Work around devices which return all zeros for reads of existing MSI-X table VCTRL registers. PR: 211713 Modified: stable/11/sys/dev/pci/pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/pci/pci.c == --- stable/11/sys/dev/pci/pci.c Fri Sep 6 00:00:13 2019(r351916) +++ stable/11/sys/dev/pci/pci.c Fri Sep 6 00:06:55 2019(r351917) @@ -1656,10 +1656,13 @@ pci_mask_msix(device_t dev, u_int index) KASSERT(msix->msix_msgnum > index, ("bogus index")); offset = msix->msix_table_offset + index * 16 + 12; val = bus_read_4(msix->msix_table_res, offset); - if (!(val & PCIM_MSIX_VCTRL_MASK)) { - val |= PCIM_MSIX_VCTRL_MASK; - bus_write_4(msix->msix_table_res, offset, val); - } + val |= PCIM_MSIX_VCTRL_MASK; + + /* +* Some devices (e.g. Samsung PM961) do not support reads of this +* register, so always write the new value. +*/ + bus_write_4(msix->msix_table_res, offset, val); } void @@ -1672,10 +1675,13 @@ pci_unmask_msix(device_t dev, u_int index) KASSERT(msix->msix_table_len > index, ("bogus index")); offset = msix->msix_table_offset + index * 16 + 12; val = bus_read_4(msix->msix_table_res, offset); - if (val & PCIM_MSIX_VCTRL_MASK) { - val &= ~PCIM_MSIX_VCTRL_MASK; - bus_write_4(msix->msix_table_res, offset, val); - } + val &= ~PCIM_MSIX_VCTRL_MASK; + + /* +* Some devices (e.g. Samsung PM961) do not support reads of this +* register, so always write the new value. +*/ + bus_write_4(msix->msix_table_res, offset, val); } int ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r351916 - in stable/12: . lib/clang sys/conf
Author: gjb Date: Fri Sep 6 00:00:13 2019 New Revision: 351916 URL: https://svnweb.freebsd.org/changeset/base/351916 Log: Rename stable/12 to 12.1-PRERELEASE, marking the start of the 12.1 release cycle. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (Netgate) Modified: stable/12/Makefile.inc1 stable/12/lib/clang/llvm.build.mk stable/12/sys/conf/newvers.sh Modified: stable/12/Makefile.inc1 == --- stable/12/Makefile.inc1 Thu Sep 5 23:54:44 2019(r351915) +++ stable/12/Makefile.inc1 Fri Sep 6 00:00:13 2019(r351916) @@ -126,9 +126,9 @@ TARGET_ABI= gnueabi .endif .endif MACHINE_ABI?= unknown -MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/hf$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd12.0 +MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/hf$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd12.1 TARGET_ABI?= unknown -TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/hf$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd12.0 +TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/hf$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd12.1 KNOWN_ARCHES?= aarch64/arm64 \ amd64 \ arm \ Modified: stable/12/lib/clang/llvm.build.mk == --- stable/12/lib/clang/llvm.build.mk Thu Sep 5 23:54:44 2019 (r351915) +++ stable/12/lib/clang/llvm.build.mk Fri Sep 6 00:00:13 2019 (r351916) @@ -33,7 +33,7 @@ TARGET_ABI= -gnueabi TARGET_ABI= .endif VENDOR=unknown -OS_VERSION=freebsd12.0 +OS_VERSION=freebsd12.1 LLVM_TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${VENDOR}-${OS_VERSION}${TARGET_ABI} LLVM_BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${VENDOR}-${OS_VERSION} Modified: stable/12/sys/conf/newvers.sh == --- stable/12/sys/conf/newvers.sh Thu Sep 5 23:54:44 2019 (r351915) +++ stable/12/sys/conf/newvers.sh Fri Sep 6 00:00:13 2019 (r351916) @@ -45,8 +45,8 @@ # included if the tree is modified. TYPE="FreeBSD" -REVISION="12.0" -BRANCH="STABLE" +REVISION="12.1" +BRANCH="PRERELEASE" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi ___ 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: r351915 - stable/12/sys/dev/pci
Author: imp Date: Thu Sep 5 23:54:44 2019 New Revision: 351915 URL: https://svnweb.freebsd.org/changeset/base/351915 Log: MFC r349845: Work around devices which return all zeros for reads of existing MSI-X table VCTRL registers. Note: This is confirmed to fix the nvme lost interrupt issues, seen on both virtual and real cards. PR: 211713 Modified: stable/12/sys/dev/pci/pci.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/pci/pci.c == --- stable/12/sys/dev/pci/pci.c Thu Sep 5 23:40:38 2019(r351914) +++ stable/12/sys/dev/pci/pci.c Thu Sep 5 23:54:44 2019(r351915) @@ -1661,10 +1661,13 @@ pci_mask_msix(device_t dev, u_int index) KASSERT(msix->msix_msgnum > index, ("bogus index")); offset = msix->msix_table_offset + index * 16 + 12; val = bus_read_4(msix->msix_table_res, offset); - if (!(val & PCIM_MSIX_VCTRL_MASK)) { - val |= PCIM_MSIX_VCTRL_MASK; - bus_write_4(msix->msix_table_res, offset, val); - } + val |= PCIM_MSIX_VCTRL_MASK; + + /* +* Some devices (e.g. Samsung PM961) do not support reads of this +* register, so always write the new value. +*/ + bus_write_4(msix->msix_table_res, offset, val); } void @@ -1677,10 +1680,13 @@ pci_unmask_msix(device_t dev, u_int index) KASSERT(msix->msix_table_len > index, ("bogus index")); offset = msix->msix_table_offset + index * 16 + 12; val = bus_read_4(msix->msix_table_res, offset); - if (val & PCIM_MSIX_VCTRL_MASK) { - val &= ~PCIM_MSIX_VCTRL_MASK; - bus_write_4(msix->msix_table_res, offset, val); - } + val &= ~PCIM_MSIX_VCTRL_MASK; + + /* +* Some devices (e.g. Samsung PM961) do not support reads of this +* register, so always write the new value. +*/ + bus_write_4(msix->msix_table_res, offset, val); } 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: r351831 - in head: . stand/efi/boot1 stand/efi/gptboot tools/build/mk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 2019-09-05 17:48, Rebecca Cran wrote: > > Or, if you prefer not to rely on EFI boot variables (for example, Linux > GRUB EFI updates seem to reset them, deleting the FreeBSD entries), you > can also copy loader.efi into /mnt/EFI/BOOT/BOOTx64.efi (replace > BOOTx64.efi with BOOTarm.efi for ARM, and BOOTaa64.efi for AARCH64). > > EFI\BOOT\BOOTx64.efi is the default place where UEFI system firmware > looks to run a bootloader from, given no EFI boot variables. I think > it's only supposed to be for removable media, but I've not come across > any that differentiate between fixed and removable. > Oh! Another thing: if you've been using the efifat file, be aware that the ESP will only be an 800KB filesystem. The actual partition should be a lot larger though, so you might want to back up any files you have on it and run reformat it using newfs_msdos to a larger size. - -- Rebecca Cran -BEGIN PGP SIGNATURE- iQIzBAEBCAAdFiEEH7l9m2RN073jRiviDQIrUxG+ECAFAl1xn7IACgkQDQIrUxG+ ECB+yA//Us8+b7vHUCt9pxAnYxsFoj8kbzphxNy76sAhyig8UZBG5P4/Qflt7mz+ nq1AztIzVChZHluBNl30j/euwVdEUChR7MAZ1PGvaM6ckcfxmVbgvKKVX4zyAy3h feIr+8E2tvn5fBwtXkskMXPCMKVobPgqyCqDudQJ33C6o8f5DdrIKF7mSPikq77s Vism537YX4zj2ip96KpG49fRcp9v+q3wzwLJxRgKhcafbdBU60jhujfSrRg8CUT/ SvuaG0IqdtZSNXP3Du+EM4NSX5EW87fZ4FcsQauvAl7+fH0ekmXNl9H+JdSHi6iT J6XSPlTKnPzK6V4ER9Virs7BcWUWSG+9lNZmvSSfUd3RqSRFb5j4K8W8g4kgKsBh 4skMbwcHIMJkmPe/uPjLRU33ix/TFNv9cepOB6sQ9hlzIZG9NrjYOqzPEgbzDgtN y4xrrx52g6vNO9Nsv+LW6hiZVg129zp3kYSAU0kJWKsJ7XBFRSHTLFiA9NUiYWsE oSO15Q1E0wzj20ols0GI5bRqVmiloc+AV6pcCNmh3IwfGms6i1jIUTZ78EHusq0b LXd8P4fHDgZRw/1Dljz600C7FNULg8vGjFem3mMS0v+B9O6kNE9SR/N4xYrhfh9j 9+kBOuvc8ROkc4OmS9UvFcqZCJnqkzsMaDS3JZO+4HbezJqzhV0= =vHi0 -END PGP SIGNATURE- ___ 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: r351831 - in head: . stand/efi/boot1 stand/efi/gptboot tools/build/mk
On 2019-09-05 02:41, Niclas Zeising wrote: > mount -t msdosfs /dev/ada0p1 /mnt # (if that's the ESP, check with gpart > list) > cp /boot/loader.efi /mnt/EFI/FreeBSD/loader.efi > umount /mnt > > This works if proper EFI boot variables have been set up. This can be > done with, it's only needed the first time, or if they are somehow > overwritten. > > efibootmgr --create --activate --label FreeBSD --loader > /dev/ada0p1:/EFI/FreeBSD/loader.efi > > Once again, check that /dev/ada0p1 is the ESP. > You can check your efi boot variables with efibootmgr -v Or, if you prefer not to rely on EFI boot variables (for example, Linux GRUB EFI updates seem to reset them, deleting the FreeBSD entries), you can also copy loader.efi into /mnt/EFI/BOOT/BOOTx64.efi (replace BOOTx64.efi with BOOTarm.efi for ARM, and BOOTaa64.efi for AARCH64). EFI\BOOT\BOOTx64.efi is the default place where UEFI system firmware looks to run a bootloader from, given no EFI boot variables. I think it's only supposed to be for removable media, but I've not come across any that differentiate between fixed and removable. -- Rebecca Cran signature.asc Description: OpenPGP digital signature
svn commit: r351914 - stable/12/sys/dev/nvme
Author: imp Date: Thu Sep 5 23:40:38 2019 New Revision: 351914 URL: https://svnweb.freebsd.org/changeset/base/351914 Log: MFC r351747: Implement nvme suspend / resume for pci attachment Note: this is merged ~9 hours early due to a desire to have it in before feature freeze in 20 minutes. Several reports of it working in current (and one that it worked in -stable after copying all of -current's nvme driver) gives me confidence that bending the rules a little here is the right trade-off. PR: 240340 Relnotes: Yes Modified: stable/12/sys/dev/nvme/nvme.c stable/12/sys/dev/nvme/nvme_ctrlr.c stable/12/sys/dev/nvme/nvme_pci.c stable/12/sys/dev/nvme/nvme_private.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme.c == --- stable/12/sys/dev/nvme/nvme.c Thu Sep 5 23:27:59 2019 (r351913) +++ stable/12/sys/dev/nvme/nvme.c Thu Sep 5 23:40:38 2019 (r351914) @@ -137,9 +137,10 @@ nvme_attach(device_t dev) } /* -* Reset controller twice to ensure we do a transition from cc.en==1 -* to cc.en==0. This is because we don't really know what status -* the controller was left in when boot handed off to OS. +* Reset controller twice to ensure we do a transition from cc.en==1 to +* cc.en==0. This is because we don't really know what status the +* controller was left in when boot handed off to OS. Linux doesn't do +* this, however. If we adopt that policy, see also nvme_ctrlr_resume(). */ status = nvme_ctrlr_hw_reset(ctrlr); if (status != 0) { Modified: stable/12/sys/dev/nvme/nvme_ctrlr.c == --- stable/12/sys/dev/nvme/nvme_ctrlr.c Thu Sep 5 23:27:59 2019 (r351913) +++ stable/12/sys/dev/nvme/nvme_ctrlr.c Thu Sep 5 23:40:38 2019 (r351914) @@ -118,8 +118,8 @@ nvme_ctrlr_construct_io_qpairs(struct nvme_controller /* * Our best estimate for the maximum number of I/Os that we should -* noramlly have in flight at one time. This should be viewed as a hint, -* not a hard limit and will need to be revisitted when the upper layers +* normally have in flight at one time. This should be viewed as a hint, +* not a hard limit and will need to be revisited when the upper layers * of the storage system grows multi-queue support. */ ctrlr->max_hw_pend_io = num_trackers * ctrlr->num_io_queues * 3 / 4; @@ -344,10 +344,10 @@ nvme_ctrlr_enable(struct nvme_controller *ctrlr) return (nvme_ctrlr_wait_for_ready(ctrlr, 1)); } -int -nvme_ctrlr_hw_reset(struct nvme_controller *ctrlr) +static void +nvme_ctrlr_disable_qpairs(struct nvme_controller *ctrlr) { - int i, err; + int i; nvme_admin_qpair_disable(>adminq); /* @@ -359,7 +359,15 @@ nvme_ctrlr_hw_reset(struct nvme_controller *ctrlr) for (i = 0; i < ctrlr->num_io_queues; i++) nvme_io_qpair_disable(>ioq[i]); } +} +int +nvme_ctrlr_hw_reset(struct nvme_controller *ctrlr) +{ + int err; + + nvme_ctrlr_disable_qpairs(ctrlr); + DELAY(100*1000); err = nvme_ctrlr_disable(ctrlr); @@ -481,7 +489,7 @@ nvme_ctrlr_create_qpairs(struct nvme_controller *ctrlr } static int -nvme_ctrlr_destroy_qpairs(struct nvme_controller *ctrlr) +nvme_ctrlr_delete_qpairs(struct nvme_controller *ctrlr) { struct nvme_completion_poll_status status; struct nvme_qpair *qpair; @@ -820,7 +828,7 @@ nvme_ctrlr_configure_int_coalescing(struct nvme_contro } static void -nvme_ctrlr_start(void *ctrlr_arg) +nvme_ctrlr_start(void *ctrlr_arg, bool resetting) { struct nvme_controller *ctrlr = ctrlr_arg; uint32_t old_num_io_queues; @@ -833,7 +841,7 @@ nvme_ctrlr_start(void *ctrlr_arg) * the number of I/O queues supported, so cannot reset * the adminq again here. */ - if (ctrlr->is_resetting) + if (resetting) nvme_qpair_reset(>adminq); for (i = 0; i < ctrlr->num_io_queues; i++) @@ -854,7 +862,7 @@ nvme_ctrlr_start(void *ctrlr_arg) * explicit specify how many queues it will use. This value should * never change between resets, so panic if somehow that does happen. */ - if (ctrlr->is_resetting) { + if (resetting) { old_num_io_queues = ctrlr->num_io_queues; if (nvme_ctrlr_set_num_qpairs(ctrlr) != 0) { nvme_ctrlr_fail(ctrlr); @@ -894,7 +902,7 @@ nvme_ctrlr_start_config_hook(void *arg) if (nvme_ctrlr_set_num_qpairs(ctrlr) == 0 && nvme_ctrlr_construct_io_qpairs(ctrlr) == 0) - nvme_ctrlr_start(ctrlr); +
Re: svn commit: r351902 - in stable/12: lib/libefivar sbin/devmatch sbin/nvmecontrol sbin/nvmecontrol/modules/wdc share/man/man4 share/man/man9 stand/efi/libefi stand/efi/loader stand/forth stand/i386
On Thu, Sep 5, 2019 at 5:21 PM Warner Losh wrote: > > > On Thu, Sep 5, 2019 at 5:15 PM Rodney W. Grimes > wrote: > >> > Author: imp >> > Date: Thu Sep 5 22:38:53 2019 >> > New Revision: 351902 >> > URL: https://svnweb.freebsd.org/changeset/base/351902 >> > >> > Log: >> > MFC r343755: >> > >> > Regularize the Netflix copyright >> >> Thanks, but FYI, noted hunk of something else below... >> >> > Modified: stable/12/sys/netinet/tcp_stacks/rack.c >> >> Are you sure you wanted to do this to rack.c? >> > > hmmm, I thought I told svn to ignore that part of the diff that didn't > apply... This surprises me. I'll back out that chunk... I've done 10 MFCs > since this, though, and some of them may depend on this commit which may > make this not a simple revert + reapply > Ah, the simple revert + redo worked Warner > Warner > > >> >> > >> == >> > --- stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 5 22:25:19 2019 >> (r351901) >> > +++ stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 5 22:38:53 2019 >> (r351902) >> > @@ -1,5 +1,5 @@ >> > /*- >> > - * Copyright (c) 2016-2019 Netflix, Inc. >> > + * Copyright (c) 2016-2018 Netflix, Inc. >> > * >> > * Redistribution and use in source and binary forms, with or without >> > * modification, are permitted provided that the following conditions >> > @@ -202,7 +202,6 @@ static int32_t rack_always_send_oldest = 0; >> > static int32_t rack_sack_block_limit = 128; >> > static int32_t rack_use_sack_filter = 1; >> > static int32_t rack_tlp_threshold_use = TLP_USE_TWO_ONE; >> > -static uint32_t rack_map_split_limit = 0;/* unlimited by default */ >> > >> > /* Rack specific counters */ >> > counter_u64_t rack_badfr; >> > @@ -228,8 +227,6 @@ counter_u64_t rack_to_arm_tlp; >> > counter_u64_t rack_to_alloc; >> > counter_u64_t rack_to_alloc_hard; >> > counter_u64_t rack_to_alloc_emerg; >> > -counter_u64_t rack_alloc_limited_conns; >> > -counter_u64_t rack_split_limited; >> > >> > counter_u64_t rack_sack_proc_all; >> > counter_u64_t rack_sack_proc_short; >> > @@ -263,8 +260,6 @@ static void >> > rack_ack_received(struct tcpcb *tp, struct tcp_rack *rack, >> > struct tcphdr *th, uint16_t nsegs, uint16_t type, int32_t >> recovery); >> > static struct rack_sendmap *rack_alloc(struct tcp_rack *rack); >> > -static struct rack_sendmap *rack_alloc_limit(struct tcp_rack *rack, >> > -uint8_t limit_type); >> > static struct rack_sendmap * >> > rack_check_recovery_mode(struct tcpcb *tp, >> > uint32_t tsused); >> > @@ -449,8 +444,6 @@ sysctl_rack_clear(SYSCTL_HANDLER_ARGS) >> > counter_u64_zero(rack_sack_proc_short); >> > counter_u64_zero(rack_sack_proc_restart); >> > counter_u64_zero(rack_to_alloc); >> > - counter_u64_zero(rack_alloc_limited_conns); >> > - counter_u64_zero(rack_split_limited); >> > counter_u64_zero(rack_find_high); >> > counter_u64_zero(rack_runt_sacks); >> > counter_u64_zero(rack_used_tlpmethod); >> > @@ -628,11 +621,6 @@ rack_init_sysctls() >> > OID_AUTO, "pktdelay", CTLFLAG_RW, >> > _pkt_delay, 1, >> > "Extra RACK time (in ms) besides reordering thresh"); >> > - SYSCTL_ADD_U32(_sysctl_ctx, >> > - SYSCTL_CHILDREN(rack_sysctl_root), >> > - OID_AUTO, "split_limit", CTLFLAG_RW, >> > - _map_split_limit, 0, >> > - "Is there a limit on the number of map split entries >> (0=unlimited)"); >> > SYSCTL_ADD_S32(_sysctl_ctx, >> > SYSCTL_CHILDREN(rack_sysctl_root), >> > OID_AUTO, "inc_var", CTLFLAG_RW, >> > @@ -768,19 +756,7 @@ rack_init_sysctls() >> > SYSCTL_CHILDREN(rack_sysctl_root), >> > OID_AUTO, "allocemerg", CTLFLAG_RD, >> > _to_alloc_emerg, >> > - "Total allocations done from emergency cache"); >> > - rack_alloc_limited_conns = counter_u64_alloc(M_WAITOK); >> > - SYSCTL_ADD_COUNTER_U64(_sysctl_ctx, >> > - SYSCTL_CHILDREN(rack_sysctl_root), >> > - OID_AUTO, "alloc_limited_conns", CTLFLAG_RD, >> > - _alloc_limited_conns, >> > - "Connections with allocations dropped due to limit"); >> > - rack_split_limited = counter_u64_alloc(M_WAITOK); >> > - SYSCTL_ADD_COUNTER_U64(_sysctl_ctx, >> > - SYSCTL_CHILDREN(rack_sysctl_root), >> > - OID_AUTO, "split_limited", CTLFLAG_RD, >> > - _split_limited, >> > - "Split allocations dropped due to limit"); >> > + "Total alocations done from emergency cache"); >> > rack_sack_proc_all = counter_u64_alloc(M_WAITOK); >> > SYSCTL_ADD_COUNTER_U64(_sysctl_ctx, >> > SYSCTL_CHILDREN(rack_sysctl_root), >> > @@ -1144,11 +1120,10 @@ rack_alloc(struct tcp_rack *rack) >> > { >> > struct rack_sendmap *rsm; >> > >> > + counter_u64_add(rack_to_alloc, 1); >> > +
svn commit: r351913 - in stable/12: lib/libefivar sbin/devmatch sbin/nvmecontrol sbin/nvmecontrol/modules/wdc share/man/man4 share/man/man9 stand/efi/libefi stand/efi/loader stand/forth stand/i386/...
Author: imp Date: Thu Sep 5 23:27:59 2019 New Revision: 351913 URL: https://svnweb.freebsd.org/changeset/base/351913 Log: MFC r343755: Regularize the Netflix copyright Modified: stable/12/lib/libefivar/efi-osdep.h stable/12/lib/libefivar/efivar-dp-format.c stable/12/lib/libefivar/efivar-dp-parse.c stable/12/lib/libefivar/efivar-dp-xlate.c stable/12/lib/libefivar/efivar-dp.h stable/12/lib/libefivar/efivar.3 stable/12/lib/libefivar/efivar.c stable/12/lib/libefivar/efivar.h stable/12/lib/libefivar/uefi-dplib.h stable/12/lib/libefivar/uefi-dputil.c stable/12/sbin/devmatch/devmatch.8 stable/12/sbin/devmatch/devmatch.c stable/12/sbin/nvmecontrol/modules/wdc/wdc.c stable/12/sbin/nvmecontrol/nc_util.c stable/12/sbin/nvmecontrol/ns.c stable/12/sbin/nvmecontrol/nvmecontrol_ext.h stable/12/sbin/nvmecontrol/power.c stable/12/share/man/man4/nda.4 stable/12/share/man/man9/kern_testfrwk.9 stable/12/stand/efi/libefi/efienv.c stable/12/stand/efi/libefi/env.c stable/12/stand/efi/libefi/wchar.c stable/12/stand/efi/loader/main.c stable/12/stand/forth/efi.4th stable/12/stand/i386/libi386/biospci.c stable/12/stand/libsa/abort.c stable/12/stand/libsa/xlocale_private.h stable/12/sys/cam/nvme/nvme_all.c stable/12/sys/cam/nvme/nvme_all.h stable/12/sys/cam/nvme/nvme_da.c stable/12/sys/crypto/aesni/aesencdec.h stable/12/sys/dev/efidev/efidev.c stable/12/sys/dev/nvme/nvme_sim.c stable/12/sys/dev/tcp_log/tcp_log_dev.c stable/12/sys/dev/tcp_log/tcp_log_dev.h stable/12/sys/kern/subr_boot.c stable/12/sys/netinet/tcp_hpts.c stable/12/sys/netinet/tcp_hpts.h stable/12/sys/netinet/tcp_log_buf.c stable/12/sys/netinet/tcp_log_buf.h stable/12/sys/netinet/tcp_stacks/rack.c stable/12/sys/netinet/tcp_stacks/rack_bbr_common.h stable/12/sys/netinet/tcp_stacks/sack_filter.c stable/12/sys/netinet/tcp_stacks/sack_filter.h stable/12/sys/netinet/tcp_stacks/tcp_rack.h stable/12/sys/sys/boot.h stable/12/sys/sys/efiio.h stable/12/sys/sys/kern_prefetch.h stable/12/sys/tests/callout_test.h stable/12/sys/tests/callout_test/callout_test.c stable/12/sys/tests/framework/kern_testfrwk.c stable/12/sys/tests/kern_testfrwk.h stable/12/usr.sbin/efibootmgr/efibootmgr.8 stable/12/usr.sbin/efibootmgr/efibootmgr.c stable/12/usr.sbin/efidp/efidp.8 stable/12/usr.sbin/efidp/efidp.c stable/12/usr.sbin/efivar/efiutil.c stable/12/usr.sbin/efivar/efiutil.h stable/12/usr.sbin/efivar/efivar.8 stable/12/usr.sbin/efivar/efivar.c stable/12/usr.sbin/mpsutil/mps_cmd.c stable/12/usr.sbin/mpsutil/mps_debug.c stable/12/usr.sbin/mpsutil/mps_show.c stable/12/usr.sbin/mpsutil/mpsutil.c stable/12/usr.sbin/pmcstat/pmcpl_annotate_cg.c stable/12/usr.sbin/pmcstat/pmcpl_annotate_cg.h stable/12/usr.sbin/pmcstudy/eval_expr.c stable/12/usr.sbin/pmcstudy/eval_expr.h stable/12/usr.sbin/pmcstudy/pmcstudy.8 stable/12/usr.sbin/pmcstudy/pmcstudy.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libefivar/efi-osdep.h == --- stable/12/lib/libefivar/efi-osdep.h Thu Sep 5 23:24:43 2019 (r351912) +++ stable/12/lib/libefivar/efi-osdep.h Thu Sep 5 23:27:59 2019 (r351913) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2017 Netflix, Inc. - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/lib/libefivar/efivar-dp-format.c == --- stable/12/lib/libefivar/efivar-dp-format.c Thu Sep 5 23:24:43 2019 (r351912) +++ stable/12/lib/libefivar/efivar-dp-format.c Thu Sep 5 23:27:59 2019 (r351913) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2017 Netflix, Inc. - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/lib/libefivar/efivar-dp-parse.c == --- stable/12/lib/libefivar/efivar-dp-parse.c Thu Sep 5 23:24:43 2019 (r351912) +++ stable/12/lib/libefivar/efivar-dp-parse.c Thu Sep 5 23:27:59 2019 (r351913) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2017 Netflix, Inc. - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/lib/libefivar/efivar-dp-xlate.c == --- stable/12/lib/libefivar/efivar-dp-xlate.c Thu Sep 5 23:24:43 2019 (r351912) +++ stable/12/lib/libefivar/efivar-dp-xlate.c Thu Sep 5 23:27:59 2019 (r351913) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2017 Netflix, Inc. - * All rights
svn commit: r351912 - in stable/12: lib/libefivar sbin/devmatch sbin/nvmecontrol sbin/nvmecontrol/modules/wdc share/man/man4 share/man/man9 stand/efi/libefi stand/efi/loader stand/forth stand/i386/...
Author: imp Date: Thu Sep 5 23:24:43 2019 New Revision: 351912 URL: https://svnweb.freebsd.org/changeset/base/351912 Log: Revert r351902 ... it didn't properly exclude rack.c changes Modified: stable/12/lib/libefivar/efi-osdep.h stable/12/lib/libefivar/efivar-dp-format.c stable/12/lib/libefivar/efivar-dp-parse.c stable/12/lib/libefivar/efivar-dp-xlate.c stable/12/lib/libefivar/efivar-dp.h stable/12/lib/libefivar/efivar.3 stable/12/lib/libefivar/efivar.c stable/12/lib/libefivar/efivar.h stable/12/lib/libefivar/uefi-dplib.h stable/12/lib/libefivar/uefi-dputil.c stable/12/sbin/devmatch/devmatch.8 stable/12/sbin/devmatch/devmatch.c stable/12/sbin/nvmecontrol/modules/wdc/wdc.c stable/12/sbin/nvmecontrol/nc_util.c stable/12/sbin/nvmecontrol/ns.c stable/12/sbin/nvmecontrol/nvmecontrol_ext.h stable/12/sbin/nvmecontrol/power.c stable/12/share/man/man4/nda.4 stable/12/share/man/man9/kern_testfrwk.9 stable/12/stand/efi/libefi/efienv.c stable/12/stand/efi/libefi/env.c stable/12/stand/efi/libefi/wchar.c stable/12/stand/efi/loader/main.c stable/12/stand/forth/efi.4th stable/12/stand/i386/libi386/biospci.c stable/12/stand/libsa/abort.c stable/12/stand/libsa/xlocale_private.h stable/12/sys/cam/nvme/nvme_all.c stable/12/sys/cam/nvme/nvme_all.h stable/12/sys/cam/nvme/nvme_da.c stable/12/sys/crypto/aesni/aesencdec.h stable/12/sys/dev/efidev/efidev.c stable/12/sys/dev/nvme/nvme_sim.c stable/12/sys/dev/tcp_log/tcp_log_dev.c stable/12/sys/dev/tcp_log/tcp_log_dev.h stable/12/sys/kern/subr_boot.c stable/12/sys/netinet/tcp_hpts.c stable/12/sys/netinet/tcp_hpts.h stable/12/sys/netinet/tcp_log_buf.c stable/12/sys/netinet/tcp_log_buf.h stable/12/sys/netinet/tcp_stacks/rack.c stable/12/sys/netinet/tcp_stacks/rack_bbr_common.h stable/12/sys/netinet/tcp_stacks/sack_filter.c stable/12/sys/netinet/tcp_stacks/sack_filter.h stable/12/sys/netinet/tcp_stacks/tcp_rack.h stable/12/sys/sys/boot.h stable/12/sys/sys/efiio.h stable/12/sys/sys/kern_prefetch.h stable/12/sys/tests/callout_test.h stable/12/sys/tests/callout_test/callout_test.c stable/12/sys/tests/framework/kern_testfrwk.c stable/12/sys/tests/kern_testfrwk.h stable/12/usr.sbin/efibootmgr/efibootmgr.8 stable/12/usr.sbin/efibootmgr/efibootmgr.c stable/12/usr.sbin/efidp/efidp.8 stable/12/usr.sbin/efidp/efidp.c stable/12/usr.sbin/efivar/efiutil.c stable/12/usr.sbin/efivar/efiutil.h stable/12/usr.sbin/efivar/efivar.8 stable/12/usr.sbin/efivar/efivar.c stable/12/usr.sbin/mpsutil/mps_cmd.c stable/12/usr.sbin/mpsutil/mps_debug.c stable/12/usr.sbin/mpsutil/mps_show.c stable/12/usr.sbin/mpsutil/mpsutil.c stable/12/usr.sbin/pmcstat/pmcpl_annotate_cg.c stable/12/usr.sbin/pmcstat/pmcpl_annotate_cg.h stable/12/usr.sbin/pmcstudy/eval_expr.c stable/12/usr.sbin/pmcstudy/eval_expr.h stable/12/usr.sbin/pmcstudy/pmcstudy.8 stable/12/usr.sbin/pmcstudy/pmcstudy.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libefivar/efi-osdep.h == --- stable/12/lib/libefivar/efi-osdep.h Thu Sep 5 23:13:44 2019 (r351911) +++ stable/12/lib/libefivar/efi-osdep.h Thu Sep 5 23:24:43 2019 (r351912) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2017 Netflix, Inc. + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/lib/libefivar/efivar-dp-format.c == --- stable/12/lib/libefivar/efivar-dp-format.c Thu Sep 5 23:13:44 2019 (r351911) +++ stable/12/lib/libefivar/efivar-dp-format.c Thu Sep 5 23:24:43 2019 (r351912) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2017 Netflix, Inc. + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/lib/libefivar/efivar-dp-parse.c == --- stable/12/lib/libefivar/efivar-dp-parse.c Thu Sep 5 23:13:44 2019 (r351911) +++ stable/12/lib/libefivar/efivar-dp-parse.c Thu Sep 5 23:24:43 2019 (r351912) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2017 Netflix, Inc. + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/lib/libefivar/efivar-dp-xlate.c == --- stable/12/lib/libefivar/efivar-dp-xlate.c Thu Sep 5 23:13:44 2019 (r351911) +++ stable/12/lib/libefivar/efivar-dp-xlate.c Thu Sep 5 23:24:43 2019 (r351912) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2017 Netflix, Inc. + * All
Re: svn commit: r351902 - in stable/12: lib/libefivar sbin/devmatch sbin/nvmecontrol sbin/nvmecontrol/modules/wdc share/man/man4 share/man/man9 stand/efi/libefi stand/efi/loader stand/forth stand/i386
On Thu, Sep 5, 2019 at 5:15 PM Rodney W. Grimes wrote: > > Author: imp > > Date: Thu Sep 5 22:38:53 2019 > > New Revision: 351902 > > URL: https://svnweb.freebsd.org/changeset/base/351902 > > > > Log: > > MFC r343755: > > > > Regularize the Netflix copyright > > Thanks, but FYI, noted hunk of something else below... > > > Modified: stable/12/sys/netinet/tcp_stacks/rack.c > > Are you sure you wanted to do this to rack.c? > hmmm, I thought I told svn to ignore that part of the diff that didn't apply... This surprises me. I'll back out that chunk... I've done 10 MFCs since this, though, and some of them may depend on this commit which may make this not a simple revert + reapply Warner > > > > == > > --- stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 5 22:25:19 2019 > (r351901) > > +++ stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 5 22:38:53 2019 > (r351902) > > @@ -1,5 +1,5 @@ > > /*- > > - * Copyright (c) 2016-2019 Netflix, Inc. > > + * Copyright (c) 2016-2018 Netflix, Inc. > > * > > * Redistribution and use in source and binary forms, with or without > > * modification, are permitted provided that the following conditions > > @@ -202,7 +202,6 @@ static int32_t rack_always_send_oldest = 0; > > static int32_t rack_sack_block_limit = 128; > > static int32_t rack_use_sack_filter = 1; > > static int32_t rack_tlp_threshold_use = TLP_USE_TWO_ONE; > > -static uint32_t rack_map_split_limit = 0;/* unlimited by default */ > > > > /* Rack specific counters */ > > counter_u64_t rack_badfr; > > @@ -228,8 +227,6 @@ counter_u64_t rack_to_arm_tlp; > > counter_u64_t rack_to_alloc; > > counter_u64_t rack_to_alloc_hard; > > counter_u64_t rack_to_alloc_emerg; > > -counter_u64_t rack_alloc_limited_conns; > > -counter_u64_t rack_split_limited; > > > > counter_u64_t rack_sack_proc_all; > > counter_u64_t rack_sack_proc_short; > > @@ -263,8 +260,6 @@ static void > > rack_ack_received(struct tcpcb *tp, struct tcp_rack *rack, > > struct tcphdr *th, uint16_t nsegs, uint16_t type, int32_t recovery); > > static struct rack_sendmap *rack_alloc(struct tcp_rack *rack); > > -static struct rack_sendmap *rack_alloc_limit(struct tcp_rack *rack, > > -uint8_t limit_type); > > static struct rack_sendmap * > > rack_check_recovery_mode(struct tcpcb *tp, > > uint32_t tsused); > > @@ -449,8 +444,6 @@ sysctl_rack_clear(SYSCTL_HANDLER_ARGS) > > counter_u64_zero(rack_sack_proc_short); > > counter_u64_zero(rack_sack_proc_restart); > > counter_u64_zero(rack_to_alloc); > > - counter_u64_zero(rack_alloc_limited_conns); > > - counter_u64_zero(rack_split_limited); > > counter_u64_zero(rack_find_high); > > counter_u64_zero(rack_runt_sacks); > > counter_u64_zero(rack_used_tlpmethod); > > @@ -628,11 +621,6 @@ rack_init_sysctls() > > OID_AUTO, "pktdelay", CTLFLAG_RW, > > _pkt_delay, 1, > > "Extra RACK time (in ms) besides reordering thresh"); > > - SYSCTL_ADD_U32(_sysctl_ctx, > > - SYSCTL_CHILDREN(rack_sysctl_root), > > - OID_AUTO, "split_limit", CTLFLAG_RW, > > - _map_split_limit, 0, > > - "Is there a limit on the number of map split entries > (0=unlimited)"); > > SYSCTL_ADD_S32(_sysctl_ctx, > > SYSCTL_CHILDREN(rack_sysctl_root), > > OID_AUTO, "inc_var", CTLFLAG_RW, > > @@ -768,19 +756,7 @@ rack_init_sysctls() > > SYSCTL_CHILDREN(rack_sysctl_root), > > OID_AUTO, "allocemerg", CTLFLAG_RD, > > _to_alloc_emerg, > > - "Total allocations done from emergency cache"); > > - rack_alloc_limited_conns = counter_u64_alloc(M_WAITOK); > > - SYSCTL_ADD_COUNTER_U64(_sysctl_ctx, > > - SYSCTL_CHILDREN(rack_sysctl_root), > > - OID_AUTO, "alloc_limited_conns", CTLFLAG_RD, > > - _alloc_limited_conns, > > - "Connections with allocations dropped due to limit"); > > - rack_split_limited = counter_u64_alloc(M_WAITOK); > > - SYSCTL_ADD_COUNTER_U64(_sysctl_ctx, > > - SYSCTL_CHILDREN(rack_sysctl_root), > > - OID_AUTO, "split_limited", CTLFLAG_RD, > > - _split_limited, > > - "Split allocations dropped due to limit"); > > + "Total alocations done from emergency cache"); > > rack_sack_proc_all = counter_u64_alloc(M_WAITOK); > > SYSCTL_ADD_COUNTER_U64(_sysctl_ctx, > > SYSCTL_CHILDREN(rack_sysctl_root), > > @@ -1144,11 +1120,10 @@ rack_alloc(struct tcp_rack *rack) > > { > > struct rack_sendmap *rsm; > > > > + counter_u64_add(rack_to_alloc, 1); > > + rack->r_ctl.rc_num_maps_alloced++; > > rsm = uma_zalloc(rack_zone, M_NOWAIT); > > if (rsm) { > > -alloc_done: > > - counter_u64_add(rack_to_alloc, 1); > > - rack->r_ctl.rc_num_maps_alloced++; > >
Re: svn commit: r351902 - in stable/12: lib/libefivar sbin/devmatch sbin/nvmecontrol sbin/nvmecontrol/modules/wdc share/man/man4 share/man/man9 stand/efi/libefi stand/efi/loader stand/forth stand/i386
> Author: imp > Date: Thu Sep 5 22:38:53 2019 > New Revision: 351902 > URL: https://svnweb.freebsd.org/changeset/base/351902 > > Log: > MFC r343755: > > Regularize the Netflix copyright Thanks, but FYI, noted hunk of something else below... > Modified: stable/12/sys/netinet/tcp_stacks/rack.c Are you sure you wanted to do this to rack.c? > == > --- stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 5 22:25:19 2019 > (r351901) > +++ stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 5 22:38:53 2019 > (r351902) > @@ -1,5 +1,5 @@ > /*- > - * Copyright (c) 2016-2019 Netflix, Inc. > + * Copyright (c) 2016-2018 Netflix, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > @@ -202,7 +202,6 @@ static int32_t rack_always_send_oldest = 0; > static int32_t rack_sack_block_limit = 128; > static int32_t rack_use_sack_filter = 1; > static int32_t rack_tlp_threshold_use = TLP_USE_TWO_ONE; > -static uint32_t rack_map_split_limit = 0;/* unlimited by default */ > > /* Rack specific counters */ > counter_u64_t rack_badfr; > @@ -228,8 +227,6 @@ counter_u64_t rack_to_arm_tlp; > counter_u64_t rack_to_alloc; > counter_u64_t rack_to_alloc_hard; > counter_u64_t rack_to_alloc_emerg; > -counter_u64_t rack_alloc_limited_conns; > -counter_u64_t rack_split_limited; > > counter_u64_t rack_sack_proc_all; > counter_u64_t rack_sack_proc_short; > @@ -263,8 +260,6 @@ static void > rack_ack_received(struct tcpcb *tp, struct tcp_rack *rack, > struct tcphdr *th, uint16_t nsegs, uint16_t type, int32_t recovery); > static struct rack_sendmap *rack_alloc(struct tcp_rack *rack); > -static struct rack_sendmap *rack_alloc_limit(struct tcp_rack *rack, > -uint8_t limit_type); > static struct rack_sendmap * > rack_check_recovery_mode(struct tcpcb *tp, > uint32_t tsused); > @@ -449,8 +444,6 @@ sysctl_rack_clear(SYSCTL_HANDLER_ARGS) > counter_u64_zero(rack_sack_proc_short); > counter_u64_zero(rack_sack_proc_restart); > counter_u64_zero(rack_to_alloc); > - counter_u64_zero(rack_alloc_limited_conns); > - counter_u64_zero(rack_split_limited); > counter_u64_zero(rack_find_high); > counter_u64_zero(rack_runt_sacks); > counter_u64_zero(rack_used_tlpmethod); > @@ -628,11 +621,6 @@ rack_init_sysctls() > OID_AUTO, "pktdelay", CTLFLAG_RW, > _pkt_delay, 1, > "Extra RACK time (in ms) besides reordering thresh"); > - SYSCTL_ADD_U32(_sysctl_ctx, > - SYSCTL_CHILDREN(rack_sysctl_root), > - OID_AUTO, "split_limit", CTLFLAG_RW, > - _map_split_limit, 0, > - "Is there a limit on the number of map split entries > (0=unlimited)"); > SYSCTL_ADD_S32(_sysctl_ctx, > SYSCTL_CHILDREN(rack_sysctl_root), > OID_AUTO, "inc_var", CTLFLAG_RW, > @@ -768,19 +756,7 @@ rack_init_sysctls() > SYSCTL_CHILDREN(rack_sysctl_root), > OID_AUTO, "allocemerg", CTLFLAG_RD, > _to_alloc_emerg, > - "Total allocations done from emergency cache"); > - rack_alloc_limited_conns = counter_u64_alloc(M_WAITOK); > - SYSCTL_ADD_COUNTER_U64(_sysctl_ctx, > - SYSCTL_CHILDREN(rack_sysctl_root), > - OID_AUTO, "alloc_limited_conns", CTLFLAG_RD, > - _alloc_limited_conns, > - "Connections with allocations dropped due to limit"); > - rack_split_limited = counter_u64_alloc(M_WAITOK); > - SYSCTL_ADD_COUNTER_U64(_sysctl_ctx, > - SYSCTL_CHILDREN(rack_sysctl_root), > - OID_AUTO, "split_limited", CTLFLAG_RD, > - _split_limited, > - "Split allocations dropped due to limit"); > + "Total alocations done from emergency cache"); > rack_sack_proc_all = counter_u64_alloc(M_WAITOK); > SYSCTL_ADD_COUNTER_U64(_sysctl_ctx, > SYSCTL_CHILDREN(rack_sysctl_root), > @@ -1144,11 +1120,10 @@ rack_alloc(struct tcp_rack *rack) > { > struct rack_sendmap *rsm; > > + counter_u64_add(rack_to_alloc, 1); > + rack->r_ctl.rc_num_maps_alloced++; > rsm = uma_zalloc(rack_zone, M_NOWAIT); > if (rsm) { > -alloc_done: > - counter_u64_add(rack_to_alloc, 1); > - rack->r_ctl.rc_num_maps_alloced++; > return (rsm); > } > if (rack->rc_free_cnt) { > @@ -1156,46 +1131,14 @@ alloc_done: > rsm = TAILQ_FIRST(>r_ctl.rc_free); > TAILQ_REMOVE(>r_ctl.rc_free, rsm, r_next); > rack->rc_free_cnt--; > - goto alloc_done; > + return (rsm); > } > return (NULL); > } > > -/* wrapper to allocate a sendmap entry, subject to a specific limit */ > -static struct rack_sendmap * > -rack_alloc_limit(struct tcp_rack *rack, uint8_t limit_type) > -{ >
svn commit: r351911 - stable/12/sys/dev/nvme
Author: imp Date: Thu Sep 5 23:13:44 2019 New Revision: 351911 URL: https://svnweb.freebsd.org/changeset/base/351911 Log: MFC r351706: In nvme_completion_poll, add a sanity check to make sure that we complete the polling within a second. Panic if we don't. All the commands that use this interface should typically complete within a few tens to hundreds of microseconds. Panic rather than return ETIMEDOUT because if the command somehow does later complete, it will randomly corrupt memory. Also, it helps to get a traceback from where the unexpected failure happens, rather than an infinite loop. Modified: stable/12/sys/dev/nvme/nvme_private.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme_private.h == --- stable/12/sys/dev/nvme/nvme_private.h Thu Sep 5 23:12:56 2019 (r351910) +++ stable/12/sys/dev/nvme/nvme_private.h Thu Sep 5 23:13:44 2019 (r351911) @@ -446,12 +446,24 @@ int nvme_attach(device_t dev); intnvme_shutdown(device_t dev); intnvme_detach(device_t dev); +/* + * Wait for a command to complete using the nvme_completion_poll_cb. + * Used in limited contexts where the caller knows it's OK to block + * briefly while the command runs. The ISR will run the callback which + * will set status->done to true.usually within microseconds. A 1s + * pause means something is seriously AFU and we should panic to + * provide the proper context to diagnose. + */ static __inline void nvme_completion_poll(struct nvme_completion_poll_status *status) { - while (!atomic_load_acq_int(>done)) + int sanity = hz * 1; + + while (!atomic_load_acq_int(>done) && --sanity > 0) pause("nvme", 1); + if (sanity <= 0) + panic("NVME polled command failed to complete within 1s."); } static __inline 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: r351910 - stable/12/sys/dev/nvme
Author: imp Date: Thu Sep 5 23:12:56 2019 New Revision: 351910 URL: https://svnweb.freebsd.org/changeset/base/351910 Log: MFC r351705: In all the places that we use the polled for completion interface, except crash dump support code, move the while loop into an inline function. These aren't done in the fast path, so if the compiler choses to not inline, any performance hit is tiny. Modified: stable/12/sys/dev/nvme/nvme_ctrlr.c stable/12/sys/dev/nvme/nvme_ns.c stable/12/sys/dev/nvme/nvme_private.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme_ctrlr.c == --- stable/12/sys/dev/nvme/nvme_ctrlr.c Thu Sep 5 23:12:06 2019 (r351909) +++ stable/12/sys/dev/nvme/nvme_ctrlr.c Thu Sep 5 23:12:56 2019 (r351910) @@ -394,8 +394,7 @@ nvme_ctrlr_identify(struct nvme_controller *ctrlr) status.done = 0; nvme_ctrlr_cmd_identify_controller(ctrlr, >cdata, nvme_completion_poll_cb, ); - while (!atomic_load_acq_int()) - pause("nvme", 1); + nvme_completion_poll(); if (nvme_completion_is_error()) { nvme_printf(ctrlr, "nvme_identify_controller failed!\n"); return (ENXIO); @@ -424,8 +423,7 @@ nvme_ctrlr_set_num_qpairs(struct nvme_controller *ctrl status.done = 0; nvme_ctrlr_cmd_set_num_queues(ctrlr, ctrlr->num_io_queues, nvme_completion_poll_cb, ); - while (!atomic_load_acq_int()) - pause("nvme", 1); + nvme_completion_poll(); if (nvme_completion_is_error()) { nvme_printf(ctrlr, "nvme_ctrlr_set_num_qpairs failed!\n"); return (ENXIO); @@ -463,8 +461,7 @@ nvme_ctrlr_create_qpairs(struct nvme_controller *ctrlr status.done = 0; nvme_ctrlr_cmd_create_io_cq(ctrlr, qpair, qpair->vector, nvme_completion_poll_cb, ); - while (!atomic_load_acq_int()) - pause("nvme", 1); + nvme_completion_poll(); if (nvme_completion_is_error()) { nvme_printf(ctrlr, "nvme_create_io_cq failed!\n"); return (ENXIO); @@ -473,8 +470,7 @@ nvme_ctrlr_create_qpairs(struct nvme_controller *ctrlr status.done = 0; nvme_ctrlr_cmd_create_io_sq(qpair->ctrlr, qpair, nvme_completion_poll_cb, ); - while (!atomic_load_acq_int()) - pause("nvme", 1); + nvme_completion_poll(); if (nvme_completion_is_error()) { nvme_printf(ctrlr, "nvme_create_io_sq failed!\n"); return (ENXIO); @@ -496,8 +492,7 @@ nvme_ctrlr_destroy_qpairs(struct nvme_controller *ctrl status.done = 0; nvme_ctrlr_cmd_delete_io_sq(ctrlr, qpair, nvme_completion_poll_cb, ); - while (!atomic_load_acq_int()) - pause("nvme", 1); + nvme_completion_poll(); if (nvme_completion_is_error()) { nvme_printf(ctrlr, "nvme_destroy_io_sq failed!\n"); return (ENXIO); @@ -506,8 +501,7 @@ nvme_ctrlr_destroy_qpairs(struct nvme_controller *ctrl status.done = 0; nvme_ctrlr_cmd_delete_io_cq(ctrlr, qpair, nvme_completion_poll_cb, ); - while (!atomic_load_acq_int()) - pause("nvme", 1); + nvme_completion_poll(); if (nvme_completion_is_error()) { nvme_printf(ctrlr, "nvme_destroy_io_cq failed!\n"); return (ENXIO); @@ -789,8 +783,7 @@ nvme_ctrlr_configure_aer(struct nvme_controller *ctrlr status.done = 0; nvme_ctrlr_cmd_get_feature(ctrlr, NVME_FEAT_TEMPERATURE_THRESHOLD, 0, NULL, 0, nvme_completion_poll_cb, ); - while (!atomic_load_acq_int()) - pause("nvme", 1); + nvme_completion_poll(); if (nvme_completion_is_error() || (status.cpl.cdw0 & 0x) == 0x || (status.cpl.cdw0 & 0x) == 0x) { Modified: stable/12/sys/dev/nvme/nvme_ns.c == --- stable/12/sys/dev/nvme/nvme_ns.cThu Sep 5 23:12:06 2019 (r351909) +++ stable/12/sys/dev/nvme/nvme_ns.cThu Sep 5 23:12:56 2019 (r351910) @@ -530,8 +530,7 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t status.done = 0; nvme_ctrlr_cmd_identify_namespace(ctrlr, id, >data, nvme_completion_poll_cb, ); - while (!atomic_load_acq_int()) - pause("nvme", 1); + nvme_completion_poll(); if (nvme_completion_is_error()) { nvme_printf(ctrlr,
svn commit: r351909 - stable/12/sys/dev/nvme
Author: imp Date: Thu Sep 5 23:12:06 2019 New Revision: 351909 URL: https://svnweb.freebsd.org/changeset/base/351909 Log: MFC r351704: Add a brief comment explaining why we can return ETIMEDOUT from the call to the polled interface. Normally this would have the potential to corrupt stack memory because the completion routines would run after we return. In this case, however, we're doing a dump so it's safe for reasons explained in the comment. Modified: stable/12/sys/dev/nvme/nvme_ns_cmd.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme_ns_cmd.c == --- stable/12/sys/dev/nvme/nvme_ns_cmd.cThu Sep 5 23:09:50 2019 (r351908) +++ stable/12/sys/dev/nvme/nvme_ns_cmd.cThu Sep 5 23:12:06 2019 (r351909) @@ -191,6 +191,14 @@ nvme_ns_dump(struct nvme_namespace *ns, void *virt, of nvme_qpair_process_completions(req->qpair); } + /* +* Normally, when using the polling interface, we can't return a +* timeout error because we don't know when the completion routines +* will be called if the command later completes. However, in this +* case we're running a system dump, so all interrupts are turned +* off, the scheduler isn't running so there's nothing to complete +* the transaction. +*/ if (status.done == FALSE) return (ETIMEDOUT); ___ 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: r351908 - stable/12/sys/dev/nvme
Author: imp Date: Thu Sep 5 23:09:50 2019 New Revision: 351908 URL: https://svnweb.freebsd.org/changeset/base/351908 Log: MFC r351406,r351447: r351406: We need to define version 1 of nvme, not nvme_foo. Otherwise nvd won't load and people who pull in nvme/nvd from modules can't load nvd.ko since it depends on nvme, not nvme_foo. The duplicate doesn't matter since kldxref properly handles that case. r351447: It turns out the duplication is only mostly harmless. Modified: stable/12/sys/dev/nvme/nvme.c stable/12/sys/dev/nvme/nvme_ahci.c stable/12/sys/dev/nvme/nvme_pci.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme.c == --- stable/12/sys/dev/nvme/nvme.c Thu Sep 5 23:07:57 2019 (r351907) +++ stable/12/sys/dev/nvme/nvme.c Thu Sep 5 23:09:50 2019 (r351908) @@ -364,3 +364,19 @@ nvme_completion_poll_cb(void *arg, const struct nvme_c memcpy(>cpl, cpl, sizeof(*cpl)); atomic_store_rel_int(>done, 1); } + +static int +nvme_modevent(module_t mod __unused, int type __unused, void *argp __unused) +{ + return (0); +} + +static moduledata_t nvme_mod = { + "nvme", + nvme_modevent, + 0 +}; + +DECLARE_MODULE(nvme, nvme_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); +MODULE_VERSION(nvme, 1); +MODULE_DEPEND(nvme, cam, 1, 1, 1); Modified: stable/12/sys/dev/nvme/nvme_ahci.c == --- stable/12/sys/dev/nvme/nvme_ahci.c Thu Sep 5 23:07:57 2019 (r351907) +++ stable/12/sys/dev/nvme/nvme_ahci.c Thu Sep 5 23:09:50 2019 (r351908) @@ -55,7 +55,6 @@ static driver_t nvme_ahci_driver = { }; DRIVER_MODULE(nvme, ahci, nvme_ahci_driver, nvme_devclass, NULL, 0); -MODULE_VERSION(nvme_ahci, 1); static int nvme_ahci_probe (device_t device) Modified: stable/12/sys/dev/nvme/nvme_pci.c == --- stable/12/sys/dev/nvme/nvme_pci.c Thu Sep 5 23:07:57 2019 (r351907) +++ stable/12/sys/dev/nvme/nvme_pci.c Thu Sep 5 23:09:50 2019 (r351908) @@ -62,7 +62,6 @@ static driver_t nvme_pci_driver = { }; DRIVER_MODULE(nvme, pci, nvme_pci_driver, nvme_devclass, NULL, 0); -MODULE_VERSION(nvme_pci, 1); static struct _pcsid { ___ 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: r351907 - stable/12/sys/dev/nvme
Author: imp Date: Thu Sep 5 23:07:57 2019 New Revision: 351907 URL: https://svnweb.freebsd.org/changeset/base/351907 Log: MFC r351411: When we have errors resetting the device before we allocate the queues, don't try to tear them down in the ctrlr_destroy path. Otherwise, we dereference queue structures that are NULL and we trap. Modified: stable/12/sys/dev/nvme/nvme_ctrlr.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme_ctrlr.c == --- stable/12/sys/dev/nvme/nvme_ctrlr.c Thu Sep 5 23:04:37 2019 (r351906) +++ stable/12/sys/dev/nvme/nvme_ctrlr.c Thu Sep 5 23:07:57 2019 (r351907) @@ -1211,12 +1211,14 @@ nvme_ctrlr_destruct(struct nvme_controller *ctrlr, dev if (ctrlr->cdev) destroy_dev(ctrlr->cdev); - if (!gone) - nvme_ctrlr_destroy_qpairs(ctrlr); - for (i = 0; i < ctrlr->num_io_queues; i++) - nvme_io_qpair_destroy(>ioq[i]); - free(ctrlr->ioq, M_NVME); - nvme_admin_qpair_destroy(>adminq); + if (ctrlr->is_initialized) { + if (!gone) + nvme_ctrlr_destroy_qpairs(ctrlr); + for (i = 0; i < ctrlr->num_io_queues; i++) + nvme_io_qpair_destroy(>ioq[i]); + free(ctrlr->ioq, M_NVME); + nvme_admin_qpair_destroy(>adminq); + } /* * Notify the controller of a shutdown, even though this is due to ___ 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: r351906 - stable/12/sys/dev/nvme
Author: imp Date: Thu Sep 5 23:04:37 2019 New Revision: 351906 URL: https://svnweb.freebsd.org/changeset/base/351906 Log: MFC r351403: Move releasing of resources to later Modified: stable/12/sys/dev/nvme/nvme_pci.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme_pci.c == --- stable/12/sys/dev/nvme/nvme_pci.c Thu Sep 5 23:03:37 2019 (r351905) +++ stable/12/sys/dev/nvme/nvme_pci.c Thu Sep 5 23:04:37 2019 (r351906) @@ -215,11 +215,13 @@ static int nvme_pci_detach(device_t dev) { struct nvme_controller*ctrlr = DEVICE2SOFTC(dev); + int rv; + rv = nvme_detach(dev); if (ctrlr->msix_enabled) pci_release_msi(dev); pci_disable_busmaster(dev); - return (nvme_detach(dev)); + return (rv); } static int ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r351905 - stable/12/sys/dev/nvme
Author: imp Date: Thu Sep 5 23:03:37 2019 New Revision: 351905 URL: https://svnweb.freebsd.org/changeset/base/351905 Log: MFC r351376: Remove stray line that was duplicated. Modified: stable/12/sys/dev/nvme/nvme.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme.c == --- stable/12/sys/dev/nvme/nvme.c Thu Sep 5 23:02:08 2019 (r351904) +++ stable/12/sys/dev/nvme/nvme.c Thu Sep 5 23:03:37 2019 (r351905) @@ -138,7 +138,6 @@ nvme_attach(device_t dev) /* * Reset controller twice to ensure we do a transition from cc.en==1 -* Reset controller twice to ensure we do a transition from cc.en==1 * to cc.en==0. This is because we don't really know what status * the controller was left in when boot handed off to OS. */ ___ 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: r351904 - in stable/12/sys: conf dev/ahci dev/nvme modules/nvme
Author: imp Date: Thu Sep 5 23:02:08 2019 New Revision: 351904 URL: https://svnweb.freebsd.org/changeset/base/351904 Log: MFC r351356: Create a AHCI attachment for nvme. Added: stable/12/sys/dev/nvme/nvme_ahci.c - copied unchanged from r351356, head/sys/dev/nvme/nvme_ahci.c Modified: stable/12/sys/conf/files stable/12/sys/dev/ahci/ahci.c stable/12/sys/dev/ahci/ahci.h stable/12/sys/dev/ahci/ahci_pci.c stable/12/sys/modules/nvme/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/conf/files == --- stable/12/sys/conf/filesThu Sep 5 23:01:12 2019(r351903) +++ stable/12/sys/conf/filesThu Sep 5 23:02:08 2019(r351904) @@ -2574,6 +2574,7 @@ dev/nsp/nsp_pccard.c optional nsp pccard dev/null/null.cstandard dev/nvd/nvd.c optional nvd nvme dev/nvme/nvme.coptional nvme +dev/nvme/nvme_ahci.c optional nvme ahci dev/nvme/nvme_ctrlr.c optional nvme dev/nvme/nvme_ctrlr_cmd.c optional nvme dev/nvme/nvme_ns.c optional nvme Modified: stable/12/sys/dev/ahci/ahci.c == --- stable/12/sys/dev/ahci/ahci.c Thu Sep 5 23:01:12 2019 (r351903) +++ stable/12/sys/dev/ahci/ahci.c Thu Sep 5 23:02:08 2019 (r351904) @@ -347,6 +347,16 @@ ahci_attach(device_t dev) if ((ctlr->ichannels & (1 << unit)) == 0) device_disable(child); } + /* Attach any remapped NVME device */ + for (; unit < ctlr->channels + ctlr->remapped_devices; unit++) { + child = device_add_child(dev, "nvme", -1); + if (child == NULL) { + device_printf(dev, "failed to add remapped NVMe device"); + continue; + } + device_set_ivars(child, (void *)(intptr_t)(unit | AHCI_REMAPPED_UNIT)); + } + if (ctlr->caps & AHCI_CAP_EMS) { child = device_add_child(dev, "ahciem", -1); if (child == NULL) @@ -497,6 +507,12 @@ ahci_intr(void *data) ctlr->interrupt[unit].function(arg); } } + for (; unit < ctlr->channels + ctlr->remapped_devices; unit++) { + if ((arg = ctlr->interrupt[unit].argument)) { + ctlr->interrupt[unit].function(arg); + } + } + /* AHCI declares level triggered IS. */ if (!(ctlr->quirks & AHCI_Q_EDGEIS)) ATA_OUTL(ctlr->r_mem, AHCI_IS, is); @@ -546,12 +562,23 @@ ahci_alloc_resource(device_t dev, device_t child, int struct resource *res; rman_res_t st; int offset, size, unit; + bool is_remapped; unit = (intptr_t)device_get_ivars(child); + if (unit & AHCI_REMAPPED_UNIT) { + unit &= ~AHCI_REMAPPED_UNIT; + unit -= ctlr->channels; + is_remapped = true; + } else + is_remapped = false; res = NULL; switch (type) { case SYS_RES_MEMORY: - if (unit >= 0) { + if (is_remapped) { + offset = ctlr->remap_offset + unit * ctlr->remap_size; + size = ctlr->remap_size; + } + else if (unit >= 0) { offset = AHCI_OFFSET + (unit << 7); size = 128; } else if (*rid == 0) { @@ -612,7 +639,7 @@ ahci_setup_intr(device_t dev, device_t child, struct r void *argument, void **cookiep) { struct ahci_controller *ctlr = device_get_softc(dev); - int unit = (intptr_t)device_get_ivars(child); + int unit = (intptr_t)device_get_ivars(child) & ~AHCI_REMAPPED_UNIT; if (filter != NULL) { printf("ahci.c: we cannot use a filter here\n"); @@ -628,7 +655,7 @@ ahci_teardown_intr(device_t dev, device_t child, struc void *cookie) { struct ahci_controller *ctlr = device_get_softc(dev); - int unit = (intptr_t)device_get_ivars(child); + int unit = (intptr_t)device_get_ivars(child) & ~AHCI_REMAPPED_UNIT; ctlr->interrupt[unit].function = NULL; ctlr->interrupt[unit].argument = NULL; @@ -641,7 +668,7 @@ ahci_print_child(device_t dev, device_t child) int retval, channel; retval = bus_print_child_header(dev, child); - channel = (int)(intptr_t)device_get_ivars(child); + channel = (int)(intptr_t)device_get_ivars(child) & ~AHCI_REMAPPED_UNIT; if (channel >= 0) retval += printf(" at channel %d", channel); retval += bus_print_child_footer(dev, child); @@ -654,7 +681,7 @@ ahci_child_location_str(device_t dev, device_t child, { int channel; -
svn commit: r351903 - in stable/12/sys: conf dev/nvme modules/nvme
Author: imp Date: Thu Sep 5 23:01:12 2019 New Revision: 351903 URL: https://svnweb.freebsd.org/changeset/base/351903 Log: MFC r351355: Separate the pci attachment from the rest of nvme Added: stable/12/sys/dev/nvme/nvme_pci.c - copied unchanged from r351355, head/sys/dev/nvme/nvme_pci.c Modified: stable/12/sys/conf/files stable/12/sys/dev/nvme/nvme.c stable/12/sys/dev/nvme/nvme_ctrlr.c stable/12/sys/dev/nvme/nvme_private.h stable/12/sys/modules/nvme/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/conf/files == --- stable/12/sys/conf/filesThu Sep 5 22:38:53 2019(r351902) +++ stable/12/sys/conf/filesThu Sep 5 23:01:12 2019(r351903) @@ -2578,6 +2578,7 @@ dev/nvme/nvme_ctrlr.c optional nvme dev/nvme/nvme_ctrlr_cmd.c optional nvme dev/nvme/nvme_ns.c optional nvme dev/nvme/nvme_ns_cmd.c optional nvme +dev/nvme/nvme_pci.coptional nvme pci dev/nvme/nvme_qpair.c optional nvme dev/nvme/nvme_sim.coptional nvme scbus dev/nvme/nvme_sysctl.c optional nvme Modified: stable/12/sys/dev/nvme/nvme.c == --- stable/12/sys/dev/nvme/nvme.c Thu Sep 5 22:38:53 2019 (r351902) +++ stable/12/sys/dev/nvme/nvme.c Thu Sep 5 23:01:12 2019 (r351903) @@ -36,9 +36,6 @@ __FBSDID("$FreeBSD$"); #include -#include -#include - #include "nvme_private.h" struct nvme_consumer { @@ -58,107 +55,8 @@ int32_t nvme_retry_count; MALLOC_DEFINE(M_NVME, "nvme", "nvme(4) memory allocations"); -static intnvme_probe(device_t); -static intnvme_attach(device_t); -static intnvme_detach(device_t); -static intnvme_shutdown(device_t); +devclass_t nvme_devclass; -static devclass_t nvme_devclass; - -static device_method_t nvme_pci_methods[] = { - /* Device interface */ - DEVMETHOD(device_probe, nvme_probe), - DEVMETHOD(device_attach,nvme_attach), - DEVMETHOD(device_detach,nvme_detach), - DEVMETHOD(device_shutdown, nvme_shutdown), - { 0, 0 } -}; - -static driver_t nvme_pci_driver = { - "nvme", - nvme_pci_methods, - sizeof(struct nvme_controller), -}; - -DRIVER_MODULE(nvme, pci, nvme_pci_driver, nvme_devclass, NULL, NULL); -MODULE_VERSION(nvme, 1); -MODULE_DEPEND(nvme, cam, 1, 1, 1); - -static struct _pcsid -{ - uint32_tdevid; - int match_subdevice; - uint16_tsubdevice; - const char *desc; - uint32_tquirks; -} pci_ids[] = { - { 0x01118086, 0, 0, "NVMe Controller" }, - { IDT32_PCI_ID, 0, 0, "IDT NVMe Controller (32 channel)" }, - { IDT8_PCI_ID, 0, 0, "IDT NVMe Controller (8 channel)" }, - { 0x09538086, 1, 0x3702, "DC P3700 SSD" }, - { 0x09538086, 1, 0x3703, "DC P3700 SSD [2.5\" SFF]" }, - { 0x09538086, 1, 0x3704, "DC P3500 SSD [Add-in Card]" }, - { 0x09538086, 1, 0x3705, "DC P3500 SSD [2.5\" SFF]" }, - { 0x09538086, 1, 0x3709, "DC P3600 SSD [Add-in Card]" }, - { 0x09538086, 1, 0x370a, "DC P3600 SSD [2.5\" SFF]" }, - { 0x00031c58, 0, 0, "HGST SN100", QUIRK_DELAY_B4_CHK_RDY }, - { 0x00231c58, 0, 0, "WDC SN200", QUIRK_DELAY_B4_CHK_RDY }, - { 0x05401c5f, 0, 0, "Memblaze Pblaze4", QUIRK_DELAY_B4_CHK_RDY }, - { 0xa821144d, 0, 0, "Samsung PM1725", QUIRK_DELAY_B4_CHK_RDY }, - { 0xa822144d, 0, 0, "Samsung PM1725a", QUIRK_DELAY_B4_CHK_RDY }, - { 0x01161179, 0, 0, "Toshiba XG5", QUIRK_DISABLE_TIMEOUT }, - { 0x, 0, 0, NULL } -}; - -static int -nvme_match(uint32_t devid, uint16_t subdevice, struct _pcsid *ep) -{ - if (devid != ep->devid) - return 0; - - if (!ep->match_subdevice) - return 1; - - if (subdevice == ep->subdevice) - return 1; - else - return 0; -} - -static int -nvme_probe (device_t device) -{ - struct _pcsid *ep; - uint32_tdevid; - uint16_tsubdevice; - - devid = pci_get_devid(device); - subdevice = pci_get_subdevice(device); - ep = pci_ids; - - while (ep->devid) { - if (nvme_match(devid, subdevice, ep)) - break; - ++ep; - } - - if (ep->desc) { - device_set_desc(device, ep->desc); - return (BUS_PROBE_DEFAULT); - } - -#if defined(PCIS_STORAGE_NVM) - if (pci_get_class(device)== PCIC_STORAGE && - pci_get_subclass(device) == PCIS_STORAGE_NVM && - pci_get_progif(device) ==
svn commit: r351902 - in stable/12: lib/libefivar sbin/devmatch sbin/nvmecontrol sbin/nvmecontrol/modules/wdc share/man/man4 share/man/man9 stand/efi/libefi stand/efi/loader stand/forth stand/i386/...
Author: imp Date: Thu Sep 5 22:38:53 2019 New Revision: 351902 URL: https://svnweb.freebsd.org/changeset/base/351902 Log: MFC r343755: Regularize the Netflix copyright Modified: stable/12/lib/libefivar/efi-osdep.h stable/12/lib/libefivar/efivar-dp-format.c stable/12/lib/libefivar/efivar-dp-parse.c stable/12/lib/libefivar/efivar-dp-xlate.c stable/12/lib/libefivar/efivar-dp.h stable/12/lib/libefivar/efivar.3 stable/12/lib/libefivar/efivar.c stable/12/lib/libefivar/efivar.h stable/12/lib/libefivar/uefi-dplib.h stable/12/lib/libefivar/uefi-dputil.c stable/12/sbin/devmatch/devmatch.8 stable/12/sbin/devmatch/devmatch.c stable/12/sbin/nvmecontrol/modules/wdc/wdc.c stable/12/sbin/nvmecontrol/nc_util.c stable/12/sbin/nvmecontrol/ns.c stable/12/sbin/nvmecontrol/nvmecontrol_ext.h stable/12/sbin/nvmecontrol/power.c stable/12/share/man/man4/nda.4 stable/12/share/man/man9/kern_testfrwk.9 stable/12/stand/efi/libefi/efienv.c stable/12/stand/efi/libefi/env.c stable/12/stand/efi/libefi/wchar.c stable/12/stand/efi/loader/main.c stable/12/stand/forth/efi.4th stable/12/stand/i386/libi386/biospci.c stable/12/stand/libsa/abort.c stable/12/stand/libsa/xlocale_private.h stable/12/sys/cam/nvme/nvme_all.c stable/12/sys/cam/nvme/nvme_all.h stable/12/sys/cam/nvme/nvme_da.c stable/12/sys/crypto/aesni/aesencdec.h stable/12/sys/dev/efidev/efidev.c stable/12/sys/dev/nvme/nvme_sim.c stable/12/sys/dev/tcp_log/tcp_log_dev.c stable/12/sys/dev/tcp_log/tcp_log_dev.h stable/12/sys/kern/subr_boot.c stable/12/sys/netinet/tcp_hpts.c stable/12/sys/netinet/tcp_hpts.h stable/12/sys/netinet/tcp_log_buf.c stable/12/sys/netinet/tcp_log_buf.h stable/12/sys/netinet/tcp_stacks/rack.c stable/12/sys/netinet/tcp_stacks/rack_bbr_common.h stable/12/sys/netinet/tcp_stacks/sack_filter.c stable/12/sys/netinet/tcp_stacks/sack_filter.h stable/12/sys/netinet/tcp_stacks/tcp_rack.h stable/12/sys/sys/boot.h stable/12/sys/sys/efiio.h stable/12/sys/sys/kern_prefetch.h stable/12/sys/tests/callout_test.h stable/12/sys/tests/callout_test/callout_test.c stable/12/sys/tests/framework/kern_testfrwk.c stable/12/sys/tests/kern_testfrwk.h stable/12/usr.sbin/efibootmgr/efibootmgr.8 stable/12/usr.sbin/efibootmgr/efibootmgr.c stable/12/usr.sbin/efidp/efidp.8 stable/12/usr.sbin/efidp/efidp.c stable/12/usr.sbin/efivar/efiutil.c stable/12/usr.sbin/efivar/efiutil.h stable/12/usr.sbin/efivar/efivar.8 stable/12/usr.sbin/efivar/efivar.c stable/12/usr.sbin/mpsutil/mps_cmd.c stable/12/usr.sbin/mpsutil/mps_debug.c stable/12/usr.sbin/mpsutil/mps_show.c stable/12/usr.sbin/mpsutil/mpsutil.c stable/12/usr.sbin/pmcstat/pmcpl_annotate_cg.c stable/12/usr.sbin/pmcstat/pmcpl_annotate_cg.h stable/12/usr.sbin/pmcstudy/eval_expr.c stable/12/usr.sbin/pmcstudy/eval_expr.h stable/12/usr.sbin/pmcstudy/pmcstudy.8 stable/12/usr.sbin/pmcstudy/pmcstudy.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libefivar/efi-osdep.h == --- stable/12/lib/libefivar/efi-osdep.h Thu Sep 5 22:25:19 2019 (r351901) +++ stable/12/lib/libefivar/efi-osdep.h Thu Sep 5 22:38:53 2019 (r351902) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2017 Netflix, Inc. - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/lib/libefivar/efivar-dp-format.c == --- stable/12/lib/libefivar/efivar-dp-format.c Thu Sep 5 22:25:19 2019 (r351901) +++ stable/12/lib/libefivar/efivar-dp-format.c Thu Sep 5 22:38:53 2019 (r351902) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2017 Netflix, Inc. - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/lib/libefivar/efivar-dp-parse.c == --- stable/12/lib/libefivar/efivar-dp-parse.c Thu Sep 5 22:25:19 2019 (r351901) +++ stable/12/lib/libefivar/efivar-dp-parse.c Thu Sep 5 22:38:53 2019 (r351902) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2017 Netflix, Inc. - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/lib/libefivar/efivar-dp-xlate.c == --- stable/12/lib/libefivar/efivar-dp-xlate.c Thu Sep 5 22:25:19 2019 (r351901) +++ stable/12/lib/libefivar/efivar-dp-xlate.c Thu Sep 5 22:38:53 2019 (r351902) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2017 Netflix, Inc. - * All rights
svn commit: r351901 - head/sys/fs/nfsserver
Author: rmacklem Date: Thu Sep 5 22:25:19 2019 New Revision: 351901 URL: https://svnweb.freebsd.org/changeset/base/351901 Log: Delete the unused "nd" argument for nfsrv_proxyds(). The "nd" argument for nfsrv_proxyds() is no longer used by the function. This patch deletes it. This allows a subsequent patch to delete the "nd" argument from nfsvno_getattr(), since it's only use of "nd" was to pass it to nfsrv_proxyds(). Getting rid of the "nd" argument from nfsvno_getattr() avoids confusion over why it might need "nd". This patch is trivial and does not have any semantic effect. Modified: head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfsserver/nfs_nfsdport.c == --- head/sys/fs/nfsserver/nfs_nfsdport.cThu Sep 5 22:15:50 2019 (r351900) +++ head/sys/fs/nfsserver/nfs_nfsdport.cThu Sep 5 22:25:19 2019 (r351901) @@ -110,9 +110,9 @@ static void nfsrv_pnfsremovesetup(struct vnode *, NFSP int *, char *, fhandle_t *); static void nfsrv_pnfsremove(struct vnode **, int, char *, fhandle_t *, NFSPROC_T *); -static int nfsrv_proxyds(struct nfsrv_descript *, struct vnode *, off_t, int, -struct ucred *, struct thread *, int, struct mbuf **, char *, -struct mbuf **, struct nfsvattr *, struct acl *); +static int nfsrv_proxyds(struct vnode *, off_t, int, struct ucred *, +struct thread *, int, struct mbuf **, char *, struct mbuf **, +struct nfsvattr *, struct acl *); static int nfsrv_setextattr(struct vnode *, struct nfsvattr *, NFSPROC_T *); static int nfsrv_readdsrpc(fhandle_t *, off_t, int, struct ucred *, NFSPROC_T *, struct nfsmount *, struct mbuf **, struct mbuf **); @@ -293,7 +293,7 @@ nfsvno_getattr(struct vnode *vp, struct nfsvattr *nvap NFSISSET_ATTRBIT(attrbitp, NFSATTRBIT_SIZE) || NFSISSET_ATTRBIT(attrbitp, NFSATTRBIT_TIMEACCESS) || NFSISSET_ATTRBIT(attrbitp, NFSATTRBIT_TIMEMODIFY))) { - error = nfsrv_proxyds(nd, vp, 0, 0, nd->nd_cred, p, + error = nfsrv_proxyds(vp, 0, 0, nd->nd_cred, p, NFSPROC_GETATTR, NULL, NULL, NULL, , NULL); if (error == 0) gotattr = 1; @@ -476,7 +476,7 @@ nfsvno_setattr(struct vnode *vp, struct nfsvattr *nvap nvap->na_vattr.va_atime.tv_sec != VNOVAL || nvap->na_vattr.va_mtime.tv_sec != VNOVAL)) { /* For a pNFS server, set the attributes on the DS file. */ - error = nfsrv_proxyds(NULL, vp, 0, 0, cred, p, NFSPROC_SETATTR, + error = nfsrv_proxyds(vp, 0, 0, cred, p, NFSPROC_SETATTR, NULL, NULL, NULL, nvap, NULL); if (error == ENOENT) error = 0; @@ -795,7 +795,7 @@ nfsvno_read(struct vnode *vp, off_t off, int cnt, stru * Attempt to read from a DS file. A return of ENOENT implies * there is no DS file to read. */ - error = nfsrv_proxyds(NULL, vp, off, cnt, cred, p, NFSPROC_READDS, mpp, + error = nfsrv_proxyds(vp, off, cnt, cred, p, NFSPROC_READDS, mpp, NULL, mpendp, NULL, NULL); if (error != ENOENT) return (error); @@ -891,7 +891,7 @@ nfsvno_write(struct vnode *vp, off_t off, int retlen, * Attempt to write to a DS file. A return of ENOENT implies * there is no DS file to write. */ - error = nfsrv_proxyds(NULL, vp, off, retlen, cred, p, NFSPROC_WRITEDS, + error = nfsrv_proxyds(vp, off, retlen, cred, p, NFSPROC_WRITEDS, , cp, NULL, NULL, NULL); if (error != ENOENT) { *stable = NFSWRITE_FILESYNC; @@ -4377,7 +4377,7 @@ nfsrv_updatemdsattr(struct vnode *vp, struct nfsvattr /* Do this as root so that it won't fail with EACCES. */ tcred = newnfs_getcred(); - error = nfsrv_proxyds(NULL, vp, 0, 0, tcred, p, NFSPROC_LAYOUTRETURN, + error = nfsrv_proxyds(vp, 0, 0, tcred, p, NFSPROC_LAYOUTRETURN, NULL, NULL, NULL, nap, NULL); NFSFREECRED(tcred); return (error); @@ -4392,15 +4392,15 @@ nfsrv_dssetacl(struct vnode *vp, struct acl *aclp, str { int error; - error = nfsrv_proxyds(NULL, vp, 0, 0, cred, p, NFSPROC_SETACL, + error = nfsrv_proxyds(vp, 0, 0, cred, p, NFSPROC_SETACL, NULL, NULL, NULL, NULL, aclp); return (error); } static int -nfsrv_proxyds(struct nfsrv_descript *nd, struct vnode *vp, off_t off, int cnt, -struct ucred *cred, struct thread *p, int ioproc, struct mbuf **mpp, -char *cp, struct mbuf **mpp2, struct nfsvattr *nap, struct acl *aclp) +nfsrv_proxyds(struct vnode *vp, off_t off, int cnt, struct ucred *cred, +struct thread *p, int ioproc, struct mbuf **mpp, char *cp, +struct mbuf **mpp2, struct nfsvattr *nap, struct acl *aclp) { struct nfsmount *nmp[NFSDEV_MAXMIRRORS], *failnmp;
svn commit: r351900 - in head/stand: . efi/include efi/libefi efi/loader efi/loader/arch/amd64 efi/loader/arch/i386 forth i386/libi386 lua
Author: tsoome Date: Thu Sep 5 22:15:50 2019 New Revision: 351900 URL: https://svnweb.freebsd.org/changeset/base/351900 Log: loader: use teken teminal emulator for x86 and uefi Replace mini cons25 emulator with teken, this does enable us proper console terminal for loader and will make it possible to implement different back end callbacks to draw to screen. At this time we still only "draw" in text mode. Modified: head/stand/defs.mk head/stand/efi/include/efilib.h head/stand/efi/libefi/Makefile head/stand/efi/libefi/efi_console.c head/stand/efi/loader/arch/amd64/Makefile.inc head/stand/efi/loader/arch/i386/Makefile.inc head/stand/efi/loader/main.c head/stand/forth/frames.4th head/stand/i386/libi386/Makefile head/stand/i386/libi386/vidconsole.c head/stand/lua/drawer.lua Modified: head/stand/defs.mk == --- head/stand/defs.mk Thu Sep 5 21:43:33 2019(r351899) +++ head/stand/defs.mk Thu Sep 5 22:15:50 2019(r351900) @@ -180,6 +180,13 @@ CFLAGS+=-I. all: ${PROG} +CLEANFILES+= teken_state.h +teken.c: teken_state.h + +teken_state.h: ${SYSDIR}/teken/sequences + awk -f ${SYSDIR}/teken/gensequences \ + ${SYSDIR}/teken/sequences > teken_state.h + .if !defined(NO_OBJ) _ILINKS=machine .if ${MACHINE} != ${MACHINE_CPUARCH} && ${MACHINE} != "arm64" Modified: head/stand/efi/include/efilib.h == --- head/stand/efi/include/efilib.h Thu Sep 5 21:43:33 2019 (r351899) +++ head/stand/efi/include/efilib.h Thu Sep 5 22:15:50 2019 (r351900) @@ -106,6 +106,7 @@ EFI_STATUS errno_to_efi_status(int errno); void efi_time_init(void); void efi_time_fini(void); +bool efi_cons_update_mode(void); EFI_STATUS efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE* Xsystab); EFI_STATUS main(int argc, CHAR16 *argv[]); Modified: head/stand/efi/libefi/Makefile == --- head/stand/efi/libefi/Makefile Thu Sep 5 21:43:33 2019 (r351899) +++ head/stand/efi/libefi/Makefile Thu Sep 5 22:15:50 2019 (r351900) @@ -22,6 +22,9 @@ SRCS= delay.c \ libefi.c \ wchar.c +.PATH: ${SYSDIR}/teken +SRCS+= teken.c + .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" SRCS+= time.c .elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" @@ -45,6 +48,8 @@ CFLAGS+= -fPIC -mno-red-zone .endif CFLAGS+= -I${EFIINC} CFLAGS+= -I${EFIINCMD} +CFLAGS.efi_console.c+= -I${SRCTOP}/sys/teken +CFLAGS.teken.c+= -I${SRCTOP}/sys/teken .if ${MK_LOADER_ZFS} != "no" CFLAGS+= -I${ZFSSRC} CFLAGS+= -DEFI_ZFS_BOOT @@ -55,10 +60,5 @@ CFLAGS+= -I${LDRSRC} # Handle FreeBSD specific %b and %D printf format specifiers CFLAGS+= ${FORMAT_EXTENSIONS} - -# Do not use TERM_EMU on arm and arm64 as it doesn't behave well with serial console -.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "aarch64" -CFLAGS+= -DTERM_EMU -.endif .include Modified: head/stand/efi/libefi/efi_console.c == --- head/stand/efi/libefi/efi_console.c Thu Sep 5 21:43:33 2019 (r351899) +++ head/stand/efi/libefi/efi_console.c Thu Sep 5 22:15:50 2019 (r351900) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "bootstrap.h" @@ -37,26 +38,57 @@ static SIMPLE_TEXT_OUTPUT_INTERFACE *conout; static SIMPLE_INPUT_INTERFACE *conin; static EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *coninex; -#ifdef TERM_EMU -#defineDEFAULT_FGCOLOR EFI_LIGHTGRAY -#defineDEFAULT_BGCOLOR EFI_BLACK +static tf_bell_t efi_cons_bell; +static tf_cursor_t efi_text_cursor; +static tf_putchar_tefi_text_putchar; +static tf_fill_t efi_text_fill; +static tf_copy_t efi_text_copy; +static tf_param_t efi_text_param; +static tf_respond_tefi_cons_respond; -#defineMAXARGS 8 -static int args[MAXARGS], argc; -static int fg_c, bg_c, curx, cury; -static int esc; +static teken_funcs_t tf = { + .tf_bell= efi_cons_bell, + .tf_cursor = efi_text_cursor, + .tf_putchar = efi_text_putchar, + .tf_fill= efi_text_fill, + .tf_copy= efi_text_copy, + .tf_param = efi_text_param, + .tf_respond = efi_cons_respond, +}; -void get_pos(int *x, int *y); -void curs_move(int *_x, int *_y, int x, int y); -static void CL(int); -void HO(void); -void end_term(void); -#endif +teken_t teken; +teken_pos_t tp; +struct text_pixel { + teken_char_t c; + teken_attr_t a; +}; + +static struct text_pixel *buffer; + #defineKEYBUFSZ 10 static unsigned keybuf[KEYBUFSZ]; /* keybuf for extended codes */ static int key_pending; +static const unsigned char
svn commit: r351899 - in head/sys: fs/nfsclient kern sys
Author: cem Date: Thu Sep 5 21:43:33 2019 New Revision: 351899 URL: https://svnweb.freebsd.org/changeset/base/351899 Log: Remove long-dead BUF_ASSERT_{,UN}HELD assertions These were fully neutered in r177676 (2008), but not removed at the time for unclear reasons. They're totally dead code, so go ahead and yank them now. No functional change. Modified: head/sys/fs/nfsclient/nfs_clvnops.c head/sys/kern/vfs_bio.c head/sys/sys/buf.h Modified: head/sys/fs/nfsclient/nfs_clvnops.c == --- head/sys/fs/nfsclient/nfs_clvnops.c Thu Sep 5 21:30:52 2019 (r351898) +++ head/sys/fs/nfsclient/nfs_clvnops.c Thu Sep 5 21:43:33 2019 (r351899) @@ -2646,7 +2646,6 @@ nfs_strategy(struct vop_strategy_args *ap) KASSERT(bp->b_vp == vp, ("missing b_getvp")); KASSERT(!(bp->b_flags & B_DONE), ("nfs_strategy: buffer %p unexpectedly marked B_DONE", bp)); - BUF_ASSERT_HELD(bp); if (vp->v_type == VREG && bp->b_blkno == bp->b_lblkno) bp->b_blkno = bp->b_lblkno * (vp->v_bufobj.bo_bsize / @@ -3223,8 +3222,6 @@ int ncl_writebp(struct buf *bp, int force __unused, struct thread *td) { int oldflags, rtval; - - BUF_ASSERT_HELD(bp); if (bp->b_flags & B_INVAL) { brelse(bp); Modified: head/sys/kern/vfs_bio.c == --- head/sys/kern/vfs_bio.c Thu Sep 5 21:30:52 2019(r351898) +++ head/sys/kern/vfs_bio.c Thu Sep 5 21:43:33 2019(r351899) @@ -2225,8 +2225,6 @@ bufwrite(struct buf *bp) oldflags = bp->b_flags; - BUF_ASSERT_HELD(bp); - KASSERT(!(bp->b_vflags & BV_BKGRDINPROG), ("FFS background buffer should not get here %p", bp)); @@ -2353,7 +2351,6 @@ bdwrite(struct buf *bp) KASSERT(bp->b_bufobj != NULL, ("No b_bufobj %p", bp)); KASSERT((bp->b_flags & B_BARRIER) == 0, ("Barrier request in delayed write %p", bp)); - BUF_ASSERT_HELD(bp); if (bp->b_flags & B_INVAL) { brelse(bp); @@ -2445,7 +2442,6 @@ bdirty(struct buf *bp) KASSERT(bp->b_bufobj != NULL, ("No b_bufobj %p", bp)); KASSERT(bp->b_flags & B_REMFREE || bp->b_qindex == QUEUE_NONE, ("bdirty: buffer %p still on queue %d", bp, bp->b_qindex)); - BUF_ASSERT_HELD(bp); bp->b_flags &= ~(B_RELBUF); bp->b_iocmd = BIO_WRITE; @@ -2475,7 +2471,6 @@ bundirty(struct buf *bp) KASSERT(bp->b_bufobj != NULL, ("No b_bufobj %p", bp)); KASSERT(bp->b_flags & B_REMFREE || bp->b_qindex == QUEUE_NONE, ("bundirty: buffer %p still on queue %d", bp, bp->b_qindex)); - BUF_ASSERT_HELD(bp); if (bp->b_flags & B_DELWRI) { bp->b_flags &= ~B_DELWRI; @@ -4090,7 +4085,6 @@ loop: bp->b_flags &= ~B_DONE; } CTR4(KTR_BUF, "getblk(%p, %ld, %d) = %p", vp, (long)blkno, size, bp); - BUF_ASSERT_HELD(bp); end: buf_track(bp, __func__); KASSERT(bp->b_bufobj == bo, @@ -4118,7 +4112,6 @@ geteblk(int size, int flags) allocbuf(bp, size); bufspace_release(bufdomain(bp), maxsize); bp->b_flags |= B_INVAL; /* b_dep cleared by getnewbuf() */ - BUF_ASSERT_HELD(bp); return (bp); } @@ -4215,8 +4208,6 @@ allocbuf(struct buf *bp, int size) { int newbsize; - BUF_ASSERT_HELD(bp); - if (bp->b_bcount == size) return (1); @@ -4402,7 +4393,6 @@ bufdone(struct buf *bp) dropobj = NULL; KASSERT(!(bp->b_flags & B_DONE), ("biodone: bp %p already done", bp)); - BUF_ASSERT_HELD(bp); runningbufwakeup(bp); if (bp->b_iocmd == BIO_WRITE) Modified: head/sys/sys/buf.h == --- head/sys/sys/buf.h Thu Sep 5 21:30:52 2019(r351898) +++ head/sys/sys/buf.h Thu Sep 5 21:43:33 2019(r351899) @@ -359,15 +359,11 @@ extern const char *buf_wmesg; /* Default buffer lock _lockmgr_assert(&(bp)->b_lock, KA_XLOCKED, LOCK_FILE, LOCK_LINE) #defineBUF_ASSERT_UNLOCKED(bp) \ _lockmgr_assert(&(bp)->b_lock, KA_UNLOCKED, LOCK_FILE, LOCK_LINE) -#defineBUF_ASSERT_HELD(bp) -#defineBUF_ASSERT_UNHELD(bp) #else #defineBUF_ASSERT_LOCKED(bp) #defineBUF_ASSERT_SLOCKED(bp) #defineBUF_ASSERT_XLOCKED(bp) #defineBUF_ASSERT_UNLOCKED(bp) -#defineBUF_ASSERT_HELD(bp) -#defineBUF_ASSERT_UNHELD(bp) #endif #ifdef _SYS_PROC_H_/* Avoid #include pollution */ ___ 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: r351898 - head/sys/fs/msdosfs
Author: cem Date: Thu Sep 5 21:30:52 2019 New Revision: 351898 URL: https://svnweb.freebsd.org/changeset/base/351898 Log: msdosfs: Drop an unneeded brelse in bread error condition After r294954, it is an invariant that bread returns non-NULL bp if and only if the routine succeeded. On error, it handles any buffer cleanup internally. So the brelse(NULL) here was just redundant. No functional change. Discussed with: kib (extracted from a larger differential) Modified: head/sys/fs/msdosfs/msdosfs_fat.c Modified: head/sys/fs/msdosfs/msdosfs_fat.c == --- head/sys/fs/msdosfs/msdosfs_fat.c Thu Sep 5 20:51:41 2019 (r351897) +++ head/sys/fs/msdosfs/msdosfs_fat.c Thu Sep 5 21:30:52 2019 (r351898) @@ -1145,10 +1145,8 @@ markvoldirty(struct msdosfsmount *pmp, int dirty) byteoffset = FATOFS(pmp, 1); fatblock(pmp, byteoffset, , , ); error = bread(pmp->pm_devvp, bn, bsize, NOCRED, ); - if (error) { - brelse(bp); + if (error) return (error); - } /* * Get the current value of the FAT entry and set/clear the relevant ___ 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: r351897 - head/share/man/man4
Author: scottph Date: Thu Sep 5 20:51:41 2019 New Revision: 351897 URL: https://svnweb.freebsd.org/changeset/base/351897 Log: nvdimm(4): Add description of NVDIMM Namespace support Reviewed by: kib, bcr Approved by: emaste (mentor) MFC after:3 days Sponsored by: Intel Corporation Differential Revision:https://reviews.freebsd.org/D21536 Modified: head/share/man/man4/nvdimm.4 Modified: head/share/man/man4/nvdimm.4 == --- head/share/man/man4/nvdimm.4Thu Sep 5 20:42:08 2019 (r351896) +++ head/share/man/man4/nvdimm.4Thu Sep 5 20:51:41 2019 (r351897) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 23, 2019 +.Dd September 5, 2019 .Dt NVDIMM 4 .Os .Sh NAME @@ -75,7 +75,7 @@ the device. .Pp Also, for each SPA, the geom provider .Pa spaNNN -is created, which can be used to create a conventional filesystem (e.g. +is created, which can be used to create a conventional filesystem (e.g., by .Xr newfs 8 ) and @@ -86,6 +86,18 @@ Content accessible by and .Pa /dev/spaNNN is coherent. +.Pp +The +.Nm +driver has support for reading NVDIMM namespaces (if supported by your +hardware and already configured by some other mechanism, e.g., a BIOS +configuration screen). +The driver will provide a +.Pa /dev/nvdimm_spaNNNnsMMM +device node and +.Pa spaNNNnsMMM +geom provider for each namespace in a SPA, which behave analogously to their +full-SPA cousins described above. .Sh SEE ALSO .Xr ACPI 4 , .Xr GEOM 4 , ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r351895 - stable/11/sys/modules/ocs_fc
Author: bdrewery Date: Thu Sep 5 20:39:13 2019 New Revision: 351895 URL: https://svnweb.freebsd.org/changeset/base/351895 Log: MFC r349005: Don't delete .depend files outside of cleandepend. Modified: stable/11/sys/modules/ocs_fc/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/modules/ocs_fc/Makefile == --- stable/11/sys/modules/ocs_fc/Makefile Thu Sep 5 20:39:05 2019 (r351894) +++ stable/11/sys/modules/ocs_fc/Makefile Thu Sep 5 20:39:13 2019 (r351895) @@ -41,6 +41,6 @@ SRCS += ocs_cam.c CINCS = -I. -CLEANFILES += ${PROG}.debug ${PROG}.symbols cscope.* .depend.* +CLEANFILES += ${PROG}.debug ${PROG}.symbols cscope.* .include ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r351894 - stable/12/sys/modules/ocs_fc
Author: bdrewery Date: Thu Sep 5 20:39:05 2019 New Revision: 351894 URL: https://svnweb.freebsd.org/changeset/base/351894 Log: MFC r349005: Don't delete .depend files outside of cleandepend. Modified: stable/12/sys/modules/ocs_fc/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/modules/ocs_fc/Makefile == --- stable/12/sys/modules/ocs_fc/Makefile Thu Sep 5 20:38:33 2019 (r351893) +++ stable/12/sys/modules/ocs_fc/Makefile Thu Sep 5 20:39:05 2019 (r351894) @@ -41,6 +41,6 @@ SRCS += ocs_cam.c CINCS = -I. -CLEANFILES += ${PROG}.debug ${PROG}.symbols cscope.* .depend.* +CLEANFILES += ${PROG}.debug ${PROG}.symbols cscope.* .include ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r351893 - stable/11/sys/conf
Author: bdrewery Date: Thu Sep 5 20:38:33 2019 New Revision: 351893 URL: https://svnweb.freebsd.org/changeset/base/351893 Log: MFC r347458: Fix build race with machine links and genoffset.o. Modified: stable/11/sys/conf/kern.post.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/kern.post.mk == --- stable/11/sys/conf/kern.post.mk Thu Sep 5 20:31:25 2019 (r351892) +++ stable/11/sys/conf/kern.post.mk Thu Sep 5 20:38:33 2019 (r351893) @@ -293,7 +293,7 @@ _ILINKS+= x86 # Ensure that the link exists without depending on it when it exists. .for _link in ${_ILINKS} .if !exists(${.OBJDIR}/${_link}) -${SRCS} ${CLEAN:M*.o}: ${_link} +${SRCS} ${DEPENDOBJS}: ${_link} .endif .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: r351892 - in stable/12/sys: conf modules/efirt
Author: bdrewery Date: Thu Sep 5 20:31:25 2019 New Revision: 351892 URL: https://svnweb.freebsd.org/changeset/base/351892 Log: MFC r347458,r348975,r348976: r347458: Fix build race with machine links and genoffset.o. r348975: Restore genassym.o to CLEANFILES. r348976: Add missing DPSRCS entry for assym.inc. Modified: stable/12/sys/conf/kern.post.mk stable/12/sys/conf/kmod.mk stable/12/sys/modules/efirt/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/conf/kern.post.mk == --- stable/12/sys/conf/kern.post.mk Thu Sep 5 20:27:44 2019 (r351891) +++ stable/12/sys/conf/kern.post.mk Thu Sep 5 20:31:25 2019 (r351892) @@ -329,7 +329,7 @@ _ILINKS+= x86 # Ensure that debug info references the path in the source tree. .for _link in ${_ILINKS} .if !exists(${.OBJDIR}/${_link}) -${SRCS} ${CLEAN:M*.o}: ${_link} +${SRCS} ${DEPENDOBJS}: ${_link} .endif .if defined(_MAP_DEBUG_PREFIX) .if ${_link} == "machine" Modified: stable/12/sys/conf/kmod.mk == --- stable/12/sys/conf/kmod.mk Thu Sep 5 20:27:44 2019(r351891) +++ stable/12/sys/conf/kmod.mk Thu Sep 5 20:31:25 2019(r351892) @@ -476,7 +476,7 @@ acpi_quirks.h: ${SYSDIR}/tools/acpi_quirks2h.awk ${SYS .endif .if !empty(SRCS:Massym.inc) || !empty(DPSRCS:Massym.inc) -CLEANFILES+= assym.inc +CLEANFILES+= assym.inc genassym.o DEPENDOBJS+= genassym.o DPSRCS+= offset.inc .endif Modified: stable/12/sys/modules/efirt/Makefile == --- stable/12/sys/modules/efirt/MakefileThu Sep 5 20:27:44 2019 (r351891) +++ stable/12/sys/modules/efirt/MakefileThu Sep 5 20:31:25 2019 (r351892) @@ -11,6 +11,7 @@ SRCS+= device_if.h bus_if.h clock_if.h .if ${MACHINE_CPUARCH} == "amd64" SRCS+= opt_hwpmc_hooks.h opt_kstack_pages.h SRCS+= efirt_support.S +DPSRCS+= assym.inc efirt_support.o: efirt_support.S assym.inc ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \ ${.IMPSRC} -o ${.TARGET} ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r351891 - stable/11/lib/libsysdecode
Author: bdrewery Date: Thu Sep 5 20:27:44 2019 New Revision: 351891 URL: https://svnweb.freebsd.org/changeset/base/351891 Log: MFC r339635,r350301,r350327,r351151: r339635: Fix regex for extracting SHM_* values for libsysdecode r350301: libsysdecode: add explicit dependencies on recently changed headers r350327: libsysdecode: use the proper include directory r351151: Rework r339635 to fix .depend.tables.h handling. Modified: stable/11/lib/libsysdecode/Makefile stable/11/lib/libsysdecode/mktables Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libsysdecode/Makefile == --- stable/11/lib/libsysdecode/Makefile Thu Sep 5 20:26:20 2019 (r351890) +++ stable/11/lib/libsysdecode/Makefile Thu Sep 5 20:27:44 2019 (r351891) @@ -107,7 +107,7 @@ MLINKS+=sysdecode_mask.3 sysdecode_accessmode.3 \ sysdecode_mask.3 sysdecode_wait4_options.3 \ sysdecode_mask.3 sysdecode_wait6_options.3 -CLEANFILES= ioctl.c tables.h +CLEANFILES= ioctl.c ioctl.c.tmp tables.h .if defined(COMPAT_32BIT) CPP+= -m32 Modified: stable/11/lib/libsysdecode/mktables == --- stable/11/lib/libsysdecode/mktables Thu Sep 5 20:26:20 2019 (r351890) +++ stable/11/lib/libsysdecode/mktables Thu Sep 5 20:27:44 2019 (r351891) @@ -43,7 +43,8 @@ fi include_dir=$1 if [ -n "$2" ]; then output_file="$2" - exec > "$output_file" + output_tmp=$(mktemp -u) + exec > "$output_tmp" fi all_headers= @@ -123,7 +124,7 @@ gen_table "rlimit" "RLIMIT_[A-Z]+[[:space:]]+ gen_table "rusage" "RUSAGE_[A-Z]+[[:space:]]+[-0-9]+" "sys/resource.h" gen_table "schedpolicy" "SCHED_[A-Z]+[[:space:]]+[0-9]+" "sched.h" gen_table "sendfileflags" "SF_[A-Z]+[[:space:]]+[0-9]+" "sys/socket.h" -gen_table "shmatflags" "SHM_[A-Z]+[[:space:]]+[0-9]{6}+" "sys/shm.h" +gen_table "shmatflags" "SHM_[A-Z]+[[:space:]]+[0-9]{6}" "sys/shm.h" gen_table "shutdownhow" "SHUT_[A-Z]+[[:space:]]+[0-9]+" "sys/socket.h" gen_table "sigbuscode" "BUS_[A-Z]+[[:space:]]+[0-9]+" "sys/signal.h" gen_table "sigchldcode" "CLD_[A-Z]+[[:space:]]+[0-9]+" "sys/signal.h" @@ -167,9 +168,17 @@ fi # Generate a .depend file for our output file if [ -n "$output_file" ]; then - echo "$output_file: \\" > ".depend.$output_file" - echo "$all_headers" | tr ' ' '\n' | sort -u | - sed -e "s,^,$include_dir/," -e 's,$, \\,' >> \ - ".depend.$output_file" - echo >> ".depend.$output_file" + depend_tmp=$(mktemp -u) + { + echo "$output_file: \\" + echo "$all_headers" | tr ' ' '\n' | sort -u | + sed -e "s,^,$include_dir/," -e 's,$, \\,' + echo + } > "$depend_tmp" + if cmp -s "$output_tmp" "$output_file"; then + rm -f "$output_tmp" "$depend_tmp" + else + mv -f "$depend_tmp" ".depend.${output_file}" + mv -f "$output_tmp" "$output_file" + fi fi ___ 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: r351890 - stable/12/lib/libsysdecode
Author: bdrewery Date: Thu Sep 5 20:26:20 2019 New Revision: 351890 URL: https://svnweb.freebsd.org/changeset/base/351890 Log: MFC r339635,r350301,r350327,r351151: r339635: Fix regex for extracting SHM_* values for libsysdecode r350301: libsysdecode: add explicit dependencies on recently changed headers r350327: libsysdecode: use the proper include directory r351151: Rework r339635 to fix .depend.tables.h handling. Modified: stable/12/lib/libsysdecode/Makefile stable/12/lib/libsysdecode/mktables Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libsysdecode/Makefile == --- stable/12/lib/libsysdecode/Makefile Thu Sep 5 19:35:30 2019 (r351889) +++ stable/12/lib/libsysdecode/Makefile Thu Sep 5 20:26:20 2019 (r351890) @@ -107,7 +107,7 @@ MLINKS+=sysdecode_mask.3 sysdecode_accessmode.3 \ sysdecode_mask.3 sysdecode_wait4_options.3 \ sysdecode_mask.3 sysdecode_wait6_options.3 -CLEANFILES= ioctl.c tables.h +CLEANFILES= ioctl.c ioctl.c.tmp tables.h .if defined(COMPAT_32BIT) CPP+= -m32 Modified: stable/12/lib/libsysdecode/mktables == --- stable/12/lib/libsysdecode/mktables Thu Sep 5 19:35:30 2019 (r351889) +++ stable/12/lib/libsysdecode/mktables Thu Sep 5 20:26:20 2019 (r351890) @@ -43,7 +43,8 @@ fi include_dir=$1 if [ -n "$2" ]; then output_file="$2" - exec > "$output_file" + output_tmp=$(mktemp -u) + exec > "$output_tmp" fi all_headers= @@ -123,7 +124,7 @@ gen_table "rlimit" "RLIMIT_[A-Z]+[[:space:]]+ gen_table "rusage" "RUSAGE_[A-Z]+[[:space:]]+[-0-9]+" "sys/resource.h" gen_table "schedpolicy" "SCHED_[A-Z]+[[:space:]]+[0-9]+" "sched.h" gen_table "sendfileflags" "SF_[A-Z]+[[:space:]]+[0-9]+" "sys/socket.h" -gen_table "shmatflags" "SHM_[A-Z]+[[:space:]]+[0-9]{6}+" "sys/shm.h" +gen_table "shmatflags" "SHM_[A-Z]+[[:space:]]+[0-9]{6}" "sys/shm.h" gen_table "shutdownhow" "SHUT_[A-Z]+[[:space:]]+[0-9]+" "sys/socket.h" gen_table "sigbuscode" "BUS_[A-Z]+[[:space:]]+[0-9]+" "sys/signal.h" gen_table "sigchldcode" "CLD_[A-Z]+[[:space:]]+[0-9]+" "sys/signal.h" @@ -167,9 +168,17 @@ fi # Generate a .depend file for our output file if [ -n "$output_file" ]; then - echo "$output_file: \\" > ".depend.$output_file" - echo "$all_headers" | tr ' ' '\n' | sort -u | - sed -e "s,^,$include_dir/," -e 's,$, \\,' >> \ - ".depend.$output_file" - echo >> ".depend.$output_file" + depend_tmp=$(mktemp -u) + { + echo "$output_file: \\" + echo "$all_headers" | tr ' ' '\n' | sort -u | + sed -e "s,^,$include_dir/," -e 's,$, \\,' + echo + } > "$depend_tmp" + if cmp -s "$output_tmp" "$output_file"; then + rm -f "$output_tmp" "$depend_tmp" + else + mv -f "$depend_tmp" ".depend.${output_file}" + mv -f "$output_tmp" "$output_file" + fi fi ___ 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: r351889 - head/lib/libc/nameser
Author: cy Date: Thu Sep 5 19:35:30 2019 New Revision: 351889 URL: https://svnweb.freebsd.org/changeset/base/351889 Log: Bounds check again after advancing cp, otherwise we have a possible heap buffer overflow. This was discovered by a Google fuzzer test. This can lead to remote denial of service. User interaction and execution privileges are not a prerequisite for exploitation. Reported by: enh at Google, to FreeBSD by m...@netbsd.org Obtained from:enh at Google See also: NetBSD ns_name.c r1.12 Reviewed by: delphij, ume MFC after:3 days https://android-review.googlesource.com/c/platform/bionic/+/1093130 Differential Revision:https://reviews.freebsd.org/D21523 Modified: head/lib/libc/nameser/ns_name.c Modified: head/lib/libc/nameser/ns_name.c == --- head/lib/libc/nameser/ns_name.c Thu Sep 5 19:25:44 2019 (r351888) +++ head/lib/libc/nameser/ns_name.c Thu Sep 5 19:35:30 2019 (r351889) @@ -684,7 +684,7 @@ ns_name_skip(const u_char **ptrptr, const u_char *eom) { const u_char *cp; u_int n; - int l; + int l = 0; cp = *ptrptr; while (cp < eom && (n = *cp++) != 0) { @@ -694,7 +694,7 @@ ns_name_skip(const u_char **ptrptr, const u_char *eom) cp += n; continue; case NS_TYPE_ELT: /*%< EDNS0 extended label */ - if ((l = labellen(cp - 1)) < 0) { + if (cp < eom && (l = labellen(cp - 1)) < 0) { errno = EMSGSIZE; /*%< XXX */ 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"
svn commit: r351888 - stable/12/sys/arm/ti/am335x
Author: ian Date: Thu Sep 5 19:25:44 2019 New Revision: 351888 URL: https://svnweb.freebsd.org/changeset/base/351888 Log: MFC r350848: The am335x_ehrpwm driver now requires the pwmbus_if interface, add it. Modified: stable/12/sys/arm/ti/am335x/files.am335x Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/ti/am335x/files.am335x == --- stable/12/sys/arm/ti/am335x/files.am335xThu Sep 5 19:17:53 2019 (r351887) +++ stable/12/sys/arm/ti/am335x/files.am335xThu Sep 5 19:25:44 2019 (r351888) @@ -10,6 +10,7 @@ arm/ti/am335x/am335x_lcd_syscons.coptionalsc arm/ti/am335x/am335x_pmic.coptionalam335x_pmic arm/ti/am335x/am335x_prcm.cstandard arm/ti/am335x/am335x_pwmss.c standard +dev/pwm/pwmbus_if.mstandard arm/ti/am335x/am335x_ehrpwm.c standard arm/ti/am335x/am335x_ecap.cstandard arm/ti/am335x/am335x_rtc.c optionalam335x_rtc ___ 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: r351887 - head/sys/dev/iicbus
Author: ian Date: Thu Sep 5 19:17:53 2019 New Revision: 351887 URL: https://svnweb.freebsd.org/changeset/base/351887 Log: Use a single write of 3 bytes instead of iicdev_writeto() in ads111x. The iicdev_writeto() function basically does scatter-gather IO by filling in a pair of iic_msg structs to write the register address then the data from different locations but with a single bus START/xfer/STOP sequence. It turns out several low-level i2c controller drivers do not honor the IIC_NOSTART flag, so the second piece of the write gets a new START on the bus, and that confuses the ads111x chips which expect a continuous write of 3 bytes to set a register. A proper fix for this is to track down all the misbehaving controllers drivers and fix them. For now this change makes this driver work again. Modified: head/sys/dev/iicbus/ads111x.c Modified: head/sys/dev/iicbus/ads111x.c == --- head/sys/dev/iicbus/ads111x.c Thu Sep 5 19:17:17 2019 (r351886) +++ head/sys/dev/iicbus/ads111x.c Thu Sep 5 19:17:53 2019 (r351887) @@ -167,11 +167,21 @@ struct ads111x_softc { static int ads111x_write_2(struct ads111x_softc *sc, int reg, int val) { - uint8_t data[2]; + uint8_t data[3]; + struct iic_msg msgs[1]; + uint8_t slaveaddr; - be16enc(data, val); + slaveaddr = iicbus_get_addr(sc->dev); - return (iic2errno(iicdev_writeto(sc->dev, reg, data, 2, IIC_WAIT))); + data[0] = reg; + be16enc([1], val); + + msgs[0].slave = slaveaddr; + msgs[0].flags = IIC_M_WR; + msgs[0].len = sizeof(data); + msgs[0].buf = data; + + return (iicbus_transfer_excl(sc->dev, msgs, nitems(msgs), IIC_WAIT)); } static int ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r351886 - head/share/keys/pkg/trusted
Author: manu Date: Thu Sep 5 19:17:17 2019 New Revision: 351886 URL: https://svnweb.freebsd.org/changeset/base/351886 Log: pkgbase: Add the pkg trusted keys to the FreeBSD-utilities package Modified: head/share/keys/pkg/trusted/Makefile Modified: head/share/keys/pkg/trusted/Makefile == --- head/share/keys/pkg/trusted/MakefileThu Sep 5 19:07:48 2019 (r351885) +++ head/share/keys/pkg/trusted/MakefileThu Sep 5 19:17:17 2019 (r351886) @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE= utilities + FILES= pkg.freebsd.org.2013102301 FILESDIR= ${SHAREDIR}/keys/pkg/trusted ___ 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: r351885 - head/sys/dev/iicbus
Author: ian Date: Thu Sep 5 19:07:48 2019 New Revision: 351885 URL: https://svnweb.freebsd.org/changeset/base/351885 Log: Ensure a measurement is complete before reading the result in ads111x. Also, disable the comparator by default; it's not used for anything. The previous logic would start a measurement, and then pause_sbt() for the averaging time currently configured in the chip. After waiting that long, the code would blindly read the measurement register and return its value. The problem is that the chip's idea of averaging time is based on its internal free-running 1MHz oscillator, which may be running at a wildly different rate than the kernel clock. If the chip's internal timer was running slower than the kernel clock, we'd end up grabbing a stale result from an old measurement. The driver now still uses pause_sbt() to yield the cpu while waiting for the measurement to complete, but after sleeping it checks the chip's status register to ensure the measurement engine is idle. If it's not, the driver uses a retry loop to wait a bit (5% of the original wait time) then check again for completion. Modified: head/sys/dev/iicbus/ads111x.c Modified: head/sys/dev/iicbus/ads111x.c == --- head/sys/dev/iicbus/ads111x.c Thu Sep 5 18:54:46 2019 (r351884) +++ head/sys/dev/iicbus/ads111x.c Thu Sep 5 19:07:48 2019 (r351885) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #define ADS111x_CONF_GAIN_SHIFT9 /* Programmable gain amp */ #define ADS111x_CONF_MODE_SHIFT8 /* Operational mode */ #define ADS111x_CONF_RATE_SHIFT5 /* Sample rate */ +#define ADS111x_CONF_COMP_DISABLE 3 /* Comparator disable */ #defineADS111x_LOTHRESH2 /* Compare lo threshold (rw) */ @@ -81,7 +82,8 @@ __FBSDID("$FreeBSD$"); * comparator and we'll leave it alone if they do. That allows them connect the * alert pin to something and use the feature without any help from this driver. */ -#defineADS111x_CONF_DEFAULT(1 << ADS111x_CONF_MODE_SHIFT) +#defineADS111x_CONF_DEFAULT\ +((1 << ADS111x_CONF_MODE_SHIFT) | ADS111x_CONF_COMP_DISABLE) #defineADS111x_CONF_USERMASK 0x001f /* @@ -189,7 +191,7 @@ static int ads111x_sample_voltage(struct ads111x_softc *sc, int channum, int *voltage) { struct ads111x_channel *chan; - int err, cfgword, convword, rate, waitns; + int err, cfgword, convword, rate, retries, waitns; int64_t fsrange; chan = >channels[channum]; @@ -205,7 +207,8 @@ ads111x_sample_voltage(struct ads111x_softc *sc, int c /* * Calculate how long it will take to make the measurement at the -* current sampling rate (round up), and sleep at least that long. +* current sampling rate (round up). The measurement averaging time +* ranges from 300us to 125ms, so we yield the cpu while waiting. */ rate = sc->chipinfo->ratetab[chan->rateidx]; waitns = (10 + rate - 1) / rate; @@ -213,20 +216,27 @@ ads111x_sample_voltage(struct ads111x_softc *sc, int c if (err != 0 && err != EWOULDBLOCK) return (err); -#if 0 /* -* Sanity-check that the measurement is complete. Not enabled by -* default because checking wastes 200-800us just in moving the status -* command and result across the i2c bus, which could double the time it -* takes to get one measurement. Unlike most i2c slaves, this device -* does not auto-increment the register number on reads, so we can't -* read both status and measurement in one operation. +* In theory the measurement should be available now; we waited long +* enough. However, the chip times its averaging intervals using an +* internal 1 MHz oscillator which likely isn't running at the same rate +* as the system clock, so we have to double-check that the measurement +* is complete before reading the result. If it's not ready yet, yield +* the cpu again for 5% of the time we originally calculated. +* +* Unlike most i2c slaves, this device does not auto-increment the +* register number on reads, so we can't read both status and +* measurement in one operation. */ - if ((err = ads111x_read_2(sc, ADS111x_CONF, )) != 0) - return (err); - if (!(cfgword & ADS111x_CONF_IDLE)) - return (EIO); -#endif + for (retries = 5; ; --retries) { + if (retries == 0) + return (EWOULDBLOCK); + if ((err = ads111x_read_2(sc, ADS111x_CONF, )) != 0) + return (err); + if (cfgword & ADS111x_CONF_IDLE) + break; +
svn commit: r351884 - head/tests/sys/acl
Author: kp Date: Thu Sep 5 18:54:46 2019 New Revision: 351884 URL: https://svnweb.freebsd.org/changeset/base/351884 Log: Set required program for all acl tests r339782 re-enabled acl test 00 and 02, which were disabled in r336617 due to PR 229930. When the tests were disabled the code to set their required programs was disabled as well, but this was not reinstated when r339782 re-enabled them. Do so now. Sponsored by: Axiado Modified: head/tests/sys/acl/Makefile Modified: head/tests/sys/acl/Makefile == --- head/tests/sys/acl/Makefile Thu Sep 5 18:47:58 2019(r351883) +++ head/tests/sys/acl/Makefile Thu Sep 5 18:54:46 2019(r351884) @@ -30,8 +30,8 @@ _ACL_PROGS= getfacl setfacl TEST_METADATA.$t+= required_programs="perl zpool ${_ACL_PROGS}" .endfor -# .for t in 00 02 -# TEST_METADATA.$t+= required_programs="perl ${_ACL_PROGS}" -# .endfor +.for t in 00 02 +TEST_METADATA.$t+= required_programs="perl ${_ACL_PROGS}" +.endfor .include ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r351882 - head/sys/kern
Author: mjg Date: Thu Sep 5 18:19:51 2019 New Revision: 351882 URL: https://svnweb.freebsd.org/changeset/base/351882 Log: vfs: temporarily revert r351825 There are 2 problems: - it introduces a funny bug where it can end up trylocking the same vnode [1] - it exposes a pre-existing softdep deadlock [2] Both are easier to run into that the bug which got fixed, so revert until a complete solution is worked out. Reported by: cy [1], pho [2] Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c == --- head/sys/kern/vfs_subr.cThu Sep 5 18:07:40 2019(r351881) +++ head/sys/kern/vfs_subr.cThu Sep 5 18:19:51 2019(r351882) @@ -1102,6 +1102,7 @@ vnlru_free_locked(int count, struct vfsops *mnt_op) ("Removing vnode not on freelist")); KASSERT((vp->v_iflag & VI_ACTIVE) == 0, ("Mangling active vnode")); + TAILQ_REMOVE(_free_list, vp, v_actfreelist); /* * Don't recycle if our vnode is from different type @@ -1113,6 +1114,7 @@ vnlru_free_locked(int count, struct vfsops *mnt_op) */ if ((mnt_op != NULL && (mp = vp->v_mount) != NULL && mp->mnt_op != mnt_op) || !VI_TRYLOCK(vp)) { + TAILQ_INSERT_TAIL(_free_list, vp, v_actfreelist); continue; } VNASSERT((vp->v_iflag & VI_FREE) != 0 && vp->v_holdcnt == 0, @@ -1127,8 +1129,11 @@ vnlru_free_locked(int count, struct vfsops *mnt_op) * activating. */ freevnodes--; + vp->v_iflag &= ~VI_FREE; + VNODE_REFCOUNT_FENCE_REL(); + refcount_acquire(>v_holdcnt); + mtx_unlock(_free_list_mtx); - vholdl(vp); VI_UNLOCK(vp); vtryrecycle(vp); /* ___ 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: r351881 - head/sys/teken
Author: tsoome Date: Thu Sep 5 18:07:40 2019 New Revision: 351881 URL: https://svnweb.freebsd.org/changeset/base/351881 Log: Adjust teken to allow build as part of loader Building for loader needs specific headers. Modified: head/sys/teken/teken.c Modified: head/sys/teken/teken.c == --- head/sys/teken/teken.c Thu Sep 5 17:54:57 2019(r351880) +++ head/sys/teken/teken.c Thu Sep 5 18:07:40 2019(r351881) @@ -35,7 +35,12 @@ #include #include #defineteken_assert(x) MPASS(x) -#else /* !(__FreeBSD__ && _KERNEL) */ +#elif defined(__FreeBSD__) && defined(_STANDALONE) +#include +#include +#include +#defineteken_assert(x) assert(x) +#else /* !(__FreeBSD__ && _STANDALONE) */ #include #include #include @@ -43,7 +48,7 @@ #include #include #defineteken_assert(x) assert(x) -#endif /* __FreeBSD__ && _KERNEL */ +#endif /* __FreeBSD__ && _STANDALONE */ /* debug messages */ #defineteken_printf(x,...) ___ 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: r351818 - in head/sys: arm/conf arm64/conf conf
On Wed, Sep 04, 2019 at 11:16:00AM -0600, Ian Lepore wrote: > On Wed, 2019-09-04 at 15:55 +, Ruslan Bukin wrote: > > Author: br > > Date: Wed Sep 4 15:55:44 2019 > > New Revision: 351818 > > URL: https://svnweb.freebsd.org/changeset/base/351818 > > > > Log: > > Include dwgpio to the build. > > > > Sponsored by: DARPA, AFRL > > > > Modified: > > head/sys/arm/conf/GENERIC > > head/sys/arm64/conf/GENERIC > > head/sys/conf/files > > > > This should probably also be added to sys/conf/NOTES so it gets built > in LINT kernels. > Added! Thanks Ruslan ___ 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: r351880 - head/sys/conf
Author: br Date: Thu Sep 5 17:54:57 2019 New Revision: 351880 URL: https://svnweb.freebsd.org/changeset/base/351880 Log: Add dwgpio to NOTES so it gets built in LINT kernels. Sponsored by: DARPA, AFRL Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Thu Sep 5 17:53:41 2019(r351879) +++ head/sys/conf/NOTES Thu Sep 5 17:54:57 2019(r351880) @@ -2385,6 +2385,7 @@ devicelpbb device pcfclock # General Purpose I/O pins +device dwgpio # Synopsys DesignWare APB GPIO Controller device gpio# gpio interfaces and bus support device gpiobacklight # sysctl control of gpio-based backlight device gpioiic # i2c via gpio bitbang ___ 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: r351878 - head/sys/kern
Author: stevek Date: Thu Sep 5 17:48:39 2019 New Revision: 351878 URL: https://svnweb.freebsd.org/changeset/base/351878 Log: Bump up the low range of cpuset numbers to account for the kernel cpuset. Reviewed by: jeff Obtained from:Juniper Networks, Inc. Modified: head/sys/kern/kern_cpuset.c Modified: head/sys/kern/kern_cpuset.c == --- head/sys/kern/kern_cpuset.c Thu Sep 5 17:20:48 2019(r351877) +++ head/sys/kern/kern_cpuset.c Thu Sep 5 17:48:39 2019(r351878) @@ -1507,7 +1507,7 @@ cpuset_thread0(void) /* * Initialize the unit allocator. 0 and 1 are allocated above. */ - cpuset_unr = new_unrhdr(2, INT_MAX, NULL); + cpuset_unr = new_unrhdr(3, INT_MAX, NULL); /* * If MD code has not initialized per-domain cpusets, place all ___ 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: r351875 - in stable/12/sys/modules: iwmfw iwnfw mwlfw ralfw rtwnfw usb/rsufw usb/runfw
Author: bdrewery Date: Thu Sep 5 17:20:20 2019 New Revision: 351875 URL: https://svnweb.freebsd.org/changeset/base/351875 Log: MFC r348979: Stop using .OODATE for extracting firmware. Modified: stable/12/sys/modules/iwmfw/Makefile.inc stable/12/sys/modules/iwnfw/Makefile.inc stable/12/sys/modules/mwlfw/Makefile stable/12/sys/modules/ralfw/Makefile.inc stable/12/sys/modules/rtwnfw/Makefile.inc stable/12/sys/modules/usb/rsufw/Makefile.inc stable/12/sys/modules/usb/runfw/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/modules/iwmfw/Makefile.inc == --- stable/12/sys/modules/iwmfw/Makefile.incThu Sep 5 16:53:55 2019 (r351874) +++ stable/12/sys/modules/iwmfw/Makefile.incThu Sep 5 17:20:20 2019 (r351875) @@ -15,4 +15,4 @@ FIRMWS= ${_FIRM}:${KMOD} #FIRMWARE_LICENSE= ${_FIRM}: ${SRCTOP}/sys/contrib/dev/iwm/${_FIRM}.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} Modified: stable/12/sys/modules/iwnfw/Makefile.inc == --- stable/12/sys/modules/iwnfw/Makefile.incThu Sep 5 16:53:55 2019 (r351874) +++ stable/12/sys/modules/iwnfw/Makefile.incThu Sep 5 17:20:20 2019 (r351875) @@ -15,4 +15,4 @@ FIRMWS= ${_FIRM}:${KMOD} #FIRMWARE_LICENSE= ${_FIRM}: ${SRCTOP}/sys/contrib/dev/iwn/${_FIRM}.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} Modified: stable/12/sys/modules/mwlfw/Makefile == --- stable/12/sys/modules/mwlfw/MakefileThu Sep 5 16:53:55 2019 (r351874) +++ stable/12/sys/modules/mwlfw/MakefileThu Sep 5 17:20:20 2019 (r351875) @@ -6,9 +6,9 @@ FIRMWS= mw88W8363.fw:mw88W8363fw mwlboot.fw:mwlboot CLEANFILES+= mw88W8363.fw mwlboot.fw mw88W8363.fw: ${SRCTOP}/sys/contrib/dev/mwl/mw88W8363.fw.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} mwlboot.fw: ${SRCTOP}/sys/contrib/dev/mwl/mwlboot.fw.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} .include Modified: stable/12/sys/modules/ralfw/Makefile.inc == --- stable/12/sys/modules/ralfw/Makefile.incThu Sep 5 16:53:55 2019 (r351874) +++ stable/12/sys/modules/ralfw/Makefile.incThu Sep 5 17:20:20 2019 (r351875) @@ -12,4 +12,4 @@ CLEANFILES+= ${_FIRM} FIRMWS=${_FIRM}:${KMOD} ${_FIRM}: ${SRCTOP}/sys/contrib/dev/ral/${_FIRM}.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} Modified: stable/12/sys/modules/rtwnfw/Makefile.inc == --- stable/12/sys/modules/rtwnfw/Makefile.inc Thu Sep 5 16:53:55 2019 (r351874) +++ stable/12/sys/modules/rtwnfw/Makefile.inc Thu Sep 5 17:20:20 2019 (r351875) @@ -12,4 +12,4 @@ FIRMWS= ${_FIRM}:${KMOD}:111 # FIRMWARE_LICENSE=realtek ${_FIRM}: ${SRCTOP}/sys/contrib/dev/rtwn/${_FIRM}.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} Modified: stable/12/sys/modules/usb/rsufw/Makefile.inc == --- stable/12/sys/modules/usb/rsufw/Makefile.incThu Sep 5 16:53:55 2019(r351874) +++ stable/12/sys/modules/usb/rsufw/Makefile.incThu Sep 5 17:20:20 2019(r351875) @@ -12,4 +12,4 @@ FIRMWS= ${_FIRM}:${KMOD}:120 # FIRMWARE_LICENSE=realtek ${_FIRM}: ${SRCTOP}/sys/contrib/dev/rsu/${_FIRM}.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} Modified: stable/12/sys/modules/usb/runfw/Makefile == --- stable/12/sys/modules/usb/runfw/MakefileThu Sep 5 16:53:55 2019 (r351874) +++ stable/12/sys/modules/usb/runfw/MakefileThu Sep 5 17:20:20 2019 (r351875) @@ -6,6 +6,6 @@ FIRMWS= run.fw:runfw:1 CLEANFILES=run.fw run.fw: ${SRCTOP}/sys/contrib/dev/run/rt2870.fw.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} .include ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r351877 - stable/12/sys/fs/nandfs
Author: ian Date: Thu Sep 5 17:20:48 2019 New Revision: 351877 URL: https://svnweb.freebsd.org/changeset/base/351877 Log: Fix LINT kernel builds on powerpc64 and sparc64. This is a direct commit to 12-stable because the nandfs code no longer exists in 13-current. The build was failing with nandfs_dat.c:301: warning: comparison is always false due to limited range of data type I tried to fix it with an inline (size_t) cast of nargv->nv_nmembs in the if() expression, but that didn't help (which seems a bit buggy), but using an intermediate variable fixed it. Elegance doesn't matter as much as suppressing the warning; this code is long-dead even on this branch. Modified: stable/12/sys/fs/nandfs/nandfs_dat.c Modified: stable/12/sys/fs/nandfs/nandfs_dat.c == --- stable/12/sys/fs/nandfs/nandfs_dat.cThu Sep 5 17:20:24 2019 (r351876) +++ stable/12/sys/fs/nandfs/nandfs_dat.cThu Sep 5 17:20:48 2019 (r351877) @@ -295,10 +295,11 @@ nandfs_get_dat_bdescs_ioctl(struct nandfs_device *nffs struct nandfs_argv *nargv) { struct nandfs_bdesc *bd; - size_t size; + size_t size, sizecheck; int error; - if (nargv->nv_nmembs >= SIZE_MAX / sizeof(struct nandfs_bdesc)) + sizecheck = nargv->nv_nmembs; + if (sizecheck >= SIZE_MAX / sizeof(struct nandfs_bdesc)) return (EINVAL); size = nargv->nv_nmembs * sizeof(struct nandfs_bdesc); ___ 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: r351876 - in stable/11/sys/modules: iwmfw iwnfw mwlfw ralfw rtwnfw usb/rsufw usb/runfw
Author: bdrewery Date: Thu Sep 5 17:20:24 2019 New Revision: 351876 URL: https://svnweb.freebsd.org/changeset/base/351876 Log: MFC r348979: Stop using .OODATE for extracting firmware. Modified: stable/11/sys/modules/iwmfw/Makefile.inc stable/11/sys/modules/iwnfw/Makefile.inc stable/11/sys/modules/mwlfw/Makefile stable/11/sys/modules/ralfw/Makefile.inc stable/11/sys/modules/rtwnfw/Makefile.inc stable/11/sys/modules/usb/rsufw/Makefile.inc stable/11/sys/modules/usb/runfw/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/modules/iwmfw/Makefile.inc == --- stable/11/sys/modules/iwmfw/Makefile.incThu Sep 5 17:20:20 2019 (r351875) +++ stable/11/sys/modules/iwmfw/Makefile.incThu Sep 5 17:20:24 2019 (r351876) @@ -15,4 +15,4 @@ FIRMWS= ${_FIRM}:${KMOD} #FIRMWARE_LICENSE= ${_FIRM}: ${SRCTOP}/sys/contrib/dev/iwm/${_FIRM}.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} Modified: stable/11/sys/modules/iwnfw/Makefile.inc == --- stable/11/sys/modules/iwnfw/Makefile.incThu Sep 5 17:20:20 2019 (r351875) +++ stable/11/sys/modules/iwnfw/Makefile.incThu Sep 5 17:20:24 2019 (r351876) @@ -15,4 +15,4 @@ FIRMWS= ${_FIRM}:${KMOD} #FIRMWARE_LICENSE= ${_FIRM}: ${SRCTOP}/sys/contrib/dev/iwn/${_FIRM}.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} Modified: stable/11/sys/modules/mwlfw/Makefile == --- stable/11/sys/modules/mwlfw/MakefileThu Sep 5 17:20:20 2019 (r351875) +++ stable/11/sys/modules/mwlfw/MakefileThu Sep 5 17:20:24 2019 (r351876) @@ -6,9 +6,9 @@ FIRMWS= mw88W8363.fw:mw88W8363fw mwlboot.fw:mwlboot CLEANFILES+= mw88W8363.fw mwlboot.fw mw88W8363.fw: ${SRCTOP}/sys/contrib/dev/mwl/mw88W8363.fw.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} mwlboot.fw: ${SRCTOP}/sys/contrib/dev/mwl/mwlboot.fw.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} .include Modified: stable/11/sys/modules/ralfw/Makefile.inc == --- stable/11/sys/modules/ralfw/Makefile.incThu Sep 5 17:20:20 2019 (r351875) +++ stable/11/sys/modules/ralfw/Makefile.incThu Sep 5 17:20:24 2019 (r351876) @@ -12,4 +12,4 @@ CLEANFILES+= ${_FIRM} FIRMWS=${_FIRM}:${KMOD} ${_FIRM}: ${SRCTOP}/sys/contrib/dev/ral/${_FIRM}.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} Modified: stable/11/sys/modules/rtwnfw/Makefile.inc == --- stable/11/sys/modules/rtwnfw/Makefile.inc Thu Sep 5 17:20:20 2019 (r351875) +++ stable/11/sys/modules/rtwnfw/Makefile.inc Thu Sep 5 17:20:24 2019 (r351876) @@ -12,4 +12,4 @@ FIRMWS= ${_FIRM}:${KMOD}:111 FIRMWARE_LICENSE= realtek ${_FIRM}: ${SRCTOP}/sys/contrib/dev/rtwn/${_FIRM}.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} Modified: stable/11/sys/modules/usb/rsufw/Makefile.inc == --- stable/11/sys/modules/usb/rsufw/Makefile.incThu Sep 5 17:20:20 2019(r351875) +++ stable/11/sys/modules/usb/rsufw/Makefile.incThu Sep 5 17:20:24 2019(r351876) @@ -12,4 +12,4 @@ FIRMWS= ${_FIRM}:${KMOD}:120 # FIRMWARE_LICENSE=realtek ${_FIRM}: ${SRCTOP}/sys/contrib/dev/rsu/${_FIRM}.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} Modified: stable/11/sys/modules/usb/runfw/Makefile == --- stable/11/sys/modules/usb/runfw/MakefileThu Sep 5 17:20:20 2019 (r351875) +++ stable/11/sys/modules/usb/runfw/MakefileThu Sep 5 17:20:24 2019 (r351876) @@ -6,6 +6,6 @@ FIRMWS= run.fw:runfw:1 CLEANFILES=run.fw run.fw: ${SRCTOP}/sys/contrib/dev/run/rt2870.fw.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} .include ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r351873 - stable/11/usr.bin/jot
Author: bdrewery Date: Thu Sep 5 16:53:34 2019 New Revision: 351873 URL: https://svnweb.freebsd.org/changeset/base/351873 Log: MFC r346255: Fix 'jot -r 0 start end' to work. Relnotes: yes Modified: stable/11/usr.bin/jot/jot.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/jot/jot.c == --- stable/11/usr.bin/jot/jot.c Thu Sep 5 16:52:55 2019(r351872) +++ stable/11/usr.bin/jot/jot.c Thu Sep 5 16:53:34 2019(r351873) @@ -242,12 +242,15 @@ main(int argc, char **argv) mask = 0; break; case HAVE_REPS | HAVE_BEGIN | HAVE_ENDER: - if (reps == 0) - errx(1, "infinite sequences cannot be bounded"); - else if (reps == 1) - s = 0.0; - else - s = (ender - begin) / (reps - 1); + if (!randomize) { + if (reps == 0) + errx(1, "infinite sequences cannot " + "be bounded"); + else if (reps == 1) + s = 0.0; + else + s = (ender - begin) / (reps - 1); + } mask = 0; break; case HAVE_REPS | HAVE_BEGIN | HAVE_ENDER | HAVE_STEP: ___ 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: r351874 - stable/12/sys/dev/sdhci
Author: ian Date: Thu Sep 5 16:53:55 2019 New Revision: 351874 URL: https://svnweb.freebsd.org/changeset/base/351874 Log: MFC r350847: Allow the sdhci timeout sysctl var to be set as a tunable. Also, add a missing newline in a warning printf. Modified: stable/12/sys/dev/sdhci/sdhci.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/sdhci/sdhci.c == --- stable/12/sys/dev/sdhci/sdhci.c Thu Sep 5 16:53:34 2019 (r351873) +++ stable/12/sys/dev/sdhci/sdhci.c Thu Sep 5 16:53:55 2019 (r351874) @@ -476,7 +476,7 @@ sdhci_set_power(struct sdhci_slot *slot, u_char power) DELAY(100); } if (!(RD1(slot, SDHCI_POWER_CONTROL) & SDHCI_POWER_ON)) - slot_printf(slot, "Bus power failed to enable"); + slot_printf(slot, "Bus power failed to enable\n"); if (slot->quirks & SDHCI_QUIRK_INTEL_POWER_UP_RESET) { WR1(slot, SDHCI_POWER_CONTROL, pwr | 0x10); @@ -,7 +,7 @@ no_tuning: slot->timeout = 10; SYSCTL_ADD_INT(device_get_sysctl_ctx(slot->bus), SYSCTL_CHILDREN(device_get_sysctl_tree(slot->bus)), OID_AUTO, - "timeout", CTLFLAG_RW, >timeout, 0, + "timeout", CTLFLAG_RWTUN, >timeout, 0, "Maximum timeout for SDHCI transfers (in secs)"); TASK_INIT(>card_task, 0, sdhci_card_task, slot); TIMEOUT_TASK_INIT(taskqueue_swi_giant, >card_delayed_task, 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: r351872 - stable/12/usr.bin/jot
Author: bdrewery Date: Thu Sep 5 16:52:55 2019 New Revision: 351872 URL: https://svnweb.freebsd.org/changeset/base/351872 Log: MFC r346255: Fix 'jot -r 0 start end' to work. Relnotes: yes Modified: stable/12/usr.bin/jot/jot.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/jot/jot.c == --- stable/12/usr.bin/jot/jot.c Thu Sep 5 16:48:43 2019(r351871) +++ stable/12/usr.bin/jot/jot.c Thu Sep 5 16:52:55 2019(r351872) @@ -263,12 +263,15 @@ main(int argc, char **argv) mask = 0; break; case HAVE_REPS | HAVE_BEGIN | HAVE_ENDER: - if (reps == 0) - errx(1, "infinite sequences cannot be bounded"); - else if (reps == 1) - s = 0.0; - else - s = (ender - begin) / (reps - 1); + if (!randomize) { + if (reps == 0) + errx(1, "infinite sequences cannot " + "be bounded"); + else if (reps == 1) + s = 0.0; + else + s = (ender - begin) / (reps - 1); + } mask = 0; break; case HAVE_REPS | HAVE_BEGIN | HAVE_ENDER | HAVE_STEP: ___ 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: r351871 - stable/12/sys/dev/gpio
Author: ian Date: Thu Sep 5 16:48:43 2019 New Revision: 351871 URL: https://svnweb.freebsd.org/changeset/base/351871 Log: MFC r350988: Add PNP_INFO to the gpiopps driver. Modified: stable/12/sys/dev/gpio/gpiopps.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/gpio/gpiopps.c == --- stable/12/sys/dev/gpio/gpiopps.cThu Sep 5 16:46:16 2019 (r351870) +++ stable/12/sys/dev/gpio/gpiopps.cThu Sep 5 16:48:43 2019 (r351871) @@ -47,6 +47,7 @@ static struct ofw_compat_data compat_data[] = { {"pps-gpio",1}, {NULL, 0} }; +SIMPLEBUS_PNP_INFO(compat_data); #endif /* FDT */ static devclass_t pps_devclass; ___ 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: r351870 - stable/12/sys/arm/ti/am335x
Author: ian Date: Thu Sep 5 16:46:16 2019 New Revision: 351870 URL: https://svnweb.freebsd.org/changeset/base/351870 Log: MFC r350838, r350840-r350841, r350849, r350879 r350838: Switch the am335x_pmic driver to using iicdev_readfrom/writeto. PR: 239697 Submitted by: Chuhong Yuan r350840: Garbage collect the no-longer-necessary MAX_IIC_DATA_SIZE (there is not a buffer allocated at that fixed size anymore). r350841: When responding to an interrupt in the am335x_pmic driver, use a taskqueue thread to do the work that involves i2c IO, which sleeps while the IO is in progress. r350849: Remove use of intr_config_hook from the am335x_pmic and tda19988 drivers. Long ago this was needed, but now low-level i2c controller drivers cleverly defer attachment of the bus until interrupts are enabled (if they require interrupts to function), so that every i2c slave device doesn't have to. r350879: Revert r350841. I didn't realize that on this chip, reading the interrupt status register clears pending interrupts. By moving that code out of the interrupt handler into a taskqueue task, I effectively created an interrupt storm by returning from the handler with the interrupt source still active. We'll have to find a different solution for this driver's need to sleep in an ithread context. Modified: stable/12/sys/arm/ti/am335x/am335x_pmic.c stable/12/sys/arm/ti/am335x/tda19988.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/ti/am335x/am335x_pmic.c == --- stable/12/sys/arm/ti/am335x/am335x_pmic.c Thu Sep 5 16:37:10 2019 (r351869) +++ stable/12/sys/arm/ti/am335x/am335x_pmic.c Thu Sep 5 16:46:16 2019 (r351870) @@ -56,13 +56,9 @@ __FBSDID("$FreeBSD$"); #include "iicbus_if.h" -#define MAX_IIC_DATA_SIZE 2 - - struct am335x_pmic_softc { device_tsc_dev; uint32_tsc_addr; - struct intr_config_hook enum_hook; struct resource *sc_irq_res; void*sc_intrhand; }; @@ -79,30 +75,13 @@ static void am335x_pmic_shutdown(void *, int); static int am335x_pmic_read(device_t dev, uint8_t addr, uint8_t *data, uint8_t size) { - struct am335x_pmic_softc *sc = device_get_softc(dev); - struct iic_msg msg[] = { - { sc->sc_addr, IIC_M_WR, 1, }, - { sc->sc_addr, IIC_M_RD, size, data }, - }; - return (iicbus_transfer(dev, msg, 2)); + return (iicdev_readfrom(dev, addr, data, size, IIC_INTRWAIT)); } static int am335x_pmic_write(device_t dev, uint8_t address, uint8_t *data, uint8_t size) { - uint8_t buffer[MAX_IIC_DATA_SIZE + 1]; - struct am335x_pmic_softc *sc = device_get_softc(dev); - struct iic_msg msg[] = { - { sc->sc_addr, IIC_M_WR, size + 1, buffer }, - }; - - if (size > MAX_IIC_DATA_SIZE) - return (ENOMEM); - - buffer[0] = address; - memcpy(buffer + 1, data, size); - - return (iicbus_transfer(dev, msg, 1)); + return (iicdev_writeto(dev, address, data, size, IIC_INTRWAIT)); } static void @@ -220,10 +199,9 @@ am335x_pmic_setvo(device_t dev, uint8_t vo) } static void -am335x_pmic_start(void *xdev) +am335x_pmic_start(struct am335x_pmic_softc *sc) { - struct am335x_pmic_softc *sc; - device_t dev = (device_t)xdev; + device_t dev; struct tps65217_status_reg status_reg; struct tps65217_chipid_reg chipid_reg; uint8_t reg, vo; @@ -231,8 +209,7 @@ am335x_pmic_start(void *xdev) char pwr[4][11] = {"Battery", "USB", "AC", "USB and AC"}; int rv; - sc = device_get_softc(dev); - + dev = sc->sc_dev; am335x_pmic_read(dev, TPS65217_CHIPID_REG, (uint8_t *)_reg, 1); switch (chipid_reg.chip) { case TPS65217A: @@ -275,8 +252,6 @@ am335x_pmic_start(void *xdev) EVENTHANDLER_REGISTER(shutdown_final, am335x_pmic_shutdown, dev, SHUTDOWN_PRI_LAST); - config_intrhook_disestablish(>enum_hook); - /* Unmask all interrupts and clear pending status */ reg = 0; am335x_pmic_write(dev, TPS65217_INT_REG, , 1); @@ -308,11 +283,7 @@ am335x_pmic_attach(device_t dev) /* return (ENXIO); */ } - sc->enum_hook.ich_func = am335x_pmic_start; - sc->enum_hook.ich_arg = dev; - - if (config_intrhook_establish(>enum_hook) != 0) - return (ENOMEM); + am335x_pmic_start(sc); return (0); } Modified: stable/12/sys/arm/ti/am335x/tda19988.c == --- stable/12/sys/arm/ti/am335x/tda19988.c Thu Sep 5 16:37:10 2019 (r351869) +++ stable/12/sys/arm/ti/am335x/tda19988.c Thu Sep 5 16:46:16 2019 (r351870) @@ -242,7
svn commit: r351869 - in stable/12: share/man/man4 sys/conf sys/dev/iicbus sys/modules/i2c sys/modules/i2c/ads111x
Author: ian Date: Thu Sep 5 16:37:10 2019 New Revision: 351869 URL: https://svnweb.freebsd.org/changeset/base/351869 Log: MFC r350591, r350971, r351724 r350591: Add a driver for Texas Instruments ADS101x/ADS111x i2c ADC chips. Instances of the device can be configured using hints or FDT data. Interfaces to reconfigure the chip and extract voltage measurements from it are available via sysctl(8). r350971: Fix the driver name in ads111x.4, and hook the manpage up to the build. The driver was originally written with the name ads1115, but at the last minute it got renamed to ads111x to reflect its support for many related chips, but I forgot to update the manpage to match the renaming before committing it all. r351724: Fix the name of the devicetree bindings document file cited in the manpage. Added: stable/12/share/man/man4/ads111x.4 - copied, changed from r350591, head/share/man/man4/ads111x.4 stable/12/sys/dev/iicbus/ads111x.c - copied unchanged from r350591, head/sys/dev/iicbus/ads111x.c stable/12/sys/modules/i2c/ads111x/ - copied from r350591, head/sys/modules/i2c/ads111x/ Modified: stable/12/share/man/man4/Makefile stable/12/sys/conf/NOTES stable/12/sys/conf/files stable/12/sys/modules/i2c/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/Makefile == --- stable/12/share/man/man4/Makefile Thu Sep 5 15:55:24 2019 (r351868) +++ stable/12/share/man/man4/Makefile Thu Sep 5 16:37:10 2019 (r351869) @@ -25,6 +25,7 @@ MAN= aac.4 \ adm6996fc.4 \ adv.4 \ adw.4 \ + ads111x.4 \ ae.4 \ ${_aesni.4} \ age.4 \ @@ -590,7 +591,13 @@ MAN= aac.4 \ xpt.4 \ zero.4 -MLINKS=ae.4 if_ae.4 +MLINKS=ads111x.4 ads1013.4 \ + ads111x.4 ads1014.4 \ + ads111x.4 ads1015.4 \ + ads111x.4 ads1113.4 \ + ads111x.4 ads1114.4 \ + ads111x.4 ads1115.4 +MLINKS+=ae.4 if_ae.4 MLINKS+=age.4 if_age.4 MLINKS+=agp.4 agpgart.4 MLINKS+=alc.4 if_alc.4 Copied and modified: stable/12/share/man/man4/ads111x.4 (from r350591, head/share/man/man4/ads111x.4) == --- head/share/man/man4/ads111x.4 Mon Aug 5 15:56:44 2019 (r350591, copy source) +++ stable/12/share/man/man4/ads111x.4 Thu Sep 5 16:37:10 2019 (r351869) @@ -24,25 +24,25 @@ .\" .\" $FreeBSD$ .\" -.Dd August 5, 2019 -.Dt ADS1115 4 +.Dd September 2, 2019 +.Dt ADS111x 4 .Os .Sh NAME -.Nm ads1115 +.Nm ads111x .Nd driver for ADS101x and ADS111x i2c analog to digital converters .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your kernel configuration file: .Bd -ragged -offset indent -.Cd "device ads1115" +.Cd "device ads111x" .Ed .Pp Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent -ads1115_load="YES" +ads111x_load="YES" .Ed .Sh DESCRIPTION The @@ -58,7 +58,7 @@ set via hints, FDT data, and .Xr Sysctl 8 provides access to the voltage measurements made by the device. Each time the -.Va dev.ads1115...voltage +.Va dev.ads111x...voltage variable is accessed for a given channel, the driver switches the chip's internal mux to choose the right input pins for that channel, directs it to make a single measurement, and returns the measured value @@ -106,16 +106,16 @@ All writeable variables may also be set as tunables. Channel numbers in these sysctl variables range from 0 through 7. .Bl -tag -width indent -.It Va dev.ads1115..config +.It Va dev.ads111x..config Provides access to the configuration register bits that control the alert pin configuration. Other bits which are controlled by the driver are masked out, and cannot be viewed or changed using this variable. -.It Va dev.ads1115..lo_thresh +.It Va dev.ads111x..lo_thresh Sets the low threshold for activating the alert pin. -.It Va dev.ads1115..hi_thresh +.It Va dev.ads111x..hi_thresh Sets the high threshold for activating the alert pin. -.It Va dev.ads1115...rate_index +.It Va dev.ads111x...rate_index Sets the sample rate for the channel. The device datasheet documents eight available sample rates, chosen by setting a value of 0 through 7 into the corresponding control @@ -126,7 +126,7 @@ measurement on the given channel. Because measurements are always made in single-shot mode, think of this variable as controlling the averaging time for a single sample; the time to make a measurement is 1 / samplerate. -.It Va dev.ads1115...gain_index +.It Va dev.ads111x...gain_index Sets the programmable gain amplifier for the channel on devices which have an internal amplifier. The device datasheet documents eight available gain values, chosen @@ -134,7 +134,7 @@ by
svn commit: r351868 - head/lib/lib80211
Author: adrian Date: Thu Sep 5 15:55:24 2019 New Revision: 351868 URL: https://svnweb.freebsd.org/changeset/base/351868 Log: [lib80211] add initial VHT (11ac) channel ranges for FCC. This is a simple set of VHT channels and flags for the FCC (US) regulatory domain. This needs to be researched and done for the rest of the regulatory domains, but this should at least unblock some more ath10k testing. Modified: head/lib/lib80211/regdomain.xml Modified: head/lib/lib80211/regdomain.xml == --- head/lib/lib80211/regdomain.xml Thu Sep 5 15:45:21 2019 (r351867) +++ head/lib/lib80211/regdomain.xml Thu Sep 5 15:55:24 2019 (r351868) @@ -111,6 +111,44 @@ IEEE80211_CHAN_HT40 + + + + 17 + IEEE80211_CHAN_HT20 + IEEE80211_CHAN_VHT20 + + + + 17 + IEEE80211_CHAN_HT40 + IEEE80211_CHAN_VHT40 + + + + 17 + IEEE80211_CHAN_HT40 + IEEE80211_CHAN_VHT80 + + + + 17 + IEEE80211_CHAN_HT20 + IEEE80211_CHAN_VHT20 + + + + 17 + IEEE80211_CHAN_HT40 + IEEE80211_CHAN_VHT40 + + + + 17 + IEEE80211_CHAN_HT40 + IEEE80211_CHAN_VHT80 + + @@ -1735,6 +1773,21 @@ 20 20 IEEE80211_CHAN_A + + 5180 5240 + 20 20 + IEEE80211_CHAN_A + + + 5180 5240 + 40 20 + IEEE80211_CHAN_A + + + 5180 5240 + 80 20 + IEEE80211_CHAN_A + 5180 5240 40 20 @@ -1823,6 +1876,21 @@ 5745 5805 20 20 + IEEE80211_CHAN_A + + + 5745 5805 + 20 20 + IEEE80211_CHAN_A + + + 5745 5805 + 40 20 + IEEE80211_CHAN_A + + + 5745 5805 + 80 20 IEEE80211_CHAN_A ___ 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: r351867 - head/sys/dev/pci
Author: emaste Date: Thu Sep 5 15:45:21 2019 New Revision: 351867 URL: https://svnweb.freebsd.org/changeset/base/351867 Log: pcie: return an error if a matching resource is not found Submitted by: markj Reviewed by: manu Event:vBSDCon FreeBSD hackathon Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D20884 Modified: head/sys/dev/pci/pci_host_generic.c Modified: head/sys/dev/pci/pci_host_generic.c == --- head/sys/dev/pci/pci_host_generic.c Thu Sep 5 15:35:57 2019 (r351866) +++ head/sys/dev/pci/pci_host_generic.c Thu Sep 5 15:45:21 2019 (r351867) @@ -380,7 +380,7 @@ generic_pcie_activate_resource(device_t dev, device_t device_printf(dev, "Failed to activate %s resource\n", type == SYS_RES_IOPORT ? "IOPORT" : "MEMORY"); - res = 0; + res = ENXIO; } break; case SYS_RES_IRQ: ___ 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: r351866 - head/usr.bin/patch/tests
Author: kevans Date: Thu Sep 5 15:35:57 2019 New Revision: 351866 URL: https://svnweb.freebsd.org/changeset/base/351866 Log: patch(1): fix the file removal test, strengthen it a bit To remain compatible with GNU patch, we should ensure that once we're removing empty files after a reversed /dev/null patch we don't remove files that have been modified. GNU patch leaves these intact and just reverses the hunk that created the file, effectively implying --remove-empty-files for reversed /dev/null patches. Modified: head/usr.bin/patch/tests/unified_patch_test.sh Modified: head/usr.bin/patch/tests/unified_patch_test.sh == --- head/usr.bin/patch/tests/unified_patch_test.sh Thu Sep 5 15:06:30 2019(r351865) +++ head/usr.bin/patch/tests/unified_patch_test.sh Thu Sep 5 15:35:57 2019(r351866) @@ -102,7 +102,8 @@ file_creation_body() # commits. If a file is created by a diff, patch(1) will happily duplicate the # contents as many times as you apply the diff. It should instead detect that # a source of /dev/null creates the file, so it shouldn't exist. Furthermore, -# the reverse of creation is deletion -- hence the next test. +# the reverse of creation is deletion -- hence the next test, which ensures that +# the file is removed if it's empty once the patch is reversed. atf_test_case file_nodupe file_nodupe_body() { @@ -126,8 +127,18 @@ file_removal_body() echo "x" > foo diff -u /dev/null foo > foo.diff + # Check that the file is removed completely if it was sourced from + # /dev/null atf_check -x "patch -Rs < foo.diff" - atf_check -s not-exit:0 -o ignore stat foo + atf_check -s not-exit:0 -e ignore stat foo + + # But if it had been modified, we'll only remove the portion that the + # patch would have created. This makes us compatible with GNU patch's + # behavior, at least. Whether that is the sane action or not is a + # question for further study, and then this comment may be removed. + printf "x\ny\n" > foo + atf_check -x "patch -Rs < foo.diff" + atf_check -o inline:"y\n" cat foo } atf_init_test_cases() ___ 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: r351865 - head/stand/ficl/softwords
Author: tsoome Date: Thu Sep 5 15:06:30 2019 New Revision: 351865 URL: https://svnweb.freebsd.org/changeset/base/351865 Log: ficl: add xemit word While emit will output one byte on screen, the xemit will output xchar. See: http://forth-standard.org/standard/xchar/XEMIT Modified: head/stand/ficl/softwords/softcore.fr Modified: head/stand/ficl/softwords/softcore.fr == --- head/stand/ficl/softwords/softcore.fr Thu Sep 5 15:01:24 2019 (r351864) +++ head/stand/ficl/softwords/softcore.fr Thu Sep 5 15:06:30 2019 (r351865) @@ -199,6 +199,14 @@ set-current \ stop hiding words a-addr 0 b-addr b-u strcat ; +: xemit ( xchar -- ) + dup 0x80 u< if emit exit then \ special case ASCII + 0 swap 0x3F + begin 2dup u> while + 2/ >r dup 0x3F and 0x80 or swap 6 rshift r> + repeat 0x7F xor 2* or + begin dup 0x80 u< 0= while emit repeat drop + ; previous \ lose hidden words from search order ___ 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: r351864 - stable/11/usr.bin/fortune/datfiles
Author: emaste Date: Thu Sep 5 15:01:24 2019 New Revision: 351864 URL: https://svnweb.freebsd.org/changeset/base/351864 Log: fortune: correct typo in Merrill Markoe's last name Direct commit to stable/11 as this file has been removed in later versions. Modified: stable/11/usr.bin/fortune/datfiles/fortunes Modified: stable/11/usr.bin/fortune/datfiles/fortunes == --- stable/11/usr.bin/fortune/datfiles/fortunes Thu Sep 5 14:52:22 2019 (r351863) +++ stable/11/usr.bin/fortune/datfiles/fortunes Thu Sep 5 15:01:24 2019 (r351864) @@ -28562,7 +28562,7 @@ she would like you to order it so she can pick at it w does not want you to call attention to this by saying, "If you wanted a dessert, why didn't you order one?" You must understand, she has the dessert she wants. The dessert she wants is contained within yours. - -- Merrill Marcoe, "An Insider's Guide to the American Woman" + -- Merrill Markoe, "An Insider's Guide to the American Woman" % It is not that polar co-ordinates are complicated, it is simply that Cartesian co-ordinates are simpler than they have a right to be. ___ 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: r351863 - in head: libexec/rc share/man/man8
Author: 0mp (ports committer) Date: Thu Sep 5 14:52:22 2019 New Revision: 351863 URL: https://svnweb.freebsd.org/changeset/base/351863 Log: rc: Honor ${name}_env when a custom *_cmd is defined (e.g., start_cmd) A user may set ${name}_env variable in rc.conf(5) in order to set additional environment variables for a service command. Unfortunately, at the moment this variable is only honored when the command is specified via the command variable. Those additional environment variables coming from ${name}_env are never set if the service is started via the ${rc_arg}_cmd variable (for example start_cmd). PR: 239692 Reviewed by: bcr, jilles Approved by: src (jilles) Differential Revision:https://reviews.freebsd.org/D21228 Modified: head/libexec/rc/rc.subr head/share/man/man8/rc.subr.8 Modified: head/libexec/rc/rc.subr == --- head/libexec/rc/rc.subr Thu Sep 5 14:19:06 2019(r351862) +++ head/libexec/rc/rc.subr Thu Sep 5 14:52:22 2019(r351863) @@ -1036,6 +1036,9 @@ run_rc_command() _postcmd=\$${rc_arg}_postcmd if [ -n "$_cmd" ]; then + if [ -n "$_env" ]; then + eval "export -- $_env" + fi _run_rc_precmd || return 1 _run_rc_doit "$_cmd $rc_extra_args" || return 1 _run_rc_postcmd Modified: head/share/man/man8/rc.subr.8 == --- head/share/man/man8/rc.subr.8 Thu Sep 5 14:19:06 2019 (r351862) +++ head/share/man/man8/rc.subr.8 Thu Sep 5 14:52:22 2019 (r351863) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 5, 2019 +.Dd September 5, 2019 .Dt RC.SUBR 8 .Os .Sh NAME @@ -559,9 +559,19 @@ is mounted. A list of environment variables to run .Va command with. -This will be passed as arguments to the +Those variables will be passed as arguments to the .Xr env 1 -utility. +utility unless +.Ar argument Ns Va _cmd +is defined. +In that case the contents of +.Va ${name}_env +will be exported via the +.Xr export 1 +builtin of +.Xr sh 1 , +which puts some limitations on the names of variables +(e.g., a variable name may not start with a digit). .It Va ${name}_env_file A file to source for environmental variables to run .Va command ___ 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: r351862 - in head/sbin/pfctl/tests: . files
Author: manu Date: Thu Sep 5 14:19:06 2019 New Revision: 351862 URL: https://svnweb.freebsd.org/changeset/base/351862 Log: pkgbase: pfctl: tests: Put tests files in the FreeBSD-tests package Reviewed by: kp, gjb Differential Revision:https://reviews.freebsd.org/D21521 Modified: head/sbin/pfctl/tests/Makefile head/sbin/pfctl/tests/files/Makefile Modified: head/sbin/pfctl/tests/Makefile == --- head/sbin/pfctl/tests/Makefile Thu Sep 5 14:18:13 2019 (r351861) +++ head/sbin/pfctl/tests/Makefile Thu Sep 5 14:19:06 2019 (r351862) @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE= tests + ATF_TESTS_SH= pfctl_test \ macro Modified: head/sbin/pfctl/tests/files/Makefile == --- head/sbin/pfctl/tests/files/MakefileThu Sep 5 14:18:13 2019 (r351861) +++ head/sbin/pfctl/tests/files/MakefileThu Sep 5 14:19:06 2019 (r351862) @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE= tests + TESTSDIR= ${TESTSBASE}/sbin/pfctl/files BINDIR=${TESTSDIR} ___ 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: r351861 - head/share/mk
Author: manu Date: Thu Sep 5 14:18:13 2019 New Revision: 351861 URL: https://svnweb.freebsd.org/changeset/base/351861 Log: pkgbase: Handle FILES when no FILESGROUP isn't used bsd.files.mk only add the TAG when groups are used, fix this. Reviewed by: gjb Differential Revision:https://reviews.freebsd.org/D21520 Modified: head/share/mk/bsd.files.mk Modified: head/share/mk/bsd.files.mk == --- head/share/mk/bsd.files.mk Thu Sep 5 14:17:28 2019(r351860) +++ head/share/mk/bsd.files.mk Thu Sep 5 14:18:13 2019(r351861) @@ -38,6 +38,10 @@ ${group}MODE?= ${SHAREMODE} ${group}DIR?= BINDIR STAGE_SETS+= ${group:C,[/*],_,g} +.if ${group} == "FILES" +FILESPACKAGE= ${PACKAGE} +.endif + .if defined(NO_ROOT) .if !defined(${group}TAGS) || ! ${${group}TAGS:Mpackage=*} ${group}TAGS+= package=${${group}PACKAGE:Uutilities} ___ 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: r351860 - head/share/mk
Author: manu Date: Thu Sep 5 14:17:28 2019 New Revision: 351860 URL: https://svnweb.freebsd.org/changeset/base/351860 Log: pkgbase: Add tag for LIBSYMLINK case Otherwised the files aren't packaged. Reviewed by: bapt, gjb Differential Revision:https://reviews.freebsd.org/D21508 Modified: head/share/mk/bsd.lib.mk Modified: head/share/mk/bsd.lib.mk == --- head/share/mk/bsd.lib.mkThu Sep 5 14:16:39 2019(r351859) +++ head/share/mk/bsd.lib.mkThu Sep 5 14:17:28 2019(r351860) @@ -448,7 +448,7 @@ _libinstall: ${_INSTALLFLAGS} ${SHLIB_LINK:R}.ld \ ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} .for _SHLIB_LINK_LINK in ${SHLIB_LDSCRIPT_LINKS} - ${INSTALL_LIBSYMLINK} ${SHLIB_LINK} ${DESTDIR}${_LIBDIR}/${_SHLIB_LINK_LINK} + ${INSTALL_LIBSYMLINK} ${TAG_ARGS} ${SHLIB_LINK} ${DESTDIR}${_LIBDIR}/${_SHLIB_LINK_LINK} .endfor .else .if ${_SHLIBDIR} == ${_LIBDIR} ___ 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: r351859 - head/share/mk
Author: manu Date: Thu Sep 5 14:16:39 2019 New Revision: 351859 URL: https://svnweb.freebsd.org/changeset/base/351859 Log: pkgbase: Add tags for includes in bsd.incs.mk Otherwise the files aren't packaged. Reviewed by: bapt, gjb Differential Revision:https://reviews.freebsd.org/D21507 Modified: head/share/mk/bsd.incs.mk Modified: head/share/mk/bsd.incs.mk == --- head/share/mk/bsd.incs.mk Thu Sep 5 14:15:47 2019(r351858) +++ head/share/mk/bsd.incs.mk Thu Sep 5 14:16:39 2019(r351859) @@ -60,7 +60,7 @@ stage_includes: stage_as.${header:T} installincludes: _${group}INS_${header:T} _${group}INS_${header:T}: ${header} - ${INSTALL} -C -o ${${group}OWN_${.ALLSRC:T}} \ + ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -C -o ${${group}OWN_${.ALLSRC:T}} \ -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ ${.ALLSRC} \ ${DESTDIR}${${group}DIR_${.ALLSRC:T}}/${${group}NAME_${.ALLSRC:T}} ___ 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: r351858 - in head: bin/uuidgen lib/libalias/libalias lib/libauditd lib/libbe lib/libcalendar lib/libcapsicum lib/libcom_err lib/libdevctl lib/libdevinfo lib/libdevstat lib/libfetch lib/...
Author: manu Date: Thu Sep 5 14:15:47 2019 New Revision: 351858 URL: https://svnweb.freebsd.org/changeset/base/351858 Log: pkgbase: Create a FreeBSD-utilities package and make it the default one The default package use to be FreeBSD-runtime but it should only contain binaries and libs enough to boot to single user and repair the system, it is also very handy to have a package that can be tranform to a small mfsroot. So create a new package named FreeBSD-utilities and make it the default one. Also move a few binaries and lib into this package when it make sense. Reviewed by: bapt, gjb Differential Revision:https://reviews.freebsd.org/D21506 Modified: head/bin/uuidgen/Makefile head/lib/libalias/libalias/Makefile head/lib/libauditd/Makefile head/lib/libbe/Makefile head/lib/libcalendar/Makefile head/lib/libcapsicum/Makefile head/lib/libcom_err/Makefile head/lib/libdevctl/Makefile head/lib/libdevinfo/Makefile head/lib/libdevstat/Makefile head/lib/libfetch/Makefile head/lib/libgpio/Makefile head/lib/libgssapi/Makefile head/lib/libmemstat/Makefile head/lib/libmp/Makefile head/lib/libmt/Makefile head/lib/libnetgraph/Makefile head/lib/libngatm/Makefile head/lib/libpcap/Makefile head/lib/libpjdlog/Makefile head/lib/libpmc/Makefile head/lib/libproc/Makefile head/lib/libprocstat/Makefile head/lib/libradius/Makefile head/lib/librpcsvc/Makefile head/lib/librt/Makefile head/lib/librtld_db/Makefile head/lib/libsysdecode/Makefile head/lib/libtacplus/Makefile head/lib/libugidfw/Makefile head/lib/libulog/Makefile head/lib/libusb/Makefile head/lib/libusbhid/Makefile head/lib/libwrap/Makefile head/lib/libypclnt/Makefile head/release/packages/Makefile.package head/sbin/devd/Makefile head/sbin/nfsiod/Makefile head/sbin/nos-tun/Makefile head/sbin/setkey/Makefile head/share/mk/bsd.confs.mk head/share/mk/bsd.dirs.mk head/share/mk/bsd.doc.mk head/share/mk/bsd.files.mk head/share/mk/bsd.incs.mk head/share/mk/bsd.lib.mk head/share/mk/bsd.prog.mk Modified: head/bin/uuidgen/Makefile == --- head/bin/uuidgen/Makefile Thu Sep 5 14:14:47 2019(r351857) +++ head/bin/uuidgen/Makefile Thu Sep 5 14:15:47 2019(r351858) @@ -1,6 +1,5 @@ # $FreeBSD$ -PACKAGE=runtime PROG= uuidgen .include Modified: head/lib/libalias/libalias/Makefile == --- head/lib/libalias/libalias/Makefile Thu Sep 5 14:14:47 2019 (r351857) +++ head/lib/libalias/libalias/Makefile Thu Sep 5 14:15:47 2019 (r351858) @@ -3,7 +3,6 @@ .PATH: ${SRCTOP}/sys/netinet/libalias CONFS= libalias.conf -PACKAGE=lib${LIB} LIB= alias SHLIBDIR?= /lib SHLIB_MAJOR= 7 Modified: head/lib/libauditd/Makefile == --- head/lib/libauditd/Makefile Thu Sep 5 14:14:47 2019(r351857) +++ head/lib/libauditd/Makefile Thu Sep 5 14:15:47 2019(r351858) @@ -2,7 +2,6 @@ # $FreeBSD$ # -PACKAGE=lib${LIB} OPENBSMDIR=${SRCTOP}/contrib/openbsm _LIBAUDITDDIR= ${OPENBSMDIR}/libauditd _LIBBSMDIR=${OPENBSMDIR}/libbsm Modified: head/lib/libbe/Makefile == --- head/lib/libbe/Makefile Thu Sep 5 14:14:47 2019(r351857) +++ head/lib/libbe/Makefile Thu Sep 5 14:15:47 2019(r351858) @@ -4,7 +4,6 @@ SHLIBDIR?= /lib .include -PACKAGE= lib${LIB} LIB= be SHLIB_MAJOR= 1 SHLIB_MINOR= 0 Modified: head/lib/libcalendar/Makefile == --- head/lib/libcalendar/Makefile Thu Sep 5 14:14:47 2019 (r351857) +++ head/lib/libcalendar/Makefile Thu Sep 5 14:15:47 2019 (r351858) @@ -1,6 +1,5 @@ # $FreeBSD$ -PACKAGE= lib${LIB} LIB= calendar SRCS= calendar.c easter.c Modified: head/lib/libcapsicum/Makefile == --- head/lib/libcapsicum/Makefile Thu Sep 5 14:14:47 2019 (r351857) +++ head/lib/libcapsicum/Makefile Thu Sep 5 14:15:47 2019 (r351858) @@ -1,7 +1,5 @@ # $FreeBSD$ -PACKAGE=lib${LIB} - INCS= capsicum_helpers.h MAN+= capsicum_helpers.3 Modified: head/lib/libcom_err/Makefile == --- head/lib/libcom_err/MakefileThu Sep 5 14:14:47 2019 (r351857) +++ head/lib/libcom_err/MakefileThu Sep 5 14:15:47 2019 (r351858) @@ -1,6 +1,5 @@ # $FreeBSD$ -PACKAGE=lib${LIB} LIB= com_err SRCS= com_err.c error.c INCS= ${COM_ERRDIR}/com_err.h ${COM_ERRDIR}/com_right.h Modified: head/lib/libdevctl/Makefile
svn commit: r351857 - head/include
Author: manu Date: Thu Sep 5 14:14:47 2019 New Revision: 351857 URL: https://svnweb.freebsd.org/changeset/base/351857 Log: pkgbase: Add TAG for evdev and veriexec headers Reviewed by: bapt Differential Revision:https://reviews.freebsd.org/D21505 Modified: head/include/Makefile Modified: head/include/Makefile == --- head/include/Makefile Thu Sep 5 14:14:07 2019(r351856) +++ head/include/Makefile Thu Sep 5 14:14:47 2019(r351857) @@ -175,11 +175,11 @@ copies: .PHONY .META ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 ioctl_*.h \ ${SDESTDIR}${INCLUDEDIR}/dev/bktr cd ${SRCTOP}/sys/dev/evdev; \ - ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 input.h \ + ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 input.h \ ${SDESTDIR}${INCLUDEDIR}/dev/evdev; \ - ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 input-event-codes.h \ + ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 input-event-codes.h \ ${SDESTDIR}${INCLUDEDIR}/dev/evdev; \ - ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 uinput.h \ + ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 uinput.h \ ${SDESTDIR}${INCLUDEDIR}/dev/evdev cd ${SRCTOP}/sys/dev/hyperv/include; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 hyperv.h \ @@ -191,7 +191,7 @@ copies: .PHONY .META ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 pcireg.h \ ${SDESTDIR}${INCLUDEDIR}/dev/pci cd ${SRCTOP}/sys/dev/veriexec; \ - ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 veriexec_ioctl.h \ + ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 veriexec_ioctl.h \ ${SDESTDIR}${INCLUDEDIR}/dev/veriexec cd ${SRCTOP}/sys/fs/cd9660/; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.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: r351856 - head/tests/sys/common
Author: manu Date: Thu Sep 5 14:14:07 2019 New Revision: 351856 URL: https://svnweb.freebsd.org/changeset/base/351856 Log: pkgbase: Put the sys/common test into the tests package Every other test is there so do the same for those. Reviewed by: bapt, gjb Differential Revision:https://reviews.freebsd.org/D21504 Modified: head/tests/sys/common/Makefile Modified: head/tests/sys/common/Makefile == --- head/tests/sys/common/Makefile Thu Sep 5 14:13:08 2019 (r351855) +++ head/tests/sys/common/Makefile Thu Sep 5 14:14:07 2019 (r351856) @@ -1,6 +1,6 @@ # $FreeBSD$ -PACKAGE= common +PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/common ${PACKAGE}FILES+= vnet.subr ___ 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: r351855 - in head: lib/libcam lib/libcrypt lib/libelf lib/libgeom lib/libipsec lib/libjail lib/libkiconv lib/libkvm lib/libmd lib/libnv lib/libpam/libpam lib/libsbuf lib/libufs lib/libu...
Author: manu Date: Thu Sep 5 14:13:08 2019 New Revision: 351855 URL: https://svnweb.freebsd.org/changeset/base/351855 Log: pkgbase: Put a lot of binaries and lib in FreeBSD-runtime All of them are needed to be able to boot to single user and be able to repair a existing FreeBSD installation so put them directly into FreeBSD-runtime. Reviewed by:bapt, gjb Differential Revision: https://reviews.freebsd.org/D21503 Modified: head/lib/libcam/Makefile head/lib/libcrypt/Makefile head/lib/libelf/Makefile head/lib/libgeom/Makefile head/lib/libipsec/Makefile head/lib/libjail/Makefile head/lib/libkiconv/Makefile head/lib/libkvm/Makefile head/lib/libmd/Makefile head/lib/libnv/Makefile head/lib/libpam/libpam/Makefile head/lib/libsbuf/Makefile head/lib/libufs/Makefile head/lib/libutil/Makefile head/lib/libxo/Makefile head/lib/libz/Makefile head/secure/lib/libcrypto/Makefile head/share/termcap/Makefile head/usr.bin/du/Makefile head/usr.bin/fsync/Makefile head/usr.bin/passwd/Makefile head/usr.bin/sed/Makefile head/usr.bin/tar/Makefile head/usr.bin/uname/Makefile head/usr.bin/what/Makefile head/usr.sbin/ip6addrctl/Makefile head/usr.sbin/kldxref/Makefile head/usr.sbin/pwd_mkdb/Makefile head/usr.sbin/services_mkdb/Makefile head/usr.sbin/traceroute/Makefile head/usr.sbin/traceroute6/Makefile Modified: head/lib/libcam/Makefile == --- head/lib/libcam/MakefileThu Sep 5 14:11:16 2019(r351854) +++ head/lib/libcam/MakefileThu Sep 5 14:13:08 2019(r351855) @@ -1,6 +1,7 @@ # $FreeBSD$ -PACKAGE= lib${LIB} +PACKAGE= runtime + LIB= cam SHLIBDIR?= /lib SRCS= camlib.c scsi_cmdparse.c scsi_all.c scsi_da.c scsi_sa.c cam.c \ Modified: head/lib/libcrypt/Makefile == --- head/lib/libcrypt/Makefile Thu Sep 5 14:11:16 2019(r351854) +++ head/lib/libcrypt/Makefile Thu Sep 5 14:13:08 2019(r351855) @@ -2,10 +2,11 @@ # $FreeBSD$ # -PACKAGE=lib${LIB} SHLIBDIR?= /lib .include + +PACKAGE= runtime SHLIB_MAJOR= 5 LIB= crypt Modified: head/lib/libelf/Makefile == --- head/lib/libelf/MakefileThu Sep 5 14:11:16 2019(r351854) +++ head/lib/libelf/MakefileThu Sep 5 14:13:08 2019(r351855) @@ -1,6 +1,5 @@ # $FreeBSD$ -PACKAGE=lib${LIB} SHLIBDIR?= /lib .include @@ -10,6 +9,7 @@ SRCDIR=${ELFTCDIR}/libelf .PATH: ${SRCDIR} +PACKAGE= runtime LIB= elf SRCS= elf.c \ Modified: head/lib/libgeom/Makefile == --- head/lib/libgeom/Makefile Thu Sep 5 14:11:16 2019(r351854) +++ head/lib/libgeom/Makefile Thu Sep 5 14:13:08 2019(r351855) @@ -1,6 +1,7 @@ # $FreeBSD$ -PACKAGE=lib${LIB} +PACKAGE= runtime + LIB= geom SHLIBDIR?= /lib SRCS+= geom_getxml.c Modified: head/lib/libipsec/Makefile == --- head/lib/libipsec/Makefile Thu Sep 5 14:11:16 2019(r351854) +++ head/lib/libipsec/Makefile Thu Sep 5 14:13:08 2019(r351855) @@ -27,12 +27,12 @@ # # $FreeBSD$ -PACKAGE=lib${LIB} SHLIBDIR?= /lib .include LIB= ipsec +PACKAGE= runtime SHLIB_MAJOR= 4 CFLAGS+=-I. -I${.CURDIR} CFLAGS+=-DIPSEC_DEBUG -DIPSEC Modified: head/lib/libjail/Makefile == --- head/lib/libjail/Makefile Thu Sep 5 14:11:16 2019(r351854) +++ head/lib/libjail/Makefile Thu Sep 5 14:13:08 2019(r351855) @@ -1,13 +1,11 @@ # $FreeBSD$ -PACKAGE=lib${LIB} +PACKAGE= runtime LIB= jail SHLIBDIR?= /lib SHLIB_MAJOR= 1 SRCS= jail.c jail_getid.c INCS= jail.h - -PACKAGE=jail MAN= jail.3 Modified: head/lib/libkiconv/Makefile == --- head/lib/libkiconv/Makefile Thu Sep 5 14:11:16 2019(r351854) +++ head/lib/libkiconv/Makefile Thu Sep 5 14:13:08 2019(r351855) @@ -4,7 +4,7 @@ SHLIBDIR?= /lib .include -PACKAGE=lib${LIB} +PACKAGE= runtime LIB= kiconv SRCS= kiconv_sysctl.c xlat16_iconv.c xlat16_sysctl.c SRCS+= quirks.c Modified: head/lib/libkvm/Makefile == --- head/lib/libkvm/MakefileThu Sep 5 14:11:16 2019(r351854) +++ head/lib/libkvm/MakefileThu Sep 5 14:13:08 2019(r351855) @@ -1,9 +1,9 @@ # @(#)Makefile8.1 (Berkeley) 6/4/93 # $FreeBSD$ -PACKAGE=lib${LIB} LIB= kvm +PACKAGE= runtime SHLIBDIR?= /lib
svn commit: r351854 - head/lib/libbluetooth
Author: manu Date: Thu Sep 5 14:11:16 2019 New Revision: 351854 URL: https://svnweb.freebsd.org/changeset/base/351854 Log: pkgbase: Put libbluetooth in the bluetooth package It make sense to have everything bluetooth related in the same package. Reviewed by: bapt, gjb Differential Revision:https://reviews.freebsd.org/D21502 Modified: head/lib/libbluetooth/Makefile Modified: head/lib/libbluetooth/Makefile == --- head/lib/libbluetooth/Makefile Thu Sep 5 14:10:26 2019 (r351853) +++ head/lib/libbluetooth/Makefile Thu Sep 5 14:11:16 2019 (r351854) @@ -1,7 +1,7 @@ # $Id: Makefile,v 1.5 2003/07/22 18:38:04 max Exp $ # $FreeBSD$ -PACKAGE= lib${LIB} +PACKAGE= bluetooth CONFS= hosts protocols CONFSDIR= /etc/bluetooth CONFSMODE_protocols= 444 ___ 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: r351853 - in head/lib/libcasper: libcasper services/cap_dns services/cap_fileargs services/cap_grp services/cap_pwd services/cap_sysctl services/cap_syslog
Author: manu Date: Thu Sep 5 14:10:26 2019 New Revision: 351853 URL: https://svnweb.freebsd.org/changeset/base/351853 Log: pkgbase: Move libcap_ to FreeBSD-runtime A lot of binaries present in FreeBSD-runtime depend on it so move the libs there. Reviewed by: bapt, gjb Differential Revision:https://reviews.freebsd.org/D21501 Modified: head/lib/libcasper/libcasper/Makefile head/lib/libcasper/services/cap_dns/Makefile head/lib/libcasper/services/cap_fileargs/Makefile head/lib/libcasper/services/cap_grp/Makefile head/lib/libcasper/services/cap_pwd/Makefile head/lib/libcasper/services/cap_sysctl/Makefile head/lib/libcasper/services/cap_syslog/Makefile Modified: head/lib/libcasper/libcasper/Makefile == --- head/lib/libcasper/libcasper/Makefile Thu Sep 5 14:09:33 2019 (r351852) +++ head/lib/libcasper/libcasper/Makefile Thu Sep 5 14:10:26 2019 (r351853) @@ -1,10 +1,10 @@ # $FreeBSD$ +PACKAGE= runtime + SHLIBDIR?= /lib .include - -PACKAGE=casper .if ${MK_CASPER} != "no" SHLIB= casper Modified: head/lib/libcasper/services/cap_dns/Makefile == --- head/lib/libcasper/services/cap_dns/MakefileThu Sep 5 14:09:33 2019(r351852) +++ head/lib/libcasper/services/cap_dns/MakefileThu Sep 5 14:10:26 2019(r351853) @@ -4,7 +4,7 @@ SHLIBDIR?= /lib/casper .include -PACKAGE=libcasper +PACKAGE= runtime SHLIB_MAJOR= 2 INCSDIR?= ${INCLUDEDIR}/casper Modified: head/lib/libcasper/services/cap_fileargs/Makefile == --- head/lib/libcasper/services/cap_fileargs/Makefile Thu Sep 5 14:09:33 2019(r351852) +++ head/lib/libcasper/services/cap_fileargs/Makefile Thu Sep 5 14:10:26 2019(r351853) @@ -4,7 +4,7 @@ SHLIBDIR?= /lib/casper .include -PACKAGE=libcasper +PACKAGE= runtime SHLIB_MAJOR= 1 INCSDIR?= ${INCLUDEDIR}/casper Modified: head/lib/libcasper/services/cap_grp/Makefile == --- head/lib/libcasper/services/cap_grp/MakefileThu Sep 5 14:09:33 2019(r351852) +++ head/lib/libcasper/services/cap_grp/MakefileThu Sep 5 14:10:26 2019(r351853) @@ -4,7 +4,7 @@ SHLIBDIR?= /lib/casper .include -PACKAGE=libcasper +PACKAGE= runtime SHLIB_MAJOR= 1 INCSDIR?= ${INCLUDEDIR}/casper Modified: head/lib/libcasper/services/cap_pwd/Makefile == --- head/lib/libcasper/services/cap_pwd/MakefileThu Sep 5 14:09:33 2019(r351852) +++ head/lib/libcasper/services/cap_pwd/MakefileThu Sep 5 14:10:26 2019(r351853) @@ -4,7 +4,7 @@ SHLIBDIR?= /lib/casper .include -PACKAGE=libcasper +PACKAGE= runtime SHLIB_MAJOR= 1 INCSDIR?= ${INCLUDEDIR}/casper Modified: head/lib/libcasper/services/cap_sysctl/Makefile == --- head/lib/libcasper/services/cap_sysctl/Makefile Thu Sep 5 14:09:33 2019(r351852) +++ head/lib/libcasper/services/cap_sysctl/Makefile Thu Sep 5 14:10:26 2019(r351853) @@ -4,7 +4,7 @@ SHLIBDIR?= /lib/casper .include -PACKAGE=libcasper +PACKAGE= runtime SHLIB_MAJOR= 2 INCSDIR?= ${INCLUDEDIR}/casper Modified: head/lib/libcasper/services/cap_syslog/Makefile == --- head/lib/libcasper/services/cap_syslog/Makefile Thu Sep 5 14:09:33 2019(r351852) +++ head/lib/libcasper/services/cap_syslog/Makefile Thu Sep 5 14:10:26 2019(r351853) @@ -4,7 +4,7 @@ SHLIBDIR?= /lib/casper .include -PACKAGE=libcasper +PACKAGE= runtime SHLIB_MAJOR= 1 INCSDIR?= ${INCLUDEDIR}/casper ___ 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: r351852 - head/lib/libc/gen
Author: manu Date: Thu Sep 5 14:09:33 2019 New Revision: 351852 URL: https://svnweb.freebsd.org/changeset/base/351852 Log: pkgbase: Tag passwd related file to be in FreeBSD-runtime package. Reviewed by: bapt, gjb Differential Revision:https://reviews.freebsd.org/D21500 Modified: head/lib/libc/gen/Makefile.inc Modified: head/lib/libc/gen/Makefile.inc == --- head/lib/libc/gen/Makefile.inc Thu Sep 5 14:08:45 2019 (r351851) +++ head/lib/libc/gen/Makefile.inc Thu Sep 5 14:09:33 2019 (r351852) @@ -6,6 +6,7 @@ CONFS+=group master.passwd shells CONFSMODE_master.passwd= 600 +CONFSPACKAGE= runtime SRCS+= __getosreldate.c \ __pthread_mutex_init_calloc_cb_stub.c \ ___ 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: r351851 - in head: libexec/rc libexec/rc/rc.d release/packages sbin/rcorder
Author: manu Date: Thu Sep 5 14:08:45 2019 New Revision: 351851 URL: https://svnweb.freebsd.org/changeset/base/351851 Log: pkgbase: Move rc scripts and related files to their own packages It doesn't need to be in runtime and might help people who want to experiment with other rc system or don't use one (like in small embedded mfsroot). Reviewed by: bapt, gjb Differential Revision:https://reviews.freebsd.org/D21499 Modified: head/libexec/rc/Makefile head/libexec/rc/rc.d/Makefile head/release/packages/Makefile.package head/sbin/rcorder/Makefile Modified: head/libexec/rc/Makefile == --- head/libexec/rc/MakefileThu Sep 5 14:07:49 2019(r351850) +++ head/libexec/rc/MakefileThu Sep 5 14:08:45 2019(r351851) @@ -5,6 +5,8 @@ CONFGROUPS=CONFETC CONFETCEXEC CONFETCDEFAULTS CONFETCDIR=/etc CONFETC= network.subr rc rc.initdiskless rc.subr rc.shutdown rc.bsdextended +CONFETCPACKAGE=rc + .if ${MK_IPFW} != "no" CONFETC+= rc.firewall .endif @@ -15,9 +17,10 @@ CONFETCMODE= 644 CONFETCEXEC= netstart pccard_ether rc.resume rc.suspend CONFETCEXECDIR=/etc CONFETCEXECMODE= 755 +CONFETCEXECPACKAGE=rc CONFETCDEFAULTSDIR=/etc/defaults CONFETCDEFAULTS= rc.conf -#PACKAGE=rc +CONFETCDEFAULTSPACKAGE=rc SUBDIR+= rc.d Modified: head/libexec/rc/rc.d/Makefile == --- head/libexec/rc/rc.d/Makefile Thu Sep 5 14:07:49 2019 (r351850) +++ head/libexec/rc/rc.d/Makefile Thu Sep 5 14:08:45 2019 (r351851) @@ -4,7 +4,7 @@ CONFDIR= /etc/rc.d CONFGROUPS=CONFS -#PACKAGE=rc +CONFSPACKAGE= rc CONFS= DAEMON \ FILESYSTEMS \ @@ -324,7 +324,6 @@ ZFS+= zfs ZFS+= zfsbe ZFS+= zfsd ZFS+= zvol -ZFSPACKAGE=zfs .endif .for fg in ${CONFGROUPS} Modified: head/release/packages/Makefile.package == --- head/release/packages/Makefile.package Thu Sep 5 14:07:49 2019 (r351850) +++ head/release/packages/Makefile.package Thu Sep 5 14:08:45 2019 (r351851) @@ -57,6 +57,8 @@ kernel_COMMENT= FreeBSD Kernel kernel_DESC= FreeBSD Kernel manuals_COMMENT= Manual Pages manuals_DESC= Manual Pages +rc_COMMENT=RC Scripts +rc_DESC= RC Scripts rcmds_COMMENT= Remote Command Utilities rcmds_DESC=Remote Command Utilities rescue_COMMENT=Rescue Utilities Modified: head/sbin/rcorder/Makefile == --- head/sbin/rcorder/Makefile Thu Sep 5 14:07:49 2019(r351850) +++ head/sbin/rcorder/Makefile Thu Sep 5 14:08:45 2019(r351851) @@ -1,7 +1,7 @@ # $NetBSD: Makefile,v 1.1 1999/11/23 05:28:20 mrg Exp $ # $FreeBSD$ -PACKAGE=runtime +PACKAGE=rc PROG= rcorder SRCS= ealloc.c hash.c rcorder.c MAN= rcorder.8 ___ 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: r351850 - in head/cddl: lib/libavl lib/libnvpair lib/libumem lib/libuutil lib/libzfs lib/libzfs_core sbin/zfs sbin/zpool
Author: manu Date: Thu Sep 5 14:07:49 2019 New Revision: 351850 URL: https://svnweb.freebsd.org/changeset/base/351850 Log: pkgbase: Force zfs(8) and zpool(8) to be in the runtime package Those commands are needed to repair a FreeBSD installation so add them to the runtime package Reviewed by: bapt, gjb Differential Revision:https://reviews.freebsd.org/D21498 Modified: head/cddl/lib/libavl/Makefile head/cddl/lib/libnvpair/Makefile head/cddl/lib/libumem/Makefile head/cddl/lib/libuutil/Makefile head/cddl/lib/libzfs/Makefile head/cddl/lib/libzfs_core/Makefile head/cddl/sbin/zfs/Makefile head/cddl/sbin/zpool/Makefile Modified: head/cddl/lib/libavl/Makefile == --- head/cddl/lib/libavl/Makefile Thu Sep 5 14:06:48 2019 (r351849) +++ head/cddl/lib/libavl/Makefile Thu Sep 5 14:07:49 2019 (r351850) @@ -2,6 +2,7 @@ .PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/avl +PACKAGE= runtime LIB= avl SRCS= avl.c WARNS?=3 Modified: head/cddl/lib/libnvpair/Makefile == --- head/cddl/lib/libnvpair/MakefileThu Sep 5 14:06:48 2019 (r351849) +++ head/cddl/lib/libnvpair/MakefileThu Sep 5 14:07:49 2019 (r351850) @@ -5,6 +5,7 @@ LIB= nvpair +PACKAGE= runtime INCS= libnvpair.h SRCS= libnvpair.c \ nvpair_alloc_system.c \ Modified: head/cddl/lib/libumem/Makefile == --- head/cddl/lib/libumem/Makefile Thu Sep 5 14:06:48 2019 (r351849) +++ head/cddl/lib/libumem/Makefile Thu Sep 5 14:07:49 2019 (r351850) @@ -2,6 +2,7 @@ .PATH: ${SRCTOP}/cddl/compat/opensolaris/lib/libumem +PACKAGE= runtime LIB= umem SRCS= umem.c WARNS?=3 Modified: head/cddl/lib/libuutil/Makefile == --- head/cddl/lib/libuutil/Makefile Thu Sep 5 14:06:48 2019 (r351849) +++ head/cddl/lib/libuutil/Makefile Thu Sep 5 14:07:49 2019 (r351850) @@ -3,6 +3,7 @@ .PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common .PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/avl +PACKAGE= runtime LIB= uutil SRCS= avl.c \ uu_alloc.c \ Modified: head/cddl/lib/libzfs/Makefile == --- head/cddl/lib/libzfs/Makefile Thu Sep 5 14:06:48 2019 (r351849) +++ head/cddl/lib/libzfs/Makefile Thu Sep 5 14:07:49 2019 (r351850) @@ -6,6 +6,7 @@ .PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common .PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libcmdutils/common +PACKAGE= runtime LIB= zfs LIBADD=md pthread umem util uutil m avl bsdxml geom nvpair z zfs_core SRCS= deviceid.c \ Modified: head/cddl/lib/libzfs_core/Makefile == --- head/cddl/lib/libzfs_core/Makefile Thu Sep 5 14:06:48 2019 (r351849) +++ head/cddl/lib/libzfs_core/Makefile Thu Sep 5 14:07:49 2019 (r351850) @@ -8,6 +8,7 @@ LIB= zfs_core LIBADD=nvpair +PACKAGE= runtime INCS= libzfs_core.h SRCS= libzfs_core.c \ Modified: head/cddl/sbin/zfs/Makefile == --- head/cddl/sbin/zfs/Makefile Thu Sep 5 14:06:48 2019(r351849) +++ head/cddl/sbin/zfs/Makefile Thu Sep 5 14:07:49 2019(r351850) @@ -2,6 +2,7 @@ .PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/zfs +PACKAGE= runtime PROG= zfs MAN= zfs.8 zfs-program.8 SRCS= zfs_main.c zfs_iter.c Modified: head/cddl/sbin/zpool/Makefile == --- head/cddl/sbin/zpool/Makefile Thu Sep 5 14:06:48 2019 (r351849) +++ head/cddl/sbin/zpool/Makefile Thu Sep 5 14:07:49 2019 (r351850) @@ -4,6 +4,7 @@ .PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/stat/common .PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs +PACKAGE= runtime PROG= zpool MAN= zpool.8 zpool-features.7 SRCS= zpool_main.c zpool_vdev.c zpool_iter.c zpool_util.c zfs_comutil.c ___ 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: r351849 - head/lib/lib80211
Author: manu Date: Thu Sep 5 14:06:48 2019 New Revision: 351849 URL: https://svnweb.freebsd.org/changeset/base/351849 Log: pkgbase: lib80211 is needed by ifconfig(8) so put it in FreeBSD-runtime Reviewed by: bapt, gjb Differential Revision:https://reviews.freebsd.org/D21497 Modified: head/lib/lib80211/Makefile Modified: head/lib/lib80211/Makefile == --- head/lib/lib80211/Makefile Thu Sep 5 14:06:01 2019(r351848) +++ head/lib/lib80211/Makefile Thu Sep 5 14:06:48 2019(r351849) @@ -1,7 +1,7 @@ # $FreeBSD$ +PACKAGE= runtime CONFS= regdomain.xml -PACKAGE=lib${LIB} LIB= 80211 SHLIBDIR?= /lib SHLIB_MAJOR= 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: r351848 - in head/release: packages scripts
Author: manu Date: Thu Sep 5 14:06:01 2019 New Revision: 351848 URL: https://svnweb.freebsd.org/changeset/base/351848 Log: pkgbase: Move the bootloader related files to a new FreeBSD-bootloader package Bootloader file isn't needed for jails so don't include it in FreeBSD-runtime. Reviewed by: bapt, delphij, gjb Differential Revision:https://reviews.freebsd.org/D21496 Modified: head/release/packages/Makefile.package head/release/scripts/mtree-to-plist.awk (contents, props changed) Modified: head/release/packages/Makefile.package == --- head/release/packages/Makefile.package Thu Sep 5 10:49:12 2019 (r351847) +++ head/release/packages/Makefile.package Thu Sep 5 14:06:01 2019 (r351848) @@ -20,6 +20,8 @@ binutils_COMMENT= Binutils binutils_DESC= Binutils bluetooth_COMMENT= Bluetooth Utilities bluetooth_DESC=Bluetooth Utilities +bootloader_COMMENT=Bootloader +bootloader_DESC= Bootloader and configuration files bsdinstall_COMMENT=BSDInstall Utilities bsdinstall_DESC= BSDInstall Utilities bsnmp_COMMENT= BSNMP Utilities Modified: head/release/scripts/mtree-to-plist.awk == --- head/release/scripts/mtree-to-plist.awk Thu Sep 5 10:49:12 2019 (r351847) +++ head/release/scripts/mtree-to-plist.awk Thu Sep 5 14:06:01 2019 (r351848) @@ -28,6 +28,9 @@ tags=tags""_kernconf } } + if ($1 ~ /^\/boot\//) { + tags="package=bootloader" + } if (length(tags) == 0) next if (tags ~ /package=/) { ___ 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: r351847 - head/sys/dev/sound/pcm
Author: hselasky Date: Thu Sep 5 10:49:12 2019 New Revision: 351847 URL: https://svnweb.freebsd.org/changeset/base/351847 Log: Decrease the default audio playback latency to a maximum of 21.3ms. This significantly improves the audio playback response time. Discussed with: mav@ MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/sound/pcm/channel.h Modified: head/sys/dev/sound/pcm/channel.h == --- head/sys/dev/sound/pcm/channel.hThu Sep 5 09:57:20 2019 (r351846) +++ head/sys/dev/sound/pcm/channel.hThu Sep 5 10:49:12 2019 (r351847) @@ -413,7 +413,7 @@ extern int report_soft_matrix; #define CHN_LATENCY_MIN0 #define CHN_LATENCY_MAX10 -#define CHN_LATENCY_DEFAULT5 +#defineCHN_LATENCY_DEFAULT 2 /* 21.3ms total buffering */ #define CHN_POLICY_MIN CHN_LATENCY_MIN #define CHN_POLICY_MAX CHN_LATENCY_MAX #define CHN_POLICY_DEFAULT CHN_LATENCY_DEFAULT ___ 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: r351846 - stable/12/usr.bin/top
Author: tijl Date: Thu Sep 5 09:57:20 2019 New Revision: 351846 URL: https://svnweb.freebsd.org/changeset/base/351846 Log: MFC r349957: Fix layout. -C needs to be styled as a flag here, not as a new list item. Modified: stable/12/usr.bin/top/top.1 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/top/top.1 == --- stable/12/usr.bin/top/top.1 Thu Sep 5 09:35:41 2019(r351845) +++ stable/12/usr.bin/top/top.1 Thu Sep 5 09:57:20 2019(r351846) @@ -51,7 +51,7 @@ By default top displays the weighted CPU percentage in .Xr ps 1 displays as CPU). Each time -.It Fl C +.Fl C flag is passed it toggles between \*(lqraw cpu\*(rq mode and \*(lqweighted cpu\*(rq mode, showing the \*(lqCPU\*(rq or the \*(lqWCPU\*(rq column respectively. ___ 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: r351845 - stable/11/usr.bin/usbhidctl
Author: hselasky Date: Thu Sep 5 09:35:41 2019 New Revision: 351845 URL: https://svnweb.freebsd.org/changeset/base/351845 Log: MFC r351167: Include item position in report descriptor dump in usbhidctl(1). Submitted by: Kevin Zheng PR: 239918 Modified: stable/11/usr.bin/usbhidctl/usbhid.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/usbhidctl/usbhid.c == --- stable/11/usr.bin/usbhidctl/usbhid.cThu Sep 5 09:35:06 2019 (r351844) +++ stable/11/usr.bin/usbhidctl/usbhid.cThu Sep 5 09:35:41 2019 (r351845) @@ -202,8 +202,8 @@ dumpitem(const char *label, struct hid_item *h) { if ((h->flags & HIO_CONST) && !verbose) return; - printf("%s rid=%d size=%d count=%d page=%s usage=%s%s%s", label, - h->report_ID, h->report_size, h->report_count, + printf("%s rid=%d pos=%d size=%d count=%d page=%s usage=%s%s%s", label, + h->report_ID, h->pos, h->report_size, h->report_count, hid_usage_page(HID_PAGE(h->usage)), hid_usage_in_page(h->usage), h->flags & HIO_CONST ? " Const" : "", ___ 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: r351844 - stable/12/usr.bin/usbhidctl
Author: hselasky Date: Thu Sep 5 09:35:06 2019 New Revision: 351844 URL: https://svnweb.freebsd.org/changeset/base/351844 Log: MFC r351167: Include item position in report descriptor dump in usbhidctl(1). Submitted by: Kevin Zheng PR: 239918 Modified: stable/12/usr.bin/usbhidctl/usbhid.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/usbhidctl/usbhid.c == --- stable/12/usr.bin/usbhidctl/usbhid.cThu Sep 5 09:33:48 2019 (r351843) +++ stable/12/usr.bin/usbhidctl/usbhid.cThu Sep 5 09:35:06 2019 (r351844) @@ -202,8 +202,8 @@ dumpitem(const char *label, struct hid_item *h) { if ((h->flags & HIO_CONST) && !verbose) return; - printf("%s rid=%d size=%d count=%d page=%s usage=%s%s%s", label, - h->report_ID, h->report_size, h->report_count, + printf("%s rid=%d pos=%d size=%d count=%d page=%s usage=%s%s%s", label, + h->report_ID, h->pos, h->report_size, h->report_count, hid_usage_page(HID_PAGE(h->usage)), hid_usage_in_page(h->usage), h->flags & HIO_CONST ? " Const" : "", ___ 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: r351843 - stable/11/usr.sbin/usbconfig
Author: hselasky Date: Thu Sep 5 09:33:48 2019 New Revision: 351843 URL: https://svnweb.freebsd.org/changeset/base/351843 Log: MFC r351146: Implement detach_kernel_driver command in usbconfig(8). Submitted by: Kevin Zheng PR: 239916 Modified: stable/11/usr.sbin/usbconfig/usbconfig.8 stable/11/usr.sbin/usbconfig/usbconfig.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/usbconfig/usbconfig.8 == --- stable/11/usr.sbin/usbconfig/usbconfig.8Thu Sep 5 09:32:00 2019 (r351842) +++ stable/11/usr.sbin/usbconfig/usbconfig.8Thu Sep 5 09:33:48 2019 (r351843) @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 30, 2017 +.Dd August 16, 2019 .Dt USBCONFIG 8 .Os .Sh NAME @@ -52,6 +52,9 @@ Should only be used in conjunction with the unit argum .It Fl d Ar [ugen]. Limit device range to USB devices connected to the given unit and address. The unit and address coordinates may be prefixed by the lowercased word "ugen". +.It Fl i Ar interface_index +Specify interface index as indicated by the command description. +If this argument is not specified a value of zero will be used for the interface index. .It Fl h Show help and available commands. .El @@ -71,7 +74,7 @@ the interface drivers and reducing the power consumpti but without going into power saving mode or detaching from the bus. In some cases, it prevents the device from charging. .It Cm set_alt Ar alt_index -Choose the alternate interface for the USB device. +Choose the alternate interface for the selected interface and USB device. Alternative settings for the current configuration are available as the .Ar bAlternateSetting in @@ -119,6 +122,8 @@ Display the list of interface drivers (such as or .Xr u3g 4 ) currently attached to the device. +.It Cm detach_kernel_driver +Detach kernel driver for the selected interface and USB device. .It Cm suspend Force the device to suspend. .It Cm resume Modified: stable/11/usr.sbin/usbconfig/usbconfig.c == --- stable/11/usr.sbin/usbconfig/usbconfig.cThu Sep 5 09:32:00 2019 (r351842) +++ stable/11/usr.sbin/usbconfig/usbconfig.cThu Sep 5 09:33:48 2019 (r351843) @@ -89,6 +89,7 @@ struct options { uint8_t got_add_quirk:1; uint8_t got_dump_string:1; uint8_t got_do_request:1; + uint8_t got_detach_kernel_driver:1; }; struct token { @@ -111,6 +112,7 @@ enum { T_ADD_QUIRK, T_REMOVE_QUIRK, T_SHOW_IFACE_DRIVER, + T_DETACH_KERNEL_DRIVER, T_DUMP_QUIRK_NAMES, T_DUMP_DEVICE_QUIRKS, T_DUMP_ALL_DESC, @@ -144,6 +146,7 @@ static const struct token token[] = { {"remove_dev_quirk_vplh", T_REMOVE_DEVICE_QUIRK, 5}, {"add_quirk", T_ADD_QUIRK, 1}, {"remove_quirk", T_REMOVE_QUIRK, 1}, + {"detach_kernel_driver", T_DETACH_KERNEL_DRIVER, 0}, {"dump_quirk_names", T_DUMP_QUIRK_NAMES, 0}, {"dump_device_quirks", T_DUMP_DEVICE_QUIRKS, 0}, {"dump_all_desc", T_DUMP_ALL_DESC, 0}, @@ -284,6 +287,7 @@ usage(void) " remove_dev_quirk_vplh " "\n" " add_quirk " "\n" " remove_quirk " "\n" + " detach_kernel_driver" "\n" " dump_quirk_names" "\n" " dump_device_quirks" "\n" " dump_all_desc" "\n" @@ -492,6 +496,11 @@ flush_command(struct libusb20_backend *pbe, struct opt err(1, "could not set power ON"); } } + if (opt->got_detach_kernel_driver) { + if (libusb20_dev_detach_kernel_driver(pdev, opt->iface)) { + err(1, "could not detach kernel driver"); + } + } dump_any = (opt->got_dump_all_desc || opt->got_dump_device_desc || @@ -608,6 +617,13 @@ main(int argc, char **argv) opt->quirkname = argv[n + 5]; n += 5; opt->got_remove_device_quirk = 1; + opt->got_any++; + break; + + case T_DETACH_KERNEL_DRIVER: + if (opt->got_detach_kernel_driver) + duplicate_option(argv[n]); + opt->got_detach_kernel_driver = 1; opt->got_any++; break; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r351842 - stable/12/usr.sbin/usbconfig
Author: hselasky Date: Thu Sep 5 09:32:00 2019 New Revision: 351842 URL: https://svnweb.freebsd.org/changeset/base/351842 Log: MFC r351146: Implement detach_kernel_driver command in usbconfig(8). Submitted by: Kevin Zheng PR: 239916 Modified: stable/12/usr.sbin/usbconfig/usbconfig.8 stable/12/usr.sbin/usbconfig/usbconfig.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/usbconfig/usbconfig.8 == --- stable/12/usr.sbin/usbconfig/usbconfig.8Thu Sep 5 09:30:55 2019 (r351841) +++ stable/12/usr.sbin/usbconfig/usbconfig.8Thu Sep 5 09:32:00 2019 (r351842) @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 29, 2018 +.Dd August 16, 2019 .Dt USBCONFIG 8 .Os .Sh NAME @@ -52,6 +52,9 @@ Should only be used in conjunction with the unit argum .It Fl d Ar [ugen]. Limit device range to USB devices connected to the given unit and address. The unit and address coordinates may be prefixed by the lowercased word "ugen". +.It Fl i Ar interface_index +Specify interface index as indicated by the command description. +If this argument is not specified a value of zero will be used for the interface index. .It Fl h Show help and available commands. .El @@ -71,7 +74,7 @@ the interface drivers and reducing the power consumpti but without going into power saving mode or detaching from the bus. In some cases, it prevents the device from charging. .It Cm set_alt Ar alt_index -Choose the alternate interface for the USB device. +Choose the alternate interface for the selected interface and USB device. Alternative settings for the current configuration are available as the .Ar bAlternateSetting in @@ -119,6 +122,8 @@ Display the list of interface drivers (such as or .Xr u3g 4 ) currently attached to the device. +.It Cm detach_kernel_driver +Detach kernel driver for the selected interface and USB device. .It Cm suspend Force the device to suspend. .It Cm resume Modified: stable/12/usr.sbin/usbconfig/usbconfig.c == --- stable/12/usr.sbin/usbconfig/usbconfig.cThu Sep 5 09:30:55 2019 (r351841) +++ stable/12/usr.sbin/usbconfig/usbconfig.cThu Sep 5 09:32:00 2019 (r351842) @@ -89,6 +89,7 @@ struct options { uint8_t got_add_quirk:1; uint8_t got_dump_string:1; uint8_t got_do_request:1; + uint8_t got_detach_kernel_driver:1; }; struct token { @@ -111,6 +112,7 @@ enum { T_ADD_QUIRK, T_REMOVE_QUIRK, T_SHOW_IFACE_DRIVER, + T_DETACH_KERNEL_DRIVER, T_DUMP_QUIRK_NAMES, T_DUMP_DEVICE_QUIRKS, T_DUMP_ALL_DESC, @@ -144,6 +146,7 @@ static const struct token token[] = { {"remove_dev_quirk_vplh", T_REMOVE_DEVICE_QUIRK, 5}, {"add_quirk", T_ADD_QUIRK, 1}, {"remove_quirk", T_REMOVE_QUIRK, 1}, + {"detach_kernel_driver", T_DETACH_KERNEL_DRIVER, 0}, {"dump_quirk_names", T_DUMP_QUIRK_NAMES, 0}, {"dump_device_quirks", T_DUMP_DEVICE_QUIRKS, 0}, {"dump_all_desc", T_DUMP_ALL_DESC, 0}, @@ -284,6 +287,7 @@ usage(void) " remove_dev_quirk_vplh " "\n" " add_quirk " "\n" " remove_quirk " "\n" + " detach_kernel_driver" "\n" " dump_quirk_names" "\n" " dump_device_quirks" "\n" " dump_all_desc" "\n" @@ -492,6 +496,11 @@ flush_command(struct libusb20_backend *pbe, struct opt err(1, "could not set power ON"); } } + if (opt->got_detach_kernel_driver) { + if (libusb20_dev_detach_kernel_driver(pdev, opt->iface)) { + err(1, "could not detach kernel driver"); + } + } dump_any = (opt->got_dump_all_desc || opt->got_dump_device_desc || @@ -608,6 +617,13 @@ main(int argc, char **argv) opt->quirkname = argv[n + 5]; n += 5; opt->got_remove_device_quirk = 1; + opt->got_any++; + break; + + case T_DETACH_KERNEL_DRIVER: + if (opt->got_detach_kernel_driver) + duplicate_option(argv[n]); + opt->got_detach_kernel_driver = 1; opt->got_any++; break; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r351841 - stable/11/sys/compat/linuxkpi/common/include/linux
Author: hselasky Date: Thu Sep 5 09:30:55 2019 New Revision: 351841 URL: https://svnweb.freebsd.org/changeset/base/351841 Log: MFC r351009: Implement pci_enable_msi() and pci_disable_msi() in the LinuxKPI. This patch makes the DRM graphics driver in ports usable on aarch64. Submitted by: Greg V Differential Revision:https://reviews.freebsd.org/D21008 Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/linux/device.h stable/11/sys/compat/linuxkpi/common/include/linux/interrupt.h stable/11/sys/compat/linuxkpi/common/include/linux/pci.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/device.h == --- stable/11/sys/compat/linuxkpi/common/include/linux/device.h Thu Sep 5 09:28:58 2019(r351840) +++ stable/11/sys/compat/linuxkpi/common/include/linux/device.h Thu Sep 5 09:30:55 2019(r351841) @@ -109,8 +109,8 @@ struct device { void*driver_data; unsigned intirq; #defineLINUX_IRQ_INVALID 65535 - unsigned intmsix; - unsigned intmsix_max; + unsigned intirq_start; + unsigned intirq_end; const struct attribute_group **groups; struct fwnode_handle *fwnode; Modified: stable/11/sys/compat/linuxkpi/common/include/linux/interrupt.h == --- stable/11/sys/compat/linuxkpi/common/include/linux/interrupt.h Thu Sep 5 09:28:58 2019(r351840) +++ stable/11/sys/compat/linuxkpi/common/include/linux/interrupt.h Thu Sep 5 09:30:55 2019(r351841) @@ -55,9 +55,11 @@ struct irq_ent { static inline int linux_irq_rid(struct device *dev, unsigned int irq) { - if (irq == dev->irq) + /* check for MSI- or MSIX- interrupt */ + if (irq >= dev->irq_start && irq < dev->irq_end) + return (irq - dev->irq_start + 1); + else return (0); - return irq - dev->msix + 1; } extern void linux_irq_handler(void *); Modified: stable/11/sys/compat/linuxkpi/common/include/linux/pci.h == --- stable/11/sys/compat/linuxkpi/common/include/linux/pci.hThu Sep 5 09:28:58 2019(r351840) +++ stable/11/sys/compat/linuxkpi/common/include/linux/pci.hThu Sep 5 09:30:55 2019(r351841) @@ -216,6 +216,7 @@ struct pci_dev { unsigned intdevfn; uint32_tclass; uint8_t revision; + boolmsi_enabled; }; static inline struct resource_list_entry * @@ -250,7 +251,7 @@ linux_pci_find_irq_dev(unsigned int irq) spin_lock(_lock); list_for_each_entry(pdev, _devices, links) { if (irq == pdev->dev.irq || - (irq >= pdev->dev.msix && irq < pdev->dev.msix_max)) { + (irq >= pdev->dev.irq_start && irq < pdev->dev.irq_end)) { found = >dev; break; } @@ -432,10 +433,25 @@ pci_disable_msix(struct pci_dev *pdev) * linux_pci_find_irq_dev() does no longer see them by * resetting their references to zero: */ - pdev->dev.msix = 0; - pdev->dev.msix_max = 0; + pdev->dev.irq_start = 0; + pdev->dev.irq_end = 0; } +#definepci_disable_msi(pdev) \ + linux_pci_disable_msi(pdev) + +static inline void +linux_pci_disable_msi(struct pci_dev *pdev) +{ + + pci_release_msi(pdev->dev.bsddev); + + pdev->dev.irq_start = 0; + pdev->dev.irq_end = 0; + pdev->irq = pdev->dev.irq; + pdev->msi_enabled = false; +} + static inline bus_addr_t pci_bus_address(struct pci_dev *pdev, int bar) { @@ -566,10 +582,10 @@ pci_enable_msix(struct pci_dev *pdev, struct msix_entr return avail; } rle = linux_pci_get_rle(pdev, SYS_RES_IRQ, 1); - pdev->dev.msix = rle->start; - pdev->dev.msix_max = rle->start + avail; + pdev->dev.irq_start = rle->start; + pdev->dev.irq_end = rle->start + avail; for (i = 0; i < nreq; i++) - entries[i].vector = pdev->dev.msix + i; + entries[i].vector = pdev->dev.irq_start + i; return (0); } @@ -597,6 +613,32 @@ pci_enable_msix_range(struct pci_dev *dev, struct msix } } while (rc); return (nvec); +} + +#definepci_enable_msi(pdev) \ + linux_pci_enable_msi(pdev) + +static inline int +pci_enable_msi(struct pci_dev *pdev) +{ + struct resource_list_entry *rle; + int error; + int avail; + + avail = pci_msi_count(pdev->dev.bsddev); + if (avail < 1) + return -EINVAL; + + avail = 1; /* this function only enable one
svn commit: r351840 - stable/12/sys/compat/linuxkpi/common/include/linux
Author: hselasky Date: Thu Sep 5 09:28:58 2019 New Revision: 351840 URL: https://svnweb.freebsd.org/changeset/base/351840 Log: MFC r351009: Implement pci_enable_msi() and pci_disable_msi() in the LinuxKPI. This patch makes the DRM graphics driver in ports usable on aarch64. Submitted by: Greg V Differential Revision:https://reviews.freebsd.org/D21008 Sponsored by: Mellanox Technologies Modified: stable/12/sys/compat/linuxkpi/common/include/linux/device.h stable/12/sys/compat/linuxkpi/common/include/linux/interrupt.h stable/12/sys/compat/linuxkpi/common/include/linux/pci.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/device.h == --- stable/12/sys/compat/linuxkpi/common/include/linux/device.h Thu Sep 5 09:23:05 2019(r351839) +++ stable/12/sys/compat/linuxkpi/common/include/linux/device.h Thu Sep 5 09:28:58 2019(r351840) @@ -110,8 +110,8 @@ struct device { void*driver_data; unsigned intirq; #defineLINUX_IRQ_INVALID 65535 - unsigned intmsix; - unsigned intmsix_max; + unsigned intirq_start; + unsigned intirq_end; const struct attribute_group **groups; struct fwnode_handle *fwnode; Modified: stable/12/sys/compat/linuxkpi/common/include/linux/interrupt.h == --- stable/12/sys/compat/linuxkpi/common/include/linux/interrupt.h Thu Sep 5 09:23:05 2019(r351839) +++ stable/12/sys/compat/linuxkpi/common/include/linux/interrupt.h Thu Sep 5 09:28:58 2019(r351840) @@ -55,9 +55,11 @@ struct irq_ent { static inline int linux_irq_rid(struct device *dev, unsigned int irq) { - if (irq == dev->irq) + /* check for MSI- or MSIX- interrupt */ + if (irq >= dev->irq_start && irq < dev->irq_end) + return (irq - dev->irq_start + 1); + else return (0); - return irq - dev->msix + 1; } extern void linux_irq_handler(void *); Modified: stable/12/sys/compat/linuxkpi/common/include/linux/pci.h == --- stable/12/sys/compat/linuxkpi/common/include/linux/pci.hThu Sep 5 09:23:05 2019(r351839) +++ stable/12/sys/compat/linuxkpi/common/include/linux/pci.hThu Sep 5 09:28:58 2019(r351840) @@ -216,6 +216,7 @@ struct pci_dev { unsigned intdevfn; uint32_tclass; uint8_t revision; + boolmsi_enabled; }; static inline struct resource_list_entry * @@ -250,7 +251,7 @@ linux_pci_find_irq_dev(unsigned int irq) spin_lock(_lock); list_for_each_entry(pdev, _devices, links) { if (irq == pdev->dev.irq || - (irq >= pdev->dev.msix && irq < pdev->dev.msix_max)) { + (irq >= pdev->dev.irq_start && irq < pdev->dev.irq_end)) { found = >dev; break; } @@ -432,10 +433,25 @@ pci_disable_msix(struct pci_dev *pdev) * linux_pci_find_irq_dev() does no longer see them by * resetting their references to zero: */ - pdev->dev.msix = 0; - pdev->dev.msix_max = 0; + pdev->dev.irq_start = 0; + pdev->dev.irq_end = 0; } +#definepci_disable_msi(pdev) \ + linux_pci_disable_msi(pdev) + +static inline void +linux_pci_disable_msi(struct pci_dev *pdev) +{ + + pci_release_msi(pdev->dev.bsddev); + + pdev->dev.irq_start = 0; + pdev->dev.irq_end = 0; + pdev->irq = pdev->dev.irq; + pdev->msi_enabled = false; +} + static inline bus_addr_t pci_bus_address(struct pci_dev *pdev, int bar) { @@ -567,10 +583,10 @@ pci_enable_msix(struct pci_dev *pdev, struct msix_entr return avail; } rle = linux_pci_get_rle(pdev, SYS_RES_IRQ, 1); - pdev->dev.msix = rle->start; - pdev->dev.msix_max = rle->start + avail; + pdev->dev.irq_start = rle->start; + pdev->dev.irq_end = rle->start + avail; for (i = 0; i < nreq; i++) - entries[i].vector = pdev->dev.msix + i; + entries[i].vector = pdev->dev.irq_start + i; return (0); } @@ -598,6 +614,32 @@ pci_enable_msix_range(struct pci_dev *dev, struct msix } } while (rc); return (nvec); +} + +#definepci_enable_msi(pdev) \ + linux_pci_enable_msi(pdev) + +static inline int +pci_enable_msi(struct pci_dev *pdev) +{ + struct resource_list_entry *rle; + int error; + int avail; + + avail = pci_msi_count(pdev->dev.bsddev); + if (avail < 1) + return -EINVAL; + + avail = 1; /* this function only enable one
svn commit: r351839 - stable/11/sys/compat/linuxkpi/common/src
Author: hselasky Date: Thu Sep 5 09:23:05 2019 New Revision: 351839 URL: https://svnweb.freebsd.org/changeset/base/351839 Log: MFC r347387: Fix memory leak of PCI BUS structure in the LinuxKPI. Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/src/linux_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/src/linux_pci.c == --- stable/11/sys/compat/linuxkpi/common/src/linux_pci.cThu Sep 5 09:20:15 2019(r351838) +++ stable/11/sys/compat/linuxkpi/common/src/linux_pci.cThu Sep 5 09:23:05 2019(r351839) @@ -171,12 +171,10 @@ linux_pci_attach(device_t dev) pdev->dev.irq = LINUX_IRQ_INVALID; pdev->irq = pdev->dev.irq; - if (pdev->bus == NULL) { - pbus = malloc(sizeof(*pbus), M_DEVBUF, M_WAITOK | M_ZERO); - pbus->self = pdev; - pbus->number = pci_get_bus(dev); - pdev->bus = pbus; - } + pbus = malloc(sizeof(*pbus), M_DEVBUF, M_WAITOK | M_ZERO); + pbus->self = pdev; + pbus->number = pci_get_bus(dev); + pdev->bus = pbus; spin_lock(_lock); list_add(>links, _devices); @@ -184,6 +182,7 @@ linux_pci_attach(device_t dev) error = pdrv->probe(pdev, id); if (error) { + free(pdev->bus, M_DEVBUF); spin_lock(_lock); list_del(>links); spin_unlock(_lock); @@ -202,6 +201,7 @@ linux_pci_detach(device_t dev) pdev = device_get_softc(dev); pdev->pdrv->remove(pdev); + free(pdev->bus, M_DEVBUF); spin_lock(_lock); list_del(>links); ___ 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: r351838 - stable/12/sys/compat/linuxkpi/common/src
Author: hselasky Date: Thu Sep 5 09:20:15 2019 New Revision: 351838 URL: https://svnweb.freebsd.org/changeset/base/351838 Log: MFC r347387: Fix memory leak of PCI BUS structure in the LinuxKPI. Sponsored by: Mellanox Technologies Modified: stable/12/sys/compat/linuxkpi/common/src/linux_pci.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/src/linux_pci.c == --- stable/12/sys/compat/linuxkpi/common/src/linux_pci.cThu Sep 5 09:04:48 2019(r351837) +++ stable/12/sys/compat/linuxkpi/common/src/linux_pci.cThu Sep 5 09:20:15 2019(r351838) @@ -171,12 +171,10 @@ linux_pci_attach(device_t dev) pdev->dev.irq = LINUX_IRQ_INVALID; pdev->irq = pdev->dev.irq; - if (pdev->bus == NULL) { - pbus = malloc(sizeof(*pbus), M_DEVBUF, M_WAITOK | M_ZERO); - pbus->self = pdev; - pbus->number = pci_get_bus(dev); - pdev->bus = pbus; - } + pbus = malloc(sizeof(*pbus), M_DEVBUF, M_WAITOK | M_ZERO); + pbus->self = pdev; + pbus->number = pci_get_bus(dev); + pdev->bus = pbus; spin_lock(_lock); list_add(>links, _devices); @@ -184,6 +182,7 @@ linux_pci_attach(device_t dev) error = pdrv->probe(pdev, id); if (error) { + free(pdev->bus, M_DEVBUF); spin_lock(_lock); list_del(>links); spin_unlock(_lock); @@ -202,6 +201,7 @@ linux_pci_detach(device_t dev) pdev = device_get_softc(dev); pdev->pdrv->remove(pdev); + free(pdev->bus, M_DEVBUF); spin_lock(_lock); list_del(>links); ___ 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: r351837 - head/stand/ficl
Author: tsoome Date: Thu Sep 5 09:04:48 2019 New Revision: 351837 URL: https://svnweb.freebsd.org/changeset/base/351837 Log: ficl: add uIsGreater word For some reason we have u< but not u>, fix it. Modified: head/stand/ficl/words.c Modified: head/stand/ficl/words.c == --- head/stand/ficl/words.c Thu Sep 5 03:16:14 2019(r351836) +++ head/stand/ficl/words.c Thu Sep 5 09:04:48 2019(r351837) @@ -1930,6 +1930,18 @@ static void isGreater(FICL_VM *pVM) return; } +static void uIsGreater(FICL_VM *pVM) +{ +FICL_UNS u1, u2; +#if FICL_ROBUST > 1 +vmCheckStack(pVM, 2, 1); +#endif +u2 = stackPopUNS(pVM->pStack); +u1 = stackPopUNS(pVM->pStack); +PUSHINT(FICL_BOOL(u1 > u2)); +return; +} + static void bitwiseAnd(FICL_VM *pVM) { CELL x, y; @@ -4975,6 +4987,7 @@ void ficlCompileCore(FICL_SYSTEM *pSys) dictAppendWord(dp, "type", type, FW_DEFAULT); dictAppendWord(dp, "u.",uDot, FW_DEFAULT); dictAppendWord(dp, "u<",uIsLess,FW_DEFAULT); +dictAppendWord(dp, "u>",uIsGreater, FW_DEFAULT); dictAppendWord(dp, "um*", umStar, FW_DEFAULT); dictAppendWord(dp, "um/mod",umSlashMod, FW_DEFAULT); dictAppendWord(dp, "unloop",unloopCo, FW_COMPILE); ___ 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: r351831 - in head: . stand/efi/boot1 stand/efi/gptboot tools/build/mk
On 2019-09-05 07:57, Dimitry Andric wrote: On 4 Sep 2019, at 22:55, Rebecca Cran wrote: Author: bcran Date: Wed Sep 4 20:55:48 2019 New Revision: 351831 URL: https://svnweb.freebsd.org/changeset/base/351831 Log: The efifat files are no longer used: remove the code to build them Reviewed by: imp, tsoome, emaste Differential Revision:https://reviews.freebsd.org/D20562 So what are now the instructions for updating an EFI partition, after a buildworld? I used to find that efifat file quite handy, I could just use gpart -p to write it into the EFI partition... :-/ -Dimitry This is what I do: mount -t msdosfs /dev/ada0p1 /mnt # (if that's the ESP, check with gpart list) cp /boot/loader.efi /mnt/EFI/FreeBSD/loader.efi umount /mnt This works if proper EFI boot variables have been set up. This can be done with, it's only needed the first time, or if they are somehow overwritten. efibootmgr --create --activate --label FreeBSD --loader /dev/ada0p1:/EFI/FreeBSD/loader.efi Once again, check that /dev/ada0p1 is the ESP. You can check your efi boot variables with efibootmgr -v Regards -- Niclas ___ 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"