svn commit: r306077 - head/sys/sys
Author: trasz Date: Wed Sep 21 07:25:05 2016 New Revision: 306077 URL: https://svnweb.freebsd.org/changeset/base/306077 Log: Bump __FreeBSD_version after r305988, removal of bio_taskqueue(). Suggested by: asomers@ Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h == --- head/sys/sys/param.hWed Sep 21 06:54:26 2016(r306076) +++ head/sys/sys/param.hWed Sep 21 07:25:05 2016(r306077) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 128 /* Master, propagated to newvers */ +#define __FreeBSD_version 129 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r305988 - in head/sys: geom sys
On 0920T1020, Alan Somers wrote: > On Mon, Sep 19, 2016 at 11:46 AM, Edward Tomasz Napierala > wrote: > > Author: trasz > > Date: Mon Sep 19 17:46:15 2016 > > New Revision: 305988 > > URL: https://svnweb.freebsd.org/changeset/base/305988 > > > > Log: > > Remove unused bio_taskqueue(). > > > > MFC after:1 month > > > > Modified: > > head/sys/geom/geom_io.c > > head/sys/sys/bio.h > > > > This is a KBI change, so you should bump __FreeBSD_version. You > probably shouldn't MFC it, either. Done, thanks. I won't MFC it either. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r305988 - in head/sys: geom sys
On 0920T0934, Ngie Cooper (yaneurabeya) wrote: > > > On Sep 20, 2016, at 09:28, Alan Somers wrote: > > > > On Tue, Sep 20, 2016 at 10:23 AM, Alexander Motin wrote: > >> On 20.09.2016 09:20, Alan Somers wrote: > >>> On Mon, Sep 19, 2016 at 11:46 AM, Edward Tomasz Napierala > >>> wrote: > Author: trasz > Date: Mon Sep 19 17:46:15 2016 > New Revision: 305988 > URL: https://svnweb.freebsd.org/changeset/base/305988 > > Log: > Remove unused bio_taskqueue(). > > MFC after:1 month > > Modified: > head/sys/geom/geom_io.c > head/sys/sys/bio.h > > >>> > >>> This is a KBI change, so you should bump __FreeBSD_version. You > >>> probably shouldn't MFC it, either. > >> > >> The last/only consumer of this KPI I know gone with FreeBSD 9 and old > >> ATA stack. Do you know any other? > > > > Nothing in-tree. But it's publicly visible, so we have no way of > > knowing who might be using it out-of-tree. > > I’d have to check, but this might impact us (Isilon). We don’t use the > __FreeBSD_version #ifdefs though in our code, so it’s fine from my > perspective to leave things alone. > > That being said, are you sure that port klds (e.g. open-vm-tools*) aren’t > impacted by this change? Did it go through a ports -exp run? I'm not sure if it's worth it. If something comes up, I'll fix it. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306081 - in head/sys: compat/freebsd32 kern sys
Author: kib Date: Wed Sep 21 08:23:33 2016 New Revision: 306081 URL: https://svnweb.freebsd.org/changeset/base/306081 Log: Add PROC_TRAPCAP procctl(2) controls and global sysctl kern.trap_enocap. Both can be used to cause processes in capability mode to receive SIGTRAP when ENOTCAPABLE or ECAPMODE errors are returned from syscalls. Idea by: emaste Reviewed by: oshogbo (previous version), emaste Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.freebsd.org/D7965 Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/kern_fork.c head/sys/kern/kern_procctl.c head/sys/kern/subr_syscall.c head/sys/kern/sys_capability.c head/sys/sys/capsicum.h head/sys/sys/proc.h head/sys/sys/procctl.h head/sys/sys/signal.h Modified: head/sys/compat/freebsd32/freebsd32_misc.c == --- head/sys/compat/freebsd32/freebsd32_misc.c Wed Sep 21 08:14:55 2016 (r306080) +++ head/sys/compat/freebsd32/freebsd32_misc.c Wed Sep 21 08:23:33 2016 (r306081) @@ -3048,6 +3048,7 @@ freebsd32_procctl(struct thread *td, str switch (uap->com) { case PROC_SPROTECT: case PROC_TRACE_CTL: + case PROC_TRAPCAP_CTL: error = copyin(PTRIN(uap->data), &flags, sizeof(flags)); if (error != 0) return (error); @@ -3077,6 +3078,7 @@ freebsd32_procctl(struct thread *td, str data = &x.rk; break; case PROC_TRACE_STATUS: + case PROC_TRAPCAP_STATUS: data = &flags; break; default: @@ -3095,6 +3097,7 @@ freebsd32_procctl(struct thread *td, str error = error1; break; case PROC_TRACE_STATUS: + case PROC_TRAPCAP_STATUS: if (error == 0) error = copyout(&flags, uap->data, sizeof(flags)); break; Modified: head/sys/kern/kern_fork.c == --- head/sys/kern/kern_fork.c Wed Sep 21 08:14:55 2016(r306080) +++ head/sys/kern/kern_fork.c Wed Sep 21 08:23:33 2016(r306081) @@ -497,7 +497,7 @@ do_fork(struct thread *td, struct fork_r * Increase reference counts on shared objects. */ p2->p_flag = P_INMEM; - p2->p_flag2 = p1->p_flag2 & (P2_NOTRACE | P2_NOTRACE_EXEC); + p2->p_flag2 = p1->p_flag2 & (P2_NOTRACE | P2_NOTRACE_EXEC | P2_TRAPCAP); p2->p_swtick = ticks; if (p1->p_flag & P_PROFIL) startprofclock(p2); Modified: head/sys/kern/kern_procctl.c == --- head/sys/kern/kern_procctl.cWed Sep 21 08:14:55 2016 (r306080) +++ head/sys/kern/kern_procctl.cWed Sep 21 08:23:33 2016 (r306081) @@ -336,6 +336,34 @@ trace_status(struct thread *td, struct p return (0); } +static int +trapcap_ctl(struct thread *td, struct proc *p, int state) +{ + + PROC_LOCK_ASSERT(p, MA_OWNED); + + switch (state) { + case PROC_TRAPCAP_CTL_ENABLE: + p->p_flag2 |= P2_TRAPCAP; + break; + case PROC_TRAPCAP_CTL_DISABLE: + p->p_flag2 &= ~P2_TRAPCAP; + break; + default: + return (EINVAL); + } + return (0); +} + +static int +trapcap_status(struct thread *td, struct proc *p, int *data) +{ + + *data = (p->p_flag2 & P2_TRAPCAP) != 0 ? PROC_TRAPCAP_CTL_ENABLE : + PROC_TRAPCAP_CTL_DISABLE; + return (0); +} + #ifndef _SYS_SYSPROTO_H_ struct procctl_args { idtype_t idtype; @@ -359,6 +387,7 @@ sys_procctl(struct thread *td, struct pr switch (uap->com) { case PROC_SPROTECT: case PROC_TRACE_CTL: + case PROC_TRAPCAP_CTL: error = copyin(uap->data, &flags, sizeof(flags)); if (error != 0) return (error); @@ -386,6 +415,7 @@ sys_procctl(struct thread *td, struct pr data = &x.rk; break; case PROC_TRACE_STATUS: + case PROC_TRAPCAP_STATUS: data = &flags; break; default: @@ -403,6 +433,7 @@ sys_procctl(struct thread *td, struct pr error = error1; break; case PROC_TRACE_STATUS: + case PROC_TRAPCAP_STATUS: if (error == 0) error = copyout(&flags, uap->data, sizeof(flags)); break; @@ -432,6 +463,10 @@ kern_procctl_single(struct thread *td, s return (trace_ctl(td, p, *(int *)data)); case PROC_TRACE_STATUS: return (trace_status(td, p, data)); + case PROC_TRAPCAP_CTL: + return (trapcap_ctl(td, p, *(int *)data)); +
svn commit: r306082 - head/sys/netinet
Author: tuexen Date: Wed Sep 21 08:28:18 2016 New Revision: 306082 URL: https://svnweb.freebsd.org/changeset/base/306082 Log: Fix the handling of unordered fragmented user messages using DATA chunks. There were two bugs: * There was an accounting bug resulting in reporting a too small a_rwnd. * There are a bug when abandoning messages in the reassembly queue. MFC after:4 weeks Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c == --- head/sys/netinet/sctp_indata.c Wed Sep 21 08:23:33 2016 (r306081) +++ head/sys/netinet/sctp_indata.c Wed Sep 21 08:28:18 2016 (r306082) @@ -809,6 +809,8 @@ restart: tchk = TAILQ_FIRST(&control->reasm); if (tchk->rec.data.rcv_flags & SCTP_DATA_FIRST_FRAG) { TAILQ_REMOVE(&control->reasm, tchk, sctp_next); + asoc->size_on_reasm_queue -= tchk->send_size; + sctp_ucount_decr(asoc->cnt_on_reasm_queue); nc->first_frag_seen = 1; nc->fsn_included = tchk->rec.data.fsn_num; nc->data = tchk->data; @@ -5322,6 +5324,9 @@ sctp_flush_reassm_for_str_seq(struct sct /* Not found */ return; } + if (old && !ordered && SCTP_TSN_GT(control->fsn_included, cumtsn)) { + return; + } TAILQ_FOREACH_SAFE(chk, &control->reasm, sctp_next, nchk) { /* Purge hanging chunks */ if (old && (ordered == 0)) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306083 - in head/sys/gnu/dts: arm include/dt-bindings/clock include/dt-bindings/gpio include/dt-bindings/mfd include/dt-bindings/pinctrl include/dt-bindings/reset
Author: andrew Date: Wed Sep 21 08:54:08 2016 New Revision: 306083 URL: https://svnweb.freebsd.org/changeset/base/306083 Log: Update the device tree source files to a Linux 4.7-RC. MFC after:2 weeks Sponsored by: ABT Systems Ltd Added: head/sys/gnu/dts/arm/am335x-baltos-ir2110.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/am335x-baltos-ir2110.dts head/sys/gnu/dts/arm/am335x-baltos-ir3220.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/am335x-baltos-ir3220.dts head/sys/gnu/dts/arm/am335x-baltos.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/am335x-baltos.dtsi head/sys/gnu/dts/arm/am335x-icev2.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/am335x-icev2.dts head/sys/gnu/dts/arm/am572x-idk.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/am572x-idk.dts head/sys/gnu/dts/arm/am57xx-commercial-grade.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/am57xx-commercial-grade.dtsi head/sys/gnu/dts/arm/am57xx-idk-common.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/am57xx-idk-common.dtsi head/sys/gnu/dts/arm/am57xx-industrial-grade.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/am57xx-industrial-grade.dtsi head/sys/gnu/dts/arm/arm-realview-eb-11mp-revb.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/arm-realview-eb-11mp-revb.dts head/sys/gnu/dts/arm/arm-realview-eb-11mp.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/arm-realview-eb-11mp.dts head/sys/gnu/dts/arm/arm-realview-eb-a9mp.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/arm-realview-eb-a9mp.dts head/sys/gnu/dts/arm/arm-realview-eb-mp.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/arm-realview-eb-mp.dtsi head/sys/gnu/dts/arm/arm-realview-eb.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/arm-realview-eb.dts head/sys/gnu/dts/arm/arm-realview-eb.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/arm-realview-eb.dtsi head/sys/gnu/dts/arm/arm-realview-pba8.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/arm-realview-pba8.dts head/sys/gnu/dts/arm/arm-realview-pbx-a9.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/arm-realview-pbx-a9.dts head/sys/gnu/dts/arm/arm-realview-pbx.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/arm-realview-pbx.dtsi head/sys/gnu/dts/arm/artpec6-devboard.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/artpec6-devboard.dts head/sys/gnu/dts/arm/artpec6.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/artpec6.dtsi head/sys/gnu/dts/arm/aspeed-ast2500-evb.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/aspeed-ast2500-evb.dts head/sys/gnu/dts/arm/aspeed-bmc-opp-palmetto.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/aspeed-bmc-opp-palmetto.dts head/sys/gnu/dts/arm/aspeed-g4.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/aspeed-g4.dtsi head/sys/gnu/dts/arm/aspeed-g5.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/aspeed-g5.dtsi head/sys/gnu/dts/arm/bcm2835-rpi-a.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/bcm2835-rpi-a.dts head/sys/gnu/dts/arm/bcm47094-dlink-dir-885l.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/bcm47094-dlink-dir-885l.dts head/sys/gnu/dts/arm/dra7-dspeve-thermal.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/dra7-dspeve-thermal.dtsi head/sys/gnu/dts/arm/dra7-iva-thermal.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/dra7-iva-thermal.dtsi head/sys/gnu/dts/arm/dra72-evm-common.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/dra72-evm-common.dtsi head/sys/gnu/dts/arm/dra72-evm-revc.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/dra72-evm-revc.dts head/sys/gnu/dts/arm/exynos-syscon-restart.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/exynos-syscon-restart.dtsi head/sys/gnu/dts/arm/exynos3250-artik5-eval.dts - copied unchanged from r305978, vendor/device-tree/dist/src/arm/exynos3250-artik5-eval.dts head/sys/gnu/dts/arm/exynos3250-artik5.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/exynos3250-artik5.dtsi head/sys/gnu/dts/arm/exynos4412-ppmu-common.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/exynos4412-ppmu-common.dtsi head/sys/gnu/dts/arm/exynos5410-pinctrl.dtsi - copied unchanged from r305978, vendor/device-tree/dist/src/arm/exynos5410-pinctrl.dtsi head
svn commit: r306087 - in head/sys/amd64: amd64 include
Author: kib Date: Wed Sep 21 10:05:51 2016 New Revision: 306087 URL: https://svnweb.freebsd.org/changeset/base/306087 Log: Export the pmap_cache_bits() and pmap_pinit_pml4() functions from the amd64 pmap. The new pmap_pinit_pml4() function initializes the level 4 page table with entries for the kernel mappings. Both functions are needed for upcoming EFI Runtime Services support. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/amd64/amd64/pmap.c head/sys/amd64/include/pmap.h Modified: head/sys/amd64/amd64/pmap.c == --- head/sys/amd64/amd64/pmap.c Wed Sep 21 09:50:50 2016(r306086) +++ head/sys/amd64/amd64/pmap.c Wed Sep 21 10:05:51 2016(r306087) @@ -1324,7 +1324,7 @@ pmap_swap_pat(pmap_t pmap, pt_entry_t en * Determine the appropriate bits to set in a PTE or PDE for a specified * caching mode. */ -static int +int pmap_cache_bits(pmap_t pmap, int mode, boolean_t is_pde) { int cache_bits, pat_flag, pat_idx; @@ -2345,6 +2345,29 @@ pmap_pinit0(pmap_t pmap) CPU_FILL(&kernel_pmap->pm_active); } +void +pmap_pinit_pml4(vm_page_t pml4pg) +{ + pml4_entry_t *pm_pml4; + int i; + + pm_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pml4pg)); + + /* Wire in kernel global address entries. */ + for (i = 0; i < NKPML4E; i++) { + pm_pml4[KPML4BASE + i] = (KPDPphys + ptoa(i)) | X86_PG_RW | + X86_PG_V | PG_U; + } + for (i = 0; i < ndmpdpphys; i++) { + pm_pml4[DMPML4I + i] = (DMPDPphys + ptoa(i)) | X86_PG_RW | + X86_PG_V | PG_U; + } + + /* install self-referential address mapping entry(s) */ + pm_pml4[PML4PML4I] = VM_PAGE_TO_PHYS(pml4pg) | X86_PG_V | X86_PG_RW | + X86_PG_A | X86_PG_M; +} + /* * Initialize a preallocated and zeroed pmap structure, * such as one in a vmspace structure. @@ -2381,20 +2404,7 @@ pmap_pinit_type(pmap_t pmap, enum pmap_t */ if ((pmap->pm_type = pm_type) == PT_X86) { pmap->pm_cr3 = pml4phys; - - /* Wire in kernel global address entries. */ - for (i = 0; i < NKPML4E; i++) { - pmap->pm_pml4[KPML4BASE + i] = (KPDPphys + ptoa(i)) | - X86_PG_RW | X86_PG_V | PG_U; - } - for (i = 0; i < ndmpdpphys; i++) { - pmap->pm_pml4[DMPML4I + i] = (DMPDPphys + ptoa(i)) | - X86_PG_RW | X86_PG_V | PG_U; - } - - /* install self-referential address mapping entry(s) */ - pmap->pm_pml4[PML4PML4I] = VM_PAGE_TO_PHYS(pml4pg) | - X86_PG_V | X86_PG_RW | X86_PG_A | X86_PG_M; + pmap_pinit_pml4(pml4pg); } pmap->pm_root.rt_root = 0; Modified: head/sys/amd64/include/pmap.h == --- head/sys/amd64/include/pmap.h Wed Sep 21 09:50:50 2016 (r306086) +++ head/sys/amd64/include/pmap.h Wed Sep 21 10:05:51 2016 (r306087) @@ -391,6 +391,7 @@ struct thread; void pmap_activate_sw(struct thread *); void pmap_bootstrap(vm_paddr_t *); +intpmap_cache_bits(pmap_t pmap, int mode, boolean_t is_pde); intpmap_change_attr(vm_offset_t, vm_size_t, int); void pmap_demote_DMAP(vm_paddr_t base, vm_size_t len, boolean_t invalidate); void pmap_init_pat(void); @@ -403,6 +404,7 @@ void*pmap_mapdev(vm_paddr_t, vm_size_t) void *pmap_mapdev_attr(vm_paddr_t, vm_size_t, int); boolean_t pmap_page_is_mapped(vm_page_t m); void pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma); +void pmap_pinit_pml4(vm_page_t); void pmap_unmapdev(vm_offset_t, vm_size_t); void pmap_invalidate_page(pmap_t, vm_offset_t); void pmap_invalidate_range(pmap_t, vm_offset_t, vm_offset_t); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306088 - head/sys/amd64/include
Author: kib Date: Wed Sep 21 10:10:36 2016 New Revision: 306088 URL: https://svnweb.freebsd.org/changeset/base/306088 Log: Add amd64 functions to load/store GDT register, store IDT and TR registers. Note that lgdt() name is already used for function which, besides loading GDT, also reloads segment descriptors cache, thus new function is named bare_lgdt(). Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/amd64/include/cpufunc.h Modified: head/sys/amd64/include/cpufunc.h == --- head/sys/amd64/include/cpufunc.hWed Sep 21 10:05:51 2016 (r306087) +++ head/sys/amd64/include/cpufunc.hWed Sep 21 10:10:36 2016 (r306088) @@ -645,12 +645,36 @@ load_gs(u_short sel) #endif static __inline void +bare_lgdt(struct region_descriptor *addr) +{ + __asm __volatile("lgdt (%0)" : : "r" (addr)); +} + +static __inline void +sgdt(struct region_descriptor *addr) +{ + char *loc; + + loc = (char *)addr; + __asm __volatile("sgdt %0" : "=m" (*loc) : : "memory"); +} + +static __inline void lidt(struct region_descriptor *addr) { __asm __volatile("lidt (%0)" : : "r" (addr)); } static __inline void +sidt(struct region_descriptor *addr) +{ + char *loc; + + loc = (char *)addr; + __asm __volatile("sidt %0" : "=m" (*loc) : : "memory"); +} + +static __inline void lldt(u_short sel) { __asm __volatile("lldt %0" : : "r" (sel)); @@ -662,6 +686,15 @@ ltr(u_short sel) __asm __volatile("ltr %0" : : "r" (sel)); } +static __inline uint32_t +read_tr(void) +{ + u_short sel; + + __asm __volatile("str %0" : "=r" (sel)); + return (sel); +} + static __inline uint64_t rdr0(void) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306089 - in head/sys: kern sys
Author: kib Date: Wed Sep 21 10:15:08 2016 New Revision: 306089 URL: https://svnweb.freebsd.org/changeset/base/306089 Log: Make resettodr_lock accessible outside subr_rtc.c. Protect CLOCK_GETTIME() with the lock. Now all time-related accesses to the CMOS for RTC should be under the lock. This is needed to allow upcoming EFI Runtime Services support to provide required execution environment for the firmware calls. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/kern/subr_rtc.c head/sys/sys/clock.h Modified: head/sys/kern/subr_rtc.c == --- head/sys/kern/subr_rtc.cWed Sep 21 10:10:36 2016(r306088) +++ head/sys/kern/subr_rtc.cWed Sep 21 10:15:08 2016(r306089) @@ -75,7 +75,7 @@ __FBSDID("$FreeBSD$"); static device_t clock_dev = NULL; static long clock_res; static struct timespec clock_adj; -static struct mtx resettodr_lock; +struct mtx resettodr_lock; MTX_SYSINIT(resettodr_init, &resettodr_lock, "tod2rl", MTX_DEF); /* XXX: should be kern. now, it's no longer machdep. */ @@ -132,7 +132,9 @@ inittodr(time_t base) goto wrong_time; } /* XXX: We should poll all registered RTCs in case of failure */ + mtx_lock(&resettodr_lock); error = CLOCK_GETTIME(clock_dev, &ts); + mtx_unlock(&resettodr_lock); if (error != 0 && error != EINVAL) { printf("warning: clock_gettime failed (%d), the system time " "will not be set accurately\n", error); Modified: head/sys/sys/clock.h == --- head/sys/sys/clock.hWed Sep 21 10:10:36 2016(r306088) +++ head/sys/sys/clock.hWed Sep 21 10:15:08 2016(r306089) @@ -54,6 +54,7 @@ */ extern int tz_minuteswest; extern int tz_dsttime; +extern struct mtx resettodr_lock; int utc_offset(void); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306090 - head/sys/boot/efi/loader/arch/amd64
Author: kib Date: Wed Sep 21 10:22:46 2016 New Revision: 306090 URL: https://svnweb.freebsd.org/changeset/base/306090 Log: Simple post-mortem reporter for amd64 loader.efi. There is no way to see anything about the faults occuring in loader.efi. Some intel BIOSes do output a line into serial port at 115200/8/1 regardless of the current port settings with the EFI error number, but this is too little, and not always available, esp. if the user does not know where to look. The patch adds a simple facility to grab exceptions and at least dump generic registers and some exception details. Due to the relative complexity of correctly taking over the BIOS IDT setup, only install the facility on user request. Two new commands, 'grab_faults' and 'ungrab_faults' are provided, first one takes over, second undoes the first. It is supposed that user would execute 'grab' by the developer direction of collecting the debugging data. The 'fault' command generates exception to test the setup. Fault handlers use dedicated stack to improve chances of catching stack/TSS exceptions. Due to this, BIOS IDT is duplicated into a private copy, and debugger needs to find a free GDT slot for TSS. This is done in somewhat complicated efi_redirect_exceptions(). Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after:2 weeks Differential revision:https://reviews.freebsd.org/D7935 Added: head/sys/boot/efi/loader/arch/amd64/exc.S (contents, props changed) head/sys/boot/efi/loader/arch/amd64/trap.c (contents, props changed) Modified: head/sys/boot/efi/loader/arch/amd64/Makefile.inc Modified: head/sys/boot/efi/loader/arch/amd64/Makefile.inc == --- head/sys/boot/efi/loader/arch/amd64/Makefile.incWed Sep 21 10:15:08 2016(r306089) +++ head/sys/boot/efi/loader/arch/amd64/Makefile.incWed Sep 21 10:22:46 2016(r306090) @@ -3,7 +3,9 @@ SRCS+= amd64_tramp.S \ start.S \ framebuffer.c \ - elf64_freebsd.c + elf64_freebsd.c \ + trap.c \ + exc.S .PATH: ${.CURDIR}/../../i386/libi386 SRCS+= nullconsole.c \ Added: head/sys/boot/efi/loader/arch/amd64/exc.S == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/loader/arch/amd64/exc.S Wed Sep 21 10:22:46 2016 (r306090) @@ -0,0 +1,165 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov under sponsorship + * from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + + .macro EH N, err=1 + .align 8 + .globl EXC\N\()_handler +EXC\N\()_handler: + .if \err != 1 + pushq $0 + .endif + pushq %rax + pushq %rdx + pushq %rcx + movl$\N,%ecx + jmp all_handlers + .endm + + .text + EH 0,0 + EH 1,0 + EH 2,0 + EH 3,0 + EH 4,0 + EH 5,0 + EH 6,0 + EH 7,0 + EH 8 + EH 9,0 + EH 10 + EH 11 + EH 12 + EH 13 + EH 14 + EH 16,0 + EH 17 + EH 18,0 + EH 19,0 + EH 20,0 + + .globl exc_rsp +all_handlers: + cmpq%rsp,exc_rsp(%rip) + je exception + + /* +* Interrupt, not exception. +* First, copy the hardware interrupt frame to the previous stack. +
svn commit: r306091 - in head/sys: amd64/include arm/include arm64/include sys
Author: kib Date: Wed Sep 21 10:35:44 2016 New Revision: 306091 URL: https://svnweb.freebsd.org/changeset/base/306091 Log: Add a way for the architecture to specify the calling ABI for methods in the EFI Runtime Services Table. On amd64, the calling conventions are MS. Sponsored by: The FreeBSD Foundation MFC after:1 week Added: head/sys/amd64/include/efi.h (contents, props changed) head/sys/arm/include/efi.h (contents, props changed) head/sys/arm64/include/efi.h (contents, props changed) Modified: head/sys/sys/efi.h Added: head/sys/amd64/include/efi.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/amd64/include/efi.hWed Sep 21 10:35:44 2016 (r306091) @@ -0,0 +1,42 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __AMD64_INCLUDE_EFI_H_ +#define __AMD64_INCLUDE_EFI_H_ + +/* + * XXX: from gcc 6.2 manual: + * Note, the ms_abi attribute for Microsoft Windows 64-bit targets + * currently requires the -maccumulate-outgoing-args option. + */ +#defineEFIABI_ATTR __attribute__((ms_abi)) + +#endif /* __AMD64_INCLUDE_EFI_H_ */ Added: head/sys/arm/include/efi.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/include/efi.h Wed Sep 21 10:35:44 2016(r306091) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __ARM_INCLUDE_EFI_H_ +#define __ARM_INCLUDE_EFI_H_ + +#defineEFIABI_ATTR + +#endif /* __ARM_INCLUDE_EFI_H_ */ Added: head/sys/arm64/include/efi.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/include/efi.hWed Sep 21 10:35:44 2016 (r306091) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was d
svn commit: r306092 - in head/sys: amd64/amd64 sys
Author: kib Date: Wed Sep 21 10:55:28 2016 New Revision: 306092 URL: https://svnweb.freebsd.org/changeset/base/306092 Log: Rename efi_systbl to efi_systbl_phys, the variable contains the physical address of the EFI System Table. Add _KERNEL guard around its declaration in sys/efi.h. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/amd64/amd64/machdep.c head/sys/sys/efi.h Modified: head/sys/amd64/amd64/machdep.c == --- head/sys/amd64/amd64/machdep.c Wed Sep 21 10:35:44 2016 (r306091) +++ head/sys/amd64/amd64/machdep.c Wed Sep 21 10:55:28 2016 (r306092) @@ -188,7 +188,7 @@ struct msgbuf *msgbufp; * Physical address of the EFI System Table. Stashed from the metadata hints * passed into the kernel and used by the EFI code to call runtime services. */ -vm_paddr_t efi_systbl; +vm_paddr_t efi_systbl_phys; /* Intel ICH registers */ #define ICH_PMBASE 0x400 @@ -1501,7 +1501,7 @@ native_parse_preload_data(u_int64_t modu ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t); db_fetch_ksymtab(ksym_start, ksym_end); #endif - efi_systbl = MD_FETCH(kmdp, MODINFOMD_FW_HANDLE, vm_paddr_t); + efi_systbl_phys = MD_FETCH(kmdp, MODINFOMD_FW_HANDLE, vm_paddr_t); return (kmdp); } Modified: head/sys/sys/efi.h == --- head/sys/sys/efi.h Wed Sep 21 10:35:44 2016(r306091) +++ head/sys/sys/efi.h Wed Sep 21 10:55:28 2016(r306092) @@ -163,5 +163,8 @@ struct efi_systbl { uint64_tst_cfgtbl; }; -extern vm_paddr_t efi_systbl; +#ifdef _KERNEL +extern vm_paddr_t efi_systbl_phys; +#endif /* _KERNEL */ + #endif /* _SYS_EFI_H_ */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306093 - head/usr.sbin/extattr/tests
Author: br Date: Wed Sep 21 10:58:58 2016 New Revision: 306093 URL: https://svnweb.freebsd.org/changeset/base/306093 Log: Disable extattr test on UFS1. This test supports native extended attributes only (e.g. UFS2) Reviewed by: asomers, ngie Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision:https://reviews.freebsd.org/D7981 Modified: head/usr.sbin/extattr/tests/extattr_test.sh Modified: head/usr.sbin/extattr/tests/extattr_test.sh == --- head/usr.sbin/extattr/tests/extattr_test.sh Wed Sep 21 10:55:28 2016 (r306092) +++ head/usr.sbin/extattr/tests/extattr_test.sh Wed Sep 21 10:58:58 2016 (r306093) @@ -355,7 +355,11 @@ atf_init_test_cases() { check_fs() { case `df -T . | tail -n 1 | cut -wf 2` in - "ufs") ;; # UFS is fine + "ufs") + case `dumpfs . | head -1 | awk -F'[()]' '{print $2}'` in + "UFS1") atf_skip "UFS1 is not supported by this test";; + "UFS2") ;; # UFS2 is fine + esac ;; "zfs") ;; # ZFS is fine "tmpfs") atf_skip "tmpfs does not support extended attributes";; esac ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306094 - head/usr.sbin/diskinfo
Author: trasz Date: Wed Sep 21 11:17:58 2016 New Revision: 306094 URL: https://svnweb.freebsd.org/changeset/base/306094 Log: Make it possible for diskinfo(8) to operate on files. This is useful with -t and upcoming -i. MFC after:1 month Modified: head/usr.sbin/diskinfo/diskinfo.c Modified: head/usr.sbin/diskinfo/diskinfo.c == --- head/usr.sbin/diskinfo/diskinfo.c Wed Sep 21 10:58:58 2016 (r306093) +++ head/usr.sbin/diskinfo/diskinfo.c Wed Sep 21 11:17:58 2016 (r306094) @@ -42,6 +42,7 @@ #include #include #include +#include #include static void @@ -61,6 +62,7 @@ static int zonecheck(int fd, uint32_t *z int main(int argc, char **argv) { + struct stat sb; int i, ch, fd, error, exitval = 0; char buf[BUFSIZ], ident[DISK_IDENT_SIZE], physpath[MAXPATHLEN]; char zone_desc[64]; @@ -92,7 +94,7 @@ main(int argc, char **argv) usage(); for (i = 0; i < argc; i++) { - fd = open(argv[i], O_RDONLY); + fd = open(argv[i], O_RDONLY | O_DIRECT); if (fd < 0 && errno == ENOENT && *argv[i] != '/') { sprintf(buf, "%s%s", _PATH_DEV, argv[i]); fd = open(buf, O_RDONLY); @@ -102,33 +104,48 @@ main(int argc, char **argv) exitval = 1; goto out; } - error = ioctl(fd, DIOCGMEDIASIZE, &mediasize); - if (error) { - warnx("%s: ioctl(DIOCGMEDIASIZE) failed, probably not a disk.", argv[i]); + error = fstat(fd, &sb); + if (error != 0) { + warn("cannot stat %s", argv[i]); exitval = 1; goto out; } - error = ioctl(fd, DIOCGSECTORSIZE, §orsize); - if (error) { - warnx("%s: ioctl(DIOCGSECTORSIZE) failed, probably not a disk.", argv[i]); - exitval = 1; - goto out; - } - error = ioctl(fd, DIOCGFWSECTORS, &fwsectors); - if (error) + if (S_ISREG(sb.st_mode)) { + mediasize = sb.st_size; + sectorsize = S_BLKSIZE; fwsectors = 0; - error = ioctl(fd, DIOCGFWHEADS, &fwheads); - if (error) fwheads = 0; - error = ioctl(fd, DIOCGSTRIPESIZE, &stripesize); - if (error) - stripesize = 0; - error = ioctl(fd, DIOCGSTRIPEOFFSET, &stripeoffset); - if (error) + stripesize = sb.st_blksize; stripeoffset = 0; - error = zonecheck(fd, &zone_mode, zone_desc, sizeof(zone_desc)); - if (error == 0) - zoned = 1; + } else { + error = ioctl(fd, DIOCGMEDIASIZE, &mediasize); + if (error) { + warnx("%s: ioctl(DIOCGMEDIASIZE) failed, probably not a disk.", argv[i]); + exitval = 1; + goto out; + } + error = ioctl(fd, DIOCGSECTORSIZE, §orsize); + if (error) { + warnx("%s: ioctl(DIOCGSECTORSIZE) failed, probably not a disk.", argv[i]); + exitval = 1; + goto out; + } + error = ioctl(fd, DIOCGFWSECTORS, &fwsectors); + if (error) + fwsectors = 0; + error = ioctl(fd, DIOCGFWHEADS, &fwheads); + if (error) + fwheads = 0; + error = ioctl(fd, DIOCGSTRIPESIZE, &stripesize); + if (error) + stripesize = 0; + error = ioctl(fd, DIOCGSTRIPEOFFSET, &stripeoffset); + if (error) + stripeoffset = 0; + error = zonecheck(fd, &zone_mode, zone_desc, sizeof(zone_desc)); + if (error == 0) + zoned = 1; + } if (!opt_v) { printf("%s", argv[i]); printf("\t%u", sectorsize); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306095 - head/usr.sbin/iostat
Author: trasz Date: Wed Sep 21 11:22:19 2016 New Revision: 306095 URL: https://svnweb.freebsd.org/changeset/base/306095 Log: Make the "r/s" and "w/s" fields in "iostat -x" a little bit wider; five chars is way too narrow for todays disks. MFC after:1 month Modified: head/usr.sbin/iostat/iostat.c Modified: head/usr.sbin/iostat/iostat.c == --- head/usr.sbin/iostat/iostat.c Wed Sep 21 11:17:58 2016 (r306094) +++ head/usr.sbin/iostat/iostat.c Wed Sep 21 11:22:19 2016 (r306095) @@ -807,7 +807,7 @@ devstats(int perf_select, long double et printf(" cpu "); printf("\n"); if (Iflag == 0) { - printf("device r/s w/s kr/s kw/s " + printf("device r/s w/s kr/s kw/s " " ms/r ms/w ms/o ms/t qlen %%b "); } else { printf("device r/i w/i kr/i" @@ -884,7 +884,7 @@ devstats(int perf_select, long double et mb_per_second_write > ((long double).0005)/1024 || busy_pct > 0.5) { if (Iflag == 0) - printf("%-8.8s %5d %5d %8.1Lf " + printf("%-8.8s %7d %7d %8.1Lf " "%8.1Lf %5d %5d %5d %5d " "%4" PRIu64 " %3.0Lf ", devicename, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306096 - head/usr.sbin/diskinfo
Author: trasz Date: Wed Sep 21 11:27:56 2016 New Revision: 306096 URL: https://svnweb.freebsd.org/changeset/base/306096 Log: Cosmetics - add missing newline. MFC after:1 month Modified: head/usr.sbin/diskinfo/diskinfo.c Modified: head/usr.sbin/diskinfo/diskinfo.c == --- head/usr.sbin/diskinfo/diskinfo.c Wed Sep 21 11:22:19 2016 (r306095) +++ head/usr.sbin/diskinfo/diskinfo.c Wed Sep 21 11:27:56 2016 (r306096) @@ -347,7 +347,7 @@ speeddisk(int fd, off_t mediasize, u_int } TN(2048); - printf("Transfer rates:\n"); + printf("\nTransfer rates:\n"); printf("\toutside: "); rdsect(fd, 0, sectorsize); T0(); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306097 - in head/sys: amd64/amd64 amd64/conf amd64/include conf modules modules/efirt
Author: kib Date: Wed Sep 21 11:31:58 2016 New Revision: 306097 URL: https://svnweb.freebsd.org/changeset/base/306097 Log: Add kernel interfaces to call EFI Runtime Services. Runtime services require special execution environment for the call. Besides that, OS must inform firmware about runtime virtual memory map which will be active during the calls, with the SetVirtualAddressMap() runtime call, done while the 1:1 mapping is still used. There are two complication: the SetVirtualAddressMap() effectively must be done from loader, which needs to know kernel address map in advance. More, despite not explicitely mentioned in the specification, both 1:1 and the map passed to SetVirtualAddressMap() must be active during the SetVirtualAddressMap() call. Second, there are buggy BIOSes which require both mappings active during runtime calls as well, most likely because they fail to identify all relocations to perform. On amd64, we can get rid of both problems by providing 1:1 mapping for the duration of runtime calls, by temprorary remapping user addresses. As result, we avoid the need for loader to know about future kernel address map, and avoid bugs in BIOSes. Typically BIOS only maps something in low 4G. If not runtime bugs, we would take advantage of the DMAP, as previous versions of this patch did. Similar but more complicated trick can be used even for i386 and 32bit runtime, if and when the EFI boot on i386 is supported. We would need a trampoline page, since potentially whole 4G of VA would be switched on calls, instead of only userspace portion on amd64. Context switches are disabled for the duration of the call, FPU access is granted, and interrupts are not disabled. The later is possible because kernel is mapped during calls. To test, the sysctl mib debug.efi_time is provided, setting it to 1 makes one call to EFI get_time() runtime service, on success the efitm structure is printed to the control terminal. Load efirt.ko, or add EFIRT option to the kernel config, to enable code. Discussed with: emaste, imp Tested by:emaste (mac, qemu) Sponsored by: The FreeBSD Foundation MFC after:2 weeks Added: head/sys/amd64/amd64/efirt.c (contents, props changed) - copied, changed from r306093, stable/10/sys/ia64/ia64/efi.c head/sys/modules/efirt/ head/sys/modules/efirt/Makefile (contents, props changed) Modified: head/sys/amd64/conf/NOTES head/sys/amd64/include/efi.h head/sys/conf/files.amd64 head/sys/conf/options.amd64 head/sys/modules/Makefile Copied and modified: head/sys/amd64/amd64/efirt.c (from r306093, stable/10/sys/ia64/ia64/efi.c) == --- stable/10/sys/ia64/ia64/efi.c Wed Sep 21 10:58:58 2016 (r306093, copy source) +++ head/sys/amd64/amd64/efirt.cWed Sep 21 11:31:58 2016 (r306097) @@ -1,8 +1,12 @@ /*- * Copyright (c) 2004 Marcel Moolenaar * Copyright (c) 2001 Doug Rabson + * Copyright (c) 2016 The FreeBSD Foundation * All rights reserved. * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -30,12 +34,28 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include +#include +#include +#include #include -#include +#include +#include #include #include +#include +#include +#include static struct efi_systbl *efi_systbl; static struct efi_cfgtbl *efi_cfgtbl; @@ -73,171 +93,406 @@ static int efi_status_to_errno(efi_status status) { u_long code; - int error; code = status & 0x3ffful; - error = (code < 25) ? efi_status2err[code] : EDOOFUS; - return (error); + return (code < nitems(efi_status2err) ? efi_status2err[code] : EDOOFUS); } -void -efi_boot_finish(void) -{ -} +static struct mtx efi_lock; +static pml4_entry_t *efi_pml4; +static vm_object_t obj_1t1_pt; +static vm_page_t efi_pml4_page; + +static void +efi_destroy_1t1_map(void) +{ + vm_page_t m; + + if (obj_1t1_pt != NULL) { + VM_OBJECT_RLOCK(obj_1t1_pt); + TAILQ_FOREACH(m, &obj_1t1_pt->memq, listq) + m->wire_count = 0; + atomic_subtract_int(&vm_cnt.v_wire_count, + obj_1t1_pt->resident_page_count); + VM_OBJECT_RUNLOCK(obj_1t1_pt); + vm_object_deallocate(obj_1t1_pt); + } -/* - * Collect the entry points for PAL and SAL. Be extra careful about NULL - * pointer values. We're running pre-console, so it's better to return - * error values than to cause panics, machine checks
svn commit: r306098 - head/lib/libutil/tests
Author: br Date: Wed Sep 21 11:59:52 2016 New Revision: 306098 URL: https://svnweb.freebsd.org/changeset/base/306098 Log: Use kqueue(2) instead of select(2). This helps to ensure we will not lose SIGINT sent by parent to child. Reviewed by: sbruno, ngie Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision:https://reviews.freebsd.org/D7892 Modified: head/lib/libutil/tests/pidfile_test.c Modified: head/lib/libutil/tests/pidfile_test.c == --- head/lib/libutil/tests/pidfile_test.c Wed Sep 21 11:31:58 2016 (r306097) +++ head/lib/libutil/tests/pidfile_test.c Wed Sep 21 11:59:52 2016 (r306098) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -43,8 +44,8 @@ __FBSDID("$FreeBSD$"); #include /* - * We need a signal handler so kill(2) will interrupt our child's - * select(2) instead of killing it. + * We need a signal handler so kill(2) will interrupt the child + * instead of killing it. */ static void signal_handler(int sig) @@ -129,7 +130,9 @@ common_test_pidfile_child(const char *fn struct pidfh *pf = NULL; pid_t other = 0, pid = 0; int fd[2], serrno, status; + struct kevent event, ke; char ch; + int kq; unlink(fn); if (pipe(fd) != 0) @@ -166,10 +169,20 @@ common_test_pidfile_child(const char *fn if (pf == NULL) _exit(1); if (pidfile_write(pf) != 0) - _exit(1); + _exit(2); + kq = kqueue(); + if (kq == -1) + _exit(3); + EV_SET(&ke, SIGINT, EVFILT_SIGNAL, EV_ADD, 0, 0, NULL); + /* Attach event to the kqueue. */ + if (kevent(kq, &ke, 1, NULL, 0, NULL) != 0) + _exit(4); + /* Inform the parent we are ready to receive SIGINT */ if (write(fd[1], "*", 1) != 1) - _exit(1); - select(0, 0, 0, 0, 0); + _exit(5); + /* Wait for SIGINT received */ + if (kevent(kq, NULL, 0, &event, 1, NULL) != 1) + _exit(6); _exit(0); } // parent ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306099 - head/usr.sbin/bhyve
Author: ed Date: Wed Sep 21 13:02:43 2016 New Revision: 306099 URL: https://svnweb.freebsd.org/changeset/base/306099 Log: Fix misuse of the basename() and dirname() functions. These functions are allowed to overwrite their input. Pull a copy of the input parameter and call dirname() and basename() on that instead. Do ensure that we reload the pathname value between calls. Modified: head/usr.sbin/bhyve/pci_virtio_console.c Modified: head/usr.sbin/bhyve/pci_virtio_console.c == --- head/usr.sbin/bhyve/pci_virtio_console.cWed Sep 21 11:59:52 2016 (r306098) +++ head/usr.sbin/bhyve/pci_virtio_console.cWed Sep 21 13:02:43 2016 (r306099) @@ -264,6 +264,7 @@ pci_vtcon_sock_add(struct pci_vtcon_soft { struct pci_vtcon_sock *sock; struct sockaddr_un sun; + char *pathcopy; int s = -1, fd = -1, error = 0; sock = calloc(1, sizeof(struct pci_vtcon_sock)); @@ -278,15 +279,24 @@ pci_vtcon_sock_add(struct pci_vtcon_soft goto out; } - fd = open(dirname(path), O_RDONLY | O_DIRECTORY); + pathcopy = strdup(path); + if (pathcopy == NULL) { + error = -1; + goto out; + } + + fd = open(dirname(pathcopy), O_RDONLY | O_DIRECTORY); if (fd < 0) { + free(pathcopy); error = -1; goto out; } sun.sun_family = AF_UNIX; sun.sun_len = sizeof(struct sockaddr_un); - strncpy(sun.sun_path, basename((char *)path), sizeof(sun.sun_path)); + strcpy(pathcopy, path); + strncpy(sun.sun_path, basename(pathcopy), sizeof(sun.sun_path)); + free(pathcopy); if (bindat(fd, s, (struct sockaddr *)&sun, sun.sun_len) < 0) { error = -1; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306100 - head/include
Author: ed Date: Wed Sep 21 13:03:55 2016 New Revision: 306100 URL: https://svnweb.freebsd.org/changeset/base/306100 Log: Refine the dirname(3) compatibility workaround a bit more. Right now our workaround is so good that it doesn't throw any warnings on misuse. This means that people will keep on using the old version of dirname(3) silently without fixing their code. Go ahead and change the prototype of __old_dirname() to also use a plain char *, so that we still get a compiler warning. This won't have any negative effect on building older versions of FreeBSD on HEAD, as those are built with -Werror disabled. Differential Revision:https://reviews.freebsd.org/D7844 Modified: head/include/libgen.h Modified: head/include/libgen.h == --- head/include/libgen.h Wed Sep 21 13:02:43 2016(r306099) +++ head/include/libgen.h Wed Sep 21 13:03:55 2016(r306100) @@ -48,11 +48,11 @@ __END_DECLS * * Apply a workaround where we explicitly link against dirname@FBSD_1.0 * in case this function is called on constant strings, instead of - * making the build fail. + * making the program crash at runtime. */ #if defined(__generic) && !defined(__cplusplus) __BEGIN_DECLS -char *__old_dirname(const char *); +char *__old_dirname(char *); __END_DECLS __sym_compat(dirname, __old_dirname, FBSD_1.0); #definedirname(x) __generic(x, const char *, __old_dirname, dirname)(x) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306102 - in head: share/man/man4 sys/dev/re sys/dev/rl
Author: kevlo Date: Wed Sep 21 14:15:15 2016 New Revision: 306102 URL: https://svnweb.freebsd.org/changeset/base/306102 Log: Add support for the TP-Link TG-3468 v2. This is an RTL8168 chip, which we already support so all we have to do is add the vendor ID. PR: 212876 Submitted by: Tobias Kortkamp MFC after:3 days Modified: head/share/man/man4/re.4 head/sys/dev/re/if_re.c head/sys/dev/rl/if_rlreg.h Modified: head/share/man/man4/re.4 == --- head/share/man/man4/re.4Wed Sep 21 14:11:18 2016(r306101) +++ head/share/man/man4/re.4Wed Sep 21 14:15:15 2016(r306102) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 26, 2011 +.Dd September 21, 2016 .Dt RE 4 .Os .Sh NAME @@ -165,6 +165,8 @@ LinkSys EG1032 (32-bit PCI) .It PLANEX COMMUNICATIONS Inc.\& GN-1200TC (8169S) .It +TP-Link TG-3468 v2 Gigabit Ethernet (8168) +.It USRobotics USR997902 Gigabit Ethernet (8169S) .It Xterasys XN-152 10/100/1000 NIC (8169) Modified: head/sys/dev/re/if_re.c == --- head/sys/dev/re/if_re.c Wed Sep 21 14:11:18 2016(r306101) +++ head/sys/dev/re/if_re.c Wed Sep 21 14:15:15 2016(r306102) @@ -183,6 +183,8 @@ static const struct rl_type re_devs[] = "RealTek 810xE PCIe 10/100baseTX" }, { RT_VENDORID, RT_DEVICEID_8168, 0, "RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet" }, + { NCUBE_VENDORID, RT_DEVICEID_8168, 0, + "TP-Link TG-3468 v2 (RTL8168) Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169, 0, "RealTek 8169/8169S/8169SB(L)/8110S/8110SB(L) Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169SC, 0, Modified: head/sys/dev/rl/if_rlreg.h == --- head/sys/dev/rl/if_rlreg.h Wed Sep 21 14:11:18 2016(r306101) +++ head/sys/dev/rl/if_rlreg.h Wed Sep 21 14:15:15 2016(r306102) @@ -1158,3 +1158,8 @@ struct rl_softc { /* US Robotics 997902 device ID */ #defineUSR_DEVICEID_997902 0x0116 + +/* + * NCube vendor ID + */ +#defineNCUBE_VENDORID 0x10FF ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306104 - head/sys/modules/efirt
Author: kib Date: Wed Sep 21 14:42:23 2016 New Revision: 306104 URL: https://svnweb.freebsd.org/changeset/base/306104 Log: Hopefully, fix build of the module outside the kernel tree. Sponsored by: The FreeBSD Foundation MFC after:2 weeks Modified: head/sys/modules/efirt/Makefile Modified: head/sys/modules/efirt/Makefile == --- head/sys/modules/efirt/Makefile Wed Sep 21 14:19:01 2016 (r306103) +++ head/sys/modules/efirt/Makefile Wed Sep 21 14:42:23 2016 (r306104) @@ -4,5 +4,6 @@ KMOD= efirt SRCS= efirt.c +SRCS+= device_if.h bus_if.h .include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306109 - head/lib/libc/stdtime
Author: ache Date: Wed Sep 21 15:47:40 2016 New Revision: 306109 URL: https://svnweb.freebsd.org/changeset/base/306109 Log: 1) For already non-standard %z extension implement GNU compatible formats: +hh and -hh. 2) Check for incorrect values for %z. MFC after: 7 days Modified: head/lib/libc/stdtime/strptime.c Modified: head/lib/libc/stdtime/strptime.c == --- head/lib/libc/stdtime/strptime.cWed Sep 21 15:29:35 2016 (r306108) +++ head/lib/libc/stdtime/strptime.cWed Sep 21 15:47:40 2016 (r306109) @@ -582,10 +582,16 @@ label: i *= 10; i += *buf - '0'; buf++; + } else if (len == 2) { + i *= 100; + break; } else return (NULL); } + if (i > 1400 || (sign == -1 && i > 1200) || + (i % 100) >= 60) + return (NULL); tm->tm_hour -= sign * (i / 100); tm->tm_min -= sign * (i % 100); *GMTp = 1; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306126 - head/sys/dev/pci
Author: jhb Date: Wed Sep 21 16:51:56 2016 New Revision: 306126 URL: https://svnweb.freebsd.org/changeset/base/306126 Log: Fix invalid vendor ID constant (typo). During a bus rescan the check for an invalid vendor ID of a subfunction used the wrong constant. Submitted by: Dexuan Cui MFC after:3 days Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c == --- head/sys/dev/pci/pci.c Wed Sep 21 16:29:15 2016(r306125) +++ head/sys/dev/pci/pci.c Wed Sep 21 16:51:56 2016(r306126) @@ -3971,7 +3971,7 @@ pci_rescan_method(device_t dev) if (hdrtype & PCIM_MFDEV) pcifunchigh = PCIB_MAXFUNCS(pcib); for (f = 0; f <= pcifunchigh; f++) { - if (REG(PCIR_VENDOR, 2) == 0xfff) + if (REG(PCIR_VENDOR, 2) == 0x) continue; /* ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r306065 - in head/sys vs. PowerMacs: Nathan's trail patch included but inappropriate?
On Sep 21, 2016, at 1:46 AM, Mark Millard wrote: The following from https://lists.freebsd.org/pipermail/svn-src-head/2016-September/091934.html seems in include a patch that Nathan made for testing on PowerMac/ iMac/Xserve G5's that failed the PowerMac7,3 test that was tried by Jukka A. Ukkonen. Modified: head/sys/powerpc/ofw/ofw_machdep.c = = = = = = = = = = --- head/sys/powerpc/ofw/ofw_machdep.c Wed Sep 21 02:27:23 2016 (r306064) +++ head/sys/powerpc/ofw/ofw_machdep.c Wed Sep 21 02:28:39 2016 (r306065) @@ -99,6 +99,7 @@ ofw_restore_trap_vec(char *restore_trap_ /* * Saved SPRG0-3 from OpenFirmware. Will be restored prior to the callback. */ +#ifndef __powerpc64__ register_t ofw_sprg0_save; static __inline void @@ -140,6 +141,8 @@ ofw_sprg_restore(void) } #endif +#endif + static int parse_ofw_memory(phandle_t node, const char *prop, struct mem_region *output) { @@ -344,11 +347,12 @@ OF_initial_setup(void *fdt_ptr, void *ju ofmsr[0] = mfmsr(); #ifdef __powerpc64__ ofmsr[0] &= ~PSL_SF; - #endif + #else __asm __volatile("mfsprg0 %0" : "=&r"(ofmsr[1])); __asm __volatile("mfsprg1 %0" : "=&r"(ofmsr[2])); __asm __volatile("mfsprg2 %0" : "=&r"(ofmsr[3])); __asm __volatile("mfsprg3 %0" : "=&r"(ofmsr[4])); + #endif openfirmware_entry = openfirm; if (ofmsr[0] & PSL_DR) @@ -440,7 +444,9 @@ openfirmware_core(void *args) */ oldmsr = intr_disable(); +#ifndef __powerpc64__ ofw_sprg_prepare(); +#endif /* Save trap vectors */ ofw_save_trap_vec(save_trap_of); @@ -463,7 +469,9 @@ openfirmware_core(void *args) /* Restore trap vecotrs */ ofw_restore_trap_vec(save_trap_of); +#ifndef __powerpc64__ ofw_sprg_restore(); +#endif intr_restore(oldmsr); Part of the ofw_sprg_prepare() and ofw_sprg_restore() activity is required for PowerMac G5's to boot: the save of the FreeBSD sprg0 value and its later restore back to sprg0. (Established by other testing after Nathan's patch was tried.) My guess is that this code was accidentally included in -r306065, not intentionally included. [There is the separate issue that avoiding restoring the Open Firmware sprg0 value before calling into Open Firmware (leaving the FreeBSD value in place) helps PowerMac G5's boot more reliably by allowing correct handling some SLB faults that sometimes occur.] === Mark Millard markmi at dsl-only.net Crap, I got extra stuff in my diff. Going to revert this part tonight, until everything is known good. - Justin ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306127 - head/lib/libc/sys
Author: cem Date: Wed Sep 21 17:51:27 2016 New Revision: 306127 URL: https://svnweb.freebsd.org/changeset/base/306127 Log: posix_openpt.2: Sort includes per style(9) Sponsored by: Dell EMC Isilon Modified: head/lib/libc/sys/posix_openpt.2 Modified: head/lib/libc/sys/posix_openpt.2 == --- head/lib/libc/sys/posix_openpt.2Wed Sep 21 16:51:56 2016 (r306126) +++ head/lib/libc/sys/posix_openpt.2Wed Sep 21 17:51:27 2016 (r306127) @@ -37,7 +37,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 21, 2013 +.Dd September 21, 2016 .Dt POSIX_OPENPT 2 .Os .Sh NAME @@ -46,8 +46,8 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In stdlib.h .In fcntl.h +.In stdlib.h .Ft int .Fn posix_openpt "int oflag" .Sh DESCRIPTION ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306129 - head/usr.sbin/diskinfo
Author: trasz Date: Wed Sep 21 18:07:25 2016 New Revision: 306129 URL: https://svnweb.freebsd.org/changeset/base/306129 Log: Reduce code duplication by factoring out the delta_t() function. No functional changes. MFC after:1 month Modified: head/usr.sbin/diskinfo/diskinfo.c Modified: head/usr.sbin/diskinfo/diskinfo.c == --- head/usr.sbin/diskinfo/diskinfo.c Wed Sep 21 18:07:06 2016 (r306128) +++ head/usr.sbin/diskinfo/diskinfo.c Wed Sep 21 18:07:25 2016 (r306129) @@ -237,14 +237,24 @@ T0(void) gettimeofday(&tv1, NULL); } -static void -TN(int count) +static double +delta_t(void) { double dt; gettimeofday(&tv2, NULL); dt = (tv2.tv_usec - tv1.tv_usec) / 1e6; dt += (tv2.tv_sec - tv1.tv_sec); + + return (dt); +} + +static void +TN(int count) +{ + double dt; + + dt = delta_t(); printf("%5d iter in %10.6f sec = %8.3f msec\n", count, dt, dt * 1000.0 / count); } @@ -254,9 +264,7 @@ TR(double count) { double dt; - gettimeofday(&tv2, NULL); - dt = (tv2.tv_usec - tv1.tv_usec) / 1e6; - dt += (tv2.tv_sec - tv1.tv_sec); + dt = delta_t(); printf("%8.0f kbytes in %10.6f sec = %8.0f kbytes/sec\n", count, dt, count / dt); } @@ -390,9 +398,7 @@ commandtime(int fd, off_t mediasize, u_i T0(); for (i = 0; i < 10; i++) rdmega(fd); - gettimeofday(&tv2, NULL); - dtmega = (tv2.tv_usec - tv1.tv_usec) / 1e6; - dtmega += (tv2.tv_sec - tv1.tv_sec); + dtmega = delta_t(); printf("\ttime to read 10MB block%10.6f sec\t= %8.3f msec/sector\n", dtmega, dtmega*100/2048); @@ -401,9 +407,7 @@ commandtime(int fd, off_t mediasize, u_i T0(); for (i = 0; i < 20480; i++) rdsect(fd, 0, sectorsize); - gettimeofday(&tv2, NULL); - dtsector = (tv2.tv_usec - tv1.tv_usec) / 1e6; - dtsector += (tv2.tv_sec - tv1.tv_sec); + dtsector = delta_t(); printf("\ttime to read 20480 sectors %10.6f sec\t= %8.3f msec/sector\n", dtsector, dtsector*100/2048); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306131 - head/usr.bin/mkimg
Author: asomers Date: Wed Sep 21 18:42:17 2016 New Revision: 306131 URL: https://svnweb.freebsd.org/changeset/base/306131 Log: Update mkimg(1) author's contact info Reviewed by: marcel, imp MFC after:3 days Sponsored by: Spectra Logic Corp Differential Revision:https://reviews.freebsd.org/D7991 Modified: head/usr.bin/mkimg/mkimg.1 Modified: head/usr.bin/mkimg/mkimg.1 == --- head/usr.bin/mkimg/mkimg.1 Wed Sep 21 18:12:38 2016(r306130) +++ head/usr.bin/mkimg/mkimg.1 Wed Sep 21 18:42:17 2016(r306131) @@ -328,4 +328,4 @@ utility first appeared in The .Nm utility and manpage were written by -.An Marcel Moolenaar Aq Mt marc...@juniper.net . +.An Marcel Moolenaar Aq Mt mar...@freebsd.org . ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306132 - in head/sys: dev/usb/input modules/usb/ukbd
Author: gonzo Date: Wed Sep 21 18:47:21 2016 New Revision: 306132 URL: https://svnweb.freebsd.org/changeset/base/306132 Log: Add evdev support to ukbd driver event generation is disabled by default in favour of kbdmux. This behavoiur is controlled by kern.evdev.rcpt_mask sysctl, bit 3 should be set to give priority to hw over mux Submitted by: Vladimir Kondratiev Reviewed by: hans Differential Revision:https://reviews.freebsd.org/D7957 Modified: head/sys/dev/usb/input/ukbd.c head/sys/modules/usb/ukbd/Makefile Modified: head/sys/dev/usb/input/ukbd.c == --- head/sys/dev/usb/input/ukbd.c Wed Sep 21 18:42:17 2016 (r306131) +++ head/sys/dev/usb/input/ukbd.c Wed Sep 21 18:47:21 2016 (r306132) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" #include "opt_kbd.h" #include "opt_ukbd.h" +#include "opt_evdev.h" #include #include @@ -71,6 +72,11 @@ __FBSDID("$FreeBSD$"); #include +#ifdef EVDEV +#include +#include +#endif + #include #include #include @@ -160,6 +166,9 @@ struct ukbd_softc { struct usb_device *sc_udev; struct usb_interface *sc_iface; struct usb_xfer *sc_xfer[UKBD_N_TRANSFER]; +#ifdef EVDEV + struct evdev_dev *sc_evdev; +#endif sbintime_t sc_co_basetime; int sc_delay; @@ -354,6 +363,12 @@ static device_attach_t ukbd_attach; static device_detach_t ukbd_detach; static device_resume_t ukbd_resume; +#ifdef EVDEV +static struct evdev_methods ukbd_evdev_methods = { + .ev_event = evdev_ev_kbd_event, +}; +#endif + static uint8_t ukbd_any_key_pressed(struct ukbd_softc *sc) { @@ -388,6 +403,14 @@ ukbd_put_key(struct ukbd_softc *sc, uint DPRINTF("0x%02x (%d) %s\n", key, key, (key & KEY_RELEASE) ? "released" : "pressed"); +#ifdef EVDEV + if (evdev_rcpt_mask & EVDEV_RCPT_HW_KBD && sc->sc_evdev != NULL) { + evdev_push_event(sc->sc_evdev, EV_KEY, + evdev_hid2key(KEY_INDEX(key)), !(key & KEY_RELEASE)); + evdev_sync(sc->sc_evdev); + } +#endif + if (sc->sc_inputs < UKBD_IN_BUF_SIZE) { sc->sc_input[sc->sc_inputtail] = key; ++(sc->sc_inputs); @@ -908,6 +931,11 @@ ukbd_set_leds_callback(struct usb_xfer * if (!any) break; +#ifdef EVDEV + if (sc->sc_evdev != NULL) + evdev_push_leds(sc->sc_evdev, sc->sc_leds); +#endif + /* range check output report length */ len = sc->sc_led_size; if (len > (UKBD_BUFFER_SIZE - 1)) @@ -1183,6 +1211,10 @@ ukbd_attach(device_t dev) usb_error_t err; uint16_t n; uint16_t hid_len; +#ifdef EVDEV + struct evdev_dev *evdev; + int i; +#endif #ifdef USB_DEBUG int rate; #endif @@ -1297,6 +1329,37 @@ ukbd_attach(device_t dev) goto detach; } #endif + +#ifdef EVDEV + evdev = evdev_alloc(); + evdev_set_name(evdev, device_get_desc(dev)); + evdev_set_phys(evdev, device_get_nameunit(dev)); + evdev_set_id(evdev, BUS_USB, uaa->info.idVendor, + uaa->info.idProduct, 0); + evdev_set_serial(evdev, usb_get_serial(uaa->device)); + evdev_set_methods(evdev, kbd, &ukbd_evdev_methods); + evdev_support_event(evdev, EV_SYN); + evdev_support_event(evdev, EV_KEY); + if (sc->sc_flags & (UKBD_FLAG_NUMLOCK | UKBD_FLAG_CAPSLOCK | + UKBD_FLAG_SCROLLLOCK)) + evdev_support_event(evdev, EV_LED); + evdev_support_event(evdev, EV_REP); + + for (i = 0x00; i <= 0xFF; i++) + evdev_support_key(evdev, evdev_hid2key(i)); + if (sc->sc_flags & UKBD_FLAG_NUMLOCK) + evdev_support_led(evdev, LED_NUML); + if (sc->sc_flags & UKBD_FLAG_CAPSLOCK) + evdev_support_led(evdev, LED_CAPSL); + if (sc->sc_flags & UKBD_FLAG_SCROLLLOCK) + evdev_support_led(evdev, LED_SCROLLL); + + if (evdev_register(evdev)) + evdev_free(evdev); + else + sc->sc_evdev = evdev; +#endif + sc->sc_flags |= UKBD_FLAG_ATTACHED; if (bootverbose) { @@ -1367,6 +1430,12 @@ ukbd_detach(device_t dev) } } #endif + +#ifdef EVDEV + if (sc->sc_evdev != NULL) + evdev_free(sc->sc_evdev); +#endif + if (KBD_IS_CONFIGURED(&sc->sc_kbd)) { error = kbd_unregister(&sc->sc_kbd); if (error) { @@ -1884,6 +1953,10 @@ ukbd_ioctl_locked(keyboard_t *kbd, u_lon */ kbd->kb_delay1 = imax(((int *)arg)[0], 250); kbd->kb_delay2 = imax(((int *)arg)[1], 34); +#ifdef EVDEV + if (sc->sc_evdev != NULL) + evdev_push_repeats(sc->sc_evdev, kbd); +#endif
svn commit: r306133 - head/share/misc
Author: jrm (ports committer) Date: Wed Sep 21 18:50:11 2016 New Revision: 306133 URL: https://svnweb.freebsd.org/changeset/base/306133 Log: Add myself (jrm) as a ports committer and update mentor/mentee relationships Approved by: swills (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot == --- head/share/misc/committers-ports.dotWed Sep 21 18:47:21 2016 (r306132) +++ head/share/misc/committers-ports.dotWed Sep 21 18:50:11 2016 (r306133) @@ -129,6 +129,7 @@ joerg [label="Joerg Wunsch\njoerg@FreeBS johans [label="Johan Selst\njoh...@freebsd.org\n2006/04/01"] josef [label="Josef El-Rayes\njo...@freebsd.org\n2004/12/20"] jpaetzel [label="Josh Paetzel\njpaet...@freebsd.org\n2008/09/05"] +jrm [label="Joseph R. Mingrone\n...@freebsd.org\n2016/09/17"] jsa [label="Joseph S. Atkinson\n...@freebsd.org\n2010/07/15"] junovitch [label="Jason Unovitch\njunovi...@freebsd.org\n2015/07/27"] jylefort [label="Jean-Yves Lefort\njylef...@freebsd.org\n2005/04/12"] @@ -258,6 +259,8 @@ ade -> jpaetzel ahze -> shaun ahze -> tmclaugh +amdmi3 -> jrm + araujo -> lippe araujo -> pclin araujo -> pgollucci @@ -577,6 +580,7 @@ stas -> araujo steve -> netchild swills -> feld +swills -> jrm swills -> milki swills -> pclin swills -> robak ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306134 - in head/sys: dev/usb/input modules/usb/ums
Author: gonzo Date: Wed Sep 21 18:52:03 2016 New Revision: 306134 URL: https://svnweb.freebsd.org/changeset/base/306134 Log: Add evdev support to ums(4) event generation is disabled by default in favour of sysmouse. This behavoiur is controlled by kern.evdev.rcpt_mask sysctl, bit 2 should be set to give priority to hw over sysmouse Submitted by: Vladimir Kondratiev Reviewed by: hans Differential Revision:https://reviews.freebsd.org/D7863 Modified: head/sys/dev/usb/input/ums.c head/sys/modules/usb/ums/Makefile Modified: head/sys/dev/usb/input/ums.c == --- head/sys/dev/usb/input/ums.cWed Sep 21 18:50:11 2016 (r306133) +++ head/sys/dev/usb/input/ums.cWed Sep 21 18:52:03 2016 (r306134) @@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$"); * HID spec: http://www.usb.org/developers/devclass_docs/HID1_11.pdf */ +#include "opt_evdev.h" + #include #include #include @@ -68,6 +70,11 @@ __FBSDID("$FreeBSD$"); #include +#ifdef EVDEV +#include +#include +#endif + #include #include #include @@ -135,10 +142,18 @@ struct ums_softc { int sc_pollrate; int sc_fflags; +#ifdef EVDEV + int sc_evflags; +#defineUMS_EVDEV_OPENED1 +#endif uint8_t sc_buttons; uint8_t sc_iid; uint8_t sc_temp[64]; + +#ifdef EVDEV + struct evdev_dev *sc_evdev; +#endif }; static void ums_put_queue_timeout(void *__sc); @@ -149,25 +164,39 @@ static device_probe_t ums_probe; static device_attach_t ums_attach; static device_detach_t ums_detach; -static usb_fifo_cmd_t ums_start_read; -static usb_fifo_cmd_t ums_stop_read; -static usb_fifo_open_t ums_open; -static usb_fifo_close_t ums_close; -static usb_fifo_ioctl_t ums_ioctl; +static usb_fifo_cmd_t ums_fifo_start_read; +static usb_fifo_cmd_t ums_fifo_stop_read; +static usb_fifo_open_t ums_fifo_open; +static usb_fifo_close_t ums_fifo_close; +static usb_fifo_ioctl_t ums_fifo_ioctl; + +#ifdef EVDEV +static evdev_open_t ums_ev_open; +static evdev_close_t ums_ev_close; +#endif +static voidums_start_rx(struct ums_softc *); +static voidums_stop_rx(struct ums_softc *); static voidums_put_queue(struct ums_softc *, int32_t, int32_t, int32_t, int32_t, int32_t); static int ums_sysctl_handler_parseinfo(SYSCTL_HANDLER_ARGS); static struct usb_fifo_methods ums_fifo_methods = { - .f_open = &ums_open, - .f_close = &ums_close, - .f_ioctl = &ums_ioctl, - .f_start_read = &ums_start_read, - .f_stop_read = &ums_stop_read, + .f_open = &ums_fifo_open, + .f_close = &ums_fifo_close, + .f_ioctl = &ums_fifo_ioctl, + .f_start_read = &ums_fifo_start_read, + .f_stop_read = &ums_fifo_stop_read, .basename[0] = "ums", }; +#ifdef EVDEV +static struct evdev_methods ums_evdev_methods = { + .ev_open = &ums_ev_open, + .ev_close = &ums_ev_close, +}; +#endif + static void ums_put_queue_timeout(void *__sc) { @@ -327,11 +356,17 @@ ums_intr_callback(struct usb_xfer *xfer, case USB_ST_SETUP: tr_setup: /* check if we can put more data into the FIFO */ - if (usb_fifo_put_bytes_max( - sc->sc_fifo.fp[USB_FIFO_RX]) != 0) { - usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); - usbd_transfer_submit(xfer); + if (usb_fifo_put_bytes_max(sc->sc_fifo.fp[USB_FIFO_RX]) == 0) { +#ifdef EVDEV + if (sc->sc_evflags == 0) + break; +#else + break; +#endif } + + usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); + usbd_transfer_submit(xfer); break; default:/* Error */ @@ -655,6 +690,41 @@ ums_attach(device_t dev) if (err) goto detach; +#ifdef EVDEV + sc->sc_evdev = evdev_alloc(); + evdev_set_name(sc->sc_evdev, device_get_desc(dev)); + evdev_set_phys(sc->sc_evdev, device_get_nameunit(dev)); + evdev_set_id(sc->sc_evdev, BUS_USB, uaa->info.idVendor, + uaa->info.idProduct, 0); + evdev_set_serial(sc->sc_evdev, usb_get_serial(uaa->device)); + evdev_set_methods(sc->sc_evdev, sc, &ums_evdev_methods); + evdev_support_prop(sc->sc_evdev, INPUT_PROP_POINTER); + evdev_support_event(sc->sc_evdev, EV_SYN); + evdev_support_event(sc->sc_evdev, EV_REL); + evdev_support_event(sc->sc_evdev, EV_KEY); + + info = &sc->sc_info[0]; + + if (info->sc_flags & UMS_FLAG_X_AXIS) + evdev_support_rel(sc->sc_evdev, REL_X); + + if (info->sc_flags & UMS_FLAG_Y_AXIS) + evdev_support_rel(sc->sc_evdev, REL_Y); + + if (info->sc_flags & UMS_FLAG_Z_AXIS) + evdev_support_rel(sc->sc_evdev, REL_WHEEL); +
svn commit: r306135 - head/usr.bin/calendar/calendars
Author: jrm (ports committer) Date: Wed Sep 21 18:52:49 2016 New Revision: 306135 URL: https://svnweb.freebsd.org/changeset/base/306135 Log: Add myself (jrm) to calendar.freebsd Approved by:swills (mentor) Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd == --- head/usr.bin/calendar/calendars/calendar.freebsdWed Sep 21 18:52:03 2016(r306134) +++ head/usr.bin/calendar/calendars/calendar.freebsdWed Sep 21 18:52:49 2016(r306135) @@ -342,6 +342,7 @@ 10/26 Philip M. Gollucci born in Silver Spring, Maryland, United States, 1979 10/27 Takanori Watanabe born in Numazu, Shizuoka, Japan, 1972 11/05 M. Warner Losh born in Kansas City, Kansas, United States, 1966 +11/08 Joseph R. Mingrone born in Charlottetown, Prince Edward Island, Canada, 1976 11/09 Coleman Kane born in Cincinnati, Ohio, United States, 1980 11/09 Antoine Brodin born in Bagnolet, France, 1981 11/10 Gregory Neil Shapiro born in Providence, Rhode Island, United States, 1970 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306137 - head/tools/tools/cxgbetool
Author: np Date: Wed Sep 21 19:26:36 2016 New Revision: 306137 URL: https://svnweb.freebsd.org/changeset/base/306137 Log: cxgbetool: Add T6 support to the SGE context decoder. Obtained from:Chelsio Communications Sponsored by: Chelsio Communications Modified: head/tools/tools/cxgbetool/cxgbetool.c Modified: head/tools/tools/cxgbetool/cxgbetool.c == --- head/tools/tools/cxgbetool/cxgbetool.c Wed Sep 21 19:11:37 2016 (r306136) +++ head/tools/tools/cxgbetool/cxgbetool.c Wed Sep 21 19:26:36 2016 (r306137) @@ -1360,7 +1360,7 @@ show_struct(const uint32_t *words, int n #define FIELD1(name, start) FIELD(name, start, start) static void -show_t5_ctxt(const struct t4_sge_context *p) +show_t5t6_ctxt(const struct t4_sge_context *p, int vers) { static struct field_desc egress_t5[] = { FIELD("DCA_ST:", 181, 191), @@ -1400,6 +1400,44 @@ show_t5_ctxt(const struct t4_sge_context FIELD1("CachePriority:", 0), { NULL } }; + static struct field_desc egress_t6[] = { + FIELD("DCA_ST:", 181, 191), + FIELD1("StatusPgNS:", 180), + FIELD1("StatusPgRO:", 179), + FIELD1("FetchNS:", 178), + FIELD1("FetchRO:", 177), + FIELD1("Valid:", 176), + FIELD1("ReschedulePending_1:", 175), + FIELD1("PCIeDataChannel:", 174), + FIELD1("StatusPgTPHintEn:", 173), + FIELD("StatusPgTPHint:", 171, 172), + FIELD1("FetchTPHintEn:", 170), + FIELD("FetchTPHint:", 168, 169), + FIELD1("FCThreshOverride:", 167), + { "WRLength:", 162, 166, 9, 0, 1 }, + FIELD1("WRLengthKnown:", 161), + FIELD1("ReschedulePending:", 160), + FIELD("TimerIx:", 157, 159), + FIELD1("FetchBurstMin:", 156), + FIELD1("FLMPacking:", 155), + FIELD("FetchBurstMax:", 153, 154), + FIELD("uPToken:", 133, 152), + FIELD1("uPTokenEn:", 132), + FIELD1("UserModeIO:", 131), + FIELD("uPFLCredits:", 123, 130), + FIELD1("uPFLCreditEn:", 122), + FIELD("FID:", 111, 121), + FIELD("HostFCMode:", 109, 110), + FIELD1("HostFCOwner:", 108), + { "CIDXFlushThresh:", 105, 107, 0, 0, 1 }, + FIELD("CIDX:", 89, 104), + FIELD("PIDX:", 73, 88), + { "BaseAddress:", 18, 72, 9, 1 }, + FIELD("QueueSize:", 2, 17), + FIELD1("QueueType:", 1), + FIELD1("FetchSizeMode:", 0), + { NULL } + }; static struct field_desc fl_t5[] = { FIELD("DCA_ST:", 181, 191), FIELD1("StatusPgNS:", 180), @@ -1470,6 +1508,42 @@ show_t5_ctxt(const struct t4_sge_context FIELD1("CachePriority:", 0), { NULL } }; + static struct field_desc ingress_t6[] = { + FIELD1("SP_NS:", 158), + FIELD1("SP_RO:", 157), + FIELD1("SP_TPHintEn:", 156), + FIELD("SP_TPHint:", 154, 155), + FIELD("DCA_ST:", 143, 153), + FIELD1("ISCSICoalescing:", 142), + FIELD1("Queue_Valid:", 141), + FIELD1("TimerPending:", 140), + FIELD1("DropRSS:", 139), + FIELD("PCIeChannel:", 137, 138), + FIELD1("SEInterruptArmed:", 136), + FIELD1("CongestionMgtEnable:", 135), + FIELD1("NoSnoop:", 134), + FIELD1("RelaxedOrdering:", 133), + FIELD1("GTSmode:", 132), + FIELD1("TPHintEn:", 131), + FIELD("TPHint:", 129, 130), + FIELD1("UpdateScheduling:", 128), + FIELD("UpdateDelivery:", 126, 127), + FIELD1("InterruptSent:", 125), + FIELD("InterruptIDX:", 114, 124), + FIELD1("InterruptDestination:", 113), + FIELD1("InterruptArmed:", 112), + FIELD("RxIntCounter:", 106, 111), + FIELD("RxIntCounterThreshold:", 104, 105), + FIELD1("Generation:", 103), + { "BaseAddress:", 48, 102, 9, 1 }, + FIELD("PIDX:", 32, 47), + FIELD("CIDX:", 16, 31), + { "QueueSize:", 4, 15, 4, 0 }, + { "QueueEntrySize:", 2, 3, 4, 0, 1 }, + FIELD1("QueueEntryOverride:", 1), + FIELD1("CachePriority:", 0), + { NULL } + }; static struct field_desc flm_t5[] = { FIELD1("Valid:", 89), FIELD("SplitLenMode:", 87, 88), @@ -1489,6 +1563,28 @@ show_t5_ctxt(const struct t4_sge_context FIELD("PIDX:", 0, 7), { NULL } }; +
svn commit: r306138 - head/tools/tools/cxgbetool
Author: np Date: Wed Sep 21 19:30:34 2016 New Revision: 306138 URL: https://svnweb.freebsd.org/changeset/base/306138 Log: Fix typo. Modified: head/tools/tools/cxgbetool/cxgbetool.c Modified: head/tools/tools/cxgbetool/cxgbetool.c == --- head/tools/tools/cxgbetool/cxgbetool.c Wed Sep 21 19:26:36 2016 (r306137) +++ head/tools/tools/cxgbetool/cxgbetool.c Wed Sep 21 19:30:34 2016 (r306138) @@ -1577,7 +1577,7 @@ show_t5t6_ctxt(const struct t4_sge_conte FIELD1("PackEn:", 50), FIELD1("Cache_Lock :", 49), FIELD1("CongDrop:", 48), - FIELD1("Inflifght:", 47), + FIELD1("Inflight:", 47), FIELD1("CongEn:", 46), FIELD1("CongMode:", 45), FIELD("PackOffset:", 20, 39), ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306139 - head/sys/net80211
Author: adrian Date: Wed Sep 21 19:48:07 2016 New Revision: 306139 URL: https://svnweb.freebsd.org/changeset/base/306139 Log: [net80211] don't add IBSS node table entries for neighbors from other SSIDs. The adhoc probe/beacon input path was creating nodes for all SSIDs. This wasn't a problem when the NICs were configured to only process frames for the current BSSID, but that didn't allow IBSS merges. Once avos and I flipped on "beacons from all BSSIDs" to allow for correct IBSS merging, we found this interesting behaviour. This adds a check against the current SSID. * If there's no VAP SSID, allow anything * If there's a VAP SSID, check if the incoming frame has a suitable SSID and if so, allow it. This prevents nodes being created for other SSIDs in probe and beacon frames - ie, beacons overlapping IBSSes with different SSIDs, and probe requests from arbitrary devices. Tested: * AR9380, IBSS mode, both local and other IBSSes. Reviewed by: avos Differential Revision:https://reviews.freebsd.org/D7959 Modified: head/sys/net80211/ieee80211_adhoc.c head/sys/net80211/ieee80211_node.c head/sys/net80211/ieee80211_node.h Modified: head/sys/net80211/ieee80211_adhoc.c == --- head/sys/net80211/ieee80211_adhoc.c Wed Sep 21 19:30:34 2016 (r306138) +++ head/sys/net80211/ieee80211_adhoc.c Wed Sep 21 19:48:07 2016 (r306139) @@ -747,8 +747,20 @@ adhoc_recv_mgmt(struct ieee80211_node *n if (!IEEE80211_ADDR_EQ(wh->i_addr2, ni->ni_macaddr)) { /* * Create a new entry in the neighbor table. +* +* XXX TODO: +* +* Here we're not scanning; so if we have an +* SSID then make sure it matches our SSID. +* Otherwise this code will match on all IBSS +* beacons/probe requests for all SSIDs, +* filling the node table with nodes that +* aren't ours. */ - ni = ieee80211_add_neighbor(vap, wh, &scan); + if (ieee80211_ibss_node_check_new(ni, &scan)) + ni = ieee80211_add_neighbor(vap, wh, &scan); + else + ni = NULL; } else if (ni->ni_capinfo == 0) { /* * Update faked node created on transmit. Modified: head/sys/net80211/ieee80211_node.c == --- head/sys/net80211/ieee80211_node.c Wed Sep 21 19:30:34 2016 (r306138) +++ head/sys/net80211/ieee80211_node.c Wed Sep 21 19:48:07 2016 (r306139) @@ -579,6 +579,62 @@ ieee80211_ibss_merge_check(struct ieee80 } /* + * Check if the given node should populate the node table. + * + * We need to be in "see all beacons for all ssids" mode in order + * to do IBSS merges, however this means we will populate nodes for + * /all/ IBSS SSIDs, versus just the one we care about. + * + * So this check ensures the node can actually belong to our IBSS + * configuration. For now it simply checks the SSID. + */ +int +ieee80211_ibss_node_check_new(struct ieee80211_node *ni, +const struct ieee80211_scanparams *scan) +{ + struct ieee80211vap *vap = ni->ni_vap; + int i; + + /* +* If we have no SSID and no scan SSID, return OK. +*/ + if (vap->iv_des_nssid == 0 && scan->ssid == NULL) + goto ok; + + /* +* If we have one of (SSID, scan SSID) then return error. +*/ + if (!! (vap->iv_des_nssid == 0) != !! (scan->ssid == NULL)) + goto mismatch; + + /* +* Double-check - we need scan SSID. +*/ + if (scan->ssid == NULL) + goto mismatch; + + /* +* Check if the scan SSID matches the SSID list for the VAP. +*/ + for (i = 0; i < vap->iv_des_nssid; i++) { + + /* Sanity length check */ + if (vap->iv_des_ssid[i].len != scan->ssid[1]) + continue; + + /* Note: SSID in the scan entry is the IE format */ + if (memcmp(vap->iv_des_ssid[i].ssid, scan->ssid + 2, + vap->iv_des_ssid[i].len) == 0) + goto ok; + } + +mismatch: + return (0); +ok: + return (1); +} + +/* * Handle 802.11 ad hoc network merge. The * convention, set by the Wireless Ethernet Compatibility Alliance * (WECA), is that an 802.11 station will change its BSSID to ma
svn commit: r306142 - head/sys/dev/iwm
Author: adrian Date: Wed Sep 21 20:56:10 2016 New Revision: 306142 URL: https://svnweb.freebsd.org/changeset/base/306142 Log: [iwm] use rate control info from the node txrates; use mgmtrate for EAPOL frames This changes the transmit rate control code to do a few things: * use fixed rates (mcast, ucast, mgmt) where required. * Don't use a hard-coded 11a or 11bg rate for non-data frames - use what net80211 says we should use. * use mgmtrate for EAPOL frames. Reviewed by: avos Differential Revision:https://reviews.freebsd.org/D7994 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c == --- head/sys/dev/iwm/if_iwm.c Wed Sep 21 19:53:51 2016(r306141) +++ head/sys/dev/iwm/if_iwm.c Wed Sep 21 20:56:10 2016(r306142) @@ -324,7 +324,7 @@ static void iwm_update_sched(struct iwm_ #endif static const struct iwm_rate * iwm_tx_fill_cmd(struct iwm_softc *, struct iwm_node *, - struct ieee80211_frame *, struct iwm_tx_cmd *); + struct mbuf *, struct iwm_tx_cmd *); static int iwm_tx(struct iwm_softc *, struct mbuf *, struct ieee80211_node *, int); static int iwm_raw_xmit(struct ieee80211_node *, struct mbuf *, @@ -3197,24 +3197,36 @@ iwm_tx_rateidx_lookup(struct iwm_softc * */ static const struct iwm_rate * iwm_tx_fill_cmd(struct iwm_softc *sc, struct iwm_node *in, - struct ieee80211_frame *wh, struct iwm_tx_cmd *tx) + struct mbuf *m, struct iwm_tx_cmd *tx) { - struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_node *ni = &in->in_ni; + struct ieee80211_frame *wh; + const struct ieee80211_txparam *tp = ni->ni_txparms; const struct iwm_rate *rinfo; - int type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; - int ridx, rate_flags; + int type; + int ridx, rate_flags, i; + + wh = mtod(m, struct ieee80211_frame *); + type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; tx->rts_retry_limit = IWM_RTS_DFAULT_RETRY_LIMIT; tx->data_retry_limit = IWM_DEFAULT_TX_RETRY; - /* -* XXX TODO: everything about the rate selection here is terrible! -*/ - - if (type == IEEE80211_FC0_TYPE_DATA) { - int i; + if (type == IEEE80211_FC0_TYPE_MGT) { + i = iwm_tx_rateidx_lookup(sc, in, tp->mgmtrate); + ridx = in->in_ridx[i]; + } else if (IEEE80211_IS_MULTICAST(wh->i_addr1)) { + i = iwm_tx_rateidx_lookup(sc, in, tp->mcastrate); + ridx = in->in_ridx[i]; + } else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) { + i = iwm_tx_rateidx_lookup(sc, in, tp->ucastrate); + ridx = in->in_ridx[i]; + } else if (m->m_flags & M_EAPOL) { + i = iwm_tx_rateidx_lookup(sc, in, tp->mgmtrate); + ridx = in->in_ridx[i]; + } else { /* for data frames, use RS table */ + /* XXX pass pktlen */ (void) ieee80211_ratectl_rate(ni, NULL, 0); i = iwm_tx_rateidx_lookup(sc, in, ni->ni_txrate); ridx = in->in_ridx[i]; @@ -3225,28 +3237,6 @@ iwm_tx_fill_cmd(struct iwm_softc *sc, st IWM_DPRINTF(sc, IWM_DEBUG_XMIT | IWM_DEBUG_TXRATE, "%s: start with i=%d, txrate %d\n", __func__, i, iwm_rates[ridx].rate); - } else { - /* -* For non-data, use the lowest supported rate for the given -* operational mode. -* -* Note: there may not be any rate control information available. -* This driver currently assumes if we're transmitting data -* frames, use the rate control table. Grr. -* -* XXX TODO: use the configured rate for the traffic type! -* XXX TODO: this should be per-vap, not curmode; as we later -* on we'll want to handle off-channel stuff (eg TDLS). -*/ - if (ic->ic_curmode == IEEE80211_MODE_11A) { - /* -* XXX this assumes the mode is either 11a or not 11a; -* definitely won't work for 11n. -*/ - ridx = IWM_RIDX_OFDM; - } else { - ridx = IWM_RIDX_CCK; - } } rinfo = &iwm_rates[ridx]; @@ -3308,7 +3298,7 @@ iwm_tx(struct iwm_softc *sc, struct mbuf tx = (void *)cmd->data; memset(tx, 0, sizeof(*tx)); - rinfo = iwm_tx_fill_cmd(sc, in, wh, tx); + rinfo = iwm_tx_fill_cmd(sc, in, m, tx); /* Encrypt the frame if need be. */ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { ___ svn-src-h
svn commit: r306145 - head/tools/build/options
Author: bdrewery Date: Wed Sep 21 21:32:05 2016 New Revision: 306145 URL: https://svnweb.freebsd.org/changeset/base/306145 Log: SYSTEM_COMPILER is not forced off with META_MODE after r304682. Sponsored by: Dell EMC Isilon Modified: head/tools/build/options/WITH_META_MODE Modified: head/tools/build/options/WITH_META_MODE == --- head/tools/build/options/WITH_META_MODE Wed Sep 21 21:30:46 2016 (r306144) +++ head/tools/build/options/WITH_META_MODE Wed Sep 21 21:32:05 2016 (r306145) @@ -49,6 +49,3 @@ The build operates as it normally would This option originally invoked a different build system but that was renamed to .Va WITH_DIRDEPS_BUILD . -.Pp -Currently this also enforces -.Va WITHOUT_SYSTEM_COMPILER . ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306146 - head/share/man/man5
Author: bdrewery Date: Wed Sep 21 21:42:06 2016 New Revision: 306146 URL: https://svnweb.freebsd.org/changeset/base/306146 Log: Regenerate. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Wed Sep 21 21:32:05 2016 (r306145) +++ head/share/man/man5/src.conf.5 Wed Sep 21 21:42:06 2016 (r306146) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 292283 2015-12-15 18:42:30Z bdrewery .\" $FreeBSD$ -.Dd September 18, 2016 +.Dd September 21, 2016 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1089,7 +1089,7 @@ Set to not build utilities for manual pa .Xr manctl 8 , and related support files. .It Va WITH_META_MODE -.\" from FreeBSD: head/tools/build/options/WITH_META_MODE 301889 2016-06-14 16:20:25Z bdrewery +.\" from FreeBSD: head/tools/build/options/WITH_META_MODE 306145 2016-09-21 21:32:05Z bdrewery Creates .Xr make 1 meta files when building, which can provide a reliable incremental build when @@ -1141,9 +1141,6 @@ This option originally invoked a differe to .Va WITH_DIRDEPS_BUILD . .Pp -Currently this also enforces -.Va WITHOUT_SYSTEM_COMPILER . -.Pp This must be set in the environment, make command line, or .Pa /etc/src-env.conf , not ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306147 - head/sys/powerpc/ofw
Author: jhibbits Date: Wed Sep 21 22:09:17 2016 New Revision: 306147 URL: https://svnweb.freebsd.org/changeset/base/306147 Log: Revert part of r306065 This is a separate change I was testing. Modified: head/sys/powerpc/ofw/ofw_machdep.c Modified: head/sys/powerpc/ofw/ofw_machdep.c == --- head/sys/powerpc/ofw/ofw_machdep.c Wed Sep 21 21:42:06 2016 (r306146) +++ head/sys/powerpc/ofw/ofw_machdep.c Wed Sep 21 22:09:17 2016 (r306147) @@ -99,7 +99,6 @@ ofw_restore_trap_vec(char *restore_trap_ /* * Saved SPRG0-3 from OpenFirmware. Will be restored prior to the callback. */ -#ifndef __powerpc64__ register_t ofw_sprg0_save; static __inline void @@ -141,8 +140,6 @@ ofw_sprg_restore(void) } #endif -#endif - static int parse_ofw_memory(phandle_t node, const char *prop, struct mem_region *output) { @@ -347,12 +344,11 @@ OF_initial_setup(void *fdt_ptr, void *ju ofmsr[0] = mfmsr(); #ifdef __powerpc64__ ofmsr[0] &= ~PSL_SF; - #else + #endif __asm __volatile("mfsprg0 %0" : "=&r"(ofmsr[1])); __asm __volatile("mfsprg1 %0" : "=&r"(ofmsr[2])); __asm __volatile("mfsprg2 %0" : "=&r"(ofmsr[3])); __asm __volatile("mfsprg3 %0" : "=&r"(ofmsr[4])); - #endif openfirmware_entry = openfirm; if (ofmsr[0] & PSL_DR) @@ -444,9 +440,7 @@ openfirmware_core(void *args) */ oldmsr = intr_disable(); -#ifndef __powerpc64__ ofw_sprg_prepare(); -#endif /* Save trap vectors */ ofw_save_trap_vec(save_trap_of); @@ -469,9 +463,7 @@ openfirmware_core(void *args) /* Restore trap vecotrs */ ofw_restore_trap_vec(save_trap_of); -#ifndef __powerpc64__ ofw_sprg_restore(); -#endif intr_restore(oldmsr); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306148 - head/sys/dev/oce
Author: jpaetzel Date: Wed Sep 21 22:53:16 2016 New Revision: 306148 URL: https://svnweb.freebsd.org/changeset/base/306148 Log: Update oce driver to 11.0.50.0 Submitted by: Venkat Duvvuru Modified: head/sys/dev/oce/oce_hw.c head/sys/dev/oce/oce_hw.h head/sys/dev/oce/oce_if.c head/sys/dev/oce/oce_if.h head/sys/dev/oce/oce_mbox.c head/sys/dev/oce/oce_queue.c head/sys/dev/oce/oce_sysctl.c Modified: head/sys/dev/oce/oce_hw.c == --- head/sys/dev/oce/oce_hw.c Wed Sep 21 22:09:17 2016(r306147) +++ head/sys/dev/oce/oce_hw.c Wed Sep 21 22:53:16 2016(r306148) @@ -393,6 +393,11 @@ oce_create_nw_interface(POCE_SOFTC sc) if (IS_SH(sc) || IS_XE201(sc)) capab_flags |= MBX_RX_IFACE_FLAGS_MULTICAST; +if (sc->enable_hwlro) { +capab_flags |= MBX_RX_IFACE_FLAGS_LRO; +capab_en_flags |= MBX_RX_IFACE_FLAGS_LRO; +} + /* enable capabilities controlled via driver startup parameters */ if (is_rss_enabled(sc)) capab_en_flags |= MBX_RX_IFACE_FLAGS_RSS; Modified: head/sys/dev/oce/oce_hw.h == --- head/sys/dev/oce/oce_hw.h Wed Sep 21 22:09:17 2016(r306147) +++ head/sys/dev/oce/oce_hw.h Wed Sep 21 22:53:16 2016(r306148) @@ -111,6 +111,9 @@ #definePD_MPU_MBOX_DB 0x0160 #definePD_MQ_DB0x0140 +#define DB_OFFSET 0xc0 +#define DB_LRO_RQ_ID_MASK 0x7FF + /* EQE completion types */ #defineEQ_MINOR_CODE_COMPLETION0x00 #defineEQ_MINOR_CODE_OTHER 0x01 @@ -180,6 +183,7 @@ #define ASYNC_EVENT_GRP5 0x5 #define ASYNC_EVENT_CODE_DEBUG 0x6 #define ASYNC_EVENT_PVID_STATE 0x3 +#define ASYNC_EVENT_OS2BMC 0x5 #define ASYNC_EVENT_DEBUG_QNQ 0x1 #define ASYNC_EVENT_CODE_SLIPORT 0x11 #define VLAN_VID_MASK 0x0FFF @@ -722,6 +726,34 @@ struct oce_async_cqe_link_state { } u0; }; +/* OS2BMC async event */ +struct oce_async_evt_grp5_os2bmc { + union { + struct { + uint32_t lrn_enable:1; + uint32_t lrn_disable:1; + uint32_t mgmt_enable:1; + uint32_t mgmt_disable:1; + uint32_t rsvd0:12; + uint32_t vlan_tag:16; + uint32_t arp_filter:1; + uint32_t dhcp_client_filt:1; + uint32_t dhcp_server_filt:1; + uint32_t net_bios_filt:1; + uint32_t rsvd1:3; + uint32_t bcast_filt:1; + uint32_t ipv6_nbr_filt:1; + uint32_t ipv6_ra_filt:1; + uint32_t ipv6_ras_filt:1; + uint32_t rsvd2[4]; + uint32_t mcast_filt:1; + uint32_t rsvd3:16; + uint32_t evt_tag; + uint32_t dword3; + } s; + uint32_t dword[4]; + } u; +}; /* PVID aync event */ struct oce_async_event_grp5_pvid_state { @@ -1396,7 +1428,7 @@ typedef union oce_cq_ctx_u { uint32_t dw5rsvd3:1; uint32_t eventable:1; /* dw6 */ - uint32_t eq_id:8; + uint32_t eq_id:16; uint32_t dw6rsvd1:15; uint32_t armed:1; /* dw7 */ @@ -2403,8 +2435,8 @@ struct oce_nic_hdr_wqe { uint32_t tcpcs:1; uint32_t udpcs:1; uint32_t ipcs:1; - uint32_t rsvd3:1; - uint32_t rsvd2:1; + uint32_t mgmt:1; + uint32_t lso6:1; uint32_t forward:1; uint32_t crc:1; uint32_t event:1; @@ -2426,8 +2458,8 @@ struct oce_nic_hdr_wqe { uint32_t event:1; uint32_t crc:1; uint32_t forward:1; - uint32_t rsvd2:1; - uint32_t rsvd3:1; + uint32_t lso6:1; + uint32_t mgmt:1; uint32_t ipcs:1; uint32_t udpcs:1; uint32_t tcpcs:1; @@ -3010,6 +3042,53 @@ struct oce_rxf_stats_v0 { uint32_t rsvd1[6]; }; +struct oce_port_rxf_stats_v2 { +uint32_t rsvd0[10]; +uint32_t roce_bytes_received_lsd; +uint32_t roce_bytes_received_msd; +uint32_t rsvd1[5]; +uint32_t roce_frames_received; +uint32_t rx_crc_errors; +uint32_t rx_alignment_symbol_errors;
Re: svn commit: r306148 - head/sys/dev/oce
I clearly did not commit what I tested. Jenkins is sending breakages that have missing headers in oce. It will be a few hours before I can look at this. Feel free to revert my commit. Thanks, Josh Paetzel > On Sep 21, 2016, at 5:53 PM, Josh Paetzel wrote: > > Author: jpaetzel > Date: Wed Sep 21 22:53:16 2016 > New Revision: 306148 > URL: https://svnweb.freebsd.org/changeset/base/306148 > > Log: > Update oce driver to 11.0.50.0 > > Submitted by:Venkat Duvvuru > > Modified: > head/sys/dev/oce/oce_hw.c > head/sys/dev/oce/oce_hw.h > head/sys/dev/oce/oce_if.c > head/sys/dev/oce/oce_if.h > head/sys/dev/oce/oce_mbox.c > head/sys/dev/oce/oce_queue.c > head/sys/dev/oce/oce_sysctl.c > > Modified: head/sys/dev/oce/oce_hw.c > == > --- head/sys/dev/oce/oce_hw.cWed Sep 21 22:09:17 2016(r306147) > +++ head/sys/dev/oce/oce_hw.cWed Sep 21 22:53:16 2016(r306148) > @@ -393,6 +393,11 @@ oce_create_nw_interface(POCE_SOFTC sc) >if (IS_SH(sc) || IS_XE201(sc)) >capab_flags |= MBX_RX_IFACE_FLAGS_MULTICAST; > > +if (sc->enable_hwlro) { > +capab_flags |= MBX_RX_IFACE_FLAGS_LRO; > +capab_en_flags |= MBX_RX_IFACE_FLAGS_LRO; > +} > + >/* enable capabilities controlled via driver startup parameters */ >if (is_rss_enabled(sc)) >capab_en_flags |= MBX_RX_IFACE_FLAGS_RSS; > > Modified: head/sys/dev/oce/oce_hw.h > == > --- head/sys/dev/oce/oce_hw.hWed Sep 21 22:09:17 2016(r306147) > +++ head/sys/dev/oce/oce_hw.hWed Sep 21 22:53:16 2016(r306148) > @@ -111,6 +111,9 @@ > #definePD_MPU_MBOX_DB0x0160 > #definePD_MQ_DB0x0140 > > +#define DB_OFFSET0xc0 > +#define DB_LRO_RQ_ID_MASK0x7FF > + > /* EQE completion types */ > #defineEQ_MINOR_CODE_COMPLETION0x00 > #defineEQ_MINOR_CODE_OTHER0x01 > @@ -180,6 +183,7 @@ > #define ASYNC_EVENT_GRP50x5 > #define ASYNC_EVENT_CODE_DEBUG0x6 > #define ASYNC_EVENT_PVID_STATE0x3 > +#define ASYNC_EVENT_OS2BMC0x5 > #define ASYNC_EVENT_DEBUG_QNQ0x1 > #define ASYNC_EVENT_CODE_SLIPORT0x11 > #define VLAN_VID_MASK0x0FFF > @@ -722,6 +726,34 @@ struct oce_async_cqe_link_state { >} u0; > }; > > +/* OS2BMC async event */ > +struct oce_async_evt_grp5_os2bmc { > +union { > +struct { > +uint32_t lrn_enable:1; > +uint32_t lrn_disable:1; > +uint32_t mgmt_enable:1; > +uint32_t mgmt_disable:1; > +uint32_t rsvd0:12; > +uint32_t vlan_tag:16; > +uint32_t arp_filter:1; > +uint32_t dhcp_client_filt:1; > +uint32_t dhcp_server_filt:1; > +uint32_t net_bios_filt:1; > +uint32_t rsvd1:3; > +uint32_t bcast_filt:1; > +uint32_t ipv6_nbr_filt:1; > +uint32_t ipv6_ra_filt:1; > +uint32_t ipv6_ras_filt:1; > +uint32_t rsvd2[4]; > +uint32_t mcast_filt:1; > +uint32_t rsvd3:16; > +uint32_t evt_tag; > +uint32_t dword3; > +} s; > +uint32_t dword[4]; > +} u; > +}; > > /* PVID aync event */ > struct oce_async_event_grp5_pvid_state { > @@ -1396,7 +1428,7 @@ typedef union oce_cq_ctx_u { >uint32_t dw5rsvd3:1; >uint32_t eventable:1; >/* dw6 */ > -uint32_t eq_id:8; > +uint32_t eq_id:16; >uint32_t dw6rsvd1:15; >uint32_t armed:1; >/* dw7 */ > @@ -2403,8 +2435,8 @@ struct oce_nic_hdr_wqe { >uint32_t tcpcs:1; >uint32_t udpcs:1; >uint32_t ipcs:1; > -uint32_t rsvd3:1; > -uint32_t rsvd2:1; > +uint32_t mgmt:1; > +uint32_t lso6:1; >uint32_t forward:1; >uint32_t crc:1; >uint32_t event:1; > @@ -2426,8 +2458,8 @@ struct oce_nic_hdr_wqe { >uint32_t event:1; >uint32_t crc:1; >uint32_t forward:1; > -uint32_t rsvd2:1; > -uint32_t rsvd3:1; > +uint32_t lso6:1; > +uint32_t mgmt:1; >uint32_t ipcs:1; >uint32_t udpcs:1; >uint32_t tcpcs:1; > @@ -3010,6 +3042,53 @@ struct oce_rxf_stats_v0 { >uint32_t rsvd1[6]; > }; > > +struct oce_port_rxf_stats_v2 { > +uint32_t rsvd0[10]; > +uint32_t roce_bytes_received_lsd; > +uint32_t roce_bytes_received_msd; > +uint32_t rsvd1[5]; > +uint32_t roce_frames_received; > +uint32_t rx_crc_errors; > +uint32_t rx_alignment_symbol_errors; > +uint32_t rx_pause_frames; > +uint32_t rx_priority_pause_frames; > +uint32_t rx_control_frames; > +uint32_t rx_in_range_errors; > +uint32_t rx_out_
svn commit: r306149 - head/sys/dev/oce
Author: cem Date: Thu Sep 22 00:25:23 2016 New Revision: 306149 URL: https://svnweb.freebsd.org/changeset/base/306149 Log: Revert r306148 to fix build Requested by: jpaetzel Reported by: Larry Rosenman , Jenkins Modified: head/sys/dev/oce/oce_hw.c head/sys/dev/oce/oce_hw.h head/sys/dev/oce/oce_if.c head/sys/dev/oce/oce_if.h head/sys/dev/oce/oce_mbox.c head/sys/dev/oce/oce_queue.c head/sys/dev/oce/oce_sysctl.c Modified: head/sys/dev/oce/oce_hw.c == --- head/sys/dev/oce/oce_hw.c Wed Sep 21 22:53:16 2016(r306148) +++ head/sys/dev/oce/oce_hw.c Thu Sep 22 00:25:23 2016(r306149) @@ -393,11 +393,6 @@ oce_create_nw_interface(POCE_SOFTC sc) if (IS_SH(sc) || IS_XE201(sc)) capab_flags |= MBX_RX_IFACE_FLAGS_MULTICAST; -if (sc->enable_hwlro) { -capab_flags |= MBX_RX_IFACE_FLAGS_LRO; -capab_en_flags |= MBX_RX_IFACE_FLAGS_LRO; -} - /* enable capabilities controlled via driver startup parameters */ if (is_rss_enabled(sc)) capab_en_flags |= MBX_RX_IFACE_FLAGS_RSS; Modified: head/sys/dev/oce/oce_hw.h == --- head/sys/dev/oce/oce_hw.h Wed Sep 21 22:53:16 2016(r306148) +++ head/sys/dev/oce/oce_hw.h Thu Sep 22 00:25:23 2016(r306149) @@ -111,9 +111,6 @@ #definePD_MPU_MBOX_DB 0x0160 #definePD_MQ_DB0x0140 -#define DB_OFFSET 0xc0 -#define DB_LRO_RQ_ID_MASK 0x7FF - /* EQE completion types */ #defineEQ_MINOR_CODE_COMPLETION0x00 #defineEQ_MINOR_CODE_OTHER 0x01 @@ -183,7 +180,6 @@ #define ASYNC_EVENT_GRP5 0x5 #define ASYNC_EVENT_CODE_DEBUG 0x6 #define ASYNC_EVENT_PVID_STATE 0x3 -#define ASYNC_EVENT_OS2BMC 0x5 #define ASYNC_EVENT_DEBUG_QNQ 0x1 #define ASYNC_EVENT_CODE_SLIPORT 0x11 #define VLAN_VID_MASK 0x0FFF @@ -726,34 +722,6 @@ struct oce_async_cqe_link_state { } u0; }; -/* OS2BMC async event */ -struct oce_async_evt_grp5_os2bmc { - union { - struct { - uint32_t lrn_enable:1; - uint32_t lrn_disable:1; - uint32_t mgmt_enable:1; - uint32_t mgmt_disable:1; - uint32_t rsvd0:12; - uint32_t vlan_tag:16; - uint32_t arp_filter:1; - uint32_t dhcp_client_filt:1; - uint32_t dhcp_server_filt:1; - uint32_t net_bios_filt:1; - uint32_t rsvd1:3; - uint32_t bcast_filt:1; - uint32_t ipv6_nbr_filt:1; - uint32_t ipv6_ra_filt:1; - uint32_t ipv6_ras_filt:1; - uint32_t rsvd2[4]; - uint32_t mcast_filt:1; - uint32_t rsvd3:16; - uint32_t evt_tag; - uint32_t dword3; - } s; - uint32_t dword[4]; - } u; -}; /* PVID aync event */ struct oce_async_event_grp5_pvid_state { @@ -1428,7 +1396,7 @@ typedef union oce_cq_ctx_u { uint32_t dw5rsvd3:1; uint32_t eventable:1; /* dw6 */ - uint32_t eq_id:16; + uint32_t eq_id:8; uint32_t dw6rsvd1:15; uint32_t armed:1; /* dw7 */ @@ -2435,8 +2403,8 @@ struct oce_nic_hdr_wqe { uint32_t tcpcs:1; uint32_t udpcs:1; uint32_t ipcs:1; - uint32_t mgmt:1; - uint32_t lso6:1; + uint32_t rsvd3:1; + uint32_t rsvd2:1; uint32_t forward:1; uint32_t crc:1; uint32_t event:1; @@ -2458,8 +2426,8 @@ struct oce_nic_hdr_wqe { uint32_t event:1; uint32_t crc:1; uint32_t forward:1; - uint32_t lso6:1; - uint32_t mgmt:1; + uint32_t rsvd2:1; + uint32_t rsvd3:1; uint32_t ipcs:1; uint32_t udpcs:1; uint32_t tcpcs:1; @@ -3042,53 +3010,6 @@ struct oce_rxf_stats_v0 { uint32_t rsvd1[6]; }; -struct oce_port_rxf_stats_v2 { -uint32_t rsvd0[10]; -uint32_t roce_bytes_received_lsd; -uint32_t roce_bytes_received_msd; -uint32_t rsvd1[5]; -uint32_t roce_frames_received; -uint32_t rx_crc_errors; -uint32_t rx
Re: svn commit: r306149 - head/sys/dev/oce
Thanks. I've investigated now. The disk filled up on the machine I ran make universe on which inexplicably caused it to report builds had succeeded. The vendor patch was clearly missing a header file and can't possibly build. Thanks, Josh Paetzel > On Sep 21, 2016, at 7:25 PM, Conrad E. Meyer wrote: > > Author: cem > Date: Thu Sep 22 00:25:23 2016 > New Revision: 306149 > URL: https://svnweb.freebsd.org/changeset/base/306149 > > Log: > Revert r306148 to fix build > > Requested by:jpaetzel > Reported by:Larry Rosenman , Jenkins > > Modified: > head/sys/dev/oce/oce_hw.c > head/sys/dev/oce/oce_hw.h > head/sys/dev/oce/oce_if.c > head/sys/dev/oce/oce_if.h > head/sys/dev/oce/oce_mbox.c > head/sys/dev/oce/oce_queue.c > head/sys/dev/oce/oce_sysctl.c > > Modified: head/sys/dev/oce/oce_hw.c > == > --- head/sys/dev/oce/oce_hw.cWed Sep 21 22:53:16 2016(r306148) > +++ head/sys/dev/oce/oce_hw.cThu Sep 22 00:25:23 2016(r306149) > @@ -393,11 +393,6 @@ oce_create_nw_interface(POCE_SOFTC sc) >if (IS_SH(sc) || IS_XE201(sc)) >capab_flags |= MBX_RX_IFACE_FLAGS_MULTICAST; > > -if (sc->enable_hwlro) { > -capab_flags |= MBX_RX_IFACE_FLAGS_LRO; > -capab_en_flags |= MBX_RX_IFACE_FLAGS_LRO; > -} > - >/* enable capabilities controlled via driver startup parameters */ >if (is_rss_enabled(sc)) >capab_en_flags |= MBX_RX_IFACE_FLAGS_RSS; > > Modified: head/sys/dev/oce/oce_hw.h > == > --- head/sys/dev/oce/oce_hw.hWed Sep 21 22:53:16 2016(r306148) > +++ head/sys/dev/oce/oce_hw.hThu Sep 22 00:25:23 2016(r306149) > @@ -111,9 +111,6 @@ > #definePD_MPU_MBOX_DB0x0160 > #definePD_MQ_DB0x0140 > > -#define DB_OFFSET0xc0 > -#define DB_LRO_RQ_ID_MASK0x7FF > - > /* EQE completion types */ > #defineEQ_MINOR_CODE_COMPLETION0x00 > #defineEQ_MINOR_CODE_OTHER0x01 > @@ -183,7 +180,6 @@ > #define ASYNC_EVENT_GRP50x5 > #define ASYNC_EVENT_CODE_DEBUG0x6 > #define ASYNC_EVENT_PVID_STATE0x3 > -#define ASYNC_EVENT_OS2BMC0x5 > #define ASYNC_EVENT_DEBUG_QNQ0x1 > #define ASYNC_EVENT_CODE_SLIPORT0x11 > #define VLAN_VID_MASK0x0FFF > @@ -726,34 +722,6 @@ struct oce_async_cqe_link_state { >} u0; > }; > > -/* OS2BMC async event */ > -struct oce_async_evt_grp5_os2bmc { > -union { > -struct { > -uint32_t lrn_enable:1; > -uint32_t lrn_disable:1; > -uint32_t mgmt_enable:1; > -uint32_t mgmt_disable:1; > -uint32_t rsvd0:12; > -uint32_t vlan_tag:16; > -uint32_t arp_filter:1; > -uint32_t dhcp_client_filt:1; > -uint32_t dhcp_server_filt:1; > -uint32_t net_bios_filt:1; > -uint32_t rsvd1:3; > -uint32_t bcast_filt:1; > -uint32_t ipv6_nbr_filt:1; > -uint32_t ipv6_ra_filt:1; > -uint32_t ipv6_ras_filt:1; > -uint32_t rsvd2[4]; > -uint32_t mcast_filt:1; > -uint32_t rsvd3:16; > -uint32_t evt_tag; > -uint32_t dword3; > -} s; > -uint32_t dword[4]; > -} u; > -}; > > /* PVID aync event */ > struct oce_async_event_grp5_pvid_state { > @@ -1428,7 +1396,7 @@ typedef union oce_cq_ctx_u { >uint32_t dw5rsvd3:1; >uint32_t eventable:1; >/* dw6 */ > -uint32_t eq_id:16; > +uint32_t eq_id:8; >uint32_t dw6rsvd1:15; >uint32_t armed:1; >/* dw7 */ > @@ -2435,8 +2403,8 @@ struct oce_nic_hdr_wqe { >uint32_t tcpcs:1; >uint32_t udpcs:1; >uint32_t ipcs:1; > -uint32_t mgmt:1; > -uint32_t lso6:1; > +uint32_t rsvd3:1; > +uint32_t rsvd2:1; >uint32_t forward:1; >uint32_t crc:1; >uint32_t event:1; > @@ -2458,8 +2426,8 @@ struct oce_nic_hdr_wqe { >uint32_t event:1; >uint32_t crc:1; >uint32_t forward:1; > -uint32_t lso6:1; > -uint32_t mgmt:1; > +uint32_t rsvd2:1; > +uint32_t rsvd3:1; >uint32_t ipcs:1; >uint32_t udpcs:1; >uint32_t tcpcs:1; > @@ -3042,53 +3010,6 @@ struct oce_rxf_stats_v0 { >uint32_t rsvd1[6]; > }; > > -struct oce_port_rxf_stats_v2 { > -uint32_t rsvd0[10]; > -uint32_t roce_bytes_received_lsd; > -uint32_t roce_bytes_received_msd; > -uint32_t rsvd1[5]; > -uint32_t roce_frames_received; > -uint32_t rx_crc_errors; > -uint32_t rx_alignment_symbol_errors; > -uint32_t rx_pause_frames; > -uint32_t rx_priority_pause_frames; > -uint32_t rx_control_
svn commit: r306157 - head/sys/kern
Author: markj Date: Thu Sep 22 04:49:31 2016 New Revision: 306157 URL: https://svnweb.freebsd.org/changeset/base/306157 Log: Annotate syscall provider pointer arguments with the "userland" keyword. This causes dtrace to automatically copyin arguments from userland, so one no longer has to explicitly use the copyin() action to do so. Moreover, copyin() on userland addresses is a no-op, so existing scripts should be unaffected by this change. Discussed with: rstone MFC after:2 weeks Modified: head/sys/kern/makesyscalls.sh Modified: head/sys/kern/makesyscalls.sh == --- head/sys/kern/makesyscalls.sh Thu Sep 22 03:35:02 2016 (r306156) +++ head/sys/kern/makesyscalls.sh Thu Sep 22 04:49:31 2016 (r306157) @@ -418,7 +418,10 @@ s/\$//g for (i = 1; i <= argc; i++) { arg = argtype[i] sub("__restrict$", "", arg) - printf("\t\tcase %d:\n\t\t\tp = \"%s\";\n\t\t\tbreak;\n", i - 1, arg) > systracetmp + if (index(arg, "*") > 0) + printf("\t\tcase %d:\n\t\t\tp = \"userland %s\";\n\t\t\tbreak;\n", i - 1, arg) > systracetmp + else + printf("\t\tcase %d:\n\t\t\tp = \"%s\";\n\t\t\tbreak;\n", i - 1, arg) > systracetmp if (index(arg, "*") > 0 || arg == "caddr_t") printf("\t\tuarg[%d] = (intptr_t) p->%s; /* %s */\n", \ i - 1, \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306158 - in head/sys: amd64/linux amd64/linux32 compat/cloudabi32 compat/cloudabi64 compat/freebsd32 i386/linux kern
Author: markj Date: Thu Sep 22 04:50:03 2016 New Revision: 306158 URL: https://svnweb.freebsd.org/changeset/base/306158 Log: Regenerate syscall provider argument strings. Modified: head/sys/amd64/linux/linux_systrace_args.c head/sys/amd64/linux32/linux32_systrace_args.c head/sys/compat/cloudabi32/cloudabi32_systrace_args.c head/sys/compat/cloudabi64/cloudabi64_systrace_args.c head/sys/compat/freebsd32/freebsd32_systrace_args.c head/sys/i386/linux/linux_systrace_args.c head/sys/kern/systrace_args.c Modified: head/sys/amd64/linux/linux_systrace_args.c == --- head/sys/amd64/linux/linux_systrace_args.c Thu Sep 22 04:49:31 2016 (r306157) +++ head/sys/amd64/linux/linux_systrace_args.c Thu Sep 22 04:50:03 2016 (r306158) @@ -2286,7 +2286,7 @@ systrace_entry_setargdesc(int sysnum, in p = "int"; break; case 1: - p = "char *"; + p = "userland char *"; break; case 2: p = "u_int"; @@ -2302,7 +2302,7 @@ systrace_entry_setargdesc(int sysnum, in p = "int"; break; case 1: - p = "char *"; + p = "userland char *"; break; case 2: p = "u_int"; @@ -2315,7 +2315,7 @@ systrace_entry_setargdesc(int sysnum, in case 2: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: p = "l_int"; @@ -2341,10 +2341,10 @@ systrace_entry_setargdesc(int sysnum, in case 4: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: - p = "struct l_newstat *"; + p = "userland struct l_newstat *"; break; default: break; @@ -2357,7 +2357,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_uint"; break; case 1: - p = "struct l_newstat *"; + p = "userland struct l_newstat *"; break; default: break; @@ -2367,10 +2367,10 @@ systrace_entry_setargdesc(int sysnum, in case 6: switch(ndx) { case 0: - p = "char *"; + p = "userland char *"; break; case 1: - p = "struct l_newstat *"; + p = "userland struct l_newstat *"; break; default: break; @@ -2380,7 +2380,7 @@ systrace_entry_setargdesc(int sysnum, in case 7: switch(ndx) { case 0: - p = "struct pollfd *"; + p = "userland struct pollfd *"; break; case 1: p = "u_int"; @@ -2479,10 +2479,10 @@ systrace_entry_setargdesc(int sysnum, in p = "l_int"; break; case 1: - p = "l_sigaction_t *"; + p = "userland l_sigaction_t *"; break; case 2: - p = "l_sigaction_t *"; + p = "userland l_sigaction_t *"; break; case 3: p = "l_size_t"; @@ -2498,10 +2498,10 @@ systrace_entry_setargdesc(int sysnum, in p = "l_int"; break; case 1: - p = "l_sigset_t *"; + p = "userland l_sigset_t *"; break; case 2: - p = "l_sigset_t *"; + p = "userland l_sigset_t *"; break; case 3: p = "l_size_t"; @@ -2514,7 +2514,7 @@ systrace_entry_setargdesc(int sysnum, in case 15: switch(ndx) { case 0: - p = "struct l_ucontext *"; + p = "userland struct l_ucontext *"; break; default: break; @@ -2543,7 +2543,7 @@ systrace_entry_setargdesc(int sysnum, in p = "l_uint"; break; case 1: - p = "char *"; + p = "us
svn commit: r306159 - in head/sys/boot: efi/libefi i386/libi386 ofw/libofw powerpc/kboot powerpc/ps3 uboot/lib
Author: stevek Date: Thu Sep 22 06:24:40 2016 New Revision: 306159 URL: https://svnweb.freebsd.org/changeset/base/306159 Log: The getsecs() function is implemented in platform- and bootfw-specific files and, in a number of these places, there were problems with how they were declared. Some used int return instead of time_t. On some architectures the bit width of time_t did not naturally fit into an integer and could lead to some unexpected behavior. (For example, 32-bit ARM builds uses a 64-bit time_t.) Make sure the function prototypes always specify void for the argument list when they do not have any arguemnts, otherwise some compilers can complain about the prototype. Reported by: Kevin Zheng Reviewed by: sjg Approved by: sjg (mentor) Obtained from:Juniper Networks, Inc. MFC after:1 month Differential Revision:https://reviews.freebsd.org/D7463 Modified: head/sys/boot/efi/libefi/time.c head/sys/boot/efi/libefi/time_event.c head/sys/boot/i386/libi386/pxe.c head/sys/boot/ofw/libofw/ofw_time.c head/sys/boot/powerpc/kboot/main.c head/sys/boot/powerpc/ps3/main.c head/sys/boot/uboot/lib/time.c Modified: head/sys/boot/efi/libefi/time.c == --- head/sys/boot/efi/libefi/time.c Thu Sep 22 04:50:03 2016 (r306158) +++ head/sys/boot/efi/libefi/time.c Thu Sep 22 06:24:40 2016 (r306159) @@ -228,7 +228,7 @@ time(time_t *tloc) } time_t -getsecs() +getsecs(void) { return time(0); } Modified: head/sys/boot/efi/libefi/time_event.c == --- head/sys/boot/efi/libefi/time_event.c Thu Sep 22 04:50:03 2016 (r306158) +++ head/sys/boot/efi/libefi/time_event.c Thu Sep 22 06:24:40 2016 (r306159) @@ -76,7 +76,7 @@ time(time_t *tloc) } time_t -getsecs() +getsecs(void) { return time(0); } Modified: head/sys/boot/i386/libi386/pxe.c == --- head/sys/boot/i386/libi386/pxe.cThu Sep 22 04:50:03 2016 (r306158) +++ head/sys/boot/i386/libi386/pxe.cThu Sep 22 06:24:40 2016 (r306159) @@ -586,7 +586,7 @@ bangpxe_call(int func) time_t -getsecs() +getsecs(void) { time_t n = 0; time(&n); Modified: head/sys/boot/ofw/libofw/ofw_time.c == --- head/sys/boot/ofw/libofw/ofw_time.c Thu Sep 22 04:50:03 2016 (r306158) +++ head/sys/boot/ofw/libofw/ofw_time.c Thu Sep 22 06:24:40 2016 (r306159) @@ -41,8 +41,8 @@ time(time_t *tloc) return secs; } -int -getsecs() +time_t +getsecs(void) { time_t n = 0; time(&n); Modified: head/sys/boot/powerpc/kboot/main.c == --- head/sys/boot/powerpc/kboot/main.c Thu Sep 22 04:50:03 2016 (r306158) +++ head/sys/boot/powerpc/kboot/main.c Thu Sep 22 06:24:40 2016 (r306159) @@ -151,8 +151,8 @@ delay(int usecs) } while (t < ti + usecs); } -int -getsecs() +time_t +getsecs(void) { struct host_timeval tv; host_gettimeofday(&tv, NULL); Modified: head/sys/boot/powerpc/ps3/main.c == --- head/sys/boot/powerpc/ps3/main.cThu Sep 22 04:50:03 2016 (r306158) +++ head/sys/boot/powerpc/ps3/main.cThu Sep 22 06:24:40 2016 (r306159) @@ -179,10 +179,10 @@ delay(int usecs) tb = mftb(); } -int -getsecs() +time_t +getsecs(void) { - return ((mftb() - basetb)*ns_per_tick/10); + return ((time_t)((mftb() - basetb)*ns_per_tick/10)); } time_t Modified: head/sys/boot/uboot/lib/time.c == --- head/sys/boot/uboot/lib/time.c Thu Sep 22 04:50:03 2016 (r306158) +++ head/sys/boot/uboot/lib/time.c Thu Sep 22 06:24:40 2016 (r306159) @@ -47,7 +47,7 @@ time(time_t *tloc) return (secs); } -int +time_t getsecs(void) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"