From owner-svn-src-head@freebsd.org Sun Sep 25 07:48:09 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73602BE81A3; Sun, 25 Sep 2016 07:48:09 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A641284; Sun, 25 Sep 2016 07:48:09 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8P7m8Vq006738; Sun, 25 Sep 2016 07:48:08 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8P7m8cE006737; Sun, 25 Sep 2016 07:48:08 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609250748.u8P7m8cE006737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 25 Sep 2016 07:48:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306307 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2016 07:48:09 -0000 Author: andrew Date: Sun Sep 25 07:48:08 2016 New Revision: 306307 URL: https://svnweb.freebsd.org/changeset/base/306307 Log: Add the start of a GENERIC armv6 kernel config. This supports the Allwinner SMP SoCs and qemu virt. Further SoCs can be supported if they support the PLATFORM, PLATFORM_SMP, and MULTIDELAY options. Tested by: manu Sponsored by: ABT Systems Ltd Added: head/sys/arm/conf/GENERIC (contents, props changed) Added: head/sys/arm/conf/GENERIC ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/GENERIC Sun Sep 25 07:48:08 2016 (r306307) @@ -0,0 +1,145 @@ +# +# GENERICV6 -- Generic(ish) kernel config. +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +ident GENERIC + +cpu CPU_CORTEXA +machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a" + +makeoptions KERNVIRTADDR=0xc0000000 +options KERNVIRTADDR=0xc0000000 + +include "std.armv6" +files "../allwinner/files.allwinner" +files "../allwinner/a20/files.a20" +files "../allwinner/a31/files.a31" +files "../allwinner/a83t/files.a83t" +files "../allwinner/h3/files.h3" +files "../qemu/files.qemu" + +options SOC_ALLWINNER_A20 +options SOC_ALLWINNER_A31 +options SOC_ALLWINNER_A31S +options SOC_ALLWINNER_A83T +options SOC_ALLWINNER_H3 + +options SCHED_ULE # ULE scheduler +options SMP # Enable multiple cores +options PLATFORM +options PLATFORM_SMP +options MULTIDELAY + +# EXT_RESOURCES pseudo devices +options EXT_RESOURCES +device clk +device phy +device hwreset +device regulator + +# Interrupt controller +options INTRNG +device gic + +# ARM Generic Timer +device generic_timer + +# MMC/SD/SDIO Card slot support +device mmc # mmc/sd bus +device mmcsd # mmc/sd flash cards + +# ATA controllers +device ahci # AHCI-compatible SATA controllers +#device ata # Legacy ATA/SATA controllers + +# VirtIO +device virtio +device virtio_mmio +device virtio_blk +device vtnet + +# Console and misc +device uart +device uart_snps +device pl011 +device pty +device snp +device md +device random # Entropy device +device psci + +# I2C support +device iicbus +device iic +device twsi +device rsb +device axp209 # AXP209 Power Management Unit +device axp81x # AXP813/818 Power Management Unit + +# GPIO +device gpio +device gpioled + +device scbus # SCSI bus (required for ATA/SCSI) +device da # Direct Access (disks) +device pass # Passthrough device (direct ATA/SCSI access) + +# USB support +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. +device usb +#device uhci +device ohci +device ehci + +device umass + +# Ethernet +device loop +device ether +device mii +device bpf + +#device emac # 10/100 integrated EMAC controller +device dwc # 10/100/1000 integrated GMAC controller +device awg # 10/100/1000 integrated EMAC controller + +# USB ethernet support, requires miibus +device miibus + +# Sound support +device sound + +# Framebuffer support +device vt +device kbdmux +device ums +device ukbd +device videomode +device hdmi + +# Pinmux +device fdt_pinctrl + +# Extensible Firmware Interface +options EFI + +# Flattened Device Tree +options FDT # Configure using FDT/DTB data +makeoptions MODULES_EXTRA=dtb/allwinner From owner-svn-src-head@freebsd.org Sun Sep 25 14:56:25 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5FC6BE9605; Sun, 25 Sep 2016 14:56:25 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E5E798E; Sun, 25 Sep 2016 14:56:25 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PEuOD4067751; Sun, 25 Sep 2016 14:56:24 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PEuO0S067749; Sun, 25 Sep 2016 14:56:24 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201609251456.u8PEuO0S067749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sun, 25 Sep 2016 14:56:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306310 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2016 14:56:25 -0000 Author: bde Date: Sun Sep 25 14:56:24 2016 New Revision: 306310 URL: https://svnweb.freebsd.org/changeset/base/306310 Log: Fix vm86 initialization, part 3 of 2 and a half. (Actually, just fix early printfs and debugging of vm86 initialization and some other early initialization in some cases.) Add an option debug.late_console (with default 1=off) to move console and kdb initialization back where it was. Do the same for amd64 although there is no vm86 there. On my test system, debug.late_console=0 works for the syscons, sio and uart console drivers on amd64 and i386, and for vt on i386 but not on amd64. The early printfs fixed by debug.late_console=0 are: - on i386, the message about lost memory above 4G - with -v in otherwise normal use, about 20 printfs for SMAP - other debugging messages for memory sizing. Mostly under -v and not printed in normal use. Document in a comment how much earlier the initialization and early printf()s can be. That is very early for the console. Not much more than curthread is needed. kdb use obviously needs to be not so early, since it needs IDT initialization and that is done relatively late for convenience and historical reasons. Modified: head/sys/amd64/amd64/machdep.c head/sys/i386/i386/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sun Sep 25 13:52:55 2016 (r306309) +++ head/sys/amd64/amd64/machdep.c Sun Sep 25 14:56:24 2016 (r306310) @@ -1506,6 +1506,16 @@ native_parse_preload_data(u_int64_t modu return (kmdp); } +static void +amd64_kdb_init(void) +{ + kdb_init(); +#ifdef KDB + if (boothowto & RB_KDB) + kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); +#endif +} + u_int64_t hammer_time(u_int64_t modulep, u_int64_t physfree) { @@ -1517,6 +1527,7 @@ hammer_time(u_int64_t modulep, u_int64_t u_int64_t msr; char *env; size_t kstack0_sz; + int late_console; /* * This may be done better later if it gets more high level @@ -1561,6 +1572,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree += DPCPU_SIZE; PCPU_SET(prvspace, pc); PCPU_SET(curthread, &thread0); + /* Non-late cninit() and printf() can be moved up to here. */ PCPU_SET(tssp, &common_tss[0]); PCPU_SET(commontssp, &common_tss[0]); PCPU_SET(tss, (struct system_segment_descriptor *)&gdt[GPROC0_SEL]); @@ -1660,12 +1672,26 @@ hammer_time(u_int64_t modulep, u_int64_t wrmsr(MSR_STAR, msr); wrmsr(MSR_SF_MASK, PSL_NT|PSL_T|PSL_I|PSL_C|PSL_D); + /* + * The console and kdb should be initialized even earlier than here, + * but some console drivers don't work until after getmemsize(). + * Default to late console initialization to support these drivers. + * This loses mainly printf()s in getmemsize() and early debugging. + */ + late_console = 1; + TUNABLE_INT_FETCH("debug.late_console", &late_console); + if (!late_console) { + cninit(); + amd64_kdb_init(); + } + getmemsize(kmdp, physfree); init_param2(physmem); /* now running on new page tables, configured,and u/iom is accessible */ - cninit(); + if (late_console) + cninit(); #ifdef DEV_ISA #ifdef DEV_ATPIC @@ -1686,13 +1712,8 @@ hammer_time(u_int64_t modulep, u_int64_t #error "have you forgotten the isa device?"; #endif - kdb_init(); - -#ifdef KDB - if (boothowto & RB_KDB) - kdb_enter(KDB_WHY_BOOTFLAGS, - "Boot flags requested debugger"); -#endif + if (late_console) + amd64_kdb_init(); msgbufinit(msgbufp, msgbufsize); fpuinit(); Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Sun Sep 25 13:52:55 2016 (r306309) +++ head/sys/i386/i386/machdep.c Sun Sep 25 14:56:24 2016 (r306310) @@ -2089,7 +2089,6 @@ getmemsize(int first) * use that and do not make any VM86 calls. */ physmap_idx = 0; - smapbase = NULL; kmdp = preload_search_by_type("elf kernel"); if (kmdp == NULL) kmdp = preload_search_by_type("elf32 kernel"); @@ -2223,6 +2222,9 @@ physmap_done: * highest page of the physical address space. It should be * called something like "Maxphyspage". We may adjust this * based on ``hw.physmem'' and the results of the memory test. + * + * This is especially confusing when it is much larger than the + * memory size and is displayed as "realmem". */ Maxmem = atop(physmap[physmap_idx + 1]); @@ -2428,6 +2430,19 @@ do_next: } #endif /* PC98 */ +static void +i386_kdb_init(void) +{ +#ifdef DDB + db_fetch_ksymtab(bootinfo.bi_symtab, bootinfo.bi_esymtab); +#endif + kdb_init(); +#ifdef KDB + if (boothowto & RB_KDB) + kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); +#endif +} + register_t init386(first) int first; @@ -2438,6 +2453,7 @@ init386(first) #ifdef CPU_ENABLE_SSE struct xstate_hdr *xhdr; #endif + int late_console; thread0.td_kstack = proc0kstack; thread0.td_kstack_pages = TD0_KSTACK_PAGES; @@ -2502,6 +2518,7 @@ init386(first) first += DPCPU_SIZE; PCPU_SET(prvspace, pc); PCPU_SET(curthread, &thread0); + /* Non-late cninit() and printf() can be moved up to here. */ /* * Initialize mutexes. @@ -2668,30 +2685,33 @@ init386(first) #endif #endif + /* + * The console and kdb should be initialized even earlier than here, + * but some console drivers don't work until after getmemsize(). + * Default to late console initialization to support these drivers. + * This loses mainly printf()s in getmemsize() and early debugging. + */ + late_console = 1; + TUNABLE_INT_FETCH("debug.late_console", &late_console); + if (!late_console) { + cninit(); + i386_kdb_init(); + } + vm86_initialize(); getmemsize(first); init_param2(physmem); /* now running on new page tables, configured,and u/iom is accessible */ - /* - * Initialize the console before we print anything out. - */ - cninit(); + if (late_console) + cninit(); if (metadata_missing) printf("WARNING: loader(8) metadata is missing!\n"); -#ifdef DDB - db_fetch_ksymtab(bootinfo.bi_symtab, bootinfo.bi_esymtab); -#endif - - kdb_init(); - -#ifdef KDB - if (boothowto & RB_KDB) - kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); -#endif + if (late_console) + i386_kdb_init(); msgbufinit(msgbufp, msgbufsize); #ifdef DEV_NPX From owner-svn-src-head@freebsd.org Sun Sep 25 16:30:31 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFF6ABE8A5C; Sun, 25 Sep 2016 16:30:31 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 815B5D30; Sun, 25 Sep 2016 16:30:31 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PGUUVw001474; Sun, 25 Sep 2016 16:30:30 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PGUUwU001468; Sun, 25 Sep 2016 16:30:30 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201609251630.u8PGUUwU001468@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sun, 25 Sep 2016 16:30:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306311 - in head: share/man/man4 sys/ddb sys/i386/i386 sys/i386/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2016 16:30:31 -0000 Author: bde Date: Sun Sep 25 16:30:29 2016 New Revision: 306311 URL: https://svnweb.freebsd.org/changeset/base/306311 Log: Determine the operand/address size of %cs in a new function db_segsize(). Use db_segsize() to set the default operand/address size for disassembling. Allow overriding this with the "alternate" display format /I. The API of db_disasm() should be debooleanized to pass a more general request (amd64 needs overrides to sizes of 16, 32, and 64, but this commit doesn't implement anything for amd64 since much larger changes are needed to restore the amd64 disassmbler's support for non-default sizes). Fix db_print_loc_and_inst() to ask for the normal format and not the alternate in normal operation. This is most useful for vm86 mode, but also works for 16-bit protected mode. Use db_segsize() to avoid trying to print a garbage stack trace if %cs is 16 bits. Print something like the stack trace termination message for a trap boundary instead. Document that the alternate format is now useful on i386. Modified: head/share/man/man4/ddb.4 head/sys/ddb/db_examine.c head/sys/i386/i386/db_disasm.c head/sys/i386/i386/db_interface.c head/sys/i386/i386/db_trace.c head/sys/i386/include/db_machdep.h Modified: head/share/man/man4/ddb.4 ============================================================================== --- head/share/man/man4/ddb.4 Sun Sep 25 14:56:24 2016 (r306310) +++ head/share/man/man4/ddb.4 Sun Sep 25 16:30:29 2016 (r306311) @@ -264,7 +264,9 @@ The location is also displayed in hex at display as an instruction .It Cm I display as an instruction with possible alternate formats depending on the -machine, but none of the supported architectures have an alternate format +machine. +On i386, this selects the alternate format for the instruction decoding +(16 bits in a 32-bit code segment and vice versa). .It Cm S display a symbol name for the pointer stored at the address .El Modified: head/sys/ddb/db_examine.c ============================================================================== --- head/sys/ddb/db_examine.c Sun Sep 25 14:56:24 2016 (r306310) +++ head/sys/ddb/db_examine.c Sun Sep 25 16:30:29 2016 (r306311) @@ -241,7 +241,7 @@ db_print_loc_and_inst(db_addr_t loc) db_printsym(loc, DB_STGY_PROC); if (db_search_symbol(loc, DB_STGY_PROC, &off) != C_DB_SYM_NULL) { db_printf(":\t"); - (void)db_disasm(loc, true); + (void)db_disasm(loc, false); } } Modified: head/sys/i386/i386/db_disasm.c ============================================================================== --- head/sys/i386/i386/db_disasm.c Sun Sep 25 14:56:24 2016 (r306310) +++ head/sys/i386/i386/db_disasm.c Sun Sep 25 16:30:29 2016 (r306311) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); * Instruction disassembler. */ #include +#include #include #include @@ -1168,9 +1169,17 @@ db_disasm(db_addr_t loc, bool altfmt) int len; struct i_addr address; + if (db_segsize(kdb_frame) == 16) + altfmt = !altfmt; get_value_inc(inst, loc, 1, FALSE); - short_addr = FALSE; - size = LONG; + if (altfmt) { + short_addr = TRUE; + size = WORD; + } + else { + short_addr = FALSE; + size = LONG; + } seg = NULL; /* Modified: head/sys/i386/i386/db_interface.c ============================================================================== --- head/sys/i386/i386/db_interface.c Sun Sep 25 14:56:24 2016 (r306310) +++ head/sys/i386/i386/db_interface.c Sun Sep 25 16:30:29 2016 (r306311) @@ -135,6 +135,30 @@ db_write_bytes(vm_offset_t addr, size_t return (ret); } +int +db_segsize(struct trapframe *tfp) +{ + struct proc_ldt *plp; + struct segment_descriptor *sdp; + int sel; + + if (tfp == NULL) + return (32); + if (tfp->tf_eflags & PSL_VM) + return (16); + sel = tfp->tf_cs & 0xffff; + if (sel == GSEL(GCODE_SEL, SEL_KPL)) + return (32); + /* Rare cases follow. User mode cases are currently unreachable. */ + if (ISLDT(sel)) { + plp = curthread->td_proc->p_md.md_ldt; + sdp = (plp != NULL) ? &plp->ldt_sd : &ldt[0].sd; + } else { + sdp = &gdt[PCPU_GET(cpuid) * NGDT].sd; + } + return (sdp[IDXSEL(sel)].sd_def32 == 0 ? 16 : 32); +} + void db_show_mdpcpu(struct pcpu *pc) { Modified: head/sys/i386/i386/db_trace.c ============================================================================== --- head/sys/i386/i386/db_trace.c Sun Sep 25 14:56:24 2016 (r306310) +++ head/sys/i386/i386/db_trace.c Sun Sep 25 16:30:29 2016 (r306311) @@ -421,6 +421,17 @@ db_backtrace(struct thread *td, struct t int instr, narg; boolean_t first; + if (db_segsize(tf) == 16) { + db_printf( +"--- 16-bit%s, cs:eip = %#x:%#x, ss:esp = %#x:%#x, ebp = %#x, tf = %p ---\n", + (tf->tf_eflags & PSL_VM) ? " (vm86)" : "", + tf->tf_cs, tf->tf_eip, + TF_HAS_STACKREGS(tf) ? tf->tf_ss : rss(), + TF_HAS_STACKREGS(tf) ? tf->tf_esp : (intptr_t)&tf->tf_esp, + tf->tf_ebp, tf); + return (0); + } + /* * If an indirect call via an invalid pointer caused a trap, * %pc contains the invalid address while the return address Modified: head/sys/i386/include/db_machdep.h ============================================================================== --- head/sys/i386/include/db_machdep.h Sun Sep 25 14:56:24 2016 (r306310) +++ head/sys/i386/include/db_machdep.h Sun Sep 25 16:30:29 2016 (r306311) @@ -98,4 +98,6 @@ do { \ #define DB_SMALL_VALUE_MAX 0x7fffffff #define DB_SMALL_VALUE_MIN (-0x400001) +int db_segsize(struct trapframe *tfp); + #endif /* !_MACHINE_DB_MACHDEP_H_ */ From owner-svn-src-head@freebsd.org Sun Sep 25 16:39:19 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1525BE8CE2; Sun, 25 Sep 2016 16:39:19 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EDD934A; Sun, 25 Sep 2016 16:39:19 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PGdI7k005261; Sun, 25 Sep 2016 16:39:18 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PGdIfT005260; Sun, 25 Sep 2016 16:39:18 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201609251639.u8PGdIfT005260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Sun, 25 Sep 2016 16:39:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306312 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2016 16:39:19 -0000 Author: marcel Date: Sun Sep 25 16:39:18 2016 New Revision: 306312 URL: https://svnweb.freebsd.org/changeset/base/306312 Log: Relocatable object files are renamed from *.So to *.pico Reminder by: imp@ Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Sep 25 16:30:29 2016 (r306311) +++ head/UPDATING Sun Sep 25 16:39:18 2016 (r306312) @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20160924: + Relocatable object files with the extension of .So have been renamed + to use an extension of .pico instead. The purpose of this change is + to avoid a name clash with shared libraries on case-insensitive file + systems. On those file systems, foo.So is the same file as foo.so. + 20160918: GNU rcs has been turned off by default. It can (temporarily) be built again by adding WITH_RCS knob in src.conf. From owner-svn-src-head@freebsd.org Sun Sep 25 16:50:33 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13030BE8F19; Sun, 25 Sep 2016 16:50:33 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0BD59F9; Sun, 25 Sep 2016 16:50:32 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PGoWp7008980; Sun, 25 Sep 2016 16:50:32 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PGoWVX008979; Sun, 25 Sep 2016 16:50:32 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201609251650.u8PGoWVX008979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Sun, 25 Sep 2016 16:50:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306313 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2016 16:50:33 -0000 Author: marcel Date: Sun Sep 25 16:50:31 2016 New Revision: 306313 URL: https://svnweb.freebsd.org/changeset/base/306313 Log: Document the ".pico" extension for object files. Suggested by: emaste@ Modified: head/share/mk/bsd.README Modified: head/share/mk/bsd.README ============================================================================== --- head/share/mk/bsd.README Sun Sep 25 16:39:18 2016 (r306312) +++ head/share/mk/bsd.README Sun Sep 25 16:50:31 2016 (r306313) @@ -114,7 +114,7 @@ the tree where the file gets installed. The profiled libraries are no longer built in a different directory than the regular libraries. A new suffix, ".po", is used to denote a profiled -object. +object, and ".pico" denotes a position-independent relocatable object. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= From owner-svn-src-head@freebsd.org Sun Sep 25 17:43:45 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE76ABE9F8D; Sun, 25 Sep 2016 17:43:45 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward2j.cmail.yandex.net (forward2j.cmail.yandex.net [IPv6:2a02:6b8:0:1630::15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7585316C1; Sun, 25 Sep 2016 17:43:45 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp3h.mail.yandex.net (smtp3h.mail.yandex.net [IPv6:2a02:6b8:0:f05::117]) by forward2j.cmail.yandex.net (Yandex) with ESMTP id 6049020C89; Sun, 25 Sep 2016 20:43:42 +0300 (MSK) Received: from smtp3h.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3h.mail.yandex.net (Yandex) with ESMTP id 9696B440C75; Sun, 25 Sep 2016 20:43:40 +0300 (MSK) Received: by smtp3h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id DP1L6FaOr9-hdFuIvEv; Sun, 25 Sep 2016 20:43:39 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1474825419; bh=xf/P9bTAc3o2PSsjkdys93JrwJyHfMJyA1FB4JXLuuA=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=kI30Hjwbw91geCJa/8dNl5S87bFqI5nMGDQ1+WwmKGtKxL08YeLBJojtLbfcQs98D C5cN0zJpTB1aRMxr0wqYO7WU0I/rLki3v6MaGyzeDCCDV9AA1MM7UZr7cOCEaOniIR jZyAfWxpLfurqUeUCPDfXMYrrHRavn/eVyzgUJgs= Authentication-Results: smtp3h.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-Suid-Status: 1 0,1 0,1 0,1 0 Subject: Re: svn commit: r306312 - head To: Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201609251639.u8PGdIfT005260@repo.freebsd.org> From: "Andrey V. Elsukov" Message-ID: <9b5c402b-fce3-2925-b8f3-6bbc64277f82@yandex.ru> Date: Sun, 25 Sep 2016 20:41:32 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <201609251639.u8PGdIfT005260@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="iPJMGuOwoqwNwWu6mu95HPWPrWNla9cWO" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2016 17:43:45 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --iPJMGuOwoqwNwWu6mu95HPWPrWNla9cWO Content-Type: multipart/mixed; boundary="fKdQpVWdEE9sCMwjEWDf7OBDNkVEHBTG8" From: "Andrey V. Elsukov" To: Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <9b5c402b-fce3-2925-b8f3-6bbc64277f82@yandex.ru> Subject: Re: svn commit: r306312 - head References: <201609251639.u8PGdIfT005260@repo.freebsd.org> In-Reply-To: <201609251639.u8PGdIfT005260@repo.freebsd.org> --fKdQpVWdEE9sCMwjEWDf7OBDNkVEHBTG8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 25.09.16 19:39, Marcel Moolenaar wrote: > +20160924: > + Relocatable object files with the extension of .So have been renamed > + to use an extension of .pico instead. The purpose of this change is > + to avoid a name clash with shared libraries on case-insensitive file > + systems. On those file systems, foo.So is the same file as foo.so. Hi, probably old *.So files now should be removed using `make delete-old` or something like this. --=20 WBR, Andrey V. Elsukov --fKdQpVWdEE9sCMwjEWDf7OBDNkVEHBTG8-- --iPJMGuOwoqwNwWu6mu95HPWPrWNla9cWO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEvBAEBCAAZBQJX6AxQEhxidTdjaGVyQHlhbmRleC5ydQAKCRABxeoEEMihehos CACqUYBRrDN8y5Dhj/VzY8PNQWfAtXLogVRMLdslHUP1nSi3lvY62PMvbo6+zMj6 AgXIr2XDMwzJrzY8YKcjcw/zLSuFtYY++ElGdl3Tmo5HD8tpLxHQXwpTWI+7vdVS igQ1B0cdjEY+H4JhIjFC/MB+NSmetu2Om/uzCc5S4ArDW1/OdPXHw7L+OMNLGOFO fP6joEsmApvvPtKfR9QCkFFkjvgwrhkBNdzFa3rkM3VoXsw1LmAJ7lwoOrff9Cnt /tPhjGcGeKVnAkFJ9f61G3OKCgjIV9C1NQIVHBntW4XxDrCOYnpUoSl4GCL5o4LI cfufPPnGyZlXpv5S5LwKcPbX =pbyq -----END PGP SIGNATURE----- --iPJMGuOwoqwNwWu6mu95HPWPrWNla9cWO-- From owner-svn-src-head@freebsd.org Sun Sep 25 18:29:04 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20F8CBE9104; Sun, 25 Sep 2016 18:29:04 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E573C231; Sun, 25 Sep 2016 18:29:03 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PIT3iI046703; Sun, 25 Sep 2016 18:29:03 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PIT33V046702; Sun, 25 Sep 2016 18:29:03 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <201609251829.u8PIT33V046702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Sun, 25 Sep 2016 18:29:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306318 - head/sys/i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2016 18:29:04 -0000 Author: tijl Date: Sun Sep 25 18:29:02 2016 New Revision: 306318 URL: https://svnweb.freebsd.org/changeset/base/306318 Log: MFamd64: r266901 Allocate a zeroed LDT. Failing to do this might result in the LDT appearing to run out of free descriptors because of random junk in the descriptor's 'sd_type' field. http://lists.freebsd.org/pipermail/freebsd-amd64/2014-May/016088.html PR: 212639 Submitted by: wheelcomplex@gmail.com MFC after: 2 weeks Modified: head/sys/i386/i386/sys_machdep.c Modified: head/sys/i386/i386/sys_machdep.c ============================================================================== --- head/sys/i386/i386/sys_machdep.c Sun Sep 25 17:58:55 2016 (r306317) +++ head/sys/i386/i386/sys_machdep.c Sun Sep 25 18:29:02 2016 (r306318) @@ -438,7 +438,7 @@ user_ldt_alloc(struct mdproc *mdp, int l new_ldt->ldt_len = len = NEW_MAX_LD(len); new_ldt->ldt_base = (caddr_t)kmem_malloc(kernel_arena, - len * sizeof(union descriptor), M_WAITOK); + len * sizeof(union descriptor), M_WAITOK | M_ZERO); new_ldt->ldt_refcnt = 1; new_ldt->ldt_active = 0; From owner-svn-src-head@freebsd.org Sun Sep 25 18:39:25 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F744BE9573; Sun, 25 Sep 2016 18:39:25 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36B9DAF0; Sun, 25 Sep 2016 18:39:25 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PIdOaT050381; Sun, 25 Sep 2016 18:39:24 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PIdO7t050380; Sun, 25 Sep 2016 18:39:24 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201609251839.u8PIdO7t050380@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sun, 25 Sep 2016 18:39:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306319 - head/sys/i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2016 18:39:25 -0000 Author: bde Date: Sun Sep 25 18:39:24 2016 New Revision: 306319 URL: https://svnweb.freebsd.org/changeset/base/306319 Log: Minor fixes for 160-bit disassembly: (1) Print the default segment %ss before adresses relative to %bp. This is too cluttered for me, but so is printing some other default prefixes, and this is a reasonable reminder that %ss is quite likely to be different from %ds in 16-bit mode. db_disasm still handles prefixes poorly, by trying to discard redundant ones. This loses information, and sometimes the result is wrong or misleading. Clean up nearby initializations and dead code. (2) Fix decoding of operand and address size prefixes in 16-bit mode. They reverse the default in all modes. Obtained from: (1) is partly from r1.4 (2003/11/08) in DFlyBSD (?) Modified: head/sys/i386/i386/db_disasm.c Modified: head/sys/i386/i386/db_disasm.c ============================================================================== --- head/sys/i386/i386/db_disasm.c Sun Sep 25 18:29:02 2016 (r306318) +++ head/sys/i386/i386/db_disasm.c Sun Sep 25 18:39:24 2016 (r306319) @@ -884,6 +884,7 @@ struct i_addr { const char * base; const char * index; int ss; + bool defss; /* set if %ss is the default segment */ }; static const char * const db_index_reg_16[8] = { @@ -955,10 +956,12 @@ db_read_address(loc, short_addr, regmodr } addrp->is_reg = FALSE; addrp->index = NULL; + addrp->ss = 0; + addrp->defss = FALSE; if (short_addr) { - addrp->index = NULL; - addrp->ss = 0; + if (rm == 2 || rm == 3 || (rm == 6 && mod != 0)) + addrp->defss = TRUE; switch (mod) { case 0: if (rm == 6) { @@ -985,7 +988,7 @@ db_read_address(loc, short_addr, regmodr } } else { - if (mod != 3 && rm == 4) { + if (rm == 4) { get_value_inc(sib, loc, 1, FALSE); rm = sib_base(sib); index = sib_index(sib); @@ -1036,6 +1039,9 @@ db_print_address(seg, size, addrp) if (seg) { db_printf("%s:", seg); } + else if (addrp->defss) { + db_printf("%%ss:"); + } db_printsym((db_addr_t)addrp->disp, DB_STGY_ANY); if (addrp->base != NULL || addrp->index != NULL) { @@ -1189,11 +1195,11 @@ db_disasm(db_addr_t loc, bool altfmt) prefix = TRUE; do { switch (inst) { - case 0x66: /* data16 */ - size = WORD; + case 0x66: + size = (altfmt ? LONG : WORD); break; case 0x67: - short_addr = TRUE; + short_addr = !altfmt; break; case 0x26: seg = "%es"; From owner-svn-src-head@freebsd.org Sun Sep 25 19:13:08 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D7C5BE9E1E; Sun, 25 Sep 2016 19:13:08 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CBD6B26; Sun, 25 Sep 2016 19:13:08 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PJD7Y8064894; Sun, 25 Sep 2016 19:13:07 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PJD7QA064893; Sun, 25 Sep 2016 19:13:07 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201609251913.u8PJD7QA064893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 25 Sep 2016 19:13:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306320 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2016 19:13:08 -0000 Author: avos Date: Sun Sep 25 19:13:07 2016 New Revision: 306320 URL: https://svnweb.freebsd.org/changeset/base/306320 Log: rsu: do not restart calibration task when going out of RUN state. Clear 'sc_calibrating' flag and stop calibration task when interface is not associated; this fixes possible panic after detach. Reported and tested by: hselasky Reviewed by: adrian MFC after: 6 days Modified: head/sys/dev/usb/wlan/if_rsu.c Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Sun Sep 25 18:39:24 2016 (r306319) +++ head/sys/dev/usb/wlan/if_rsu.c Sun Sep 25 19:13:07 2016 (r306320) @@ -1270,9 +1270,12 @@ rsu_newstate(struct ieee80211vap *vap, e default: break; } - sc->sc_calibrating = 1; - /* Start periodic calibration. */ - taskqueue_enqueue_timeout(taskqueue_thread, &sc->calib_task, hz); + if (startcal != 0) { + sc->sc_calibrating = 1; + /* Start periodic calibration. */ + taskqueue_enqueue_timeout(taskqueue_thread, &sc->calib_task, + hz); + } RSU_UNLOCK(sc); IEEE80211_LOCK(ic); return (uvp->newstate(vap, nstate, arg)); From owner-svn-src-head@freebsd.org Sun Sep 25 19:58:10 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2AECBE9A4A for ; Sun, 25 Sep 2016 19:58:10 +0000 (UTC) (envelope-from 0100015762ed051f-4ca103ba-8c26-442f-bec7-bb8b2c411891-000000@amazonses.com) Received: from a8-13.smtp-out.amazonses.com (a8-13.smtp-out.amazonses.com [54.240.8.13]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7974DD4D for ; Sun, 25 Sep 2016 19:58:10 +0000 (UTC) (envelope-from 0100015762ed051f-4ca103ba-8c26-442f-bec7-bb8b2c411891-000000@amazonses.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57; d=tarsnap.com; t=1474833483; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=PmxC31rIYZwY0rs2B7+gZ5XE3YJ4oMfPG47V43KpdEQ=; b=qA6FMRUoj2V1VpPeHKMtyT6SaxyKLc8xkGc6byOKhI1t1sRraEP+wKf8CpSbM4HN zbizUCjQouTGW/+YXZYp0LDLhE537hAwpKbr2bp81H94nM+ibvhANWCtEbHOLIOaRlk uYEC8VHfaWYimmcu0O5VIguHCGyaNBP1P4/NS6xk= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1474833483; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=PmxC31rIYZwY0rs2B7+gZ5XE3YJ4oMfPG47V43KpdEQ=; b=r+BOSSCl2uvdSQE6DEci4yHCepXhd2+akq+Em7qGf3NmfiiJdEIeFqDWctVxGmtz bY+MmBIQoSGtPBCZD8QDeZi6dLNtgbU+DwGWkZF8GU1UOjVE2tV9NVUI2u31PjKB/bl Zcsq8sI530aqyFobl8z7HBu4CAH6yE47+BogBVKA= Subject: Re: svn commit: r306319 - head/sys/i386/i386 To: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201609251839.u8PIdO7t050380@repo.freebsd.org> From: Colin Percival Message-ID: <0100015762ed051f-4ca103ba-8c26-442f-bec7-bb8b2c411891-000000@email.amazonses.com> Date: Sun, 25 Sep 2016 19:58:03 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <201609251839.u8PIdO7t050380@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SES-Outgoing: 2016.09.25-54.240.8.13 Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2016 19:58:10 -0000 On 09/25/16 11:39, Bruce Evans wrote: > Author: bde > Date: Sun Sep 25 18:39:24 2016 > New Revision: 306319 > URL: https://svnweb.freebsd.org/changeset/base/306319 > > Log: > Minor fixes for 160-bit disassembly: I thought the x86 architecture was limited to 120-bit instructions? -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-head@freebsd.org Sun Sep 25 22:07:43 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34E59BEA55D; Sun, 25 Sep 2016 22:07:43 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1036283E; Sun, 25 Sep 2016 22:07:42 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PM7gqg029064; Sun, 25 Sep 2016 22:07:42 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PM7fOJ029060; Sun, 25 Sep 2016 22:07:41 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201609252207.u8PM7fOJ029060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 25 Sep 2016 22:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306323 - in head/sys/dev/ath/ath_hal: . ah_regdomain X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2016 22:07:43 -0000 Author: adrian Date: Sun Sep 25 22:07:41 2016 New Revision: 306323 URL: https://svnweb.freebsd.org/changeset/base/306323 Log: [ath_hal] Add FCC6_FCCA regulatory domain (0x0014). Tested: * TP-Link N900, AR9380, regdomain 0x0014 (FCC6_FCCA). Modified: head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_freqbands.h head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_regmap.h Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Sun Sep 25 22:04:02 2016 (r306322) +++ head/sys/dev/ath/ath_hal/ah_internal.h Sun Sep 25 22:07:41 2016 (r306323) @@ -134,7 +134,7 @@ struct ath_hal_rf *ath_hal_rfprobe(struc * right now. */ #ifndef AH_MAXCHAN -#define AH_MAXCHAN 96 +#define AH_MAXCHAN 128 #endif #define HAL_NF_CAL_HIST_LEN_FULL 5 Modified: head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h Sun Sep 25 22:04:02 2016 (r306322) +++ head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h Sun Sep 25 22:07:41 2016 (r306323) @@ -242,6 +242,17 @@ static REG_DOMAIN regDomains[] = { .chan11a_quarter = BM3(F8_5180_5240, F8_5260_5320,F10_5745_5825), }, + {.regDmnEnum = FCC6, + .conformanceTestLimit = FCC, + .chan11a = BM5(F8_5180_5240, F5_5260_5320, F1_5500_5580, F2_5660_5720, F6_5745_5825), + .chan11a_turbo = BM3(T7_5210_5210, T3_5250_5290, T2_5760_5800), + .chan11a_dyn_turbo = BM4(T7_5200_5200, T1_5240_5240, T2_5280_5280, T1_5765_5805), +#if 0 + .chan11a_half = BM3(F7_5180_5240, F7_5260_5320, F9_5745_5825), + .chan11a_quarter = BM3(F8_5180_5240, F8_5260_5320,F10_5745_5825), +#endif + }, + {.regDmnEnum = MKK1, .conformanceTestLimit = MKK, .pscan = PSCAN_MKK1, Modified: head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_freqbands.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_freqbands.h Sun Sep 25 22:04:02 2016 (r306322) +++ head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_freqbands.h Sun Sep 25 22:07:41 2016 (r306323) @@ -125,8 +125,11 @@ static REG_DMN_FREQ_BAND regDmn5GhzFreq[ { 5280, 5320, 17, 6, 20, 20, DFS_FCC3 | DFS_ETSI, PSCAN_FCC }, #define F1_5280_5320 AFTER(F3_5260_5700) + { 5500, 5580, 23, 6, 20, 20, DFS_FCC3, PSCAN_FCC }, +#define F1_5500_5580 AFTER(F1_5280_5320) + { 5500, 5620, 30, 6, 20, 20, DFS_ETSI, PSCAN_ETSI }, -#define F1_5500_5620 AFTER(F1_5280_5320) +#define F1_5500_5620 AFTER(F1_5500_5580) { 5500, 5700, 20, 6, 20, 20, DFS_FCC3 | DFS_ETSI, PSCAN_FCC }, #define F1_5500_5700 AFTER(F1_5500_5620) @@ -136,9 +139,11 @@ static REG_DMN_FREQ_BAND regDmn5GhzFreq[ #define F3_5500_5700 AFTER(F2_5500_5700) { 5500, 5700, 23, 0, 20, 20, DFS_FCC3 | DFS_ETSI | DFS_MKK4, PSCAN_MKK3 | PSCAN_FCC }, #define F4_5500_5700 AFTER(F3_5500_5700) + { 5660, 5720, 23, 6, 20, 20, DFS_FCC3 | DFS_ETSI, PSCAN_FCC | PSCAN_ETSI }, +#define F2_5660_5720 AFTER(F4_5500_5700) { 5745, 5805, 23, 0, 20, 20, NO_DFS, NO_PSCAN }, -#define F1_5745_5805 AFTER(F4_5500_5700) +#define F1_5745_5805 AFTER(F2_5660_5720) { 5745, 5805, 30, 6, 20, 20, NO_DFS, NO_PSCAN }, #define F2_5745_5805 AFTER(F1_5745_5805) { 5745, 5805, 30, 6, 20, 20, DFS_ETSI, PSCAN_ETSI }, @@ -191,6 +196,7 @@ static REG_DMN_FREQ_BAND regDmn5GhzFreq[ #define W2_5825_5825 AFTER(W2_5180_5240) }; + /* * 5GHz Turbo (dynamic & static) tags */ @@ -203,13 +209,14 @@ static REG_DMN_FREQ_BAND regDmn5GhzTurbo #define T1_5370_5490 AFTER(T1_5250_5330) { 5530, 5650, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN }, #define T1_5530_5650 AFTER(T1_5370_5490) - + { 5200, 5200, 23, 6, 40, 40, NO_DFS, NO_PSCAN }, +#define T7_5200_5200 AFTER(T1_5530_5650) { 5150, 5190, 5, 6, 40, 40, NO_DFS, NO_PSCAN }, -#define T1_5150_5190 AFTER(T1_5530_5650) - { 5230, 5310, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN }, -#define T1_5230_5310 AFTER(T1_5150_5190) +#define T1_5230_5310 AFTER(T7_5200_5200) { 5350, 5470, 5, 6, 40, 40, NO_DFS, NO_PSCAN }, -#define T1_5350_5470 AFTER(T1_5230_5310) +#define T1_5150_5190 AFTER(T1_5230_5310) + { 5230, 5310, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN }, +#define T1_5350_5470 AFTER(T1_5150_5190) { 5510, 5670, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN }, #define T1_5510_5670 AFTER(T1_5350_5470) @@ -221,9 +228,13 @@ static REG_DMN_FREQ_BAND regDmn5GhzTurbo #define T1_5210_5210 AFTER(T2_5200_5240) { 5210, 5210, 23, 0, 40, 40, NO_DFS, NO_PSCAN }, #define T2_5210_5210 AFTER(T1_5210_5210) + { 5210, 5210, 23, 6, 40, 40, NO_DFS, NO_PSCAN }, +#define T7_5210_5210 AFTER(T2_5210_5210) + { 5240, 5240, 23, 6, 40, 40, NO_DFS, PSCAN_FCC_T }, +#define T1_5240_5240 AFTER(T7_5210_5210) { 5280, 5280, 23, 6, 40, 40, DFS_FCC3, PSCAN_FCC_T }, -#define T1_5280_5280 AFTER(T2_5210_5210) +#define T1_5280_5280 AFTER(T1_5240_5240) { 5280, 5280, 20, 6, 40, 40, DFS_FCC3, PSCAN_FCC_T }, #define T2_5280_5280 AFTER(T1_5280_5280) { 5250, 5250, 17, 0, 40, 40, DFS_FCC3, PSCAN_FCC_T }, @@ -234,9 +245,11 @@ static REG_DMN_FREQ_BAND regDmn5GhzTurbo #define T1_5250_5290 AFTER(T1_5290_5290) { 5250, 5290, 23, 6, 40, 40, DFS_FCC3, PSCAN_FCC_T }, #define T2_5250_5290 AFTER(T1_5250_5290) + { 5250, 5290, 23, 6, 40, 40, NO_DFS, PSCAN_FCC_T }, +#define T3_5250_5290 AFTER(T2_5250_5290) { 5540, 5660, 20, 6, 40, 40, DFS_FCC3, PSCAN_FCC_T }, -#define T1_5540_5660 AFTER(T2_5250_5290) +#define T1_5540_5660 AFTER(T3_5250_5290) { 5760, 5800, 20, 0, 40, 40, NO_DFS, NO_PSCAN }, #define T1_5760_5800 AFTER(T1_5540_5660) { 5760, 5800, 30, 6, 40, 40, NO_DFS, NO_PSCAN }, Modified: head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_regmap.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_regmap.h Sun Sep 25 22:04:02 2016 (r306322) +++ head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_regmap.h Sun Sep 25 22:07:41 2016 (r306323) @@ -41,6 +41,7 @@ static REG_DMN_PAIR_MAPPING regDomainPai {FCC3_WORLD, FCC3, WORLD, NO_REQ, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT }, {FCC4_FCCA, FCC4, FCCA, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT }, {FCC5_FCCB, FCC5, FCCB, NO_REQ, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT }, + {FCC6_FCCA, FCC6, FCCA, NO_REQ, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT }, {ETSI1_WORLD, ETSI1, WORLD, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT }, {ETSI2_WORLD, ETSI2, WORLD, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT }, From owner-svn-src-head@freebsd.org Sun Sep 25 22:17:48 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D702BEA7D4; Sun, 25 Sep 2016 22:17:48 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2B18F2B; Sun, 25 Sep 2016 22:17:47 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PMHlG1032759; Sun, 25 Sep 2016 22:17:47 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PMHlRu032758; Sun, 25 Sep 2016 22:17:47 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201609252217.u8PMHlRu032758@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 25 Sep 2016 22:17:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306324 - head/sys/dev/ath/ath_hal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2016 22:17:48 -0000 Author: adrian Date: Sun Sep 25 22:17:46 2016 New Revision: 306324 URL: https://svnweb.freebsd.org/changeset/base/306324 Log: [ath_hal] add a comment for the channel 144 regdomain flag. I'm .. still trying to figure out what's going on. Modified: head/sys/dev/ath/ath_hal/ah_regdomain.c Modified: head/sys/dev/ath/ath_hal/ah_regdomain.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah_regdomain.c Sun Sep 25 22:07:41 2016 (r306323) +++ head/sys/dev/ath/ath_hal/ah_regdomain.c Sun Sep 25 22:17:46 2016 (r306324) @@ -548,6 +548,14 @@ add_chanlist_mode(struct ath_hal *ah, st continue; } #endif + + /* + * XXX TODO: handle REG_EXT_FCC_CH_144. + * + * Figure out which instances/uses cause us to not + * be allowed to use channel 144 (pri or sec overlap.) + */ + bfreq_lo = MAX(fband->lowChannel + low_adj, freq_lo); bfreq_hi = MIN(fband->highChannel + hi_adj, freq_hi); if (fband->channelSep >= channelSep) From owner-svn-src-head@freebsd.org Sun Sep 25 22:58:01 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D550BEAF07; Sun, 25 Sep 2016 22:58:01 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35C551A5; Sun, 25 Sep 2016 22:58:01 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PMw0IN047437; Sun, 25 Sep 2016 22:58:00 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PMvxUx047428; Sun, 25 Sep 2016 22:57:59 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201609252257.u8PMvxUx047428@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Sun, 25 Sep 2016 22:57:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306325 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2016 22:58:01 -0000 Author: marcel Date: Sun Sep 25 22:57:59 2016 New Revision: 306325 URL: https://svnweb.freebsd.org/changeset/base/306325 Log: Replace the use of linker sets with constructors for both the formats and schemes. Formats and schemes are registered at runtime now, rather than collected at link time. Modified: head/usr.bin/mkimg/format.c head/usr.bin/mkimg/format.h head/usr.bin/mkimg/mkimg.c head/usr.bin/mkimg/scheme.c head/usr.bin/mkimg/scheme.h Modified: head/usr.bin/mkimg/format.c ============================================================================== --- head/usr.bin/mkimg/format.c Sun Sep 25 22:17:46 2016 (r306324) +++ head/usr.bin/mkimg/format.c Sun Sep 25 22:57:59 2016 (r306325) @@ -28,8 +28,6 @@ __FBSDID("$FreeBSD$"); #include -#include -#include #include #include #include @@ -42,8 +40,24 @@ __FBSDID("$FreeBSD$"); #include "format.h" #include "mkimg.h" +static struct mkimg_format *first; static struct mkimg_format *format; +struct mkimg_format * +format_iterate(struct mkimg_format *f) +{ + + return ((f == NULL) ? first : f->next); +} + +void +format_register(struct mkimg_format *f) +{ + + f->next = first; + first = f; +} + int format_resize(lba_t end) { @@ -56,10 +70,10 @@ format_resize(lba_t end) int format_select(const char *spec) { - struct mkimg_format *f, **iter; + struct mkimg_format *f; - SET_FOREACH(iter, formats) { - f = *iter; + f = NULL; + while ((f = format_iterate(f)) != NULL) { if (strcasecmp(spec, f->name) == 0) { format = f; return (0); Modified: head/usr.bin/mkimg/format.h ============================================================================== --- head/usr.bin/mkimg/format.h Sun Sep 25 22:17:46 2016 (r306324) +++ head/usr.bin/mkimg/format.h Sun Sep 25 22:57:59 2016 (r306325) @@ -29,21 +29,24 @@ #ifndef _MKIMG_FORMAT_H_ #define _MKIMG_FORMAT_H_ -#include - struct mkimg_format { + struct mkimg_format *next; const char *name; const char *description; int (*resize)(lba_t); int (*write)(int); }; -SET_DECLARE(formats, struct mkimg_format); -#define FORMAT_DEFINE(nm) DATA_SET(formats, nm) +#define FORMAT_DEFINE(nm) \ +static void format_register_##nm(void) __attribute__((constructor)); \ +static void format_register_##nm(void) { format_register(&nm); } -int format_resize(lba_t); +struct mkimg_format *format_iterate(struct mkimg_format *); +void format_register(struct mkimg_format *); int format_select(const char *); struct mkimg_format *format_selected(void); + +int format_resize(lba_t); int format_write(int); #endif /* _MKIMG_FORMAT_H_ */ Modified: head/usr.bin/mkimg/mkimg.c ============================================================================== --- head/usr.bin/mkimg/mkimg.c Sun Sep 25 22:17:46 2016 (r306324) +++ head/usr.bin/mkimg/mkimg.c Sun Sep 25 22:57:59 2016 (r306325) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include #include #include #include @@ -77,20 +76,20 @@ u_int blksz = 0; static void print_formats(int usage) { - struct mkimg_format *f, **f_iter; + struct mkimg_format *f; const char *sep; if (usage) { fprintf(stderr, " formats:\n"); - SET_FOREACH(f_iter, formats) { - f = *f_iter; + f = NULL; + while ((f = format_iterate(f)) != NULL) { fprintf(stderr, "\t%s\t- %s\n", f->name, f->description); } } else { sep = ""; - SET_FOREACH(f_iter, formats) { - f = *f_iter; + f = NULL; + while ((f = format_iterate(f)) != NULL) { printf("%s%s", sep, f->name); sep = " "; } @@ -101,20 +100,20 @@ print_formats(int usage) static void print_schemes(int usage) { - struct mkimg_scheme *s, **s_iter; + struct mkimg_scheme *s; const char *sep; if (usage) { fprintf(stderr, " schemes:\n"); - SET_FOREACH(s_iter, schemes) { - s = *s_iter; + s = NULL; + while ((s = scheme_iterate(s)) != NULL) { fprintf(stderr, "\t%s\t- %s\n", s->name, s->description); } } else { sep = ""; - SET_FOREACH(s_iter, schemes) { - s = *s_iter; + s = NULL; + while ((s = scheme_iterate(s)) != NULL) { printf("%s%s", sep, s->name); sep = " "; } Modified: head/usr.bin/mkimg/scheme.c ============================================================================== --- head/usr.bin/mkimg/scheme.c Sun Sep 25 22:17:46 2016 (r306324) +++ head/usr.bin/mkimg/scheme.c Sun Sep 25 22:57:59 2016 (r306325) @@ -28,8 +28,6 @@ __FBSDID("$FreeBSD$"); #include -#include -#include #include #include #include @@ -65,6 +63,7 @@ static struct { { NULL, ALIAS_NONE } /* Keep last! */ }; +static struct mkimg_scheme *first; static struct mkimg_scheme *scheme; static void *bootcode; @@ -82,13 +81,27 @@ scheme_parse_alias(const char *name) return (ALIAS_NONE); } +struct mkimg_scheme * +scheme_iterate(struct mkimg_scheme *s) +{ + + return ((s == NULL) ? first : s->next); +} + +void +scheme_register(struct mkimg_scheme *s) +{ + s->next = first; + first = s; +} + int scheme_select(const char *spec) { - struct mkimg_scheme *s, **iter; + struct mkimg_scheme *s; - SET_FOREACH(iter, schemes) { - s = *iter; + s = NULL; + while ((s = scheme_iterate(s)) != NULL) { if (strcasecmp(spec, s->name) == 0) { scheme = s; return (0); Modified: head/usr.bin/mkimg/scheme.h ============================================================================== --- head/usr.bin/mkimg/scheme.h Sun Sep 25 22:17:46 2016 (r306324) +++ head/usr.bin/mkimg/scheme.h Sun Sep 25 22:57:59 2016 (r306325) @@ -29,8 +29,6 @@ #ifndef _MKIMG_SCHEME_H_ #define _MKIMG_SCHEME_H_ -#include - enum alias { ALIAS_NONE, /* Keep first! */ /* start */ @@ -62,6 +60,7 @@ struct mkimg_alias { }; struct mkimg_scheme { + struct mkimg_scheme *next; const char *name; const char *description; struct mkimg_alias *aliases; @@ -77,9 +76,12 @@ struct mkimg_scheme { u_int maxsecsz; }; -SET_DECLARE(schemes, struct mkimg_scheme); -#define SCHEME_DEFINE(nm) DATA_SET(schemes, nm) +#define SCHEME_DEFINE(nm) \ +static void scheme_register_##nm(void) __attribute__((constructor)); \ +static void scheme_register_##nm(void) { scheme_register(&nm); } +struct mkimg_scheme *scheme_iterate(struct mkimg_scheme *); +void scheme_register(struct mkimg_scheme *); int scheme_select(const char *); struct mkimg_scheme *scheme_selected(void); From owner-svn-src-head@freebsd.org Sun Sep 25 23:45:50 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8B11BE9A48; Sun, 25 Sep 2016 23:45:50 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9625C9B1; Sun, 25 Sep 2016 23:45:50 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PNjnY3065799; Sun, 25 Sep 2016 23:45:49 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PNjnkE065798; Sun, 25 Sep 2016 23:45:49 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609252345.u8PNjnkE065798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 25 Sep 2016 23:45:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306327 - head/sys/arm/nvidia X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2016 23:45:50 -0000 Author: gonzo Date: Sun Sep 25 23:45:49 2016 New Revision: 306327 URL: https://svnweb.freebsd.org/changeset/base/306327 Log: Update AHCI driver to match new dts tree phy name parameter was changed from "sata-phy" to "sata-0" in new dts tree introduced in r306197 Modified: head/sys/arm/nvidia/tegra_ahci.c Modified: head/sys/arm/nvidia/tegra_ahci.c ============================================================================== --- head/sys/arm/nvidia/tegra_ahci.c Sun Sep 25 23:05:44 2016 (r306326) +++ head/sys/arm/nvidia/tegra_ahci.c Sun Sep 25 23:45:49 2016 (r306327) @@ -255,7 +255,7 @@ get_fdt_resources(struct tegra_ahci_sc * return (ENXIO); } - rv = phy_get_by_ofw_name(sc->dev, 0, "sata-phy", &sc->phy); + rv = phy_get_by_ofw_name(sc->dev, 0, "sata-0", &sc->phy); if (rv != 0) { device_printf(sc->dev, "Cannot get 'sata' phy\n"); return (ENXIO); From owner-svn-src-head@freebsd.org Sun Sep 25 23:48:17 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FE20BE9B32; Sun, 25 Sep 2016 23:48:17 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC055B51; Sun, 25 Sep 2016 23:48:16 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8PNmFwm065919; Sun, 25 Sep 2016 23:48:15 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8PNmFxH065918; Sun, 25 Sep 2016 23:48:15 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609252348.u8PNmFxH065918@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 25 Sep 2016 23:48:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306328 - head/sys/arm/nvidia X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2016 23:48:17 -0000 Author: gonzo Date: Sun Sep 25 23:48:15 2016 New Revision: 306328 URL: https://svnweb.freebsd.org/changeset/base/306328 Log: Update PCI driver to match new dts tree In new dts tree phy is a property of port, not the controller node, also the name was changed from "pcie" to "pcie-0" Modified: head/sys/arm/nvidia/tegra_pcie.c Modified: head/sys/arm/nvidia/tegra_pcie.c ============================================================================== --- head/sys/arm/nvidia/tegra_pcie.c Sun Sep 25 23:45:49 2016 (r306327) +++ head/sys/arm/nvidia/tegra_pcie.c Sun Sep 25 23:48:15 2016 (r306328) @@ -266,6 +266,7 @@ struct tegra_pcib_port { int port_idx; /* chip port index */ int num_lanes; /* number of lanes */ bus_size_t afi_pex_ctrl; /* offset of afi_pex_ctrl */ + phy_t phy; /* port phy */ /* Config space properties. */ bus_addr_t rp_base_addr; /* PA of config window */ @@ -291,7 +292,6 @@ struct tegra_pcib_softc { struct ofw_pci_range pref_mem_range; struct ofw_pci_range io_range; - phy_t phy; clk_t clk_pex; clk_t clk_afi; clk_t clk_pll_e; @@ -963,6 +963,15 @@ tegra_pcib_parse_port(struct tegra_pcib_ port->afi_pex_ctrl = tegra_pcib_pex_ctrl(sc, port->port_idx); sc->lanes_cfg |= port->num_lanes << (4 * port->port_idx); + /* Phy. */ + rv = phy_get_by_ofw_name(sc->dev, node, "pcie-0", &port->phy); + if (rv != 0) { + device_printf(sc->dev, + "Cannot get 'pcie-0' phy for port %d\n", + port->port_idx); + goto fail; + } + return (port); fail: free(port, M_DEVBUF); @@ -1067,13 +1076,6 @@ tegra_pcib_parse_fdt_resources(struct te return (ENXIO); } - /* Phy. */ - rv = phy_get_by_ofw_name(sc->dev, 0, "pcie", &sc->phy); - if (rv != 0) { - device_printf(sc->dev, "Cannot get 'pcie' phy\n"); - return (ENXIO); - } - /* Ports */ sc->num_ports = 0; for (child = OF_child(node); child != 0; child = OF_peer(child)) { @@ -1306,13 +1308,19 @@ tegra_pcib_enable(struct tegra_pcib_soft reg &= ~AFI_FUSE_PCIE_T0_GEN2_DIS; AFI_WR4(sc, AFI_FUSE, reg); - /* Enable PCIe phy. */ - rv = phy_enable(sc->dev, sc->phy); - if (rv != 0) { - device_printf(sc->dev, "Cannot enable phy\n"); - return (rv); + for (i = 0; i < TEGRA_PCIB_MAX_PORTS; i++) { + if (sc->ports[i] != NULL) { + rv = phy_enable(sc->dev, sc->ports[i]->phy); + if (rv != 0) { + device_printf(sc->dev, + "Cannot enable phy for port %d\n", + sc->ports[i]->port_idx); + return (rv); + } + } } + rv = hwreset_deassert(sc->hwreset_pcie_x); if (rv != 0) { device_printf(sc->dev, "Cannot unreset 'pci_x' reset\n"); From owner-svn-src-head@freebsd.org Sun Sep 25 23:52:17 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AAB9BE9DF1; Sun, 25 Sep 2016 23:52:17 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f169.google.com (mail-io0-f169.google.com [209.85.223.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 079F4EC1; Sun, 25 Sep 2016 23:52:16 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f169.google.com with SMTP id e66so77238503iod.1; Sun, 25 Sep 2016 16:52:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=1oq/bwl4EJgfZH3GyjuM38JJV0NvYjSJsyp/um9pwgE=; b=kkVg+psrfnRY4EQhxMXSvahe740z1zRHhBB52d2BB3J8Vs3GUZmIRuGrLp4vZWRDFU zzq0ga+3aos6vnjK/tFOQE+M1hxZdDeZw3xahshq6Fa93SdN4kO320MgM7WCjh9UUxlq lt6ZSglvR3D2UdGT9sgBdzsmeitgERuDe1kOU92BXWjg/QsBZIF0wuBqfzad8n5vxJr3 r9wZMJiKpWHGf7qh0+p3zsBQNKIEiFbmC3Py5bv8c0/OZxstqXrjmr8vwvFpHAeVi8xn Nq3vwM2WntMNJLOYm6MIvrPQIN/U8Xdo8vHUEDhxSGH5OOcKPJXubgcWUh7zesD7Wa6v 0MSw== X-Gm-Message-State: AA6/9Rku/a0815E8QNlMAA+tvm0Sr9fWCdiuZFF6kh2/x+gSWmalVc6kXBGzXLpaBnbCfA== X-Received: by 10.107.163.72 with SMTP id m69mr21138793ioe.106.1474847529074; Sun, 25 Sep 2016 16:52:09 -0700 (PDT) Received: from mail-io0-f179.google.com (mail-io0-f179.google.com. [209.85.223.179]) by smtp.gmail.com with ESMTPSA id z130sm7257210iod.17.2016.09.25.16.52.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Sep 2016 16:52:08 -0700 (PDT) Received: by mail-io0-f179.google.com with SMTP id r145so167132587ior.0; Sun, 25 Sep 2016 16:52:08 -0700 (PDT) X-Received: by 10.107.58.87 with SMTP id h84mr20509619ioa.122.1474847528601; Sun, 25 Sep 2016 16:52:08 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.36.220.129 with HTTP; Sun, 25 Sep 2016 16:52:08 -0700 (PDT) In-Reply-To: <201609252257.u8PMvxUx047428@repo.freebsd.org> References: <201609252257.u8PMvxUx047428@repo.freebsd.org> From: Conrad Meyer Date: Sun, 25 Sep 2016 16:52:08 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r306325 - head/usr.bin/mkimg To: Marcel Moolenaar Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2016 23:52:17 -0000 What's the motivation for this? This seems worse. Best, Conrad On Sun, Sep 25, 2016 at 3:57 PM, Marcel Moolenaar wrote: > Author: marcel > Date: Sun Sep 25 22:57:59 2016 > New Revision: 306325 > URL: https://svnweb.freebsd.org/changeset/base/306325 > > Log: > Replace the use of linker sets with constructors for both the > formats and schemes. Formats and schemes are registered at > runtime now, rather than collected at link time. > > Modified: > head/usr.bin/mkimg/format.c > head/usr.bin/mkimg/format.h > head/usr.bin/mkimg/mkimg.c > head/usr.bin/mkimg/scheme.c > head/usr.bin/mkimg/scheme.h > > Modified: head/usr.bin/mkimg/format.c > ============================================================================== > --- head/usr.bin/mkimg/format.c Sun Sep 25 22:17:46 2016 (r306324) > +++ head/usr.bin/mkimg/format.c Sun Sep 25 22:57:59 2016 (r306325) > @@ -28,8 +28,6 @@ > __FBSDID("$FreeBSD$"); > > #include > -#include > -#include > #include > #include > #include > @@ -42,8 +40,24 @@ __FBSDID("$FreeBSD$"); > #include "format.h" > #include "mkimg.h" > > +static struct mkimg_format *first; > static struct mkimg_format *format; > > +struct mkimg_format * > +format_iterate(struct mkimg_format *f) > +{ > + > + return ((f == NULL) ? first : f->next); > +} > + > +void > +format_register(struct mkimg_format *f) > +{ > + > + f->next = first; > + first = f; > +} > + > int > format_resize(lba_t end) > { > @@ -56,10 +70,10 @@ format_resize(lba_t end) > int > format_select(const char *spec) > { > - struct mkimg_format *f, **iter; > + struct mkimg_format *f; > > - SET_FOREACH(iter, formats) { > - f = *iter; > + f = NULL; > + while ((f = format_iterate(f)) != NULL) { > if (strcasecmp(spec, f->name) == 0) { > format = f; > return (0); > > Modified: head/usr.bin/mkimg/format.h > ============================================================================== > --- head/usr.bin/mkimg/format.h Sun Sep 25 22:17:46 2016 (r306324) > +++ head/usr.bin/mkimg/format.h Sun Sep 25 22:57:59 2016 (r306325) > @@ -29,21 +29,24 @@ > #ifndef _MKIMG_FORMAT_H_ > #define _MKIMG_FORMAT_H_ > > -#include > - > struct mkimg_format { > + struct mkimg_format *next; > const char *name; > const char *description; > int (*resize)(lba_t); > int (*write)(int); > }; > > -SET_DECLARE(formats, struct mkimg_format); > -#define FORMAT_DEFINE(nm) DATA_SET(formats, nm) > +#define FORMAT_DEFINE(nm) \ > +static void format_register_##nm(void) __attribute__((constructor)); \ > +static void format_register_##nm(void) { format_register(&nm); } > > -int format_resize(lba_t); > +struct mkimg_format *format_iterate(struct mkimg_format *); > +void format_register(struct mkimg_format *); > int format_select(const char *); > struct mkimg_format *format_selected(void); > + > +int format_resize(lba_t); > int format_write(int); > > #endif /* _MKIMG_FORMAT_H_ */ > > Modified: head/usr.bin/mkimg/mkimg.c > ============================================================================== > --- head/usr.bin/mkimg/mkimg.c Sun Sep 25 22:17:46 2016 (r306324) > +++ head/usr.bin/mkimg/mkimg.c Sun Sep 25 22:57:59 2016 (r306325) > @@ -27,7 +27,6 @@ > #include > __FBSDID("$FreeBSD$"); > > -#include > #include > #include > #include > @@ -77,20 +76,20 @@ u_int blksz = 0; > static void > print_formats(int usage) > { > - struct mkimg_format *f, **f_iter; > + struct mkimg_format *f; > const char *sep; > > if (usage) { > fprintf(stderr, " formats:\n"); > - SET_FOREACH(f_iter, formats) { > - f = *f_iter; > + f = NULL; > + while ((f = format_iterate(f)) != NULL) { > fprintf(stderr, "\t%s\t- %s\n", f->name, > f->description); > } > } else { > sep = ""; > - SET_FOREACH(f_iter, formats) { > - f = *f_iter; > + f = NULL; > + while ((f = format_iterate(f)) != NULL) { > printf("%s%s", sep, f->name); > sep = " "; > } > @@ -101,20 +100,20 @@ print_formats(int usage) > static void > print_schemes(int usage) > { > - struct mkimg_scheme *s, **s_iter; > + struct mkimg_scheme *s; > const char *sep; > > if (usage) { > fprintf(stderr, " schemes:\n"); > - SET_FOREACH(s_iter, schemes) { > - s = *s_iter; > + s = NULL; > + while ((s = scheme_iterate(s)) != NULL) { > fprintf(stderr, "\t%s\t- %s\n", s->name, > s->description); > } > } else { > sep = ""; > - SET_FOREACH(s_iter, schemes) { > - s = *s_iter; > + s = NULL; > + while ((s = scheme_iterate(s)) != NULL) { > printf("%s%s", sep, s->name); > sep = " "; > } > > Modified: head/usr.bin/mkimg/scheme.c > ============================================================================== > --- head/usr.bin/mkimg/scheme.c Sun Sep 25 22:17:46 2016 (r306324) > +++ head/usr.bin/mkimg/scheme.c Sun Sep 25 22:57:59 2016 (r306325) > @@ -28,8 +28,6 @@ > __FBSDID("$FreeBSD$"); > > #include > -#include > -#include > #include > #include > #include > @@ -65,6 +63,7 @@ static struct { > { NULL, ALIAS_NONE } /* Keep last! */ > }; > > +static struct mkimg_scheme *first; > static struct mkimg_scheme *scheme; > static void *bootcode; > > @@ -82,13 +81,27 @@ scheme_parse_alias(const char *name) > return (ALIAS_NONE); > } > > +struct mkimg_scheme * > +scheme_iterate(struct mkimg_scheme *s) > +{ > + > + return ((s == NULL) ? first : s->next); > +} > + > +void > +scheme_register(struct mkimg_scheme *s) > +{ > + s->next = first; > + first = s; > +} > + > int > scheme_select(const char *spec) > { > - struct mkimg_scheme *s, **iter; > + struct mkimg_scheme *s; > > - SET_FOREACH(iter, schemes) { > - s = *iter; > + s = NULL; > + while ((s = scheme_iterate(s)) != NULL) { > if (strcasecmp(spec, s->name) == 0) { > scheme = s; > return (0); > > Modified: head/usr.bin/mkimg/scheme.h > ============================================================================== > --- head/usr.bin/mkimg/scheme.h Sun Sep 25 22:17:46 2016 (r306324) > +++ head/usr.bin/mkimg/scheme.h Sun Sep 25 22:57:59 2016 (r306325) > @@ -29,8 +29,6 @@ > #ifndef _MKIMG_SCHEME_H_ > #define _MKIMG_SCHEME_H_ > > -#include > - > enum alias { > ALIAS_NONE, /* Keep first! */ > /* start */ > @@ -62,6 +60,7 @@ struct mkimg_alias { > }; > > struct mkimg_scheme { > + struct mkimg_scheme *next; > const char *name; > const char *description; > struct mkimg_alias *aliases; > @@ -77,9 +76,12 @@ struct mkimg_scheme { > u_int maxsecsz; > }; > > -SET_DECLARE(schemes, struct mkimg_scheme); > -#define SCHEME_DEFINE(nm) DATA_SET(schemes, nm) > +#define SCHEME_DEFINE(nm) \ > +static void scheme_register_##nm(void) __attribute__((constructor)); \ > +static void scheme_register_##nm(void) { scheme_register(&nm); } > > +struct mkimg_scheme *scheme_iterate(struct mkimg_scheme *); > +void scheme_register(struct mkimg_scheme *); > int scheme_select(const char *); > struct mkimg_scheme *scheme_selected(void); > > From owner-svn-src-head@freebsd.org Mon Sep 26 00:09:28 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AD75BEA405; Mon, 26 Sep 2016 00:09:28 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CBC2153F; Mon, 26 Sep 2016 00:09:27 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from Marcels-MacBook-Pro.local.mail (atc.xcllnt.net [50.0.150.213]) (authenticated bits=0) by mail.xcllnt.net (8.15.2/8.15.2) with ESMTPSA id u8Q09LEd008443 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Sun, 25 Sep 2016 17:09:21 -0700 (PDT) (envelope-from marcel@xcllnt.net) Date: Sun, 25 Sep 2016 17:09:20 -0700 From: Marcel Moolenaar To: Marcel Moolenaar , cem@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org, src-committers Message-ID: In-Reply-To: References: <201609252257.u8PMvxUx047428@repo.freebsd.org> Subject: Re: svn commit: r306325 - head/usr.bin/mkimg X-Mailer: Airmail (382) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="27779CF1-FBA2-4D54-B6E0-BD1DB12EC109"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.xcllnt.net [50.0.150.214]); Sun, 25 Sep 2016 17:09:21 -0700 (PDT) X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 00:09:28 -0000 --27779CF1-FBA2-4D54-B6E0-BD1DB12EC109 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On September 25, 2016 at 4:52:17 PM, Conrad Meyer (cem=40freebsd.org) wro= te: What's the motivation for this=3F This seems worse.=C2=A0 Portability. =C2=A0We need mkimg to compile on other OSes besides =46reeB= SD. =C2=A0In particular, macOS and Linux. =C2=A0It=E2=80=99s ok that cons= tructors are not 100% portable=E2=80=A6 --27779CF1-FBA2-4D54-B6E0-BD1DB12EC109 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using AMPGpg -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJX6GcxAAoJEIda8t8f0tjjis4P/1SYDtoVZY08nvE/gitAF/TF L+Y0o86BMTB6MZ+gArDKqIZLrAI1bNS1zda8jdSXnBbnR4iMmsR62rRJX5+sj4/K t9d5T+fAIF+PfE2orj2vr+u08QeSlRh+Uj07eJtgJPHz9k6aPNmFp/XqZizqAYZC NaVgcgSsSmftL3Y8Ff8de07aOVNbVnhAls8WoK3ir3KoUlVB2N28WVcBCH3SYQOv hzahjHTlsvgKsz4Kj3sC0O+ckI10VyvTebbzDpC4Z/R3ZgjuaOJ7Xz0+uPFLJRdV 8oURYhkHlV62WGayaqMifxxYFRmgTF2ZhMSxDEebRC8KGwReKvM8/vb3uY7IcfIz jtZ1jL338Cg2/uRNlbhnnlT6rJCXIk1E0XSQYFhQIhnVWCt5W4wtNBDDaEOTeZxW DGfEx3QbosSeWfm5t9jwWulWAMyRQGh8U55VAApqECTQQViF0R7n/ejqvgQ5RUhP Zdk0Oa6B1M2St1O2uz9HSUmL9xN0hzjMLwQTZR8FIA55AOoeDI5kBLv29hub5G30 gFhpDbvQzsur/0AGTfxvy5kbvyGTtV4uF3yGlQasLBCKnLmk5kC+hx5rEcAB6mRo GFjUJ9FbM2q5fUncunbbgJ300iIXLHaOIKonHr/tKse3jl9QUr+6R01d3DRyBi0w ntYYsLWw0cQ1m13Bv0kv -----END PGP SIGNATURE----- --27779CF1-FBA2-4D54-B6E0-BD1DB12EC109-- From owner-svn-src-head@freebsd.org Mon Sep 26 00:17:13 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21FECBEA63C; Mon, 26 Sep 2016 00:17:13 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBC8A1999; Mon, 26 Sep 2016 00:17:12 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from Marcels-MacBook-Pro.local.mail (atc.xcllnt.net [50.0.150.213]) (authenticated bits=0) by mail.xcllnt.net (8.15.2/8.15.2) with ESMTPSA id u8Q0HBXH008520 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Sun, 25 Sep 2016 17:17:12 -0700 (PDT) (envelope-from marcel@xcllnt.net) Date: Sun, 25 Sep 2016 17:17:11 -0700 From: Marcel Moolenaar To: "Andrey V. Elsukov" , svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-head@freebsd.org, Marcel Moolenaar Message-ID: In-Reply-To: <9b5c402b-fce3-2925-b8f3-6bbc64277f82@yandex.ru> References: <201609251639.u8PGdIfT005260@repo.freebsd.org> <9b5c402b-fce3-2925-b8f3-6bbc64277f82@yandex.ru> Subject: Re: svn commit: r306312 - head X-Mailer: Airmail (382) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="694B0D52-874A-4B45-B919-28AF1FB02A66"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.xcllnt.net [50.0.150.214]); Sun, 25 Sep 2016 17:17:12 -0700 (PDT) X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 00:17:13 -0000 --694B0D52-874A-4B45-B919-28AF1FB02A66 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On September 25, 2016 at 10:41:32 AM, Andrey V. Elsukov (bu7cher=40yandex= .ru) wrote: On 25.09.16 19:39, Marcel Moolenaar wrote:=C2=A0 > +20160924:=C2=A0 > + Relocatable object files with the extension of .So have been renamed=C2= =A0 > + to use an extension of .pico instead. The purpose of this change is=C2= =A0 > + to avoid a name clash with shared libraries on case-insensitive file=C2= =A0 > + systems. On those file systems, foo.So is the same file as foo.so.=C2= =A0 Hi,=C2=A0 probably old *.So files now should be removed using =60make delete-old=60= or=C2=A0 something like this. make =E2=80=9Cdelete-old=E2=80=9D is not for pruning files or directories= in the object tree (unless that changed while I wasn=E2=80=99t paying at= tention. Has that changed=3F --694B0D52-874A-4B45-B919-28AF1FB02A66 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using AMPGpg -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJX6GkHAAoJEIda8t8f0tjj0s0P/0aYsX36AmnfALHj8Jc5+/OD Mf0Rt94y9NiwS04wkIpnVskUsOp/836XJ+KLcvsXY/BubngPx+71Ln/KYGwlOa+N byiqf/CEEz+ITMkgUxFTdc1+638lTK4HdNzKXJ3FTy7Zwze7b+YUXDfTsuMW0aDq 4BPTsnuUIvXbjVRA24keO7ZQEGvr4SfRZmwBREf/qPDhPP2Xw+BY1Oe6Etg1hMDk N1cE1LCOeJkSW3/z8s1DTZpzdDYc/RHeFNreFpjhmITCQ/dez4r2+CIYniOeRuRS iG+7waSqDcMmdiIGh0L8jKhNd14Mq85mWlfHLwD7KFObjPpyFbadsO06pEh7DQJ3 zt93JANfNsKRtTibXWA/IMKSZNmJNYZ67KxbOtXG5QFn0z97ApmabQg5SUSQtzZH VFyp2qpNJylUNPHhzaZ+dIGPUPmXeZh33oNivGusZwuJBES1ovRL6l6D6rLTASai qNt/1PcVXAhKsGJ3sr1784jISrwN4TlYwKGFnawuAjQf+LP+d/NaHafRZIdmRQdS Ooxx/rbDGrqBl/SXILZTmzFTlMVleVITZC7noyexknApkHhqDE/+hjR5SW5eGwvY wiOaahvBss6yLcjeHtYVLSDHv6enJyWj8bIOcyy6hZ6brF/+TILaPkmK+GzDjzDI arMVRxtKBF5Ra3TuvZeW -----END PGP SIGNATURE----- --694B0D52-874A-4B45-B919-28AF1FB02A66-- From owner-svn-src-head@freebsd.org Mon Sep 26 00:20:36 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A1F1BEA6BE; Mon, 26 Sep 2016 00:20:36 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f41.google.com (mail-it0-f41.google.com [209.85.214.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6C3B51B20; Mon, 26 Sep 2016 00:20:36 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f41.google.com with SMTP id n143so61514134ita.1; Sun, 25 Sep 2016 17:20:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=rUJXHxonjRWZqFae3DM5I3vpwo7P7nG9PY3cSvxu6mU=; b=NdqhRqZF6y2DwH48QRdc23ehaYnxh63QeNic4VoSWkWlUrFkOHSZCiuz824pkhCM+C BhYTPYpge/2Rq92ZU4APzffMcaC3RDJV+K4RitC9MHR21nAWPO7U+dOtomQR+hRiRVyP aMIm4y0LSdBfN9y/mPKHQMRKqudbMPe6T5NQa/diweYc0bh/paWN6CrezVAjOk3XFxCG xynGMaUVBNcwhaK0NylGfJH+utz6ZdpYy5cIjsPBQ/Dok5z2rlpFXwG0Ec1w5jzSKj/Y T3cWKFgigWpYErX1+tFDLAeWW2/zpY5LnMoemFKEF8mgFljqdmYMWIT38HxKsHUJePGL A0bw== X-Gm-Message-State: AA6/9RkEJ3fnpoe9YL0FIE97t+dOrOLeJWHadw4FwEDEE5Ds5OLamYxaaqJ0xZK8KTRDaQ== X-Received: by 10.36.184.65 with SMTP id m62mr15162503ite.55.1474849229105; Sun, 25 Sep 2016 17:20:29 -0700 (PDT) Received: from mail-io0-f170.google.com (mail-io0-f170.google.com. [209.85.223.170]) by smtp.gmail.com with ESMTPSA id k128sm7299227ioe.20.2016.09.25.17.20.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Sep 2016 17:20:28 -0700 (PDT) Received: by mail-io0-f170.google.com with SMTP id m79so167532012ioo.3; Sun, 25 Sep 2016 17:20:28 -0700 (PDT) X-Received: by 10.107.58.87 with SMTP id h84mr20585767ioa.122.1474849228680; Sun, 25 Sep 2016 17:20:28 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.36.220.129 with HTTP; Sun, 25 Sep 2016 17:20:28 -0700 (PDT) In-Reply-To: References: <201609252257.u8PMvxUx047428@repo.freebsd.org> From: Conrad Meyer Date: Sun, 25 Sep 2016 17:20:28 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r306325 - head/usr.bin/mkimg To: Marcel Moolenaar Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org, src-committers Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 00:20:36 -0000 On Sun, Sep 25, 2016 at 5:09 PM, Marcel Moolenaar wrote= : > On September 25, 2016 at 4:52:17 PM, Conrad Meyer (cem@freebsd.org) wrote= : > > > What's the motivation for this? This seems worse. > > Portability. We need mkimg to compile on other OSes besides FreeBSD. In > particular, macOS and Linux. It=E2=80=99s ok that constructors are not 1= 00% > portable=E2=80=A6 That makes sense, thanks. It would be good to include that motivation in the commit message, then I don't ask stupid questions like this. :-) Best, Conrad From owner-svn-src-head@freebsd.org Mon Sep 26 00:41:09 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A452DBEAA17; Mon, 26 Sep 2016 00:41:09 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 585DF277; Mon, 26 Sep 2016 00:41:09 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8Q0f83B086710; Mon, 26 Sep 2016 00:41:08 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8Q0f8h3086708; Mon, 26 Sep 2016 00:41:08 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201609260041.u8Q0f8h3086708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Mon, 26 Sep 2016 00:41:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306329 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 00:41:09 -0000 Author: marcel Date: Mon Sep 26 00:41:08 2016 New Revision: 306329 URL: https://svnweb.freebsd.org/changeset/base/306329 Log: Eliminate the use of EDOOFUS. The error code was used to signal programming errors, but is really a poor substitute for assert. And less portable as well. Modified: head/usr.bin/mkimg/image.c head/usr.bin/mkimg/qcow.c Modified: head/usr.bin/mkimg/image.c ============================================================================== --- head/usr.bin/mkimg/image.c Sun Sep 25 23:48:15 2016 (r306328) +++ head/usr.bin/mkimg/image.c Mon Sep 26 00:41:08 2016 (r306329) @@ -456,8 +456,7 @@ image_copyin_mapped(lba_t blk, int fd, u * I don't know what this means or whether it * can happen at all... */ - error = EDOOFUS; - break; + assert(0); } } if (error) @@ -602,7 +601,7 @@ image_copyout_region(int fd, lba_t blk, error = image_copyout_memory(fd, sz, ch->ch_u.mem.ptr); break; default: - return (EDOOFUS); + assert(0); } size -= sz; blk += sz / secsz; Modified: head/usr.bin/mkimg/qcow.c ============================================================================== --- head/usr.bin/mkimg/qcow.c Sun Sep 25 23:48:15 2016 (r306328) +++ head/usr.bin/mkimg/qcow.c Mon Sep 26 00:41:08 2016 (r306329) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -102,7 +103,7 @@ qcow_resize(lba_t imgsz, u_int version) clstr_log2sz = QCOW2_CLSTR_LOG2SZ; break; default: - return (EDOOFUS); + assert(0); } imagesz = round_clstr(imgsz * secsz); @@ -143,8 +144,7 @@ qcow_write(int fd, u_int version) u_int clstrsz, l1idx, l2idx; int error; - if (clstr_log2sz == 0) - return (EDOOFUS); + assert(clstr_log2sz != 0); clstrsz = 1U << clstr_log2sz; blk_clstrsz = clstrsz / secsz; @@ -203,7 +203,7 @@ qcow_write(int fd, u_int version) be32enc(&hdr->u.v2.refcnt_clstrs, refcnt_clstrs); break; default: - return (EDOOFUS); + assert(0); } if (sparse_write(fd, hdr, clstrsz) < 0) { From owner-svn-src-head@freebsd.org Mon Sep 26 01:06:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFDDBBEAE88; Mon, 26 Sep 2016 01:06:34 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9DBC0F2F; Mon, 26 Sep 2016 01:06:34 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8Q16XCX095466; Mon, 26 Sep 2016 01:06:33 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8Q16Wuv095454; Mon, 26 Sep 2016 01:06:32 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201609260106.u8Q16Wuv095454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Mon, 26 Sep 2016 01:06:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306330 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 01:06:34 -0000 Author: marcel Date: Mon Sep 26 01:06:32 2016 New Revision: 306330 URL: https://svnweb.freebsd.org/changeset/base/306330 Log: Avoid depending on the header for le*enc and be*enc. Not only is the header unportable, the encoding/decoding functions are as well. Instead, duplicate the handful of small inlines we need into a private header called endian.h. Aside: an alternative approach is to move the encoding/decoding functions to a separate system header. While the header is still nonportable, such an approach would make it possible to re-use the definitions by playing games with include paths. This may be the preferred approach if more (build) utilities need this. This change does not preclude that. In fact, it makes it easier. Added: head/usr.bin/mkimg/endian.h (contents, props changed) Modified: head/usr.bin/mkimg/apm.c head/usr.bin/mkimg/bsd.c head/usr.bin/mkimg/ebr.c head/usr.bin/mkimg/gpt.c head/usr.bin/mkimg/mbr.c head/usr.bin/mkimg/pc98.c head/usr.bin/mkimg/qcow.c head/usr.bin/mkimg/raw.c head/usr.bin/mkimg/vhd.c head/usr.bin/mkimg/vmdk.c head/usr.bin/mkimg/vtoc8.c Modified: head/usr.bin/mkimg/apm.c ============================================================================== --- head/usr.bin/mkimg/apm.c Mon Sep 26 00:41:08 2016 (r306329) +++ head/usr.bin/mkimg/apm.c Mon Sep 26 01:06:32 2016 (r306330) @@ -29,12 +29,12 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include #include +#include "endian.h" #include "image.h" #include "mkimg.h" #include "scheme.h" Modified: head/usr.bin/mkimg/bsd.c ============================================================================== --- head/usr.bin/mkimg/bsd.c Mon Sep 26 00:41:08 2016 (r306329) +++ head/usr.bin/mkimg/bsd.c Mon Sep 26 01:06:32 2016 (r306330) @@ -29,12 +29,12 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include #include +#include "endian.h" #include "image.h" #include "mkimg.h" #include "scheme.h" Modified: head/usr.bin/mkimg/ebr.c ============================================================================== --- head/usr.bin/mkimg/ebr.c Mon Sep 26 00:41:08 2016 (r306329) +++ head/usr.bin/mkimg/ebr.c Mon Sep 26 01:06:32 2016 (r306330) @@ -29,12 +29,12 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include #include +#include "endian.h" #include "image.h" #include "mkimg.h" #include "scheme.h" Added: head/usr.bin/mkimg/endian.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/mkimg/endian.h Mon Sep 26 01:06:32 2016 (r306330) @@ -0,0 +1,106 @@ +/*- + * Copyright (c) 2002 Thomas Moestl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MKIMG_ENDIAN_H_ +#define _MKIMG_ENDIAN_H_ + +static __inline uint16_t +be16dec(const void *pp) +{ + uint8_t const *p = (uint8_t const *)pp; + + return ((p[0] << 8) | p[1]); +} + +static __inline void +be16enc(void *pp, uint16_t u) +{ + uint8_t *p = (uint8_t *)pp; + + p[0] = (u >> 8) & 0xff; + p[1] = u & 0xff; +} + +static __inline void +be32enc(void *pp, uint32_t u) +{ + uint8_t *p = (uint8_t *)pp; + + p[0] = (u >> 24) & 0xff; + p[1] = (u >> 16) & 0xff; + p[2] = (u >> 8) & 0xff; + p[3] = u & 0xff; +} + +static __inline void +be64enc(void *pp, uint64_t u) +{ + uint8_t *p = (uint8_t *)pp; + + be32enc(p, (uint32_t)(u >> 32)); + be32enc(p + 4, (uint32_t)(u & 0xffffffffU)); +} + +static __inline uint16_t +le16dec(const void *pp) +{ + uint8_t const *p = (uint8_t const *)pp; + + return ((p[1] << 8) | p[0]); +} + +static __inline void +le16enc(void *pp, uint16_t u) +{ + uint8_t *p = (uint8_t *)pp; + + p[0] = u & 0xff; + p[1] = (u >> 8) & 0xff; +} + +static __inline void +le32enc(void *pp, uint32_t u) +{ + uint8_t *p = (uint8_t *)pp; + + p[0] = u & 0xff; + p[1] = (u >> 8) & 0xff; + p[2] = (u >> 16) & 0xff; + p[3] = (u >> 24) & 0xff; +} + +static __inline void +le64enc(void *pp, uint64_t u) +{ + uint8_t *p = (uint8_t *)pp; + + le32enc(p, (uint32_t)(u & 0xffffffffU)); + le32enc(p + 4, (uint32_t)(u >> 32)); +} + +#endif /* _MKIMG_ENDIAN_H_ */ Modified: head/usr.bin/mkimg/gpt.c ============================================================================== --- head/usr.bin/mkimg/gpt.c Mon Sep 26 00:41:08 2016 (r306329) +++ head/usr.bin/mkimg/gpt.c Mon Sep 26 01:06:32 2016 (r306330) @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -39,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "endian.h" #include "image.h" #include "mkimg.h" #include "scheme.h" Modified: head/usr.bin/mkimg/mbr.c ============================================================================== --- head/usr.bin/mkimg/mbr.c Mon Sep 26 00:41:08 2016 (r306329) +++ head/usr.bin/mkimg/mbr.c Mon Sep 26 01:06:32 2016 (r306330) @@ -29,12 +29,12 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include #include +#include "endian.h" #include "image.h" #include "mkimg.h" #include "scheme.h" Modified: head/usr.bin/mkimg/pc98.c ============================================================================== --- head/usr.bin/mkimg/pc98.c Mon Sep 26 00:41:08 2016 (r306329) +++ head/usr.bin/mkimg/pc98.c Mon Sep 26 01:06:32 2016 (r306330) @@ -29,12 +29,12 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include #include +#include "endian.h" #include "image.h" #include "mkimg.h" #include "scheme.h" Modified: head/usr.bin/mkimg/qcow.c ============================================================================== --- head/usr.bin/mkimg/qcow.c Mon Sep 26 00:41:08 2016 (r306329) +++ head/usr.bin/mkimg/qcow.c Mon Sep 26 01:06:32 2016 (r306330) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include @@ -37,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "endian.h" #include "image.h" #include "format.h" #include "mkimg.h" Modified: head/usr.bin/mkimg/raw.c ============================================================================== --- head/usr.bin/mkimg/raw.c Mon Sep 26 00:41:08 2016 (r306329) +++ head/usr.bin/mkimg/raw.c Mon Sep 26 01:06:32 2016 (r306330) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include Modified: head/usr.bin/mkimg/vhd.c ============================================================================== --- head/usr.bin/mkimg/vhd.c Mon Sep 26 00:41:08 2016 (r306329) +++ head/usr.bin/mkimg/vhd.c Mon Sep 26 01:06:32 2016 (r306330) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include @@ -36,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "endian.h" #include "image.h" #include "format.h" #include "mkimg.h" Modified: head/usr.bin/mkimg/vmdk.c ============================================================================== --- head/usr.bin/mkimg/vmdk.c Mon Sep 26 00:41:08 2016 (r306329) +++ head/usr.bin/mkimg/vmdk.c Mon Sep 26 01:06:32 2016 (r306330) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include @@ -36,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "endian.h" #include "image.h" #include "format.h" #include "mkimg.h" Modified: head/usr.bin/mkimg/vtoc8.c ============================================================================== --- head/usr.bin/mkimg/vtoc8.c Mon Sep 26 00:41:08 2016 (r306329) +++ head/usr.bin/mkimg/vtoc8.c Mon Sep 26 01:06:32 2016 (r306330) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include @@ -36,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "endian.h" #include "image.h" #include "mkimg.h" #include "scheme.h" From owner-svn-src-head@freebsd.org Mon Sep 26 02:05:03 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A275BEA959; Mon, 26 Sep 2016 02:05:03 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 573E12A2; Mon, 26 Sep 2016 02:05:03 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8Q252Ih018152; Mon, 26 Sep 2016 02:05:02 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8Q252qP018151; Mon, 26 Sep 2016 02:05:02 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201609260205.u8Q252qP018151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 26 Sep 2016 02:05:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306331 - head/sys/dev/ath/ath_hal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 02:05:03 -0000 Author: adrian Date: Mon Sep 26 02:05:02 2016 New Revision: 306331 URL: https://svnweb.freebsd.org/changeset/base/306331 Log: [ath_hal] add a new regdomain flag - I think this means "yes, you can use this NIC in channel 144 if you're in FCC6." I have to go figure out more details about this before I enable it.. Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Mon Sep 26 01:06:32 2016 (r306330) +++ head/sys/dev/ath/ath_hal/ah.h Mon Sep 26 02:05:02 2016 (r306331) @@ -635,7 +635,8 @@ typedef enum { REG_EXT_JAPAN_MIDBAND = 1, REG_EXT_FCC_DFS_HT40 = 2, REG_EXT_JAPAN_NONDFS_HT40 = 3, - REG_EXT_JAPAN_DFS_HT40 = 4 + REG_EXT_JAPAN_DFS_HT40 = 4, + REG_EXT_FCC_CH_144 = 5, } REG_EXT_BITMAP; enum { From owner-svn-src-head@freebsd.org Mon Sep 26 02:13:20 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 625A9BEAAE4; Mon, 26 Sep 2016 02:13:20 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2836A912; Mon, 26 Sep 2016 02:13:20 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x22d.google.com with SMTP id m186so168609373ioa.2; Sun, 25 Sep 2016 19:13:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=nitCJjsNz5uZccFbf2PNEI4Alhpr1wWaAKunc+ItGJo=; b=uevYg1cmLY3Jngvmneb/uec2JojTH/4dEAYFj2Iax1ey5+i/TzbVhhmDuhosW7ANtt X0zekxVT/NwOYoyJ/MVWV4aDkn1uueBpimsqNCwkgr/YD974L3v4M+wpE8fNlO1qddYq /RIYEtiWJdlUKxhgWvnLRbznyn8FnYv4RtYweflTaIPP70HYq99Hh3o3H5SaO5i4PdVm KWFXrYNIJYzghP19sPnq0gGhdmQEJnH6QZCFuKlOadVjL7P8YO1Nssa+ONpLdgsm5X+7 LS91S5oMZGxMZU2irQrEWdXpxK6uf5AX5gjudTc+kqGjfg+G3vy/MyrTMdhsR3kw8SrJ DhEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=nitCJjsNz5uZccFbf2PNEI4Alhpr1wWaAKunc+ItGJo=; b=SKxKVGvYJULXGvMB++5lTVc2vkaZy1C4C69gQXUKCtcecXe6yG90c3dVYFqI6Qj4RY LcO5SZP/LNyUuQgFOxxxkbLsRXHWvsuurQ5xOStiayR34T73k8I2E47o5z/PVFOjL5F4 7L8Xz0J7+084c6qEZW4MAN6rN+MjoIQyZmhcGovhvfpsqxZXtXKMgh1jfeklAbURotlx zfJQvr6TOdguWP9JhTwf47YfqN5MPYr2AzZKUhc43APFw1pzk6dS6d581poMPPzVE54x T4+4Pfoj8BV0ZItgBLNyrYlvolyE3nJPgUsE/uHiRI9E9XoKx0Xm9uCLmMSjEk1QJ3v0 xAFA== X-Gm-Message-State: AE9vXwOufBR5u8BYYc7RAdCKRePOkWesXU0jKfl+XgYlKYCxjxm5jkrT/KwkmbZZ+96a0UqxnEIjKMeRAPNVEw== X-Received: by 10.107.183.77 with SMTP id h74mr19509424iof.134.1474855998865; Sun, 25 Sep 2016 19:13:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.141.129 with HTTP; Sun, 25 Sep 2016 19:13:18 -0700 (PDT) In-Reply-To: <201609260106.u8Q16Wuv095454@repo.freebsd.org> References: <201609260106.u8Q16Wuv095454@repo.freebsd.org> From: Adrian Chadd Date: Sun, 25 Sep 2016 19:13:18 -0700 Message-ID: Subject: Re: svn commit: r306330 - head/usr.bin/mkimg To: Marcel Moolenaar Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 02:13:20 -0000 Hi, Yeah, for portable-y stuff, I'd recommend: #include "endian.h" -> #ifdef __FreeBSD__ #include #elif __Apple__ etc, etc. That way we don't duplicate contents. Same with sys/queue.h, etc. -adrian On 25 September 2016 at 18:06, Marcel Moolenaar wrote: > Author: marcel > Date: Mon Sep 26 01:06:32 2016 > New Revision: 306330 > URL: https://svnweb.freebsd.org/changeset/base/306330 > > Log: > Avoid depending on the header for le*enc and be*enc. > Not only is the header unportable, the encoding/decoding functions > are as well. Instead, duplicate the handful of small inlines we > need into a private header called endian.h. > > Aside: an alternative approach is to move the encoding/decoding > functions to a separate system header. While the header is still > nonportable, such an approach would make it possible to re-use the > definitions by playing games with include paths. This may be the > preferred approach if more (build) utilities need this. This > change does not preclude that. In fact, it makes it easier. > > Added: > head/usr.bin/mkimg/endian.h (contents, props changed) > Modified: > head/usr.bin/mkimg/apm.c > head/usr.bin/mkimg/bsd.c > head/usr.bin/mkimg/ebr.c > head/usr.bin/mkimg/gpt.c > head/usr.bin/mkimg/mbr.c > head/usr.bin/mkimg/pc98.c > head/usr.bin/mkimg/qcow.c > head/usr.bin/mkimg/raw.c > head/usr.bin/mkimg/vhd.c > head/usr.bin/mkimg/vmdk.c > head/usr.bin/mkimg/vtoc8.c > > Modified: head/usr.bin/mkimg/apm.c > ============================================================================== > --- head/usr.bin/mkimg/apm.c Mon Sep 26 00:41:08 2016 (r306329) > +++ head/usr.bin/mkimg/apm.c Mon Sep 26 01:06:32 2016 (r306330) > @@ -29,12 +29,12 @@ __FBSDID("$FreeBSD$"); > > #include > #include > -#include > #include > #include > #include > #include > > +#include "endian.h" > #include "image.h" > #include "mkimg.h" > #include "scheme.h" > > Modified: head/usr.bin/mkimg/bsd.c > ============================================================================== > --- head/usr.bin/mkimg/bsd.c Mon Sep 26 00:41:08 2016 (r306329) > +++ head/usr.bin/mkimg/bsd.c Mon Sep 26 01:06:32 2016 (r306330) > @@ -29,12 +29,12 @@ __FBSDID("$FreeBSD$"); > > #include > #include > -#include > #include > #include > #include > #include > > +#include "endian.h" > #include "image.h" > #include "mkimg.h" > #include "scheme.h" > > Modified: head/usr.bin/mkimg/ebr.c > ============================================================================== > --- head/usr.bin/mkimg/ebr.c Mon Sep 26 00:41:08 2016 (r306329) > +++ head/usr.bin/mkimg/ebr.c Mon Sep 26 01:06:32 2016 (r306330) > @@ -29,12 +29,12 @@ __FBSDID("$FreeBSD$"); > > #include > #include > -#include > #include > #include > #include > #include > > +#include "endian.h" > #include "image.h" > #include "mkimg.h" > #include "scheme.h" > > Added: head/usr.bin/mkimg/endian.h > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/mkimg/endian.h Mon Sep 26 01:06:32 2016 (r306330) > @@ -0,0 +1,106 @@ > +/*- > + * Copyright (c) 2002 Thomas Moestl > + * All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + * > + * $FreeBSD$ > + */ > + > +#ifndef _MKIMG_ENDIAN_H_ > +#define _MKIMG_ENDIAN_H_ > + > +static __inline uint16_t > +be16dec(const void *pp) > +{ > + uint8_t const *p = (uint8_t const *)pp; > + > + return ((p[0] << 8) | p[1]); > +} > + > +static __inline void > +be16enc(void *pp, uint16_t u) > +{ > + uint8_t *p = (uint8_t *)pp; > + > + p[0] = (u >> 8) & 0xff; > + p[1] = u & 0xff; > +} > + > +static __inline void > +be32enc(void *pp, uint32_t u) > +{ > + uint8_t *p = (uint8_t *)pp; > + > + p[0] = (u >> 24) & 0xff; > + p[1] = (u >> 16) & 0xff; > + p[2] = (u >> 8) & 0xff; > + p[3] = u & 0xff; > +} > + > +static __inline void > +be64enc(void *pp, uint64_t u) > +{ > + uint8_t *p = (uint8_t *)pp; > + > + be32enc(p, (uint32_t)(u >> 32)); > + be32enc(p + 4, (uint32_t)(u & 0xffffffffU)); > +} > + > +static __inline uint16_t > +le16dec(const void *pp) > +{ > + uint8_t const *p = (uint8_t const *)pp; > + > + return ((p[1] << 8) | p[0]); > +} > + > +static __inline void > +le16enc(void *pp, uint16_t u) > +{ > + uint8_t *p = (uint8_t *)pp; > + > + p[0] = u & 0xff; > + p[1] = (u >> 8) & 0xff; > +} > + > +static __inline void > +le32enc(void *pp, uint32_t u) > +{ > + uint8_t *p = (uint8_t *)pp; > + > + p[0] = u & 0xff; > + p[1] = (u >> 8) & 0xff; > + p[2] = (u >> 16) & 0xff; > + p[3] = (u >> 24) & 0xff; > +} > + > +static __inline void > +le64enc(void *pp, uint64_t u) > +{ > + uint8_t *p = (uint8_t *)pp; > + > + le32enc(p, (uint32_t)(u & 0xffffffffU)); > + le32enc(p + 4, (uint32_t)(u >> 32)); > +} > + > +#endif /* _MKIMG_ENDIAN_H_ */ > > Modified: head/usr.bin/mkimg/gpt.c > ============================================================================== > --- head/usr.bin/mkimg/gpt.c Mon Sep 26 00:41:08 2016 (r306329) > +++ head/usr.bin/mkimg/gpt.c Mon Sep 26 01:06:32 2016 (r306330) > @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); > > #include > #include > -#include > #include > #include > #include > @@ -39,6 +38,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#include "endian.h" > #include "image.h" > #include "mkimg.h" > #include "scheme.h" > > Modified: head/usr.bin/mkimg/mbr.c > ============================================================================== > --- head/usr.bin/mkimg/mbr.c Mon Sep 26 00:41:08 2016 (r306329) > +++ head/usr.bin/mkimg/mbr.c Mon Sep 26 01:06:32 2016 (r306330) > @@ -29,12 +29,12 @@ __FBSDID("$FreeBSD$"); > > #include > #include > -#include > #include > #include > #include > #include > > +#include "endian.h" > #include "image.h" > #include "mkimg.h" > #include "scheme.h" > > Modified: head/usr.bin/mkimg/pc98.c > ============================================================================== > --- head/usr.bin/mkimg/pc98.c Mon Sep 26 00:41:08 2016 (r306329) > +++ head/usr.bin/mkimg/pc98.c Mon Sep 26 01:06:32 2016 (r306330) > @@ -29,12 +29,12 @@ __FBSDID("$FreeBSD$"); > > #include > #include > -#include > #include > #include > #include > #include > > +#include "endian.h" > #include "image.h" > #include "mkimg.h" > #include "scheme.h" > > Modified: head/usr.bin/mkimg/qcow.c > ============================================================================== > --- head/usr.bin/mkimg/qcow.c Mon Sep 26 00:41:08 2016 (r306329) > +++ head/usr.bin/mkimg/qcow.c Mon Sep 26 01:06:32 2016 (r306330) > @@ -28,7 +28,6 @@ > __FBSDID("$FreeBSD$"); > > #include > -#include > #include > #include > #include > @@ -37,6 +36,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#include "endian.h" > #include "image.h" > #include "format.h" > #include "mkimg.h" > > Modified: head/usr.bin/mkimg/raw.c > ============================================================================== > --- head/usr.bin/mkimg/raw.c Mon Sep 26 00:41:08 2016 (r306329) > +++ head/usr.bin/mkimg/raw.c Mon Sep 26 01:06:32 2016 (r306330) > @@ -28,7 +28,6 @@ > __FBSDID("$FreeBSD$"); > > #include > -#include > #include > #include > #include > > Modified: head/usr.bin/mkimg/vhd.c > ============================================================================== > --- head/usr.bin/mkimg/vhd.c Mon Sep 26 00:41:08 2016 (r306329) > +++ head/usr.bin/mkimg/vhd.c Mon Sep 26 01:06:32 2016 (r306330) > @@ -28,7 +28,6 @@ > __FBSDID("$FreeBSD$"); > > #include > -#include > #include > #include > #include > @@ -36,6 +35,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#include "endian.h" > #include "image.h" > #include "format.h" > #include "mkimg.h" > > Modified: head/usr.bin/mkimg/vmdk.c > ============================================================================== > --- head/usr.bin/mkimg/vmdk.c Mon Sep 26 00:41:08 2016 (r306329) > +++ head/usr.bin/mkimg/vmdk.c Mon Sep 26 01:06:32 2016 (r306330) > @@ -28,7 +28,6 @@ > __FBSDID("$FreeBSD$"); > > #include > -#include > #include > #include > #include > @@ -36,6 +35,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#include "endian.h" > #include "image.h" > #include "format.h" > #include "mkimg.h" > > Modified: head/usr.bin/mkimg/vtoc8.c > ============================================================================== > --- head/usr.bin/mkimg/vtoc8.c Mon Sep 26 00:41:08 2016 (r306329) > +++ head/usr.bin/mkimg/vtoc8.c Mon Sep 26 01:06:32 2016 (r306330) > @@ -28,7 +28,6 @@ > __FBSDID("$FreeBSD$"); > > #include > -#include > #include > #include > #include > @@ -36,6 +35,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#include "endian.h" > #include "image.h" > #include "mkimg.h" > #include "scheme.h" > From owner-svn-src-head@freebsd.org Mon Sep 26 02:29:29 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7A7ABEAE45; Mon, 26 Sep 2016 02:29:29 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7F0FDDF; Mon, 26 Sep 2016 02:29:29 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8Q2TStM025605; Mon, 26 Sep 2016 02:29:28 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8Q2TS6b025604; Mon, 26 Sep 2016 02:29:28 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201609260229.u8Q2TS6b025604@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 26 Sep 2016 02:29:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306332 - head/lib/libc/db/btree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 02:29:29 -0000 Author: pfg Date: Mon Sep 26 02:29:28 2016 New Revision: 306332 URL: https://svnweb.freebsd.org/changeset/base/306332 Log: btree(3): don't shortcut closing if the metadata is dirty. Obtained from: NetBSD (from krb5 tree) MFC after: 3 weeks Modified: head/lib/libc/db/btree/bt_close.c Modified: head/lib/libc/db/btree/bt_close.c ============================================================================== --- head/lib/libc/db/btree/bt_close.c Mon Sep 26 02:05:02 2016 (r306331) +++ head/lib/libc/db/btree/bt_close.c Mon Sep 26 02:29:28 2016 (r306332) @@ -134,7 +134,8 @@ __bt_sync(const DB *dbp, u_int flags) return (RET_ERROR); } - if (F_ISSET(t, B_INMEM | B_RDONLY) || !F_ISSET(t, B_MODIFIED)) + if (F_ISSET(t, B_INMEM | B_RDONLY) || + !F_ISSET(t, B_MODIFIED | B_METADIRTY)) return (RET_SUCCESS); if (F_ISSET(t, B_METADIRTY) && bt_meta(t) == RET_ERROR) From owner-svn-src-head@freebsd.org Mon Sep 26 02:34:25 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CEE2BEAF9B; Mon, 26 Sep 2016 02:34:25 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DADD20A; Mon, 26 Sep 2016 02:34:24 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from Marcels-MacBook-Pro.local.mail (atc.xcllnt.net [50.0.150.213]) (authenticated bits=0) by mail.xcllnt.net (8.15.2/8.15.2) with ESMTPSA id u8Q2YN3O009501 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Sun, 25 Sep 2016 19:34:23 -0700 (PDT) (envelope-from marcel@xcllnt.net) Date: Sun, 25 Sep 2016 19:34:22 -0700 From: Marcel Moolenaar To: Marcel Moolenaar , Adrian Chadd Cc: "=?utf-8?Q?svn-src-all=40freebsd.org?=" , "=?utf-8?Q?svn-src-head=40freebsd.org?=" , "=?utf-8?Q?src-committers=40freebsd.org?=" Message-ID: In-Reply-To: References: <201609260106.u8Q16Wuv095454@repo.freebsd.org> Subject: Re: svn commit: r306330 - head/usr.bin/mkimg X-Mailer: Airmail (382) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="835F936A-5EE0-4F98-814B-A7FAF9235B47"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.xcllnt.net [50.0.150.214]); Sun, 25 Sep 2016 19:34:23 -0700 (PDT) X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 02:34:25 -0000 --835F936A-5EE0-4F98-814B-A7FAF9235B47 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On September 25, 2016 at 7:13:21 PM, Adrian Chadd (adrian.chadd=40gmail.c= om) wrote: Hi,=C2=A0 Yeah, for portable-y stuff, I'd recommend:=C2=A0 =23include =22endian.h=22 -> =23ifdef =5F=5F=46reeBSD=5F=5F =23include =C2=A0 =23elif =5F=5FApple=5F=5F etc, etc.=C2=A0 That way we don't duplicate contents.=C2=A0 Same with sys/queue.h, etc.=C2=A0 We may even want to do , , etc. The comp= at directory can be shared by all build utilities that need portability. = =C2=A0That way we only have to solve portability problems once. =C2=A0The= name compat is but a suggestion. --835F936A-5EE0-4F98-814B-A7FAF9235B47 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using AMPGpg -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJX6IkvAAoJEIda8t8f0tjjoC0QAKdvosOpq+U0njQtCFvaj/I2 KHn6gCJqOS1Dx9UNcDpCEFsfNKseInLQyrm5BwB8TgXbTA16zQumCCGuWoP73k6G rltqvFdzmkvHTa3FZFt6Jh20QbcvYJm+HZmgk+kRGJJj/JCY245UEr0wBV+KvQTU MAiLTYTkyJrb8JXOhRb47u338y4v28LC7UkFrVJW/IXj7hLiHWP39ue7CSyTbZiw Z3g976fayTopw1DCBOJJr3OE6wulUIirzG14EZyAEGymJ4cyeGIYWr6z7akX7gR9 Ve8YKub9OxhH4rA89qjbI7dcp3BBp/x1zvwd9eR6A6r6H2syLFOs2GZLQF/i1Gbu U7yiGF/geo325XTvPyIsZcpafMZob+zU+iLrbzfvDOEUeqoQokGUqQK+JQW/Ilp4 pD8ZBapwnqkVEfhzPPFQkR5jYL4BFnCaAXRlTpu+OXaxvhS97pKL6vH0Ar0vsJOa S7tccvJb8RzrVYKpOdf8UfWQctMmPiE137oPb8QfZtGpg4vY4pKHCm5mvcdeeFXy KDIUfU+uLX9LwK+4KXtZNQpTBwIxcwViNu+SSoZ0ZKv51ZOEZsiYMMp/f23ffBIq 7lrZJw54WdRP5A85zgkQA1xbpASDo5mPQXkUvA8jtOZvLMvoxoH2OTM4cch22hIH 8JiSSD0BqhTydScs7+gM -----END PGP SIGNATURE----- --835F936A-5EE0-4F98-814B-A7FAF9235B47-- From owner-svn-src-head@freebsd.org Mon Sep 26 04:14:01 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E50DBE8806; Mon, 26 Sep 2016 04:14:01 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E8E47BD; Mon, 26 Sep 2016 04:14:01 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8Q4E00S067704; Mon, 26 Sep 2016 04:14:00 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8Q4E0aV067703; Mon, 26 Sep 2016 04:14:00 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201609260414.u8Q4E0aV067703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Mon, 26 Sep 2016 04:14:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306333 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 04:14:01 -0000 Author: marcel Date: Mon Sep 26 04:14:00 2016 New Revision: 306333 URL: https://svnweb.freebsd.org/changeset/base/306333 Log: Portability changes: 1. macOS nor Linux have MAP_NOCORE nor MAP_NOSYNC. Define as 0. 2. macOS doesn't have SEEK_DATA nor SEEK_HOLE. Define as -1 so that lseek will return -1 (with errno set to EINVAL). 3. gcc correctly warns that error is assigned but not used in image_copyout_region(). Fix by returning on the first error. Modified: head/usr.bin/mkimg/image.c Modified: head/usr.bin/mkimg/image.c ============================================================================== --- head/usr.bin/mkimg/image.c Mon Sep 26 02:29:28 2016 (r306332) +++ head/usr.bin/mkimg/image.c Mon Sep 26 04:14:00 2016 (r306333) @@ -45,6 +45,20 @@ __FBSDID("$FreeBSD$"); #include "image.h" #include "mkimg.h" +#ifndef MAP_NOCORE +#define MAP_NOCORE 0 +#endif +#ifndef MAP_NOSYNC +#define MAP_NOSYNC 0 +#endif + +#ifndef SEEK_DATA +#define SEEK_DATA -1 +#endif +#ifndef SEEK_HOLE +#define SEEK_HOLE -1 +#endif + struct chunk { STAILQ_ENTRY(chunk) ch_list; size_t ch_size; /* Size of chunk in bytes. */ @@ -582,10 +596,13 @@ image_copyout_region(int fd, lba_t blk, size *= secsz; - while (size > 0) { + error = 0; + while (!error && size > 0) { ch = image_chunk_find(blk); - if (ch == NULL) - return (EINVAL); + if (ch == NULL) { + error = EINVAL; + break; + } ofs = (blk - ch->ch_block) * secsz; sz = ch->ch_size - ofs; sz = ((lba_t)sz < size) ? sz : (size_t)size; @@ -606,7 +623,7 @@ image_copyout_region(int fd, lba_t blk, size -= sz; blk += sz / secsz; } - return (0); + return (error); } int From owner-svn-src-head@freebsd.org Mon Sep 26 06:53:32 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6A83BEAF66; Mon, 26 Sep 2016 06:53:32 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 9C528950; Mon, 26 Sep 2016 06:53:32 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-109.carlnfd1.nsw.optusnet.com.au (c122-106-149-109.carlnfd1.nsw.optusnet.com.au [122.106.149.109]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 1F0AD782716; Mon, 26 Sep 2016 16:53:28 +1000 (AEST) Date: Mon, 26 Sep 2016 16:53:26 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Colin Percival cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r306319 - head/sys/i386/i386 In-Reply-To: <0100015762ed107c-206ced2e-2389-462f-afe0-cec7d6c34fb8-000000@email.amazonses.com> Message-ID: <20160926164406.T806@besplex.bde.org> References: <201609251839.u8PIdO7t050380@repo.freebsd.org> <0100015762ed107c-206ced2e-2389-462f-afe0-cec7d6c34fb8-000000@email.amazonses.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=CoZCCSMD c=1 sm=1 tr=0 a=R/f3m204ZbWUO/0rwPSMPw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=u3Us7hdzS6JT2-gXGnsA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 06:53:32 -0000 On Sun, 25 Sep 2016, Colin Percival wrote: > On 09/25/16 11:39, Bruce Evans wrote: >> Author: bde >> Date: Sun Sep 25 18:39:24 2016 >> New Revision: 306319 >> URL: https://svnweb.freebsd.org/changeset/base/306319 >> >> Log: >> Minor fixes for 160-bit disassembly: > > I thought the x86 architecture was limited to 120-bit instructions? Oops. Is 120 the exact limit on instruction length is is that just for prefixes? I think the instruction fetch pipeline was 16 bytes, but it is now often 32 or 64. Bruce From owner-svn-src-head@freebsd.org Mon Sep 26 07:09:23 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA4A8BE96CF for ; Mon, 26 Sep 2016 07:09:23 +0000 (UTC) (envelope-from 010001576553856d-6d1204e6-9fec-4069-b2ff-96324fea78c6-000000@amazonses.com) Received: from a8-176.smtp-out.amazonses.com (a8-176.smtp-out.amazonses.com [54.240.8.176]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F4ACF0F for ; Mon, 26 Sep 2016 07:09:23 +0000 (UTC) (envelope-from 010001576553856d-6d1204e6-9fec-4069-b2ff-96324fea78c6-000000@amazonses.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57; d=tarsnap.com; t=1474873755; h=Subject:To:References:Cc:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=rYLkMkGAKSchJr1lvoRg8oHEHw8BUYq4Irwre1zqmc4=; b=UgAI4VkVzF8+h0eVvxQPkk7suiCwubC504opofZq0VpUt+XvFT27veAXYRMQPoaE pwDQ3Or+FCEqIks8faEhXRqTtxJ0tN+6IYjAqGpYx+CfMMrMMM6t4osQ6nKbHEwoXur AAXTTIQd1jeQQH7GT0g2l2BpbD2P7WBaSUSMuJLU= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1474873755; h=Subject:To:References:Cc:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=rYLkMkGAKSchJr1lvoRg8oHEHw8BUYq4Irwre1zqmc4=; b=fkVxtgZ8VYtv/cfD6pvcOncRhdcTAi9Ok7Xt3CfgfJQ2aPkhvmxYYiexNgvd5iA+ JEi9qFkQSyEQewdTBkJ6WwTxPYrS/YPVR2HtfeIoDgR03eDmYTZ9BFr0inc45fbzzEn Fv7WL90s5gZVuXa8tLOaVxS5yAGPLyyR3+tVjTc0= Subject: Re: svn commit: r306319 - head/sys/i386/i386 To: Bruce Evans References: <201609251839.u8PIdO7t050380@repo.freebsd.org> <0100015762ed107c-206ced2e-2389-462f-afe0-cec7d6c34fb8-000000@email.amazonses.com> <20160926164406.T806@besplex.bde.org> Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org From: Colin Percival Message-ID: <010001576553856d-6d1204e6-9fec-4069-b2ff-96324fea78c6-000000@email.amazonses.com> Date: Mon, 26 Sep 2016 07:09:15 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20160926164406.T806@besplex.bde.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SES-Outgoing: 2016.09.26-54.240.8.176 Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 07:09:23 -0000 On 09/25/16 23:53, Bruce Evans wrote: > On Sun, 25 Sep 2016, Colin Percival wrote: >> On 09/25/16 11:39, Bruce Evans wrote: >>> Author: bde >>> Date: Sun Sep 25 18:39:24 2016 >>> New Revision: 306319 >>> URL: https://svnweb.freebsd.org/changeset/base/306319 >>> >>> Log: >>> Minor fixes for 160-bit disassembly: >> >> I thought the x86 architecture was limited to 120-bit instructions? > > Oops. > > Is 120 the exact limit on instruction length is is that just for prefixes? > I think the instruction fetch pipeline was 16 bytes, but it is now often > 32 or 64. Traditionally x86 CPUs would generate an invalid-opcode fault if redundant instruction prefixes resulted in an instruction exceeding 15 bytes. This behaviour might have changed in the past two decades, but I doubt it. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-head@freebsd.org Mon Sep 26 07:51:36 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F407BEA61C; Mon, 26 Sep 2016 07:51:36 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B1C02A9; Mon, 26 Sep 2016 07:51:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u8Q7pUhS016647 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 26 Sep 2016 10:51:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u8Q7pUhS016647 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u8Q7pTDm016645; Mon, 26 Sep 2016 10:51:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 26 Sep 2016 10:51:29 +0300 From: Konstantin Belousov To: Colin Percival Cc: Bruce Evans , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r306319 - head/sys/i386/i386 Message-ID: <20160926075129.GD38409@kib.kiev.ua> References: <201609251839.u8PIdO7t050380@repo.freebsd.org> <0100015762ed107c-206ced2e-2389-462f-afe0-cec7d6c34fb8-000000@email.amazonses.com> <20160926164406.T806@besplex.bde.org> <0100015765538d1e-07598541-d22e-4eac-8382-b9bad08db716-000000@email.amazonses.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0100015765538d1e-07598541-d22e-4eac-8382-b9bad08db716-000000@email.amazonses.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 07:51:36 -0000 On Mon, Sep 26, 2016 at 07:09:17AM +0000, Colin Percival wrote: > Traditionally x86 CPUs would generate an invalid-opcode fault if redundant > instruction prefixes resulted in an instruction exceeding 15 bytes. This > behaviour might have changed in the past two decades, but I doubt it. It did not, 15 bytes is the current limit. In fact, the longest AVX VEX-encoded instructions are 11 bytes without prefixes, AFAIR. From owner-svn-src-head@freebsd.org Mon Sep 26 08:18:36 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14905BEAF62; Mon, 26 Sep 2016 08:18:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCAB5199; Mon, 26 Sep 2016 08:18:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8Q8IZ6f058050; Mon, 26 Sep 2016 08:18:35 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8Q8IYcx058046; Mon, 26 Sep 2016 08:18:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609260818.u8Q8IYcx058046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 26 Sep 2016 08:18:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306334 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 08:18:36 -0000 Author: kib Date: Mon Sep 26 08:18:34 2016 New Revision: 306334 URL: https://svnweb.freebsd.org/changeset/base/306334 Log: Document thr_suspend(2) and thr_wake(2). Reviewed by: bjk, jilles Discussed with: emaste, wblock Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D8016 Added: head/lib/libc/sys/thr_suspend.2 (contents, props changed) head/lib/libc/sys/thr_wake.2 (contents, props changed) Modified: head/lib/libc/sys/Makefile.inc Modified: head/lib/libc/sys/Makefile.inc ============================================================================== --- head/lib/libc/sys/Makefile.inc Mon Sep 26 04:14:00 2016 (r306333) +++ head/lib/libc/sys/Makefile.inc Mon Sep 26 08:18:34 2016 (r306334) @@ -322,6 +322,8 @@ MAN+= sctp_generic_recvmsg.2 \ thr_new.2 \ thr_self.2 \ thr_set_name.2 \ + thr_suspend.2 \ + thr_wake.2 \ timer_create.2 \ timer_delete.2 \ timer_settime.2 \ Added: head/lib/libc/sys/thr_suspend.2 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/sys/thr_suspend.2 Mon Sep 26 08:18:34 2016 (r306334) @@ -0,0 +1,130 @@ +.\" Copyright (c) 2016 The FreeBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This documentation was written 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 AUTHORS 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 AUTHORS 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$ +.\" +.Dd September 23, 2016 +.Dt THR_SUSPEND 2 +.Os +.Sh NAME +.Nm thr_suspend +.Nd suspend the calling thread +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In sys/thr.h +.Ft int +.Fn thr_suspend "struct timespec *timeout" +.Sh DESCRIPTION +.Bf -symbolic +This function is intended for implementing threading. +Normal applications should use +.Xr pthread_cond_timedwait 3 +together with +.Xr pthread_cond_broadcast 3 +for typical safe suspension with cooperation of the thread +being suspended, or +.Xr pthread_suspend_np 3 +and +.Xr pthread_resume_np 3 +in some specific situations, instead. +.Ef +.Pp +The +.Fn thr_suspend +system call puts the calling thread in a suspended state, where it is +not eligible for CPU time. +This state is exited by another thread calling +.Xr thr_wake 2 , +by expiration of the timeout specified in the +.Fa timeout +argument, +or by the delivery of a signal to the suspended thread. +.Pp +If the +.Fa timeout +argument is +.Dv NULL , +the suspended state can be only terminated by explicit +.Fn thr_wake +or signal. +.Pp +If a wake from +.Xr thr_wake 2 +was delivered before the +.Nm +call, the thread is not put into a suspended state. +Instead, the call +returns immediately without an error. +.Pp +If a thread previously called +.Xr thr_wake 2 +with its own thread identifier, which resulted in setting the internal kernel +flag to immediately abort interruptible sleeps with an +.Er EINTR +error +.Po +see +.Xr thr_wake 2 +.Pc , +the flag is cleared. +As with +.Xr thr_wake 2 +called from another thread, the next +.Nm +call does not result in suspension. +.Pp +.Sh RETURN VALUES +.Rv -std thr_suspend +.Sh ERRORS +The +.Fn thr_suspend +operation returns the following errors: +.Bl -tag -width Er +.It Bq Er EFAULT +The memory pointed to by the +.Fa timeout +argument is not valid. +.It Bq Er ETIMEDOUT +The specified timeout expired. +.It Bq Er ETIMEDOUT +The +.Fa timeout +argument specified a zero time interval. +.It Bq Er EINTR +The sleep was interrupted by a signal. +.El +.Sh SEE ALSO +.Xr ps 1 , +.Xr thr_wake 2 , +.Xr pthread_resume_np 3 , +.Xr pthread_suspend_np 3 +.Sh STANDARDS +The +.Fn thr_suspend +system call is non-standard. Added: head/lib/libc/sys/thr_wake.2 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/sys/thr_wake.2 Mon Sep 26 08:18:34 2016 (r306334) @@ -0,0 +1,112 @@ +.\" Copyright (c) 2016 The FreeBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This documentation was written 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 AUTHORS 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 AUTHORS 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$ +.\" +.Dd September 23, 2016 +.Dt THR_WAKE 2 +.Os +.Sh NAME +.Nm thr_wake +.Nd wake up the suspended thread +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In sys/thr.h +.Ft int +.Fn thr_wake "long id" +.Sh DESCRIPTION +.Bf -symbolic +This function is intended for implementing threading. +Normal applications should use +.Xr pthread_cond_timedwait 3 +together with +.Xr pthread_cond_broadcast 3 +for typical safe suspension with cooperation of the thread +being suspended, or +.Xr pthread_suspend_np 3 +and +.Xr pthread_resume_np 3 +in some specific situations, instead. +.Ef +.Pp +Passing the thread identifier of the calling thread +.Po +see +.Xr thr_self 2 +.Pc +to +.Fn thr_wake +sets a thread's flag to cause the next signal-interruptible sleep +of that thread in the kernel to fail immediately with the +.Er EINTR +error. +The flag is cleared by an interruptible sleep attempt or by a call to +.Xr thr_suspend 2. +This is used by the system threading library to implement cancellation. +.Pp +If +.Fa id +is not equal to the current thread identifier, the specified thread is +woken up if suspended by the +.Xr thr_suspend +system call. +If the thread is not suspended at the time of the +.Nm +call, the wake is remembered and the next attempt of the thread to +suspend itself with the +.Xr thr_suspend 2 +results in immediate return with success. +Only one wake is remembered. +.Sh RETURN VALUES +.Rv -std thr_wake +.Sh ERRORS +The +.Fn thr_wake +operation returns these errors: +.Bl -tag -width Er +.It Bq Er ESRCH +The specified thread was not found or does not belong to the process +of the calling thread. +.El +.Sh SEE ALSO +.Xr ps 1 , +.Xr thr_self 2 +.Xr thr_suspend 2 , +.Xr pthread_cancel 3 , +.Xr pthread_resume_np 3 , +.Xr pthread_suspend_np 3 +.Sh STANDARDS +The +.Fn thr_suspend +system call is non-standard and is used by +.Lb libthr +to implement +.St -p1003.1-2001 +.Xr pthread 3 +functionality. From owner-svn-src-head@freebsd.org Mon Sep 26 10:13:59 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A2B7BEA455; Mon, 26 Sep 2016 10:13:59 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D0F3948; Mon, 26 Sep 2016 10:13:58 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QADwUD002893; Mon, 26 Sep 2016 10:13:58 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QADwrV002892; Mon, 26 Sep 2016 10:13:58 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201609261013.u8QADwrV002892@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Mon, 26 Sep 2016 10:13:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306337 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 10:13:59 -0000 Author: hiren Date: Mon Sep 26 10:13:58 2016 New Revision: 306337 URL: https://svnweb.freebsd.org/changeset/base/306337 Log: In sendit(), if mp->msg_control is present, then in sockargs() we are allocating mbuf to store mp->msg_control. Later in kern_sendit(), call to getsock_cap(), will check validity of file pointer passed, if this fails EBADF is returned but mbuf allocated in sockargs() is not freed. Fix this possible leak. Submitted by: Lohith Bellad Reviewed by: adrian MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D7910 Modified: head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Mon Sep 26 08:21:29 2016 (r306336) +++ head/sys/kern/uipc_syscalls.c Mon Sep 26 10:13:58 2016 (r306337) @@ -685,7 +685,7 @@ sys_socketpair(struct thread *td, struct static int sendit(struct thread *td, int s, struct msghdr *mp, int flags) { - struct mbuf *control; + struct mbuf *control = NULL; struct sockaddr *to; int error; @@ -737,6 +737,8 @@ sendit(struct thread *td, int s, struct bad: free(to, M_SONAME); + if (control) + m_freem(control); return (error); } From owner-svn-src-head@freebsd.org Mon Sep 26 11:56:02 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0DBFBEBB28; Mon, 26 Sep 2016 11:56:02 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 416473DD; Mon, 26 Sep 2016 11:56:01 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-109.carlnfd1.nsw.optusnet.com.au (c122-106-149-109.carlnfd1.nsw.optusnet.com.au [122.106.149.109]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 0F6A1104541E; Mon, 26 Sep 2016 21:55:52 +1000 (AEST) Date: Mon, 26 Sep 2016 21:55:51 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Hiren Panchasara cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306337 - head/sys/kern In-Reply-To: <201609261013.u8QADwrV002892@repo.freebsd.org> Message-ID: <20160926203343.S1542@besplex.bde.org> References: <201609261013.u8QADwrV002892@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=EfU1O6SC c=1 sm=1 tr=0 a=R/f3m204ZbWUO/0rwPSMPw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=HHGDD-5mAAAA:8 a=m-UwTWmGBv1XtxhJIZQA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=B8TCfWyN7RlcJ1j5uPC-:22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 11:56:02 -0000 On Mon, 26 Sep 2016, Hiren Panchasara wrote: > Author: hiren > Date: Mon Sep 26 10:13:58 2016 > New Revision: 306337 > URL: https://svnweb.freebsd.org/changeset/base/306337 > > Log: > In sendit(), if mp->msg_control is present, then in sockargs() we are allocating > mbuf to store mp->msg_control. Later in kern_sendit(), call to getsock_cap(), > will check validity of file pointer passed, if this fails EBADF is returned but > mbuf allocated in sockargs() is not freed. Fix this possible leak. > > Submitted by: Lohith Bellad > Reviewed by: adrian > MFC after: 3 weeks > Differential Revision: https://reviews.freebsd.org/D7910 > > Modified: > head/sys/kern/uipc_syscalls.c I don't like this. It has some style bugs and seems to be very broken. > Modified: head/sys/kern/uipc_syscalls.c > ============================================================================== > --- head/sys/kern/uipc_syscalls.c Mon Sep 26 08:21:29 2016 (r306336) > +++ head/sys/kern/uipc_syscalls.c Mon Sep 26 10:13:58 2016 (r306337) > @@ -685,7 +685,7 @@ sys_socketpair(struct thread *td, struct > static int > sendit(struct thread *td, int s, struct msghdr *mp, int flags) > { > - struct mbuf *control; > + struct mbuf *control = NULL; > struct sockaddr *to; > int error; Style bug: initialization in declaration. Many collateral style bugs and obfuscations. > > @@ -737,6 +737,8 @@ sendit(struct thread *td, int s, struct > > bad: > free(to, M_SONAME); > + if (control) > + m_freem(control); > return (error); > } The "bad" label is an old style bug. This is the general return path, not an error handling path. This gives many collateral obfuscations and pessimizations. Now it seems to give a large bug with the help of the obfuscations: when mp->msg_control != NULL, in the usual subcase where there is no error, kern_sendit() must have already done m_freem(control) else the usual subcase would have leaked. The code falls through to "bad" and does m_freem(control) again. I still use my optimization for sendit() which avoids using malloc() for 'to'. It has to be more careful not to free things. The design for freeing 'control' is worse than for freeing 'to', as shown by this bug and its extension. X Index: uipc_syscalls.c X =================================================================== X --- uipc_syscalls.c (revision 306310) X +++ uipc_syscalls.c (working copy) X @@ -114,6 +114,26 @@ X return (0); X } X X +static __inline int X +lgetsockaddr(struct sockaddr *sa, caddr_t uaddr, size_t len) X +{ X + int error; X + X + if (len > SOCK_MAXADDRLEN) X + return (ENAMETOOLONG); X + if (len < offsetof(struct sockaddr, sa_data[0])) X + return (EINVAL); X + error = copyin(uaddr, sa, len); X + if (error == 0) { X +#if defined(COMPAT_OLDSOCK) && BYTE_ORDER != BIG_ENDIAN X + if (sa->sa_family == 0 && sa->sa_len < AF_MAX) X + sa->sa_family = sa->sa_len; X +#endif X + sa->sa_len = len; X + } X + return (error); X +} X + X /* X * System call interface to the socket abstraction. X */ X @@ -687,6 +707,7 @@ X { X struct mbuf *control; X struct sockaddr *to; X + char sa[SOCK_MAXADDRLEN] __aligned(16); X int error; X X #ifdef CAPABILITY_MODE X @@ -695,7 +716,8 @@ X #endif X X if (mp->msg_name != NULL) { X - error = getsockaddr(&to, mp->msg_name, mp->msg_namelen); X + to = (struct sockaddr *)&sa[0]; X + error = lgetsockaddr(to, mp->msg_name, mp->msg_namelen); X if (error != 0) { X to = NULL; X goto bad; The error handing should be cleaned up by removing all the gotos and the bad label, but this patch is written to minimize diffs. X @@ -736,7 +758,6 @@ X error = kern_sendit(td, s, mp, flags, control, UIO_USERSPACE); X X bad: X - free(to, M_SONAME); X return (error); X } X After merging this fix, cleaning up the gotos is more needed. Untested merge: Y Index: uipc_syscalls.c Y =================================================================== Y --- uipc_syscalls.c (revision 306337) Y +++ uipc_syscalls.c (working copy) Y @@ -114,6 +114,26 @@ Y return (0); Y } Y Y +static __inline int Y +lgetsockaddr(struct sockaddr *sa, caddr_t uaddr, size_t len) Y +{ Y + int error; Y + Y + if (len > SOCK_MAXADDRLEN) Y + return (ENAMETOOLONG); Y + if (len < offsetof(struct sockaddr, sa_data[0])) Y + return (EINVAL); Y + error = copyin(uaddr, sa, len); Y + if (error == 0) { Y +#if defined(COMPAT_OLDSOCK) && BYTE_ORDER != BIG_ENDIAN Y + if (sa->sa_family == 0 && sa->sa_len < AF_MAX) Y + sa->sa_family = sa->sa_len; Y +#endif Y + sa->sa_len = len; Y + } Y + return (error); Y +} Y + Y /* Y * System call interface to the socket abstraction. Y */ Y @@ -687,6 +707,7 @@ Y { Y struct mbuf *control = NULL; Y struct sockaddr *to; Y + char sa[SOCK_MAXADDRLEN] __aligned(16); Y int error; Y Y #ifdef CAPABILITY_MODE Y @@ -695,14 +716,11 @@ Y #endif Y Y if (mp->msg_name != NULL) { Y - error = getsockaddr(&to, mp->msg_name, mp->msg_namelen); Y - if (error != 0) { Y - to = NULL; Y - goto bad; Y - } Y + to = (struct sockaddr *)&sa[0]; Y + error = lgetsockaddr(to, mp->msg_name, mp->msg_namelen); Y + if (error != 0) Y + return error); Y mp->msg_name = to; Y - } else { Y - to = NULL; Y } Y Y if (mp->msg_control) { Y @@ -710,14 +728,12 @@ Y #ifdef COMPAT_OLDSOCK Y && mp->msg_flags != MSG_COMPAT Y #endif Y - ) { Y - error = EINVAL; Y - goto bad; Y - } Y + ) Y + return (EINVAL); Y error = sockargs(&control, mp->msg_control, Y mp->msg_controllen, MT_CONTROL); Y if (error != 0) Y - goto bad; Y + return (error); Here it must be checked that 'control' is not allocated if an error is returned (only a bad API would leave it allocated). Y #ifdef COMPAT_OLDSOCK Y if (mp->msg_flags == MSG_COMPAT) { Y struct cmsghdr *cm; Y @@ -729,17 +745,9 @@ Y cm->cmsg_type = SCM_RIGHTS; Y } Y #endif Y - } else { Y - control = NULL; Y } Y Y - error = kern_sendit(td, s, mp, flags, control, UIO_USERSPACE); Y - Y -bad: Y - free(to, M_SONAME); Y - if (control) Y - m_freem(control); Y - return (error); Y + return (kern_sendit(td, s, mp, flags, control, UIO_USERSPACE)); Y } Y Y int Bruce From owner-svn-src-head@freebsd.org Mon Sep 26 12:18:40 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AAA6BEACA1; Mon, 26 Sep 2016 12:18:40 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 22CABB22; Mon, 26 Sep 2016 12:18:39 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-109.carlnfd1.nsw.optusnet.com.au (c122-106-149-109.carlnfd1.nsw.optusnet.com.au [122.106.149.109]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id E39653C8C1D; Mon, 26 Sep 2016 22:18:31 +1000 (AEST) Date: Mon, 26 Sep 2016 22:18:31 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans cc: Hiren Panchasara , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306337 - head/sys/kern In-Reply-To: <20160926203343.S1542@besplex.bde.org> Message-ID: <20160926215837.K1725@besplex.bde.org> References: <201609261013.u8QADwrV002892@repo.freebsd.org> <20160926203343.S1542@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=VIkg5I7X c=1 sm=1 tr=0 a=R/f3m204ZbWUO/0rwPSMPw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=rWBMA1eanbLRUJGvs5oA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 12:18:40 -0000 On Mon, 26 Sep 2016, Bruce Evans wrote: > On Mon, 26 Sep 2016, Hiren Panchasara wrote: > >> Author: hiren >> Date: Mon Sep 26 10:13:58 2016 >> New Revision: 306337 >> URL: https://svnweb.freebsd.org/changeset/base/306337 >> >> Log: >> In sendit(), if mp->msg_control is present, then in sockargs() we are >> allocating I didn't actually write mangling of the quotes like that. >> mbuf to store mp->msg_control. Later in kern_sendit(), call to >> getsock_cap(), >> will check validity of file pointer passed, if this fails EBADF is >> returned but >> mbuf allocated in sockargs() is not freed. Fix this possible leak. Hmm. In my reply I thought it was a cleanup after a simpler function that was missing. The bad API makes it kern_sendit()'s responsibility to clean up in all cases. I don't like the layering, but the mere existence of kern_sendit() means that you can't fix it by changing one of its callers. It exists so that it can have multiple callers. it has 4 other callers, and 2 of these (linux and freebsd32 compat) pass it a non-null 'control' >> @@ -737,6 +737,8 @@ sendit(struct thread *td, int s, struct >> >> bad: >> free(to, M_SONAME); >> + if (control) >> + m_freem(control); >> return (error); >> } > > The "bad" label is an old style bug. This is the general return path, > not an error handling path. This gives many collateral obfuscations > and pessimizations. > > Now it seems to give a large bug with the help of the obfuscations: > when mp->msg_control != NULL, in the usual subcase where there is no > error, kern_sendit() must have already done m_freem(control) else the > usual subcase would have leaked. The code falls through to "bad" > and does m_freem(control) again. It is possible that a double m_freem() does nothing the second time because it sees a null chain, but it doesn't seem to support that. > [... my cleanups don't fix the problem] Bruce From owner-svn-src-head@freebsd.org Mon Sep 26 13:29:01 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 872C2BE83AE; Mon, 26 Sep 2016 13:29:01 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: from mail-qt0-x22f.google.com (mail-qt0-x22f.google.com [IPv6:2607:f8b0:400d:c0d::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E7F7DCC; Mon, 26 Sep 2016 13:29:01 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: by mail-qt0-x22f.google.com with SMTP id 38so80729683qte.1; Mon, 26 Sep 2016 06:29:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=hsRbx2KZ4td26st1b4//LHVBXfYv5n2Zvohl7+CmFPk=; b=h4E1zmWLr0ErOHUTkAV4No+ftbLWN25ujQeFfLNv5g1O8cIr0nhPko+wOUez6q2Ic8 nr+kh/uNRDapQUFaTrWBrKxhtPVR31dP+kG1EjA80tmRLnhebTBZQPXHqDxNgiZDdigo NW/GiJHxKZG+ReuRLIKBJQRJyFKOtZ5w9d7A8m3B9MQiMbPvNbRf442CBeAi8uuHpJfD T4/M3XbIkeb9pnR5vdQZ07Nq51JEHVQVG0LvHEMzYMo4rahrj+xaISQOGYRdOMCYUHZc 4bIe01JEKi1iaBjef1mUYxMG8YkijBjfywmGmuGNhsEFjHq7RNngwX3hXTOVGO5HosCh /CUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=hsRbx2KZ4td26st1b4//LHVBXfYv5n2Zvohl7+CmFPk=; b=fK0bW3IPsv59dRjmwNv/1KzDW0gHC8FWFI5fqrgJpOPag9io4BB2iOHPH9dHxSOO6e GUEun7xrIDXxi9hXMLLCtH0/ZLoAppKG/6gQenSimoREI6mkXdqp8TGdZkqRQQDXZvYx Nm8G+z92Gl33k4/lJW+mYvb7Gj7wcT87jBqGy9H2BePlwyVZSReu5XgR6lK2jp7v/jJN kpKC9e39uDwYl6t2g/BNn3/PxjVFvOWeSOeLYmroUeHhKGjVau2mm5RDEGtChJAqVKST m8ckb5mYoVHGbxNjpVyJDB1YfVcyGm9L1fvT5WAzMf0QmAmzwNOr+EfjDop7GRUP8N5x nLPg== X-Gm-Message-State: AA6/9RmyyyoqPyaiXkbg0J4+d4UlqkbSQMEfbLCDWEgnjmRr+7+FMGL5m4zNOir8ECJsNA== X-Received: by 10.200.51.54 with SMTP id t51mr20638458qta.110.1474896540002; Mon, 26 Sep 2016 06:29:00 -0700 (PDT) Received: from mbp-eth.home (179-125-152-136.desktop.com.br. [179.125.152.136]) by smtp.gmail.com with ESMTPSA id r187sm11544461qkc.49.2016.09.26.06.28.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Sep 2016 06:28:59 -0700 (PDT) Sender: Renato Botelho From: Renato Botelho Message-Id: <625EA453-99E1-4A44-8810-99CAB2397662@FreeBSD.org> Mime-Version: 1.0 (Mac OS X Mail 10.0 \(3226\)) Subject: Re: svn commit: r306289 - head/sys/net Date: Mon, 26 Sep 2016 10:28:54 -0300 In-Reply-To: <201609240709.u8O79hue048932@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Kristof Provost References: <201609240709.u8O79hue048932@repo.freebsd.org> X-Mailer: Apple Mail (2.3226) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 13:29:01 -0000 > On 24 Sep 2016, at 04:09, Kristof Provost wrote: >=20 > Author: kp > Date: Sat Sep 24 07:09:43 2016 > New Revision: 306289 > URL: https://svnweb.freebsd.org/changeset/base/306289 >=20 > Log: > bridge: Fix fragment handling and memory leak >=20 > Fragmented UDP and ICMP packets were corrupted if a firewall with = reassembling > feature (like pf'scrub) is enabled on the bridge. This patch fixes = corrupted > packet problem and the panic (triggered easly with low RAM) as = explain in PR > 185633. >=20 > bridge_pfil and bridge_fragment relationship: >=20 > bridge_pfil() receive (IN direction) packets and sent it to the = firewall The > firewall can be configured for reassembling fragmented packet (like = pf'scrubing) > in one mbuf chain when bridge_pfil() need to send this reassembled = packet to the > outgoing interface, it needs to re-fragment it by using = bridge_fragment() > bridge_fragment() had to split this mbuf (using ip_fragment) first = then > had to M_PREPEND each packet in the mbuf chain for adding Ethernet > header. >=20 > But M_PREPEND can sometime create a new mbuf on the begining of the = mbuf chain, > then the "main" pointer of this mbuf chain should be updated and this = case is > tottaly forgotten. The original bridge_fragment code (Revision = 158140, > 2006 April 29) came from OpenBSD, and the call to bridge_enqueue was > embedded. But on FreeBSD, bridge_enqueue() is done after = bridge_fragment(), > then the original OpenBSD code can't work as-it of FreeBSD. >=20 > PR: 185633 > Submitted by: Olivier Cochard-Labb=C3=A9 > Differential Revision: https://reviews.freebsd.org/D7780 Kristof, Do you hace plans to MFC it to stable/11 and stable/10? -- Renato Botelho From owner-svn-src-head@freebsd.org Mon Sep 26 13:32:05 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2ADCABE85DC; Mon, 26 Sep 2016 13:32:05 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EB0A21200; Mon, 26 Sep 2016 13:32:04 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [10.53.204.43] (unknown [88.128.80.163]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id CDE5E36E75; Mon, 26 Sep 2016 15:32:01 +0200 (CEST) From: "Kristof Provost" To: "Renato Botelho" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306289 - head/sys/net Date: Mon, 26 Sep 2016 15:32:01 +0200 Message-ID: In-Reply-To: <625EA453-99E1-4A44-8810-99CAB2397662@FreeBSD.org> References: <201609240709.u8O79hue048932@repo.freebsd.org> <625EA453-99E1-4A44-8810-99CAB2397662@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Mailer: MailMate (2.0BETAr6056) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 13:32:05 -0000 On 26 Sep 2016, at 15:28, Renato Botelho wrote: > > On 24 Sep 2016, at 04:09, Kristof Provost wrote: >> Author: kp >> Date: Sat Sep 24 07:09:43 2016 >> New Revision: 306289 >> URL: https://svnweb.freebsd.org/changeset/base/306289 >> >> Log: >> bridge: Fix fragment handling and memory leak >> … >> PR: 185633 >> Submitted by: Olivier Cochard-Labbé >> Differential Revision: https://reviews.freebsd.org/D7780 > Do you hace plans to MFC it to stable/11 and stable/10? > I hadn’t thought about it at the time, but now that you mention it, yes that would be a good idea. I’ve added it to my todo list for next weekend. Regards, Kristof From owner-svn-src-head@freebsd.org Mon Sep 26 13:59:19 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5F9FBE8EA7; Mon, 26 Sep 2016 13:59:19 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77128273; Mon, 26 Sep 2016 13:59:19 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QDxIp1085369; Mon, 26 Sep 2016 13:59:18 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QDxI4l085368; Mon, 26 Sep 2016 13:59:18 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609261359.u8QDxI4l085368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Mon, 26 Sep 2016 13:59:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306338 - head/usr.bin/calendar/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 13:59:19 -0000 Author: br Date: Mon Sep 26 13:59:18 2016 New Revision: 306338 URL: https://svnweb.freebsd.org/changeset/base/306338 Log: Increase timeout for legacy_test from 300 (default) to 600 seconds. It takes about 7 minutes to pass the test on MIPS64EB in QEMU. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/usr.bin/calendar/tests/Makefile Modified: head/usr.bin/calendar/tests/Makefile ============================================================================== --- head/usr.bin/calendar/tests/Makefile Mon Sep 26 10:13:58 2016 (r306337) +++ head/usr.bin/calendar/tests/Makefile Mon Sep 26 13:59:18 2016 (r306338) @@ -4,6 +4,8 @@ PACKAGE= tests TAP_TESTS_SH= legacy_test +TEST_METADATA.legacy_test+= timeout="600" + ${PACKAGE}FILES+= calendar.calibrate ${PACKAGE}FILES+= regress.a1.out ${PACKAGE}FILES+= regress.a2.out From owner-svn-src-head@freebsd.org Mon Sep 26 14:01:42 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6307BE8FE5; Mon, 26 Sep 2016 14:01:42 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84198856; Mon, 26 Sep 2016 14:01:42 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QE1faW086791; Mon, 26 Sep 2016 14:01:41 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QE1fQ4086790; Mon, 26 Sep 2016 14:01:41 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609261401.u8QE1fQ4086790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Mon, 26 Sep 2016 14:01:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306339 - head/sbin/growfs/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 14:01:42 -0000 Author: br Date: Mon Sep 26 14:01:41 2016 New Revision: 306339 URL: https://svnweb.freebsd.org/changeset/base/306339 Log: Use bsdlabel as we don't have hardlink disklabel -> bsdlabel on MIPS. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/sbin/growfs/tests/legacy_test.pl Modified: head/sbin/growfs/tests/legacy_test.pl ============================================================================== --- head/sbin/growfs/tests/legacy_test.pl Mon Sep 26 13:59:18 2016 (r306338) +++ head/sbin/growfs/tests/legacy_test.pl Mon Sep 26 14:01:41 2016 (r306339) @@ -14,7 +14,7 @@ END { system "mdconfig -du$unit" if defi sub setsize { my ($partszMB, $unitszMB) = @_; - open my $fd, "|-", "disklabel -R md$unit /dev/stdin" or die; + open my $fd, "|-", "bsdlabel -R md$unit /dev/stdin" or die; print $fd "a: ", ($partszMB * BLKS_PER_MB), " 0 4.2BSD 1024 8192\n"; print $fd "c: ", ($unitszMB * BLKS_PER_MB), " 0 unused 0 0\n"; close $fd; From owner-svn-src-head@freebsd.org Mon Sep 26 14:22:28 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CD05BE9587; Mon, 26 Sep 2016 14:22:28 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D982175D; Mon, 26 Sep 2016 14:22:27 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QEMRqq096558; Mon, 26 Sep 2016 14:22:27 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QEMHXG096465; Mon, 26 Sep 2016 14:22:17 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201609261422.u8QEMHXG096465@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 26 Sep 2016 14:22:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306342 - in head: crypto/openssl crypto/openssl/crypto crypto/openssl/crypto/engine crypto/openssl/crypto/x509 crypto/openssl/ssl secure/lib/libcrypto secure/lib/libcrypto/man secure/l... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 14:22:28 -0000 Author: jkim Date: Mon Sep 26 14:22:17 2016 New Revision: 306342 URL: https://svnweb.freebsd.org/changeset/base/306342 Log: Merge OpenSSL 1.0.2j. Modified: head/crypto/openssl/CHANGES head/crypto/openssl/Makefile head/crypto/openssl/NEWS head/crypto/openssl/README head/crypto/openssl/crypto/engine/eng_cryptodev.c head/crypto/openssl/crypto/opensslv.h head/crypto/openssl/crypto/x509/x509_vfy.c head/crypto/openssl/ssl/t1_ext.c head/secure/lib/libcrypto/Makefile.inc head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_length.3 head/secure/lib/libcrypto/man/ASN1_STRING_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 head/secure/lib/libcrypto/man/ASN1_TIME_set.3 head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 head/secure/lib/libcrypto/man/BIO_ctrl.3 head/secure/lib/libcrypto/man/BIO_f_base64.3 head/secure/lib/libcrypto/man/BIO_f_buffer.3 head/secure/lib/libcrypto/man/BIO_f_cipher.3 head/secure/lib/libcrypto/man/BIO_f_md.3 head/secure/lib/libcrypto/man/BIO_f_null.3 head/secure/lib/libcrypto/man/BIO_f_ssl.3 head/secure/lib/libcrypto/man/BIO_find_type.3 head/secure/lib/libcrypto/man/BIO_new.3 head/secure/lib/libcrypto/man/BIO_new_CMS.3 head/secure/lib/libcrypto/man/BIO_push.3 head/secure/lib/libcrypto/man/BIO_read.3 head/secure/lib/libcrypto/man/BIO_s_accept.3 head/secure/lib/libcrypto/man/BIO_s_bio.3 head/secure/lib/libcrypto/man/BIO_s_connect.3 head/secure/lib/libcrypto/man/BIO_s_fd.3 head/secure/lib/libcrypto/man/BIO_s_file.3 head/secure/lib/libcrypto/man/BIO_s_mem.3 head/secure/lib/libcrypto/man/BIO_s_null.3 head/secure/lib/libcrypto/man/BIO_s_socket.3 head/secure/lib/libcrypto/man/BIO_set_callback.3 head/secure/lib/libcrypto/man/BIO_should_retry.3 head/secure/lib/libcrypto/man/BN_BLINDING_new.3 head/secure/lib/libcrypto/man/BN_CTX_new.3 head/secure/lib/libcrypto/man/BN_CTX_start.3 head/secure/lib/libcrypto/man/BN_add.3 head/secure/lib/libcrypto/man/BN_add_word.3 head/secure/lib/libcrypto/man/BN_bn2bin.3 head/secure/lib/libcrypto/man/BN_cmp.3 head/secure/lib/libcrypto/man/BN_copy.3 head/secure/lib/libcrypto/man/BN_generate_prime.3 head/secure/lib/libcrypto/man/BN_mod_inverse.3 head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 head/secure/lib/libcrypto/man/BN_new.3 head/secure/lib/libcrypto/man/BN_num_bytes.3 head/secure/lib/libcrypto/man/BN_rand.3 head/secure/lib/libcrypto/man/BN_set_bit.3 head/secure/lib/libcrypto/man/BN_swap.3 head/secure/lib/libcrypto/man/BN_zero.3 head/secure/lib/libcrypto/man/CMS_add0_cert.3 head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 head/secure/lib/libcrypto/man/CMS_add1_signer.3 head/secure/lib/libcrypto/man/CMS_compress.3 head/secure/lib/libcrypto/man/CMS_decrypt.3 head/secure/lib/libcrypto/man/CMS_encrypt.3 head/secure/lib/libcrypto/man/CMS_final.3 head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 head/secure/lib/libcrypto/man/CMS_get0_type.3 head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 head/secure/lib/libcrypto/man/CMS_sign.3 head/secure/lib/libcrypto/man/CMS_sign_receipt.3 head/secure/lib/libcrypto/man/CMS_uncompress.3 head/secure/lib/libcrypto/man/CMS_verify.3 head/secure/lib/libcrypto/man/CMS_verify_receipt.3 head/secure/lib/libcrypto/man/CONF_modules_free.3 head/secure/lib/libcrypto/man/CONF_modules_load_file.3 head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 head/secure/lib/libcrypto/man/DH_generate_key.3 head/secure/lib/libcrypto/man/DH_generate_parameters.3 head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 head/secure/lib/libcrypto/man/DH_new.3 head/secure/lib/libcrypto/man/DH_set_method.3 head/secure/lib/libcrypto/man/DH_size.3 head/secure/lib/libcrypto/man/DSA_SIG_new.3 head/secure/lib/libcrypto/man/DSA_do_sign.3 head/secure/lib/libcrypto/man/DSA_dup_DH.3 head/secure/lib/libcrypto/man/DSA_generate_key.3 head/secure/lib/libcrypto/man/DSA_generate_parameters.3 head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/DSA_new.3 head/secure/lib/libcrypto/man/DSA_set_method.3 head/secure/lib/libcrypto/man/DSA_sign.3 head/secure/lib/libcrypto/man/DSA_size.3 head/secure/lib/libcrypto/man/EC_GFp_simple_method.3 head/secure/lib/libcrypto/man/EC_GROUP_copy.3 head/secure/lib/libcrypto/man/EC_GROUP_new.3 head/secure/lib/libcrypto/man/EC_KEY_new.3 head/secure/lib/libcrypto/man/EC_POINT_add.3 head/secure/lib/libcrypto/man/EC_POINT_new.3 head/secure/lib/libcrypto/man/ERR_GET_LIB.3 head/secure/lib/libcrypto/man/ERR_clear_error.3 head/secure/lib/libcrypto/man/ERR_error_string.3 head/secure/lib/libcrypto/man/ERR_get_error.3 head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 head/secure/lib/libcrypto/man/ERR_load_strings.3 head/secure/lib/libcrypto/man/ERR_print_errors.3 head/secure/lib/libcrypto/man/ERR_put_error.3 head/secure/lib/libcrypto/man/ERR_remove_state.3 head/secure/lib/libcrypto/man/ERR_set_mark.3 head/secure/lib/libcrypto/man/EVP_BytesToKey.3 head/secure/lib/libcrypto/man/EVP_DigestInit.3 head/secure/lib/libcrypto/man/EVP_DigestSignInit.3 head/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 head/secure/lib/libcrypto/man/EVP_EncodeInit.3 head/secure/lib/libcrypto/man/EVP_EncryptInit.3 head/secure/lib/libcrypto/man/EVP_OpenInit.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 head/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_derive.3 head/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 head/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 head/secure/lib/libcrypto/man/EVP_PKEY_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 head/secure/lib/libcrypto/man/EVP_PKEY_sign.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 head/secure/lib/libcrypto/man/EVP_SealInit.3 head/secure/lib/libcrypto/man/EVP_SignInit.3 head/secure/lib/libcrypto/man/EVP_VerifyInit.3 head/secure/lib/libcrypto/man/OBJ_nid2obj.3 head/secure/lib/libcrypto/man/OPENSSL_Applink.3 head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 head/secure/lib/libcrypto/man/OPENSSL_config.3 head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 head/secure/lib/libcrypto/man/OPENSSL_instrument_bus.3 head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 head/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 head/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 head/secure/lib/libcrypto/man/PKCS12_create.3 head/secure/lib/libcrypto/man/PKCS12_parse.3 head/secure/lib/libcrypto/man/PKCS7_decrypt.3 head/secure/lib/libcrypto/man/PKCS7_encrypt.3 head/secure/lib/libcrypto/man/PKCS7_sign.3 head/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 head/secure/lib/libcrypto/man/PKCS7_verify.3 head/secure/lib/libcrypto/man/RAND_add.3 head/secure/lib/libcrypto/man/RAND_bytes.3 head/secure/lib/libcrypto/man/RAND_cleanup.3 head/secure/lib/libcrypto/man/RAND_egd.3 head/secure/lib/libcrypto/man/RAND_load_file.3 head/secure/lib/libcrypto/man/RAND_set_rand_method.3 head/secure/lib/libcrypto/man/RSA_blinding_on.3 head/secure/lib/libcrypto/man/RSA_check_key.3 head/secure/lib/libcrypto/man/RSA_generate_key.3 head/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/RSA_new.3 head/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 head/secure/lib/libcrypto/man/RSA_print.3 head/secure/lib/libcrypto/man/RSA_private_encrypt.3 head/secure/lib/libcrypto/man/RSA_public_encrypt.3 head/secure/lib/libcrypto/man/RSA_set_method.3 head/secure/lib/libcrypto/man/RSA_sign.3 head/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 head/secure/lib/libcrypto/man/RSA_size.3 head/secure/lib/libcrypto/man/SMIME_read_CMS.3 head/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 head/secure/lib/libcrypto/man/SMIME_write_CMS.3 head/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 head/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 head/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 head/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 head/secure/lib/libcrypto/man/X509_NAME_print_ex.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 head/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 head/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 head/secure/lib/libcrypto/man/X509_check_host.3 head/secure/lib/libcrypto/man/X509_new.3 head/secure/lib/libcrypto/man/X509_verify_cert.3 head/secure/lib/libcrypto/man/bio.3 head/secure/lib/libcrypto/man/blowfish.3 head/secure/lib/libcrypto/man/bn.3 head/secure/lib/libcrypto/man/bn_internal.3 head/secure/lib/libcrypto/man/buffer.3 head/secure/lib/libcrypto/man/crypto.3 head/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 head/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 head/secure/lib/libcrypto/man/d2i_DHparams.3 head/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_ECPKParameters.3 head/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 head/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 head/secure/lib/libcrypto/man/d2i_PrivateKey.3 head/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_X509.3 head/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 head/secure/lib/libcrypto/man/d2i_X509_CRL.3 head/secure/lib/libcrypto/man/d2i_X509_NAME.3 head/secure/lib/libcrypto/man/d2i_X509_REQ.3 head/secure/lib/libcrypto/man/d2i_X509_SIG.3 head/secure/lib/libcrypto/man/des.3 head/secure/lib/libcrypto/man/dh.3 head/secure/lib/libcrypto/man/dsa.3 head/secure/lib/libcrypto/man/ec.3 head/secure/lib/libcrypto/man/ecdsa.3 head/secure/lib/libcrypto/man/engine.3 head/secure/lib/libcrypto/man/err.3 head/secure/lib/libcrypto/man/evp.3 head/secure/lib/libcrypto/man/hmac.3 head/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 head/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 head/secure/lib/libcrypto/man/lh_stats.3 head/secure/lib/libcrypto/man/lhash.3 head/secure/lib/libcrypto/man/md5.3 head/secure/lib/libcrypto/man/mdc2.3 head/secure/lib/libcrypto/man/pem.3 head/secure/lib/libcrypto/man/rand.3 head/secure/lib/libcrypto/man/rc4.3 head/secure/lib/libcrypto/man/ripemd.3 head/secure/lib/libcrypto/man/rsa.3 head/secure/lib/libcrypto/man/sha.3 head/secure/lib/libcrypto/man/threads.3 head/secure/lib/libcrypto/man/ui.3 head/secure/lib/libcrypto/man/ui_compat.3 head/secure/lib/libcrypto/man/x509.3 head/secure/lib/libssl/man/SSL_CIPHER_get_name.3 head/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 head/secure/lib/libssl/man/SSL_CONF_CTX_new.3 head/secure/lib/libssl/man/SSL_CONF_CTX_set1_prefix.3 head/secure/lib/libssl/man/SSL_CONF_CTX_set_flags.3 head/secure/lib/libssl/man/SSL_CONF_CTX_set_ssl_ctx.3 head/secure/lib/libssl/man/SSL_CONF_cmd.3 head/secure/lib/libssl/man/SSL_CONF_cmd_argv.3 head/secure/lib/libssl/man/SSL_CTX_add1_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_session.3 head/secure/lib/libssl/man/SSL_CTX_ctrl.3 head/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 head/secure/lib/libssl/man/SSL_CTX_free.3 head/secure/lib/libssl/man/SSL_CTX_get0_param.3 head/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 head/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 head/secure/lib/libssl/man/SSL_CTX_new.3 head/secure/lib/libssl/man/SSL_CTX_sess_number.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 head/secure/lib/libssl/man/SSL_CTX_sessions.3 head/secure/lib/libssl/man/SSL_CTX_set1_curves.3 head/secure/lib/libssl/man/SSL_CTX_set1_verify_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_alpn_select_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_custom_cli_ext.3 head/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 head/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 head/secure/lib/libssl/man/SSL_CTX_set_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_options.3 head/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 head/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 head/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 head/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 head/secure/lib/libssl/man/SSL_CTX_set_timeout.3 head/secure/lib/libssl/man/SSL_CTX_set_tlsext_status_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_verify.3 head/secure/lib/libssl/man/SSL_CTX_use_certificate.3 head/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 head/secure/lib/libssl/man/SSL_CTX_use_serverinfo.3 head/secure/lib/libssl/man/SSL_SESSION_free.3 head/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_SESSION_get_time.3 head/secure/lib/libssl/man/SSL_accept.3 head/secure/lib/libssl/man/SSL_alert_type_string.3 head/secure/lib/libssl/man/SSL_check_chain.3 head/secure/lib/libssl/man/SSL_clear.3 head/secure/lib/libssl/man/SSL_connect.3 head/secure/lib/libssl/man/SSL_do_handshake.3 head/secure/lib/libssl/man/SSL_free.3 head/secure/lib/libssl/man/SSL_get_SSL_CTX.3 head/secure/lib/libssl/man/SSL_get_ciphers.3 head/secure/lib/libssl/man/SSL_get_client_CA_list.3 head/secure/lib/libssl/man/SSL_get_current_cipher.3 head/secure/lib/libssl/man/SSL_get_default_timeout.3 head/secure/lib/libssl/man/SSL_get_error.3 head/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 head/secure/lib/libssl/man/SSL_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_get_fd.3 head/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 head/secure/lib/libssl/man/SSL_get_peer_certificate.3 head/secure/lib/libssl/man/SSL_get_psk_identity.3 head/secure/lib/libssl/man/SSL_get_rbio.3 head/secure/lib/libssl/man/SSL_get_session.3 head/secure/lib/libssl/man/SSL_get_verify_result.3 head/secure/lib/libssl/man/SSL_get_version.3 head/secure/lib/libssl/man/SSL_library_init.3 head/secure/lib/libssl/man/SSL_load_client_CA_file.3 head/secure/lib/libssl/man/SSL_new.3 head/secure/lib/libssl/man/SSL_pending.3 head/secure/lib/libssl/man/SSL_read.3 head/secure/lib/libssl/man/SSL_rstate_string.3 head/secure/lib/libssl/man/SSL_session_reused.3 head/secure/lib/libssl/man/SSL_set_bio.3 head/secure/lib/libssl/man/SSL_set_connect_state.3 head/secure/lib/libssl/man/SSL_set_fd.3 head/secure/lib/libssl/man/SSL_set_session.3 head/secure/lib/libssl/man/SSL_set_shutdown.3 head/secure/lib/libssl/man/SSL_set_verify_result.3 head/secure/lib/libssl/man/SSL_shutdown.3 head/secure/lib/libssl/man/SSL_state_string.3 head/secure/lib/libssl/man/SSL_want.3 head/secure/lib/libssl/man/SSL_write.3 head/secure/lib/libssl/man/d2i_SSL_SESSION.3 head/secure/lib/libssl/man/ssl.3 head/secure/usr.bin/openssl/man/CA.pl.1 head/secure/usr.bin/openssl/man/asn1parse.1 head/secure/usr.bin/openssl/man/c_rehash.1 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/ciphers.1 head/secure/usr.bin/openssl/man/cms.1 head/secure/usr.bin/openssl/man/crl.1 head/secure/usr.bin/openssl/man/crl2pkcs7.1 head/secure/usr.bin/openssl/man/dgst.1 head/secure/usr.bin/openssl/man/dhparam.1 head/secure/usr.bin/openssl/man/dsa.1 head/secure/usr.bin/openssl/man/dsaparam.1 head/secure/usr.bin/openssl/man/ec.1 head/secure/usr.bin/openssl/man/ecparam.1 head/secure/usr.bin/openssl/man/enc.1 head/secure/usr.bin/openssl/man/errstr.1 head/secure/usr.bin/openssl/man/gendsa.1 head/secure/usr.bin/openssl/man/genpkey.1 head/secure/usr.bin/openssl/man/genrsa.1 head/secure/usr.bin/openssl/man/nseq.1 head/secure/usr.bin/openssl/man/ocsp.1 head/secure/usr.bin/openssl/man/openssl.1 head/secure/usr.bin/openssl/man/passwd.1 head/secure/usr.bin/openssl/man/pkcs12.1 head/secure/usr.bin/openssl/man/pkcs7.1 head/secure/usr.bin/openssl/man/pkcs8.1 head/secure/usr.bin/openssl/man/pkey.1 head/secure/usr.bin/openssl/man/pkeyparam.1 head/secure/usr.bin/openssl/man/pkeyutl.1 head/secure/usr.bin/openssl/man/rand.1 head/secure/usr.bin/openssl/man/req.1 head/secure/usr.bin/openssl/man/rsa.1 head/secure/usr.bin/openssl/man/rsautl.1 head/secure/usr.bin/openssl/man/s_client.1 head/secure/usr.bin/openssl/man/s_server.1 head/secure/usr.bin/openssl/man/s_time.1 head/secure/usr.bin/openssl/man/sess_id.1 head/secure/usr.bin/openssl/man/smime.1 head/secure/usr.bin/openssl/man/speed.1 head/secure/usr.bin/openssl/man/spkac.1 head/secure/usr.bin/openssl/man/ts.1 head/secure/usr.bin/openssl/man/tsget.1 head/secure/usr.bin/openssl/man/verify.1 head/secure/usr.bin/openssl/man/version.1 head/secure/usr.bin/openssl/man/x509.1 head/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: head/crypto/openssl/ (props changed) Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Mon Sep 26 14:13:43 2016 (r306341) +++ head/crypto/openssl/CHANGES Mon Sep 26 14:22:17 2016 (r306342) @@ -2,6 +2,18 @@ OpenSSL CHANGES _______________ + Changes between 1.0.2i and 1.0.2j [26 Sep 2016] + + *) Missing CRL sanity check + + A bug fix which included a CRL sanity check was added to OpenSSL 1.1.0 + but was omitted from OpenSSL 1.0.2i. As a result any attempt to use + CRLs in OpenSSL 1.0.2i will crash with a null pointer exception. + + This issue only affects the OpenSSL 1.0.2i + (CVE-2016-7052) + [Matt Caswell] + Changes between 1.0.2h and 1.0.2i [22 Sep 2016] *) OCSP Status Request extension unbounded memory growth Modified: head/crypto/openssl/Makefile ============================================================================== --- head/crypto/openssl/Makefile Mon Sep 26 14:13:43 2016 (r306341) +++ head/crypto/openssl/Makefile Mon Sep 26 14:22:17 2016 (r306342) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.2i +VERSION=1.0.2j MAJOR=1 MINOR=0.2 SHLIB_VERSION_NUMBER=1.0.0 Modified: head/crypto/openssl/NEWS ============================================================================== --- head/crypto/openssl/NEWS Mon Sep 26 14:13:43 2016 (r306341) +++ head/crypto/openssl/NEWS Mon Sep 26 14:22:17 2016 (r306342) @@ -5,6 +5,10 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.2i and OpenSSL 1.0.2j [26 Sep 2016] + + o Fix Use After Free for large message sizes (CVE-2016-6309) + Major changes between OpenSSL 1.0.2h and OpenSSL 1.0.2i [22 Sep 2016] o OCSP Status Request extension unbounded memory growth (CVE-2016-6304) Modified: head/crypto/openssl/README ============================================================================== --- head/crypto/openssl/README Mon Sep 26 14:13:43 2016 (r306341) +++ head/crypto/openssl/README Mon Sep 26 14:22:17 2016 (r306342) @@ -1,5 +1,5 @@ - OpenSSL 1.0.2i 22 Sep 2016 + OpenSSL 1.0.2j 26 Sep 2016 Copyright (c) 1998-2015 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: head/crypto/openssl/crypto/engine/eng_cryptodev.c ============================================================================== --- head/crypto/openssl/crypto/engine/eng_cryptodev.c Mon Sep 26 14:13:43 2016 (r306341) +++ head/crypto/openssl/crypto/engine/eng_cryptodev.c Mon Sep 26 14:22:17 2016 (r306342) @@ -939,7 +939,7 @@ static int cryptodev_digest_copy(EVP_MD_ if (fstate->mac_len != 0) { if (fstate->mac_data != NULL) { dstate->mac_data = OPENSSL_malloc(fstate->mac_len); - if (dstate->ac_data == NULL) { + if (dstate->mac_data == NULL) { printf("cryptodev_digest_init: malloc failed\n"); return 0; } Modified: head/crypto/openssl/crypto/opensslv.h ============================================================================== --- head/crypto/openssl/crypto/opensslv.h Mon Sep 26 14:13:43 2016 (r306341) +++ head/crypto/openssl/crypto/opensslv.h Mon Sep 26 14:22:17 2016 (r306342) @@ -30,11 +30,11 @@ extern "C" { * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -# define OPENSSL_VERSION_NUMBER 0x1000209fL +# define OPENSSL_VERSION_NUMBER 0x100020afL # ifdef OPENSSL_FIPS -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2i-fips 22 Sep 2016" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2j-fips 26 Sep 2016" # else -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2i-freebsd 22 Sep 2016" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2j-freebsd 26 Sep 2016" # endif # define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: head/crypto/openssl/crypto/x509/x509_vfy.c ============================================================================== --- head/crypto/openssl/crypto/x509/x509_vfy.c Mon Sep 26 14:13:43 2016 (r306341) +++ head/crypto/openssl/crypto/x509/x509_vfy.c Mon Sep 26 14:22:17 2016 (r306342) @@ -1124,10 +1124,10 @@ static int get_crl_sk(X509_STORE_CTX *ct crl = sk_X509_CRL_value(crls, i); reasons = *preasons; crl_score = get_crl_score(ctx, &crl_issuer, &reasons, crl, x); - if (crl_score < best_score) + if (crl_score < best_score || crl_score == 0) continue; /* If current CRL is equivalent use it if it is newer */ - if (crl_score == best_score) { + if (crl_score == best_score && best_crl != NULL) { int day, sec; if (ASN1_TIME_diff(&day, &sec, X509_CRL_get_lastUpdate(best_crl), X509_CRL_get_lastUpdate(crl)) == 0) Modified: head/crypto/openssl/ssl/t1_ext.c ============================================================================== --- head/crypto/openssl/ssl/t1_ext.c Mon Sep 26 14:13:43 2016 (r306341) +++ head/crypto/openssl/ssl/t1_ext.c Mon Sep 26 14:22:17 2016 (r306342) @@ -275,7 +275,9 @@ int SSL_extension_supported(unsigned int case TLSEXT_TYPE_ec_point_formats: case TLSEXT_TYPE_elliptic_curves: case TLSEXT_TYPE_heartbeat: +# ifndef OPENSSL_NO_NEXTPROTONEG case TLSEXT_TYPE_next_proto_neg: +# endif case TLSEXT_TYPE_padding: case TLSEXT_TYPE_renegotiate: case TLSEXT_TYPE_server_name: Modified: head/secure/lib/libcrypto/Makefile.inc ============================================================================== --- head/secure/lib/libcrypto/Makefile.inc Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/Makefile.inc Mon Sep 26 14:22:17 2016 (r306342) @@ -3,8 +3,8 @@ .include # OpenSSL version used for manual page generation -OPENSSL_VER= 1.0.2i -OPENSSL_DATE= 2016-09-22 +OPENSSL_VER= 1.0.2j +OPENSSL_DATE= 2016-09-26 LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl LCRYPTO_DOC= ${LCRYPTO_SRC}/doc Modified: head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_OBJECT_new 3" -.TH ASN1_OBJECT_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_OBJECT_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/ASN1_STRING_length.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_STRING_length.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/ASN1_STRING_length.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_length 3" -.TH ASN1_STRING_length 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_STRING_length 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/ASN1_STRING_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_STRING_new.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/ASN1_STRING_new.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_new 3" -.TH ASN1_STRING_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_STRING_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_print_ex 3" -.TH ASN1_STRING_print_ex 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_STRING_print_ex 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/ASN1_TIME_set.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_TIME_set.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/ASN1_TIME_set.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_TIME_set 3" -.TH ASN1_TIME_set 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_TIME_set 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_generate_nconf 3" -.TH ASN1_generate_nconf 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH ASN1_generate_nconf 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_ctrl.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_ctrl.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_ctrl.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ctrl 3" -.TH BIO_ctrl 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_ctrl 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_base64.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_base64.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_f_base64.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_base64 3" -.TH BIO_f_base64 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_base64 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_buffer.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_buffer.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_f_buffer.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_buffer 3" -.TH BIO_f_buffer 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_buffer 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_cipher.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_cipher.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_f_cipher.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_cipher 3" -.TH BIO_f_cipher 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_cipher 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_md.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_md.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_f_md.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_md 3" -.TH BIO_f_md 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_md 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_null.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_null.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_f_null.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_null 3" -.TH BIO_f_null 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_null 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_ssl.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_ssl.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_f_ssl.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_ssl 3" -.TH BIO_f_ssl 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_f_ssl 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_find_type.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_find_type.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_find_type.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_find_type 3" -.TH BIO_find_type 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_find_type 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_new.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_new.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_new 3" -.TH BIO_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_new_CMS.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_new_CMS.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_new_CMS.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_new_CMS 3" -.TH BIO_new_CMS 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_new_CMS 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_push.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_push.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_push.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_push 3" -.TH BIO_push 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_push 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_read.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_read.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_read.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_read 3" -.TH BIO_read 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_read 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_accept.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_accept.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_s_accept.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_accept 3" -.TH BIO_s_accept 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_accept 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_bio.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_bio.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_s_bio.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_bio 3" -.TH BIO_s_bio 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_bio 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_connect.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_connect.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_s_connect.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_connect 3" -.TH BIO_s_connect 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_connect 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_fd.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_fd.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_s_fd.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_fd 3" -.TH BIO_s_fd 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_fd 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_file.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_file.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_s_file.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_file 3" -.TH BIO_s_file 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_file 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_mem.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_mem.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_s_mem.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_mem 3" -.TH BIO_s_mem 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_mem 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_null.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_null.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_s_null.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_null 3" -.TH BIO_s_null 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_null 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_socket.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_socket.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_s_socket.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_socket 3" -.TH BIO_s_socket 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_s_socket 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_set_callback.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_set_callback.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_set_callback.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_set_callback 3" -.TH BIO_set_callback 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_set_callback 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_should_retry.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_should_retry.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BIO_should_retry.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_should_retry 3" -.TH BIO_should_retry 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BIO_should_retry 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_BLINDING_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_BLINDING_new.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_BLINDING_new.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_BLINDING_new 3" -.TH BN_BLINDING_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_BLINDING_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_CTX_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_CTX_new.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_CTX_new.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_new 3" -.TH BN_CTX_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_CTX_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_CTX_start.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_CTX_start.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_CTX_start.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_start 3" -.TH BN_CTX_start 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_CTX_start 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_add.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_add.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_add.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_add 3" -.TH BN_add 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_add 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_add_word.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_add_word.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_add_word.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_add_word 3" -.TH BN_add_word 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_add_word 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_bn2bin.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_bn2bin.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_bn2bin.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_bn2bin 3" -.TH BN_bn2bin 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_bn2bin 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_cmp.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_cmp.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_cmp.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_cmp 3" -.TH BN_cmp 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_cmp 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_copy.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_copy.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_copy.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_copy 3" -.TH BN_copy 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_copy 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_generate_prime.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_generate_prime.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_generate_prime.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_generate_prime 3" -.TH BN_generate_prime 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_generate_prime 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_mod_inverse.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_mod_inverse.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_mod_inverse.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_inverse 3" -.TH BN_mod_inverse 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_mod_inverse 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_montgomery 3" -.TH BN_mod_mul_montgomery 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_mod_mul_montgomery 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_reciprocal 3" -.TH BN_mod_mul_reciprocal 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_mod_mul_reciprocal 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_new.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_new.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_new 3" -.TH BN_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_num_bytes.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_num_bytes.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_num_bytes.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_num_bytes 3" -.TH BN_num_bytes 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_num_bytes 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_rand.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_rand.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_rand.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_rand 3" -.TH BN_rand 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_rand 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_set_bit.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_set_bit.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_set_bit.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_set_bit 3" -.TH BN_set_bit 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_set_bit 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_swap.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_swap.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_swap.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_swap 3" -.TH BN_swap 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_swap 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_zero.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_zero.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/BN_zero.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_zero 3" -.TH BN_zero 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH BN_zero 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_add0_cert.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_add0_cert.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_add0_cert.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add0_cert 3" -.TH CMS_add0_cert 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_add0_cert 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add1_recipient_cert 3" -.TH CMS_add1_recipient_cert 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_add1_recipient_cert 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_add1_signer.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_add1_signer.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_add1_signer.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add1_signer 3" -.TH CMS_add1_signer 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_add1_signer 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_compress.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_compress.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_compress.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_compress 3" -.TH CMS_compress 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_compress 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_decrypt.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_decrypt.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_decrypt.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_decrypt 3" -.TH CMS_decrypt 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_decrypt 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_encrypt.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_encrypt.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_encrypt.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_encrypt 3" -.TH CMS_encrypt 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_encrypt 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_final.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_final.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_final.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_final 3" -.TH CMS_final 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_final 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_RecipientInfos 3" -.TH CMS_get0_RecipientInfos 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_get0_RecipientInfos 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_SignerInfos 3" -.TH CMS_get0_SignerInfos 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_get0_SignerInfos 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_get0_type.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_get0_type.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_get0_type.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_type 3" -.TH CMS_get0_type 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_get0_type 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get1_ReceiptRequest 3" -.TH CMS_get1_ReceiptRequest 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_get1_ReceiptRequest 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_sign.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_sign.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_sign.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_sign 3" -.TH CMS_sign 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_sign 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_sign_receipt.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_sign_receipt.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_sign_receipt.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_sign_receipt 3" -.TH CMS_sign_receipt 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_sign_receipt 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_uncompress.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_uncompress.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_uncompress.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_uncompress 3" -.TH CMS_uncompress 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_uncompress 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_verify.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_verify.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_verify.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_verify 3" -.TH CMS_verify 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_verify 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_verify_receipt.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_verify_receipt.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CMS_verify_receipt.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_verify_receipt 3" -.TH CMS_verify_receipt 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CMS_verify_receipt 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CONF_modules_free.3 ============================================================================== --- head/secure/lib/libcrypto/man/CONF_modules_free.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CONF_modules_free.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_free 3" -.TH CONF_modules_free 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CONF_modules_free 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CONF_modules_load_file.3 ============================================================================== --- head/secure/lib/libcrypto/man/CONF_modules_load_file.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CONF_modules_load_file.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_load_file 3" -.TH CONF_modules_load_file 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CONF_modules_load_file 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 ============================================================================== --- head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CRYPTO_set_ex_data 3" -.TH CRYPTO_set_ex_data 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH CRYPTO_set_ex_data 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_generate_key.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_generate_key.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DH_generate_key.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_key 3" -.TH DH_generate_key 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_generate_key 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_generate_parameters.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_generate_parameters.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DH_generate_parameters.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_parameters 3" -.TH DH_generate_parameters 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_generate_parameters 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_get_ex_new_index 3" -.TH DH_get_ex_new_index 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_get_ex_new_index 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_new.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DH_new.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_new 3" -.TH DH_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_set_method.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_set_method.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DH_set_method.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_set_method 3" -.TH DH_set_method 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_set_method 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_size.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_size.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DH_size.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_size 3" -.TH DH_size 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DH_size 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_SIG_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_SIG_new.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DSA_SIG_new.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_SIG_new 3" -.TH DSA_SIG_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_SIG_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_do_sign.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_do_sign.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DSA_do_sign.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_do_sign 3" -.TH DSA_do_sign 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_do_sign 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_dup_DH.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_dup_DH.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DSA_dup_DH.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_dup_DH 3" -.TH DSA_dup_DH 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_dup_DH 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_generate_key.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_generate_key.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DSA_generate_key.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_key 3" -.TH DSA_generate_key 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_generate_key 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_generate_parameters.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_generate_parameters.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DSA_generate_parameters.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_parameters 3" -.TH DSA_generate_parameters 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_generate_parameters 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_get_ex_new_index 3" -.TH DSA_get_ex_new_index 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_get_ex_new_index 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_new.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DSA_new.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_new 3" -.TH DSA_new 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_new 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_set_method.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_set_method.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DSA_set_method.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_set_method 3" -.TH DSA_set_method 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_set_method 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_sign.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_sign.3 Mon Sep 26 14:13:43 2016 (r306341) +++ head/secure/lib/libcrypto/man/DSA_sign.3 Mon Sep 26 14:22:17 2016 (r306342) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_sign 3" -.TH DSA_sign 3 "2016-09-22" "1.0.2i" "OpenSSL" +.TH DSA_sign 3 "2016-09-26" "1.0.2j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Mon Sep 26 15:30:31 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38216BE3BC4; Mon, 26 Sep 2016 15:30:31 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04F99FFA; Mon, 26 Sep 2016 15:30:30 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QFUUTj020175; Mon, 26 Sep 2016 15:30:30 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QFUUZd020174; Mon, 26 Sep 2016 15:30:30 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201609261530.u8QFUUZd020174@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Mon, 26 Sep 2016 15:30:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306346 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 15:30:31 -0000 Author: vangyzen Date: Mon Sep 26 15:30:30 2016 New Revision: 306346 URL: https://svnweb.freebsd.org/changeset/base/306346 Log: Make no assertions about mutex state when the scheduler is stopped. This changes the assert path to match the lock and unlock paths. MFC after: 1 week Sponsored by: Dell EMC Modified: head/sys/kern/kern_mutex.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Mon Sep 26 15:03:31 2016 (r306345) +++ head/sys/kern/kern_mutex.c Mon Sep 26 15:30:30 2016 (r306346) @@ -924,7 +924,7 @@ __mtx_assert(const volatile uintptr_t *c { const struct mtx *m; - if (panicstr != NULL || dumping) + if (panicstr != NULL || dumping || SCHEDULER_STOPPED()) return; m = mtxlock2mtx(c); From owner-svn-src-head@freebsd.org Mon Sep 26 15:38:03 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F05BBE3ECA; Mon, 26 Sep 2016 15:38:03 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6074E96D; Mon, 26 Sep 2016 15:38:03 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QFc257023866; Mon, 26 Sep 2016 15:38:02 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QFc2Av023865; Mon, 26 Sep 2016 15:38:02 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609261538.u8QFc2Av023865@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Mon, 26 Sep 2016 15:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306347 - head/lib/libc/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 15:38:03 -0000 Author: br Date: Mon Sep 26 15:38:02 2016 New Revision: 306347 URL: https://svnweb.freebsd.org/changeset/base/306347 Log: Don't build SSP tests on MIPS as we dont have stack-protector supported on this platform. Discussed with: brooks Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/lib/libc/tests/Makefile Modified: head/lib/libc/tests/Makefile ============================================================================== --- head/lib/libc/tests/Makefile Mon Sep 26 15:30:30 2016 (r306346) +++ head/lib/libc/tests/Makefile Mon Sep 26 15:38:02 2016 (r306347) @@ -30,7 +30,8 @@ SUBDIR_DEPEND_tls= tls_dso TESTS_SUBDIRS+= locale .endif -.if ${MK_SSP} != "no" +.if ${MK_SSP} != "no" && \ + ${MACHINE_CPUARCH} != "mips" TESTS_SUBDIRS+= ssp .endif From owner-svn-src-head@freebsd.org Mon Sep 26 15:45:31 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73C7EBE414D; Mon, 26 Sep 2016 15:45:31 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DC90EEA; Mon, 26 Sep 2016 15:45:31 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QFjU8O027752; Mon, 26 Sep 2016 15:45:30 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QFjUpj027751; Mon, 26 Sep 2016 15:45:30 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201609261545.u8QFjUpj027751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Mon, 26 Sep 2016 15:45:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306348 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 15:45:31 -0000 Author: hiren Date: Mon Sep 26 15:45:30 2016 New Revision: 306348 URL: https://svnweb.freebsd.org/changeset/base/306348 Log: Revert r306337. dhw@ reproted a panic which seems related to this and bde@ has raised some issues. Modified: head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Mon Sep 26 15:38:02 2016 (r306347) +++ head/sys/kern/uipc_syscalls.c Mon Sep 26 15:45:30 2016 (r306348) @@ -685,7 +685,7 @@ sys_socketpair(struct thread *td, struct static int sendit(struct thread *td, int s, struct msghdr *mp, int flags) { - struct mbuf *control = NULL; + struct mbuf *control; struct sockaddr *to; int error; @@ -737,8 +737,6 @@ sendit(struct thread *td, int s, struct bad: free(to, M_SONAME); - if (control) - m_freem(control); return (error); } From owner-svn-src-head@freebsd.org Mon Sep 26 15:52:13 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 204E8BE4523; Mon, 26 Sep 2016 15:52:13 +0000 (UTC) (envelope-from hiren@freebsd.org) Received: from mail.strugglingcoder.info (strugglingcoder.info [104.236.146.68]) by mx1.freebsd.org (Postfix) with ESMTP id 12AFD15AD; Mon, 26 Sep 2016 15:52:12 +0000 (UTC) (envelope-from hiren@freebsd.org) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPA id 3167C17FB4; Mon, 26 Sep 2016 08:52:12 -0700 (PDT) Date: Mon, 26 Sep 2016 08:52:12 -0700 From: Hiren Panchasara To: Bruce Evans Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306337 - head/sys/kern Message-ID: <20160926155212.GI96580@strugglingcoder.info> References: <201609261013.u8QADwrV002892@repo.freebsd.org> <20160926203343.S1542@besplex.bde.org> <20160926215837.K1725@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="G3juXO9GfR42w+sw" Content-Disposition: inline In-Reply-To: <20160926215837.K1725@besplex.bde.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 15:52:13 -0000 --G3juXO9GfR42w+sw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On 09/26/16 at 10:18P, Bruce Evans wrote: > On Mon, 26 Sep 2016, Bruce Evans wrote: > Thanks Bruce for your inputs. I've reverted this change with r306348 for now as there was a panic reported with this. I do not have time to deal with it for at least a few days. I'll try to get back to it. If you (or anyone else) want to fix it the right way, please go ahead. Sorry for the trouble. Cheers, Hiren --G3juXO9GfR42w+sw Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJX6UQsXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lyy4H/2c3F8Xmg8x+Rjr8kRqb4ghe 7Ao87l8LQ03Wue86AesisOVu8Ms7e5vEUBtknlv043mg7fVVZY6bgqR8kLFClKGc zUB5cvCfcuvZRB+Z18jKqN5RGYcl1WtYdNLctihR4I8bGCsAyava6tMgXnYA365N hWyxO81nHsIq+zVWVwarTM7msQd8BvKuyhBMCmQ+goIB/lPvqD1YXltsHoIHcuOe nz/bbl9WKJoZt5dNI1c0PfAQu6UfvHgevGXwfArNFvEJHWVFMZl+gpL56E9G4yD1 ObEtYbetMUqJb96KVfQVZzZ7p5Fut0nrJ/rnrDRnnvHaqu6rpAeP9gUcowyJ49I= =oLZf -----END PGP SIGNATURE----- --G3juXO9GfR42w+sw-- From owner-svn-src-head@freebsd.org Mon Sep 26 16:06:51 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 421A9BE4B10; Mon, 26 Sep 2016 16:06:51 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 124821D12; Mon, 26 Sep 2016 16:06:51 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QG6oiu035105; Mon, 26 Sep 2016 16:06:50 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QG6ogU035104; Mon, 26 Sep 2016 16:06:50 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201609261606.u8QG6ogU035104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 26 Sep 2016 16:06:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306349 - head/lib/libc/db/hash X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 16:06:51 -0000 Author: pfg Date: Mon Sep 26 16:06:50 2016 New Revision: 306349 URL: https://svnweb.freebsd.org/changeset/base/306349 Log: hash(3): protect in-memory page when using cross-endianness. When writing out pages in the "other endian" format, make a copy instead of trashing the in-memory one. Obtained from: NetBSD (CVS rev. 1.29) Modified: head/lib/libc/db/hash/hash_page.c Modified: head/lib/libc/db/hash/hash_page.c ============================================================================== --- head/lib/libc/db/hash/hash_page.c Mon Sep 26 15:45:30 2016 (r306348) +++ head/lib/libc/db/hash/hash_page.c Mon Sep 26 16:06:50 2016 (r306349) @@ -572,7 +572,9 @@ __get_page(HTAB *hashp, char *p, u_int32 int __put_page(HTAB *hashp, char *p, u_int32_t bucket, int is_bucket, int is_bitmap) { - int fd, page, size, wsize; + int fd, page, size; + ssize_t wsize; + char pbuf[MAX_BSIZE]; size = hashp->BSIZE; if ((hashp->fp == -1) && open_temp(hashp)) @@ -582,15 +584,18 @@ __put_page(HTAB *hashp, char *p, u_int32 if (hashp->LORDER != BYTE_ORDER) { int i, max; + memcpy(pbuf, p, size); if (is_bitmap) { max = hashp->BSIZE >> 2; /* divide by 4 */ for (i = 0; i < max; i++) - M_32_SWAP(((int *)p)[i]); + M_32_SWAP(((int *)pbuf)[i]); } else { - max = ((u_int16_t *)p)[0] + 2; + uint16_t *bp = (uint16_t *)(void *)pbuf; + max = bp[0] + 2; for (i = 0; i <= max; i++) - M_16_SWAP(((u_int16_t *)p)[i]); + M_16_SWAP(bp[i]); } + p = pbuf; } if (is_bucket) page = BUCKET_TO_PAGE(bucket); From owner-svn-src-head@freebsd.org Mon Sep 26 17:22:45 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2E7CBEA476; Mon, 26 Sep 2016 17:22:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A0A3F80; Mon, 26 Sep 2016 17:22:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QHMiju065275; Mon, 26 Sep 2016 17:22:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QHMi7g065274; Mon, 26 Sep 2016 17:22:44 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609261722.u8QHMi7g065274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 26 Sep 2016 17:22:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306350 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 17:22:45 -0000 Author: kib Date: Mon Sep 26 17:22:44 2016 New Revision: 306350 URL: https://svnweb.freebsd.org/changeset/base/306350 Log: For machines which support PCID but not have INVPCID instruction, i.e. SandyBridge and IvyBridge, correct a race between pmap_activate() and invltlb_pcid_handler(). Reported by and tested by: Slawa Olhovchenkov MFC after: 1 week Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon Sep 26 16:06:50 2016 (r306349) +++ head/sys/amd64/amd64/pmap.c Mon Sep 26 17:22:44 2016 (r306350) @@ -6842,6 +6842,7 @@ pmap_activate_sw(struct thread *td) { pmap_t oldpmap, pmap; uint64_t cached, cr3; + register_t rflags; u_int cpuid; oldpmap = PCPU_GET(curpmap); @@ -6865,16 +6866,43 @@ pmap_activate_sw(struct thread *td) pmap == kernel_pmap, ("non-kernel pmap thread %p pmap %p cpu %d pcid %#x", td, pmap, cpuid, pmap->pm_pcids[cpuid].pm_pcid)); + + /* + * If the INVPCID instruction is not available, + * invltlb_pcid_handler() is used for handle + * invalidate_all IPI, which checks for curpmap == + * smp_tlb_pmap. Below operations sequence has a + * window where %CR3 is loaded with the new pmap's + * PML4 address, but curpmap value is not yet updated. + * This causes invltlb IPI handler, called between the + * updates, to execute as NOP, which leaves stale TLB + * entries. + * + * Note that the most typical use of + * pmap_activate_sw(), from the context switch, is + * immune to this race, because interrupts are + * disabled (while the thread lock is owned), and IPI + * happends after curpmap is updated. Protect other + * callers in a similar way, by disabling interrupts + * around the %cr3 register reload and curpmap + * assignment. + */ + if (!invpcid_works) + rflags = intr_disable(); + if (!cached || (cr3 & ~CR3_PCID_MASK) != pmap->pm_cr3) { load_cr3(pmap->pm_cr3 | pmap->pm_pcids[cpuid].pm_pcid | cached); if (cached) PCPU_INC(pm_save_cnt); } + PCPU_SET(curpmap, pmap); + if (!invpcid_works) + intr_restore(rflags); } else if (cr3 != pmap->pm_cr3) { load_cr3(pmap->pm_cr3); + PCPU_SET(curpmap, pmap); } - PCPU_SET(curpmap, pmap); #ifdef SMP CPU_CLR_ATOMIC(cpuid, &oldpmap->pm_active); #else From owner-svn-src-head@freebsd.org Mon Sep 26 17:25:26 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDFCCBEA544; Mon, 26 Sep 2016 17:25:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD77A1D5; Mon, 26 Sep 2016 17:25:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QHPPe4065411; Mon, 26 Sep 2016 17:25:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QHPPlJ065410; Mon, 26 Sep 2016 17:25:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609261725.u8QHPPlJ065410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 26 Sep 2016 17:25:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306351 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 17:25:27 -0000 Author: kib Date: Mon Sep 26 17:25:25 2016 New Revision: 306351 URL: https://svnweb.freebsd.org/changeset/base/306351 Log: Handle TLB shootdown IPI during the EFI runtime calls, on SandyBridge and IvyBridge machines, which support PCID but do not have INVPCID instruction. MFC after: 1 week Modified: head/sys/amd64/amd64/efirt.c Modified: head/sys/amd64/amd64/efirt.c ============================================================================== --- head/sys/amd64/amd64/efirt.c Mon Sep 26 17:22:44 2016 (r306350) +++ head/sys/amd64/amd64/efirt.c Mon Sep 26 17:25:25 2016 (r306351) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -301,6 +302,17 @@ efi_enter(void) PMAP_UNLOCK(curpmap); return (error); } + + /* + * IPI TLB shootdown handler invltlb_pcid_handler() reloads + * %cr3 from the curpmap->pm_cr3, which would disable runtime + * segments mappings. Block the handler's action by setting + * curpmap to impossible value. See also comment in + * pmap.c:pmap_activate_sw(). + */ + if (pmap_pcid_enabled && !invpcid_works) + PCPU_SET(curpmap, NULL); + load_cr3(VM_PAGE_TO_PHYS(efi_pml4_page) | (pmap_pcid_enabled ? curpmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid : 0)); /* @@ -317,7 +329,9 @@ efi_leave(void) { pmap_t curpmap; - curpmap = PCPU_GET(curpmap); + curpmap = &curproc->p_vmspace->vm_pmap; + if (pmap_pcid_enabled && !invpcid_works) + PCPU_SET(curpmap, curpmap); load_cr3(curpmap->pm_cr3 | (pmap_pcid_enabled ? curpmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid : 0)); if (!pmap_pcid_enabled) From owner-svn-src-head@freebsd.org Mon Sep 26 18:05:04 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6A98BEAF93; Mon, 26 Sep 2016 18:05:04 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A102FC22; Mon, 26 Sep 2016 18:05:04 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 7165410AF7F; Mon, 26 Sep 2016 14:04:58 -0400 (EDT) From: John Baldwin To: Warner Losh Cc: Allan Jude , Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Ed Maste Subject: Re: svn commit: r305353 - in head/sys/boot: i386 i386/boot0 i386/boot2 i386/btx/btx i386/btx/btxldr i386/cdboot i386/gptboot i386/gptzfsboot i386/mbr i386/pmbr i386/pxeldr i386/zfsboot pc98 pc98/boot0 ... Date: Mon, 26 Sep 2016 10:00:32 -0700 Message-ID: <1577832.dOPa6L4zTd@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201609031526.u83FQSCZ017350@repo.freebsd.org> <4af03d4b-5e5e-2482-c21f-538d95e921b6@freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 26 Sep 2016 14:04:58 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 18:05:04 -0000 On Saturday, September 24, 2016 02:56:05 PM Warner Losh wrote: > On Fri, Sep 23, 2016 at 4:17 PM, Allan Jude wrote: > > On 09/03/16 11:26 AM, Warner Losh wrote: > >> Author: imp > >> Date: Sat Sep 3 15:26:28 2016 > >> New Revision: 305353 > >> URL: https://svnweb.freebsd.org/changeset/base/305353 > >> > >> Log: > >> Don't use -N to set the OMAGIC with data and text writeable and data > >> not page aligned. To do this, use the ld script gnu ld installs on my > >> system. > >> > >> This is imperfect: LDFLAGS_BIN and LD_FLAGS_BIN describe different > >> things. The loader script could be better named and take into account > >> other architectures. And having two different mechanisms to do > >> basically the same thing needs study. However, it's blocking forward > >> progress on lld, so I'll work in parallel to sort these out. > >> > >> Differential Revision: https://reviews.freebsd.org/D7409 > >> Reviewed by: emaste > >> > > > > This breaks booting on my Lenovo laptop. The BTX client crashes and > > dumps the registers. > > > > Reverting this commit solved it. > > > > Is there something I can do to help investigate this? > > I assume you bisected all boot loader changes and it fails across this > commit? If not, that's the first step. > > If so, perhaps the place to start is with the dump? The dump is a good place to start, but it would also be useful to know 1) Which stage dies (e.g. can you get into the gptboot/boot2 prompt meaning it it is probably btxldr.S dying trying to parse a.out header from /boot/loader vs are you dying before that point meaning it is in boot1.S or gptldr.S)? 2) Once we know which stage, it would be good to compare the a.out headers and possibly the contents of the relevant binaries. The aforementioned .S files all parse the a.out header in assembly as well as the BTX header (they assume that BTX itself is present in the bits loaded from disk immediately followed by the binary header). That code isn't very flexible and it doesn't seem far fetched for this change to break it. -- John Baldwin From owner-svn-src-head@freebsd.org Mon Sep 26 19:47:13 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B633BEB995; Mon, 26 Sep 2016 19:47:13 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1D783C36; Mon, 26 Sep 2016 19:47:12 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id obrjbfic5MSApobrkbr5u1; Mon, 26 Sep 2016 13:47:05 -0600 X-Authority-Analysis: v=2.2 cv=A9QuBOeG c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=GW1xBdLrtEIA:10 a=WLlH_E4RAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=2LcHFN95hOT3Sw3x7MsA:9 a=CjuIK1q_8ugA:10 a=MvyZFegcHMTCMQET4-L5:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id C7E9247C; Mon, 26 Sep 2016 12:47:02 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id u8QJki29093115; Mon, 26 Sep 2016 12:46:44 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201609261946.u8QJki29093115@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Hiren Panchasara cc: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306337 - head/sys/kern In-Reply-To: Message from Hiren Panchasara of "Mon, 26 Sep 2016 08:52:12 -0700." <20160926155212.GI96580@strugglingcoder.info> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 26 Sep 2016 12:46:44 -0700 X-CMAE-Envelope: MS4wfBfUqmc6qdBrk9IlJiR5bHXnlci4KtPyxtqwP+GB8MozxMBzJWH2t1sRHgUEfBaM8+kjcNmb/BQpVk6//IcW750kTvqFHADbGL2b+8Ujh9dCRXXL5QOe LSlQJ50TnYW3ItyWWitJvF/6umkyQaWNhLRX7RqZWwS3/mAN0fRidnEMXYRL1oEh3WFLo4BO7YQcvFUPZBSge2wG6D+8Le3XLLhMBQUQ5zNwxO/LUZCLZh5O GIXNNdjtgvpppvzWIaown7XiiBWeYsgkeJFY1JKewXo1WarG+JcLXp/IqOY8wQA3SIo25sJjuI69edFTJ3RtFg== X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 19:47:13 -0000 In message <20160926155212.GI96580@strugglingcoder.info>, Hiren Panchasara writ es: > > --G3juXO9GfR42w+sw > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > > On 09/26/16 at 10:18P, Bruce Evans wrote: > > On Mon, 26 Sep 2016, Bruce Evans wrote: > > > > Thanks Bruce for your inputs. I've reverted this change with r306348 for > now as there was a panic reported with this. I do not have time to deal > with it for at least a few days. I'll try to get back to it. If you (or > anyone else) want to fix it the right way, please go ahead. > > Sorry for the trouble. Just as a side note, my firewall panicked repeatedly due to a page fault (useless dumps with corrupted stack captured). My main server had a soft hang which could be interrupted at the console (also had corrupted stack trace) while my testbed machine booted but was dead to the world with no interfaces available. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Mon Sep 26 20:13:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9923FBEA19F; Mon, 26 Sep 2016 20:13:34 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68A13ED8; Mon, 26 Sep 2016 20:13:34 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QKDXCM029823; Mon, 26 Sep 2016 20:13:33 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QKDXFT029822; Mon, 26 Sep 2016 20:13:33 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609262013.u8QKDXFT029822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Mon, 26 Sep 2016 20:13:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306353 - head/lib/libarchive/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 20:13:34 -0000 Author: br Date: Mon Sep 26 20:13:33 2016 New Revision: 306353 URL: https://svnweb.freebsd.org/changeset/base/306353 Log: Increase timeout from 300 (default) to 600 seconds. It takes 6-7 minutes to proceed the test on MIPS64EB. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/lib/libarchive/tests/Makefile Modified: head/lib/libarchive/tests/Makefile ============================================================================== --- head/lib/libarchive/tests/Makefile Mon Sep 26 19:35:41 2016 (r306352) +++ head/lib/libarchive/tests/Makefile Mon Sep 26 20:13:33 2016 (r306353) @@ -6,6 +6,8 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarc ATF_TESTS_SH+= functional_test +TEST_METADATA.functional_test+= timeout="600" + BINDIR= ${TESTSDIR} PROGS+= libarchive_test From owner-svn-src-head@freebsd.org Mon Sep 26 21:25:47 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 856E6BEBB01 for ; Mon, 26 Sep 2016 21:25:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22a.google.com (mail-it0-x22a.google.com [IPv6:2607:f8b0:4001:c0b::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 57F78ED2 for ; Mon, 26 Sep 2016 21:25:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22a.google.com with SMTP id r192so87192347ita.0 for ; Mon, 26 Sep 2016 14:25:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=g7qlcZIsvJcSWGm4eHOnkQm2DiWGwnkXDSyBqrFIX8k=; b=zvZqZeFdoCasrwHLotqYuATJPg1vNe/KMMBa8vjzIXTJazDbPXAsMv4qjAkHYoCOFU b3or56X6r5kd8DHp4kjtcjQM5AV833xYtVhikHL+xSZKrp35RTRenhaD3/m/zVGhilA/ RE41Rw+jh9IXwaEVph5YHyYxB/aStPeWXsK2rzU/ztOTGoebR+cAuqg1bnJv7C8gyrYx XCjaW7+DgfFgifcyAtYaTBJ5Y/IBft6/sxqeloB1ZDWMJg75NC6I0aEh82L/grPiFieE SQfqbVt5Pu5nps+TZ8hAN6Z1BGQ90xLcrtNESJig7zIs/xPJrL09ZAL2kiPz4+6BMK6y enPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=g7qlcZIsvJcSWGm4eHOnkQm2DiWGwnkXDSyBqrFIX8k=; b=MVqMzrpaN9kYbMmjc+tvlVCRiyQ7bVvq3xre2N7V2Xc/7njk+cTmtSQ+J4PgG3/soo /YoWr0G0r/YgcKxcItF2gaZ6LfxUID3RwRQQIqZF/4wk/xfDf5gRWlBlD1bRPAE33efq B5xiSuZXZUfKGSlKOX0C4IAFdqnx7zb+H8XlEPO4SDtKJC+MiKTvPm/mf9P21DDU38oj mG36u3GGuPbPhlhov8SqpF8jHBSkBLmxpbwfkikWV1DoqyGXI1liidbynMYHaCkIIbMs Yzmed/AFyyEkPz3zupMpDsP5o1OVsG+W0T0VCYoXacQ4SItyfwEXT+vcMiAB9rjJcjHt 7/0g== X-Gm-Message-State: AA6/9RlDqZOK0ElHn5h2YXW5fQxK1Hqm5OL6vL8sbLbAzRBNiyUyufz/eHgqrqO08tvBNAYjdFS81xgeJi8JLA== X-Received: by 10.36.152.5 with SMTP id n5mr86311itd.79.1474925146465; Mon, 26 Sep 2016 14:25:46 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Mon, 26 Sep 2016 14:25:46 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: <201609261538.u8QFc2Av023865@repo.freebsd.org> References: <201609261538.u8QFc2Av023865@repo.freebsd.org> From: Warner Losh Date: Mon, 26 Sep 2016 15:25:46 -0600 X-Google-Sender-Auth: rGzWGtGQpxHknTauzkZDBzQmG_U Message-ID: Subject: Re: svn commit: r306347 - head/lib/libc/tests To: Ruslan Bukin Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 21:25:47 -0000 Shouldn't we have MK_SSP == no on mips instead? That's how it's supposed to work. If it isn't, perhaps we should set it like that. Warner On Mon, Sep 26, 2016 at 9:38 AM, Ruslan Bukin wrote: > Author: br > Date: Mon Sep 26 15:38:02 2016 > New Revision: 306347 > URL: https://svnweb.freebsd.org/changeset/base/306347 > > Log: > Don't build SSP tests on MIPS as we dont have stack-protector > supported on this platform. > > Discussed with: brooks > Sponsored by: DARPA, AFRL > Sponsored by: HEIF5 > > Modified: > head/lib/libc/tests/Makefile > > Modified: head/lib/libc/tests/Makefile > ============================================================================== > --- head/lib/libc/tests/Makefile Mon Sep 26 15:30:30 2016 (r306346) > +++ head/lib/libc/tests/Makefile Mon Sep 26 15:38:02 2016 (r306347) > @@ -30,7 +30,8 @@ SUBDIR_DEPEND_tls= tls_dso > TESTS_SUBDIRS+= locale > .endif > > -.if ${MK_SSP} != "no" > +.if ${MK_SSP} != "no" && \ > + ${MACHINE_CPUARCH} != "mips" > TESTS_SUBDIRS+= ssp > .endif > > From owner-svn-src-head@freebsd.org Mon Sep 26 21:28:31 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AD75BEBB9F; Mon, 26 Sep 2016 21:28:31 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F0C110AD; Mon, 26 Sep 2016 21:28:31 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1bodRs-000LpS-BM; Tue, 27 Sep 2016 00:28:28 +0300 Date: Tue, 27 Sep 2016 00:28:28 +0300 From: Slawa Olhovchenkov To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306350 - head/sys/amd64/amd64 Message-ID: <20160926212828.GC6177@zxy.spb.ru> References: <201609261722.u8QHMi7g065274@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201609261722.u8QHMi7g065274@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 21:28:31 -0000 On Mon, Sep 26, 2016 at 05:22:44PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Mon Sep 26 17:22:44 2016 > New Revision: 306350 > URL: https://svnweb.freebsd.org/changeset/base/306350 > > Log: > For machines which support PCID but not have INVPCID instruction, > i.e. SandyBridge and IvyBridge, correct a race between pmap_activate() > and invltlb_pcid_handler(). > > Reported by and tested by: Slawa Olhovchenkov > MFC after: 1 week Thanks! Planed commit to releng? Or SA? From owner-svn-src-head@freebsd.org Mon Sep 26 22:06:20 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97F25BEB6C7; Mon, 26 Sep 2016 22:06:20 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6020076C; Mon, 26 Sep 2016 22:06:20 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QM6J51070988; Mon, 26 Sep 2016 22:06:19 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QM6J5q070986; Mon, 26 Sep 2016 22:06:19 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609262206.u8QM6J5q070986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 26 Sep 2016 22:06:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306355 - in head/sys: dev/atkbdc sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 22:06:20 -0000 Author: gonzo Date: Mon Sep 26 22:06:19 2016 New Revision: 306355 URL: https://svnweb.freebsd.org/changeset/base/306355 Log: Add Elantech trackpad support Elantech trackpads are found in some laptops like the Asus UX31E. They are "synaptics compatible" but use a slightly different protocol. Elantech hardware support is not enabled by default and just like Synaptic or TrackPoint devices it should be enabled by setting tunable, in this case hw.psm.elantech_support, to non-zero value PR: 205690 Submitted by: Vladimir Kondratyev MFC after: 1 week Modified: head/sys/dev/atkbdc/psm.c head/sys/sys/mouse.h Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Mon Sep 26 20:26:19 2016 (r306354) +++ head/sys/dev/atkbdc/psm.c Mon Sep 26 22:06:19 2016 (r306355) @@ -81,6 +81,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -161,40 +162,6 @@ typedef struct packetbuf { #define PSM_PACKETQUEUE 128 #endif -enum { - SYNAPTICS_SYSCTL_MIN_PRESSURE, - SYNAPTICS_SYSCTL_MAX_PRESSURE, - SYNAPTICS_SYSCTL_MAX_WIDTH, - SYNAPTICS_SYSCTL_MARGIN_TOP, - SYNAPTICS_SYSCTL_MARGIN_RIGHT, - SYNAPTICS_SYSCTL_MARGIN_BOTTOM, - SYNAPTICS_SYSCTL_MARGIN_LEFT, - SYNAPTICS_SYSCTL_NA_TOP, - SYNAPTICS_SYSCTL_NA_RIGHT, - SYNAPTICS_SYSCTL_NA_BOTTOM, - SYNAPTICS_SYSCTL_NA_LEFT, - SYNAPTICS_SYSCTL_WINDOW_MIN, - SYNAPTICS_SYSCTL_WINDOW_MAX, - SYNAPTICS_SYSCTL_MULTIPLICATOR, - SYNAPTICS_SYSCTL_WEIGHT_CURRENT, - SYNAPTICS_SYSCTL_WEIGHT_PREVIOUS, - SYNAPTICS_SYSCTL_WEIGHT_PREVIOUS_NA, - SYNAPTICS_SYSCTL_WEIGHT_LEN_SQUARED, - SYNAPTICS_SYSCTL_DIV_MIN, - SYNAPTICS_SYSCTL_DIV_MAX, - SYNAPTICS_SYSCTL_DIV_MAX_NA, - SYNAPTICS_SYSCTL_DIV_LEN, - SYNAPTICS_SYSCTL_TAP_MAX_DELTA, - SYNAPTICS_SYSCTL_TAP_MIN_QUEUE, - SYNAPTICS_SYSCTL_TAPHOLD_TIMEOUT, - SYNAPTICS_SYSCTL_VSCROLL_HOR_AREA, - SYNAPTICS_SYSCTL_VSCROLL_VER_AREA, - SYNAPTICS_SYSCTL_VSCROLL_MIN_DELTA, - SYNAPTICS_SYSCTL_VSCROLL_DIV_MIN, - SYNAPTICS_SYSCTL_VSCROLL_DIV_MAX, - SYNAPTICS_SYSCTL_TOUCHPAD_OFF -}; - typedef struct synapticsinfo { struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; @@ -231,6 +198,11 @@ typedef struct synapticsinfo { int vscroll_div_min; int vscroll_div_max; int touchpad_off; + int softbuttons_y; + int softbutton2_x; + int softbutton3_x; + int max_x; + int max_y; } synapticsinfo_t; typedef struct synapticspacket { @@ -246,22 +218,29 @@ typedef struct synapticspacket { ((synhw).infoMajor > (major) || \ ((synhw).infoMajor == (major) && (synhw).infoMinor >= (minor))) -typedef struct synapticsaction { +typedef struct smoother { synapticspacket_t queue[SYNAPTICS_PACKETQUEUE]; int queue_len; int queue_cursor; - int window_min; int start_x; int start_y; int avg_dx; int avg_dy; int squelch_x; int squelch_y; + int is_fuzzy; + int active; +} smoother_t; + +typedef struct gesture { + int window_min; int fingers_nb; int tap_button; int in_taphold; int in_vscroll; -} synapticsaction_t; + int zmax; /* maximum pressure value */ + struct timeval taptimeout; /* tap timeout for touchpads */ +} gesture_t; enum { TRACKPOINT_SYSCTL_SENSITIVITY, @@ -295,6 +274,100 @@ typedef struct trackpointinfo { int skipback; } trackpointinfo_t; +typedef struct finger { + int x; + int y; + int p; + int w; + int flags; +} finger_t; +#define PSM_FINGERS 2 /* # of processed fingers */ +#define PSM_FINGER_IS_PEN (1<<0) +#define PSM_FINGER_FUZZY (1<<1) +#define PSM_FINGER_DEFAULT_P tap_threshold +#define PSM_FINGER_DEFAULT_W 1 +#define PSM_FINGER_IS_SET(f) ((f).x != -1 && (f).y != -1 && (f).p != 0) +#define PSM_FINGER_RESET(f) do { \ + (f) = (finger_t) { .x = -1, .y = -1, .p = 0, .w = 0, .flags = 0 }; \ +} while (0) + +typedef struct elantechhw { + int hwversion; + int fwversion; + int sizex; + int sizey; + int dpmmx; + int dpmmy; + int ntracesx; + int ntracesy; + int issemimt; + int isclickpad; + int hascrc; + int hastrackpoint; + int haspressure; +} elantechhw_t; + +/* minimum versions supported by this driver */ +#define ELANTECH_HW_IS_V1(fwver) ((fwver) < 0x020030 || (fwver) == 0x020600) + +#define ELANTECH_MAGIC(magic) \ + ((magic)[0] == 0x3c && (magic)[1] == 0x03 && \ + ((magic)[2] == 0xc8 || (magic)[2] == 0x00)) + +#define ELANTECH_FW_ID 0x00 +#define ELANTECH_FW_VERSION 0x01 +#define ELANTECH_CAPABILITIES 0x02 +#define ELANTECH_SAMPLE 0x03 +#define ELANTECH_RESOLUTION 0x04 +#define ELANTECH_REG_READ 0x10 +#define ELANTECH_REG_WRITE 0x11 +#define ELANTECH_REG_RDWR 0x00 +#define ELANTECH_CUSTOM_CMD 0xf8 + +#define ELANTECH_MAX_FINGERS PSM_FINGERS + +#define ELANTECH_FINGER_SET_XYP(pb) (finger_t) { \ + .x = (((pb)->ipacket[1] & 0x0f) << 8) | (pb)->ipacket[2], \ + .y = (((pb)->ipacket[4] & 0x0f) << 8) | (pb)->ipacket[5], \ + .p = ((pb)->ipacket[1] & 0xf0) | (((pb)->ipacket[4] >> 4) & 0x0f), \ + .w = PSM_FINGER_DEFAULT_W, \ + .flags = 0 \ +} + +enum { + ELANTECH_PKT_NOP, + ELANTECH_PKT_TRACKPOINT, + ELANTECH_PKT_V2_COMMON, + ELANTECH_PKT_V2_2FINGER, + ELANTECH_PKT_V3, + ELANTECH_PKT_V4_STATUS, + ELANTECH_PKT_V4_HEAD, + ELANTECH_PKT_V4_MOTION +}; + +#define ELANTECH_PKT_IS_TRACKPOINT(pb) (((pb)->ipacket[3] & 0x0f) == 0x06) +#define ELANTECH_PKT_IS_DEBOUNCE(pb, hwversion) ((hwversion) == 4 ? 0 : \ + (pb)->ipacket[0] == ((hwversion) == 2 ? 0x84 : 0xc4) && \ + (pb)->ipacket[1] == 0xff && (pb)->ipacket[2] == 0xff && \ + (pb)->ipacket[3] == 0x02 && (pb)->ipacket[4] == 0xff && \ + (pb)->ipacket[5] == 0xff) +#define ELANTECH_PKT_IS_V2(pb) \ + (((pb)->ipacket[0] & 0x0c) == 0x04 && ((pb)->ipacket[3] & 0x0f) == 0x02) +#define ELANTECH_PKT_IS_V3_HEAD(pb, hascrc) ((hascrc) ? \ + ((pb)->ipacket[3] & 0x09) == 0x08 : \ + ((pb)->ipacket[0] & 0x0c) == 0x04 && ((pb)->ipacket[3] & 0xcf) == 0x02) +#define ELANTECH_PKT_IS_V3_TAIL(pb, hascrc) ((hascrc) ? \ + ((pb)->ipacket[3] & 0x09) == 0x09 : \ + ((pb)->ipacket[0] & 0x0c) == 0x0c && ((pb)->ipacket[3] & 0xce) == 0x0c) +#define ELANTECH_PKT_IS_V4(pb, hascrc) ((hascrc) ? \ + ((pb)->ipacket[3] & 0x08) == 0x00 : \ + ((pb)->ipacket[0] & 0x0c) == 0x04 && ((pb)->ipacket[3] & 0x1c) == 0x10) + +typedef struct elantechaction { + finger_t fingers[ELANTECH_MAX_FINGERS]; + int mask; +} elantechaction_t; + /* driver control block */ struct psm_softc { /* Driver status information */ int unit; @@ -308,7 +381,10 @@ struct psm_softc { /* Driver status inf mousehw_t hw; /* hardware information */ synapticshw_t synhw; /* Synaptics hardware information */ synapticsinfo_t syninfo; /* Synaptics configuration */ - synapticsaction_t synaction; /* Synaptics action context */ + smoother_t smoother[PSM_FINGERS]; /* Motion smoothing */ + gesture_t gesture; /* Gesture context */ + elantechhw_t elanhw; /* Elantech hardware information */ + elantechaction_t elanaction; /* Elantech action context */ int tphw; /* TrackPoint hardware information */ trackpointinfo_t tpinfo; /* TrackPoint configuration */ mousemode_t mode; /* operation mode */ @@ -324,13 +400,13 @@ struct psm_softc { /* Driver status inf int xaverage; /* average X position */ int yaverage; /* average Y position */ int squelch; /* level to filter movement at low speed */ - int zmax; /* maximum pressure value for touchpads */ int syncerrors; /* # of bytes discarded to synchronize */ int pkterrors; /* # of packets failed during quaranteen. */ struct timeval inputtimeout; struct timeval lastsoftintr; /* time of last soft interrupt */ struct timeval lastinputerr; /* time last sync error happened */ - struct timeval taptimeout; /* tap timeout for touchpads */ + struct timeval idletimeout; + packetbuf_t idlepacket; /* packet to send after idle timeout */ int watchdog; /* watchdog timer flag */ struct callout callout; /* watchdog timer call out */ struct callout softcallout; /* buffer timer call out */ @@ -389,6 +465,9 @@ TUNABLE_INT("hw.psm.synaptics_support", static int trackpoint_support = 0; TUNABLE_INT("hw.psm.trackpoint_support", &trackpoint_support); +static int elantech_support = 0; +TUNABLE_INT("hw.psm.elantech_support", &elantech_support); + static int verbose = PSM_DEBUG; TUNABLE_INT("debug.psm.loglevel", &verbose); @@ -411,6 +490,44 @@ typedef struct old_mousemode { int accelfactor; } old_mousemode_t; +#define SYN_OFFSET(field) offsetof(struct psm_softc, syninfo.field) +enum { + SYNAPTICS_SYSCTL_MIN_PRESSURE = SYN_OFFSET(min_pressure), + SYNAPTICS_SYSCTL_MAX_PRESSURE = SYN_OFFSET(max_pressure), + SYNAPTICS_SYSCTL_MAX_WIDTH = SYN_OFFSET(max_width), + SYNAPTICS_SYSCTL_MARGIN_TOP = SYN_OFFSET(margin_top), + SYNAPTICS_SYSCTL_MARGIN_RIGHT = SYN_OFFSET(margin_right), + SYNAPTICS_SYSCTL_MARGIN_BOTTOM = SYN_OFFSET(margin_bottom), + SYNAPTICS_SYSCTL_MARGIN_LEFT = SYN_OFFSET(margin_left), + SYNAPTICS_SYSCTL_NA_TOP = SYN_OFFSET(na_top), + SYNAPTICS_SYSCTL_NA_RIGHT = SYN_OFFSET(na_right), + SYNAPTICS_SYSCTL_NA_BOTTOM = SYN_OFFSET(na_bottom), + SYNAPTICS_SYSCTL_NA_LEFT = SYN_OFFSET(na_left), + SYNAPTICS_SYSCTL_WINDOW_MIN = SYN_OFFSET(window_min), + SYNAPTICS_SYSCTL_WINDOW_MAX = SYN_OFFSET(window_max), + SYNAPTICS_SYSCTL_MULTIPLICATOR = SYN_OFFSET(multiplicator), + SYNAPTICS_SYSCTL_WEIGHT_CURRENT = SYN_OFFSET(weight_current), + SYNAPTICS_SYSCTL_WEIGHT_PREVIOUS = SYN_OFFSET(weight_previous), + SYNAPTICS_SYSCTL_WEIGHT_PREVIOUS_NA = SYN_OFFSET(weight_previous_na), + SYNAPTICS_SYSCTL_WEIGHT_LEN_SQUARED = SYN_OFFSET(weight_len_squared), + SYNAPTICS_SYSCTL_DIV_MIN = SYN_OFFSET(div_min), + SYNAPTICS_SYSCTL_DIV_MAX = SYN_OFFSET(div_max), + SYNAPTICS_SYSCTL_DIV_MAX_NA = SYN_OFFSET(div_max_na), + SYNAPTICS_SYSCTL_DIV_LEN = SYN_OFFSET(div_len), + SYNAPTICS_SYSCTL_TAP_MAX_DELTA = SYN_OFFSET(tap_max_delta), + SYNAPTICS_SYSCTL_TAP_MIN_QUEUE = SYN_OFFSET(tap_min_queue), + SYNAPTICS_SYSCTL_TAPHOLD_TIMEOUT = SYN_OFFSET(taphold_timeout), + SYNAPTICS_SYSCTL_VSCROLL_HOR_AREA = SYN_OFFSET(vscroll_hor_area), + SYNAPTICS_SYSCTL_VSCROLL_VER_AREA = SYN_OFFSET(vscroll_ver_area), + SYNAPTICS_SYSCTL_VSCROLL_MIN_DELTA = SYN_OFFSET(vscroll_min_delta), + SYNAPTICS_SYSCTL_VSCROLL_DIV_MIN = SYN_OFFSET(vscroll_div_min), + SYNAPTICS_SYSCTL_VSCROLL_DIV_MAX = SYN_OFFSET(vscroll_div_max), + SYNAPTICS_SYSCTL_TOUCHPAD_OFF = SYN_OFFSET(touchpad_off), + SYNAPTICS_SYSCTL_SOFTBUTTONS_Y = SYN_OFFSET(softbuttons_y), + SYNAPTICS_SYSCTL_SOFTBUTTON2_X = SYN_OFFSET(softbutton2_x), + SYNAPTICS_SYSCTL_SOFTBUTTON3_X = SYN_OFFSET(softbutton3_x), +}; + /* packet formatting function */ typedef int packetfunc_t(struct psm_softc *, u_char *, int *, int, mousestatus_t *); @@ -446,6 +563,7 @@ static int doopen(struct psm_softc *, in static int reinitialize(struct psm_softc *, int); static char *model_name(int); static void psmsoftintr(void *); +static void psmsoftintridle(void *); static void psmintr(void *); static void psmtimeout(void *); static int timeelapsed(const struct timeval *, int, int, @@ -458,6 +576,13 @@ static int proc_synaptics(struct psm_sof mousestatus_t *, int *, int *, int *); static void proc_versapad(struct psm_softc *, packetbuf_t *, mousestatus_t *, int *, int *, int *); +static int proc_elantech(struct psm_softc *, packetbuf_t *, + mousestatus_t *, int *, int *, int *); +static int psmpalmdetect(struct psm_softc *, finger_t *, int); +static void psmgestures(struct psm_softc *, finger_t *, int, + mousestatus_t *); +static void psmsmoother(struct psm_softc *, finger_t *, int, + mousestatus_t *, int *, int *); static int tame_mouse(struct psm_softc *, packetbuf_t *, mousestatus_t *, u_char *); @@ -480,6 +605,7 @@ static probefunc_t enable_mmanplus; static probefunc_t enable_synaptics; static probefunc_t enable_trackpoint; static probefunc_t enable_versapad; +static probefunc_t enable_elantech; static void set_trackpoint_parameters(struct psm_softc *sc); static void synaptics_passthrough_on(struct psm_softc *sc); @@ -511,6 +637,8 @@ static struct { 0xc8, MOUSE_4DPLUS_PACKETSIZE, enable_4dplus }, { MOUSE_MODEL_SYNAPTICS, /* Synaptics Touchpad */ 0xc0, MOUSE_SYNAPTICS_PACKETSIZE, enable_synaptics }, + { MOUSE_MODEL_ELANTECH, /* Elantech Touchpad */ + 0x04, MOUSE_ELANTECH_PACKETSIZE, enable_elantech }, { MOUSE_MODEL_INTELLI, /* Microsoft IntelliMouse */ 0x08, MOUSE_PS2INTELLI_PACKETSIZE, enable_msintelli }, { MOUSE_MODEL_GLIDEPOINT, /* ALPS GlidePoint */ @@ -762,6 +890,7 @@ model_name(int model) { MOUSE_MODEL_4DPLUS, "4D+ Mouse" }, { MOUSE_MODEL_SYNAPTICS, "Synaptics Touchpad" }, { MOUSE_MODEL_TRACKPOINT, "IBM/Lenovo TrackPoint" }, + { MOUSE_MODEL_ELANTECH, "Elantech Touchpad" }, { MOUSE_MODEL_GENERIC, "Generic PS/2 mouse" }, { MOUSE_MODEL_UNKNOWN, "Unknown" }, }; @@ -1504,6 +1633,7 @@ psmattach(device_t dev) case MOUSE_MODEL_SYNAPTICS: case MOUSE_MODEL_GLIDEPOINT: case MOUSE_MODEL_VERSAPAD: + case MOUSE_MODEL_ELANTECH: sc->config |= PSM_CONFIG_INITAFTERSUSPEND; break; default: @@ -1512,6 +1642,11 @@ psmattach(device_t dev) break; } + /* Elantech trackpad`s sync bit differs from touchpad`s one */ + if (sc->hw.model == MOUSE_MODEL_ELANTECH && + (sc->elanhw.hascrc || sc->elanhw.hastrackpoint)) + sc->config |= PSM_CONFIG_NOCHECKSYNC; + if (!verbose) printf("psm%d: model %s, device ID %d\n", unit, model_name(sc->hw.model), sc->hw.hwid & 0x00ff); @@ -2165,20 +2300,6 @@ psmioctl(struct cdev *dev, u_long cmd, c (*(int *)addr > PSM_LEVEL_MAX)) return (EINVAL); sc->mode.level = *(int *)addr; - - if (sc->hw.model == MOUSE_MODEL_SYNAPTICS) { - /* - * If we are entering PSM_LEVEL_NATIVE, we want to - * enable sending of "extended W mode" packets to - * userland. Reset the mode of the touchpad so that the - * change in the level is picked up. - */ - error = block_mouse_data(sc, &command_byte); - if (error) - return (error); - synaptics_set_mode(sc, synaptics_preferred_mode(sc)); - unblock_mouse_data(sc, command_byte); - } break; case MOUSE_GETSTATUS: @@ -2627,7 +2748,8 @@ proc_synaptics(struct psm_softc *sc, pac { static int touchpad_buttons; static int guest_buttons; - int w, x0, y0; + static finger_t f[PSM_FINGERS]; + int w, id, nfingers, ewcode; /* TouchPad PS/2 absolute mode message format with capFourButtons: * @@ -2683,6 +2805,7 @@ proc_synaptics(struct psm_softc *sc, pac return (-1); *x = *y = 0; + ms->button = ms->obutton; /* * Pressure value. @@ -2718,34 +2841,79 @@ proc_synaptics(struct psm_softc *sc, pac w = 4; } - /* - * Handle packets from the guest device. See: - * Synaptics PS/2 TouchPad Interfacing Guide, Section 5.1 - */ - if (w == 3 && sc->synhw.capPassthrough) { - *x = ((pb->ipacket[1] & 0x10) ? - pb->ipacket[4] - 256 : pb->ipacket[4]); - *y = ((pb->ipacket[1] & 0x20) ? - pb->ipacket[5] - 256 : pb->ipacket[5]); - *z = 0; + switch (w) { + case 3: + /* + * Handle packets from the guest device. See: + * Synaptics PS/2 TouchPad Interfacing Guide, Section 5.1 + */ + if (sc->synhw.capPassthrough) { + *x = ((pb->ipacket[1] & 0x10) ? + pb->ipacket[4] - 256 : pb->ipacket[4]); + *y = ((pb->ipacket[1] & 0x20) ? + pb->ipacket[5] - 256 : pb->ipacket[5]); + *z = 0; + + guest_buttons = 0; + if (pb->ipacket[1] & 0x01) + guest_buttons |= MOUSE_BUTTON1DOWN; + if (pb->ipacket[1] & 0x04) + guest_buttons |= MOUSE_BUTTON2DOWN; + if (pb->ipacket[1] & 0x02) + guest_buttons |= MOUSE_BUTTON3DOWN; - guest_buttons = 0; - if (pb->ipacket[1] & 0x01) - guest_buttons |= MOUSE_BUTTON1DOWN; - if (pb->ipacket[1] & 0x04) - guest_buttons |= MOUSE_BUTTON2DOWN; - if (pb->ipacket[1] & 0x02) - guest_buttons |= MOUSE_BUTTON3DOWN; + ms->button = touchpad_buttons | guest_buttons; + } + goto SYNAPTICS_END; - ms->button = touchpad_buttons | guest_buttons; + case 2: + /* Handle Extended W mode packets */ + ewcode = (pb->ipacket[5] & 0xf0) >> 4; +#if PSM_FINGERS > 1 + switch (ewcode) { + case 1: + /* Secondary finger */ + if (sc->synhw.capAdvancedGestures) + f[1] = (finger_t) { + .x = (((pb->ipacket[4] & 0x0f) << 8) | + pb->ipacket[1]) << 1, + .y = (((pb->ipacket[4] & 0xf0) << 4) | + pb->ipacket[2]) << 1, + .p = ((pb->ipacket[3] & 0x30) | + (pb->ipacket[5] & 0x0f)) << 1, + .w = PSM_FINGER_DEFAULT_W, + .flags = PSM_FINGER_FUZZY, + }; + else if (sc->synhw.capReportsV) + f[1] = (finger_t) { + .x = (((pb->ipacket[4] & 0x0f) << 8) | + (pb->ipacket[1] & 0xfe)) << 1, + .y = (((pb->ipacket[4] & 0xf0) << 4) | + (pb->ipacket[2] & 0xfe)) << 1, + .p = ((pb->ipacket[3] & 0x30) | + (pb->ipacket[5] & 0x0e)) << 1, + .w = (((pb->ipacket[5] & 0x01) << 2) | + ((pb->ipacket[2] & 0x01) << 1) | + (pb->ipacket[1] & 0x01)) + 8, + .flags = PSM_FINGER_FUZZY, + }; + default: + break; + } +#endif goto SYNAPTICS_END; + + case 1: + case 0: + nfingers = w + 2; + break; + + default: + nfingers = 1; } - if (sc->syninfo.touchpad_off) { - *x = *y = *z = 0; - ms->button = ms->obutton; + if (sc->syninfo.touchpad_off) goto SYNAPTICS_END; - } /* Button presses */ touchpad_buttons = 0; @@ -2764,6 +2932,10 @@ proc_synaptics(struct psm_softc *sc, pac /* Middle Button */ if ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x01) touchpad_buttons |= MOUSE_BUTTON2DOWN; + } else if (sc->synhw.capExtended && sc->synhw.capClickPad) { + /* ClickPad Button */ + if ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x01) + touchpad_buttons = MOUSE_BUTTON1DOWN; } else if (sc->synhw.capExtended && (sc->synhw.nExtendedButtons > 0)) { /* Extended Buttons */ if ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x02) { @@ -2806,7 +2978,7 @@ proc_synaptics(struct psm_softc *sc, pac pb->ipacket[4] &= ~(mask); pb->ipacket[5] &= ~(mask); } else if (!sc->syninfo.directional_scrolls && - !sc->synaction.in_vscroll) { + !sc->gesture.in_vscroll) { /* * Keep reporting MOUSE DOWN until we get a new packet * indicating otherwise. @@ -2814,93 +2986,179 @@ proc_synaptics(struct psm_softc *sc, pac touchpad_buttons |= sc->extended_buttons; } } - /* Handle ClickPad. */ - if (sc->synhw.capClickPad && - ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x01)) - touchpad_buttons |= MOUSE_BUTTON1DOWN; + + if (sc->synhw.capReportsV && nfingers > 1) + f[0] = (finger_t) { + .x = ((pb->ipacket[3] & 0x10) << 8) | + ((pb->ipacket[1] & 0x0f) << 8) | + (pb->ipacket[4] & 0xfd), + .y = ((pb->ipacket[3] & 0x20) << 7) | + ((pb->ipacket[1] & 0xf0) << 4) | + (pb->ipacket[5] & 0xfd), + .p = *z & 0xfe, + .w = (((pb->ipacket[2] & 0x01) << 2) | + (pb->ipacket[5] & 0x02) | + ((pb->ipacket[4] & 0x02) >> 1)) + 8, + .flags = PSM_FINGER_FUZZY, + }; + else + f[0] = (finger_t) { + .x = ((pb->ipacket[3] & 0x10) << 8) | + ((pb->ipacket[1] & 0x0f) << 8) | + pb->ipacket[4], + .y = ((pb->ipacket[3] & 0x20) << 7) | + ((pb->ipacket[1] & 0xf0) << 4) | + pb->ipacket[5], + .p = *z, + .w = w, + .flags = nfingers > 1 ? PSM_FINGER_FUZZY : 0, + }; + + /* Ignore hovering and unmeasurable touches */ + if (f[0].p < sc->syninfo.min_pressure || f[0].x < 2) + nfingers = 0; + + for (id = 0; id < PSM_FINGERS; id++) + if (id >= nfingers) + PSM_FINGER_RESET(f[id]); ms->button = touchpad_buttons | guest_buttons; + /* Palm detection doesn't terminate the current action. */ + if (!psmpalmdetect(sc, &f[0], nfingers)) { + psmgestures(sc, &f[0], nfingers, ms); + for (id = 0; id < PSM_FINGERS; id++) + psmsmoother(sc, &f[id], id, ms, x, y); + } else { + VLOG(2, (LOG_DEBUG, "synaptics: palm detected! (%d)\n", f[0].w)); + } + +SYNAPTICS_END: + /* + * Use the extra buttons as a scrollwheel + * + * XXX X.Org uses the Z axis for vertical wheel only, + * whereas moused(8) understands special values to differ + * vertical and horizontal wheels. + * + * xf86-input-mouse needs therefore a small patch to + * understand these special values. Without it, the + * horizontal wheel acts as a vertical wheel in X.Org. + * + * That's why the horizontal wheel is disabled by + * default for now. + */ + if (ms->button & MOUSE_BUTTON4DOWN) + *z = -1; + else if (ms->button & MOUSE_BUTTON5DOWN) + *z = 1; + else if (ms->button & MOUSE_BUTTON6DOWN) + *z = -2; + else if (ms->button & MOUSE_BUTTON7DOWN) + *z = 2; + else + *z = 0; + ms->button &= ~(MOUSE_BUTTON4DOWN | MOUSE_BUTTON5DOWN | + MOUSE_BUTTON6DOWN | MOUSE_BUTTON7DOWN); + + return (0); +} + +static int +psmpalmdetect(struct psm_softc *sc, finger_t *f, int nfingers) +{ + if (!( + ((sc->synhw.capMultiFinger || + sc->synhw.capAdvancedGestures) && nfingers > 1) || + (sc->synhw.capPalmDetect && f->w <= sc->syninfo.max_width) || + (!sc->synhw.capPalmDetect && f->p <= sc->syninfo.max_pressure) || + (sc->synhw.capPen && f->flags & PSM_FINGER_IS_PEN))) { + /* + * We consider the packet irrelevant for the current + * action when: + * - the width isn't comprised in: + * [1; max_width] + * - the pressure isn't comprised in: + * [min_pressure; max_pressure] + * - pen aren't supported but PSM_FINGER_IS_PEN is set + */ + return (1); + } + return (0); +} + +static void +psmgestures(struct psm_softc *sc, finger_t *fingers, int nfingers, + mousestatus_t *ms) +{ + smoother_t *smoother; + gesture_t *gest; + finger_t *f; + int y_ok, center_button, center_x, right_button, right_x, i; + + f = &fingers[0]; + smoother = &sc->smoother[0]; + gest = &sc->gesture; + + /* Find first active finger. */ + if (nfingers > 0) { + for (i = 0; i < PSM_FINGERS; i++) { + if (PSM_FINGER_IS_SET(fingers[i])) { + f = &fingers[i]; + smoother = &sc->smoother[i]; + break; + } + } + } + /* * Check pressure to detect a real wanted action on the * touchpad. */ - if (*z >= sc->syninfo.min_pressure) { - synapticsaction_t *synaction; - int cursor, peer, window; - int dx, dy, dxp, dyp; - int max_width, max_pressure; + if (f->p >= sc->syninfo.min_pressure) { + int x0, y0; + int dxp, dyp; + int start_x, start_y; + int queue_len; int margin_top, margin_right, margin_bottom, margin_left; - int na_top, na_right, na_bottom, na_left; int window_min, window_max; - int multiplicator; - int weight_current, weight_previous, weight_len_squared; - int div_min, div_max, div_len; int vscroll_hor_area, vscroll_ver_area; int two_finger_scroll; - int len, weight_prev_x, weight_prev_y; - int div_max_x, div_max_y, div_x, div_y; - int exiting_scroll; + int max_x, max_y; /* Read sysctl. */ /* XXX Verify values? */ - max_width = sc->syninfo.max_width; - max_pressure = sc->syninfo.max_pressure; margin_top = sc->syninfo.margin_top; margin_right = sc->syninfo.margin_right; margin_bottom = sc->syninfo.margin_bottom; margin_left = sc->syninfo.margin_left; - na_top = sc->syninfo.na_top; - na_right = sc->syninfo.na_right; - na_bottom = sc->syninfo.na_bottom; - na_left = sc->syninfo.na_left; window_min = sc->syninfo.window_min; window_max = sc->syninfo.window_max; - multiplicator = sc->syninfo.multiplicator; - weight_current = sc->syninfo.weight_current; - weight_previous = sc->syninfo.weight_previous; - weight_len_squared = sc->syninfo.weight_len_squared; - div_min = sc->syninfo.div_min; - div_max = sc->syninfo.div_max; - div_len = sc->syninfo.div_len; vscroll_hor_area = sc->syninfo.vscroll_hor_area; vscroll_ver_area = sc->syninfo.vscroll_ver_area; two_finger_scroll = sc->syninfo.two_finger_scroll; - - exiting_scroll = 0; - - /* Palm detection. */ - if (!( - ((sc->synhw.capMultiFinger || - sc->synhw.capAdvancedGestures) && (w == 0 || w == 1)) || - (sc->synhw.capPalmDetect && w >= 4 && w <= max_width) || - (!sc->synhw.capPalmDetect && *z <= max_pressure) || - (sc->synhw.capPen && w == 2))) { - /* - * We consider the packet irrelevant for the current - * action when: - * - the width isn't comprised in: - * [4; max_width] - * - the pressure isn't comprised in: - * [min_pressure; max_pressure] - * - pen aren't supported but w is 2 - * - * Note that this doesn't terminate the current action. - */ - VLOG(2, (LOG_DEBUG, - "synaptics: palm detected! (%d)\n", w)); - goto SYNAPTICS_END; - } + max_x = sc->syninfo.max_x; + max_y = sc->syninfo.max_y; /* Read current absolute position. */ - x0 = ((pb->ipacket[3] & 0x10) << 8) | - ((pb->ipacket[1] & 0x0f) << 8) | - pb->ipacket[4]; - y0 = ((pb->ipacket[3] & 0x20) << 7) | - ((pb->ipacket[1] & 0xf0) << 4) | - pb->ipacket[5]; + x0 = f->x; + y0 = f->y; + + /* + * Limit the coordinates to the specified margins because + * this area isn't very reliable. + */ + if (x0 <= margin_left) + x0 = margin_left; + else if (x0 >= max_x - margin_right) + x0 = max_x - margin_right; + if (y0 <= margin_bottom) + y0 = margin_bottom; + else if (y0 >= max_y - margin_top) + y0 = max_y - margin_top; - synaction = &(sc->synaction); + VLOG(3, (LOG_DEBUG, "synaptics: ipacket: [%d, %d], %d, %d\n", + x0, y0, f->p, f->w)); /* * If the action is just beginning, init the structure and @@ -2909,107 +3167,82 @@ proc_synaptics(struct psm_softc *sc, pac if (!(sc->flags & PSM_FLAGS_FINGERDOWN)) { VLOG(3, (LOG_DEBUG, "synaptics: ----\n")); - /* Store the first point of this action. */ - synaction->start_x = x0; - synaction->start_y = y0; - dx = dy = 0; - /* Initialize queue. */ - synaction->queue_cursor = SYNAPTICS_PACKETQUEUE; - synaction->queue_len = 0; - synaction->window_min = window_min; - - /* Reset average. */ - synaction->avg_dx = 0; - synaction->avg_dy = 0; - - /* Reset squelch. */ - synaction->squelch_x = 0; - synaction->squelch_y = 0; + gest->window_min = window_min; /* Reset pressure peak. */ - sc->zmax = 0; + gest->zmax = 0; /* Reset fingers count. */ - synaction->fingers_nb = 0; + gest->fingers_nb = 0; /* Reset virtual scrolling state. */ - synaction->in_vscroll = 0; + gest->in_vscroll = 0; /* Compute tap timeout. */ - sc->taptimeout.tv_sec = tap_timeout / 1000000; - sc->taptimeout.tv_usec = tap_timeout % 1000000; - timevaladd(&sc->taptimeout, &sc->lastsoftintr); + gest->taptimeout.tv_sec = tap_timeout / 1000000; + gest->taptimeout.tv_usec = tap_timeout % 1000000; + timevaladd(&gest->taptimeout, &sc->lastsoftintr); sc->flags |= PSM_FLAGS_FINGERDOWN; + + /* Smoother has not been reset yet */ + queue_len = 1; + start_x = x0; + start_y = y0; } else { - /* Calculate the current delta. */ - cursor = synaction->queue_cursor; - dx = x0 - synaction->queue[cursor].x; - dy = y0 - synaction->queue[cursor].y; + queue_len = smoother->queue_len + 1; + start_x = smoother->start_x; + start_y = smoother->start_y; } - /* If in tap-hold, add the recorded button. */ - if (synaction->in_taphold) - ms->button |= synaction->tap_button; - - /* - * From now on, we can use the SYNAPTICS_END label to skip - * the current packet. - */ - - /* - * Limit the coordinates to the specified margins because - * this area isn't very reliable. - */ - if (x0 <= margin_left) - x0 = margin_left; - else if (x0 >= 6143 - margin_right) - x0 = 6143 - margin_right; - if (y0 <= margin_bottom) - y0 = margin_bottom; - else if (y0 >= 6143 - margin_top) - y0 = 6143 - margin_top; + /* Process ClickPad softbuttons */ + if (sc->synhw.capClickPad && ms->button & MOUSE_BUTTON1DOWN) { + y_ok = sc->syninfo.softbuttons_y >= 0 ? + start_y < sc->syninfo.softbuttons_y : + start_y > max_y - sc->syninfo.softbuttons_y; + + center_button = MOUSE_BUTTON2DOWN; + center_x = sc->syninfo.softbutton2_x; + right_button = MOUSE_BUTTON3DOWN; + right_x = sc->syninfo.softbutton3_x; + + if (center_x > 0 && right_x > 0 && center_x > right_x) { + center_button = MOUSE_BUTTON3DOWN; + center_x = sc->syninfo.softbutton3_x; + right_button = MOUSE_BUTTON2DOWN; + right_x = sc->syninfo.softbutton2_x; + } - VLOG(3, (LOG_DEBUG, "synaptics: ipacket: [%d, %d], %d, %d\n", - x0, y0, *z, w)); + if (right_x > 0 && start_x > right_x && y_ok) + ms->button = (ms->button & + ~MOUSE_BUTTON1DOWN) | right_button; + else if (center_x > 0 && start_x > center_x && y_ok) + ms->button = (ms->button & + ~MOUSE_BUTTON1DOWN) | center_button; + } - /* Queue this new packet. */ - cursor = SYNAPTICS_QUEUE_CURSOR(synaction->queue_cursor - 1); - synaction->queue[cursor].x = x0; - synaction->queue[cursor].y = y0; - synaction->queue_cursor = cursor; - if (synaction->queue_len < SYNAPTICS_PACKETQUEUE) - synaction->queue_len++; - VLOG(5, (LOG_DEBUG, - "synaptics: cursor[%d]: x=%d, y=%d, dx=%d, dy=%d\n", - cursor, x0, y0, dx, dy)); + /* If in tap-hold, add the recorded button. */ + if (gest->in_taphold) + ms->button |= gest->tap_button; /* * For tap, we keep the maximum number of fingers and the * pressure peak. Also with multiple fingers, we increase * the minimum window. */ - switch (w) { - case 1: /* Three or more fingers. */ - synaction->fingers_nb = imax(3, synaction->fingers_nb); - synaction->window_min = window_max; - break; - case 0: /* Two fingers. */ - synaction->fingers_nb = imax(2, synaction->fingers_nb); - synaction->window_min = window_max; - break; - default: /* One finger or undetectable. */ - synaction->fingers_nb = imax(1, synaction->fingers_nb); - } - sc->zmax = imax(*z, sc->zmax); - - /* Do we have enough packets to consider this a movement? */ - if (synaction->queue_len < synaction->window_min) - goto SYNAPTICS_END; + if (nfingers > 1) + gest->window_min = window_max; + gest->fingers_nb = imax(nfingers, gest->fingers_nb); + gest->zmax = imax(f->p, gest->zmax); + + /* Do we have enough packets to consider this a gesture? */ + if (queue_len < gest->window_min) + return; /* Is a scrolling action occurring? */ - if (!synaction->in_taphold && !synaction->in_vscroll) { + if (!gest->in_taphold && !ms->button && + (!gest->in_vscroll || two_finger_scroll)) { /* * A scrolling action must not conflict with a tap * action. Here are the conditions to consider a @@ -3020,12 +3253,10 @@ proc_synaptics(struct psm_softc *sc, pac * first should be above a configurable minimum * . tap timed out */ - dxp = abs(synaction->queue[synaction->queue_cursor].x - - synaction->start_x); - dyp = abs(synaction->queue[synaction->queue_cursor].y - - synaction->start_y); + dxp = abs(x0 - start_x); + dyp = abs(y0 - start_y); - if (timevalcmp(&sc->lastsoftintr, &sc->taptimeout, >) || + if (timevalcmp(&sc->lastsoftintr, &gest->taptimeout, >) || dxp >= sc->syninfo.vscroll_min_delta || dyp >= sc->syninfo.vscroll_min_delta) { /* @@ -3034,176 +3265,65 @@ proc_synaptics(struct psm_softc *sc, pac * as that keeps the maximum number of fingers. */ if (two_finger_scroll) { - if (w == 0) { - synaction->in_vscroll += + if (nfingers == 2) { + gest->in_vscroll += dyp ? 2 : 0; - synaction->in_vscroll += + gest->in_vscroll += dxp ? 1 : 0; } } else { /* Check for horizontal scrolling. */ if ((vscroll_hor_area > 0 && - synaction->start_y <= - vscroll_hor_area) || + start_y <= vscroll_hor_area) || (vscroll_hor_area < 0 && - synaction->start_y >= - 6143 + vscroll_hor_area)) - synaction->in_vscroll += 2; + start_y >= + max_y + vscroll_hor_area)) + gest->in_vscroll += 2; /* Check for vertical scrolling. */ if ((vscroll_ver_area > 0 && - synaction->start_x <= - vscroll_ver_area) || + start_x <= vscroll_ver_area) || (vscroll_ver_area < 0 && - synaction->start_x >= - 6143 + vscroll_ver_area)) - synaction->in_vscroll += 1; + start_x >= + max_x + vscroll_ver_area)) + gest->in_vscroll += 1; } /* Avoid conflicts if area overlaps. */ - if (synaction->in_vscroll >= 3) - synaction->in_vscroll = + if (gest->in_vscroll >= 3) + gest->in_vscroll = (dxp > dyp) ? 2 : 1; } } /* * Reset two finger scrolling when the number of fingers - * is different from two. + * is different from two or any button is pressed. */ - if (two_finger_scroll && w != 0 && synaction->in_vscroll != 0) { - synaction->in_vscroll = 0; - exiting_scroll = 1; - } + if (two_finger_scroll && gest->in_vscroll != 0 && + (nfingers != 2 || ms->button)) + gest->in_vscroll = 0; VLOG(5, (LOG_DEBUG, "synaptics: virtual scrolling: %s " "(direction=%d, dxp=%d, dyp=%d, fingers=%d)\n", - synaction->in_vscroll ? "YES" : "NO", - synaction->in_vscroll, dxp, dyp, - synaction->fingers_nb)); - - weight_prev_x = weight_prev_y = weight_previous; - div_max_x = div_max_y = div_max; - - if (synaction->in_vscroll) { - /* Dividers are different with virtual scrolling. */ - div_min = sc->syninfo.vscroll_div_min; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Mon Sep 26 22:07:47 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1797EBEB7C4; Mon, 26 Sep 2016 22:07:47 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC0AC9B5; Mon, 26 Sep 2016 22:07:46 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QM7kTU071085; Mon, 26 Sep 2016 22:07:46 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QM7ktw071084; Mon, 26 Sep 2016 22:07:46 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609262207.u8QM7ktw071084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 26 Sep 2016 22:07:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306356 - head/usr.sbin/moused X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 22:07:47 -0000 Author: gonzo Date: Mon Sep 26 22:07:45 2016 New Revision: 306356 URL: https://svnweb.freebsd.org/changeset/base/306356 Log: Add Elantech trackpad to the list of known models PR: 205690 Submitted by: Vladimir Kondratyev MFC after: 1 week Modified: head/usr.sbin/moused/moused.c Modified: head/usr.sbin/moused/moused.c ============================================================================== --- head/usr.sbin/moused/moused.c Mon Sep 26 22:06:19 2016 (r306355) +++ head/usr.sbin/moused/moused.c Mon Sep 26 22:07:45 2016 (r306356) @@ -246,6 +246,7 @@ static symtab_t rmodels[] = { { "4D+ Mouse", MOUSE_MODEL_4DPLUS, 0 }, { "Synaptics Touchpad", MOUSE_MODEL_SYNAPTICS, 0 }, { "TrackPoint", MOUSE_MODEL_TRACKPOINT, 0 }, + { "Elantech Touchpad", MOUSE_MODEL_ELANTECH, 0 }, { "generic", MOUSE_MODEL_GENERIC, 0 }, { NULL, MOUSE_MODEL_UNKNOWN, 0 }, }; From owner-svn-src-head@freebsd.org Mon Sep 26 22:08:36 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8321ABEB8F3; Mon, 26 Sep 2016 22:08:36 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 510CCBFA; Mon, 26 Sep 2016 22:08:36 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8QM8Zit071169; Mon, 26 Sep 2016 22:08:35 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8QM8ZLN071168; Mon, 26 Sep 2016 22:08:35 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609262208.u8QM8ZLN071168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 26 Sep 2016 22:08:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306357 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 22:08:36 -0000 Author: gonzo Date: Mon Sep 26 22:08:35 2016 New Revision: 306357 URL: https://svnweb.freebsd.org/changeset/base/306357 Log: Document hw.psm.elantech_support in psm(4) PR: 205690 Submitted by: Vladimir Kondratyev MFC after: 1 week Modified: head/share/man/man4/psm.4 Modified: head/share/man/man4/psm.4 ============================================================================== --- head/share/man/man4/psm.4 Mon Sep 26 22:07:45 2016 (r306356) +++ head/share/man/man4/psm.4 Mon Sep 26 22:08:35 2016 (r306357) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 18, 2013 +.Dd September 26, 2016 .Dt PSM 4 .Os .Sh NAME @@ -340,10 +340,12 @@ at boot-time. This will enable .Nm to handle packets from guest devices (sticks) and extra buttons. -Similarly, extended support for IBM/Lenovo TrackPoint can be enabled -by setting +Similarly, extended support for IBM/Lenovo TrackPoint and Elantech touchpads +can be enabled by setting .Va hw.psm.trackpoint_support -to +or +.Va hw.psm.elantech_support, +respectively, to .Em 1 at boot-time. .Pp From owner-svn-src-head@freebsd.org Tue Sep 27 00:53:42 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F7B7BEA3F0; Tue, 27 Sep 2016 00:53:42 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DC69325; Tue, 27 Sep 2016 00:53:42 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8R0rf52034906; Tue, 27 Sep 2016 00:53:41 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8R0rf2B034902; Tue, 27 Sep 2016 00:53:41 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201609270053.u8R0rf2B034902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 27 Sep 2016 00:53:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306358 - in head/sys: conf powerpc/conf powerpc/mpc85xx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 00:53:42 -0000 Author: jhibbits Date: Tue Sep 27 00:53:41 2016 New Revision: 306358 URL: https://svnweb.freebsd.org/changeset/base/306358 Log: Add NXP/Freescale DIU driver for PowerPC SoCs Summary: This enables some features of the DIU, using a static configuration, specified either via a 'edid' property on the 'display' FDT node, or a 'video-mode' environment variable (bootarg). 'video-mode' was chosen because it matches u-boot's naming, so it can be set with: setenv bootargs video-mode=${video-mode} at the u-boot CLI. Mouse cursor is not supported currently, as a hardware cursor is not supported by framebuffer VT yet. Currently it only supports a 32bpp ARGB (actually BGRA) format, and only a single composite plane, at up to 1280x1024. Differential Revision: https://reviews.freebsd.org/D8022 Added: head/sys/powerpc/mpc85xx/fsl_diu.c (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/powerpc/conf/MPC85XX head/sys/powerpc/mpc85xx/mpc85xx.h Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Mon Sep 26 22:08:35 2016 (r306357) +++ head/sys/conf/files.powerpc Tue Sep 27 00:53:41 2016 (r306358) @@ -135,6 +135,7 @@ powerpc/mikrotik/platform_rb.c optional powerpc/mpc85xx/atpic.c optional mpc85xx isa powerpc/mpc85xx/ds1553_bus_fdt.c optional ds1553 fdt powerpc/mpc85xx/ds1553_core.c optional ds1553 +powerpc/mpc85xx/fsl_diu.c optional mpc85xx diu powerpc/mpc85xx/fsl_sdhc.c optional mpc85xx sdhc powerpc/mpc85xx/i2c.c optional iicbus fdt powerpc/mpc85xx/isa.c optional mpc85xx isa Modified: head/sys/powerpc/conf/MPC85XX ============================================================================== --- head/sys/powerpc/conf/MPC85XX Mon Sep 26 22:08:35 2016 (r306357) +++ head/sys/powerpc/conf/MPC85XX Tue Sep 27 00:53:41 2016 (r306358) @@ -93,3 +93,7 @@ device ehci device umass device usb device vlan + +# P1022 DIU +device diu +device videomode Added: head/sys/powerpc/mpc85xx/fsl_diu.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/mpc85xx/fsl_diu.c Tue Sep 27 00:53:41 2016 (r306358) @@ -0,0 +1,479 @@ +/*- + * Copyright (c) 2015 Justin Hibbits + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include + +#include "gpio_if.h" + +#include +#include + +#include "fb_if.h" + +#define DIU_DESC_1 0x000 /* Plane1 Area Descriptor Pointer Register */ +#define DIU_DESC_2 0x004 /* Plane2 Area Descriptor Pointer Register */ +#define DIU_DESC_3 0x008 /* Plane3 Area Descriptor Pointer Register */ +#define DIU_GAMMA 0x00C /* Gamma Register */ +#define DIU_PALETTE 0x010 /* Palette Register */ +#define DIU_CURSOR 0x014 /* Cursor Register */ +#define DIU_CURS_POS 0x018 /* Cursor Position Register */ +#define CURSOR_Y_SHIFT 16 +#define CURSOR_X_SHIFT 0 +#define DIU_DIU_MODE 0x01C /* DIU4 Mode */ +#define DIU_MODE_M 0x7 +#define DIU_MODE_S 0 +#define DIU_MODE_NORMAL 0x1 +#define DIU_MODE_2 0x2 +#define DIU_MODE_3 0x3 +#define DIU_MODE_COLBAR 0x4 +#define DIU_BGND 0x020 /* Background */ +#define DIU_BGND_WB 0x024 /* Background Color in write back Mode Register */ +#define DIU_DISP_SIZE 0x028 /* Display Size */ +#define DELTA_Y_S 16 +#define DELTA_X_S 0 +#define DIU_WB_SIZE 0x02C /* Write back Plane Size Register */ +#define DELTA_Y_WB_S 16 +#define DELTA_X_WB_S 0 +#define DIU_WB_MEM_ADDR 0x030 /* Address to Store the write back Plane Register */ +#define DIU_HSYN_PARA 0x034 /* Horizontal Sync Parameter */ +#define BP_H_SHIFT 22 +#define PW_H_SHIFT 11 +#define FP_H_SHIFT 0 +#define DIU_VSYN_PARA 0x038 /* Vertical Sync Parameter */ +#define BP_V_SHIFT 22 +#define PW_V_SHIFT 11 +#define FP_V_SHIFT 0 +#define DIU_SYNPOL 0x03C /* Synchronize Polarity */ +#define BP_VS (1 << 4) +#define BP_HS (1 << 3) +#define INV_CS (1 << 2) +#define INV_VS (1 << 1) +#define INV_HS (1 << 0) +#define INV_PDI_VS (1 << 8) /* Polarity of PDI input VSYNC. */ +#define INV_PDI_HS (1 << 9) /* Polarity of PDI input HSYNC. */ +#define INV_PDI_DE (1 << 10) /* Polarity of PDI input DE. */ +#define DIU_THRESHOLD 0x040 /* Threshold */ +#define LS_BF_VS_SHIFT 16 +#define OUT_BUF_LOW_SHIFT 0 +#define DIU_INT_STATUS 0x044 /* Interrupt Status */ +#define DIU_INT_MASK 0x048 /* Interrupt Mask */ +#define DIU_COLBAR_1 0x04C /* COLBAR_1 */ +#define DIU_COLORBARn_R(x) ((x & 0xff) << 16) +#define DIU_COLORBARn_G(x) ((x & 0xff) << 8) +#define DIU_COLORBARn_B(x) ((x & 0xff) << 0) +#define DIU_COLBAR_2 0x050 /* COLBAR_2 */ +#define DIU_COLBAR_3 0x054 /* COLBAR_3 */ +#define DIU_COLBAR_4 0x058 /* COLBAR_4 */ +#define DIU_COLBAR_5 0x05c /* COLBAR_5 */ +#define DIU_COLBAR_6 0x060 /* COLBAR_6 */ +#define DIU_COLBAR_7 0x064 /* COLBAR_7 */ +#define DIU_COLBAR_8 0x068 /* COLBAR_8 */ +#define DIU_FILLING 0x06C /* Filling Register */ +#define DIU_PLUT 0x070 /* Priority Look Up Table Register */ + +/* Control Descriptor */ +#define DIU_CTRLDESCL(n, m) 0x200 + (0x40 * n) + 0x4 * (m - 1) +#define DIU_CTRLDESCLn_1(n) DIU_CTRLDESCL(n, 1) +#define DIU_CTRLDESCLn_2(n) DIU_CTRLDESCL(n, 2) +#define DIU_CTRLDESCLn_3(n) DIU_CTRLDESCL(n, 3) +#define TRANS_SHIFT 20 +#define DIU_CTRLDESCLn_4(n) DIU_CTRLDESCL(n, 4) +#define BPP_MASK 0xf /* Bit per pixel Mask */ +#define BPP_SHIFT 16 /* Bit per pixel Shift */ +#define BPP24 0x5 +#define EN_LAYER (1 << 31) /* Enable the layer */ +#define DIU_CTRLDESCLn_5(n) DIU_CTRLDESCL(n, 5) +#define DIU_CTRLDESCLn_6(n) DIU_CTRLDESCL(n, 6) +#define DIU_CTRLDESCLn_7(n) DIU_CTRLDESCL(n, 7) +#define DIU_CTRLDESCLn_8(n) DIU_CTRLDESCL(n, 8) +#define DIU_CTRLDESCLn_9(n) DIU_CTRLDESCL(n, 9) + +#define NUM_LAYERS 1 + +struct panel_info { + uint32_t panel_width; + uint32_t panel_height; + uint32_t panel_hbp; + uint32_t panel_hpw; + uint32_t panel_hfp; + uint32_t panel_vbp; + uint32_t panel_vpw; + uint32_t panel_vfp; + uint32_t panel_freq; + uint32_t clk_div; +}; + +struct diu_area_descriptor { + uint32_t pixel_format; + uint32_t bitmap_address; + uint32_t source_size; + uint32_t aoi_size; + uint32_t aoi_offset; + uint32_t display_offset; + uint32_t chroma_key_max; + uint32_t chroma_key_min; + uint32_t next_ad_addr; +} __aligned(32); + +struct diu_softc { + struct resource *res[2]; + void *ih; + device_t sc_dev; + device_t sc_fbd; /* fbd child */ + struct fb_info sc_info; + struct panel_info sc_panel; + struct diu_area_descriptor *sc_planes[3]; + uint8_t *sc_gamma; + uint8_t *sc_cursor; +}; + +static struct resource_spec diu_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 0, RF_ACTIVE }, + { -1, 0 } +}; + +static int +diu_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "fsl,diu")) + return (ENXIO); + + device_set_desc(dev, "Freescale Display Interface Unit"); + return (BUS_PROBE_DEFAULT); +} + +static void +diu_intr(void *arg) +{ + struct diu_softc *sc; + int reg; + + sc = arg; + + /* Ack interrupts */ + reg = bus_read_4(sc->res[0], DIU_INT_STATUS); + bus_write_4(sc->res[0], DIU_INT_STATUS, reg); + + /* TODO interrupt handler */ +} + +static int +diu_set_pxclk(device_t dev, unsigned int freq) +{ + phandle_t node; + unsigned long bus_freq; + uint32_t pxclk_set; + uint32_t clkdvd; + int res; + + node = ofw_bus_get_node(device_get_parent(dev)); + if ((res = OF_getencprop(node, "bus-frequency", + (pcell_t *)&bus_freq, sizeof(bus_freq)) <= 0)) { + device_printf(dev, "Unable to get bus frequency\n"); + return (ENXIO); + } + + /* freq is in kHz */ + freq *= 1000; + /* adding freq/2 to round-to-closest */ + pxclk_set = min(max((bus_freq + freq/2) / freq, 2), 255) << 16; + pxclk_set |= OCP85XX_CLKDVDR_PXCKEN; + clkdvd = ccsr_read4(OCP85XX_CLKDVDR); + clkdvd &= ~(OCP85XX_CLKDVDR_PXCKEN | OCP85XX_CLKDVDR_PXCKINV | + OCP85XX_CLKDVDR_PXCLK_MASK); + ccsr_write4(OCP85XX_CLKDVDR, clkdvd); + ccsr_write4(OCP85XX_CLKDVDR, clkdvd | pxclk_set); + + return (0); +} + +static int +diu_init(struct diu_softc *sc) +{ + struct panel_info *panel; + int reg; + + panel = &sc->sc_panel; + + /* Temporarily disable the DIU while configuring */ + reg = bus_read_4(sc->res[0], DIU_DIU_MODE); + reg &= ~(DIU_MODE_M << DIU_MODE_S); + bus_write_4(sc->res[0], DIU_DIU_MODE, reg); + + if (diu_set_pxclk(sc->sc_dev, panel->panel_freq) < 0) { + return (ENXIO); + } + + /* Configure DIU */ + /* Need to set these somehow later... */ + bus_write_4(sc->res[0], DIU_GAMMA, vtophys(sc->sc_gamma)); + bus_write_4(sc->res[0], DIU_CURSOR, vtophys(sc->sc_cursor)); + bus_write_4(sc->res[0], DIU_CURS_POS, 0); + + reg = ((sc->sc_info.fb_height) << DELTA_Y_S); + reg |= sc->sc_info.fb_width; + bus_write_4(sc->res[0], DIU_DISP_SIZE, reg); + + reg = (panel->panel_hbp << BP_H_SHIFT); + reg |= (panel->panel_hpw << PW_H_SHIFT); + reg |= (panel->panel_hfp << FP_H_SHIFT); + bus_write_4(sc->res[0], DIU_HSYN_PARA, reg); + + reg = (panel->panel_vbp << BP_V_SHIFT); + reg |= (panel->panel_vpw << PW_V_SHIFT); + reg |= (panel->panel_vfp << FP_V_SHIFT); + bus_write_4(sc->res[0], DIU_VSYN_PARA, reg); + + bus_write_4(sc->res[0], DIU_BGND, 0); + + /* Mask all the interrupts */ + bus_write_4(sc->res[0], DIU_INT_MASK, 0x3f); + + /* Reset all layers */ + sc->sc_planes[0] = contigmalloc(sizeof(struct diu_area_descriptor), + M_DEVBUF, M_ZERO, 0, BUS_SPACE_MAXADDR_32BIT, 32, 0); + bus_write_4(sc->res[0], DIU_DESC_1, vtophys(sc->sc_planes[0])); + bus_write_4(sc->res[0], DIU_DESC_2, 0); + bus_write_4(sc->res[0], DIU_DESC_3, 0); + + /* Setup first plane */ + /* Area descriptor fields are little endian, so byte swap. */ + /* Word 0: Pixel format */ + /* Set to 8:8:8:8 ARGB, 4 bytes per pixel, no flip. */ +#define MAKE_PXLFMT(as,rs,gs,bs,a,r,g,b,f,s) \ + htole32((as << (4 * a)) | (rs << 4 * r) | \ + (gs << 4 * g) | (bs << 4 * b) | \ + (f << 28) | (s << 16) | \ + (a << 25) | (r << 19) | \ + (g << 21) | (b << 24)) + reg = MAKE_PXLFMT(8, 8, 8, 8, 3, 2, 1, 0, 1, 3); + sc->sc_planes[0]->pixel_format = reg; + /* Word 1: Bitmap address */ + sc->sc_planes[0]->bitmap_address = htole32(sc->sc_info.fb_pbase); + /* Word 2: Source size/global alpha */ + reg = (sc->sc_info.fb_width | (sc->sc_info.fb_height << 12)); + sc->sc_planes[0]->source_size = htole32(reg); + /* Word 3: AOI Size */ + reg = (sc->sc_info.fb_width | (sc->sc_info.fb_height << 16)); + sc->sc_planes[0]->aoi_size = htole32(reg); + /* Word 4: AOI Offset */ + sc->sc_planes[0]->aoi_offset = 0; + /* Word 5: Display offset */ + sc->sc_planes[0]->display_offset = 0; + /* Word 6: Chroma key max */ + sc->sc_planes[0]->chroma_key_max = 0; + /* Word 7: Chroma key min */ + reg = 255 << 16 | 255 << 8 | 255; + sc->sc_planes[0]->chroma_key_min = htole32(reg); + /* Word 8: Next AD */ + sc->sc_planes[0]->next_ad_addr = 0; + + /* TODO: derive this from the panel size */ + bus_write_4(sc->res[0], DIU_PLUT, 0x1f5f666); + + /* Enable DIU in normal mode */ + reg = bus_read_4(sc->res[0], DIU_DIU_MODE); + reg &= ~(DIU_MODE_M << DIU_MODE_S); + reg |= (DIU_MODE_NORMAL << DIU_MODE_S); + bus_write_4(sc->res[0], DIU_DIU_MODE, reg); + + return (0); +} + +static int +diu_attach(device_t dev) +{ + struct edid_info *edid; + struct diu_softc *sc; + const struct videomode *videomode; + void *edid_cells; + const char *vm_name; + phandle_t node; + int h, r, w; + int err, i; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + + if (bus_alloc_resources(dev, diu_spec, sc->res)) { + device_printf(dev, "could not allocate resources\n"); + return (ENXIO); + } + + node = ofw_bus_get_node(dev); + /* Setup interrupt handler */ + err = bus_setup_intr(dev, sc->res[1], INTR_TYPE_BIO | INTR_MPSAFE, + NULL, diu_intr, sc, &sc->ih); + if (err) { + device_printf(dev, "Unable to alloc interrupt resource.\n"); + return (ENXIO); + } + + /* TODO: Eventually, allow EDID to be dynamically provided. */ + if (OF_getprop_alloc(node, "edid", 1, &edid_cells) <= 0) { + /* + * u-boot uses the environment variable name 'video-mode', so + * just use the same name here. Should allow another variable + * that better fits our design model, but this is fine. + */ + if ((vm_name = kern_getenv("video-mode")) == NULL) { + device_printf(dev, + "No EDID data and no video-mode env set\n"); + return (ENXIO); + } + } + if (edid_cells != NULL) { + if (edid_parse(edid_cells, edid) != 0) { + device_printf(dev, "Error parsing EDID\n"); + OF_prop_free(edid_cells); + return (ENXIO); + } + videomode = edid->edid_preferred_mode; + } else { + /* Parse video-mode kenv variable. */ + if ((err = sscanf(vm_name, "fslfb:%dx%d@%d", &w, &h, &r)) != 3) { + device_printf(dev, + "Cannot parse video mode: %s\n", vm_name); + return (ENXIO); + } + videomode = pick_mode_by_ref(w, h, r); + if (videomode == NULL) { + device_printf(dev, + "Cannot find mode for %dx%d@%d", w, h, r); + return (ENXIO); + } + } + + sc->sc_panel.panel_width = videomode->hdisplay; + sc->sc_panel.panel_height = videomode->vdisplay; + sc->sc_panel.panel_hbp = videomode->hsync_start - videomode->hdisplay; + sc->sc_panel.panel_hfp = videomode->htotal - videomode->hsync_end; + sc->sc_panel.panel_hpw = videomode->hsync_end - videomode->hsync_start; + sc->sc_panel.panel_vbp = videomode->vsync_start - videomode->vdisplay; + sc->sc_panel.panel_vfp = videomode->vtotal - videomode->vsync_end; + sc->sc_panel.panel_vpw = videomode->vsync_end - videomode->vsync_start; + sc->sc_panel.panel_freq = videomode->dot_clock; + + sc->sc_info.fb_width = sc->sc_panel.panel_width; + sc->sc_info.fb_height = sc->sc_panel.panel_height; + sc->sc_info.fb_stride = sc->sc_info.fb_width * 4; + sc->sc_info.fb_bpp = sc->sc_info.fb_depth = 32; + sc->sc_info.fb_size = sc->sc_info.fb_height * sc->sc_info.fb_stride; + sc->sc_info.fb_vbase = (intptr_t)contigmalloc(sc->sc_info.fb_size, + M_DEVBUF, M_ZERO, 0, BUS_SPACE_MAXADDR_32BIT, PAGE_SIZE, 0); + sc->sc_info.fb_pbase = (intptr_t)vtophys(sc->sc_info.fb_vbase); + + /* Gamma table is 3 consecutive segments of 256 bytes. */ + sc->sc_gamma = contigmalloc(3 * 256, M_DEVBUF, 0, 0, + BUS_SPACE_MAXADDR_32BIT, PAGE_SIZE, 0); + /* Initialize gamma to default */ + for (i = 0; i < 3 * 256; i++) + sc->sc_gamma[i] = (i % 256); + + /* Cursor format is 32x32x16bpp */ + sc->sc_cursor = contigmalloc(32 * 32 * 2, M_DEVBUF, M_ZERO, 0, + BUS_SPACE_MAXADDR_32BIT, PAGE_SIZE, 0); + + diu_init(sc); + + sc->sc_info.fb_name = device_get_nameunit(dev); + + /* Ask newbus to attach framebuffer device to me. */ + sc->sc_fbd = device_add_child(dev, "fbd", device_get_unit(dev)); + if (sc->sc_fbd == NULL) + device_printf(dev, "Can't attach fbd device\n"); + + if ((err = device_probe_and_attach(sc->sc_fbd)) != 0) { + device_printf(dev, "Failed to attach fbd device: %d\n", err); + } + + return (0); +} + +static struct fb_info * +diu_fb_getinfo(device_t dev) +{ + struct diu_softc *sc = device_get_softc(dev); + + return (&sc->sc_info); +} + +static device_method_t diu_methods[] = { + DEVMETHOD(device_probe, diu_probe), + DEVMETHOD(device_attach, diu_attach), + + /* Framebuffer service methods */ + DEVMETHOD(fb_getinfo, diu_fb_getinfo), + { 0, 0 } +}; + +static driver_t diu_driver = { + "fb", + diu_methods, + sizeof(struct diu_softc), +}; + +static devclass_t diu_devclass; + +DRIVER_MODULE(fb, simplebus, diu_driver, diu_devclass, 0, 0); Modified: head/sys/powerpc/mpc85xx/mpc85xx.h ============================================================================== --- head/sys/powerpc/mpc85xx/mpc85xx.h Mon Sep 26 22:08:35 2016 (r306357) +++ head/sys/powerpc/mpc85xx/mpc85xx.h Tue Sep 27 00:53:41 2016 (r306358) @@ -139,6 +139,13 @@ extern vm_offset_t ccsrbar_va; */ #define OCP85XX_RSTCR (CCSRBAR_VA + 0xe00b0) +#define OCP85XX_CLKDVDR (CCSRBAR_VA + 0xe0800) +#define OCP85XX_CLKDVDR_PXCKEN 0x80000000 +#define OCP85XX_CLKDVDR_SSICKEN 0x20000000 +#define OCP85XX_CLKDVDR_PXCKINV 0x10000000 +#define OCP85XX_CLKDVDR_PXCLK_MASK 0x00FF0000 +#define OCP85XX_CLKDVDR_SSICLK_MASK 0x000000FF + /* * Run Control/Power Management Registers. */ From owner-svn-src-head@freebsd.org Tue Sep 27 05:02:26 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBC8DBEB1F2 for ; Tue, 27 Sep 2016 05:02:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A0C73D36 for ; Tue, 27 Sep 2016 05:02:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x236.google.com with SMTP id 92so4046037iol.2 for ; Mon, 26 Sep 2016 22:02:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=NF74+LZJ+8y8vCQFDPSg7Wg7COLkm8pAdv5y+qek/JA=; b=nu6+ahUICQfAlAcoNMPX/SaH7FUg5TdUIPhGTZa9Joj+Qe3gpCVJzpI+4hU+m59my7 wSr8S3EGAdcbZ3ENKA0GlPKZX/+TXTGsC5ol0cFl1D60w85p9WX2SOn0AGZebw0LpajL WkmMcsVgV6zW6hbg9DMKFkiomlS3Z/SSuc26zEP5kzsmmFtwGZojVYKv0+PQpPDy8xhU VMiqC9nk70FM0yDjEfODB4x1OYson2MPsYcRe5jt489Hiw+91wvjA0ywXqgcMZTKty6b /ax2pnFnDhJoD1xtqfImgo2U1UBYp4jcLgDDviS/vkm+qTRutUE1qgXstbdD3pipgseL K2HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=NF74+LZJ+8y8vCQFDPSg7Wg7COLkm8pAdv5y+qek/JA=; b=a7iY06MtBs18PoCnn3OnqBeLz5QHE1jSkNWb9hYWP3ZXwOLW2wfniWZps0ADqTB/Z0 t21RDEUZL8g+8tIl6hFpcY5fASu1wEeHAcrdnssTSuJI/8mDuUvvat7srtoqwax9qP6Q OnkX+6LEwzkXTKa0G2CqvYu4YIIgGMS2q9EaM0ubqzZwGwKB+O4JX4xKvNFlLi27ZnPW sZrnIijS/Lza53MbKf34Pa7xp/i5ASz+SwPCBwaBWRaTZlnr+9Z3ZAST7QQ9OwucBLon jykrPbrvV/JKswDGfZ6RADWNcMOgWLgBw1sHsy2DQBRV5lP3cLtapNYQ9pV9A4ZVzN9X ujMg== X-Gm-Message-State: AE9vXwNNW4NUL+15rFVj27qzjkTLGTNGIVL0CGWGlm5RREJFGGBSVGpgL0W+vudjCByy6J+1RgxMktU8BCasIg== X-Received: by 10.107.138.200 with SMTP id c69mr26343245ioj.43.1474952546119; Mon, 26 Sep 2016 22:02:26 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Mon, 26 Sep 2016 22:02:25 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: <1577832.dOPa6L4zTd@ralph.baldwin.cx> References: <201609031526.u83FQSCZ017350@repo.freebsd.org> <4af03d4b-5e5e-2482-c21f-538d95e921b6@freebsd.org> <1577832.dOPa6L4zTd@ralph.baldwin.cx> From: Warner Losh Date: Mon, 26 Sep 2016 23:02:25 -0600 X-Google-Sender-Auth: nfeuGdO0jKR_vtE0G6mip3Y8QJI Message-ID: Subject: Re: svn commit: r305353 - in head/sys/boot: i386 i386/boot0 i386/boot2 i386/btx/btx i386/btx/btxldr i386/cdboot i386/gptboot i386/gptzfsboot i386/mbr i386/pmbr i386/pxeldr i386/zfsboot pc98 pc98/boot0 ... To: John Baldwin Cc: Allan Jude , Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Ed Maste Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 05:02:27 -0000 On Mon, Sep 26, 2016 at 11:00 AM, John Baldwin wrote: > On Saturday, September 24, 2016 02:56:05 PM Warner Losh wrote: >> On Fri, Sep 23, 2016 at 4:17 PM, Allan Jude wrote: >> > On 09/03/16 11:26 AM, Warner Losh wrote: >> >> Author: imp >> >> Date: Sat Sep 3 15:26:28 2016 >> >> New Revision: 305353 >> >> URL: https://svnweb.freebsd.org/changeset/base/305353 >> >> >> >> Log: >> >> Don't use -N to set the OMAGIC with data and text writeable and data >> >> not page aligned. To do this, use the ld script gnu ld installs on my >> >> system. >> >> >> >> This is imperfect: LDFLAGS_BIN and LD_FLAGS_BIN describe different >> >> things. The loader script could be better named and take into account >> >> other architectures. And having two different mechanisms to do >> >> basically the same thing needs study. However, it's blocking forward >> >> progress on lld, so I'll work in parallel to sort these out. >> >> >> >> Differential Revision: https://reviews.freebsd.org/D7409 >> >> Reviewed by: emaste >> >> >> > >> > This breaks booting on my Lenovo laptop. The BTX client crashes and >> > dumps the registers. >> > >> > Reverting this commit solved it. >> > >> > Is there something I can do to help investigate this? >> >> I assume you bisected all boot loader changes and it fails across this >> commit? If not, that's the first step. >> >> If so, perhaps the place to start is with the dump? > > The dump is a good place to start, but it would also be useful to know > > 1) Which stage dies (e.g. can you get into the gptboot/boot2 prompt meaning > it it is probably btxldr.S dying trying to parse a.out header from > /boot/loader vs are you dying before that point meaning it is in boot1.S > or gptldr.S)? Yes. This is absolutely critical. Until we know what dies, what the trace backs are, what options were in effect and how the binaries were broken there's little more that I can do because it works for me everywhere I've tried it. > 2) Once we know which stage, it would be good to compare the a.out headers > and possibly the contents of the relevant binaries. The aforementioned > .S files all parse the a.out header in assembly as well as the BTX > header (they assume that BTX itself is present in the bits loaded from > disk immediately followed by the binary header). That code isn't very > flexible and it doesn't seem far fetched for this change to break it. I just wonder why it works on the amd64 servers and laptops, the i386 laptops and in qemu for me, but fails for the OP. If it broke a.out, I contend it would break for everybody since a.out headers are 'hit dinosaur over the head' level of complexity and subtly. While I don't doubt there's a problem, I suspect it is very specific to a particular set of laptops that were on the edge before and this kicks us over the edge just enough to stomp on some area that was protected before. Warner From owner-svn-src-head@freebsd.org Tue Sep 27 06:00:11 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79D8FBEBE8C; Tue, 27 Sep 2016 06:00:11 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 446A48C9; Tue, 27 Sep 2016 06:00:11 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8R60AV4048008; Tue, 27 Sep 2016 06:00:10 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8R60ACP048007; Tue, 27 Sep 2016 06:00:10 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609270600.u8R60ACP048007@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Tue, 27 Sep 2016 06:00:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306359 - head/sys/dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 06:00:11 -0000 Author: sephe Date: Tue Sep 27 06:00:10 2016 New Revision: 306359 URL: https://svnweb.freebsd.org/changeset/base/306359 Log: pci: Clear the MEM/PORT_EN bit when updating PCI BAR It's unsafe to update the BAR when the related EN bit is set. Submitted by: Dexuan Cui Reviewed by: jhb MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7914 Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Tue Sep 27 00:53:41 2016 (r306358) +++ head/sys/dev/pci/pci.c Tue Sep 27 06:00:10 2016 (r306359) @@ -5000,6 +5000,7 @@ pci_reserve_map(device_t dev, device_t c struct resource_list *rl = &dinfo->resources; struct resource *res; struct pci_map *pm; + uint16_t cmd; pci_addr_t map, testval; int mapsize; @@ -5089,8 +5090,17 @@ pci_reserve_map(device_t dev, device_t c device_printf(child, "Lazy allocation of %#jx bytes rid %#x type %d at %#jx\n", count, *rid, type, rman_get_start(res)); + + /* Disable decoding via the CMD register before updating the BAR */ + cmd = pci_read_config(child, PCIR_COMMAND, 2); + pci_write_config(child, PCIR_COMMAND, + cmd & ~(PCI_BAR_MEM(map) ? PCIM_CMD_MEMEN : PCIM_CMD_PORTEN), 2); + map = rman_get_start(res); pci_write_bar(child, pm, map); + + /* Restore the original value of the CMD register */ + pci_write_config(child, PCIR_COMMAND, cmd, 2); out: return (res); } From owner-svn-src-head@freebsd.org Tue Sep 27 06:30:26 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59CE1BEB412; Tue, 27 Sep 2016 06:30:26 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2993F3F0; Tue, 27 Sep 2016 06:30:26 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8R6UP8D059182; Tue, 27 Sep 2016 06:30:25 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8R6UP98059178; Tue, 27 Sep 2016 06:30:25 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609270630.u8R6UP98059178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Tue, 27 Sep 2016 06:30:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306360 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 06:30:26 -0000 Author: sephe Date: Tue Sep 27 06:30:24 2016 New Revision: 306360 URL: https://svnweb.freebsd.org/changeset/base/306360 Log: hyperv/vmbus: Add dynamic device add and remove support MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8008 Modified: head/sys/dev/hyperv/vmbus/vmbus.c head/sys/dev/hyperv/vmbus/vmbus_chan.c head/sys/dev/hyperv/vmbus/vmbus_chanvar.h head/sys/dev/hyperv/vmbus/vmbus_var.h Modified: head/sys/dev/hyperv/vmbus/vmbus.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus.c Tue Sep 27 06:00:10 2016 (r306359) +++ head/sys/dev/hyperv/vmbus/vmbus.c Tue Sep 27 06:30:24 2016 (r306360) @@ -83,9 +83,7 @@ static int vmbus_connect(struct vmbus_ static int vmbus_req_channels(struct vmbus_softc *sc); static void vmbus_disconnect(struct vmbus_softc *); static int vmbus_scan(struct vmbus_softc *); -static void vmbus_scan_wait(struct vmbus_softc *); -static void vmbus_scan_newchan(struct vmbus_softc *); -static void vmbus_scan_newdev(struct vmbus_softc *); +static void vmbus_scan_teardown(struct vmbus_softc *); static void vmbus_scan_done(struct vmbus_softc *, const struct vmbus_message *); static void vmbus_chanmsg_handle(struct vmbus_softc *, @@ -393,50 +391,22 @@ vmbus_req_channels(struct vmbus_softc *s } static void -vmbus_scan_newchan(struct vmbus_softc *sc) +vmbus_scan_done_task(void *xsc, int pending __unused) { - mtx_lock(&sc->vmbus_scan_lock); - if ((sc->vmbus_scan_chcnt & VMBUS_SCAN_CHCNT_DONE) == 0) - sc->vmbus_scan_chcnt++; - mtx_unlock(&sc->vmbus_scan_lock); + struct vmbus_softc *sc = xsc; + + mtx_lock(&Giant); + sc->vmbus_scandone = true; + mtx_unlock(&Giant); + wakeup(&sc->vmbus_scandone); } static void vmbus_scan_done(struct vmbus_softc *sc, const struct vmbus_message *msg __unused) { - mtx_lock(&sc->vmbus_scan_lock); - sc->vmbus_scan_chcnt |= VMBUS_SCAN_CHCNT_DONE; - mtx_unlock(&sc->vmbus_scan_lock); - wakeup(&sc->vmbus_scan_chcnt); -} - -static void -vmbus_scan_newdev(struct vmbus_softc *sc) -{ - mtx_lock(&sc->vmbus_scan_lock); - sc->vmbus_scan_devcnt++; - mtx_unlock(&sc->vmbus_scan_lock); - wakeup(&sc->vmbus_scan_devcnt); -} - -static void -vmbus_scan_wait(struct vmbus_softc *sc) -{ - uint32_t chancnt; - - mtx_lock(&sc->vmbus_scan_lock); - while ((sc->vmbus_scan_chcnt & VMBUS_SCAN_CHCNT_DONE) == 0) { - mtx_sleep(&sc->vmbus_scan_chcnt, &sc->vmbus_scan_lock, 0, - "waitch", 0); - } - chancnt = sc->vmbus_scan_chcnt & ~VMBUS_SCAN_CHCNT_DONE; - while (sc->vmbus_scan_devcnt != chancnt) { - mtx_sleep(&sc->vmbus_scan_devcnt, &sc->vmbus_scan_lock, 0, - "waitdev", 0); - } - mtx_unlock(&sc->vmbus_scan_lock); + taskqueue_enqueue(sc->vmbus_devtq, &sc->vmbus_scandone_task); } static int @@ -445,31 +415,71 @@ vmbus_scan(struct vmbus_softc *sc) int error; /* + * Identify, probe and attach for non-channel devices. + */ + bus_generic_probe(sc->vmbus_dev); + bus_generic_attach(sc->vmbus_dev); + + /* + * This taskqueue serializes vmbus devices' attach and detach + * for channel offer and rescind messages. + */ + sc->vmbus_devtq = taskqueue_create("vmbus dev", M_WAITOK, + taskqueue_thread_enqueue, &sc->vmbus_devtq); + taskqueue_start_threads(&sc->vmbus_devtq, 1, PI_NET, "vmbusdev"); + TASK_INIT(&sc->vmbus_scandone_task, 0, vmbus_scan_done_task, sc); + + /* + * This taskqueue handles sub-channel detach, so that vmbus + * device's detach running in vmbus_devtq can drain its sub- + * channels. + */ + sc->vmbus_subchtq = taskqueue_create("vmbus subch", M_WAITOK, + taskqueue_thread_enqueue, &sc->vmbus_subchtq); + taskqueue_start_threads(&sc->vmbus_subchtq, 1, PI_NET, "vmbussch"); + + /* * Start vmbus scanning. */ error = vmbus_req_channels(sc); if (error) { device_printf(sc->vmbus_dev, "channel request failed: %d\n", error); - return error; + return (error); } /* - * Wait for all devices are added to vmbus. + * Wait for all vmbus devices from the initial channel offers to be + * attached. */ - vmbus_scan_wait(sc); - - /* - * Identify, probe and attach. - */ - bus_generic_probe(sc->vmbus_dev); - bus_generic_attach(sc->vmbus_dev); + GIANT_REQUIRED; + while (!sc->vmbus_scandone) + mtx_sleep(&sc->vmbus_scandone, &Giant, 0, "vmbusdev", 0); if (bootverbose) { device_printf(sc->vmbus_dev, "device scan, probe and attach " "done\n"); } - return 0; + return (0); +} + +static void +vmbus_scan_teardown(struct vmbus_softc *sc) +{ + + GIANT_REQUIRED; + if (sc->vmbus_devtq != NULL) { + mtx_unlock(&Giant); + taskqueue_free(sc->vmbus_devtq); + mtx_lock(&Giant); + sc->vmbus_devtq = NULL; + } + if (sc->vmbus_subchtq != NULL) { + mtx_unlock(&Giant); + taskqueue_free(sc->vmbus_subchtq); + mtx_lock(&Giant); + sc->vmbus_subchtq = NULL; + } } static void @@ -918,45 +928,35 @@ vmbus_add_child(struct vmbus_channel *ch { struct vmbus_softc *sc = chan->ch_vmbus; device_t parent = sc->vmbus_dev; - int error = 0; - /* New channel has been offered */ - vmbus_scan_newchan(sc); + mtx_lock(&Giant); chan->ch_dev = device_add_child(parent, NULL, -1); if (chan->ch_dev == NULL) { + mtx_unlock(&Giant); device_printf(parent, "device_add_child for chan%u failed\n", chan->ch_id); - error = ENXIO; - goto done; + return (ENXIO); } device_set_ivars(chan->ch_dev, chan); + device_probe_and_attach(chan->ch_dev); -done: - /* New device has been/should be added to vmbus. */ - vmbus_scan_newdev(sc); - return error; + mtx_unlock(&Giant); + return (0); } int vmbus_delete_child(struct vmbus_channel *chan) { - int error; - - if (chan->ch_dev == NULL) { - /* Failed to add a device. */ - return 0; - } + int error = 0; - /* - * XXXKYS: Ensure that this is the opposite of - * device_add_child() - */ mtx_lock(&Giant); - error = device_delete_child(chan->ch_vmbus->vmbus_dev, chan->ch_dev); + if (chan->ch_dev != NULL) { + error = device_delete_child(chan->ch_vmbus->vmbus_dev, + chan->ch_dev); + } mtx_unlock(&Giant); - - return error; + return (error); } static int @@ -1028,10 +1028,11 @@ vmbus_doattach(struct vmbus_softc *sc) return (0); sc->vmbus_flags |= VMBUS_FLAG_ATTACHED; - mtx_init(&sc->vmbus_scan_lock, "vmbus scan", NULL, MTX_DEF); sc->vmbus_gpadl = VMBUS_GPADL_START; mtx_init(&sc->vmbus_prichan_lock, "vmbus prichan", NULL, MTX_DEF); TAILQ_INIT(&sc->vmbus_prichans); + mtx_init(&sc->vmbus_chan_lock, "vmbus channel", NULL, MTX_DEF); + TAILQ_INIT(&sc->vmbus_chans); sc->vmbus_chmap = malloc( sizeof(struct vmbus_channel *) * VMBUS_CHAN_MAX, M_DEVBUF, M_WAITOK | M_ZERO); @@ -1095,6 +1096,7 @@ vmbus_doattach(struct vmbus_softc *sc) return (ret); cleanup: + vmbus_scan_teardown(sc); vmbus_intr_teardown(sc); vmbus_dma_free(sc); if (sc->vmbus_xc != NULL) { @@ -1102,8 +1104,8 @@ cleanup: sc->vmbus_xc = NULL; } free(sc->vmbus_chmap, M_DEVBUF); - mtx_destroy(&sc->vmbus_scan_lock); mtx_destroy(&sc->vmbus_prichan_lock); + mtx_destroy(&sc->vmbus_chan_lock); return (ret); } @@ -1146,8 +1148,11 @@ vmbus_detach(device_t dev) { struct vmbus_softc *sc = device_get_softc(dev); + bus_generic_detach(dev); vmbus_chan_destroy_all(sc); + vmbus_scan_teardown(sc); + vmbus_disconnect(sc); if (sc->vmbus_flags & VMBUS_FLAG_SYNIC) { @@ -1164,8 +1169,8 @@ vmbus_detach(device_t dev) } free(sc->vmbus_chmap, M_DEVBUF); - mtx_destroy(&sc->vmbus_scan_lock); mtx_destroy(&sc->vmbus_prichan_lock); + mtx_destroy(&sc->vmbus_chan_lock); return (0); } Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Tue Sep 27 06:00:10 2016 (r306359) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Tue Sep 27 06:30:24 2016 (r306360) @@ -59,10 +59,30 @@ static struct vmbus_channel *vmbus_chan_ static void vmbus_chan_free(struct vmbus_channel *); static int vmbus_chan_add(struct vmbus_channel *); static void vmbus_chan_cpu_default(struct vmbus_channel *); +static int vmbus_chan_release(struct vmbus_channel *); +static void vmbus_chan_set_chmap(struct vmbus_channel *); +static void vmbus_chan_clear_chmap(struct vmbus_channel *); + +static void vmbus_chan_ins_prilist(struct vmbus_softc *, + struct vmbus_channel *); +static void vmbus_chan_rem_prilist(struct vmbus_softc *, + struct vmbus_channel *); +static void vmbus_chan_ins_list(struct vmbus_softc *, + struct vmbus_channel *); +static void vmbus_chan_rem_list(struct vmbus_softc *, + struct vmbus_channel *); +static void vmbus_chan_ins_sublist(struct vmbus_channel *, + struct vmbus_channel *); +static void vmbus_chan_rem_sublist(struct vmbus_channel *, + struct vmbus_channel *); static void vmbus_chan_task(void *, int); static void vmbus_chan_task_nobatch(void *, int); -static void vmbus_chan_detach_task(void *, int); +static void vmbus_chan_clrchmap_task(void *, int); +static void vmbus_prichan_attach_task(void *, int); +static void vmbus_subchan_attach_task(void *, int); +static void vmbus_prichan_detach_task(void *, int); +static void vmbus_subchan_detach_task(void *, int); static void vmbus_chan_msgproc_choffer(struct vmbus_softc *, const struct vmbus_message *); @@ -96,6 +116,83 @@ vmbus_chan_signal_tx(const struct vmbus_ hypercall_signal_event(chan->ch_monprm_dma.hv_paddr); } +static void +vmbus_chan_ins_prilist(struct vmbus_softc *sc, struct vmbus_channel *chan) +{ + + mtx_assert(&sc->vmbus_prichan_lock, MA_OWNED); + if (atomic_testandset_int(&chan->ch_stflags, + VMBUS_CHAN_ST_ONPRIL_SHIFT)) + panic("channel is already on the prilist"); + TAILQ_INSERT_TAIL(&sc->vmbus_prichans, chan, ch_prilink); +} + +static void +vmbus_chan_rem_prilist(struct vmbus_softc *sc, struct vmbus_channel *chan) +{ + + mtx_assert(&sc->vmbus_prichan_lock, MA_OWNED); + if (atomic_testandclear_int(&chan->ch_stflags, + VMBUS_CHAN_ST_ONPRIL_SHIFT) == 0) + panic("channel is not on the prilist"); + TAILQ_REMOVE(&sc->vmbus_prichans, chan, ch_prilink); +} + +static void +vmbus_chan_ins_sublist(struct vmbus_channel *prichan, + struct vmbus_channel *chan) +{ + + mtx_assert(&prichan->ch_subchan_lock, MA_OWNED); + + if (atomic_testandset_int(&chan->ch_stflags, + VMBUS_CHAN_ST_ONSUBL_SHIFT)) + panic("channel is already on the sublist"); + TAILQ_INSERT_TAIL(&prichan->ch_subchans, chan, ch_sublink); + + /* Bump sub-channel count. */ + prichan->ch_subchan_cnt++; +} + +static void +vmbus_chan_rem_sublist(struct vmbus_channel *prichan, + struct vmbus_channel *chan) +{ + + mtx_assert(&prichan->ch_subchan_lock, MA_OWNED); + + KASSERT(prichan->ch_subchan_cnt > 0, + ("invalid subchan_cnt %d", prichan->ch_subchan_cnt)); + prichan->ch_subchan_cnt--; + + if (atomic_testandclear_int(&chan->ch_stflags, + VMBUS_CHAN_ST_ONSUBL_SHIFT) == 0) + panic("channel is not on the sublist"); + TAILQ_REMOVE(&prichan->ch_subchans, chan, ch_sublink); +} + +static void +vmbus_chan_ins_list(struct vmbus_softc *sc, struct vmbus_channel *chan) +{ + + mtx_assert(&sc->vmbus_chan_lock, MA_OWNED); + if (atomic_testandset_int(&chan->ch_stflags, + VMBUS_CHAN_ST_ONLIST_SHIFT)) + panic("channel is already on the list"); + TAILQ_INSERT_TAIL(&sc->vmbus_chans, chan, ch_link); +} + +static void +vmbus_chan_rem_list(struct vmbus_softc *sc, struct vmbus_channel *chan) +{ + + mtx_assert(&sc->vmbus_chan_lock, MA_OWNED); + if (atomic_testandclear_int(&chan->ch_stflags, + VMBUS_CHAN_ST_ONLIST_SHIFT) == 0) + panic("channel is not on the list"); + TAILQ_REMOVE(&sc->vmbus_chans, chan, ch_link); +} + static int vmbus_chan_sysctl_mnf(SYSCTL_HANDLER_ARGS) { @@ -235,6 +332,7 @@ vmbus_chan_open_br(struct vmbus_channel struct vmbus_msghc *mh; uint32_t status; int error, txbr_size, rxbr_size; + task_fn_t *task_fn; uint8_t *br; if (udlen > VMBUS_CHANMSG_CHOPEN_UDATA_SIZE) { @@ -269,9 +367,10 @@ vmbus_chan_open_br(struct vmbus_channel chan->ch_tq = VMBUS_PCPU_GET(chan->ch_vmbus, event_tq, chan->ch_cpuid); if (chan->ch_flags & VMBUS_CHAN_FLAG_BATCHREAD) - TASK_INIT(&chan->ch_task, 0, vmbus_chan_task, chan); + task_fn = vmbus_chan_task; else - TASK_INIT(&chan->ch_task, 0, vmbus_chan_task_nobatch, chan); + task_fn = vmbus_chan_task_nobatch; + TASK_INIT(&chan->ch_task, 0, task_fn, chan); /* TX bufring comes first */ vmbus_txbr_setup(&chan->ch_txbr, br, txbr_size); @@ -293,6 +392,12 @@ vmbus_chan_open_br(struct vmbus_channel } /* + * Install this channel, before it is opened, but after everything + * else has been setup. + */ + vmbus_chan_set_chmap(chan); + + /* * Open channel w/ the bufring GPADL on the target CPU. */ mh = vmbus_msghc_get(sc, sizeof(*req)); @@ -341,6 +446,7 @@ vmbus_chan_open_br(struct vmbus_channel error = ENXIO; failed: + vmbus_chan_clear_chmap(chan); if (chan->ch_bufring_gpadl) { vmbus_chan_gpadl_disconnect(chan, chan->ch_bufring_gpadl); chan->ch_bufring_gpadl = 0; @@ -517,12 +623,38 @@ vmbus_chan_gpadl_disconnect(struct vmbus } static void +vmbus_chan_clrchmap_task(void *xchan, int pending __unused) +{ + struct vmbus_channel *chan = xchan; + + critical_enter(); + chan->ch_vmbus->vmbus_chmap[chan->ch_id] = NULL; + critical_exit(); +} + +static void +vmbus_chan_clear_chmap(struct vmbus_channel *chan) +{ + struct task chmap_task; + + TASK_INIT(&chmap_task, 0, vmbus_chan_clrchmap_task, chan); + taskqueue_enqueue(chan->ch_tq, &chmap_task); + taskqueue_drain(chan->ch_tq, &chmap_task); +} + +static void +vmbus_chan_set_chmap(struct vmbus_channel *chan) +{ + __compiler_membar(); + chan->ch_vmbus->vmbus_chmap[chan->ch_id] = chan; +} + +static void vmbus_chan_close_internal(struct vmbus_channel *chan) { struct vmbus_softc *sc = chan->ch_vmbus; struct vmbus_msghc *mh; struct vmbus_chanmsg_chclose *req; - struct taskqueue *tq = chan->ch_tq; int error; /* TODO: stringent check */ @@ -535,12 +667,14 @@ vmbus_chan_close_internal(struct vmbus_c sysctl_ctx_free(&chan->ch_sysctl_ctx); /* - * Set ch_tq to NULL to avoid more requests be scheduled. - * XXX pretty broken; need rework. + * NOTE: + * Order is critical. This channel _must_ be uninstalled first, + * else the channel task may be enqueued by the IDT after it has + * been drained. */ + vmbus_chan_clear_chmap(chan); + taskqueue_drain(chan->ch_tq, &chan->ch_task); chan->ch_tq = NULL; - taskqueue_drain(tq, &chan->ch_task); - chan->ch_cb = NULL; /* * Close this channel. @@ -884,10 +1018,11 @@ vmbus_event_flags_proc(struct vmbus_soft flags &= ~(1UL << chid_ofs); chan = sc->vmbus_chmap[chid_base + chid_ofs]; - - /* if channel is closed or closing */ - if (chan == NULL || chan->ch_tq == NULL) + if (__predict_false(chan == NULL)) { + /* Channel is closed. */ continue; + } + __compiler_membar(); if (chan->ch_flags & VMBUS_CHAN_FLAG_BATCHREAD) vmbus_rxbr_intr_mask(&chan->ch_rxbr); @@ -968,7 +1103,6 @@ vmbus_chan_alloc(struct vmbus_softc *sc) chan->ch_vmbus = sc; mtx_init(&chan->ch_subchan_lock, "vmbus subchan", NULL, MTX_DEF); TAILQ_INIT(&chan->ch_subchans); - TASK_INIT(&chan->ch_detach_task, 0, vmbus_chan_detach_task, chan); vmbus_rxbr_init(&chan->ch_rxbr); vmbus_txbr_init(&chan->ch_txbr); @@ -978,9 +1112,14 @@ vmbus_chan_alloc(struct vmbus_softc *sc) static void vmbus_chan_free(struct vmbus_channel *chan) { - /* TODO: assert sub-channel list is empty */ - /* TODO: asset no longer on the primary channel's sub-channel list */ - /* TODO: asset no longer on the vmbus channel list */ + + KASSERT(TAILQ_EMPTY(&chan->ch_subchans) && chan->ch_subchan_cnt == 0, + ("still owns sub-channels")); + KASSERT((chan->ch_stflags & + (VMBUS_CHAN_ST_OPENED | + VMBUS_CHAN_ST_ONPRIL | + VMBUS_CHAN_ST_ONSUBL | + VMBUS_CHAN_ST_ONLIST)) == 0, ("free busy channel")); hyperv_dmamem_free(&chan->ch_monprm_dma, chan->ch_monprm); mtx_destroy(&chan->ch_subchan_lock); vmbus_rxbr_deinit(&chan->ch_rxbr); @@ -1007,7 +1146,6 @@ vmbus_chan_add(struct vmbus_channel *new newchan->ch_id); return EINVAL; } - sc->vmbus_chmap[newchan->ch_id] = newchan; if (bootverbose) { device_printf(sc->vmbus_dev, "chan%u subidx%u offer\n", @@ -1029,10 +1167,9 @@ vmbus_chan_add(struct vmbus_channel *new if (VMBUS_CHAN_ISPRIMARY(newchan)) { if (prichan == NULL) { /* Install the new primary channel */ - TAILQ_INSERT_TAIL(&sc->vmbus_prichans, newchan, - ch_prilink); + vmbus_chan_ins_prilist(sc, newchan); mtx_unlock(&sc->vmbus_prichan_lock); - return 0; + goto done; } else { mtx_unlock(&sc->vmbus_prichan_lock); device_printf(sc->vmbus_dev, "duplicated primary " @@ -1066,16 +1203,20 @@ vmbus_chan_add(struct vmbus_channel *new newchan->ch_dev = prichan->ch_dev; mtx_lock(&prichan->ch_subchan_lock); - TAILQ_INSERT_TAIL(&prichan->ch_subchans, newchan, ch_sublink); + vmbus_chan_ins_sublist(prichan, newchan); + mtx_unlock(&prichan->ch_subchan_lock); /* - * Bump up sub-channel count and notify anyone that is - * interested in this sub-channel, after this sub-channel - * is setup. + * Notify anyone that is interested in this sub-channel, + * after this sub-channel is setup. */ - prichan->ch_subchan_cnt++; - mtx_unlock(&prichan->ch_subchan_lock); wakeup(prichan); - +done: + /* + * Hook this channel up for later rescind. + */ + mtx_lock(&sc->vmbus_chan_lock); + vmbus_chan_ins_list(sc, newchan); + mtx_unlock(&sc->vmbus_chan_lock); return 0; } @@ -1126,6 +1267,7 @@ vmbus_chan_msgproc_choffer(struct vmbus_ { const struct vmbus_chanmsg_choffer *offer; struct vmbus_channel *chan; + task_fn_t *detach_fn, *attach_fn; int error; offer = (const struct vmbus_chanmsg_choffer *)msg->msg_data; @@ -1174,6 +1316,21 @@ vmbus_chan_msgproc_choffer(struct vmbus_ &sc->vmbus_tx_evtflags[chan->ch_id >> VMBUS_EVTFLAG_SHIFT]; chan->ch_evtflag_mask = 1UL << (chan->ch_id & VMBUS_EVTFLAG_MASK); + /* + * Setup attach and detach tasks. + */ + if (VMBUS_CHAN_ISPRIMARY(chan)) { + chan->ch_mgmt_tq = sc->vmbus_devtq; + attach_fn = vmbus_prichan_attach_task; + detach_fn = vmbus_prichan_detach_task; + } else { + chan->ch_mgmt_tq = sc->vmbus_subchtq; + attach_fn = vmbus_subchan_attach_task; + detach_fn = vmbus_subchan_detach_task; + } + TASK_INIT(&chan->ch_attach_task, 0, attach_fn, chan); + TASK_INIT(&chan->ch_detach_task, 0, detach_fn, chan); + /* Select default cpu for this channel. */ vmbus_chan_cpu_default(chan); @@ -1184,22 +1341,9 @@ vmbus_chan_msgproc_choffer(struct vmbus_ vmbus_chan_free(chan); return; } - - if (VMBUS_CHAN_ISPRIMARY(chan)) { - /* - * Add device for this primary channel. - * - * NOTE: - * Error is ignored here; don't have much to do if error - * really happens. - */ - vmbus_add_child(chan); - } + taskqueue_enqueue(chan->ch_mgmt_tq, &chan->ch_attach_task); } -/* - * XXX pretty broken; need rework. - */ static void vmbus_chan_msgproc_chrescind(struct vmbus_softc *sc, const struct vmbus_message *msg) @@ -1219,91 +1363,162 @@ vmbus_chan_msgproc_chrescind(struct vmbu note->chm_chanid); } - chan = sc->vmbus_chmap[note->chm_chanid]; - if (chan == NULL) + /* + * Find and remove the target channel from the channel list. + */ + mtx_lock(&sc->vmbus_chan_lock); + TAILQ_FOREACH(chan, &sc->vmbus_chans, ch_link) { + if (chan->ch_id == note->chm_chanid) + break; + } + if (chan == NULL) { + mtx_unlock(&sc->vmbus_chan_lock); + device_printf(sc->vmbus_dev, "chan%u is not offered\n", + note->chm_chanid); return; - sc->vmbus_chmap[note->chm_chanid] = NULL; + } + vmbus_chan_rem_list(sc, chan); + mtx_unlock(&sc->vmbus_chan_lock); + + if (VMBUS_CHAN_ISPRIMARY(chan)) { + /* + * The target channel is a primary channel; remove the + * target channel from the primary channel list now, + * instead of later, so that it will not be found by + * other sub-channel offers, which are processed in + * this thread. + */ + mtx_lock(&sc->vmbus_prichan_lock); + vmbus_chan_rem_prilist(sc, chan); + mtx_unlock(&sc->vmbus_prichan_lock); + } - taskqueue_enqueue(taskqueue_thread, &chan->ch_detach_task); + /* Detach the target channel. */ + taskqueue_enqueue(chan->ch_mgmt_tq, &chan->ch_detach_task); } -static void -vmbus_chan_detach_task(void *xchan, int pending __unused) +static int +vmbus_chan_release(struct vmbus_channel *chan) { - struct vmbus_channel *chan = xchan; + struct vmbus_softc *sc = chan->ch_vmbus; + struct vmbus_chanmsg_chfree *req; + struct vmbus_msghc *mh; + int error; - if (VMBUS_CHAN_ISPRIMARY(chan)) { - /* Only primary channel owns the device */ - vmbus_delete_child(chan); - /* NOTE: DO NOT free primary channel for now */ + mh = vmbus_msghc_get(sc, sizeof(*req)); + if (mh == NULL) { + device_printf(sc->vmbus_dev, "can not get msg hypercall for " + "chfree(chan%u)\n", chan->ch_id); + return (ENXIO); + } + + req = vmbus_msghc_dataptr(mh); + req->chm_hdr.chm_type = VMBUS_CHANMSG_TYPE_CHFREE; + req->chm_chanid = chan->ch_id; + + error = vmbus_msghc_exec_noresult(mh); + vmbus_msghc_put(sc, mh); + + if (error) { + device_printf(sc->vmbus_dev, "chfree(chan%u) failed: %d", + chan->ch_id, error); } else { - struct vmbus_softc *sc = chan->ch_vmbus; - struct vmbus_channel *pri_chan = chan->ch_prichan; - struct vmbus_chanmsg_chfree *req; - struct vmbus_msghc *mh; - int error; - - mh = vmbus_msghc_get(sc, sizeof(*req)); - if (mh == NULL) { - device_printf(sc->vmbus_dev, - "can not get msg hypercall for chfree(chan%u)\n", + if (bootverbose) { + device_printf(sc->vmbus_dev, "chan%u freed\n", chan->ch_id); - goto remove; } + } + return (error); +} - req = vmbus_msghc_dataptr(mh); - req->chm_hdr.chm_type = VMBUS_CHANMSG_TYPE_CHFREE; - req->chm_chanid = chan->ch_id; +static void +vmbus_prichan_detach_task(void *xchan, int pending __unused) +{ + struct vmbus_channel *chan = xchan; - error = vmbus_msghc_exec_noresult(mh); - vmbus_msghc_put(sc, mh); + KASSERT(VMBUS_CHAN_ISPRIMARY(chan), + ("chan%u is not primary channel", chan->ch_id)); - if (error) { - device_printf(sc->vmbus_dev, - "chfree(chan%u) failed: %d", - chan->ch_id, error); - /* NOTE: Move on! */ - } else { - if (bootverbose) { - device_printf(sc->vmbus_dev, "chan%u freed\n", - chan->ch_id); - } - } -remove: - mtx_lock(&pri_chan->ch_subchan_lock); - TAILQ_REMOVE(&pri_chan->ch_subchans, chan, ch_sublink); - KASSERT(pri_chan->ch_subchan_cnt > 0, - ("invalid subchan_cnt %d", pri_chan->ch_subchan_cnt)); - pri_chan->ch_subchan_cnt--; - mtx_unlock(&pri_chan->ch_subchan_lock); - wakeup(pri_chan); + /* Delete and detach the device associated with this channel. */ + vmbus_delete_child(chan); - vmbus_chan_free(chan); - } + /* Release this channel (back to vmbus). */ + vmbus_chan_release(chan); + + /* Free this channel's resource. */ + vmbus_chan_free(chan); +} + +static void +vmbus_subchan_detach_task(void *xchan, int pending __unused) +{ + struct vmbus_channel *chan = xchan; + struct vmbus_channel *pri_chan = chan->ch_prichan; + + KASSERT(!VMBUS_CHAN_ISPRIMARY(chan), + ("chan%u is primary channel", chan->ch_id)); + + /* Release this channel (back to vmbus). */ + vmbus_chan_release(chan); + + /* Unlink from its primary channel's sub-channel list. */ + mtx_lock(&pri_chan->ch_subchan_lock); + vmbus_chan_rem_sublist(pri_chan, chan); + mtx_unlock(&pri_chan->ch_subchan_lock); + /* Notify anyone that is waiting for this sub-channel to vanish. */ + wakeup(pri_chan); + + /* Free this channel's resource. */ + vmbus_chan_free(chan); +} + +static void +vmbus_prichan_attach_task(void *xchan, int pending __unused) +{ + + /* + * Add device for this primary channel. + */ + vmbus_add_child(xchan); +} + +static void +vmbus_subchan_attach_task(void *xchan __unused, int pending __unused) +{ + + /* Nothing */ } -/* - * Detach all devices and destroy the corresponding primary channels. - */ void vmbus_chan_destroy_all(struct vmbus_softc *sc) { - struct vmbus_channel *chan; - mtx_lock(&sc->vmbus_prichan_lock); - while ((chan = TAILQ_FIRST(&sc->vmbus_prichans)) != NULL) { - KASSERT(VMBUS_CHAN_ISPRIMARY(chan), ("not primary channel")); - TAILQ_REMOVE(&sc->vmbus_prichans, chan, ch_prilink); - mtx_unlock(&sc->vmbus_prichan_lock); + /* + * Detach all devices and destroy the corresponding primary + * channels. + */ + for (;;) { + struct vmbus_channel *chan; - vmbus_delete_child(chan); - vmbus_chan_free(chan); + mtx_lock(&sc->vmbus_chan_lock); + TAILQ_FOREACH(chan, &sc->vmbus_chans, ch_link) { + if (VMBUS_CHAN_ISPRIMARY(chan)) + break; + } + if (chan == NULL) { + /* No more primary channels; done. */ + mtx_unlock(&sc->vmbus_chan_lock); + break; + } + vmbus_chan_rem_list(sc, chan); + mtx_unlock(&sc->vmbus_chan_lock); mtx_lock(&sc->vmbus_prichan_lock); + vmbus_chan_rem_prilist(sc, chan); + mtx_unlock(&sc->vmbus_prichan_lock); + + taskqueue_enqueue(chan->ch_mgmt_tq, &chan->ch_detach_task); } - bzero(sc->vmbus_chmap, - sizeof(struct vmbus_channel *) * VMBUS_CHAN_MAX); - mtx_unlock(&sc->vmbus_prichan_lock); } /* Modified: head/sys/dev/hyperv/vmbus/vmbus_chanvar.h ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chanvar.h Tue Sep 27 06:00:10 2016 (r306359) +++ head/sys/dev/hyperv/vmbus/vmbus_chanvar.h Tue Sep 27 06:30:24 2016 (r306360) @@ -124,8 +124,14 @@ struct vmbus_channel { struct hyperv_dma ch_bufring_dma; uint32_t ch_bufring_gpadl; - struct task ch_detach_task; + struct task ch_attach_task; /* run in ch_mgmt_tq */ + struct task ch_detach_task; /* run in ch_mgmt_tq */ + struct taskqueue *ch_mgmt_tq; + + /* If this is a primary channel */ TAILQ_ENTRY(vmbus_channel) ch_prilink; /* primary chan link */ + + TAILQ_ENTRY(vmbus_channel) ch_link; /* channel link */ uint32_t ch_subidx; /* subchan index */ volatile uint32_t ch_stflags; /* atomic-op */ /* VMBUS_CHAN_ST_ */ @@ -150,7 +156,13 @@ struct vmbus_channel { #define VMBUS_CHAN_TXF_HASMNF 0x0001 #define VMBUS_CHAN_ST_OPENED_SHIFT 0 +#define VMBUS_CHAN_ST_ONPRIL_SHIFT 1 +#define VMBUS_CHAN_ST_ONSUBL_SHIFT 2 +#define VMBUS_CHAN_ST_ONLIST_SHIFT 3 #define VMBUS_CHAN_ST_OPENED (1 << VMBUS_CHAN_ST_OPENED_SHIFT) +#define VMBUS_CHAN_ST_ONPRIL (1 << VMBUS_CHAN_ST_ONPRIL_SHIFT) +#define VMBUS_CHAN_ST_ONSUBL (1 << VMBUS_CHAN_ST_ONSUBL_SHIFT) +#define VMBUS_CHAN_ST_ONLIST (1 << VMBUS_CHAN_ST_ONLIST_SHIFT) struct vmbus_softc; struct vmbus_message; Modified: head/sys/dev/hyperv/vmbus/vmbus_var.h ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_var.h Tue Sep 27 06:00:10 2016 (r306359) +++ head/sys/dev/hyperv/vmbus/vmbus_var.h Tue Sep 27 06:30:24 2016 (r306360) @@ -107,14 +107,19 @@ struct vmbus_softc { struct hyperv_dma vmbus_mnf1_dma; struct hyperv_dma vmbus_mnf2_dma; - struct mtx vmbus_scan_lock; - uint32_t vmbus_scan_chcnt; -#define VMBUS_SCAN_CHCNT_DONE 0x80000000 - uint32_t vmbus_scan_devcnt; + bool vmbus_scandone; + struct task vmbus_scandone_task; + + struct taskqueue *vmbus_devtq; /* for dev attach/detach */ + struct taskqueue *vmbus_subchtq; /* for sub-chan attach/detach */ /* Primary channels */ struct mtx vmbus_prichan_lock; TAILQ_HEAD(, vmbus_channel) vmbus_prichans; + + /* Complete channel list */ + struct mtx vmbus_chan_lock; + TAILQ_HEAD(, vmbus_channel) vmbus_chans; }; #define VMBUS_FLAG_ATTACHED 0x0001 /* vmbus was attached */ From owner-svn-src-head@freebsd.org Tue Sep 27 07:13:58 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 562F1BEC000; Tue, 27 Sep 2016 07:13:58 +0000 (UTC) (envelope-from lohithbsd@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 282AECB0; Tue, 27 Sep 2016 07:13:58 +0000 (UTC) (envelope-from lohithbsd@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id 21so346738pfy.1; Tue, 27 Sep 2016 00:13:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:subject:to:message-id:mime-version; bh=tCNbpo5AfoBXpgGvSzhR0UJPyhs85Dr5Az4EkAZFJcc=; b=M/ZBmmf8Fe0WxF0soajLtEqOlUD5axFjneQSui3kJXwdbqRfMfryP3uqnFRKtWZgxv DNL3KxWXtbkNR5rGIGx65fQBJo4qbGQdTgIZboXDZLYVFP2x84hect+/3U9xYKS1HavU fkL/GBk4XF+u1nhbgGcXSfLXWQyhhSehmFzxJyIz5iuhG6/zPWfC06kYhm6jv4Kzwh+x rS71r1P4aw945GIhX4+Wi/SAiEBwDPUYMumW4saVr5yXUJ//UYM4dB8rfqHOggXK9tAW iAlhEeFB/gG/kfjOgPJe6xoBzCFrllD0OsbJaQp7ogPKUdGSKQyc7pX7BmlixLDZaDpa 0bCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:subject:to:message-id:mime-version; bh=tCNbpo5AfoBXpgGvSzhR0UJPyhs85Dr5Az4EkAZFJcc=; b=VoDJ+TnSTJerTBBlewXiu89blkHQPCNOGl3jM8Odv9yegxmd6Wz6rqhKo40oOwHscZ UBJLzXGcOzng0u9VKz3zi9/vJb/VCPxXOj6xUGTnoQf3EosSH5ULO8BZbx8WGQkIcQWp XHSl/nNkrax39pl22vafqy5PvclUp9E2AaXGpG58KmlOhepuLSb/nrFXM1vamg4ttTg5 T1qDb89yktIMlo+OVC+b+5ZRL2Mr8exf0TAZfgZNLZ0Qiye2izYGJqczd6Pc3UKs9JVZ alel0Orvkgex4Zf2kPTd7isBuA42lIExiQCH05Vm6kOlTWyT3AYuACaujMYAP6x9LHST Tumg== X-Gm-Message-State: AE9vXwMMvDms3mxexS88Ws2W67jeuvAbftybrpGaVAnjzI4nQoqBSKRRYIU1XQvBuTCKIQ== X-Received: by 10.98.101.66 with SMTP id z63mr45028175pfb.59.1474960437526; Tue, 27 Sep 2016 00:13:57 -0700 (PDT) Received: from [10.0.0.37] (c-69-181-167-248.hsd1.ca.comcast.net. [69.181.167.248]) by smtp.gmail.com with ESMTPSA id x9sm1986556pff.19.2016.09.27.00.13.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Sep 2016 00:13:56 -0700 (PDT) Date: Tue, 27 Sep 2016 00:13:43 -0700 From: lohith bellad Subject: Re: svn commit: r306337 - head/sys/kern To: svn-src-head@freebsd.org, hiren panchasara , freebsd-current-request@freebsd.org, bde@FreeBSD.org Message-Id: <1474960423.1281.0@smtp.gmail.com> X-Mailer: geary/0.10.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 07:13:58 -0000 Hi Bruce and Hiren, This is regarding the following commit, which led to kernel panic!!! https://svnweb.freebsd.org/base?view=revision&revision=306337 Discussion thread regarding the kernel panic, https://lists.freebsd.org/pipermail/svn-src-head/2016-September/092110.html Thanks a lot for the input and sorry for the trouble created. Modified diff: Since its not possible to check and free the control mbuf correclty in sendit() routine. We can clear the control mbuf in kern_sendit() routine after checking correctly. Here is the diff, Index: sys/kern/uipc_syscalls.c =================================================================== --- sys/kern/uipc_syscalls.c (revision 305955) +++ sys/kern/uipc_syscalls.c (working copy) @@ -809,6 +809,9 @@ } if (error == 0) td->td_retval[0] = len - auio.uio_resid; + + /* call to sosend would have cleared control */ + control = NULL; #ifdef KTRACE if (ktruio != NULL) { ktruio->uio_resid = td->td_retval[0]; @@ -816,6 +819,8 @@ } #endif bad: + if (control != NULL) + m_freem(control); fdrop(fp, td); return (error); } Since, we know for sure sosend() routine will consume the control mbuf if its present else it will clear the mbuf. So, making control = NULL, after the call to sosend() will prevent double freeing of control mbuf. If there are any errors before call to sosend() in kern_sendit(), for example EBADF (Bad File Descriptor) then we will fall to "bad:" and if control != NULL, we will clear the mbuf. This way mbuf leak for EBADF is also prevented. If this looks good. Can we commit this. Cheers, Lohith From owner-svn-src-head@freebsd.org Tue Sep 27 08:11:10 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FD39BEAC78; Tue, 27 Sep 2016 08:11:10 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62C7CDED; Tue, 27 Sep 2016 08:11:10 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8R8B9Uv099488; Tue, 27 Sep 2016 08:11:09 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8R8B9c1099487; Tue, 27 Sep 2016 08:11:09 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201609270811.u8R8B9c1099487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Tue, 27 Sep 2016 08:11:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306362 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 08:11:10 -0000 Author: kevlo Date: Tue Sep 27 08:11:09 2016 New Revision: 306362 URL: https://svnweb.freebsd.org/changeset/base/306362 Log: Remove a comment about the size of the ifnet structure. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D8036 Modified: head/sys/net/if_var.h Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Tue Sep 27 07:29:15 2016 (r306361) +++ head/sys/net/if_var.h Tue Sep 27 08:11:09 2016 (r306362) @@ -178,9 +178,6 @@ struct if_encap_req { /* * Structure defining a network interface. - * - * Size ILP32: 592 (approx) - * LP64: 1048 (approx) */ struct ifnet { /* General book keeping of interface lists. */ From owner-svn-src-head@freebsd.org Tue Sep 27 08:19:39 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 189B6BEAE50; Tue, 27 Sep 2016 08:19:39 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA85B1F8; Tue, 27 Sep 2016 08:19:38 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [192.168.1.10] (unknown [192.168.1.10]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id BAA1812CF; Tue, 27 Sep 2016 08:14:22 +0000 (UTC) Subject: Re: svn commit: r305353 - in head/sys/boot: i386 i386/boot0 i386/boot2 i386/btx/btx i386/btx/btxldr i386/cdboot i386/gptboot i386/gptzfsboot i386/mbr i386/pmbr i386/pxeldr i386/zfsboot pc98 pc98/boot0 ... To: Warner Losh , John Baldwin References: <201609031526.u83FQSCZ017350@repo.freebsd.org> <4af03d4b-5e5e-2482-c21f-538d95e921b6@freebsd.org> <1577832.dOPa6L4zTd@ralph.baldwin.cx> Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Ed Maste From: Allan Jude Message-ID: <88d79107-7fbc-1dfd-4ea9-feceaf4a4fac@freebsd.org> Date: Tue, 27 Sep 2016 04:14:19 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 08:19:39 -0000 On 2016-09-27 01:02, Warner Losh wrote: > On Mon, Sep 26, 2016 at 11:00 AM, John Baldwin wrote: >> On Saturday, September 24, 2016 02:56:05 PM Warner Losh wrote: >>> On Fri, Sep 23, 2016 at 4:17 PM, Allan Jude wrote: >>>> On 09/03/16 11:26 AM, Warner Losh wrote: >>>>> Author: imp >>>>> Date: Sat Sep 3 15:26:28 2016 >>>>> New Revision: 305353 >>>>> URL: https://svnweb.freebsd.org/changeset/base/305353 >>>>> >>>>> Log: >>>>> Don't use -N to set the OMAGIC with data and text writeable and data >>>>> not page aligned. To do this, use the ld script gnu ld installs on my >>>>> system. >>>>> >>>>> This is imperfect: LDFLAGS_BIN and LD_FLAGS_BIN describe different >>>>> things. The loader script could be better named and take into account >>>>> other architectures. And having two different mechanisms to do >>>>> basically the same thing needs study. However, it's blocking forward >>>>> progress on lld, so I'll work in parallel to sort these out. >>>>> >>>>> Differential Revision: https://reviews.freebsd.org/D7409 >>>>> Reviewed by: emaste >>>>> >>>> >>>> This breaks booting on my Lenovo laptop. The BTX client crashes and >>>> dumps the registers. >>>> >>>> Reverting this commit solved it. >>>> >>>> Is there something I can do to help investigate this? >>> >>> I assume you bisected all boot loader changes and it fails across this >>> commit? If not, that's the first step. >>> >>> If so, perhaps the place to start is with the dump? >> >> The dump is a good place to start, but it would also be useful to know >> >> 1) Which stage dies (e.g. can you get into the gptboot/boot2 prompt meaning >> it it is probably btxldr.S dying trying to parse a.out header from >> /boot/loader vs are you dying before that point meaning it is in boot1.S >> or gptldr.S)? > > Yes. This is absolutely critical. Until we know what dies, what the > trace backs are, what options were in effect and how the binaries were > broken there's little more that I can do because it works for me > everywhere I've tried it. > >> 2) Once we know which stage, it would be good to compare the a.out headers >> and possibly the contents of the relevant binaries. The aforementioned >> .S files all parse the a.out header in assembly as well as the BTX >> header (they assume that BTX itself is present in the bits loaded from >> disk immediately followed by the binary header). That code isn't very >> flexible and it doesn't seem far fetched for this change to break it. > > I just wonder why it works on the amd64 servers and laptops, the i386 > laptops and in qemu for me, but fails for the OP. If it broke a.out, > I contend it would break for everybody since a.out headers are 'hit > dinosaur over the head' level of complexity and subtly. While I don't > doubt there's a problem, I suspect it is very specific to a particular > set of laptops that were on the edge before and this kicks us over the > edge just enough to stomp on some area that was protected before. > > Warner > It works fine for me with a regular boot, but when booting a GELI encrypted disk, is dies. It is in boot2, before it reads the loader. Specifically, it seems to be at the call to: enc_xform_aes_xts.reinit [opencrypto aes_xts_reinit()] Now that I am back home, I'll try to narrow it down further, and look at the difference between gptzfsboot compiled with and without the different LD flags. It works perfectly fine with the makefile changes reverted. -- Allan Jude From owner-svn-src-head@freebsd.org Tue Sep 27 08:47:04 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 372FFBE98D0; Tue, 27 Sep 2016 08:47:04 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 049D014D; Tue, 27 Sep 2016 08:47:03 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8R8l3TJ012205; Tue, 27 Sep 2016 08:47:03 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8R8l3vd012204; Tue, 27 Sep 2016 08:47:03 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201609270847.u8R8l3vd012204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Tue, 27 Sep 2016 08:47:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306363 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 08:47:04 -0000 Author: kevlo Date: Tue Sep 27 08:47:02 2016 New Revision: 306363 URL: https://svnweb.freebsd.org/changeset/base/306363 Log: - Prefer if_addrhead (FreeBSD) to if_addrlist (BSD compat) naming for the interface address list - Update IFF_RENAMING macro descriptions Modified: head/share/man/man9/ifnet.9 Modified: head/share/man/man9/ifnet.9 ============================================================================== --- head/share/man/man9/ifnet.9 Tue Sep 27 08:11:09 2016 (r306362) +++ head/share/man/man9/ifnet.9 Tue Sep 27 08:47:02 2016 (r306363) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 11, 2016 +.Dd September 27, 2016 .Dt IFNET 9 .Os .Sh NAME @@ -642,7 +642,7 @@ structure of this interface is being rel .Va if_refcount references. .It Dv IFF_RENAMING -.Aq D* +.Aq D Set when this interface is being renamed. .El .Ss "Interface Capabilities Flags" @@ -1014,7 +1014,7 @@ Every interface is associated with a lis (or, rather, a .Li TAILQ ) of addresses, rooted at the interface structure's -.Va if_addrlist +.Va if_addrhead member. The first element in this list is always an .Dv AF_LINK From owner-svn-src-head@freebsd.org Tue Sep 27 09:44:31 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE27CBEBCF3; Tue, 27 Sep 2016 09:44:31 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E9A26A0; Tue, 27 Sep 2016 09:44:31 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8R9iUAU035008; Tue, 27 Sep 2016 09:44:30 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8R9iUqi035006; Tue, 27 Sep 2016 09:44:30 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609270944.u8R9iUqi035006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 27 Sep 2016 09:44:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306364 - in head: lib/libc/tests share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 09:44:31 -0000 Author: br Date: Tue Sep 27 09:44:30 2016 New Revision: 306364 URL: https://svnweb.freebsd.org/changeset/base/306364 Log: Mark SSP broken on MIPS. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/lib/libc/tests/Makefile head/share/mk/src.opts.mk Modified: head/lib/libc/tests/Makefile ============================================================================== --- head/lib/libc/tests/Makefile Tue Sep 27 08:47:02 2016 (r306363) +++ head/lib/libc/tests/Makefile Tue Sep 27 09:44:30 2016 (r306364) @@ -30,8 +30,7 @@ SUBDIR_DEPEND_tls= tls_dso TESTS_SUBDIRS+= locale .endif -.if ${MK_SSP} != "no" && \ - ${MACHINE_CPUARCH} != "mips" +.if ${MK_SSP} != "no" TESTS_SUBDIRS+= ssp .endif Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Tue Sep 27 08:47:02 2016 (r306363) +++ head/share/mk/src.opts.mk Tue Sep 27 09:44:30 2016 (r306364) @@ -260,6 +260,9 @@ BROKEN_OPTIONS+=LLDB .if ${__T} != "armv6" BROKEN_OPTIONS+=LIBSOFT .endif +.if ${__T} == "mips" || ${__T} == "mips64" +BROKEN_OPTIONS+=SSP +.endif .include From owner-svn-src-head@freebsd.org Tue Sep 27 11:31:55 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35CBEBEBBC3; Tue, 27 Sep 2016 11:31:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E492F8F4; Tue, 27 Sep 2016 11:31:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8RBVsLQ074762; Tue, 27 Sep 2016 11:31:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RBVsTH074760; Tue, 27 Sep 2016 11:31:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609271131.u8RBVsTH074760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 27 Sep 2016 11:31:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306366 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 11:31:55 -0000 Author: kib Date: Tue Sep 27 11:31:53 2016 New Revision: 306366 URL: https://svnweb.freebsd.org/changeset/base/306366 Log: Editing fixes for r306257, documentation for trapcap. Suggested by: wblock Discussed with: jilles Reviewed by: cem (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D8023 Modified: head/lib/libc/sys/cap_enter.2 head/lib/libc/sys/procctl.2 Modified: head/lib/libc/sys/cap_enter.2 ============================================================================== --- head/lib/libc/sys/cap_enter.2 Tue Sep 27 10:26:39 2016 (r306365) +++ head/lib/libc/sys/cap_enter.2 Tue Sep 27 11:31:53 2016 (r306366) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 22, 2016 +.Dd September 27, 2016 .Dt CAP_ENTER 2 .Os .Sh NAME @@ -72,15 +72,15 @@ sandbox. .Sh RUN-TIME SETTINGS If the .Dv kern.trap_enocap -sysctl MIB is set to non-zero value, then for any process executing in a +sysctl MIB is set to a non-zero value, then for any process executing in a capability mode sandbox, any syscall which results in either .Er ENOTCAPABLE or .Er ECAPMODE -error, also generates the synchronous +error also generates the synchronous .Dv SIGTRAP signal to the thread on the syscall return. -On the signal delivery, the +On signal delivery, the .Va si_errno member of the .Fa siginfo Modified: head/lib/libc/sys/procctl.2 ============================================================================== --- head/lib/libc/sys/procctl.2 Tue Sep 27 10:26:39 2016 (r306365) +++ head/lib/libc/sys/procctl.2 Tue Sep 27 11:31:53 2016 (r306366) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 22, 2016 +.Dd September 27, 2016 .Dt PROCCTL 2 .Os .Sh NAME @@ -328,14 +328,17 @@ If a debugger is attached, .Fa data is set to the pid of the debugger process. .It Dv PROC_TRAPCAP_CTL -Enable or disable, for the specified processes which are executing in a -capability mode sandbox, the synchronous -.Dv SIGTRAP -signal on return from any syscall which gives either +Controls the capability mode sandbox actions for the specified +sandboxed processes, +on a return from any syscall which gives either a .Er ENOTCAPABLE or .Er ECAPMODE error. +If the control is enabled, such errors from the syscalls cause +delivery of the synchronous +.Dv SIGTRAP +signal to the thread immediately before returning from the syscalls. .Pp Possible values for the .Fa data @@ -353,7 +356,8 @@ calls. Disable the signal delivery on capability mode access violations. Note that the global sysctl .Dv kern.trap_enocap -might still cause the signal to be delivered; see +might still cause the signal to be delivered. +See .Xr capsicum 4 . .El .Pp @@ -371,7 +375,7 @@ See .Xr capsicum 4 for more information about the capability mode. .It Dv PROC_TRAPCAP_STATUS -Returns the current status of signalling capability mode access +Return the current status of signalling capability mode access violations for the specified process. The integer value pointed to by the .Fa data From owner-svn-src-head@freebsd.org Tue Sep 27 11:56:36 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1B54BEB4AC; Tue, 27 Sep 2016 11:56:36 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C44169A; Tue, 27 Sep 2016 11:56:36 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u8RBuUUi070737 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 27 Sep 2016 14:56:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u8RBuUUi070737 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u8RBuTkg070736; Tue, 27 Sep 2016 14:56:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 27 Sep 2016 14:56:29 +0300 From: Konstantin Belousov To: Slawa Olhovchenkov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306350 - head/sys/amd64/amd64 Message-ID: <20160927115629.GI38409@kib.kiev.ua> References: <201609261722.u8QHMi7g065274@repo.freebsd.org> <20160926212828.GC6177@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160926212828.GC6177@zxy.spb.ru> User-Agent: Mutt/1.6.1 (2016-04-27) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 11:56:36 -0000 On Tue, Sep 27, 2016 at 12:28:28AM +0300, Slawa Olhovchenkov wrote: > On Mon, Sep 26, 2016 at 05:22:44PM +0000, Konstantin Belousov wrote: > > > Author: kib > > Date: Mon Sep 26 17:22:44 2016 > > New Revision: 306350 > > URL: https://svnweb.freebsd.org/changeset/base/306350 > > > > Log: > > For machines which support PCID but not have INVPCID instruction, > > i.e. SandyBridge and IvyBridge, correct a race between pmap_activate() > > and invltlb_pcid_handler(). > > > > Reported by and tested by: Slawa Olhovchenkov > > MFC after: 1 week > > Thanks! > Planed commit to releng? Or SA? A notice on the errata page is planned. From owner-svn-src-head@freebsd.org Tue Sep 27 12:03:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D1FCBEBFAE; Tue, 27 Sep 2016 12:03:34 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C378EE84; Tue, 27 Sep 2016 12:03:33 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1bor6g-000KUU-So; Tue, 27 Sep 2016 15:03:30 +0300 Date: Tue, 27 Sep 2016 15:03:30 +0300 From: Slawa Olhovchenkov To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306350 - head/sys/amd64/amd64 Message-ID: <20160927120330.GB54003@zxy.spb.ru> References: <201609261722.u8QHMi7g065274@repo.freebsd.org> <20160926212828.GC6177@zxy.spb.ru> <20160927115629.GI38409@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160927115629.GI38409@kib.kiev.ua> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 12:03:34 -0000 On Tue, Sep 27, 2016 at 02:56:29PM +0300, Konstantin Belousov wrote: > On Tue, Sep 27, 2016 at 12:28:28AM +0300, Slawa Olhovchenkov wrote: > > On Mon, Sep 26, 2016 at 05:22:44PM +0000, Konstantin Belousov wrote: > > > > > Author: kib > > > Date: Mon Sep 26 17:22:44 2016 > > > New Revision: 306350 > > > URL: https://svnweb.freebsd.org/changeset/base/306350 > > > > > > Log: > > > For machines which support PCID but not have INVPCID instruction, > > > i.e. SandyBridge and IvyBridge, correct a race between pmap_activate() > > > and invltlb_pcid_handler(). > > > > > > Reported by and tested by: Slawa Olhovchenkov > > > MFC after: 1 week > > > > Thanks! > > Planed commit to releng? Or SA? > > A notice on the errata page is planned. EN, not SA? I think this is exploitable. From owner-svn-src-head@freebsd.org Tue Sep 27 13:46:01 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99D2FBEBCD3; Tue, 27 Sep 2016 13:46:01 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 652711C7; Tue, 27 Sep 2016 13:46:01 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8RDk0Sp024650; Tue, 27 Sep 2016 13:46:00 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RDk0nQ024649; Tue, 27 Sep 2016 13:46:00 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609271346.u8RDk0nQ024649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 27 Sep 2016 13:46:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306367 - head/contrib/netbsd-tests/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 13:46:01 -0000 Author: br Date: Tue Sep 27 13:46:00 2016 New Revision: 306367 URL: https://svnweb.freebsd.org/changeset/base/306367 Log: Allow up to 6 arguments only on MIPS. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c Tue Sep 27 11:31:53 2016 (r306366) +++ head/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c Tue Sep 27 13:46:00 2016 (r306367) @@ -55,6 +55,8 @@ run(int n, ...) for (i = 0; i < 5; i++) { #elif defined(__FreeBSD__) && defined(__aarch64__) for (i = 0; i < 7; i++) { +#elif defined(__FreeBSD__) && defined(__mips__) + for (i = 0; i < 5; i++) { #else for (i = 0; i < 9; i++) { #endif @@ -122,6 +124,10 @@ ATF_TC_BODY(setcontext_link, tc) /* FreeBSD/arm64 only permits up to 8 arguments. */ makecontext(&uc[i], (void *)run, 8, i, 0, 1, 2, 3, 4, 5, 6); +#elif defined(__FreeBSD__) && defined(__mips__) + /* FreeBSD/mips only permits up to 6 arguments. */ + makecontext(&uc[i], (void *)run, 6, i, + 0, 1, 2, 3, 4); #else makecontext(&uc[i], (void *)run, 10, i, 0, 1, 2, 3, 4, 5, 6, 7, 8); From owner-svn-src-head@freebsd.org Tue Sep 27 17:36:37 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F8DABECD1A for ; Tue, 27 Sep 2016 17:36:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D5619A83 for ; Tue, 27 Sep 2016 17:36:36 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x231.google.com with SMTP id 92so22249230iol.2 for ; Tue, 27 Sep 2016 10:36:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=zMrCJenGpAJ9hj3qmslEZ+DAvX9E4lUvTWwl+8k0NRA=; b=YpMy43ZGvfr8/5FCCtumOY3rqH2wxE+XiAebOSzH6f5xmjTAUHfhpBOAhjWpOhRllG bRN7Pc7Vub2DoEerx0iJmkHU+ypPsamzU60WVxG/vRjiJHMGGNB1CRjww0/zsmlCMpby BwAA2R2esqx31TzmSiozqpIPS5s55su6EH+4EW2kb/WvVYdaBpE1ejrmrsymcXNuyJ7P a8YAnYfb10KPZN1u/+Nv/ufGWvygGuSyJTbeoLP0tE3lWEgpHtVFoE1nYaESAbbHYDyX 6hlRPx/0zkMgMYe2A/loIrrTA0jsevW2JrK6u4c4dLsuQzfPbmbYy1FeDwG5sxJ6Pksq MsXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=zMrCJenGpAJ9hj3qmslEZ+DAvX9E4lUvTWwl+8k0NRA=; b=XK70tRMcRItQYbqX7oBN4Q++tIY5YSEsnvpFSRNAkBYTPq9G1z0gj4X35TikA8RcFh NK48Z+QZJeT40ciT8BMrOsw0REBWK5oorK86cLZdy4xEDSjP4DAPbsxLr0KBO/1TWZdi mgLdW9q/J8yzn9T1pxvBP0fx/T054bWpbMSqTDxOpUSvTDpte2eL1opvMXdGYioK2nag BF0ZuK+nw33/bC7ewvXmlNmR95k0stEN6qBKCJ0PnyWuBu9TZ9wQDYaH7wnODIQBXITT 0DSyXPeplyK7fJ337c5Ywz29PLammE81cKLQvUxmtfxwG6vhZdQZQzZCoMEyCx4poq4r ioGQ== X-Gm-Message-State: AE9vXwOsxsMDPIEiYkXUVz9eEA+hgGk4lpVJ2z8CHezPX19x0ohIl1LZczx7iAUXxRVevf+Ljy1GbZ6cATQspA== X-Received: by 10.107.161.210 with SMTP id k201mr35211433ioe.65.1474997795478; Tue, 27 Sep 2016 10:36:35 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Tue, 27 Sep 2016 10:36:34 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: <88d79107-7fbc-1dfd-4ea9-feceaf4a4fac@freebsd.org> References: <201609031526.u83FQSCZ017350@repo.freebsd.org> <4af03d4b-5e5e-2482-c21f-538d95e921b6@freebsd.org> <1577832.dOPa6L4zTd@ralph.baldwin.cx> <88d79107-7fbc-1dfd-4ea9-feceaf4a4fac@freebsd.org> From: Warner Losh Date: Tue, 27 Sep 2016 11:36:34 -0600 X-Google-Sender-Auth: Py2ewdNq8wk86rkbtdCS_6pT3PY Message-ID: Subject: Re: svn commit: r305353 - in head/sys/boot: i386 i386/boot0 i386/boot2 i386/btx/btx i386/btx/btxldr i386/cdboot i386/gptboot i386/gptzfsboot i386/mbr i386/pmbr i386/pxeldr i386/zfsboot pc98 pc98/boot0 ... To: Allan Jude Cc: John Baldwin , Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Ed Maste Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 17:36:37 -0000 On Tue, Sep 27, 2016 at 2:14 AM, Allan Jude wrote: > On 2016-09-27 01:02, Warner Losh wrote: >> On Mon, Sep 26, 2016 at 11:00 AM, John Baldwin wrote: >>> On Saturday, September 24, 2016 02:56:05 PM Warner Losh wrote: >>>> On Fri, Sep 23, 2016 at 4:17 PM, Allan Jude wrote: >>>>> On 09/03/16 11:26 AM, Warner Losh wrote: >>>>>> Author: imp >>>>>> Date: Sat Sep 3 15:26:28 2016 >>>>>> New Revision: 305353 >>>>>> URL: https://svnweb.freebsd.org/changeset/base/305353 >>>>>> >>>>>> Log: >>>>>> Don't use -N to set the OMAGIC with data and text writeable and data >>>>>> not page aligned. To do this, use the ld script gnu ld installs on my >>>>>> system. >>>>>> >>>>>> This is imperfect: LDFLAGS_BIN and LD_FLAGS_BIN describe different >>>>>> things. The loader script could be better named and take into account >>>>>> other architectures. And having two different mechanisms to do >>>>>> basically the same thing needs study. However, it's blocking forward >>>>>> progress on lld, so I'll work in parallel to sort these out. >>>>>> >>>>>> Differential Revision: https://reviews.freebsd.org/D7409 >>>>>> Reviewed by: emaste >>>>>> >>>>> >>>>> This breaks booting on my Lenovo laptop. The BTX client crashes and >>>>> dumps the registers. >>>>> >>>>> Reverting this commit solved it. >>>>> >>>>> Is there something I can do to help investigate this? >>>> >>>> I assume you bisected all boot loader changes and it fails across this >>>> commit? If not, that's the first step. >>>> >>>> If so, perhaps the place to start is with the dump? >>> >>> The dump is a good place to start, but it would also be useful to know >>> >>> 1) Which stage dies (e.g. can you get into the gptboot/boot2 prompt meaning >>> it it is probably btxldr.S dying trying to parse a.out header from >>> /boot/loader vs are you dying before that point meaning it is in boot1.S >>> or gptldr.S)? >> >> Yes. This is absolutely critical. Until we know what dies, what the >> trace backs are, what options were in effect and how the binaries were >> broken there's little more that I can do because it works for me >> everywhere I've tried it. >> >>> 2) Once we know which stage, it would be good to compare the a.out headers >>> and possibly the contents of the relevant binaries. The aforementioned >>> .S files all parse the a.out header in assembly as well as the BTX >>> header (they assume that BTX itself is present in the bits loaded from >>> disk immediately followed by the binary header). That code isn't very >>> flexible and it doesn't seem far fetched for this change to break it. >> >> I just wonder why it works on the amd64 servers and laptops, the i386 >> laptops and in qemu for me, but fails for the OP. If it broke a.out, >> I contend it would break for everybody since a.out headers are 'hit >> dinosaur over the head' level of complexity and subtly. While I don't >> doubt there's a problem, I suspect it is very specific to a particular >> set of laptops that were on the edge before and this kicks us over the >> edge just enough to stomp on some area that was protected before. >> >> Warner >> > > It works fine for me with a regular boot, but when booting a GELI > encrypted disk, is dies. > > It is in boot2, before it reads the loader. > > Specifically, it seems to be at the call to: enc_xform_aes_xts.reinit > [opencrypto aes_xts_reinit()] > > Now that I am back home, I'll try to narrow it down further, and look at > the difference between gptzfsboot compiled with and without the > different LD flags. > > It works perfectly fine with the makefile changes reverted. OK. Thanks Allan. Since I didn't test gel-booting, I can believe it failed there. Please let me know if you need more help or followup. Warner From owner-svn-src-head@freebsd.org Tue Sep 27 17:37:25 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03502BECD84; Tue, 27 Sep 2016 17:37:25 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8A65C1B; Tue, 27 Sep 2016 17:37:24 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8RHbOBp012067; Tue, 27 Sep 2016 17:37:24 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RHbOdX012066; Tue, 27 Sep 2016 17:37:24 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201609271737.u8RHbOdX012066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Tue, 27 Sep 2016 17:37:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306371 - head/sbin/ifconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 17:37:25 -0000 Author: araujo Date: Tue Sep 27 17:37:23 2016 New Revision: 306371 URL: https://svnweb.freebsd.org/changeset/base/306371 Log: Indicate that this is a locally administered MAC address. Submitted by: lidl Differential Revision: https://reviews.freebsd.org/D7903 Modified: head/sbin/ifconfig/af_link.c Modified: head/sbin/ifconfig/af_link.c ============================================================================== --- head/sbin/ifconfig/af_link.c Tue Sep 27 17:27:07 2016 (r306370) +++ head/sbin/ifconfig/af_link.c Tue Sep 27 17:37:23 2016 (r306371) @@ -96,8 +96,9 @@ link_getaddr(const char *addr, int which sdl.sdl_nlen = 0; sdl.sdl_family = AF_LINK; arc4random_buf(&sdl.sdl_data, ETHER_ADDR_LEN); - /* Non-multicast and claim it is a hardware address */ + /* Non-multicast and claim it is locally administered. */ sdl.sdl_data[0] &= 0xfc; + sdl.sdl_data[0] |= 0x02; } else { if ((temp = malloc(strlen(addr) + 2)) == NULL) errx(1, "malloc failed"); From owner-svn-src-head@freebsd.org Tue Sep 27 18:08:40 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08C8EBEC46E; Tue, 27 Sep 2016 18:08:40 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA9D018C; Tue, 27 Sep 2016 18:08:39 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8RI8d4r024100; Tue, 27 Sep 2016 18:08:39 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RI8cUa024092; Tue, 27 Sep 2016 18:08:38 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609271808.u8RI8cUa024092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 27 Sep 2016 18:08:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306375 - in head: . gnu/usr.bin lib share/mk tools/build/mk tools/build/options usr.bin usr.sbin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 18:08:40 -0000 Author: emaste Date: Tue Sep 27 18:08:38 2016 New Revision: 306375 URL: https://svnweb.freebsd.org/changeset/base/306375 Log: Add a WITHOUT_DIALOG src.conf(5) knob It also turns off dependencies (bsdinstall, bsdconfig, dpv, tzsetup). Reviewed by: dteske Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7969 Added: head/tools/build/options/WITHOUT_DIALOG (contents, props changed) Modified: head/Makefile.inc1 head/gnu/usr.bin/Makefile head/lib/Makefile head/share/mk/src.opts.mk head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/Makefile head/usr.sbin/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Sep 27 18:07:22 2016 (r306374) +++ head/Makefile.inc1 Tue Sep 27 18:08:38 2016 (r306375) @@ -2032,8 +2032,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 ${_cddl_lib_libctf} \ lib/libutil lib/libpjdlog ${_lib_libypclnt} lib/libz lib/msun \ ${_secure_lib_libcrypto} ${_lib_libldns} \ - ${_secure_lib_libssh} ${_secure_lib_libssl} \ - gnu/lib/libdialog + ${_secure_lib_libssh} ${_secure_lib_libssl} .if ${MK_GNUCXX} != "no" _prebuild_libs+= gnu/lib/libstdc++ gnu/lib/libsupc++ @@ -2041,6 +2040,11 @@ gnu/lib/libstdc++__L: lib/msun__L gnu/lib/libsupc++__L: gnu/lib/libstdc++__L .endif +.if ${MK_DIALOG} != "no" +_prebuild_libs+= gnu/lib/libdialog +gnu/lib/libdialog__L: lib/msun__L lib/ncurses/ncursesw__L +.endif + .if ${MK_LIBCPLUSPLUS} != "no" _prebuild_libs+= lib/libc++ .endif @@ -2190,8 +2194,6 @@ lib/libproc__L: gnu/lib/libsupc++__L .endif .endif -gnu/lib/libdialog__L: lib/msun__L lib/ncurses/ncursesw__L - .for _lib in ${_prereq_libs} ${_lib}__PL: .PHONY .MAKE .if exists(${.CURDIR}/${_lib}) Modified: head/gnu/usr.bin/Makefile ============================================================================== --- head/gnu/usr.bin/Makefile Tue Sep 27 18:07:22 2016 (r306374) +++ head/gnu/usr.bin/Makefile Tue Sep 27 18:08:38 2016 (r306375) @@ -4,7 +4,6 @@ SUBDIR= ${_binutils} \ ${_cc} \ - dialog \ diff \ diff3 \ ${_dtc} \ @@ -49,6 +48,8 @@ _gdb= gdb _cc= cc .endif +SUBDIR.${MK_DIALOG}+= dialog + SUBDIR_PARALLEL= .include Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Tue Sep 27 18:07:22 2016 (r306374) +++ head/lib/Makefile Tue Sep 27 18:08:38 2016 (r306375) @@ -46,7 +46,6 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ ${_libdevdctl} \ libdevinfo \ libdevstat \ - libdpv \ libdwarf \ libedit \ ${_libelftc} \ @@ -197,6 +196,8 @@ _libelftc= libelftc _libpe= libpe .endif +SUBDIR.${MK_DIALOG}+= libdpv + .if ${MK_FILE} != "no" _libmagic= libmagic .endif Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Tue Sep 27 18:07:22 2016 (r306374) +++ head/share/mk/src.opts.mk Tue Sep 27 18:08:38 2016 (r306375) @@ -76,6 +76,7 @@ __DEFAULT_YES_OPTIONS = \ CTM \ CUSE \ CXX \ + DIALOG \ DICT \ DMAGENT \ DYNAMICROOT \ @@ -328,6 +329,10 @@ MK_GNUCXX:= no MK_TESTS:= no .endif +.if ${MK_DIALOG} == "no" +MK_BSDINSTALL:= no +.endif + .if ${MK_MAIL} == "no" MK_MAILWRAPPER:= no MK_SENDMAIL:= no Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Tue Sep 27 18:07:22 2016 (r306374) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Tue Sep 27 18:08:38 2016 (r306375) @@ -1340,6 +1340,27 @@ OLD_FILES+=usr/bin/g++ OLD_FILES+=usr/libexec/cc1plus .endif +.if ${MK_DIALOG} == no +OLD_FILES+=usr/bin/dialog +OLD_FILES+=usr/bin/dpv +OLD_FILES+=usr/lib/libdialog.a +OLD_FILES+=usr/lib/libdialog.so +OLD_FILES+=usr/lib/libdialog.so.8 +OLD_FILES+=usr/lib/libdialog_p.a +OLD_FILES+=usr/lib/libdpv.a +OLD_FILES+=usr/lib/libdpv.so +OLD_FILES+=usr/lib/libdpv.so.1 +OLD_FILES+=usr/lib/libdpv_p.a +OLD_FILES+=usr/sbin/bsdconfig +OLD_FILES+=usr/sbin/tzsetup +OLD_FILES+=usr/share/man/man1/dialog.1.gz +OLD_FILES+=usr/share/man/man1/dpv.1.gz +OLD_FILES+=usr/share/man/man3/dialog.3.gz +OLD_FILES+=usr/share/man/man3/dpv.3.gz +OLD_FILES+=usr/share/man/man8/tzsetup.8.gz +OLD_FILES+=usr/share/man/man8/bsdconfig.8.gz +.endif + .if ${MK_FMTREE} == no OLD_FILES+=usr/sbin/fmtree OLD_FILES+=usr/share/man/man8/fmtree.8.gz Added: head/tools/build/options/WITHOUT_DIALOG ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_DIALOG Tue Sep 27 18:08:38 2016 (r306375) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to not build dialog(1), dialog(1,3), and dpv(1,3). Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Tue Sep 27 18:07:22 2016 (r306374) +++ head/usr.bin/Makefile Tue Sep 27 18:08:38 2016 (r306375) @@ -36,7 +36,6 @@ SUBDIR= alias \ ctlstat \ cut \ dirname \ - dpv \ du \ elf2aout \ elfdump \ @@ -200,6 +199,7 @@ SUBDIR.${MK_BLUETOOTH}+= bluetooth SUBDIR.${MK_BSD_CPIO}+= cpio SUBDIR.${MK_CALENDAR}+= calendar SUBDIR.${MK_CLANG}+= clang +SUBDIR.${MK_DIALOG}+= dpv SUBDIR.${MK_EE}+= ee SUBDIR.${MK_FILE}+= file SUBDIR.${MK_FINGER}+= finger Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Tue Sep 27 18:07:22 2016 (r306374) +++ head/usr.sbin/Makefile Tue Sep 27 18:08:38 2016 (r306375) @@ -6,7 +6,6 @@ SUBDIR= adduser \ arp \ binmiscctl \ - bsdconfig \ camdd \ cdcontrol \ chkgrp \ @@ -89,7 +88,6 @@ SUBDIR= adduser \ tcpdump \ traceroute \ trpt \ - tzsetup \ uefisign \ ugidfw \ vigr \ @@ -123,6 +121,8 @@ SUBDIR.${MK_BOOTPARAMD}+= bootparamd SUBDIR.${MK_BSDINSTALL}+= bsdinstall SUBDIR.${MK_BSNMP}+= bsnmpd SUBDIR.${MK_CTM}+= ctm +SUBDIR.${MK_DIALOG}+= tzsetup +SUBDIR.${MK_DIALOG}+= bsdconfig SUBDIR.${MK_FLOPPY}+= fdcontrol SUBDIR.${MK_FLOPPY}+= fdformat SUBDIR.${MK_FLOPPY}+= fdread From owner-svn-src-head@freebsd.org Tue Sep 27 18:19:31 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F047BEC632; Tue, 27 Sep 2016 18:19:31 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F42595D; Tue, 27 Sep 2016 18:19:31 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8RIJUdp027787; Tue, 27 Sep 2016 18:19:30 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RIJUQs027784; Tue, 27 Sep 2016 18:19:30 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201609271819.u8RIJUQs027784@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 27 Sep 2016 18:19:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306376 - head/sys/arm/ti/cpsw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 18:19:31 -0000 Author: loos Date: Tue Sep 27 18:19:29 2016 New Revision: 306376 URL: https://svnweb.freebsd.org/changeset/base/306376 Log: Add a sysctl to control the interrupt pacing on AM335x integrated switch. The hardware can be set to limit the number of interrupts from 2 to 63 interrupts per ms. To keep the compatibility with the TI documentation the sysctl take the interval between the interrupts pulses: 16~500 us. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/arm/ti/cpsw/if_cpsw.c head/sys/arm/ti/cpsw/if_cpswreg.h head/sys/arm/ti/cpsw/if_cpswvar.h Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Tue Sep 27 18:08:38 2016 (r306375) +++ head/sys/arm/ti/cpsw/if_cpsw.c Tue Sep 27 18:19:29 2016 (r306376) @@ -583,6 +583,11 @@ cpsw_init(struct cpsw_softc *sc) struct cpsw_slot *slot; uint32_t reg; + /* Disable the interrupt pacing. */ + reg = cpsw_read_4(sc, CPSW_WR_INT_CONTROL); + reg &= ~(CPSW_WR_INT_PACE_EN | CPSW_WR_INT_PRESCALE_MASK); + cpsw_write_4(sc, CPSW_WR_INT_CONTROL, reg); + /* Clear ALE */ cpsw_write_4(sc, CPSW_ALE_CONTROL, CPSW_ALE_CTL_CLEAR_TBL); @@ -2492,6 +2497,51 @@ cpsw_stat_attached(SYSCTL_HANDLER_ARGS) } static int +cpsw_intr_coalesce(SYSCTL_HANDLER_ARGS) +{ + int error; + struct cpsw_softc *sc; + uint32_t ctrl, intr_per_ms; + + sc = (struct cpsw_softc *)arg1; + error = sysctl_handle_int(oidp, &sc->coal_us, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + + ctrl = cpsw_read_4(sc, CPSW_WR_INT_CONTROL); + ctrl &= ~(CPSW_WR_INT_PACE_EN | CPSW_WR_INT_PRESCALE_MASK); + if (sc->coal_us == 0) { + /* Disable the interrupt pace hardware. */ + cpsw_write_4(sc, CPSW_WR_INT_CONTROL, ctrl); + cpsw_write_4(sc, CPSW_WR_C_RX_IMAX(0), 0); + cpsw_write_4(sc, CPSW_WR_C_TX_IMAX(0), 0); + return (0); + } + + if (sc->coal_us > CPSW_WR_C_IMAX_US_MAX) + sc->coal_us = CPSW_WR_C_IMAX_US_MAX; + if (sc->coal_us < CPSW_WR_C_IMAX_US_MIN) + sc->coal_us = CPSW_WR_C_IMAX_US_MIN; + intr_per_ms = 1000 / sc->coal_us; + /* Just to make sure... */ + if (intr_per_ms > CPSW_WR_C_IMAX_MAX) + intr_per_ms = CPSW_WR_C_IMAX_MAX; + if (intr_per_ms < CPSW_WR_C_IMAX_MIN) + intr_per_ms = CPSW_WR_C_IMAX_MIN; + + /* Set the prescale to produce 4us pulses from the 125 Mhz clock. */ + ctrl |= (125 * 4) & CPSW_WR_INT_PRESCALE_MASK; + + /* Enable the interrupt pace hardware. */ + cpsw_write_4(sc, CPSW_WR_C_RX_IMAX(0), intr_per_ms); + cpsw_write_4(sc, CPSW_WR_C_TX_IMAX(0), intr_per_ms); + ctrl |= CPSW_WR_INT_C0_RX_PULSE | CPSW_WR_INT_C0_TX_PULSE; + cpsw_write_4(sc, CPSW_WR_INT_CONTROL, ctrl); + + return (0); +} + +static int cpsw_stat_uptime(SYSCTL_HANDLER_ARGS) { struct cpsw_softc *swsc; @@ -2576,6 +2626,10 @@ cpsw_add_sysctls(struct cpsw_softc *sc) CTLTYPE_UINT | CTLFLAG_RD, sc, 0, cpsw_stat_attached, "IU", "Time since driver attach"); + SYSCTL_ADD_PROC(ctx, parent, OID_AUTO, "intr_coalesce_us", + CTLTYPE_UINT | CTLFLAG_RW, sc, 0, cpsw_intr_coalesce, "IU", + "minimum time between interrupts"); + node = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "ports", CTLFLAG_RD, NULL, "CPSW Ports Statistics"); ports_parent = SYSCTL_CHILDREN(node); Modified: head/sys/arm/ti/cpsw/if_cpswreg.h ============================================================================== --- head/sys/arm/ti/cpsw/if_cpswreg.h Tue Sep 27 18:08:38 2016 (r306375) +++ head/sys/arm/ti/cpsw/if_cpswreg.h Tue Sep 27 18:19:29 2016 (r306376) @@ -138,6 +138,17 @@ #define CPSW_WR_SOFT_RESET (CPSW_WR_OFFSET + 0x04) #define CPSW_WR_CONTROL (CPSW_WR_OFFSET + 0x08) #define CPSW_WR_INT_CONTROL (CPSW_WR_OFFSET + 0x0c) +#define CPSW_WR_INT_C0_RX_PULSE (1 << 16) +#define CPSW_WR_INT_C0_TX_PULSE (1 << 17) +#define CPSW_WR_INT_C1_RX_PULSE (1 << 18) +#define CPSW_WR_INT_C1_TX_PULSE (1 << 19) +#define CPSW_WR_INT_C2_RX_PULSE (1 << 20) +#define CPSW_WR_INT_C2_TX_PULSE (1 << 21) +#define CPSW_WR_INT_PACE_EN \ + (CPSW_WR_INT_C0_RX_PULSE | CPSW_WR_INT_C0_TX_PULSE | \ + CPSW_WR_INT_C1_RX_PULSE | CPSW_WR_INT_C1_TX_PULSE | \ + CPSW_WR_INT_C2_RX_PULSE | CPSW_WR_INT_C2_TX_PULSE) +#define CPSW_WR_INT_PRESCALE_MASK 0xfff #define CPSW_WR_C_RX_THRESH_EN(p) (CPSW_WR_OFFSET + (0x10 * (p)) + 0x10) #define CPSW_WR_C_RX_EN(p) (CPSW_WR_OFFSET + (0x10 * (p)) + 0x14) #define CPSW_WR_C_TX_EN(p) (CPSW_WR_OFFSET + (0x10 * (p)) + 0x18) @@ -151,6 +162,13 @@ #define CPSW_WR_C_MISC_HOST_PEND (1 << 2) #define CPSW_WR_C_MISC_MDIOLINK (1 << 1) #define CPSW_WR_C_MISC_MDIOUSER (1 << 0) +#define CPSW_WR_C_RX_IMAX(p) (CPSW_WR_OFFSET + (0x08 * (p)) + 0x70) +#define CPSW_WR_C_TX_IMAX(p) (CPSW_WR_OFFSET + (0x08 * (p)) + 0x74) +#define CPSW_WR_C_IMAX_MASK 0x3f +#define CPSW_WR_C_IMAX_MAX 63 +#define CPSW_WR_C_IMAX_MIN 2 +#define CPSW_WR_C_IMAX_US_MAX 500 +#define CPSW_WR_C_IMAX_US_MIN 16 #define CPSW_CPPI_RAM_OFFSET 0x2000 #define CPSW_CPPI_RAM_SIZE 0x2000 Modified: head/sys/arm/ti/cpsw/if_cpswvar.h ============================================================================== --- head/sys/arm/ti/cpsw/if_cpswvar.h Tue Sep 27 18:08:38 2016 (r306375) +++ head/sys/arm/ti/cpsw/if_cpswvar.h Tue Sep 27 18:19:29 2016 (r306376) @@ -80,6 +80,7 @@ struct cpsw_softc { phandle_t node; struct bintime attach_uptime; /* system uptime when attach happened. */ struct cpsw_port port[2]; + unsigned coal_us; /* RX and TX buffer tracking */ struct cpsw_queue rx, tx; From owner-svn-src-head@freebsd.org Tue Sep 27 18:55:46 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C674BECDC6; Tue, 27 Sep 2016 18:55:46 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 541CACD6; Tue, 27 Sep 2016 18:55:46 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8RItj0U043270; Tue, 27 Sep 2016 18:55:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RItjlC043268; Tue, 27 Sep 2016 18:55:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609271855.u8RItjlC043268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 27 Sep 2016 18:55:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306377 - head/lib/libcompiler_rt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 18:55:46 -0000 Author: emaste Date: Tue Sep 27 18:55:45 2016 New Revision: 306377 URL: https://svnweb.freebsd.org/changeset/base/306377 Log: libcompiler_rt: move file list to Makefile.inc for reuse elsewhere Also switch to the style used in the clang390-import branch to reduce future conflicts. Reviewed by: dim Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8039 Added: head/lib/libcompiler_rt/Makefile.inc (contents, props changed) Modified: head/lib/libcompiler_rt/Makefile Modified: head/lib/libcompiler_rt/Makefile ============================================================================== --- head/lib/libcompiler_rt/Makefile Tue Sep 27 18:19:29 2016 (r306376) +++ head/lib/libcompiler_rt/Makefile Tue Sep 27 18:55:45 2016 (r306377) @@ -10,223 +10,7 @@ WARNS?= 2 CFLAGS+=${PICFLAG} -fvisibility=hidden -DVISIBILITY_HIDDEN CFLAGS+=-I${SRCTOP}/contrib/libcxxrt -.if ${MACHINE_CPUARCH} == "amd64" -CRTARCH=x86_64 -.else -CRTARCH=${MACHINE_CPUARCH} -.endif - -CRTSRC=${SRCTOP}/contrib/compiler-rt/lib/builtins - -.PATH: ${CRTSRC}/${CRTARCH} ${CRTSRC} - -SRCF= absvdi2 \ - absvsi2 \ - absvti2 \ - addvdi3 \ - addvsi3 \ - addvti3 \ - apple_versioning \ - ashldi3 \ - ashlti3 \ - ashrdi3 \ - ashrti3 \ - clear_cache \ - clzdi2 \ - clzsi2 \ - clzti2 \ - cmpdi2 \ - cmpti2 \ - ctzdi2 \ - ctzsi2 \ - ctzti2 \ - divdc3 \ - divdi3 \ - divmoddi4 \ - divmodsi4 \ - divsc3 \ - divtc3 \ - divti3 \ - divxc3 \ - enable_execute_stack \ - eprintf \ - extendhfsf2 \ - ffsdi2 \ - ffsti2 \ - fixdfdi \ - fixdfti \ - fixsfdi \ - fixsfti \ - fixunsdfdi \ - fixunsdfsi \ - fixunsdfti \ - fixunssfdi \ - fixunssfsi \ - fixunssfti \ - fixunsxfdi \ - fixunsxfsi \ - fixunsxfti \ - fixxfdi \ - fixxfti \ - floatdidf \ - floatdisf \ - floatditf \ - floatdixf \ - floatsitf \ - floattidf \ - floattisf \ - floattixf \ - floatundidf \ - floatundisf \ - floatunditf \ - floatundixf \ - floatunsidf \ - floatunsisf \ - floatuntidf \ - floatuntisf \ - floatuntixf \ - gcc_personality_v0 \ - int_util \ - lshrdi3 \ - lshrti3 \ - moddi3 \ - modti3 \ - muldc3 \ - muldi3 \ - mulodi4 \ - mulosi4 \ - muloti4 \ - mulsc3 \ - multi3 \ - mulvdi3 \ - mulvsi3 \ - mulvti3 \ - multc3 \ - mulxc3 \ - negdf2 \ - negdi2 \ - negsf2 \ - negti2 \ - negvdi2 \ - negvsi2 \ - negvti2 \ - paritydi2 \ - paritysi2 \ - parityti2 \ - popcountdi2 \ - popcountsi2 \ - popcountti2 \ - powidf2 \ - powisf2 \ - powitf2 \ - powixf2 \ - subvdi3 \ - subvsi3 \ - subvti3 \ - trampoline_setup \ - truncdfhf2 \ - truncsfhf2 \ - ucmpdi2 \ - ucmpti2 \ - udivdi3 \ - udivmoddi4 \ - udivmodsi4 \ - udivmodti4 \ - udivti3 \ - umoddi3 \ - umodti3 - -# 128-bit quad precision long double support, only used on arm64 -.if ${MACHINE_CPUARCH} == "aarch64" -SRCF+= addtf3 \ - comparetf2 \ - divtf3 \ - extenddftf2 \ - extendsftf2 \ - fixtfdi \ - fixtfsi \ - fixtfti \ - fixunstfdi \ - fixunstfsi \ - fixunstfti \ - floatunsitf \ - multf3 \ - subtf3 \ - trunctfdf2 \ - trunctfsf2 -.endif - -# These are already shipped by libc.a on arm and mips -.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" -SRCF+= adddf3 \ - addsf3 \ - divdf3 \ - divsf3 \ - extendsfdf2 \ - fixdfsi \ - fixsfsi \ - floatsidf \ - floatsisf \ - muldf3 \ - mulsf3 \ - subdf3 \ - subsf3 \ - truncdfsf2 -.endif - -.if ${MACHINE_CPUARCH} != "arm" -SRCF+= comparedf2 \ - comparesf2 -.endif - -.if ${MACHINE_CPUARCH} != "mips" -SRCF+= divsi3 \ - modsi3 \ - udivsi3 \ - umodsi3 -.endif - -# FreeBSD-specific atomic intrinsics. -.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "armv6" -.PATH: ${.CURDIR}/../../sys/arm/arm - -SRCF+= stdatomic -CFLAGS+= -DEMIT_SYNC_ATOMICS -.elif ${MACHINE_CPUARCH} == "mips" -.PATH: ${.CURDIR}/../../sys/mips/mips - -SRCF+= stdatomic -.endif - -.for file in ${SRCF} -.if ${MACHINE_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") && \ - exists(${CRTSRC}/${CRTARCH}/${file}vfp.S) -SRCS+= ${file}vfp.S -. elif exists(${CRTSRC}/${CRTARCH}/${file}.S) -SRCS+= ${file}.S -. else -SRCS+= ${file}.c -. endif -.endfor - -.if ${MACHINE_CPUARCH} == "arm" -SRCS+= aeabi_div0.c \ - aeabi_idivmod.S \ - aeabi_ldivmod.S \ - aeabi_memcmp.S \ - aeabi_memcpy.S \ - aeabi_memmove.S \ - aeabi_memset.S \ - aeabi_uidivmod.S \ - aeabi_uldivmod.S \ - bswapdi2.S \ - bswapsi2.S \ - switch16.S \ - switch32.S \ - switch8.S \ - switchu8.S \ - sync_synchronize.S -.endif +.include "Makefile.inc" .if ${MK_INSTALLLIB} != "no" SYMLINKS+=libcompiler_rt.a ${LIBDIR}/libgcc.a Added: head/lib/libcompiler_rt/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcompiler_rt/Makefile.inc Tue Sep 27 18:55:45 2016 (r306377) @@ -0,0 +1,216 @@ +# $FreeBSD$ + +CRTARCH= ${MACHINE_CPUARCH:C/amd64/x86_64/} + +CRTSRC= ${SRCTOP}/contrib/compiler-rt/lib/builtins + +.PATH: ${CRTSRC}/${CRTARCH} +.PATH: ${CRTSRC} + +SRCF+= absvdi2 +SRCF+= absvsi2 +SRCF+= absvti2 +SRCF+= addvdi3 +SRCF+= addvsi3 +SRCF+= addvti3 +SRCF+= apple_versioning +SRCF+= ashldi3 +SRCF+= ashlti3 +SRCF+= ashrdi3 +SRCF+= ashrti3 +SRCF+= clear_cache +SRCF+= clzdi2 +SRCF+= clzsi2 +SRCF+= clzti2 +SRCF+= cmpdi2 +SRCF+= cmpti2 +SRCF+= ctzdi2 +SRCF+= ctzsi2 +SRCF+= ctzti2 +SRCF+= divdc3 +SRCF+= divdi3 +SRCF+= divmoddi4 +SRCF+= divmodsi4 +SRCF+= divsc3 +SRCF+= divtc3 +SRCF+= divti3 +SRCF+= divxc3 +SRCF+= enable_execute_stack +SRCF+= eprintf +SRCF+= extendhfsf2 +SRCF+= ffsdi2 +SRCF+= ffsti2 +SRCF+= fixdfdi +SRCF+= fixdfti +SRCF+= fixsfdi +SRCF+= fixsfti +SRCF+= fixunsdfdi +SRCF+= fixunsdfsi +SRCF+= fixunsdfti +SRCF+= fixunssfdi +SRCF+= fixunssfsi +SRCF+= fixunssfti +SRCF+= fixunsxfdi +SRCF+= fixunsxfsi +SRCF+= fixunsxfti +SRCF+= fixxfdi +SRCF+= fixxfti +SRCF+= floatdidf +SRCF+= floatdisf +SRCF+= floatditf +SRCF+= floatdixf +SRCF+= floatsitf +SRCF+= floattidf +SRCF+= floattisf +SRCF+= floattixf +SRCF+= floatundidf +SRCF+= floatundisf +SRCF+= floatunditf +SRCF+= floatundixf +SRCF+= floatunsidf +SRCF+= floatunsisf +SRCF+= floatuntidf +SRCF+= floatuntisf +SRCF+= floatuntixf +SRCF+= gcc_personality_v0 +SRCF+= int_util +SRCF+= lshrdi3 +SRCF+= lshrti3 +SRCF+= moddi3 +SRCF+= modti3 +SRCF+= muldc3 +SRCF+= muldi3 +SRCF+= mulodi4 +SRCF+= mulosi4 +SRCF+= muloti4 +SRCF+= mulsc3 +SRCF+= multi3 +SRCF+= mulvdi3 +SRCF+= mulvsi3 +SRCF+= mulvti3 +SRCF+= multc3 +SRCF+= mulxc3 +SRCF+= negdf2 +SRCF+= negdi2 +SRCF+= negsf2 +SRCF+= negti2 +SRCF+= negvdi2 +SRCF+= negvsi2 +SRCF+= negvti2 +SRCF+= paritydi2 +SRCF+= paritysi2 +SRCF+= parityti2 +SRCF+= popcountdi2 +SRCF+= popcountsi2 +SRCF+= popcountti2 +SRCF+= powidf2 +SRCF+= powisf2 +SRCF+= powitf2 +SRCF+= powixf2 +SRCF+= subvdi3 +SRCF+= subvsi3 +SRCF+= subvti3 +SRCF+= trampoline_setup +SRCF+= truncdfhf2 +SRCF+= truncsfhf2 +SRCF+= ucmpdi2 +SRCF+= ucmpti2 +SRCF+= udivdi3 +SRCF+= udivmoddi4 +SRCF+= udivmodsi4 +SRCF+= udivmodti4 +SRCF+= udivti3 +SRCF+= umoddi3 +SRCF+= umodti3 + +# 128-bit quad precision long double support, only used on arm64 +.if ${MACHINE_CPUARCH} == "aarch64" +SRCF+= addtf3 +SRCF+= comparetf2 +SRCF+= divtf3 +SRCF+= extenddftf2 +SRCF+= extendsftf2 +SRCF+= fixtfdi +SRCF+= fixtfsi +SRCF+= fixtfti +SRCF+= fixunstfdi +SRCF+= fixunstfsi +SRCF+= fixunstfti +SRCF+= floatunsitf +SRCF+= multf3 +SRCF+= subtf3 +SRCF+= trunctfdf2 +SRCF+= trunctfsf2 +.endif + +# These are already shipped by libc.a on arm and mips +.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" +SRCF+= adddf3 +SRCF+= addsf3 +SRCF+= divdf3 +SRCF+= divsf3 +SRCF+= extendsfdf2 +SRCF+= fixdfsi +SRCF+= fixsfsi +SRCF+= floatsidf +SRCF+= floatsisf +SRCF+= muldf3 +SRCF+= mulsf3 +SRCF+= subdf3 +SRCF+= subsf3 +SRCF+= truncdfsf2 +.endif + +.if ${MACHINE_CPUARCH} != "arm" +SRCF+= comparedf2 +SRCF+= comparesf2 +.endif + +.if ${MACHINE_CPUARCH} != "mips" +SRCF+= divsi3 +SRCF+= modsi3 +SRCF+= udivsi3 +SRCF+= umodsi3 +.endif + +# FreeBSD-specific atomic intrinsics. +.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "armv6" +.PATH: ${SRCTOP}/sys/arm/arm + +SRCF+= stdatomic +CFLAGS+= -DEMIT_SYNC_ATOMICS +.elif ${MACHINE_CPUARCH} == "mips" +.PATH: ${SRCTOP}/sys/mips/mips + +SRCF+= stdatomic +.endif + +.for file in ${SRCF} +.if ${MACHINE_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") \ + && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S) +SRCS+= ${file}vfp.S +. elif exists(${CRTSRC}/${CRTARCH}/${file}.S) +SRCS+= ${file}.S +. else +SRCS+= ${file}.c +. endif +.endfor + +.if ${MACHINE_CPUARCH} == "arm" +SRCS+= aeabi_div0.c +SRCS+= aeabi_idivmod.S +SRCS+= aeabi_ldivmod.S +SRCS+= aeabi_memcmp.S +SRCS+= aeabi_memcpy.S +SRCS+= aeabi_memmove.S +SRCS+= aeabi_memset.S +SRCS+= aeabi_uidivmod.S +SRCS+= aeabi_uldivmod.S +SRCS+= bswapdi2.S +SRCS+= bswapsi2.S +SRCS+= switch16.S +SRCS+= switch32.S +SRCS+= switch8.S +SRCS+= switchu8.S +SRCS+= sync_synchronize.S +.endif From owner-svn-src-head@freebsd.org Tue Sep 27 20:40:45 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4529BEBD19; Tue, 27 Sep 2016 20:40:45 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7516E66; Tue, 27 Sep 2016 20:40:45 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8RKei86081976; Tue, 27 Sep 2016 20:40:44 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8RKeiTZ081975; Tue, 27 Sep 2016 20:40:44 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201609272040.u8RKeiTZ081975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Tue, 27 Sep 2016 20:40:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306380 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 20:40:45 -0000 Author: tsoome Date: Tue Sep 27 20:40:44 2016 New Revision: 306380 URL: https://svnweb.freebsd.org/changeset/base/306380 Log: loader command interpreter should reset command_errmsg The command interpreter does leave command_errmsg as is after printing its content, assuming the next command will reset it in bf_command(). However, in case the forth native word is defined as builtin, the bf_command is not used and forth words will also end up the command_errmsg content printed. Since command_errmsg is pointer to actual error message, which can be static read only string, we can not just set *command_errmsg = '\0', instead we need to reset the pointer itself. Illumos issue: https://www.illumos.org/issues/7405 Reported by: Igor Kozhukhov. Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D8032 Modified: head/sys/boot/common/interp_forth.c Modified: head/sys/boot/common/interp_forth.c ============================================================================== --- head/sys/boot/common/interp_forth.c Tue Sep 27 19:36:12 2016 (r306379) +++ head/sys/boot/common/interp_forth.c Tue Sep 27 20:40:44 2016 (r306380) @@ -325,13 +325,15 @@ bf_run(char *line) printf("Parse error!\n"); break; default: - /* Hopefully, all other codes filled this buffer */ - printf("%s\n", command_errmsg); + if (command_errmsg != NULL) { + printf("%s\n", command_errmsg); + command_errmsg = NULL; + } } if (result == VM_USEREXIT) panic("interpreter exit"); setenv("interpret", bf_vm->state ? "" : "OK", 1); - return result; + return (result); } From owner-svn-src-head@freebsd.org Tue Sep 27 21:00:35 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED5D6C00AEC; Tue, 27 Sep 2016 21:00:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA781304; Tue, 27 Sep 2016 21:00:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id D036010AF8D; Tue, 27 Sep 2016 17:00:28 -0400 (EDT) From: John Baldwin To: Oleksandr Tymoshenko Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306355 - in head/sys: dev/atkbdc sys Date: Tue, 27 Sep 2016 13:55:54 -0700 Message-ID: <3815150.rnkVxtqPiv@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201609262206.u8QM6J5q070986@repo.freebsd.org> References: <201609262206.u8QM6J5q070986@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 27 Sep 2016 17:00:28 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 21:00:36 -0000 On Monday, September 26, 2016 10:06:19 PM Oleksandr Tymoshenko wrote: > Author: gonzo > Date: Mon Sep 26 22:06:19 2016 > New Revision: 306355 > URL: https://svnweb.freebsd.org/changeset/base/306355 > > Log: > Add Elantech trackpad support > > Elantech trackpads are found in some laptops like the Asus UX31E. They > are "synaptics compatible" but use a slightly different protocol. > > Elantech hardware support is not enabled by default and just like > Synaptic or TrackPoint devices it should be enabled by setting > tunable, in this case hw.psm.elantech_support, to non-zero value > > PR: 205690 > Submitted by: Vladimir Kondratyev > MFC after: 1 week > > Modified: head/sys/dev/atkbdc/psm.c > ============================================================================== > --- head/sys/dev/atkbdc/psm.c Mon Sep 26 20:26:19 2016 (r306354) > +++ head/sys/dev/atkbdc/psm.c Mon Sep 26 22:06:19 2016 (r306355) > @@ -389,6 +465,9 @@ TUNABLE_INT("hw.psm.synaptics_support", > static int trackpoint_support = 0; > TUNABLE_INT("hw.psm.trackpoint_support", &trackpoint_support); > > +static int elantech_support = 0; > +TUNABLE_INT("hw.psm.elantech_support", &elantech_support); > + > static int verbose = PSM_DEBUG; > TUNABLE_INT("debug.psm.loglevel", &verbose); It would be good to expose all these tunables as CTLFLAG_RDTUN sysctls. Exposing them that way with a decent description string makes it easier for users to discover tunables. -- John Baldwin From owner-svn-src-head@freebsd.org Wed Sep 28 04:08:22 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54686BEA528; Wed, 28 Sep 2016 04:08:22 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B994F4A; Wed, 28 Sep 2016 04:08:21 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S48LR3051495; Wed, 28 Sep 2016 04:08:21 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S48Lcf051492; Wed, 28 Sep 2016 04:08:21 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609280408.u8S48Lcf051492@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 28 Sep 2016 04:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306387 - in head/sys/dev/hyperv: include vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 04:08:22 -0000 Author: sephe Date: Wed Sep 28 04:08:20 2016 New Revision: 306387 URL: https://svnweb.freebsd.org/changeset/base/306387 Log: hyperv/vmbus: Add functions to test RX/TX bufring emptiness MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8044 Modified: head/sys/dev/hyperv/include/vmbus.h head/sys/dev/hyperv/vmbus/vmbus_brvar.h head/sys/dev/hyperv/vmbus/vmbus_chan.c Modified: head/sys/dev/hyperv/include/vmbus.h ============================================================================== --- head/sys/dev/hyperv/include/vmbus.h Wed Sep 28 04:02:17 2016 (r306386) +++ head/sys/dev/hyperv/include/vmbus.h Wed Sep 28 04:08:20 2016 (r306387) @@ -173,5 +173,7 @@ const struct hyperv_guid * vmbus_chan_guid_inst(const struct vmbus_channel *chan); int vmbus_chan_prplist_nelem(int br_size, int prpcnt_max, int dlen_max); +bool vmbus_chan_rx_empty(const struct vmbus_channel *chan); +bool vmbus_chan_tx_empty(const struct vmbus_channel *chan); #endif /* !_VMBUS_H_ */ Modified: head/sys/dev/hyperv/vmbus/vmbus_brvar.h ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_brvar.h Wed Sep 28 04:02:17 2016 (r306386) +++ head/sys/dev/hyperv/vmbus/vmbus_brvar.h Wed Sep 28 04:08:20 2016 (r306387) @@ -83,6 +83,20 @@ vmbus_txbr_maxpktsz(const struct vmbus_t return (tbr->txbr_dsize - sizeof(uint64_t) - 1); } +static __inline bool +vmbus_txbr_empty(const struct vmbus_txbr *tbr) +{ + + return (tbr->txbr_windex == tbr->txbr_rindex ? true : false); +} + +static __inline bool +vmbus_rxbr_empty(const struct vmbus_rxbr *rbr) +{ + + return (rbr->rxbr_windex == rbr->rxbr_rindex ? true : false); +} + static __inline int vmbus_br_nelem(int br_size, int elem_size) { Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Wed Sep 28 04:02:17 2016 (r306386) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Wed Sep 28 04:08:20 2016 (r306387) @@ -1692,3 +1692,17 @@ vmbus_chan_prplist_nelem(int br_size, in return (vmbus_br_nelem(br_size, elem_size)); } + +bool +vmbus_chan_tx_empty(const struct vmbus_channel *chan) +{ + + return (vmbus_txbr_empty(&chan->ch_txbr)); +} + +bool +vmbus_chan_rx_empty(const struct vmbus_channel *chan) +{ + + return (vmbus_rxbr_empty(&chan->ch_rxbr)); +} From owner-svn-src-head@freebsd.org Wed Sep 28 04:22:07 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61636BEA868; Wed, 28 Sep 2016 04:22:07 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 329858A6; Wed, 28 Sep 2016 04:22:07 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S4M6hr058773; Wed, 28 Sep 2016 04:22:06 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S4M6ps058772; Wed, 28 Sep 2016 04:22:06 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201609280422.u8S4M6ps058772@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 28 Sep 2016 04:22:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306388 - head/sys/arm/ti/cpsw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 04:22:07 -0000 Author: loos Date: Wed Sep 28 04:22:06 2016 New Revision: 306388 URL: https://svnweb.freebsd.org/changeset/base/306388 Log: Fix a typo. Pointy hat to: loos Modified: head/sys/arm/ti/cpsw/if_cpsw.c Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Wed Sep 28 04:08:20 2016 (r306387) +++ head/sys/arm/ti/cpsw/if_cpsw.c Wed Sep 28 04:22:06 2016 (r306388) @@ -1941,7 +1941,7 @@ cpsw_tx_dequeue(struct cpsw_softc *sc) /* TearDown complete is only marked on the SOP for the packet. */ if ((flags & (CPDMA_BD_SOP | CPDMA_BD_TDOWNCMPLT)) == - (CPDMA_BD_EOP | CPDMA_BD_TDOWNCMPLT)) { + (CPDMA_BD_SOP | CPDMA_BD_TDOWNCMPLT)) { CPSW_DEBUGF(sc, ("TX teardown in progress")); cpsw_write_cp(sc, &sc->tx, 0xfffffffc); // TODO: Increment a count of dropped TX packets From owner-svn-src-head@freebsd.org Wed Sep 28 04:25:26 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76BFEBEAAE4; Wed, 28 Sep 2016 04:25:26 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 497ABBC5; Wed, 28 Sep 2016 04:25:26 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S4PPA4058928; Wed, 28 Sep 2016 04:25:25 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S4PP6d058926; Wed, 28 Sep 2016 04:25:25 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609280425.u8S4PP6d058926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 28 Sep 2016 04:25:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306389 - in head/sys/dev/hyperv: include vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 04:25:26 -0000 Author: sephe Date: Wed Sep 28 04:25:25 2016 New Revision: 306389 URL: https://svnweb.freebsd.org/changeset/base/306389 Log: hyperv/vmbus: Add function to drain channel interrupt task. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8045 Modified: head/sys/dev/hyperv/include/vmbus.h head/sys/dev/hyperv/vmbus/vmbus_chan.c Modified: head/sys/dev/hyperv/include/vmbus.h ============================================================================== --- head/sys/dev/hyperv/include/vmbus.h Wed Sep 28 04:22:06 2016 (r306388) +++ head/sys/dev/hyperv/include/vmbus.h Wed Sep 28 04:25:25 2016 (r306389) @@ -133,6 +133,7 @@ int vmbus_chan_open_br(struct vmbus_cha const struct vmbus_chan_br *cbr, const void *udata, int udlen, vmbus_chan_callback_t cb, void *cbarg); void vmbus_chan_close(struct vmbus_channel *chan); +void vmbus_chan_intr_drain(struct vmbus_channel *chan); int vmbus_chan_gpadl_connect(struct vmbus_channel *chan, bus_addr_t paddr, int size, uint32_t *gpadl); Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Wed Sep 28 04:22:06 2016 (r306388) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Wed Sep 28 04:25:25 2016 (r306389) @@ -756,6 +756,13 @@ vmbus_chan_close(struct vmbus_channel *c vmbus_chan_close_internal(chan); } +void +vmbus_chan_intr_drain(struct vmbus_channel *chan) +{ + + taskqueue_drain(chan->ch_tq, &chan->ch_task); +} + int vmbus_chan_send(struct vmbus_channel *chan, uint16_t type, uint16_t flags, void *data, int dlen, uint64_t xactid) From owner-svn-src-head@freebsd.org Wed Sep 28 04:34:23 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5402CBEAD25; Wed, 28 Sep 2016 04:34:23 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15E65175; Wed, 28 Sep 2016 04:34:23 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S4YMil062898; Wed, 28 Sep 2016 04:34:22 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S4YMsf062895; Wed, 28 Sep 2016 04:34:22 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609280434.u8S4YMsf062895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 28 Sep 2016 04:34:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306390 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 04:34:23 -0000 Author: sephe Date: Wed Sep 28 04:34:21 2016 New Revision: 306390 URL: https://svnweb.freebsd.org/changeset/base/306390 Log: hyperv/hn: Suspend and resume the backend properly upon MTU change. Suspend: - Prevent the backend from being touched on TX path. - Clear the RNDIS RX filter, and wait for RX to drain. - Make sure that NVS see the chimney sending buffer and RXBUF disconnection, before unlink these buffers from the channel. Resume: - Reconfigure the RNDIS filter. - Allow TX path to work on the backend. - Kick start the TX eof task, in case the OACTIVE is set. This fixes various panics, when the interface has traffic and MTU is being changed. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8046 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.c Wed Sep 28 04:25:25 2016 (r306389) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c Wed Sep 28 04:34:21 2016 (r306390) @@ -348,6 +348,16 @@ hn_nvs_disconn_rxbuf(struct hn_softc *sc return (error); } sc->hn_flags &= ~HN_FLAG_RXBUF_CONNECTED; + + /* + * Wait for the hypervisor to receive this NVS request. + */ + while (!vmbus_chan_tx_empty(sc->hn_prichan)) + pause("waittx", 1); + /* + * Linger long enough for NVS to disconnect RXBUF. + */ + pause("lingtx", (200 * hz) / 1000); } if (sc->hn_rxbuf_gpadl != 0) { @@ -389,6 +399,17 @@ hn_nvs_disconn_chim(struct hn_softc *sc) return (error); } sc->hn_flags &= ~HN_FLAG_CHIM_CONNECTED; + + /* + * Wait for the hypervisor to receive this NVS request. + */ + while (!vmbus_chan_tx_empty(sc->hn_prichan)) + pause("waittx", 1); + /* + * Linger long enough for NVS to disconnect chimney + * sending buffer. + */ + pause("lingtx", (200 * hz) / 1000); } if (sc->hn_chim_gpadl != 0) { Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Wed Sep 28 04:25:25 2016 (r306389) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Wed Sep 28 04:34:21 2016 (r306390) @@ -178,6 +178,7 @@ struct hn_tx_ring { bus_dma_tag_t hn_tx_data_dtag; uint64_t hn_csum_assist; + int hn_suspended; int hn_gpa_cnt; struct vmbus_gpa hn_gpa[NETVSC_PACKET_MAXPAGE]; Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Sep 28 04:25:25 2016 (r306389) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Sep 28 04:34:21 2016 (r306390) @@ -348,6 +348,10 @@ static void hn_detach_allchans(struct hn static void hn_chan_callback(struct vmbus_channel *chan, void *xrxr); static void hn_set_ring_inuse(struct hn_softc *, int); static int hn_synth_attach(struct hn_softc *, int); +static bool hn_tx_ring_pending(struct hn_tx_ring *); +static void hn_suspend(struct hn_softc *); +static void hn_resume(struct hn_softc *); +static void hn_tx_ring_qflush(struct hn_tx_ring *); static void hn_nvs_handle_notify(struct hn_softc *sc, const struct vmbus_chanpkt_hdr *pkt); @@ -905,6 +909,23 @@ hn_txdesc_hold(struct hn_txdesc *txd) atomic_add_int(&txd->refs, 1); } +static bool +hn_tx_ring_pending(struct hn_tx_ring *txr) +{ + bool pending = false; + +#ifndef HN_USE_TXDESC_BUFRING + mtx_lock_spin(&txr->hn_txlist_spin); + if (txr->hn_txdesc_avail != txr->hn_txdesc_cnt) + pending = true; + mtx_unlock_spin(&txr->hn_txlist_spin); +#else + if (!buf_ring_full(txr->hn_txdesc_br)) + pending = true; +#endif + return (pending); +} + static __inline void hn_txeof(struct hn_tx_ring *txr) { @@ -1241,6 +1262,9 @@ hn_start_locked(struct hn_tx_ring *txr, KASSERT(txr == &sc->hn_tx_ring[0], ("not the first TX ring")); mtx_assert(&txr->hn_tx_lock, MA_OWNED); + if (__predict_false(txr->hn_suspended)) + return 0; + if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != IFF_DRV_RUNNING) return 0; @@ -1627,6 +1651,9 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, hn_set_lro_lenlim(sc, HN_LRO_LENLIM_MIN(ifp)); #endif + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + hn_suspend(sc); + /* We must remove and add back the device to cause the new * MTU to take effect. This includes tearing down, but not * deleting the channel, then bringing it back up. @@ -1651,7 +1678,9 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, if (sc->hn_tx_ring[0].hn_chim_size > sc->hn_chim_szmax) hn_set_chim_size(sc, sc->hn_chim_szmax); - hn_init_locked(sc); + /* All done! Resume now. */ + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + hn_resume(sc); HN_UNLOCK(sc); break; @@ -2984,6 +3013,9 @@ hn_xmit(struct hn_tx_ring *txr, int len) KASSERT(hn_use_if_start == 0, ("hn_xmit is called, when if_start is enabled")); + if (__predict_false(txr->hn_suspended)) + return 0; + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || txr->hn_oactive) return 0; @@ -3070,20 +3102,24 @@ do_sched: } static void +hn_tx_ring_qflush(struct hn_tx_ring *txr) +{ + struct mbuf *m; + + mtx_lock(&txr->hn_tx_lock); + while ((m = buf_ring_dequeue_sc(txr->hn_mbuf_br)) != NULL) + m_freem(m); + mtx_unlock(&txr->hn_tx_lock); +} + +static void hn_xmit_qflush(struct ifnet *ifp) { struct hn_softc *sc = ifp->if_softc; int i; - for (i = 0; i < sc->hn_tx_ring_inuse; ++i) { - struct hn_tx_ring *txr = &sc->hn_tx_ring[i]; - struct mbuf *m; - - mtx_lock(&txr->hn_tx_lock); - while ((m = buf_ring_dequeue_sc(txr->hn_mbuf_br)) != NULL) - m_freem(m); - mtx_unlock(&txr->hn_tx_lock); - } + for (i = 0; i < sc->hn_tx_ring_inuse; ++i) + hn_tx_ring_qflush(&sc->hn_tx_ring[i]); if_qflush(ifp); } @@ -3503,6 +3539,111 @@ hn_set_ring_inuse(struct hn_softc *sc, i } static void +hn_rx_drain(struct vmbus_channel *chan) +{ + + while (!vmbus_chan_rx_empty(chan) || !vmbus_chan_tx_empty(chan)) + pause("waitch", 1); + vmbus_chan_intr_drain(chan); +} + +static void +hn_suspend(struct hn_softc *sc) +{ + struct vmbus_channel **subch = NULL; + int i, nsubch; + + HN_LOCK_ASSERT(sc); + + /* + * Suspend TX. + */ + for (i = 0; i < sc->hn_tx_ring_inuse; ++i) { + struct hn_tx_ring *txr = &sc->hn_tx_ring[i]; + + mtx_lock(&txr->hn_tx_lock); + txr->hn_suspended = 1; + mtx_unlock(&txr->hn_tx_lock); + /* No one is able send more packets now. */ + + /* Wait for all pending sends to finish. */ + while (hn_tx_ring_pending(txr)) + pause("hnwtx", 1 /* 1 tick */); + } + + /* + * Disable RX. + */ + hv_rf_on_close(sc); + + /* Give RNDIS enough time to flush all pending data packets. */ + pause("waitrx", (200 * hz) / 1000); + + nsubch = sc->hn_rx_ring_inuse - 1; + if (nsubch > 0) + subch = vmbus_subchan_get(sc->hn_prichan, nsubch); + + /* + * Drain RX/TX bufrings and interrupts. + */ + if (subch != NULL) { + for (i = 0; i < nsubch; ++i) + hn_rx_drain(subch[i]); + } + hn_rx_drain(sc->hn_prichan); + + if (subch != NULL) + vmbus_subchan_rel(subch, nsubch); +} + +static void +hn_resume(struct hn_softc *sc) +{ + struct hn_tx_ring *txr; + int i; + + HN_LOCK_ASSERT(sc); + + /* + * Re-enable RX. + */ + hv_rf_on_open(sc); + + /* + * Make sure to clear suspend status on "all" TX rings, + * since hn_tx_ring_inuse can be changed after hn_suspend(). + */ + for (i = 0; i < sc->hn_tx_ring_cnt; ++i) { + txr = &sc->hn_tx_ring[i]; + + mtx_lock(&txr->hn_tx_lock); + txr->hn_suspended = 0; + mtx_unlock(&txr->hn_tx_lock); + } + + if (!hn_use_if_start) { + /* + * Flush unused drbrs, since hn_tx_ring_inuse may be + * reduced. + */ + for (i = sc->hn_tx_ring_inuse; i < sc->hn_tx_ring_cnt; ++i) + hn_tx_ring_qflush(&sc->hn_tx_ring[i]); + } + + /* + * Kick start TX. + */ + for (i = 0; i < sc->hn_tx_ring_inuse; ++i) { + txr = &sc->hn_tx_ring[i]; + /* + * Use txeof task, so that any pending oactive can be + * cleared properly. + */ + taskqueue_enqueue(txr->hn_tx_taskq, &txr->hn_txeof_task); + } +} + +static void hn_nvs_handle_notify(struct hn_softc *sc, const struct vmbus_chanpkt_hdr *pkt) { const struct hn_nvs_hdr *hdr; From owner-svn-src-head@freebsd.org Wed Sep 28 04:45:01 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8A3EC00022; Wed, 28 Sep 2016 04:45:01 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A68E5879; Wed, 28 Sep 2016 04:45:01 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S4j07E066702; Wed, 28 Sep 2016 04:45:00 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S4j0CH066696; Wed, 28 Sep 2016 04:45:00 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609280445.u8S4j0CH066696@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 28 Sep 2016 04:45:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306391 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 04:45:02 -0000 Author: sephe Date: Wed Sep 28 04:45:00 2016 New Revision: 306391 URL: https://svnweb.freebsd.org/changeset/base/306391 Log: hyperv/hn: Reorganize the synthetic parts detach. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8047 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c head/sys/dev/hyperv/netvsc/hv_rndis_filter.c head/sys/dev/hyperv/netvsc/hv_rndis_filter.h head/sys/dev/hyperv/netvsc/if_hnvar.h Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.c Wed Sep 28 04:34:21 2016 (r306390) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c Wed Sep 28 04:45:00 2016 (r306391) @@ -618,27 +618,15 @@ hn_nvs_attach(struct hn_softc *sc, int m return (0); } -/* - * Net VSC disconnect from VSP - */ -static void -hv_nv_disconnect_from_vsp(struct hn_softc *sc) +void +hn_nvs_detach(struct hn_softc *sc) { + + /* NOTE: there are no requests to stop the NVS. */ hn_nvs_disconn_rxbuf(sc); hn_nvs_disconn_chim(sc); } -/* - * Net VSC on device remove - */ -int -hv_nv_on_device_remove(struct hn_softc *sc) -{ - - hv_nv_disconnect_from_vsp(sc); - return (0); -} - void hn_nvs_sent_xact(struct hn_send_ctx *sndc, struct hn_softc *sc __unused, struct vmbus_channel *chan __unused, Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Wed Sep 28 04:34:21 2016 (r306390) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Wed Sep 28 04:45:00 2016 (r306391) @@ -269,8 +269,6 @@ extern int hv_promisc_mode; struct hn_send_ctx; void netvsc_linkstatus_callback(struct hn_softc *sc, uint32_t status); -int hn_nvs_attach(struct hn_softc *sc, int mtu); -int hv_nv_on_device_remove(struct hn_softc *sc); int hv_nv_on_send(struct vmbus_channel *chan, uint32_t rndis_mtype, struct hn_send_ctx *sndc, struct vmbus_gpa *gpa, int gpa_cnt); Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Sep 28 04:34:21 2016 (r306390) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Sep 28 04:45:00 2016 (r306391) @@ -348,6 +348,7 @@ static void hn_detach_allchans(struct hn static void hn_chan_callback(struct vmbus_channel *chan, void *xrxr); static void hn_set_ring_inuse(struct hn_softc *, int); static int hn_synth_attach(struct hn_softc *, int); +static void hn_synth_detach(struct hn_softc *); static bool hn_tx_ring_pending(struct hn_tx_ring *); static void hn_suspend(struct hn_softc *); static void hn_resume(struct hn_softc *); @@ -744,29 +745,19 @@ failed: } /* - * Standard detach entry point + * TODO: Use this for error handling on attach path. */ static int netvsc_detach(device_t dev) { struct hn_softc *sc = device_get_softc(dev); - if (bootverbose) - printf("netvsc_detach\n"); - - /* - * XXXKYS: Need to clean up all our - * driver state; this is the driver - * unloading. - */ + /* TODO: ether_ifdetach */ - /* - * XXXKYS: Need to stop outgoing traffic and unregister - * the netdevice. - */ - - hv_rf_on_device_remove(sc); - hn_detach_allchans(sc); + HN_LOCK(sc); + /* TODO: hn_stop */ + hn_synth_detach(sc); + HN_UNLOCK(sc); hn_stop_tx_tasks(sc); @@ -779,6 +770,8 @@ netvsc_detach(device_t dev) vmbus_xact_ctx_destroy(sc->hn_xact); HN_LOCK_DESTROY(sc); + + /* TODO: if_free */ return (0); } @@ -1654,23 +1647,14 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, if (ifp->if_drv_flags & IFF_DRV_RUNNING) hn_suspend(sc); - /* We must remove and add back the device to cause the new - * MTU to take effect. This includes tearing down, but not - * deleting the channel, then bringing it back up. - */ - error = hv_rf_on_device_remove(sc); - if (error) { - HN_UNLOCK(sc); - break; - } - /* - * Detach all of the channels. + * Detach the synthetics parts, i.e. NVS and RNDIS. */ - hn_detach_allchans(sc); + hn_synth_detach(sc); /* - * Attach the synthetic parts, i.e. NVS and RNDIS. + * Reattach the synthetic parts, i.e. NVS and RNDIS, + * with the new MTU setting. * XXX check error. */ hn_synth_attach(sc, ifr->ifr_mtu); @@ -3520,6 +3504,26 @@ back: return (0); } +/* + * NOTE: + * The interface must have been suspended though hn_suspend(), before + * this function get called. + */ +static void +hn_synth_detach(struct hn_softc *sc) +{ + HN_LOCK_ASSERT(sc); + + /* Detach the RNDIS first. */ + hn_rndis_detach(sc); + + /* Detach NVS. */ + hn_nvs_detach(sc); + + /* Detach all of the channels. */ + hn_detach_allchans(sc); +} + static void hn_set_ring_inuse(struct hn_softc *sc, int ring_cnt) { Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Wed Sep 28 04:34:21 2016 (r306390) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Wed Sep 28 04:45:00 2016 (r306391) @@ -957,11 +957,8 @@ done: return (error); } -/* - * RNDIS filter halt device - */ static int -hv_rf_halt_device(struct hn_softc *sc) +hn_rndis_halt(struct hn_softc *sc) { struct vmbus_xact *xact; struct rndis_halt_req *halt; @@ -1008,21 +1005,12 @@ hn_rndis_attach(struct hn_softc *sc) return (0); } -/* - * RNDIS filter on device remove - */ -int -hv_rf_on_device_remove(struct hn_softc *sc) +void +hn_rndis_detach(struct hn_softc *sc) { - int ret; - - /* Halt and release the rndis device */ - ret = hv_rf_halt_device(sc); - - /* Pass control to inner driver to remove the device */ - ret |= hv_nv_on_device_remove(sc); - return (ret); + /* Halt the RNDIS. */ + hn_rndis_halt(sc); } /* Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.h Wed Sep 28 04:34:21 2016 (r306390) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.h Wed Sep 28 04:45:00 2016 (r306391) @@ -43,7 +43,6 @@ struct hn_rx_ring; void hv_rf_on_receive(struct hn_softc *sc, struct hn_rx_ring *rxr, const void *data, int dlen); void hv_rf_channel_rollup(struct hn_rx_ring *rxr, struct hn_tx_ring *txr); -int hv_rf_on_device_remove(struct hn_softc *sc); int hv_rf_on_open(struct hn_softc *sc); int hv_rf_on_close(struct hn_softc *sc); Modified: head/sys/dev/hyperv/netvsc/if_hnvar.h ============================================================================== --- head/sys/dev/hyperv/netvsc/if_hnvar.h Wed Sep 28 04:34:21 2016 (r306390) +++ head/sys/dev/hyperv/netvsc/if_hnvar.h Wed Sep 28 04:45:00 2016 (r306391) @@ -118,6 +118,7 @@ uint32_t hn_chim_alloc(struct hn_softc * void hn_chim_free(struct hn_softc *sc, uint32_t chim_idx); int hn_rndis_attach(struct hn_softc *sc); +void hn_rndis_detach(struct hn_softc *sc); int hn_rndis_conf_rss(struct hn_softc *sc, uint16_t flags); void *hn_rndis_pktinfo_append(struct rndis_packet_msg *, size_t pktsize, size_t pi_dlen, uint32_t pi_type); @@ -127,6 +128,7 @@ int hn_rndis_get_linkstatus(struct hn_s uint32_t *link_status); int hn_nvs_attach(struct hn_softc *sc, int mtu); +void hn_nvs_detach(struct hn_softc *sc); int hn_nvs_alloc_subchans(struct hn_softc *sc, int *nsubch); void hn_nvs_sent_xact(struct hn_send_ctx *sndc, struct hn_softc *sc, struct vmbus_channel *chan, const void *data, int dlen); From owner-svn-src-head@freebsd.org Wed Sep 28 05:01:54 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46017C00226; Wed, 28 Sep 2016 05:01:54 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F24EDCB; Wed, 28 Sep 2016 05:01:53 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S51r3j073438; Wed, 28 Sep 2016 05:01:53 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S51rUS073437; Wed, 28 Sep 2016 05:01:53 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609280501.u8S51rUS073437@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 28 Sep 2016 05:01:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306392 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 05:01:54 -0000 Author: sephe Date: Wed Sep 28 05:01:53 2016 New Revision: 306392 URL: https://svnweb.freebsd.org/changeset/base/306392 Log: hyperv/hn: Reorder the comment a little bit. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8048 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Sep 28 04:45:00 2016 (r306391) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Sep 28 05:01:53 2016 (r306392) @@ -3580,16 +3580,18 @@ hn_suspend(struct hn_softc *sc) */ hv_rf_on_close(sc); - /* Give RNDIS enough time to flush all pending data packets. */ + /* + * Give RNDIS enough time to flush all pending data packets. + */ pause("waitrx", (200 * hz) / 1000); + /* + * Drain RX/TX bufrings and interrupts. + */ nsubch = sc->hn_rx_ring_inuse - 1; if (nsubch > 0) subch = vmbus_subchan_get(sc->hn_prichan, nsubch); - /* - * Drain RX/TX bufrings and interrupts. - */ if (subch != NULL) { for (i = 0; i < nsubch; ++i) hn_rx_drain(subch[i]); From owner-svn-src-head@freebsd.org Wed Sep 28 05:12:11 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EFAFC004C8; Wed, 28 Sep 2016 05:12:11 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8B863E8; Wed, 28 Sep 2016 05:12:10 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S5CAn9077978; Wed, 28 Sep 2016 05:12:10 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S5C9S5077973; Wed, 28 Sep 2016 05:12:09 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609280512.u8S5C9S5077973@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 28 Sep 2016 05:12:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306393 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 05:12:11 -0000 Author: sephe Date: Wed Sep 28 05:12:09 2016 New Revision: 306393 URL: https://svnweb.freebsd.org/changeset/base/306393 Log: hyperv/hn: Flatten RX filter configuration. This paves way for more fixes. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8049 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c head/sys/dev/hyperv/netvsc/hv_rndis_filter.c head/sys/dev/hyperv/netvsc/hv_rndis_filter.h head/sys/dev/hyperv/netvsc/if_hnvar.h Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Wed Sep 28 05:01:53 2016 (r306392) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Wed Sep 28 05:12:09 2016 (r306393) @@ -265,7 +265,6 @@ struct hn_softc { /* * Externs */ -extern int hv_promisc_mode; struct hn_send_ctx; void netvsc_linkstatus_callback(struct hn_softc *sc, uint32_t status); Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Sep 28 05:01:53 2016 (r306392) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Sep 28 05:12:09 2016 (r306393) @@ -205,8 +205,6 @@ struct hn_txdesc { * Globals */ -int hv_promisc_mode = 0; /* normal mode by default */ - SYSCTL_NODE(_hw, OID_AUTO, hn, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Hyper-V network interface"); @@ -1779,7 +1777,7 @@ static void hn_stop(struct hn_softc *sc) { struct ifnet *ifp; - int ret, i; + int i; HN_LOCK_ASSERT(sc); @@ -1795,7 +1793,8 @@ hn_stop(struct hn_softc *sc) if_link_state_change(ifp, LINK_STATE_DOWN); - ret = hv_rf_on_close(sc); + /* Disable RX by clearing RX filter. */ + hn_rndis_set_rxfilter(sc, 0); } /* @@ -1870,9 +1869,8 @@ hn_init_locked(struct hn_softc *sc) return; } - hv_promisc_mode = 1; - - ret = hv_rf_on_open(sc); + /* TODO: add hn_rx_filter */ + ret = hn_rndis_set_rxfilter(sc, NDIS_PACKET_TYPE_PROMISCUOUS); if (ret != 0) return; @@ -3576,9 +3574,9 @@ hn_suspend(struct hn_softc *sc) } /* - * Disable RX. + * Disable RX by clearing RX filter. */ - hv_rf_on_close(sc); + hn_rndis_set_rxfilter(sc, 0); /* * Give RNDIS enough time to flush all pending data packets. @@ -3612,8 +3610,9 @@ hn_resume(struct hn_softc *sc) /* * Re-enable RX. + * TODO: add hn_rx_filter. */ - hv_rf_on_open(sc); + hn_rndis_set_rxfilter(sc, NDIS_PACKET_TYPE_PROMISCUOUS); /* * Make sure to clear suspend status on "all" TX rings, Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Wed Sep 28 05:01:53 2016 (r306392) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Wed Sep 28 05:12:09 2016 (r306393) @@ -887,7 +887,7 @@ hn_rndis_conf_rss(struct hn_softc *sc, u return (error); } -static int +int hn_rndis_set_rxfilter(struct hn_softc *sc, uint32_t filter) { int error; @@ -1013,35 +1013,6 @@ hn_rndis_detach(struct hn_softc *sc) hn_rndis_halt(sc); } -/* - * RNDIS filter on open - */ -int -hv_rf_on_open(struct hn_softc *sc) -{ - uint32_t filter; - - /* XXX */ - if (hv_promisc_mode != 1) { - filter = NDIS_PACKET_TYPE_BROADCAST | - NDIS_PACKET_TYPE_ALL_MULTICAST | - NDIS_PACKET_TYPE_DIRECTED; - } else { - filter = NDIS_PACKET_TYPE_PROMISCUOUS; - } - return (hn_rndis_set_rxfilter(sc, filter)); -} - -/* - * RNDIS filter on close - */ -int -hv_rf_on_close(struct hn_softc *sc) -{ - - return (hn_rndis_set_rxfilter(sc, 0)); -} - void hv_rf_channel_rollup(struct hn_rx_ring *rxr, struct hn_tx_ring *txr) { Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.h Wed Sep 28 05:01:53 2016 (r306392) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.h Wed Sep 28 05:12:09 2016 (r306393) @@ -43,8 +43,6 @@ struct hn_rx_ring; void hv_rf_on_receive(struct hn_softc *sc, struct hn_rx_ring *rxr, const void *data, int dlen); void hv_rf_channel_rollup(struct hn_rx_ring *rxr, struct hn_tx_ring *txr); -int hv_rf_on_open(struct hn_softc *sc); -int hv_rf_on_close(struct hn_softc *sc); #endif /* __HV_RNDIS_FILTER_H__ */ Modified: head/sys/dev/hyperv/netvsc/if_hnvar.h ============================================================================== --- head/sys/dev/hyperv/netvsc/if_hnvar.h Wed Sep 28 05:01:53 2016 (r306392) +++ head/sys/dev/hyperv/netvsc/if_hnvar.h Wed Sep 28 05:12:09 2016 (r306393) @@ -126,6 +126,8 @@ int hn_rndis_get_rsscaps(struct hn_soft int hn_rndis_get_eaddr(struct hn_softc *sc, uint8_t *eaddr); int hn_rndis_get_linkstatus(struct hn_softc *sc, uint32_t *link_status); +/* filter: NDIS_PACKET_TYPE_ or 0. */ +int hn_rndis_set_rxfilter(struct hn_softc *sc, uint32_t filter); int hn_nvs_attach(struct hn_softc *sc, int mtu); void hn_nvs_detach(struct hn_softc *sc); From owner-svn-src-head@freebsd.org Wed Sep 28 07:18:02 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 668BAC0029E; Wed, 28 Sep 2016 07:18:02 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-oi0-x241.google.com (mail-oi0-x241.google.com [IPv6:2607:f8b0:4003:c06::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 22D427A1; Wed, 28 Sep 2016 07:18:02 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-oi0-x241.google.com with SMTP id w11so2404324oia.0; Wed, 28 Sep 2016 00:18:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=0J335yidme7Z1h7NOxhdj+seJChBf7yUiH9GU1GUJ2I=; b=vO1kdiyjI2jgs1XZeMiYZdYDBR5h5TOdaIAEflT+oyFhIBna5NoheCz8PinXUF4Apg OFR0b4eXSfPgduJyDPGLfnhZNupSqxVx/EfOfmAKI4qo5pZSnNkDKEVCz7/+tL5ewss4 iR82G9MT29UM9ZIXNjKlV4cjjn0hG7pcam4hstk0kY/Ct1Z7x/rJG/e5g8nW0hGY9Kys gTe5NY1B5NVcPH7paM71EQ2tYq+f/12AN0ZlCt4sOcW2Ccfl8i5avDdgng0ycJdbhlRt DJb936gvU0GUd+ysBXw1tYVdIJdnMwC0NkOdPnItAxS+L/AvucMuKJOdvFLuUnF3QiwY oApw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=0J335yidme7Z1h7NOxhdj+seJChBf7yUiH9GU1GUJ2I=; b=KO8wcmE5c5Z58IwEJkJpFupnXXAogarUQf7Ll8TjPcGMXtIztlymIpaGQptEA5XQ2x AvgfDMxecfoZvS52V7VTn3PGTG+acWSotaCeFoNh/TTzb/xGUbBwSr4v2zL/uSCdztZR piT2hxdc4ZB159uWKXKB+DUQnvcx/7lLBf7KUElakoA5tcF4kwtnSxkgt5LGKpG3G8o7 vlFI0AnlzyIHsZuhOhNoQrl4q7RbbMzd1fj5F5H/833MjS9kqslAmR6fU0eb3sI+Mm0u iedbLOtwQVz0foJhJspcwgQUOOExWjm5B2OqXuLryO6mD/BwfQ7tZGJSZEpH5saKzoUW /JAw== X-Gm-Message-State: AA6/9RlF8GXvShjYc7RHhJ7DnhKj1rm00pAHl7lBPGYrxKBehjVdXG2g0xKGyUu7I3xNdQ== X-Received: by 10.157.53.50 with SMTP id o47mr1666460otc.221.1475047081374; Wed, 28 Sep 2016 00:18:01 -0700 (PDT) Received: from [100.173.229.161] ([172.56.7.236]) by smtp.gmail.com with ESMTPSA id y6sm1984108oty.22.2016.09.28.00.17.59 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Sep 2016 00:18:00 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r306347 - head/lib/libc/tests From: Ngie Cooper X-Mailer: iPhone Mail (13G36) In-Reply-To: Date: Wed, 28 Sep 2016 16:17:56 +0900 Cc: Ruslan Bukin , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Transfer-Encoding: 7bit Message-Id: References: <201609261538.u8QFc2Av023865@repo.freebsd.org> To: Warner Losh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 07:18:02 -0000 > On Sep 27, 2016, at 06:25, Warner Losh wrote: > > Shouldn't we have MK_SSP == no on mips instead? That's how it's > supposed to work. If it isn't, perhaps we should set it like that. Thanks. This is what I was going to recommend. -Ngie From owner-svn-src-head@freebsd.org Wed Sep 28 08:11:02 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01F31BEC078; Wed, 28 Sep 2016 08:11:02 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C306BE88; Wed, 28 Sep 2016 08:11:01 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S8B0pS043016; Wed, 28 Sep 2016 08:11:00 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S8B0lK043015; Wed, 28 Sep 2016 08:11:00 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609280811.u8S8B0lK043015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 28 Sep 2016 08:11:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306395 - head/tests/sys/geom/class/eli X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 08:11:02 -0000 Author: br Date: Wed Sep 28 08:11:00 2016 New Revision: 306395 URL: https://svnweb.freebsd.org/changeset/base/306395 Log: Increase timeouts for geli tests. It takes 2-3x more time to proceed the tests on MIPS64EB in QEMU. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/tests/sys/geom/class/eli/Makefile Modified: head/tests/sys/geom/class/eli/Makefile ============================================================================== --- head/tests/sys/geom/class/eli/Makefile Wed Sep 28 06:11:01 2016 (r306394) +++ head/tests/sys/geom/class/eli/Makefile Wed Sep 28 08:11:00 2016 (r306395) @@ -25,13 +25,13 @@ TAP_TESTS_SH+= readonly_test TAP_TESTS_SH+= resize_test TAP_TESTS_SH+= setkey_test -TEST_METADATA.init_a_test+= timeout="1200" -TEST_METADATA.init_test+= timeout="300" -TEST_METADATA.integrity_copy_test+= timeout="1200" -TEST_METADATA.integrity_data_test+= timeout="600" -TEST_METADATA.integrity_hmac_test+= timeout="600" -TEST_METADATA.onetime_a_test+= timeout="600" -TEST_METADATA.onetime_test+= timeout="600" +TEST_METADATA.init_a_test+= timeout="3600" +TEST_METADATA.init_test+= timeout="600" +TEST_METADATA.integrity_copy_test+= timeout="3600" +TEST_METADATA.integrity_data_test+= timeout="1800" +TEST_METADATA.integrity_hmac_test+= timeout="1800" +TEST_METADATA.onetime_a_test+= timeout="1800" +TEST_METADATA.onetime_test+= timeout="1800" ${PACKAGE}FILES+= conf.sh From owner-svn-src-head@freebsd.org Wed Sep 28 08:35:06 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9064BEC714; Wed, 28 Sep 2016 08:35:06 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 932481FB1; Wed, 28 Sep 2016 08:35:06 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S8Z5CE054493; Wed, 28 Sep 2016 08:35:05 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S8Z56B054491; Wed, 28 Sep 2016 08:35:05 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609280835.u8S8Z56B054491@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 28 Sep 2016 08:35:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306396 - in head/sys: cam/ata sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 08:35:07 -0000 Author: sephe Date: Wed Sep 28 08:35:05 2016 New Revision: 306396 URL: https://svnweb.freebsd.org/changeset/base/306396 Log: cam/ata: Allow drivers to veto ATA disk attachment. This eventhandler is mainly used by VMs, e.g. Hyper-V, whose disk controllers share the disks with the simulated ATA controllers. Submitted by: Hongjiang Zhang Discussed with: mav MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7693 Modified: head/sys/cam/ata/ata_xpt.c head/sys/sys/eventhandler.h Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Wed Sep 28 08:11:00 2016 (r306395) +++ head/sys/cam/ata/ata_xpt.c Wed Sep 28 08:35:05 2016 (r306396) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -872,12 +873,24 @@ noerror: { struct ccb_pathinq cpi; int16_t *ptr; + int veto = 0; ident_buf = &softc->ident_data; for (ptr = (int16_t *)ident_buf; ptr < (int16_t *)ident_buf + sizeof(struct ata_params)/2; ptr++) { *ptr = le16toh(*ptr); } + + /* + * Allow others to veto this ATA disk attachment. This + * is mainly used by VMs, whose disk controllers may + * share the disks with the simulated ATA controllers. + */ + EVENTHANDLER_INVOKE(ada_probe_veto, path, ident_buf, &veto); + if (veto) { + goto device_fail; + } + if (strncmp(ident_buf->model, "FX", 2) && strncmp(ident_buf->model, "NEC", 3) && strncmp(ident_buf->model, "Pioneer", 7) && Modified: head/sys/sys/eventhandler.h ============================================================================== --- head/sys/sys/eventhandler.h Wed Sep 28 08:11:00 2016 (r306395) +++ head/sys/sys/eventhandler.h Wed Sep 28 08:35:05 2016 (r306396) @@ -270,4 +270,11 @@ typedef void (*unregister_framebuffer_fn EVENTHANDLER_DECLARE(register_framebuffer, register_framebuffer_fn); EVENTHANDLER_DECLARE(unregister_framebuffer, unregister_framebuffer_fn); +/* Veto ada attachment */ +struct cam_path; +struct ata_params; +typedef void (*ada_probe_veto_fn)(void *, struct cam_path *, + struct ata_params *, int *); +EVENTHANDLER_DECLARE(ada_probe_veto, ada_probe_veto_fn); + #endif /* _SYS_EVENTHANDLER_H_ */ From owner-svn-src-head@freebsd.org Wed Sep 28 08:45:44 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14131BEC9B8; Wed, 28 Sep 2016 08:45:44 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8B8D903; Wed, 28 Sep 2016 08:45:43 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S8jh6E058372; Wed, 28 Sep 2016 08:45:43 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S8jhkF058371; Wed, 28 Sep 2016 08:45:43 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609280845.u8S8jhkF058371@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 28 Sep 2016 08:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306397 - head/contrib/netbsd-tests/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 08:45:44 -0000 Author: br Date: Wed Sep 28 08:45:42 2016 New Revision: 306397 URL: https://svnweb.freebsd.org/changeset/base/306397 Log: Use right piece of code for FreeBSD. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/contrib/netbsd-tests/lib/libc/gen/t_nice.c Modified: head/contrib/netbsd-tests/lib/libc/gen/t_nice.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_nice.c Wed Sep 28 08:35:05 2016 (r306396) +++ head/contrib/netbsd-tests/lib/libc/gen/t_nice.c Wed Sep 28 08:45:42 2016 (r306397) @@ -125,7 +125,7 @@ ATF_TC_BODY(nice_priority, tc) if (pid == 0) { errno = 0; -#ifdef __FreeBSD__ +#ifdef __NetBSD__ pri = getpriority(PRIO_PROCESS, 0); #else pri2 = getpriority(PRIO_PROCESS, 0); From owner-svn-src-head@freebsd.org Wed Sep 28 10:42:09 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0448C001F6; Wed, 28 Sep 2016 10:42:09 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x22d.google.com (mail-pa0-x22d.google.com [IPv6:2607:f8b0:400e:c03::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 78D1810A1; Wed, 28 Sep 2016 10:42:09 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pa0-x22d.google.com with SMTP id qn7so15634354pac.3; Wed, 28 Sep 2016 03:42:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=VOf9K72+cfasDO9ibuTiKFnPAumCxs5Q2TjYlLKzJUs=; b=MCc4X8aUNMcS5pX/YWVjf6V6Ld775H6VOce2Ym2C3G3Upbep5ObifvkW7+vxtYB80k M/Tt2MaOuv3dAlgOESp2pL7Qi6qrI6FgPnLInU8uvnJzfmxwg/mvw8ZGwf0+TxrMdCvI +1Vb6RXP05dgyXRLMssAB1FBtRQegdRF1NGXn69RkAWQEDwtABf85nohQgFnj/kUGKxE E+0O7bWdhHt7HCP5ooDPTb1Z9okKqTMmZTEUb8bAmmx6S/XAesHetj7d8FBUOmX3xDHJ bR1ZA/1hn5MuuaC137e/a31XK/KG18XaMx1tdW76gcxVQjvqL3VOESZjOTIni4O8l2yx oFEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=VOf9K72+cfasDO9ibuTiKFnPAumCxs5Q2TjYlLKzJUs=; b=S3pq18NSv4GDTVfJi0tA0gQdSyskq3ur/gg/WsmeBVZkHU7NEpPld9kWxDYsG4EV0x ohQycsIKGFchNggO+3apgOeEqnZEYy6iyxPTYeIL0L0pB3/AdAlTjSE27QJRoXmgnxAo 3UeEoKzOuhhQGD5fTAzy5wEVREs4myCzAMqI4x16zSmF0LVd3Aodw1jsIqgNqFVrUytF HHsRIgwaVtlivuuvcHJ0/UcoZ6X0WcrtGlYxepTNpaBcN+Dh22kL+/gB+p75Avj8mLab rireB4Rz9heie1XFWoR/50rofv/W3J2AaV3lUt2DKpWMnPjjsrWgydan+lQJfaDilxYC JHfg== X-Gm-Message-State: AE9vXwMuKVbE2B08FWs8FdW6BaA4hEzhCXgXsiAPt89AALTTcJct1uy5fGL3b5M2aVzZ4A== X-Received: by 10.66.124.198 with SMTP id mk6mr55519210pab.74.1475059328835; Wed, 28 Sep 2016 03:42:08 -0700 (PDT) Received: from [192.168.11.58] (114-134-113-214.odwr.j-cnet.jp. [114.134.113.214]) by smtp.gmail.com with ESMTPSA id r7sm11518632pfk.49.2016.09.28.03.42.07 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Sep 2016 03:42:08 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r306395 - head/tests/sys/geom/class/eli From: Ngie Cooper X-Mailer: iPhone Mail (13G36) In-Reply-To: <201609280811.u8S8B0lK043015@repo.freebsd.org> Date: Wed, 28 Sep 2016 19:42:04 +0900 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201609280811.u8S8B0lK043015@repo.freebsd.org> To: Ruslan Bukin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 10:42:09 -0000 > On Sep 28, 2016, at 17:11, Ruslan Bukin wrote: >=20 > Author: br > Date: Wed Sep 28 08:11:00 2016 > New Revision: 306395 > URL: https://svnweb.freebsd.org/changeset/base/306395 >=20 > Log: > Increase timeouts for geli tests. It takes 2-3x more time to proceed the > tests on MIPS64EB in QEMU. >=20 > Sponsored by: DARPA, AFRL > Sponsored by: HEIF5 >=20 > Modified: > head/tests/sys/geom/class/eli/Makefile >=20 > Modified: head/tests/sys/geom/class/eli/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/tests/sys/geom/class/eli/Makefile Wed Sep 28 06:11:01 2016 (= r306394) > +++ head/tests/sys/geom/class/eli/Makefile Wed Sep 28 08:11:00 2016 (= r306395) > @@ -25,13 +25,13 @@ TAP_TESTS_SH+=3D readonly_test > TAP_TESTS_SH+=3D resize_test > TAP_TESTS_SH+=3D setkey_test Thanks. It took longer to run some of the tests on i386 too..= From owner-svn-src-head@freebsd.org Wed Sep 28 10:44:23 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70418C00274; Wed, 28 Sep 2016 10:44:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x232.google.com (mail-pf0-x232.google.com [IPv6:2607:f8b0:400e:c00::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 40681126A; Wed, 28 Sep 2016 10:44:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x232.google.com with SMTP id q2so16325845pfj.3; Wed, 28 Sep 2016 03:44:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=11I42fsWaKZYAZIt4Kb64ztRFbhb38TyF5yprPiHKxs=; b=AVyZfd8wWvL2gVddoDKcHxlGhAYIaZGq4BRpIrB+/5RGOuWF05P01AHTHVGwyuctO2 zVvLe/r2TuYGtb7JpX6dGhcX+3DufMrllOxMArv+EBA8vRgfVtLIA+7PfGKUHYxEIUb6 tAUFn9l2GqbtIzVerqdN2hJXNqmVUgahMrqTSbqZuhFngYJLDHqTBEHPxQKzCRTFeILG 6c7HYIg06fAGumI7Dn83gERhg+KXGBI0BKgCGdJr+yfwQmCN5DNoeGBa5xLL3uTIpn5p EAN8O4VXkkxsOQ0oXNnSRik9K1kxgJktYBagKm188qOKDQT72NJ7H7OaWeFr+TvhPgMY KE/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=11I42fsWaKZYAZIt4Kb64ztRFbhb38TyF5yprPiHKxs=; b=OhTjhveVwpvjDeBDQ8ZS0fQN2U/iAcmAVjBVFsKgnkOr//C8kgC4Cv7Ik9RqXTI7qU Oo6trPHgyamwW9bu0a9U4LkjTKOuSKM0AT7Gs7ytHURo5hdVbT2y5woglcXyZf1ucToa hrsA5tlZY5LeUu8FoNwzx+04AffNhcEab2KHx/aw8Iba9IuUKylHB10tEC4YhyH8OLZ0 PVWTli+q2+1OXm2S5TDmNuxuja/2nVZEMeqB8ldKhLz+KdjD4eGn0fY62aOyO3PO9cHB HZWK+HkGqMs0bLfATncYbIsnFFmCgLpzBDk9kQalL1NIf3nEbLY1d8Fd83l3+P47qjnH MwNg== X-Gm-Message-State: AE9vXwMxVqn3eK9pajE9rpOv7vCcjS7zVsSl1/yW0fAuIm/AbCRiEvFt1H8c0y56GP47qg== X-Received: by 10.98.211.193 with SMTP id z62mr55140479pfk.124.1475059462661; Wed, 28 Sep 2016 03:44:22 -0700 (PDT) Received: from [192.168.11.58] (114-134-113-214.odwr.j-cnet.jp. [114.134.113.214]) by smtp.gmail.com with ESMTPSA id j1sm11516455pfg.95.2016.09.28.03.44.21 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Sep 2016 03:44:22 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r306397 - head/contrib/netbsd-tests/lib/libc/gen From: Ngie Cooper X-Mailer: iPhone Mail (13G36) In-Reply-To: <201609280845.u8S8jhkF058371@repo.freebsd.org> Date: Wed, 28 Sep 2016 19:44:20 +0900 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <5768D1B8-A03C-4D9D-B884-3CBF3B1193BD@gmail.com> References: <201609280845.u8S8jhkF058371@repo.freebsd.org> To: Ruslan Bukin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 10:44:23 -0000 > On Sep 28, 2016, at 17:45, Ruslan Bukin wrote: >=20 > Author: br > Date: Wed Sep 28 08:45:42 2016 > New Revision: 306397 > URL: https://svnweb.freebsd.org/changeset/base/306397 >=20 > Log: > Use right piece of code for FreeBSD. >=20 > Sponsored by: DARPA, AFRL > Sponsored by: HEIF5 >=20 > Modified: > head/contrib/netbsd-tests/lib/libc/gen/t_nice.c I didn't run into this problem on amd64 -- what was the symptom that you ran= into? Thanks, -Ngie= From owner-svn-src-head@freebsd.org Wed Sep 28 12:13:54 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25F71C00F76; Wed, 28 Sep 2016 12:13:54 +0000 (UTC) (envelope-from rb743@hermes.cam.ac.uk) Received: from ppsw-31.csi.cam.ac.uk (ppsw-31.csi.cam.ac.uk [131.111.8.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7871A4B; Wed, 28 Sep 2016 12:13:53 +0000 (UTC) (envelope-from rb743@hermes.cam.ac.uk) X-Cam-AntiVirus: no malware found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from sc1.bsdpad.com ([163.172.212.18]:51406) by ppsw-31.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.157]:587) with esmtpsa (LOGIN:rb743) (TLSv1:ECDHE-RSA-AES256-SHA:256) id 1bpDk8-000Cte-Lf (Exim 4.86_36-e07b163) (return-path ); Wed, 28 Sep 2016 13:13:44 +0100 Date: Wed, 28 Sep 2016 12:13:42 +0000 From: Ruslan Bukin To: Ngie Cooper Cc: Ruslan Bukin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306397 - head/contrib/netbsd-tests/lib/libc/gen Message-ID: <20160928121342.GA45465@bsdpad.com> References: <201609280845.u8S8jhkF058371@repo.freebsd.org> <5768D1B8-A03C-4D9D-B884-3CBF3B1193BD@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5768D1B8-A03C-4D9D-B884-3CBF3B1193BD@gmail.com> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: "R. Bukin" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 12:13:54 -0000 On Wed, Sep 28, 2016 at 07:44:20PM +0900, Ngie Cooper wrote: > > > On Sep 28, 2016, at 17:45, Ruslan Bukin wrote: > > > > Author: br > > Date: Wed Sep 28 08:45:42 2016 > > New Revision: 306397 > > URL: https://svnweb.freebsd.org/changeset/base/306397 > > > > Log: > > Use right piece of code for FreeBSD. > > > > Sponsored by: DARPA, AFRL > > Sponsored by: HEIF5 > > > > Modified: > > head/contrib/netbsd-tests/lib/libc/gen/t_nice.c > > I didn't run into this problem on amd64 -- what was the symptom that you ran into? > Thanks, I think pri and pri2 here were not equeal (as pri2 was not initialized at all) so test failed. if (pri != pri2) _exit(EXIT_FAILURE); Very interesting why it works on amd64. Ruslan From owner-svn-src-head@freebsd.org Wed Sep 28 12:23:47 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0494BEC3F3; Wed, 28 Sep 2016 12:23:47 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BEAAFCA; Wed, 28 Sep 2016 12:23:47 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8SCNk3c041346; Wed, 28 Sep 2016 12:23:46 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SCNkrJ041345; Wed, 28 Sep 2016 12:23:46 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609281223.u8SCNkrJ041345@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 28 Sep 2016 12:23:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306406 - head/sys/mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 12:23:47 -0000 Author: br Date: Wed Sep 28 12:23:46 2016 New Revision: 306406 URL: https://svnweb.freebsd.org/changeset/base/306406 Log: Fill all the siginfo so we have si_value set as well. This fixes timer_create(2) tests. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/sys/mips/mips/pm_machdep.c Modified: head/sys/mips/mips/pm_machdep.c ============================================================================== --- head/sys/mips/mips/pm_machdep.c Wed Sep 28 09:51:07 2016 (r306405) +++ head/sys/mips/mips/pm_machdep.c Wed Sep 28 12:23:46 2016 (r306406) @@ -143,6 +143,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, /* sf.sf_ahu.sf_action = (__siginfohandler_t *)catcher; */ /* fill siginfo structure */ + sf.sf_si = ksi->ksi_info; sf.sf_si.si_signo = sig; sf.sf_si.si_code = ksi->ksi_code; sf.sf_si.si_addr = (void*)(intptr_t)regs->badvaddr; From owner-svn-src-head@freebsd.org Wed Sep 28 13:29:12 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EEB2C003F3; Wed, 28 Sep 2016 13:29:12 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5544812C3; Wed, 28 Sep 2016 13:29:12 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8SDTBB3064914; Wed, 28 Sep 2016 13:29:11 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SDTBBu064911; Wed, 28 Sep 2016 13:29:11 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201609281329.u8SDTBBu064911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Wed, 28 Sep 2016 13:29:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306407 - in head/sys: net netinet netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 13:29:12 -0000 Author: kevlo Date: Wed Sep 28 13:29:11 2016 New Revision: 306407 URL: https://svnweb.freebsd.org/changeset/base/306407 Log: Remove ifa_list, use ifa_link (structure field) instead. While here, prefer if_addrhead (FreeBSD) to if_addrlist (BSD compat) naming for the interface address list in sctp_bsd_addr.c Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D8051 Modified: head/sys/net/if_var.h head/sys/netinet/sctp_bsd_addr.c head/sys/netpfil/pf/pf_if.c Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Wed Sep 28 12:23:46 2016 (r306406) +++ head/sys/net/if_var.h Wed Sep 28 13:29:11 2016 (r306407) @@ -448,9 +448,6 @@ struct ifaddr { counter_u64_t ifa_obytes; }; -/* For compatibility with other BSDs. SCTP uses it. */ -#define ifa_list ifa_link - struct ifaddr * ifa_alloc(size_t size, int flags); void ifa_free(struct ifaddr *ifa); void ifa_ref(struct ifaddr *ifa); Modified: head/sys/netinet/sctp_bsd_addr.c ============================================================================== --- head/sys/netinet/sctp_bsd_addr.c Wed Sep 28 12:23:46 2016 (r306406) +++ head/sys/netinet/sctp_bsd_addr.c Wed Sep 28 13:29:11 2016 (r306407) @@ -214,7 +214,7 @@ sctp_init_ifns_for_vrf(int vrfid) continue; } IF_ADDR_RLOCK(ifn); - TAILQ_FOREACH(ifa, &ifn->if_addrlist, ifa_list) { + TAILQ_FOREACH(ifa, &ifn->if_addrhead, ifa_link) { if (ifa->ifa_addr == NULL) { continue; } @@ -365,7 +365,7 @@ void if (!(*pred) (ifn)) { continue; } - TAILQ_FOREACH(ifa, &ifn->if_addrlist, ifa_list) { + TAILQ_FOREACH(ifa, &ifn->if_addrhead, ifa_link) { sctp_addr_change(ifa, add ? RTM_ADD : RTM_DELETE); } } Modified: head/sys/netpfil/pf/pf_if.c ============================================================================== --- head/sys/netpfil/pf/pf_if.c Wed Sep 28 12:23:46 2016 (r306406) +++ head/sys/netpfil/pf/pf_if.c Wed Sep 28 13:29:11 2016 (r306407) @@ -523,7 +523,7 @@ pfi_instance_add(struct ifnet *ifp, int int net2, af; IF_ADDR_RLOCK(ifp); - TAILQ_FOREACH(ia, &ifp->if_addrhead, ifa_list) { + TAILQ_FOREACH(ia, &ifp->if_addrhead, ifa_link) { if (ia->ifa_addr == NULL) continue; af = ia->ifa_addr->sa_family; From owner-svn-src-head@freebsd.org Wed Sep 28 14:13:42 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 688ADC0132A; Wed, 28 Sep 2016 14:13:42 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35C9E101E; Wed, 28 Sep 2016 14:13:42 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8SEDfg6083815; Wed, 28 Sep 2016 14:13:41 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SEDfBq083814; Wed, 28 Sep 2016 14:13:41 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609281413.u8SEDfBq083814@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 28 Sep 2016 14:13:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306408 - head/sys/mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 14:13:42 -0000 Author: br Date: Wed Sep 28 14:13:41 2016 New Revision: 306408 URL: https://svnweb.freebsd.org/changeset/base/306408 Log: Use SIGSEGV signal for memory protection failures from userspace on MIPS. (same as ARMv8, RISC-V and other architectures do). This makes mmap tests happy. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/sys/mips/mips/trap.c Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Wed Sep 28 13:29:11 2016 (r306407) +++ head/sys/mips/mips/trap.c Wed Sep 28 14:13:41 2016 (r306408) @@ -741,8 +741,11 @@ dofault: } goto err; } - ucode = ftype; - i = ((rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV); + i = SIGSEGV; + if (rv == KERN_PROTECTION_FAILURE) + ucode = SEGV_ACCERR; + else + ucode = SEGV_MAPERR; addr = trapframe->pc; msg = "BAD_PAGE_FAULT"; From owner-svn-src-head@freebsd.org Wed Sep 28 14:48:36 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 956C8C01BCB; Wed, 28 Sep 2016 14:48:36 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58EBE66B; Wed, 28 Sep 2016 14:48:36 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8SEmZTq095312; Wed, 28 Sep 2016 14:48:35 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SEmZEt095307; Wed, 28 Sep 2016 14:48:35 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609281448.u8SEmZEt095307@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 28 Sep 2016 14:48:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306409 - head/lib/msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 14:48:36 -0000 Author: emaste Date: Wed Sep 28 14:48:34 2016 New Revision: 306409 URL: https://svnweb.freebsd.org/changeset/base/306409 Log: libm: fix some unused variable (rcsid) and dangling else warnings s_{fabs,fmax,logb,scalb}{,f,l}.c may be built elsewhere with a higher WARNS setting. Reviewed by: ed Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8061 Modified: head/lib/msun/src/s_fabs.c head/lib/msun/src/s_logbl.c head/lib/msun/src/s_scalbn.c head/lib/msun/src/s_scalbnf.c head/lib/msun/src/s_scalbnl.c Modified: head/lib/msun/src/s_fabs.c ============================================================================== --- head/lib/msun/src/s_fabs.c Wed Sep 28 14:13:41 2016 (r306408) +++ head/lib/msun/src/s_fabs.c Wed Sep 28 14:48:34 2016 (r306409) @@ -10,9 +10,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif +#include +__FBSDID("$FreeBSD$"); /* * fabs(x) returns the absolute value of x. Modified: head/lib/msun/src/s_logbl.c ============================================================================== --- head/lib/msun/src/s_logbl.c Wed Sep 28 14:13:41 2016 (r306408) +++ head/lib/msun/src/s_logbl.c Wed Sep 28 14:48:34 2016 (r306409) @@ -10,9 +10,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif +#include +__FBSDID("$FreeBSD$"); #include #include Modified: head/lib/msun/src/s_scalbn.c ============================================================================== --- head/lib/msun/src/s_scalbn.c Wed Sep 28 14:13:41 2016 (r306408) +++ head/lib/msun/src/s_scalbn.c Wed Sep 28 14:48:34 2016 (r306409) @@ -10,9 +10,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif +#include +__FBSDID("$FreeBSD$"); /* * scalbn (double x, int n) @@ -21,7 +20,6 @@ static char rcsid[] = "$FreeBSD$"; * exponentiation or a multiplication. */ -#include #include #include "math.h" @@ -51,10 +49,12 @@ scalbn (double x, int n) if (k > 0x7fe) return huge*copysign(huge,x); /* overflow */ if (k > 0) /* normal result */ {SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20)); return x;} - if (k <= -54) + if (k <= -54) { if (n > 50000) /* in case integer overflow in n+k */ return huge*copysign(huge,x); /*overflow*/ - else return tiny*copysign(tiny,x); /*underflow*/ + else + return tiny*copysign(tiny,x); /*underflow*/ + } k += 54; /* subnormal result */ SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20)); return x*twom54; Modified: head/lib/msun/src/s_scalbnf.c ============================================================================== --- head/lib/msun/src/s_scalbnf.c Wed Sep 28 14:13:41 2016 (r306408) +++ head/lib/msun/src/s_scalbnf.c Wed Sep 28 14:48:34 2016 (r306409) @@ -13,11 +13,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif - #include +__FBSDID("$FreeBSD$"); #include "math.h" #include "math_private.h" @@ -46,10 +43,12 @@ scalbnf (float x, int n) if (k > 0xfe) return huge*copysignf(huge,x); /* overflow */ if (k > 0) /* normal result */ {SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23)); return x;} - if (k <= -25) + if (k <= -25) { if (n > 50000) /* in case integer overflow in n+k */ return huge*copysignf(huge,x); /*overflow*/ - else return tiny*copysignf(tiny,x); /*underflow*/ + else + return tiny*copysignf(tiny,x); /*underflow*/ + } k += 25; /* subnormal result */ SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23)); return x*twom25; Modified: head/lib/msun/src/s_scalbnl.c ============================================================================== --- head/lib/msun/src/s_scalbnl.c Wed Sep 28 14:13:41 2016 (r306408) +++ head/lib/msun/src/s_scalbnl.c Wed Sep 28 14:48:34 2016 (r306409) @@ -10,9 +10,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif +#include +__FBSDID("$FreeBSD$"); /* * scalbnl (long double x, int n) @@ -27,7 +26,6 @@ static char rcsid[] = "$FreeBSD$"; * for scalbn(), so we don't use this routine. */ -#include #include #include @@ -59,10 +57,12 @@ scalbnl (long double x, int n) if (k >= 0x7fff) return huge*copysignl(huge,x); /* overflow */ if (k > 0) /* normal result */ {u.bits.exp = k; return u.e;} - if (k <= -128) + if (k <= -128) { if (n > 50000) /* in case integer overflow in n+k */ return huge*copysign(huge,x); /*overflow*/ - else return tiny*copysign(tiny,x); /*underflow*/ + else + return tiny*copysign(tiny,x); /*underflow*/ + } k += 128; /* subnormal result */ u.bits.exp = k; return u.e*0x1p-128; From owner-svn-src-head@freebsd.org Wed Sep 28 17:44:04 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 895ACC018C9; Wed, 28 Sep 2016 17:44:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B7DC8F3; Wed, 28 Sep 2016 17:44:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8SHi3XN062864; Wed, 28 Sep 2016 17:44:03 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SHi3au062863; Wed, 28 Sep 2016 17:44:03 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609281744.u8SHi3au062863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 28 Sep 2016 17:44:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306410 - head/lib/msun X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 17:44:04 -0000 Author: emaste Date: Wed Sep 28 17:44:03 2016 New Revision: 306410 URL: https://svnweb.freebsd.org/changeset/base/306410 Log: libm: simplify i387 subdir logic with make's :S substitution Modified: head/lib/msun/Makefile Modified: head/lib/msun/Makefile ============================================================================== --- head/lib/msun/Makefile Wed Sep 28 14:48:34 2016 (r306409) +++ head/lib/msun/Makefile Wed Sep 28 17:44:03 2016 (r306410) @@ -13,11 +13,7 @@ # PACKAGE= clibs -.if ${MACHINE_CPUARCH} == "i386" -ARCH_SUBDIR= i387 -.else -ARCH_SUBDIR= ${MACHINE_CPUARCH} -.endif +ARCH_SUBDIR= ${MACHINE_CPUARCH:S/i386/i387/} .include "${ARCH_SUBDIR}/Makefile.inc" From owner-svn-src-head@freebsd.org Wed Sep 28 21:22:52 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EB14C019AD; Wed, 28 Sep 2016 21:22:52 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E04511F1; Wed, 28 Sep 2016 21:22:52 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8SLMpJ2047703; Wed, 28 Sep 2016 21:22:51 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SLMprw047702; Wed, 28 Sep 2016 21:22:51 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609282122.u8SLMprw047702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 28 Sep 2016 21:22:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306417 - head/usr.sbin/portsnap/portsnap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 21:22:52 -0000 Author: emaste Date: Wed Sep 28 21:22:51 2016 New Revision: 306417 URL: https://svnweb.freebsd.org/changeset/base/306417 Log: portsnap: only move expected snapshot contents from snap/ to files/ Previously it was possible to smuggle in addional files that would be used by later portsnap runs. Now we only move those files expected to be in the snapshot into files/ and require that there are no unexpected files. This was used by portsnap attacks 2, 3, and 4 in the "non-cryptanalytic attacks against FreeBSD update components" anonymous gist. Reported by: anonymous gist Reviewed by: allanjude, delphij MFC after: ASAP Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8052 Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh ============================================================================== --- head/usr.sbin/portsnap/portsnap/portsnap.sh Wed Sep 28 20:54:47 2016 (r306416) +++ head/usr.sbin/portsnap/portsnap/portsnap.sh Wed Sep 28 21:22:51 2016 (r306417) @@ -691,6 +691,13 @@ fetch_snapshot() { fetch_index_sanity || return 1 # Verify the snapshot contents cut -f 2 -d '|' INDEX.new | fetch_snapshot_verify || return 1 + cut -f 2 -d '|' tINDEX.new INDEX.new | sort -u > files.expected + find snap -mindepth 1 | sed -E 's^snap/(.*)\.gz^\1^' | sort > files.snap + if ! cmp -s files.expected files.snap; then + echo "unexpected files in snapshot." + return 1 + fi + rm files.expected files.snap echo "done." # Move files into their proper locations From owner-svn-src-head@freebsd.org Wed Sep 28 23:54:49 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BEA8C01F62; Wed, 28 Sep 2016 23:54:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B6E8177F; Wed, 28 Sep 2016 23:54:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8SNsmo0004151; Wed, 28 Sep 2016 23:54:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SNslHu004142; Wed, 28 Sep 2016 23:54:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201609282354.u8SNslHu004142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 28 Sep 2016 23:54:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306424 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 23:54:49 -0000 Author: mav Date: Wed Sep 28 23:54:47 2016 New Revision: 306424 URL: https://svnweb.freebsd.org/changeset/base/306424 Log: MFV r306422: 7254 ztest failed assertion in ztest_dataset_dirobj_verify: dirobjs + 1 == usedobjs dsl_dataset_space is looking at the ds_bp's fill count while dmu_objset_write_ready() is concurrently modifying it. This fix adds an rrwlock to protect the ds_bp. Closes #180 Reviewed by: George Wilson Reviewed by: Prakash Surya Reviewed by: Matthew Ahrens Reviewed by: Steve Gonczi Author: Paul Dagnelie Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Sep 28 23:46:08 2016 (r306423) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Sep 28 23:54:47 2016 (r306424) @@ -1489,10 +1489,18 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t * objects may be dirtied in syncing context, but only if they * were already pre-dirtied in open context. */ +#ifdef DEBUG + if (dn->dn_objset->os_dsl_dataset != NULL) { + rrw_enter(&dn->dn_objset->os_dsl_dataset->ds_bp_rwlock, + RW_READER, FTAG); + } ASSERT(!dmu_tx_is_syncing(tx) || BP_IS_HOLE(dn->dn_objset->os_rootbp) || DMU_OBJECT_IS_SPECIAL(dn->dn_object) || dn->dn_objset->os_dsl_dataset == NULL); + if (dn->dn_objset->os_dsl_dataset != NULL) + rrw_exit(&dn->dn_objset->os_dsl_dataset->ds_bp_rwlock, FTAG); +#endif /* * We make this assert for private objects as well, but after we * check if we're already dirty. They are allowed to re-dirty @@ -1517,12 +1525,21 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t * Don't set dirtyctx to SYNC if we're just modifying this as we * initialize the objset. */ - if (dn->dn_dirtyctx == DN_UNDIRTIED && - !BP_IS_HOLE(dn->dn_objset->os_rootbp)) { - dn->dn_dirtyctx = - (dmu_tx_is_syncing(tx) ? DN_DIRTY_SYNC : DN_DIRTY_OPEN); - ASSERT(dn->dn_dirtyctx_firstset == NULL); - dn->dn_dirtyctx_firstset = kmem_alloc(1, KM_SLEEP); + if (dn->dn_dirtyctx == DN_UNDIRTIED) { + if (dn->dn_objset->os_dsl_dataset != NULL) { + rrw_enter(&dn->dn_objset->os_dsl_dataset->ds_bp_rwlock, + RW_READER, FTAG); + } + if (!BP_IS_HOLE(dn->dn_objset->os_rootbp)) { + dn->dn_dirtyctx = (dmu_tx_is_syncing(tx) ? + DN_DIRTY_SYNC : DN_DIRTY_OPEN); + ASSERT(dn->dn_dirtyctx_firstset == NULL); + dn->dn_dirtyctx_firstset = kmem_alloc(1, KM_SLEEP); + } + if (dn->dn_objset->os_dsl_dataset != NULL) { + rrw_exit(&dn->dn_objset->os_dsl_dataset->ds_bp_rwlock, + FTAG); + } } mutex_exit(&dn->dn_mtx); @@ -1567,8 +1584,14 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t * this assertion only if we're not already dirty. */ os = dn->dn_objset; +#ifdef DEBUG + if (dn->dn_objset->os_dsl_dataset != NULL) + rrw_enter(&os->os_dsl_dataset->ds_bp_rwlock, RW_READER, FTAG); ASSERT(!dmu_tx_is_syncing(tx) || DMU_OBJECT_IS_SPECIAL(dn->dn_object) || os->os_dsl_dataset == NULL || BP_IS_HOLE(os->os_rootbp)); + if (dn->dn_objset->os_dsl_dataset != NULL) + rrw_exit(&os->os_dsl_dataset->ds_bp_rwlock, FTAG); +#endif ASSERT(db->db.db_size != 0); dprintf_dbuf(db, "size=%llx\n", (u_longlong_t)db->db.db_size); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Wed Sep 28 23:46:08 2016 (r306423) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Wed Sep 28 23:54:47 2016 (r306424) @@ -489,8 +489,10 @@ dmu_objset_from_ds(dsl_dataset_t *ds, ob mutex_enter(&ds->ds_opening_lock); if (ds->ds_objset == NULL) { objset_t *os; + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); err = dmu_objset_open_impl(dsl_dataset_get_spa(ds), ds, dsl_dataset_get_blkptr(ds), &os); + rrw_exit(&ds->ds_bp_rwlock, FTAG); if (err == 0) { mutex_enter(&ds->ds_lock); @@ -876,9 +878,11 @@ dmu_objset_create_sync(void *arg, dmu_tx doca->doca_cred, tx); VERIFY0(dsl_dataset_hold_obj(pdd->dd_pool, obj, FTAG, &ds)); + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); bp = dsl_dataset_get_blkptr(ds); os = dmu_objset_create_impl(pdd->dd_pool->dp_spa, ds, bp, doca->doca_type, tx); + rrw_exit(&ds->ds_bp_rwlock, FTAG); if (doca->doca_userfunc != NULL) { doca->doca_userfunc(os, doca->doca_userarg, @@ -1051,7 +1055,6 @@ dmu_objset_write_ready(zio_t *zio, arc_b dnode_phys_t *dnp = &os->os_phys->os_meta_dnode; ASSERT(!BP_IS_EMBEDDED(bp)); - ASSERT3P(bp, ==, os->os_rootbp); ASSERT3U(BP_GET_TYPE(bp), ==, DMU_OT_OBJSET); ASSERT0(BP_GET_LEVEL(bp)); @@ -1064,6 +1067,11 @@ dmu_objset_write_ready(zio_t *zio, arc_b bp->blk_fill = 0; for (int i = 0; i < dnp->dn_nblkptr; i++) bp->blk_fill += BP_GET_FILL(&dnp->dn_blkptr[i]); + if (os->os_dsl_dataset != NULL) + rrw_enter(&os->os_dsl_dataset->ds_bp_rwlock, RW_WRITER, FTAG); + *os->os_rootbp = *bp; + if (os->os_dsl_dataset != NULL) + rrw_exit(&os->os_dsl_dataset->ds_bp_rwlock, FTAG); } /* ARGSUSED */ @@ -1083,6 +1091,7 @@ dmu_objset_write_done(zio_t *zio, arc_bu (void) dsl_dataset_block_kill(ds, bp_orig, tx, B_TRUE); dsl_dataset_block_born(ds, bp, tx); } + kmem_free(bp, sizeof (*bp)); } /* called from dsl */ @@ -1096,6 +1105,8 @@ dmu_objset_sync(objset_t *os, zio_t *pio list_t *list; list_t *newlist = NULL; dbuf_dirty_record_t *dr; + blkptr_t *blkptr_copy = kmem_alloc(sizeof (*os->os_rootbp), KM_SLEEP); + *blkptr_copy = *os->os_rootbp; dprintf_ds(os->os_dsl_dataset, "txg=%llu\n", tx->tx_txg); @@ -1123,7 +1134,7 @@ dmu_objset_sync(objset_t *os, zio_t *pio dmu_write_policy(os, NULL, 0, 0, &zp); zio = arc_write(pio, os->os_spa, tx->tx_txg, - os->os_rootbp, os->os_phys_buf, DMU_OS_IS_L2CACHEABLE(os), + blkptr_copy, os->os_phys_buf, DMU_OS_IS_L2CACHEABLE(os), &zp, dmu_objset_write_ready, NULL, NULL, dmu_objset_write_done, os, ZIO_PRIORITY_ASYNC_WRITE, ZIO_FLAG_MUSTSUCCEED, &zb); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Wed Sep 28 23:46:08 2016 (r306423) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Wed Sep 28 23:54:47 2016 (r306424) @@ -1510,10 +1510,12 @@ dmu_recv_begin_sync(void *arg, dmu_tx_t * If we actually created a non-clone, we need to create the * objset in our new dataset. */ + rrw_enter(&newds->ds_bp_rwlock, RW_READER, FTAG); if (BP_IS_HOLE(dsl_dataset_get_blkptr(newds))) { (void) dmu_objset_create_impl(dp->dp_spa, newds, dsl_dataset_get_blkptr(newds), drrb->drr_type, tx); } + rrw_exit(&newds->ds_bp_rwlock, FTAG); drba->drba_cookie->drc_ds = newds; @@ -1656,7 +1658,9 @@ dmu_recv_resume_begin_sync(void *arg, dm dmu_buf_will_dirty(ds->ds_dbuf, tx); dsl_dataset_phys(ds)->ds_flags |= DS_FLAG_INCONSISTENT; + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); ASSERT(!BP_IS_HOLE(dsl_dataset_get_blkptr(ds))); + rrw_exit(&ds->ds_bp_rwlock, FTAG); drba->drba_cookie->drc_ds = ds; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Wed Sep 28 23:46:08 2016 (r306423) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Wed Sep 28 23:54:47 2016 (r306424) @@ -312,6 +312,7 @@ dsl_dataset_evict(void *dbu) mutex_destroy(&ds->ds_opening_lock); mutex_destroy(&ds->ds_sendstream_lock); refcount_destroy(&ds->ds_longholds); + rrw_destroy(&ds->ds_bp_rwlock); kmem_free(ds, sizeof (dsl_dataset_t)); } @@ -441,6 +442,7 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin mutex_init(&ds->ds_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&ds->ds_opening_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&ds->ds_sendstream_lock, NULL, MUTEX_DEFAULT, NULL); + rrw_init(&ds->ds_bp_rwlock, B_FALSE); refcount_create(&ds->ds_longholds); bplist_create(&ds->ds_pending_deadlist); @@ -831,7 +833,9 @@ dsl_dataset_create_sync_dd(dsl_dir_t *dd dsl_dataset_phys(origin)->ds_compressed_bytes; dsphys->ds_uncompressed_bytes = dsl_dataset_phys(origin)->ds_uncompressed_bytes; + rrw_enter(&origin->ds_bp_rwlock, RW_READER, FTAG); dsphys->ds_bp = dsl_dataset_phys(origin)->ds_bp; + rrw_exit(&origin->ds_bp_rwlock, FTAG); /* * Inherit flags that describe the dataset's contents @@ -1389,7 +1393,9 @@ dsl_dataset_snapshot_sync_impl(dsl_datas dsphys->ds_uncompressed_bytes = dsl_dataset_phys(ds)->ds_uncompressed_bytes; dsphys->ds_flags = dsl_dataset_phys(ds)->ds_flags; + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); dsphys->ds_bp = dsl_dataset_phys(ds)->ds_bp; + rrw_exit(&ds->ds_bp_rwlock, FTAG); dmu_buf_rele(dbuf, FTAG); for (spa_feature_t f = 0; f < SPA_FEATURES; f++) { @@ -1981,7 +1987,9 @@ dsl_dataset_space(dsl_dataset_t *ds, else *availbytesp = 0; } + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); *usedobjsp = BP_GET_FILL(&dsl_dataset_phys(ds)->ds_bp); + rrw_exit(&ds->ds_bp_rwlock, FTAG); *availobjsp = DN_MAX_OBJECT - *usedobjsp; } @@ -1989,12 +1997,15 @@ boolean_t dsl_dataset_modified_since_snap(dsl_dataset_t *ds, dsl_dataset_t *snap) { dsl_pool_t *dp = ds->ds_dir->dd_pool; + uint64_t birth; ASSERT(dsl_pool_config_held(dp)); if (snap == NULL) return (B_FALSE); - if (dsl_dataset_phys(ds)->ds_bp.blk_birth > - dsl_dataset_phys(snap)->ds_creation_txg) { + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); + birth = dsl_dataset_get_blkptr(ds)->blk_birth; + rrw_exit(&ds->ds_bp_rwlock, FTAG); + if (birth > dsl_dataset_phys(snap)->ds_creation_txg) { objset_t *os, *os_snap; /* * It may be that only the ZIL differs, because it was @@ -3058,11 +3069,15 @@ dsl_dataset_clone_swap_sync_impl(dsl_dat /* swap blkptrs */ { + rrw_enter(&clone->ds_bp_rwlock, RW_WRITER, FTAG); + rrw_enter(&origin_head->ds_bp_rwlock, RW_WRITER, FTAG); blkptr_t tmp; tmp = dsl_dataset_phys(origin_head)->ds_bp; dsl_dataset_phys(origin_head)->ds_bp = dsl_dataset_phys(clone)->ds_bp; dsl_dataset_phys(clone)->ds_bp = tmp; + rrw_exit(&origin_head->ds_bp_rwlock, FTAG); + rrw_exit(&clone->ds_bp_rwlock, FTAG); } /* set dd_*_bytes */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c Wed Sep 28 23:46:08 2016 (r306423) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c Wed Sep 28 23:54:47 2016 (r306424) @@ -246,7 +246,9 @@ dsl_destroy_snapshot_sync_impl(dsl_datas uint64_t obj; ASSERT(RRW_WRITE_HELD(&dp->dp_config_rwlock)); + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); ASSERT3U(dsl_dataset_phys(ds)->ds_bp.blk_birth, <=, tx->tx_txg); + rrw_exit(&ds->ds_bp_rwlock, FTAG); ASSERT(refcount_is_zero(&ds->ds_longholds)); if (defer && @@ -720,7 +722,9 @@ dsl_destroy_head_sync_impl(dsl_dataset_t ASSERT3U(dsl_dataset_phys(ds)->ds_num_children, <=, 1); ASSERT(ds->ds_prev == NULL || dsl_dataset_phys(ds->ds_prev)->ds_next_snap_obj != ds->ds_object); + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); ASSERT3U(dsl_dataset_phys(ds)->ds_bp.blk_birth, <=, tx->tx_txg); + rrw_exit(&ds->ds_bp_rwlock, FTAG); ASSERT(RRW_WRITE_HELD(&dp->dp_config_rwlock)); /* We need to log before removing it from the namespace. */ @@ -812,10 +816,12 @@ dsl_destroy_head_sync_impl(dsl_dataset_t ASSERT(!DS_UNIQUE_IS_ACCURATE(ds) || dsl_dataset_phys(ds)->ds_unique_bytes == used); + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); bptree_add(mos, dp->dp_bptree_obj, &dsl_dataset_phys(ds)->ds_bp, dsl_dataset_phys(ds)->ds_prev_snap_txg, used, comp, uncomp, tx); + rrw_exit(&ds->ds_bp_rwlock, FTAG); dsl_dir_diduse_space(ds->ds_dir, DD_USED_HEAD, -used, -comp, -uncomp, tx); dsl_dir_diduse_space(dp->dp_free_dir, DD_USED_HEAD, Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Wed Sep 28 23:46:08 2016 (r306423) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Wed Sep 28 23:54:47 2016 (r306424) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright (c) 2014 Integros [integros.com] @@ -493,8 +493,10 @@ dsl_pool_create(spa_t *spa, nvlist_t *zp /* create the root objset */ VERIFY0(dsl_dataset_hold_obj(dp, obj, FTAG, &ds)); + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); os = dmu_objset_create_impl(dp->dp_spa, ds, dsl_dataset_get_blkptr(ds), DMU_OST_ZFS, tx); + rrw_exit(&ds->ds_bp_rwlock, FTAG); #ifdef _KERNEL zfs_create_fs(os, kcred, zplprops, tx); #endif @@ -807,7 +809,9 @@ upgrade_clones_cb(dsl_pool_t *dp, dsl_da * The $ORIGIN can't have any data, or the accounting * will be wrong. */ + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); ASSERT0(dsl_dataset_phys(prev)->ds_bp.blk_birth); + rrw_exit(&ds->ds_bp_rwlock, FTAG); /* The origin doesn't get attached to itself */ if (ds->ds_object == prev->ds_object) { Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Sep 28 23:46:08 2016 (r306423) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Sep 28 23:54:47 2016 (r306424) @@ -1113,7 +1113,9 @@ dsl_scan_visitds(dsl_scan_t *scn, uint64 * Iterate over the bps in this ds. */ dmu_buf_will_dirty(ds->ds_dbuf, tx); + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); dsl_scan_visit_rootbp(scn, ds, &dsl_dataset_phys(ds)->ds_bp, tx); + rrw_exit(&ds->ds_bp_rwlock, FTAG); char *dsname = kmem_alloc(ZFS_MAX_DATASET_NAME_LEN, KM_SLEEP); dsl_dataset_name(ds, dsname); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h Wed Sep 28 23:46:08 2016 (r306423) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h Wed Sep 28 23:54:47 2016 (r306424) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright (c) 2014 Integros [integros.com] @@ -101,9 +101,14 @@ struct objset { zfs_redundant_metadata_type_t os_redundant_metadata; int os_recordsize; + /* + * Pointer is constant; the blkptr it points to is protected by + * os_dsl_dataset->ds_bp_rwlock + */ + blkptr_t *os_rootbp; + /* no lock needed: */ struct dmu_tx *os_synctx; /* XXX sketchy */ - blkptr_t *os_rootbp; zil_header_t os_zil_header; list_t os_synced_dnodes; uint64_t os_flags; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Wed Sep 28 23:46:08 2016 (r306423) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Wed Sep 28 23:54:47 2016 (r306424) @@ -39,6 +39,7 @@ #include #include #include +#include #include #ifdef __cplusplus @@ -141,6 +142,7 @@ typedef struct dsl_dataset_phys { typedef struct dsl_dataset { dmu_buf_user_t ds_dbu; + rrwlock_t ds_bp_rwlock; /* Protects ds_phys->ds_bp */ /* Immutable: */ struct dsl_dir *ds_dir; From owner-svn-src-head@freebsd.org Thu Sep 29 00:00:38 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97DBFC01334; Thu, 29 Sep 2016 00:00:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67C0A1B84; Thu, 29 Sep 2016 00:00:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T00b4e004672; Thu, 29 Sep 2016 00:00:37 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T00bYQ004671; Thu, 29 Sep 2016 00:00:37 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201609290000.u8T00bYQ004671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 29 Sep 2016 00:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306425 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 00:00:38 -0000 Author: mav Date: Thu Sep 29 00:00:37 2016 New Revision: 306425 URL: https://svnweb.freebsd.org/changeset/base/306425 Log: MFV r306423: 7402 Create tunable to ignore hole_birth feature Until we can resolve the numerous hole_birth bugs that have cropped up recently, and come up with a way going forwards to protect users from corruption, we should disable the hole_birth feature. Using a tunable allows those who are confident that their data is correct to continue to take advantage of the feature. Closes #188 Reviewed by: Matthew Ahrens Author: Paul Dagnelie Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Wed Sep 28 23:54:47 2016 (r306424) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Thu Sep 29 00:00:37 2016 (r306425) @@ -40,6 +40,11 @@ #include int32_t zfs_pd_bytes_max = 50 * 1024 * 1024; /* 50MB */ +boolean_t send_holes_without_birth_time = B_TRUE; + +SYSCTL_DECL(_vfs_zfs); +SYSCTL_UINT(_vfs_zfs, OID_AUTO, send_holes_without_birth_time, CTLFLAG_RWTUN, + &send_holes_without_birth_time, 0, "Send holes without birth time"); typedef struct prefetch_data { kmutex_t pd_mtx; @@ -254,7 +259,8 @@ traverse_visitbp(traverse_data_t *td, co * * Note that the meta-dnode cannot be reallocated. */ - if ((!td->td_realloc_possible || + if (!send_holes_without_birth_time && + (!td->td_realloc_possible || zb->zb_object == DMU_META_DNODE_OBJECT) && td->td_hole_birth_enabled_txg <= td->td_min_txg) return (0); From owner-svn-src-head@freebsd.org Thu Sep 29 01:41:54 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25D58C003F5; Thu, 29 Sep 2016 01:41:54 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD15AC5F; Thu, 29 Sep 2016 01:41:53 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T1fr1j044809; Thu, 29 Sep 2016 01:41:53 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T1fq0t044788; Thu, 29 Sep 2016 01:41:52 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609290141.u8T1fq0t044788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Thu, 29 Sep 2016 01:41:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306426 - in head/sys: conf dev/hyperv/stordisengage dev/hyperv/storvsc modules/hyperv modules/hyperv/stordisengage X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 01:41:54 -0000 Author: sephe Date: Thu Sep 29 01:41:52 2016 New Revision: 306426 URL: https://svnweb.freebsd.org/changeset/base/306426 Log: hyperv/storvsc: Fix the blkvsc disk attachment issues. - The original 'disengage' ATA controller model does not work properly for all possible disk configurations. Use the newly added ATA disk veto eventhandler to fit into all possible disk configuration. - If the 'invalid LUN' happens on blkvsc controllers, return CAM_DEV_NOT_THERE so that CAM will not destroy attached disks under the blkvsc controllers. Submitted by: Hongjiang Zhang Discussed with: mav MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7693 Deleted: head/sys/dev/hyperv/stordisengage/ head/sys/modules/hyperv/stordisengage/ Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c head/sys/modules/hyperv/Makefile Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Thu Sep 29 00:00:37 2016 (r306425) +++ head/sys/conf/files.amd64 Thu Sep 29 01:41:52 2016 (r306426) @@ -294,7 +294,6 @@ dev/hwpmc/hwpmc_x86.c optional hwpmc dev/hyperv/netvsc/hv_net_vsc.c optional hyperv dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c optional hyperv dev/hyperv/netvsc/hv_rndis_filter.c optional hyperv -dev/hyperv/stordisengage/hv_ata_pci_disengage.c optional hyperv dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c optional hyperv dev/hyperv/utilities/hv_heartbeat.c optional hyperv dev/hyperv/utilities/hv_kvp.c optional hyperv Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Thu Sep 29 00:00:37 2016 (r306425) +++ head/sys/conf/files.i386 Thu Sep 29 01:41:52 2016 (r306426) @@ -251,7 +251,6 @@ dev/hwpmc/hwpmc_x86.c optional hwpmc dev/hyperv/netvsc/hv_net_vsc.c optional hyperv dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c optional hyperv dev/hyperv/netvsc/hv_rndis_filter.c optional hyperv -dev/hyperv/stordisengage/hv_ata_pci_disengage.c optional hyperv dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c optional hyperv dev/hyperv/utilities/hv_heartbeat.c optional hyperv dev/hyperv/utilities/hv_kvp.c optional hyperv Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Thu Sep 29 00:00:37 2016 (r306425) +++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Thu Sep 29 01:41:52 2016 (r306426) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -202,6 +203,7 @@ struct storvsc_softc { struct vmbus_channel *hs_sel_chan[MAXCPU]; }; +static eventhandler_tag storvsc_handler_tag; /* * The size of the vmscsi_request has changed in win8. The * additional size is for the newly added elements in the @@ -898,21 +900,15 @@ hv_storvsc_on_channel_callback(struct vm static int storvsc_probe(device_t dev) { - int ata_disk_enable = 0; int ret = ENXIO; switch (storvsc_get_storage_type(dev)) { case DRIVER_BLKVSC: if(bootverbose) - device_printf(dev, "DRIVER_BLKVSC-Emulated ATA/IDE probe\n"); - if (!getenv_int("hw.ata.disk_enable", &ata_disk_enable)) { - if(bootverbose) - device_printf(dev, - "Enlightened ATA/IDE detected\n"); - device_set_desc(dev, g_drv_props_table[DRIVER_BLKVSC].drv_desc); - ret = BUS_PROBE_DEFAULT; - } else if(bootverbose) - device_printf(dev, "Emulated ATA/IDE set (hw.ata.disk_enable set)\n"); + device_printf(dev, + "Enlightened ATA/IDE detected\n"); + device_set_desc(dev, g_drv_props_table[DRIVER_BLKVSC].drv_desc); + ret = BUS_PROBE_DEFAULT; break; case DRIVER_STORVSC: if(bootverbose) @@ -2155,27 +2151,45 @@ storvsc_io_done(struct hv_storvsc_reques ccb->ccb_h.status &= ~CAM_STATUS_MASK; if (vm_srb->scsi_status == SCSI_STATUS_OK) { const struct scsi_generic *cmd; - + cmd = (const struct scsi_generic *) + ((ccb->ccb_h.flags & CAM_CDB_POINTER) ? + csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes); if (vm_srb->srb_status != SRB_STATUS_SUCCESS) { - if (vm_srb->srb_status == SRB_STATUS_INVALID_LUN) { - xpt_print(ccb->ccb_h.path, "invalid LUN %d\n", - vm_srb->lun); - } else { - xpt_print(ccb->ccb_h.path, "Unknown SRB flag: %d\n", - vm_srb->srb_status); - } /* * If there are errors, for example, invalid LUN, * host will inform VM through SRB status. */ - ccb->ccb_h.status |= CAM_SEL_TIMEOUT; + if (bootverbose) { + if (vm_srb->srb_status == SRB_STATUS_INVALID_LUN) { + xpt_print(ccb->ccb_h.path, + "invalid LUN %d for op: %s\n", + vm_srb->lun, + scsi_op_desc(cmd->opcode, NULL)); + } else { + xpt_print(ccb->ccb_h.path, + "Unknown SRB flag: %d for op: %s\n", + vm_srb->srb_status, + scsi_op_desc(cmd->opcode, NULL)); + } + } + + /* + * XXX For a selection timeout, all of the LUNs + * on the target will be gone. It works for SCSI + * disks, but does not work for IDE disks. + * + * For CAM_DEV_NOT_THERE, CAM will only get + * rid of the device(s) specified by the path. + */ + if (storvsc_get_storage_type(sc->hs_dev) == + DRIVER_STORVSC) + ccb->ccb_h.status |= CAM_SEL_TIMEOUT; + else + ccb->ccb_h.status |= CAM_DEV_NOT_THERE; } else { ccb->ccb_h.status |= CAM_REQ_CMP; } - cmd = (const struct scsi_generic *) - ((ccb->ccb_h.flags & CAM_CDB_POINTER) ? - csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes); if (cmd->opcode == INQUIRY) { struct scsi_inquiry_data *inq_data = (struct scsi_inquiry_data *)csio->data_ptr; @@ -2287,3 +2301,58 @@ storvsc_get_storage_type(device_t dev) return DRIVER_STORVSC; return DRIVER_UNKNOWN; } + +#define PCI_VENDOR_INTEL 0x8086 +#define PCI_PRODUCT_PIIX4 0x7111 + +static void +storvsc_ada_probe_veto(void *arg __unused, struct cam_path *path, + struct ata_params *ident_buf __unused, int *veto) +{ + + /* + * The ATA disks are shared with the controllers managed + * by this driver, so veto the ATA disks' attachment; the + * ATA disks will be attached as SCSI disks once this driver + * attached. + */ + if (path->device->protocol == PROTO_ATA) { + struct ccb_pathinq cpi; + + bzero(&cpi, sizeof(cpi)); + xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE); + cpi.ccb_h.func_code = XPT_PATH_INQ; + xpt_action((union ccb *)&cpi); + if (cpi.ccb_h.status == CAM_REQ_CMP && + cpi.hba_vendor == PCI_VENDOR_INTEL && + cpi.hba_device == PCI_PRODUCT_PIIX4) { + (*veto)++; + if (bootverbose) { + xpt_print(path, + "Disable ATA disks on " + "simulated ATA controller (0x%04x%04x)\n", + cpi.hba_device, cpi.hba_vendor); + } + } + } +} + +static void +storvsc_sysinit(void *arg __unused) +{ + if (vm_guest == VM_GUEST_HV) { + storvsc_handler_tag = EVENTHANDLER_REGISTER(ada_probe_veto, + storvsc_ada_probe_veto, NULL, EVENTHANDLER_PRI_ANY); + } +} +SYSINIT(storvsc_sys_init, SI_SUB_DRIVERS, SI_ORDER_SECOND, storvsc_sysinit, + NULL); + +static void +storvsc_sysuninit(void *arg __unused) +{ + if (storvsc_handler_tag != NULL) + EVENTHANDLER_DEREGISTER(ada_probe_veto, storvsc_handler_tag); +} +SYSUNINIT(storvsc_sys_uninit, SI_SUB_DRIVERS, SI_ORDER_SECOND, + storvsc_sysuninit, NULL); Modified: head/sys/modules/hyperv/Makefile ============================================================================== --- head/sys/modules/hyperv/Makefile Thu Sep 29 00:00:37 2016 (r306425) +++ head/sys/modules/hyperv/Makefile Thu Sep 29 01:41:52 2016 (r306426) @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR = vmbus netvsc stordisengage storvsc utilities +SUBDIR = vmbus netvsc storvsc utilities .include From owner-svn-src-head@freebsd.org Thu Sep 29 02:14:10 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 740D1C00EE0; Thu, 29 Sep 2016 02:14:10 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F5D66C7; Thu, 29 Sep 2016 02:14:10 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T2E9ao056918; Thu, 29 Sep 2016 02:14:09 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T2E9ii056914; Thu, 29 Sep 2016 02:14:09 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609290214.u8T2E9ii056914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Thu, 29 Sep 2016 02:14:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306430 - in head/sys: arm/broadcom/bcm2835 boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 02:14:10 -0000 Author: gonzo Date: Thu Sep 29 02:14:08 2016 New Revision: 306430 URL: https://svnweb.freebsd.org/changeset/base/306430 Log: Add touchscreen support for the official 7" RPi touch display Technically touchscreen chip is FT5406 but all hardware communication is performed by VideCore and only final results are presented to ARM part through memory region shared between VC and ARM. evdev is used as userland interface. FT5406 supports up to 10 touchpoints, but for now driver emulates single touch device because I do not have GUI bits to test this functionality. Driver is not enabled in default config for RPI and RPI2 Tested with: evdev-dump, tslib Added: head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c (contents, props changed) Modified: head/sys/arm/broadcom/bcm2835/files.bcm283x head/sys/boot/fdt/dts/arm/rpi.dts head/sys/boot/fdt/dts/arm/rpi2.dts Added: head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c Thu Sep 29 02:14:08 2016 (r306430) @@ -0,0 +1,337 @@ +/*- + * Copyright (C) 2016 Oleksandr Tymoshenko + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include "mbox_if.h" + +#ifdef DEBUG +#define DPRINTF(fmt, ...) do { \ + printf("%s:%u: ", __func__, __LINE__); \ + printf(fmt, ##__VA_ARGS__); \ +} while (0) +#else +#define DPRINTF(fmt, ...) +#endif + +#define FT5406_LOCK(_sc) \ + mtx_lock(&(_sc)->sc_mtx) +#define FT5406_UNLOCK(_sc) \ + mtx_unlock(&(_sc)->sc_mtx) +#define FT5406_LOCK_INIT(_sc) \ + mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->sc_dev), \ + "ft5406", MTX_DEF) +#define FT5406_LOCK_DESTROY(_sc) \ + mtx_destroy(&_sc->sc_mtx); +#define FT5406_LOCK_ASSERT(_sc) \ + mtx_assert(&(_sc)->sc_mtx, MA_OWNED) + +#define FT5406_DEVICE_MODE 0 +#define FT5406_GESTURE_ID 1 +#define FT5406_NUM_POINTS 2 +#define FT5406_POINT_XH(n) (0 + 3 + (n)*6) +#define FT5406_POINT_XL(n) (1 + 3 + (n)*6) +#define FT5406_POINT_YH(n) (2 + 3 + (n)*6) +#define FT5406_POINT_YL(n) (3 + 3 + (n)*6) +#define FT5406_WINDOW_SIZE 64 + +#define GET_NUM_POINTS(buf) (buf[FT5406_NUM_POINTS]) +#define GET_X(buf, n) (((buf[FT5406_POINT_XH(n)] & 0xf) << 8) | \ + (buf[FT5406_POINT_XL(n)])) +#define GET_Y(buf, n) (((buf[FT5406_POINT_YH(n)] & 0xf) << 8) | \ + (buf[FT5406_POINT_YL(n)])) +#define GET_TOUCH_ID(buf, n) ((buf[FT5406_POINT_YH(n)] >> 4) & 0xf) + +#define NO_POINTS 99 +#define SCREEN_WIDTH 800 +#define SCREEN_HEIGHT 480 + +struct ft5406ts_softc { + device_t sc_dev; + struct mtx sc_mtx; + struct proc *sc_worker; + + /* mbox buffer (mapped to KVA) */ + uint8_t *touch_buf; + + /* initial hook for waiting mbox intr */ + struct intr_config_hook sc_init_hook; + + struct evdev_dev *sc_evdev; + int sc_detaching; +}; + +static void +ft5406ts_worker(void *data) +{ + struct ft5406ts_softc *sc = (struct ft5406ts_softc *)data; + int points; + int id, new_x, new_y, i, new_pen_down, updated; + int x, y, pen_down; + uint8_t window[FT5406_WINDOW_SIZE]; + int tick; + + /* 60Hz */ + tick = hz*17/1000; + if (tick == 0) + tick = 1; + + x = y = -1; + pen_down = 0; + + FT5406_LOCK(sc); + while(1) { + msleep(sc, &sc->sc_mtx, PCATCH | PZERO, "ft5406ts", tick); + + if (sc->sc_detaching) + break; + + memcpy(window, sc->touch_buf, sizeof(window)); + sc->touch_buf[FT5406_NUM_POINTS] = NO_POINTS; + + points = GET_NUM_POINTS(window); + /* + * No update from VC - do nothing + */ + if (points == NO_POINTS) + continue; + + /* No points and pen is already up */ + if ((points == 0) && !pen_down) + continue; + + new_pen_down = 0; + for (i = 0; i < points; i++) { + id = GET_TOUCH_ID(window, 0); + /* For now consider only touch 0 */ + if (id != 0) + continue; + new_pen_down = 1; + new_x = GET_X(window, 0); + new_y = GET_Y(window, 0); + } + + updated = 0; + + if (new_x != x) { + x = new_x; + updated = 1; + } + + if (new_y != y) { + y = new_y; + updated = 1; + } + + if (new_pen_down != pen_down) { + pen_down = new_pen_down; + updated = 1; + } + + if (updated) { + evdev_push_event(sc->sc_evdev, EV_ABS, ABS_X, x); + evdev_push_event(sc->sc_evdev, EV_ABS, ABS_Y, y); + evdev_push_event(sc->sc_evdev, EV_KEY, BTN_TOUCH, pen_down); + evdev_sync(sc->sc_evdev); + } + } + FT5406_UNLOCK(sc); + + kproc_exit(0); +} + +static void +ft5406ts_init(void *arg) +{ + struct ft5406ts_softc *sc = arg; + struct bcm2835_mbox_tag_touchbuf msg; + uint32_t touchbuf; + int err; + + /* release this hook (continue boot) */ + config_intrhook_disestablish(&sc->sc_init_hook); + + memset(&msg, 0, sizeof(msg)); + msg.hdr.buf_size = sizeof(msg); + msg.hdr.code = BCM2835_MBOX_CODE_REQ; + msg.tag_hdr.tag = BCM2835_MBOX_TAG_GET_TOUCHBUF; + msg.tag_hdr.val_buf_size = sizeof(msg.body); + msg.tag_hdr.val_len = sizeof(msg.body); + msg.end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_property(&msg, sizeof(msg)); + if (err) { + device_printf(sc->sc_dev, "failed to get touchbuf address\n"); + return; + } + + if (msg.body.resp.address == 0) { + device_printf(sc->sc_dev, "touchscreen not detected\n"); + return; + } + + touchbuf = VCBUS_TO_PHYS(msg.body.resp.address); + sc->touch_buf = (uint8_t*)pmap_mapdev(touchbuf, FT5406_WINDOW_SIZE); + + sc->sc_evdev = evdev_alloc(); + evdev_set_name(sc->sc_evdev, device_get_desc(sc->sc_dev)); + evdev_set_phys(sc->sc_evdev, device_get_nameunit(sc->sc_dev)); + evdev_set_id(sc->sc_evdev, BUS_VIRTUAL, 0, 0, 0); + evdev_support_prop(sc->sc_evdev, INPUT_PROP_DIRECT); + evdev_support_event(sc->sc_evdev, EV_SYN); + evdev_support_event(sc->sc_evdev, EV_ABS); + evdev_support_event(sc->sc_evdev, EV_KEY); + + evdev_support_abs(sc->sc_evdev, ABS_X, 0, 0, + SCREEN_WIDTH, 0, 0, 0); + evdev_support_abs(sc->sc_evdev, ABS_Y, 0, 0, + SCREEN_HEIGHT, 0, 0, 0); + + evdev_support_key(sc->sc_evdev, BTN_TOUCH); + + err = evdev_register(sc->sc_evdev); + if (err) { + evdev_free(sc->sc_evdev); + return; + } + + sc->touch_buf[FT5406_NUM_POINTS] = NO_POINTS; + if (kproc_create(ft5406ts_worker, (void*)sc, &sc->sc_worker, 0, 0, + "ft5406ts_worker") != 0) { + printf("failed to create ft5406ts_worker\n"); + } +} + +static int +ft5406ts_probe(device_t dev) +{ + + if (!ofw_bus_is_compatible(dev, "rpi,rpi-ft5406")) + return (ENXIO); + + device_set_desc(dev, "FT5406 touchscreen (VC memory interface)"); + + return (BUS_PROBE_DEFAULT); +} + +static int +ft5406ts_attach(device_t dev) +{ + struct ft5406ts_softc *sc; + + /* set self dev */ + sc = device_get_softc(dev); + sc->sc_dev = dev; + + /* register callback for using mbox when interrupts are enabled */ + sc->sc_init_hook.ich_func = ft5406ts_init; + sc->sc_init_hook.ich_arg = sc; + + if (config_intrhook_establish(&sc->sc_init_hook) != 0) { + device_printf(dev, "config_intrhook_establish failed\n"); + return (ENOMEM); + } + + FT5406_LOCK_INIT(sc); + + return (0); +} + +static int +ft5406ts_detach(device_t dev) +{ + struct ft5406ts_softc *sc; + + sc = device_get_softc(dev); + + FT5406_LOCK(sc); + if (sc->sc_worker) + sc->sc_detaching = 1; + + if (sc->sc_evdev) + evdev_free(sc->sc_evdev); + FT5406_UNLOCK(sc); + + FT5406_LOCK_DESTROY(sc); + + return (0); +} + +static device_method_t ft5406ts_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, ft5406ts_probe), + DEVMETHOD(device_attach, ft5406ts_attach), + DEVMETHOD(device_detach, ft5406ts_detach), + + DEVMETHOD_END +}; + +static devclass_t ft5406ts_devclass; +static driver_t ft5406ts_driver = { + "ft5406ts", + ft5406ts_methods, + sizeof(struct ft5406ts_softc), +}; + +DRIVER_MODULE(ft5406ts, ofwbus, ft5406ts_driver, ft5406ts_devclass, 0, 0); Modified: head/sys/arm/broadcom/bcm2835/files.bcm283x ============================================================================== --- head/sys/arm/broadcom/bcm2835/files.bcm283x Thu Sep 29 01:56:31 2016 (r306429) +++ head/sys/arm/broadcom/bcm2835/files.bcm283x Thu Sep 29 02:14:08 2016 (r306430) @@ -6,6 +6,7 @@ arm/broadcom/bcm2835/bcm2835_cpufreq.c arm/broadcom/bcm2835/bcm2835_dma.c standard arm/broadcom/bcm2835/bcm2835_fb.c optional sc arm/broadcom/bcm2835/bcm2835_fbd.c optional vt +arm/broadcom/bcm2835/bcm2835_ft5406.c optional evdev bcm2835_ft5406 arm/broadcom/bcm2835/bcm2835_gpio.c optional gpio arm/broadcom/bcm2835/bcm2835_intr.c standard arm/broadcom/bcm2835/bcm2835_machdep.c standard Modified: head/sys/boot/fdt/dts/arm/rpi.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/rpi.dts Thu Sep 29 01:56:31 2016 (r306429) +++ head/sys/boot/fdt/dts/arm/rpi.dts Thu Sep 29 02:14:08 2016 (r306430) @@ -322,6 +322,11 @@ broadcom,depth = <0>; /* Set by VideoCore */ }; + rpi_ft5406 { + compatible = "rpi,rpi-ft5406"; + status = "okay"; + }; + leds { compatible = "gpio-leds"; Modified: head/sys/boot/fdt/dts/arm/rpi2.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/rpi2.dts Thu Sep 29 01:56:31 2016 (r306429) +++ head/sys/boot/fdt/dts/arm/rpi2.dts Thu Sep 29 02:14:08 2016 (r306430) @@ -337,6 +337,11 @@ broadcom,depth = <0>; /* Set by VideoCore */ }; + rpi_ft5406 { + compatible = "rpi,rpi-ft5406"; + status = "okay"; + }; + leds { compatible = "gpio-leds"; From owner-svn-src-head@freebsd.org Thu Sep 29 04:53:22 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 548BFC00B60; Thu, 29 Sep 2016 04:53:22 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BCB5D6; Thu, 29 Sep 2016 04:53:21 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T4rLlX017302; Thu, 29 Sep 2016 04:53:21 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T4rLLg017301; Thu, 29 Sep 2016 04:53:21 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609290453.u8T4rLLg017301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Thu, 29 Sep 2016 04:53:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306431 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 04:53:22 -0000 Author: sephe Date: Thu Sep 29 04:53:21 2016 New Revision: 306431 URL: https://svnweb.freebsd.org/changeset/base/306431 Log: hyperv/hn: Move TX tasks' draining into hn_suspend(). This prepares to consolidate hn_stop() and netvsc_detach(). MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8055 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Sep 29 02:14:08 2016 (r306430) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Sep 29 04:53:21 2016 (r306431) @@ -334,7 +334,6 @@ static void hn_fixup_tx_data(struct hn_s static void hn_destroy_tx_data(struct hn_softc *); static void hn_start_taskfunc(void *, int); static void hn_start_txeof_taskfunc(void *, int); -static void hn_stop_tx_tasks(struct hn_softc *); static int hn_encap(struct hn_tx_ring *, struct hn_txdesc *, struct mbuf **); static int hn_create_rx_data(struct hn_softc *sc, int); static void hn_destroy_rx_data(struct hn_softc *sc); @@ -757,8 +756,6 @@ netvsc_detach(device_t dev) hn_synth_detach(sc); HN_UNLOCK(sc); - hn_stop_tx_tasks(sc); - ifmedia_removeall(&sc->hn_media); hn_destroy_rx_data(sc); hn_destroy_tx_data(sc); @@ -2971,19 +2968,6 @@ hn_start_txeof_taskfunc(void *xtxr, int mtx_unlock(&txr->hn_tx_lock); } -static void -hn_stop_tx_tasks(struct hn_softc *sc) -{ - int i; - - for (i = 0; i < sc->hn_tx_ring_inuse; ++i) { - struct hn_tx_ring *txr = &sc->hn_tx_ring[i]; - - taskqueue_drain(txr->hn_tx_taskq, &txr->hn_tx_task); - taskqueue_drain(txr->hn_tx_taskq, &txr->hn_txeof_task); - } -} - static int hn_xmit(struct hn_tx_ring *txr, int len) { @@ -3571,6 +3555,9 @@ hn_suspend(struct hn_softc *sc) /* Wait for all pending sends to finish. */ while (hn_tx_ring_pending(txr)) pause("hnwtx", 1 /* 1 tick */); + + taskqueue_drain(txr->hn_tx_taskq, &txr->hn_tx_task); + taskqueue_drain(txr->hn_tx_taskq, &txr->hn_txeof_task); } /* From owner-svn-src-head@freebsd.org Thu Sep 29 05:01:21 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DEA39C00C2E; Thu, 29 Sep 2016 05:01:21 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B31F9358; Thu, 29 Sep 2016 05:01:21 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T51Kv8018338; Thu, 29 Sep 2016 05:01:20 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T51KJF018337; Thu, 29 Sep 2016 05:01:20 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609290501.u8T51KJF018337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Thu, 29 Sep 2016 05:01:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306432 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 05:01:22 -0000 Author: sephe Date: Thu Sep 29 05:01:20 2016 New Revision: 306432 URL: https://svnweb.freebsd.org/changeset/base/306432 Log: hyperv/hn: Consolidate hn_init() and hn_stop() MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8056 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Sep 29 04:53:21 2016 (r306431) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Sep 29 05:01:20 2016 (r306432) @@ -349,6 +349,8 @@ static void hn_synth_detach(struct hn_so static bool hn_tx_ring_pending(struct hn_tx_ring *); static void hn_suspend(struct hn_softc *); static void hn_resume(struct hn_softc *); +static void hn_rx_drain(struct vmbus_channel *); +static void hn_tx_resume(struct hn_softc *, int); static void hn_tx_ring_qflush(struct hn_tx_ring *); static void hn_nvs_handle_notify(struct hn_softc *sc, @@ -1773,25 +1775,19 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, static void hn_stop(struct hn_softc *sc) { - struct ifnet *ifp; + struct ifnet *ifp = sc->hn_ifp; int i; HN_LOCK_ASSERT(sc); - ifp = sc->hn_ifp; - - if (bootverbose) - printf(" Closing Device ...\n"); + /* Clear RUNNING bit _before_ hn_suspend() */ + atomic_clear_int(&ifp->if_drv_flags, IFF_DRV_RUNNING); + hn_suspend(sc); - atomic_clear_int(&ifp->if_drv_flags, - (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)); + /* Clear OACTIVE bit. */ + atomic_clear_int(&ifp->if_drv_flags, IFF_DRV_OACTIVE); for (i = 0; i < sc->hn_tx_ring_inuse; ++i) sc->hn_tx_ring[i].hn_oactive = 0; - - if_link_state_change(ifp, LINK_STATE_DOWN); - - /* Disable RX by clearing RX filter. */ - hn_rndis_set_rxfilter(sc, 0); } /* @@ -1855,27 +1851,29 @@ do_sched: static void hn_init_locked(struct hn_softc *sc) { - struct ifnet *ifp; - int ret, i; + struct ifnet *ifp = sc->hn_ifp; + int i; HN_LOCK_ASSERT(sc); - ifp = sc->hn_ifp; - - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) return; - } /* TODO: add hn_rx_filter */ - ret = hn_rndis_set_rxfilter(sc, NDIS_PACKET_TYPE_PROMISCUOUS); - if (ret != 0) - return; + hn_rndis_set_rxfilter(sc, NDIS_PACKET_TYPE_PROMISCUOUS); + /* Clear OACTIVE bit. */ atomic_clear_int(&ifp->if_drv_flags, IFF_DRV_OACTIVE); for (i = 0; i < sc->hn_tx_ring_inuse; ++i) sc->hn_tx_ring[i].hn_oactive = 0; + /* Clear TX 'suspended' bit. */ + hn_tx_resume(sc, sc->hn_tx_ring_inuse); + + /* Everything is ready; unleash! */ atomic_set_int(&ifp->if_drv_flags, IFF_DRV_RUNNING); + + /* TODO: check RNDIS link status. */ if_link_state_change(ifp, LINK_STATE_UP); } @@ -3588,9 +3586,25 @@ hn_suspend(struct hn_softc *sc) } static void +hn_tx_resume(struct hn_softc *sc, int tx_ring_cnt) +{ + int i; + + KASSERT(tx_ring_cnt <= sc->hn_tx_ring_cnt, + ("invalid TX ring count %d", tx_ring_cnt)); + + for (i = 0; i < tx_ring_cnt; ++i) { + struct hn_tx_ring *txr = &sc->hn_tx_ring[i]; + + mtx_lock(&txr->hn_tx_lock); + txr->hn_suspended = 0; + mtx_unlock(&txr->hn_tx_lock); + } +} + +static void hn_resume(struct hn_softc *sc) { - struct hn_tx_ring *txr; int i; HN_LOCK_ASSERT(sc); @@ -3605,13 +3619,7 @@ hn_resume(struct hn_softc *sc) * Make sure to clear suspend status on "all" TX rings, * since hn_tx_ring_inuse can be changed after hn_suspend(). */ - for (i = 0; i < sc->hn_tx_ring_cnt; ++i) { - txr = &sc->hn_tx_ring[i]; - - mtx_lock(&txr->hn_tx_lock); - txr->hn_suspended = 0; - mtx_unlock(&txr->hn_tx_lock); - } + hn_tx_resume(sc, sc->hn_tx_ring_cnt); if (!hn_use_if_start) { /* @@ -3626,7 +3634,8 @@ hn_resume(struct hn_softc *sc) * Kick start TX. */ for (i = 0; i < sc->hn_tx_ring_inuse; ++i) { - txr = &sc->hn_tx_ring[i]; + struct hn_tx_ring *txr = &sc->hn_tx_ring[i]; + /* * Use txeof task, so that any pending oactive can be * cleared properly. From owner-svn-src-head@freebsd.org Thu Sep 29 05:13:59 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A184CC0131D; Thu, 29 Sep 2016 05:13:59 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6193AF51; Thu, 29 Sep 2016 05:13:59 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T5DwKB025088; Thu, 29 Sep 2016 05:13:58 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T5DwLr025086; Thu, 29 Sep 2016 05:13:58 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609290513.u8T5DwLr025086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Thu, 29 Sep 2016 05:13:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306433 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 05:13:59 -0000 Author: sephe Date: Thu Sep 29 05:13:58 2016 New Revision: 306433 URL: https://svnweb.freebsd.org/changeset/base/306433 Log: hyperv/hn: Don't set HASHVAL pktinfo for NDIS < 6.30 This unbreaks packet sending on WS2008R2. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8057 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Thu Sep 29 05:01:20 2016 (r306432) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Thu Sep 29 05:13:58 2016 (r306433) @@ -168,6 +168,7 @@ struct hn_tx_ring { struct buf_ring *hn_mbuf_br; int hn_oactive; int hn_tx_idx; + int hn_tx_flags; struct mtx hn_tx_lock; struct hn_softc *hn_sc; @@ -194,10 +195,10 @@ struct hn_tx_ring { struct hn_txdesc *hn_txdesc; bus_dma_tag_t hn_tx_rndis_dtag; struct sysctl_oid *hn_tx_sysctl_tree; - int hn_tx_flags; } __aligned(CACHE_LINE_SIZE); #define HN_TX_FLAG_ATTACHED 0x1 +#define HN_TX_FLAG_HASHVAL 0x2 /* support HASHVAL pktinfo */ /* * Device-specific softc structure Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Sep 29 05:01:20 2016 (r306432) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Sep 29 05:13:58 2016 (r306433) @@ -1006,14 +1006,16 @@ hn_encap(struct hn_tx_ring *txr, struct pkt->rm_pktinfooffset = sizeof(*pkt); pkt->rm_pktinfolen = 0; - /* - * Set the hash value for this packet, so that the host could - * dispatch the TX done event for this packet back to this TX - * ring's channel. - */ - pi_data = hn_rndis_pktinfo_append(pkt, HN_RNDIS_PKT_LEN, - HN_NDIS_HASH_VALUE_SIZE, HN_NDIS_PKTINFO_TYPE_HASHVAL); - *pi_data = txr->hn_tx_idx; + if (txr->hn_tx_flags & HN_TX_FLAG_HASHVAL) { + /* + * Set the hash value for this packet, so that the host could + * dispatch the TX done event for this packet back to this TX + * ring's channel. + */ + pi_data = hn_rndis_pktinfo_append(pkt, HN_RNDIS_PKT_LEN, + HN_NDIS_HASH_VALUE_SIZE, HN_NDIS_PKTINFO_TYPE_HASHVAL); + *pi_data = txr->hn_tx_idx; + } if (m_head->m_flags & M_VLANTAG) { pi_data = hn_rndis_pktinfo_append(pkt, HN_RNDIS_PKT_LEN, @@ -2920,6 +2922,12 @@ hn_fixup_tx_data(struct hn_softc *sc) for (i = 0; i < sc->hn_tx_ring_cnt; ++i) sc->hn_tx_ring[i].hn_csum_assist = csum_assist; + + if (sc->hn_ndis_ver >= HN_NDIS_VERSION_6_30) { + /* Support HASHVAL pktinfo on TX path. */ + for (i = 0; i < sc->hn_tx_ring_cnt; ++i) + sc->hn_tx_ring[i].hn_tx_flags |= HN_TX_FLAG_HASHVAL; + } } static void From owner-svn-src-head@freebsd.org Thu Sep 29 05:37:46 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F935C019F5; Thu, 29 Sep 2016 05:37:46 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 623BC1C8F; Thu, 29 Sep 2016 05:37:46 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T5bjqR032928; Thu, 29 Sep 2016 05:37:45 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T5bjYW032926; Thu, 29 Sep 2016 05:37:45 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201609290537.u8T5bjYW032926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Thu, 29 Sep 2016 05:37:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306434 - in head/sys: contrib/ipfilter/netinet net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 05:37:46 -0000 Author: kevlo Date: Thu Sep 29 05:37:45 2016 New Revision: 306434 URL: https://svnweb.freebsd.org/changeset/base/306434 Log: Remove the compatibility macro if_addrlist. Since if_addrlist is used only for ipfilter(4), add a macro if_addrlist in ip_compat.h. Reviewed by: cy Differential Revision: https://reviews.freebsd.org/D8059 Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h head/sys/net/if_var.h Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Sep 29 05:13:58 2016 (r306433) +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Sep 29 05:37:45 2016 (r306434) @@ -175,6 +175,7 @@ struct ether_addr { } while (0) # include # define GETKTIME(x) microtime((struct timeval *)x) +# define if_addrlist if_addrhead # include # include Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Thu Sep 29 05:13:58 2016 (r306433) +++ head/sys/net/if_var.h Thu Sep 29 05:37:45 2016 (r306434) @@ -313,7 +313,6 @@ struct ifnet { }; /* for compatibility with other BSDs */ -#define if_addrlist if_addrhead #define if_list if_link #define if_name(ifp) ((ifp)->if_xname) From owner-svn-src-head@freebsd.org Thu Sep 29 06:19:46 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6826C00369; Thu, 29 Sep 2016 06:19:46 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7015325D; Thu, 29 Sep 2016 06:19:46 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T6Jj9K047904; Thu, 29 Sep 2016 06:19:45 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T6Jjfo047903; Thu, 29 Sep 2016 06:19:45 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201609290619.u8T6Jjfo047903@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 29 Sep 2016 06:19:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306435 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 06:19:46 -0000 Author: eadler Date: Thu Sep 29 06:19:45 2016 New Revision: 306435 URL: https://svnweb.freebsd.org/changeset/base/306435 Log: callsign isn't required anymore Modified: head/.arcconfig Modified: head/.arcconfig ============================================================================== --- head/.arcconfig Thu Sep 29 05:37:45 2016 (r306434) +++ head/.arcconfig Thu Sep 29 06:19:45 2016 (r306435) @@ -1,5 +1,4 @@ { - "repository.callsign" : "S", "phabricator.uri" : "https://reviews.freebsd.org/", "history.immutable" : true } From owner-svn-src-head@freebsd.org Thu Sep 29 06:50:01 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38F07C00B7D; Thu, 29 Sep 2016 06:50:01 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16F95288; Thu, 29 Sep 2016 06:50:01 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T6o0ge058992; Thu, 29 Sep 2016 06:50:00 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T6o0fE058988; Thu, 29 Sep 2016 06:50:00 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201609290650.u8T6o0fE058988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 29 Sep 2016 06:50:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306436 - in head/sys/arm: broadcom/bcm2835 conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 06:50:01 -0000 Author: manu Date: Thu Sep 29 06:49:59 2016 New Revision: 306436 URL: https://svnweb.freebsd.org/changeset/base/306436 Log: RPI-B: Add support for MULTIDELAY 100 cycles per us seems accurate enough, at least it's better than the 200 value that was used before. Reviewed by: andrew, imp Differential Revision: https://reviews.freebsd.org/D8062 Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c head/sys/arm/broadcom/bcm2835/bcm2835_systimer.c head/sys/arm/conf/RPI-B Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Thu Sep 29 06:19:45 2016 (r306435) +++ head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Thu Sep 29 06:49:59 2016 (r306436) @@ -129,7 +129,7 @@ static platform_method_t bcm2835_methods PLATFORMMETHOD_END, }; -FDT_PLATFORM_DEF(bcm2835, "bcm2835", 0, "raspberrypi,model-b", 0); +FDT_PLATFORM_DEF(bcm2835, "bcm2835", 0, "raspberrypi,model-b", 100); #endif #ifdef SOC_BCM2836 Modified: head/sys/arm/broadcom/bcm2835/bcm2835_systimer.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_systimer.c Thu Sep 29 06:19:45 2016 (r306435) +++ head/sys/arm/broadcom/bcm2835/bcm2835_systimer.c Thu Sep 29 06:49:59 2016 (r306436) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -101,6 +102,8 @@ static struct bcm_systimer_softc *bcm_sy static unsigned bcm_systimer_tc_get_timecount(struct timecounter *); +static delay_func bcm_systimer_delay; + static struct timecounter bcm_systimer_tc = { .tc_name = DEFAULT_TIMER_NAME, .tc_get_timecount = bcm_systimer_tc_get_timecount, @@ -113,6 +116,9 @@ static struct timecounter bcm_systimer_t static unsigned bcm_systimer_tc_get_timecount(struct timecounter *tc) { + if (bcm_systimer_sc == NULL) + return (0); + return bcm_systimer_tc_read_4(SYSTIMER_CLO); } @@ -147,7 +153,7 @@ restart: intr_restore(s); return (0); - } + } return (EINVAL); } @@ -167,7 +173,7 @@ bcm_systimer_intr(void *arg) struct systimer *st = (struct systimer *)arg; uint32_t cs; - cs = bcm_systimer_tc_read_4(SYSTIMER_CS); + cs = bcm_systimer_tc_read_4(SYSTIMER_CS); if ((cs & (1 << st->index)) == 0) return (FILTER_STRAY); @@ -254,6 +260,9 @@ bcm_systimer_attach(device_t dev) bcm_systimer_sc = sc; + if (device_get_unit(dev) == 0) + arm_set_delay(bcm_systimer_delay, sc); + bcm_systimer_tc.tc_frequency = DEFAULT_FREQUENCY; tc_init(&bcm_systimer_tc); @@ -276,19 +285,14 @@ static devclass_t bcm_systimer_devclass; DRIVER_MODULE(bcm_systimer, simplebus, bcm_systimer_driver, bcm_systimer_devclass, 0, 0); -void -DELAY(int usec) +static void +bcm_systimer_delay(int usec, void *arg) { + struct bcm_systimer_softc *sc; int32_t counts; uint32_t first, last; - if (bcm_systimer_sc == NULL) { - for (; usec > 0; usec--) - for (counts = 200; counts > 0; counts--) - /* Prevent gcc from optimizing out the loop */ - cpufunc_nullop(); - return; - } + sc = (struct bcm_systimer_softc *) arg; /* Get the number of times to count */ counts = usec * (bcm_systimer_tc.tc_frequency / 1000000) + 1; Modified: head/sys/arm/conf/RPI-B ============================================================================== --- head/sys/arm/conf/RPI-B Thu Sep 29 06:19:45 2016 (r306435) +++ head/sys/arm/conf/RPI-B Thu Sep 29 06:49:59 2016 (r306436) @@ -28,6 +28,7 @@ options INTRNG options SCHED_4BSD # 4BSD scheduler options PLATFORM +options MULTIDELAY # NFS root from boopt/dhcp #options BOOTP From owner-svn-src-head@freebsd.org Thu Sep 29 06:54:03 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9C54C00D94; Thu, 29 Sep 2016 06:54:03 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC2C4927; Thu, 29 Sep 2016 06:54:03 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T6s2Ii062643; Thu, 29 Sep 2016 06:54:02 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T6s20u062639; Thu, 29 Sep 2016 06:54:02 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201609290654.u8T6s20u062639@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 29 Sep 2016 06:54:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306437 - in head/sys/arm: broadcom/bcm2835 conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 06:54:04 -0000 Author: manu Date: Thu Sep 29 06:54:02 2016 New Revision: 306437 URL: https://svnweb.freebsd.org/changeset/base/306437 Log: RPI2: Add support for PLATFORM_SMP so we can later add it to GENERIC. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D8063 Added: head/sys/arm/broadcom/bcm2835/bcm2836_mp.h (contents, props changed) Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c head/sys/arm/broadcom/bcm2835/bcm2836_mp.c head/sys/arm/conf/RPI2 Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Thu Sep 29 06:49:59 2016 (r306436) +++ head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Thu Sep 29 06:54:02 2016 (r306437) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "platform_if.h" @@ -139,6 +140,11 @@ static platform_method_t bcm2836_methods PLATFORMMETHOD(platform_late_init, bcm2835_late_init), PLATFORMMETHOD(platform_cpu_reset, bcm2835_cpu_reset), +#ifdef SMP + PLATFORMMETHOD(platform_mp_start_ap, bcm2836_mp_start_ap), + PLATFORMMETHOD(platform_mp_setmaxid, bcm2836_mp_setmaxid), +#endif + PLATFORMMETHOD_END, }; FDT_PLATFORM_DEF(bcm2836, "bcm2836", 0, "brcm,bcm2709", 0); Modified: head/sys/arm/broadcom/bcm2835/bcm2836_mp.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2836_mp.c Thu Sep 29 06:49:59 2016 (r306436) +++ head/sys/arm/broadcom/bcm2835/bcm2836_mp.c Thu Sep 29 06:54:02 2016 (r306437) @@ -45,6 +45,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include + +#include #ifdef DEBUG #define DPRINTF(fmt, ...) do { \ @@ -77,7 +80,7 @@ static bus_space_handle_t bs_periph; bus_space_write_4(fdtbus_bs_tag, bs_periph, (addr), (val)) void -platform_mp_setmaxid(void) +bcm2836_mp_setmaxid(platform_t plat) { DPRINTF("platform_mp_setmaxid\n"); @@ -90,7 +93,7 @@ platform_mp_setmaxid(void) } void -platform_mp_start_ap(void) +bcm2836_mp_start_ap(platform_t plat) { uint32_t val; int i, retry; Added: head/sys/arm/broadcom/bcm2835/bcm2836_mp.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/broadcom/bcm2835/bcm2836_mp.h Thu Sep 29 06:54:02 2016 (r306437) @@ -0,0 +1,38 @@ +/*- + * Copyright (C) 2016 Emmanuel Vadot + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * + * 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 _BCM2836_MP_H_ +#define _BCM2836_MP_H_ + +void bcm2836_mp_setmaxid(platform_t plat); +void bcm2836_mp_start_ap(platform_t plat); + +#endif /* _BCM2836_MP_H_ */ Modified: head/sys/arm/conf/RPI2 ============================================================================== --- head/sys/arm/conf/RPI2 Thu Sep 29 06:49:59 2016 (r306436) +++ head/sys/arm/conf/RPI2 Thu Sep 29 06:54:02 2016 (r306437) @@ -29,6 +29,7 @@ options INTRNG options SCHED_ULE # ULE scheduler options SMP # Enable multiple cores options PLATFORM +options PLATFORM_SMP # NFS root from boopt/dhcp #options BOOTP From owner-svn-src-head@freebsd.org Thu Sep 29 08:28:57 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6926C02804 for ; Thu, 29 Sep 2016 08:28:57 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-yw0-x22a.google.com (mail-yw0-x22a.google.com [IPv6:2607:f8b0:4002:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7F2C29A4 for ; Thu, 29 Sep 2016 08:28:57 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-yw0-x22a.google.com with SMTP id i129so43498817ywe.2 for ; Thu, 29 Sep 2016 01:28:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=kDwLH2JN5v3xkbDK3SOxBV8FliBKF7Dl4A099UpyJ+M=; b=b4kGpVhT1RkNnExJtAaAPXzZsWUUd/cNYkVDtM5ZM0W3A2SN1URIb2JmDo4UchcERN SDPC+oGDjTcahFXRPM7Yg0EbVpQcIalvMER7j9QiO0dqQnS7/45ZVfRz/cTpYfqxdgax D46LEEpzTApkG0LfNFn05EEo82Dn7C2ACnoQWQoRo/oCkKfkw14X4DDCasRqHfK+lS94 gHO4zpKsdv0nEMKY/WMRcIkccLf7rsgCw/oYzhob+5Q3xrggK3iL+aJxAaThOMg+LqvF ZMmmvARuRPZKzmCNIsA23w9/qbMSrCcIaGbWjcf+nrx0dNJTIOcp8pE9ayfMqVfQtZAp MzIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=kDwLH2JN5v3xkbDK3SOxBV8FliBKF7Dl4A099UpyJ+M=; b=AYkk9/mbncUzycodvaBPF+SRUneHI8wqwGSJ/U+Ikyhg1ZqrRDrr9E7S5fj/GZRDYv E8tpWc59csnKUPML4yMUKOGmRxnS1GUYM1/mcvg2TnQzrq24xcArDiQ8HEXXVsHeWr9+ aIsFJYRRskJ9X4v1/IAmFxmOhlozvfYfqFz5cYSV9IPimM9R2HCipiEDjhHi3lk7WcZX vBE6ceVvY1Zl8jWT7d9za6PXxwxtui1jc/CxdxdZEbqdOwyt2VjrWZX2hftPPz6v3+rB yolG7R/eSU+2qt9TkvMR2E07OQ7TC1dA36Nh/gDFM65M5/MOZGLFO7uGlV8tqzFNoHAq 3Brw== X-Gm-Message-State: AA6/9RnqJRst+I9116mJzNQ30VQHmJ+d/ZcN1YQd3/28U92vfWwvVTkcTOXs2gvjcT4CSEZL X-Received: by 10.13.210.134 with SMTP id u128mr96166ywd.213.1475137736649; Thu, 29 Sep 2016 01:28:56 -0700 (PDT) Received: from mutt-hardenedbsd (pool-100-16-217-83.bltmmd.fios.verizon.net. [100.16.217.83]) by smtp.gmail.com with ESMTPSA id i5sm5124681ywg.54.2016.09.29.01.28.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Sep 2016 01:28:55 -0700 (PDT) Date: Thu, 29 Sep 2016 04:28:53 -0400 From: Shawn Webb To: Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306417 - head/usr.sbin/portsnap/portsnap Message-ID: <20160929082853.GA45358@mutt-hardenedbsd> References: <201609282122.u8SLMprw047702@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline In-Reply-To: <201609282122.u8SLMprw047702@repo.freebsd.org> X-Operating-System: FreeBSD mutt-hardenedbsd 12.0-CURRENT-HBSD FreeBSD 12.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 08:28:57 -0000 --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 28, 2016 at 09:22:51PM +0000, Ed Maste wrote: > Author: emaste > Date: Wed Sep 28 21:22:51 2016 > New Revision: 306417 > URL: https://svnweb.freebsd.org/changeset/base/306417 >=20 > Log: > portsnap: only move expected snapshot contents from snap/ to files/ > =20 > Previously it was possible to smuggle in addional files that would > be used by later portsnap runs. Now we only move those files expected > to be in the snapshot into files/ and require that there are no > unexpected files. > =20 > This was used by portsnap attacks 2, 3, and 4 in the "non-cryptanalytic > attacks against FreeBSD update components" anonymous gist. > =20 > Reported by: anonymous gist > Reviewed by: allanjude, delphij > MFC after: ASAP > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D8052 Hey Ed, Any plans to release a security announcement? Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --8t9RHnE3ZwKMSgU+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX7NDCAAoJEGqEZY9SRW7u1DkQAI98F0TAngluIreMRL8V/r5k TdstrIvPVRs8zDa+8QTaHFS/TRrnFvaqhPNKV1vr4yyAcbZax+dDJzrDehLiA5nd j3HnS4vjHcUeAIHwMKfPb12IroJA2jvEWDLfBgXONm80dn8WFzt4tTnvLtTiAncH ZXdlNkzo5PO9VAcLDVKdCE0ijOxm5fkPuVjq22NFwqjn7ojtNzuzuIsthANmkug9 GAqaFUBV3RE2u1WdRjU+T2ywY/vgTMU6xdf0eGnTApFtXcjwZVT+k8jwBHmGKGfk XFIwEWH2yBR5mzQSsdBtwFUQjiZ/cQhIWABOclVUvrDUUu6hMpjmdhS8wcGXlc5C yPbd/Q6aViNE5rt0fCY6Lyi9LdeWnESQPeXq89WPuc/PuNdmTGg63jI0htJqHzZ9 dI6/mOdMrDewx0/YmnkrE+ruxCenEcr+ofHDuYRZahYr7N803k5/nsnLIr1B7hVn Mz91A4mQmcSzGqTYjKANROISkjXXWCABDtHeTNox2T71XfqoF7yJcyGvWOO1sUCH 9Goj/g+kjTTxjBNIUagbh9zKddk5OqE5CDwqS/EjpD5OBsDWRvl/mesCx9C2FwqZ bpetdzpPpuLAIiSnfuWq6OhCbH31ffjZfcF/De/LCmYYR3cF7+vBysDAZDrs3Kv8 RMbmmUDUD9JhPl5YWyH8 =nU1M -----END PGP SIGNATURE----- --8t9RHnE3ZwKMSgU+-- From owner-svn-src-head@freebsd.org Thu Sep 29 08:32:36 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B83B1C02990 for ; Thu, 29 Sep 2016 08:32:36 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-yw0-x22c.google.com (mail-yw0-x22c.google.com [IPv6:2607:f8b0:4002:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 707CFE88 for ; Thu, 29 Sep 2016 08:32:36 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-yw0-x22c.google.com with SMTP id i129so44396693ywb.0 for ; Thu, 29 Sep 2016 01:32:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=K2Wl3fYebj36dUrdyUcJntkdi+W153U9RjVDgIYqc7M=; b=yot3lDVIxXh61SZPEILcjhpxfmdGXtVMzoTuiD1Cwn4nSCufCkbu20onsde8Sw8lvB HX0MwjPN+gMciCyTVJKTuljptww1QAHcayFesJSsqyXLfU9rHE7FrR0pad4533aa2YxC k61cm3OlSi+ezhxDVm22k1ctm/Hl1+X0SSskwRdoi3mT6KQnN0MehuxiLKhQEnXTtzdA DShbDY+HJa/U3LJNo9vWZyFuR6ar2qahmCwD/mgAJgdL9p/SY6Z4lVKGHjKfZ2zuniJ2 NNzszTpFHetG1kCQAvy9KtGB7Ibg8kVRZWexRnGuIlJCklG2i9wmxMp9szFWrUOAAaKB qdbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=K2Wl3fYebj36dUrdyUcJntkdi+W153U9RjVDgIYqc7M=; b=dxv3gebFGt0D0I82a7OvIGvLRiMMxmLUDIsFTmP7z26iR5NAe8FBov8oRzzPBPs2/L HmUhw0rNR/FTY8m9H5lKgyvBBpHv8tGuACQvaKNDQFJN+b+xp+bn0TBrEulLZYdVw6Wf HTctDnj3pSJ3jXnLIxaPLlMh/fYgF9WjK7Iywvzzarb+ojXrK5FREMcziXOeACm99CLF kctMWHRewbNYKkIYfgyGW3FZ1wjrwGKJW1ot982ZBFbam7orDTdesATcFmZbopHbTvjl m3AmqqSK3Hq5VJ3fVWZqypPdVAHFyGLNLP/aTxwWR1COqWbwoZ/qOdDdOOaQd6IwKlpa utCQ== X-Gm-Message-State: AA6/9Rmb0mmaiPfaorUgT/qRzNGUYV0kWZpzcTRLZpU0C6b1kzpRwJYj3KQJSfiaJpvdKx30 X-Received: by 10.129.92.215 with SMTP id q206mr121948ywb.8.1475137955745; Thu, 29 Sep 2016 01:32:35 -0700 (PDT) Received: from mutt-hardenedbsd (pool-100-16-217-83.bltmmd.fios.verizon.net. [100.16.217.83]) by smtp.gmail.com with ESMTPSA id c16sm5181173ywb.5.2016.09.29.01.32.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Sep 2016 01:32:34 -0700 (PDT) Date: Thu, 29 Sep 2016 04:32:32 -0400 From: Shawn Webb To: Martin Matuska Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r305819 - in head: contrib/libarchive/libarchive contrib/libarchive/libarchive/test lib/libarchive/tests Message-ID: <20160929083232.GB45358@mutt-hardenedbsd> References: <201609142115.u8ELF1t1019804@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="yNb1oOkm5a9FJOVX" Content-Disposition: inline In-Reply-To: <201609142115.u8ELF1t1019804@repo.freebsd.org> X-Operating-System: FreeBSD mutt-hardenedbsd 12.0-CURRENT-HBSD FreeBSD 12.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 08:32:36 -0000 --yNb1oOkm5a9FJOVX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 14, 2016 at 09:15:01PM +0000, Martin Matuska wrote: > Author: mm > Date: Wed Sep 14 21:15:01 2016 > New Revision: 305819 > URL: https://svnweb.freebsd.org/changeset/base/305819 >=20 > Log: > MFV r305816: > Sync libarchive with vendor including important security fixes. > =20 > Issues fixed (FreeBSD): > PR #778: ACL error handling > Issue #745: Symlink check prefix optimization is too aggressive > Issue #746: Hard links with data can evade sandboxing restrictions > =20 > This update fixes the vulnerability #3 and vulnerability #4 as reported= in > "non-cryptanalytic attacks against FreeBSD update components". > https://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f > =20 > Fix for vulnerability #2 has already been merged in r304989. > =20 > MFC after: 1 week > Security: http://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b8= 9c4f Hey Martin, Any plans to release a security announcement? Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --yNb1oOkm5a9FJOVX Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX7NGfAAoJEGqEZY9SRW7uvuAP/1JlVp6UoUVvPeU06HAxL9rp lLPj7jrPAzM7huGv9DIipzQYeZ9RXZFRdaIPfPQE5DHxUWUsDyBaKcHQExlNfqwC mS4K68mt3uRFKRFLAF5kSigqhEnU2M3ZJ1bUFEhs4RSGvZDsbx3swbFLecIBd37r CJsDmRykqJrbFYvXSJUHqx9F9suslvv3awgcO7t5bUGNk4dL6NUuqcWMR09Kq5di 4FjMNzhXdUh+3uohY0rW45qbGfDJXZWwkFZShTTZYUgT4LlMFms8MaakcEMUC0AD va4nTcrr0qWd+9bmlGHb7JXflevzHQQHV35aFEqrfG7fNeluZ5LUOh5RpzradXT8 t+kS9pD58DuHzjA30Fn8wqKw1/iJf3AKrVZ2VICe47vDGSpS+GZfjbuVPK8nhCEb d09/AI+DULC+aDtYLJ9oWajg+CO1lwlKUROw15tLIiVcTjRG8IA2fLWN3jm9imGW 9bKqXlIUKOmOtWGTxcGak/0NkGAH/XWVBMH0Zkz44L8qw7dVunyL6CdMV5LGGoOg dZXMiP7+9iqy3zm7XtHoJqvH0ie92HKrbGfguAcApZFofemR7P0oL9U00shMUEUk F71s15BepQvqUcSOtpxuY2iib4mQPhL79GAFdilQwiHg1fU5gLhZyILkPdSPxsnj /8I5Q5CKBGzRy+dQsxht =XJbn -----END PGP SIGNATURE----- --yNb1oOkm5a9FJOVX-- From owner-svn-src-head@freebsd.org Thu Sep 29 08:34:02 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27FEFC02A24 for ; Thu, 29 Sep 2016 08:34:02 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-yw0-x22c.google.com (mail-yw0-x22c.google.com [IPv6:2607:f8b0:4002:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D50EEAF for ; Thu, 29 Sep 2016 08:34:01 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-yw0-x22c.google.com with SMTP id i129so44414214ywb.0 for ; Thu, 29 Sep 2016 01:34:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=yhLNLCDmifND9hvXBvF+gvVRtxwB3ju7G89O3Wt63do=; b=dvQCWdVKkbACxgtFciEm9SNUwzQJ+wmjrGEWnlJwgGIh0pCBP3iJ7clmqoYEYmGaHm CdYMbDp+H5tTE/QFMI56G4MctjGvTN+T9aOa+2dm9nSEnkUIyWs7R3HyqZw9DG+/dqSF JDVdzOBCez3ZfWkzttMyvauK5iAyapQqMGhNMf1AUI9QQotT3mYGxSMdvdQS1TKL518L 1Av8YlqgDFy2wU6oIWta9/HnFzSxXqR5xl3eOSrWaugpgsTOYqoI/jl7S93LAS5EfNoJ YdAViHLKjQnMd/f+Sqt1HlUcK8wywHHBcnlh5jrXB0+TDlaSChNCz89xwBC5jBc+e1iI R/iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=yhLNLCDmifND9hvXBvF+gvVRtxwB3ju7G89O3Wt63do=; b=QPBQF1TIlRTIwDFFbZVR17HAVFtNxlPyuVRlRsnWReLeC8cTghUpANuoVcex/zD1Kx 6s9KC6tHd+5KG4NXnCTKxVzQMb2PYRtu9cYoGxfgT4bgLsiRtjwyEARzZWM7o4vn4mTx NFSOCgETslQ5+U5M9/L9HMuNXi8O6THVosFVV7L/33M/tPB1QK/fjeD9Hc/S17fBIOF7 rn3q58l2a2Fa0P2BnOa4eKS+kMrkR0gCizTjc2zOlSpQjF99mdZlKnt3DzOGhTAv7ib0 GyRd/Ph6YcGaAgdQpRCM8C/G3hTlmQi/mm4VaDKVdP45VKbj7x08zl8JVLroMRpDIwOc oOSw== X-Gm-Message-State: AA6/9RkOTgzgm2xERRWbOSptyBsorfPxSf1yCjJTK12S/uOYQeQt9TiTyTcRI/9V+HTwoIpj X-Received: by 10.13.229.69 with SMTP id o66mr120341ywe.286.1475138041131; Thu, 29 Sep 2016 01:34:01 -0700 (PDT) Received: from mutt-hardenedbsd (pool-100-16-217-83.bltmmd.fios.verizon.net. [100.16.217.83]) by smtp.gmail.com with ESMTPSA id g123sm4845060ywd.30.2016.09.29.01.33.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Sep 2016 01:34:00 -0700 (PDT) Date: Thu, 29 Sep 2016 04:33:57 -0400 From: Shawn Webb To: Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r305486 - head/usr.bin/bsdiff/bspatch Message-ID: <20160929083357.GC45358@mutt-hardenedbsd> References: <201609061900.u86J0bd4076628@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KN5l+BnMqAQyZLvT" Content-Disposition: inline In-Reply-To: <201609061900.u86J0bd4076628@repo.freebsd.org> X-Operating-System: FreeBSD mutt-hardenedbsd 12.0-CURRENT-HBSD FreeBSD 12.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 08:34:02 -0000 --KN5l+BnMqAQyZLvT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 06, 2016 at 07:00:37PM +0000, Ed Maste wrote: > Author: emaste > Date: Tue Sep 6 19:00:37 2016 > New Revision: 305486 > URL: https://svnweb.freebsd.org/changeset/base/305486 >=20 > Log: > bspatch: add sanity checks on sizes to avoid integer overflow > =20 > Note that this introduces an explicit 2GB limit, but this was already > implicit in variable and function argument types. > =20 > This is based on the "non-cryptanalytic attacks against freebsd > update components" anonymous gist. Further refinement is planned. > =20 > Reviewed by: allanjude, cem, kib > Obtained from: anonymous gist > MFC after: 3 days > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D7619 Hey Ed, Any plans to release a security announcement? Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --KN5l+BnMqAQyZLvT Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX7NH1AAoJEGqEZY9SRW7urpYP/A4gXIr9fqa0TwRaJ1n2deI5 Uhu/0Q98eyx0kF8gWNgBgBFE+oCoNrLe9G2vBA++x8r7vGpAVahlLaIm9x2JZHXB DrV5c5SumYwr17nW83ce4H8NItTam6mRqC5xuA3yBF5SWTOgf/lWtfhdXW73VBT0 aVz3dwXojWn4cDMtOlDGh7zMZ0Utc3bvORFHXRZkePDsRtSRB3OaDaK+ruDJsbsP 3HOugXJ4hNb+cOReU3kpDxIzqk0Tr0k8xStruzqx2fWVqNAmJDhVwzmZcYG7mX79 CjzLjjnXRpKZuX/4uDpXQHXyhVFKLtozbMIlNbwN8Eiy1g9mW9Hb06t3AcSQPaO+ yoldG+kRhzkQnnE5GpJTjKUzVPmEyBmCJHTIURMjQpEfipkQZVPjo5Bl/Lkm9Zkl 06NRMjm0r9LuD7aG24wtFlLI1TeFtcHZrXao3Iun6WEIzgvpL6+NAzDuyCLklZHv DjfeBJp5wSiZGRsDj8hz0d95Zo9KJ/e9w1cSTMIeH3fjDCGex7ho509Y/2GxcZBs m784cUXwMuWQ03D7y1Olena4QMfT23Vyv4WEcNLu4zRcO8od/d4R7lX3WzJnR77L sRRJrUw4Kj1Kq304vMJsQ0vLXYyT7opewySBTl3L2rRSkW1gNDV0+H+IpUQ5g9pT Ekxrl//+R21y86WMtFof =lagG -----END PGP SIGNATURE----- --KN5l+BnMqAQyZLvT-- From owner-svn-src-head@freebsd.org Thu Sep 29 08:49:13 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 454B0C00040; Thu, 29 Sep 2016 08:49:13 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16616985; Thu, 29 Sep 2016 08:49:13 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T8nC9H003679; Thu, 29 Sep 2016 08:49:12 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T8nCdc003678; Thu, 29 Sep 2016 08:49:12 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609290849.u8T8nCdc003678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 29 Sep 2016 08:49:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306439 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 08:49:13 -0000 Author: andrew Date: Thu Sep 29 08:49:12 2016 New Revision: 306439 URL: https://svnweb.freebsd.org/changeset/base/306439 Log: Remove struct platform_data, it was never used. Sponsored by: ABT Systems Ltd Modified: head/sys/arm/include/platformvar.h Modified: head/sys/arm/include/platformvar.h ============================================================================== --- head/sys/arm/include/platformvar.h Thu Sep 29 08:32:19 2016 (r306438) +++ head/sys/arm/include/platformvar.h Thu Sep 29 08:49:12 2016 (r306439) @@ -70,10 +70,6 @@ struct platform_kobj { struct platform_class *cls; }; -struct platform_data { - int delay_count; -}; - typedef struct platform_kobj *platform_t; typedef struct platform_class platform_def_t; #define platform_method_t kobj_method_t @@ -100,11 +96,6 @@ extern platform_method_t fdt_platform_me #define FDT_PLATFORM_CTASSERT(delay) CTASSERT(delay == 0) #endif -#define PLATFORM_DATA(NAME, delay) \ -static struct platform_data NAME ## _platc = { \ - .delay_count = delay; \ -}; - #define FDT_PLATFORM_DEF2(NAME, VAR_NAME, NAME_STR, size, compatible, \ delay) \ FDT_PLATFORM_CTASSERT(delay); \ From owner-svn-src-head@freebsd.org Thu Sep 29 09:16:03 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACDC0C012DA; Thu, 29 Sep 2016 09:16:03 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CC28EE7; Thu, 29 Sep 2016 09:16:03 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T9G2tT015402; Thu, 29 Sep 2016 09:16:02 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T9G2ZR015401; Thu, 29 Sep 2016 09:16:02 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609290916.u8T9G2ZR015401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 29 Sep 2016 09:16:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306440 - head/contrib/atf/atf-sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 09:16:03 -0000 Author: br Date: Thu Sep 29 09:16:02 2016 New Revision: 306440 URL: https://svnweb.freebsd.org/changeset/base/306440 Log: Fix conversion from C++ std::string into C const char *. This fixes operation on MIPS64EB with GCC 4.2.1. Reviewed by: jmmv Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D7952 Modified: head/contrib/atf/atf-sh/atf-check.cpp Modified: head/contrib/atf/atf-sh/atf-check.cpp ============================================================================== --- head/contrib/atf/atf-sh/atf-check.cpp Thu Sep 29 08:49:12 2016 (r306439) +++ head/contrib/atf/atf-sh/atf-check.cpp Thu Sep 29 09:16:02 2016 (r306440) @@ -346,9 +346,10 @@ std::auto_ptr< atf::check::check_result execute_with_shell(char* const* argv) { const std::string cmd = flatten_argv(argv); + const std::string shell = atf::env::get("ATF_SHELL", ATF_SHELL); const char* sh_argv[4]; - sh_argv[0] = atf::env::get("ATF_SHELL", ATF_SHELL).c_str(); + sh_argv[0] = shell.c_str(); sh_argv[1] = "-c"; sh_argv[2] = cmd.c_str(); sh_argv[3] = NULL; From owner-svn-src-head@freebsd.org Thu Sep 29 10:38:22 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AE3BC017D7; Thu, 29 Sep 2016 10:38:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E19B11263; Thu, 29 Sep 2016 10:38:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TAcLo6045156; Thu, 29 Sep 2016 10:38:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TAcLfO045154; Thu, 29 Sep 2016 10:38:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609291038.u8TAcLfO045154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 29 Sep 2016 10:38:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306441 - in head: share/man/man9 sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 10:38:22 -0000 Author: hselasky Date: Thu Sep 29 10:38:20 2016 New Revision: 306441 URL: https://svnweb.freebsd.org/changeset/base/306441 Log: While draining a timeout task prevent the taskqueue_enqueue_timeout() function from restarting the timer. Commonly taskqueue_enqueue_timeout() is called from within the task function itself without any checks for teardown. Then it can happen the timer stays active after the return of taskqueue_drain_timeout(), because the timeout and task is drained separately. This patch factors out the teardown flag into the timeout task itself, allowing existing code to stay as-is instead of applying a teardown flag to each and every of the timeout task consumers. Add assert to taskqueue_drain_timeout() which prevents parallel execution on the same timeout task. Update manual page documenting the return value of taskqueue_enqueue_timeout(). Differential Revision: https://reviews.freebsd.org/D8012 Reviewed by: kib, trasz MFC after: 1 week Modified: head/share/man/man9/taskqueue.9 head/sys/kern/subr_taskqueue.c Modified: head/share/man/man9/taskqueue.9 ============================================================================== --- head/share/man/man9/taskqueue.9 Thu Sep 29 09:16:02 2016 (r306440) +++ head/share/man/man9/taskqueue.9 Thu Sep 29 10:38:20 2016 (r306441) @@ -223,6 +223,8 @@ Otherwise, the task is scheduled for enq after the absolute value of .Va ticks is passed. +This function will return -1 if the queue is being drained. +Otherwise the number of pending calls will be returned. .Pp The .Fn taskqueue_cancel Modified: head/sys/kern/subr_taskqueue.c ============================================================================== --- head/sys/kern/subr_taskqueue.c Thu Sep 29 09:16:02 2016 (r306440) +++ head/sys/kern/subr_taskqueue.c Thu Sep 29 10:38:20 2016 (r306441) @@ -81,6 +81,7 @@ struct taskqueue { #define TQ_FLAGS_UNLOCKED_ENQUEUE (1 << 2) #define DT_CALLOUT_ARMED (1 << 0) +#define DT_DRAIN_IN_PROGRESS (1 << 1) #define TQ_LOCK(tq) \ do { \ @@ -299,7 +300,11 @@ taskqueue_enqueue_timeout(struct taskque KASSERT(!queue->tq_spin, ("Timeout for spin-queue")); timeout_task->q = queue; res = timeout_task->t.ta_pending; - if (ticks == 0) { + if (timeout_task->f & DT_DRAIN_IN_PROGRESS) { + /* Do nothing */ + TQ_UNLOCK(queue); + res = -1; + } else if (ticks == 0) { taskqueue_enqueue_locked(queue, &timeout_task->t); /* The lock is released inside. */ } else { @@ -559,8 +564,24 @@ taskqueue_drain_timeout(struct taskqueue struct timeout_task *timeout_task) { + /* + * Set flag to prevent timer from re-starting during drain: + */ + TQ_LOCK(queue); + KASSERT((timeout_task->f & DT_DRAIN_IN_PROGRESS) == 0, + ("Drain already in progress")); + timeout_task->f |= DT_DRAIN_IN_PROGRESS; + TQ_UNLOCK(queue); + callout_drain(&timeout_task->c); taskqueue_drain(queue, &timeout_task->t); + + /* + * Clear flag to allow timer to re-start: + */ + TQ_LOCK(queue); + timeout_task->f &= ~DT_DRAIN_IN_PROGRESS; + TQ_UNLOCK(queue); } static void From owner-svn-src-head@freebsd.org Thu Sep 29 11:13:52 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2A1EC0223D; Thu, 29 Sep 2016 11:13:52 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3B51777; Thu, 29 Sep 2016 11:13:52 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TBDp5p060109; Thu, 29 Sep 2016 11:13:51 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TBDppi060107; Thu, 29 Sep 2016 11:13:51 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201609291113.u8TBDppi060107@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Thu, 29 Sep 2016 11:13:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306442 - in head/sys/arm: conf nvidia/tegra124 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 11:13:53 -0000 Author: mmel Date: Thu Sep 29 11:13:51 2016 New Revision: 306442 URL: https://svnweb.freebsd.org/changeset/base/306442 Log: TEGRA: Add support for MULTIDELAY option. Modified: head/sys/arm/conf/TEGRA124 head/sys/arm/nvidia/tegra124/tegra124_machdep.c Modified: head/sys/arm/conf/TEGRA124 ============================================================================== --- head/sys/arm/conf/TEGRA124 Thu Sep 29 10:38:20 2016 (r306441) +++ head/sys/arm/conf/TEGRA124 Thu Sep 29 11:13:51 2016 (r306442) @@ -26,6 +26,7 @@ ident TEGRA124 options SCHED_ULE # ULE scheduler options PLATFORM # Platform based SoC options PLATFORM_SMP +options MULTIDELAY options SMP # Enable multiple cores options LINUX_BOOT_ABI Modified: head/sys/arm/nvidia/tegra124/tegra124_machdep.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_machdep.c Thu Sep 29 10:38:20 2016 (r306441) +++ head/sys/arm/nvidia/tegra124/tegra124_machdep.c Thu Sep 29 11:13:51 2016 (r306442) @@ -153,4 +153,4 @@ static platform_method_t tegra124_method PLATFORMMETHOD_END, }; -FDT_PLATFORM_DEF(tegra124, "Nvidia Jetson-TK1", 0, "nvidia,jetson-tk1", 0); +FDT_PLATFORM_DEF(tegra124, "Nvidia Jetson-TK1", 0, "nvidia,jetson-tk1", 120); From owner-svn-src-head@freebsd.org Thu Sep 29 11:18:49 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1B28C022DC; Thu, 29 Sep 2016 11:18:49 +0000 (UTC) (envelope-from jch@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92F10931; Thu, 29 Sep 2016 11:18:49 +0000 (UTC) (envelope-from jch@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TBImtA060489; Thu, 29 Sep 2016 11:18:48 GMT (envelope-from jch@FreeBSD.org) Received: (from jch@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TBIm8r060488; Thu, 29 Sep 2016 11:18:48 GMT (envelope-from jch@FreeBSD.org) Message-Id: <201609291118.u8TBIm8r060488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jch set sender to jch@FreeBSD.org using -f From: Julien Charbon Date: Thu, 29 Sep 2016 11:18:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306443 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 11:18:49 -0000 Author: jch Date: Thu Sep 29 11:18:48 2016 New Revision: 306443 URL: https://svnweb.freebsd.org/changeset/base/306443 Log: Fix an issue with accept_filter introduced with r261242: As a side effect of r261242 when using accept_filter the first call to soisconnected() is done earlier in tcp_input() instead of tcp_do_segment() context. Restore the expected behaviour. Note: This call to soisconnected() seems to be extraneous in all cases (with or without accept_filter). Will be addressed in a separate commit. PR: 212920 Reported by: Alexey Tested by: Alexey, jch Sponsored by: Verisign, Inc. MFC after: 1 week Modified: head/sys/netinet/tcp_syncache.c Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Thu Sep 29 11:13:51 2016 (r306442) +++ head/sys/netinet/tcp_syncache.c Thu Sep 29 11:18:48 2016 (r306443) @@ -918,7 +918,9 @@ syncache_socket(struct syncache *sc, str tp->t_keepcnt = sototcpcb(lso)->t_keepcnt; tcp_timer_activate(tp, TT_KEEP, TP_KEEPINIT(tp)); - soisconnected(so); + if ((so->so_options & SO_ACCEPTFILTER) == 0) { + soisconnected(so); + } TCPSTAT_INC(tcps_accepts); return (so); From owner-svn-src-head@freebsd.org Thu Sep 29 11:23:17 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDCC3C02572 for ; Thu, 29 Sep 2016 11:23:17 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 61A61DFA for ; Thu, 29 Sep 2016 11:23:17 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-wm0-x22f.google.com with SMTP id b4so21382001wmb.0 for ; Thu, 29 Sep 2016 04:23:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=OwA3IYlraljbMdmIo/aV3Fr8EuBFee4M30sCAU8nz/8=; b=vM5PKkFwmyZfKppJU7j6HdnKvQYl1Sj+WaCdAFcSWZFAehZU67z4o7MUWoZ13Eozi5 2XIUO1vM7hMceA+Mgeu6/HD1q6dp4wQJW/Qwq4BV+3MA7QUzTtH5QTBX1smWI8OZz/it d/HWkfDVQYFZm3v9vvsA+iCpTsGr7+0SdbOu/k82LVDc4mPzMlv32k09cAydqMMKmNXI TyDZq8EEwd5Eqp/sf8MNkFQD8e9ErviRSxGuZT80jRVzQgE1MJyJVXFlSQu5Fp0jHt6y lf1x9CwdSLdcyxTxHr90LFZGmtL8gdaacI/yEJk2h3HyzHENR1STiSvDYAO0pkGJKTcd mj1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=OwA3IYlraljbMdmIo/aV3Fr8EuBFee4M30sCAU8nz/8=; b=Lg8iOoAcCji/YDm3XIFaSgNQQ/r1N+A5jgqKoUnOYnHiifkIZP+G5ALzROG6ZSDyfo Ca/9Evb5s6qmUvDcgD3Btiu0TZaVfsxv19GAf/4IrNQPeZMr6rx2aDyVtsXVe7z982an IvSImERAqUTYI9jDMczeaoLHijzFeTav7Qh/pGna48VYXdzPYUOvbTz20r3WV3toqD1E usmJff9dscn+gCSSt+pISJE4+a2DyQx4JJ4oF8RQ6FnPGX5HEfhEzXzlkG6H/nvJVoe/ srGZgyB5dAno1A2/2+8QaJwD7slhI1VaCrUTxT3dRrOmQVZsULpKLmoCMeJWPWrVJvmt MFDw== X-Gm-Message-State: AA6/9Rl2K0eRzVszEITFQ8lNOV9kYhuDpr1kDmpaZZHanEhle+4+970fssxses1bd4FynghCVqrLVdO3V/F29yo3 X-Received: by 10.28.214.83 with SMTP id n80mr12280979wmg.121.1475148195606; Thu, 29 Sep 2016 04:23:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.139.208 with HTTP; Thu, 29 Sep 2016 04:23:15 -0700 (PDT) In-Reply-To: <20160929083232.GB45358@mutt-hardenedbsd> References: <201609142115.u8ELF1t1019804@repo.freebsd.org> <20160929083232.GB45358@mutt-hardenedbsd> From: Oliver Pinter Date: Thu, 29 Sep 2016 13:23:15 +0200 Message-ID: Subject: Re: svn commit: r305819 - in head: contrib/libarchive/libarchive contrib/libarchive/libarchive/test lib/libarchive/tests To: Shawn Webb Cc: Martin Matuska , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 11:23:17 -0000 On Thursday, September 29, 2016, Shawn Webb wrote: > On Wed, Sep 14, 2016 at 09:15:01PM +0000, Martin Matuska wrote: > > Author: mm > > Date: Wed Sep 14 21:15:01 2016 > > New Revision: 305819 > > URL: https://svnweb.freebsd.org/changeset/base/305819 > > > > Log: > > MFV r305816: > > Sync libarchive with vendor including important security fixes. > > > > Issues fixed (FreeBSD): > > PR #778: ACL error handling > > Issue #745: Symlink check prefix optimization is too aggressive > > Issue #746: Hard links with data can evade sandboxing restrictions > > > > This update fixes the vulnerability #3 and vulnerability #4 as > reported in > > "non-cryptanalytic attacks against FreeBSD update components". > > https://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f > > > > Fix for vulnerability #2 has already been merged in r304989. > > > > MFC after: 1 week > > Security: http://gist.github.com/anonymous/ > e48209b03f1dd9625a992717e7b89c4f > > Hey Martin, > > Any plans to release a security announcement? > > I expect that at the same time, as 11.0-RELEASE is announced. It would be logical. > Thanks, > > -- > Shawn Webb > Cofounder and Security Engineer > HardenedBSD > > GPG Key ID: 0x6A84658F52456EEE > GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE > From owner-svn-src-head@freebsd.org Thu Sep 29 12:25:05 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AED9C02E35; Thu, 29 Sep 2016 12:25:05 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B2D57E9; Thu, 29 Sep 2016 12:25:05 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TCP4Nl087229; Thu, 29 Sep 2016 12:25:04 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TCP4SB087228; Thu, 29 Sep 2016 12:25:04 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201609291225.u8TCP4SB087228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Thu, 29 Sep 2016 12:25:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306444 - head/sys/arm/nvidia/tegra124 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 12:25:05 -0000 Author: mmel Date: Thu Sep 29 12:25:04 2016 New Revision: 306444 URL: https://svnweb.freebsd.org/changeset/base/306444 Log: TEGRA: Don't include files already included by system or arch configs. Modified: head/sys/arm/nvidia/tegra124/files.tegra124 Modified: head/sys/arm/nvidia/tegra124/files.tegra124 ============================================================================== --- head/sys/arm/nvidia/tegra124/files.tegra124 Thu Sep 29 11:18:48 2016 (r306443) +++ head/sys/arm/nvidia/tegra124/files.tegra124 Thu Sep 29 12:25:04 2016 (r306444) @@ -1,12 +1,6 @@ # $FreeBSD$ # -# Standard ARM support. -# -kern/kern_clocksource.c standard -dev/ofw/ofw_cpu.c optional fdt - -# # Standard tegra124 devices and support. # arm/nvidia/tegra124/tegra124_machdep.c standard From owner-svn-src-head@freebsd.org Thu Sep 29 12:50:18 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3AFDBEC405; Thu, 29 Sep 2016 12:50:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 330952D8; Thu, 29 Sep 2016 12:50:17 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA17145; Thu, 29 Sep 2016 15:50:10 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1bpamv-00001s-V1; Thu, 29 Sep 2016 15:50:09 +0300 Subject: Re: svn commit: r306425 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs To: Alexander Motin , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201609290000.u8T00bYQ004671@repo.freebsd.org> From: Andriy Gapon Message-ID: Date: Thu, 29 Sep 2016 15:49:13 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <201609290000.u8T00bYQ004671@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 12:50:18 -0000 On 29/09/2016 03:00, Alexander Motin wrote: > Author: mav > Date: Thu Sep 29 00:00:37 2016 > New Revision: 306425 > URL: https://svnweb.freebsd.org/changeset/base/306425 > > Log: > MFV r306423: 7402 Create tunable to ignore hole_birth feature > > Until we can resolve the numerous hole_birth bugs that have cropped up > recently, and come up with a way going forwards to protect users from > corruption, we should disable the hole_birth feature. Using a tunable > allows those who are confident that their data is correct to continue to > take advantage of the feature. > > Closes #188 > > Reviewed by: Matthew Ahrens > Author: Paul Dagnelie > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c > Directory Properties: > head/sys/cddl/contrib/opensolaris/ (props changed) > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c > ============================================================================== > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Wed Sep 28 23:54:47 2016 (r306424) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Thu Sep 29 00:00:37 2016 (r306425) > @@ -40,6 +40,11 @@ > #include > > int32_t zfs_pd_bytes_max = 50 * 1024 * 1024; /* 50MB */ > +boolean_t send_holes_without_birth_time = B_TRUE; > + > +SYSCTL_DECL(_vfs_zfs); > +SYSCTL_UINT(_vfs_zfs, OID_AUTO, send_holes_without_birth_time, CTLFLAG_RWTUN, > + &send_holes_without_birth_time, 0, "Send holes without birth time"); I think that this should be guarded with _KERNEL. > typedef struct prefetch_data { > kmutex_t pd_mtx; > @@ -254,7 +259,8 @@ traverse_visitbp(traverse_data_t *td, co > * > * Note that the meta-dnode cannot be reallocated. > */ > - if ((!td->td_realloc_possible || > + if (!send_holes_without_birth_time && > + (!td->td_realloc_possible || > zb->zb_object == DMU_META_DNODE_OBJECT) && > td->td_hole_birth_enabled_txg <= td->td_min_txg) > return (0); > -- Andriy Gapon From owner-svn-src-head@freebsd.org Thu Sep 29 12:54:28 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98040BEC607; Thu, 29 Sep 2016 12:54:28 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AF249D6; Thu, 29 Sep 2016 12:54:28 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TCsRS1098475; Thu, 29 Sep 2016 12:54:27 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TCsRgt098474; Thu, 29 Sep 2016 12:54:27 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201609291254.u8TCsRgt098474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Thu, 29 Sep 2016 12:54:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306445 - head/sys/arm/nvidia/tegra124 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 12:54:28 -0000 Author: mmel Date: Thu Sep 29 12:54:27 2016 New Revision: 306445 URL: https://svnweb.freebsd.org/changeset/base/306445 Log: TEGRA: Return back kern_clocksource.c into tegra config file. It was removed in r306444 by mistake. Modified: head/sys/arm/nvidia/tegra124/files.tegra124 Modified: head/sys/arm/nvidia/tegra124/files.tegra124 ============================================================================== --- head/sys/arm/nvidia/tegra124/files.tegra124 Thu Sep 29 12:25:04 2016 (r306444) +++ head/sys/arm/nvidia/tegra124/files.tegra124 Thu Sep 29 12:54:27 2016 (r306445) @@ -1,6 +1,11 @@ # $FreeBSD$ # +# Standard ARM support. +# +kern/kern_clocksource.c standard + +# # Standard tegra124 devices and support. # arm/nvidia/tegra124/tegra124_machdep.c standard From owner-svn-src-head@freebsd.org Thu Sep 29 13:38:15 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5982FC0081B; Thu, 29 Sep 2016 13:38:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29CFF908; Thu, 29 Sep 2016 13:38:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TDcEVW013940; Thu, 29 Sep 2016 13:38:14 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TDcESW013939; Thu, 29 Sep 2016 13:38:14 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201609291338.u8TDcESW013939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 29 Sep 2016 13:38:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306446 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 13:38:15 -0000 Author: imp Date: Thu Sep 29 13:38:14 2016 New Revision: 306446 URL: https://svnweb.freebsd.org/changeset/base/306446 Log: SSP is broken on all mips. Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Thu Sep 29 12:54:27 2016 (r306445) +++ head/share/mk/src.opts.mk Thu Sep 29 13:38:14 2016 (r306446) @@ -261,7 +261,7 @@ BROKEN_OPTIONS+=LLDB .if ${__T} != "armv6" BROKEN_OPTIONS+=LIBSOFT .endif -.if ${__T} == "mips" || ${__T} == "mips64" +.if ${__T:Mmips*} BROKEN_OPTIONS+=SSP .endif From owner-svn-src-head@freebsd.org Thu Sep 29 13:54:11 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14287C0108B; Thu, 29 Sep 2016 13:54:11 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB44576A; Thu, 29 Sep 2016 13:54:10 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TDsAEY021292; Thu, 29 Sep 2016 13:54:10 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TDsAWe021291; Thu, 29 Sep 2016 13:54:10 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201609291354.u8TDsAWe021291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Thu, 29 Sep 2016 13:54:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306447 - head/sys/arm/nvidia X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 13:54:11 -0000 Author: mmel Date: Thu Sep 29 13:54:09 2016 New Revision: 306447 URL: https://svnweb.freebsd.org/changeset/base/306447 Log: TEGRA: Rename (cut & pasted) genahci to tegra_ahci. Make device class definition static. Modified: head/sys/arm/nvidia/tegra_ahci.c Modified: head/sys/arm/nvidia/tegra_ahci.c ============================================================================== --- head/sys/arm/nvidia/tegra_ahci.c Thu Sep 29 13:38:14 2016 (r306446) +++ head/sys/arm/nvidia/tegra_ahci.c Thu Sep 29 13:54:09 2016 (r306447) @@ -602,8 +602,8 @@ tegra_ahci_resume(device_t dev) return (bus_generic_resume(dev)); } -devclass_t genahci_devclass; -static device_method_t genahci_methods[] = { +static devclass_t tegra_ahci_devclass; +static device_method_t tegra_ahci_methods[] = { DEVMETHOD(device_probe, tegra_ahci_probe), DEVMETHOD(device_attach, tegra_ahci_attach), DEVMETHOD(device_detach, tegra_ahci_detach), @@ -619,9 +619,10 @@ static device_method_t genahci_methods[] DEVMETHOD_END }; -static driver_t genahci_driver = { + +static driver_t tegra_ahci_driver = { "ahci", - genahci_methods, + tegra_ahci_methods, sizeof(struct tegra_ahci_sc) }; -DRIVER_MODULE(genahci, simplebus, genahci_driver, genahci_devclass, NULL, NULL); +DRIVER_MODULE(tegra_ahci, simplebus, tegra_ahci_driver, tegra_ahci_devclass, NULL, NULL); From owner-svn-src-head@freebsd.org Thu Sep 29 13:59:16 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AAFEC0122B; Thu, 29 Sep 2016 13:59:16 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC657A67; Thu, 29 Sep 2016 13:59:15 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TDxFrY021532; Thu, 29 Sep 2016 13:59:15 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TDxF9K021530; Thu, 29 Sep 2016 13:59:15 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201609291359.u8TDxF9K021530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 29 Sep 2016 13:59:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306448 - in head/sys/dev/cxgbe: cxgbei tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 13:59:16 -0000 Author: eadler Date: Thu Sep 29 13:59:14 2016 New Revision: 306448 URL: https://svnweb.freebsd.org/changeset/base/306448 Log: Remove a a duplicated word. Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.c head/sys/dev/cxgbe/tom/t4_cpl_io.c Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.c ============================================================================== --- head/sys/dev/cxgbe/cxgbei/cxgbei.c Thu Sep 29 13:54:09 2016 (r306447) +++ head/sys/dev/cxgbe/cxgbei/cxgbei.c Thu Sep 29 13:59:14 2016 (r306448) @@ -207,7 +207,7 @@ cxgbei_init(struct adapter *sc, struct c r &= V_ISCSITAGMASK(M_ISCSITAGMASK); if (r != pr->pr_tag_mask) { /* - * Recent firmwares are supposed to set up the the iSCSI tagmask + * Recent firmwares are supposed to set up the iSCSI tagmask * but we'll do it ourselves it the computed value doesn't match * what's in the register. */ Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Thu Sep 29 13:54:09 2016 (r306447) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Thu Sep 29 13:59:14 2016 (r306448) @@ -2114,7 +2114,7 @@ sendanother: /* * If the request will not be requeued, drop a reference on - * the the aiotx buffer. Any mbufs in flight should still + * the aiotx buffer. Any mbufs in flight should still * contain a reference, but this drops the reference that the * job owns while it is waiting to queue mbufs to the socket. */ From owner-svn-src-head@freebsd.org Thu Sep 29 14:01:07 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5622C01322; Thu, 29 Sep 2016 14:01:07 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9825BC84; Thu, 29 Sep 2016 14:01:07 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TE16ga023193; Thu, 29 Sep 2016 14:01:06 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TE16WI023164; Thu, 29 Sep 2016 14:01:06 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201609291401.u8TE16WI023164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 29 Sep 2016 14:01:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306449 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 14:01:07 -0000 Author: eadler Date: Thu Sep 29 14:01:06 2016 New Revision: 306449 URL: https://svnweb.freebsd.org/changeset/base/306449 Log: Remove an extra etter. Modified: head/sys/contrib/ipfilter/netinet/fil.c Modified: head/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/fil.c Thu Sep 29 13:59:14 2016 (r306448) +++ head/sys/contrib/ipfilter/netinet/fil.c Thu Sep 29 14:01:06 2016 (r306449) @@ -421,7 +421,7 @@ static ipftuneable_t ipf_main_tuneables[ /* - * The next section of code is a a collection of small routines that set + * The next section of code is a collection of small routines that set * fields in the fr_info_t structure passed based on properties of the * current packet. There are different routines for the same protocol * for each of IPv4 and IPv6. Adding a new protocol, for which there From owner-svn-src-head@freebsd.org Thu Sep 29 14:14:40 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A409DC01B2B; Thu, 29 Sep 2016 14:14:40 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7622BFF5; Thu, 29 Sep 2016 14:14:40 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TEEd1S030105; Thu, 29 Sep 2016 14:14:39 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TEEdZ5030104; Thu, 29 Sep 2016 14:14:39 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201609291414.u8TEEdZ5030104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 29 Sep 2016 14:14:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306450 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 14:14:40 -0000 Author: avos Date: Thu Sep 29 14:14:39 2016 New Revision: 306450 URL: https://svnweb.freebsd.org/changeset/base/306450 Log: sysctl.9: add missing underscore (SYSCTL_HANDLERARGS -> SYSCTL_HANDLER_ARGS) Modified: head/share/man/man9/sysctl.9 Modified: head/share/man/man9/sysctl.9 ============================================================================== --- head/share/man/man9/sysctl.9 Thu Sep 29 14:01:06 2016 (r306449) +++ head/share/man/man9/sysctl.9 Thu Sep 29 14:14:39 2016 (r306450) @@ -132,7 +132,7 @@ .Fa "int ctlflags" .Fa "void *arg1" .Fa "intptr_t arg2" -.Fa "int (*handler) (SYSCTL_HANDLERARGS)" +.Fa "int (*handler) (SYSCTL_HANDLER_ARGS)" .Fa "const char *format" .Fa "const char *descr" .Fc From owner-svn-src-head@freebsd.org Thu Sep 29 14:35:33 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 758D3C01209; Thu, 29 Sep 2016 14:35:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E0FDF8D; Thu, 29 Sep 2016 14:35:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TEZWBY038176; Thu, 29 Sep 2016 14:35:32 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TEZWE3038175; Thu, 29 Sep 2016 14:35:32 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609291435.u8TEZWE3038175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 29 Sep 2016 14:35:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306451 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 14:35:33 -0000 Author: hselasky Date: Thu Sep 29 14:35:32 2016 New Revision: 306451 URL: https://svnweb.freebsd.org/changeset/base/306451 Log: The IORESOURCE_XXX defines should resemble a bitmask while SYS_RES_XXX are not bitmasks. Fix return value of pci_resource_flags() to reflect this change. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/pci.h Thu Sep 29 14:14:39 2016 (r306450) +++ head/sys/compat/linuxkpi/common/include/linux/pci.h Thu Sep 29 14:35:32 2016 (r306451) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2016 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -121,9 +121,9 @@ struct pci_device_id { #define PCI_EXP_LNKCAP2_SLS_5_0GB 0x04 /* Supported Link Speed 5.0GT/s */ #define PCI_EXP_LNKCAP2_SLS_8_0GB 0x08 /* Supported Link Speed 8.0GT/s */ -#define IORESOURCE_MEM SYS_RES_MEMORY -#define IORESOURCE_IO SYS_RES_IOPORT -#define IORESOURCE_IRQ SYS_RES_IRQ +#define IORESOURCE_MEM (1 << SYS_RES_MEMORY) +#define IORESOURCE_IO (1 << SYS_RES_IOPORT) +#define IORESOURCE_IRQ (1 << SYS_RES_IRQ) enum pci_bus_speed { PCI_SPEED_UNKNOWN = -1, @@ -230,17 +230,28 @@ pci_resource_len(struct pci_dev *pdev, i return rle->count; } +static inline int +pci_resource_type(struct pci_dev *pdev, int bar) +{ + struct resource_list_entry *rle; + + if ((rle = _pci_get_bar(pdev, bar)) == NULL) + return (-1); + return (rle->type); +} + /* * All drivers just seem to want to inspect the type not flags. */ static inline int pci_resource_flags(struct pci_dev *pdev, int bar) { - struct resource_list_entry *rle; + int type; - if ((rle = _pci_get_bar(pdev, bar)) == NULL) + type = pci_resource_type(pdev, bar); + if (type < 0) return (0); - return rle->type; + return (1 << type); } static inline const char * @@ -300,8 +311,8 @@ pci_request_region(struct pci_dev *pdev, int rid; int type; - type = pci_resource_flags(pdev, bar); - if (type == 0) + type = pci_resource_type(pdev, bar); + if (type < 0) return (-ENODEV); rid = PCIR_BAR(bar); if (bus_alloc_resource_any(pdev->dev.bsddev, type, &rid, From owner-svn-src-head@freebsd.org Thu Sep 29 16:29:51 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 004E0C019A6; Thu, 29 Sep 2016 16:29:51 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3BC99DA; Thu, 29 Sep 2016 16:29:50 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TGTnxB079555; Thu, 29 Sep 2016 16:29:49 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TGTne2079554; Thu, 29 Sep 2016 16:29:49 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201609291629.u8TGTne2079554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Thu, 29 Sep 2016 16:29:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306452 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 16:29:51 -0000 Author: allanjude Date: Thu Sep 29 16:29:49 2016 New Revision: 306452 URL: https://svnweb.freebsd.org/changeset/base/306452 Log: Allow reading the following sysctl MIBs in capability mode: kern.hostname, kern.domainname, and kern.hostuuid This allows sandboxed applications to read these sysctls Submitted by: cem (original version) Reviewed by: cem, jonathan, rwatson (original version) Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D8015 Modified: head/sys/kern/kern_mib.c Modified: head/sys/kern/kern_mib.c ============================================================================== --- head/sys/kern/kern_mib.c Thu Sep 29 14:35:32 2016 (r306451) +++ head/sys/kern/kern_mib.c Thu Sep 29 16:29:49 2016 (r306452) @@ -316,15 +316,15 @@ sysctl_hostname(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_kern, KERN_HOSTNAME, hostname, - CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE, + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_CAPRD | CTLFLAG_MPSAFE, (void *)(offsetof(struct prison, pr_hostname)), MAXHOSTNAMELEN, sysctl_hostname, "A", "Hostname"); SYSCTL_PROC(_kern, KERN_NISDOMAINNAME, domainname, - CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE, + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_CAPRD | CTLFLAG_MPSAFE, (void *)(offsetof(struct prison, pr_domainname)), MAXHOSTNAMELEN, sysctl_hostname, "A", "Name of the current YP/NIS domain"); SYSCTL_PROC(_kern, KERN_HOSTUUID, hostuuid, - CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE, + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_CAPRD | CTLFLAG_MPSAFE, (void *)(offsetof(struct prison, pr_hostuuid)), HOSTUUIDLEN, sysctl_hostname, "A", "Host UUID"); From owner-svn-src-head@freebsd.org Thu Sep 29 16:35:53 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E4CCC01B76; Thu, 29 Sep 2016 16:35:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42070E15; Thu, 29 Sep 2016 16:35:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TGZqKl083302; Thu, 29 Sep 2016 16:35:52 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TGZqRs083301; Thu, 29 Sep 2016 16:35:52 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609291635.u8TGZqRs083301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 29 Sep 2016 16:35:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306453 - head/sys/dev/mlx5/mlx5_en X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 16:35:53 -0000 Author: hselasky Date: Thu Sep 29 16:35:52 2016 New Revision: 306453 URL: https://svnweb.freebsd.org/changeset/base/306453 Log: Set hardware stats flag to avoid double counting the number of incoming bytes. Found by: Ben RUBSON Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Thu Sep 29 16:29:49 2016 (r306452) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Thu Sep 29 16:35:52 2016 (r306453) @@ -2903,6 +2903,7 @@ mlx5e_create_ifp(struct mlx5_core_dev *m ifp->if_capabilities |= IFCAP_LINKSTATE | IFCAP_JUMBO_MTU; ifp->if_capabilities |= IFCAP_LRO; ifp->if_capabilities |= IFCAP_TSO | IFCAP_VLAN_HWTSO; + ifp->if_capabilities |= IFCAP_HWSTATS; /* set TSO limits so that we don't have to drop TX packets */ ifp->if_hw_tsomax = MLX5E_MAX_TX_PAYLOAD_SIZE - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); From owner-svn-src-head@freebsd.org Thu Sep 29 16:36:33 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E408C01BDB; Thu, 29 Sep 2016 16:36:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F102F77; Thu, 29 Sep 2016 16:36:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TGaWJ7083371; Thu, 29 Sep 2016 16:36:32 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TGaWXk083370; Thu, 29 Sep 2016 16:36:32 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609291636.u8TGaWXk083370@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 29 Sep 2016 16:36:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306454 - head/sys/ofed/drivers/net/mlx4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 16:36:33 -0000 Author: hselasky Date: Thu Sep 29 16:36:32 2016 New Revision: 306454 URL: https://svnweb.freebsd.org/changeset/base/306454 Log: Set hardware stats flag to avoid double counting the number of incoming bytes. Found by: Ben RUBSON Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Thu Sep 29 16:35:52 2016 (r306453) +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Thu Sep 29 16:36:32 2016 (r306454) @@ -2165,6 +2165,7 @@ int mlx4_en_init_netdev(struct mlx4_en_d dev->if_capabilities |= IFCAP_VLAN_HWCSUM | IFCAP_VLAN_HWFILTER; dev->if_capabilities |= IFCAP_LINKSTATE | IFCAP_JUMBO_MTU; dev->if_capabilities |= IFCAP_LRO; + dev->if_capabilities |= IFCAP_HWSTATS; if (mdev->LSO_support) dev->if_capabilities |= IFCAP_TSO4 | IFCAP_TSO6 | IFCAP_VLAN_HWTSO; From owner-svn-src-head@freebsd.org Thu Sep 29 17:13:18 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CF66C02A93; Thu, 29 Sep 2016 17:13:18 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FF1B9B8; Thu, 29 Sep 2016 17:13:18 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8THDHJN098179; Thu, 29 Sep 2016 17:13:17 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8THDHjI098178; Thu, 29 Sep 2016 17:13:17 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609291713.u8THDHjI098178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 29 Sep 2016 17:13:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306455 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 17:13:18 -0000 Author: andrew Date: Thu Sep 29 17:13:17 2016 New Revision: 306455 URL: https://svnweb.freebsd.org/changeset/base/306455 Log: Use SV_ABI_ERRNO to set the syscall return value. The Linuxulator will need this. Submitted by: Grégory Soutadé Differential Revision: https://reviews.freebsd.org/D7976 Modified: head/sys/arm/arm/vm_machdep.c Modified: head/sys/arm/arm/vm_machdep.c ============================================================================== --- head/sys/arm/arm/vm_machdep.c Thu Sep 29 16:36:32 2016 (r306454) +++ head/sys/arm/arm/vm_machdep.c Thu Sep 29 17:13:17 2016 (r306455) @@ -220,7 +220,7 @@ cpu_set_syscall_retval(struct thread *td /* nothing to do */ break; default: - frame->tf_r0 = error; + frame->tf_r0 = SV_ABI_ERRNO(td->td_proc, error); frame->tf_spsr |= PSR_C; /* carry bit */ break; } From owner-svn-src-head@freebsd.org Thu Sep 29 17:48:54 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 750C4C022A3; Thu, 29 Sep 2016 17:48:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38424B77; Thu, 29 Sep 2016 17:48:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8THmrXh009685; Thu, 29 Sep 2016 17:48:53 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8THmrLq009684; Thu, 29 Sep 2016 17:48:53 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201609291748.u8THmrLq009684@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 29 Sep 2016 17:48:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306456 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 17:48:54 -0000 Author: mav Date: Thu Sep 29 17:48:53 2016 New Revision: 306456 URL: https://svnweb.freebsd.org/changeset/base/306456 Log: Add #ifdef _KERNEL around send_holes_without_birth_time sysctl. Reported by: avg@ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Thu Sep 29 17:13:17 2016 (r306455) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Thu Sep 29 17:48:53 2016 (r306456) @@ -42,9 +42,11 @@ int32_t zfs_pd_bytes_max = 50 * 1024 * 1024; /* 50MB */ boolean_t send_holes_without_birth_time = B_TRUE; +#ifdef _KERNEL SYSCTL_DECL(_vfs_zfs); SYSCTL_UINT(_vfs_zfs, OID_AUTO, send_holes_without_birth_time, CTLFLAG_RWTUN, &send_holes_without_birth_time, 0, "Send holes without birth time"); +#endif typedef struct prefetch_data { kmutex_t pd_mtx; From owner-svn-src-head@freebsd.org Thu Sep 29 18:24:31 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2B1CC02B5A; Thu, 29 Sep 2016 18:24:31 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CEFDA9; Thu, 29 Sep 2016 18:24:31 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TIOUD2024394; Thu, 29 Sep 2016 18:24:30 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TIOUsD024385; Thu, 29 Sep 2016 18:24:30 GMT (envelope-from des@FreeBSD.org) Message-Id: <201609291824.u8TIOUsD024385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Thu, 29 Sep 2016 18:24:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306457 - in head/contrib/unbound: . compat contrib daemon dns64 doc iterator libunbound services sldns smallapp util util/storage validator X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 18:24:31 -0000 Author: des Date: Thu Sep 29 18:24:29 2016 New Revision: 306457 URL: https://svnweb.freebsd.org/changeset/base/306457 Log: Upgrade to Unbound 1.5.10. Added: head/contrib/unbound/contrib/ - copied from r306382, vendor/unbound/dist/contrib/ Modified: head/contrib/unbound/Makefile.in head/contrib/unbound/acx_python.m4 head/contrib/unbound/compat/arc4random.c head/contrib/unbound/compat/getentropy_linux.c head/contrib/unbound/config.h head/contrib/unbound/config.h.in head/contrib/unbound/configure head/contrib/unbound/configure.ac head/contrib/unbound/daemon/acl_list.c head/contrib/unbound/daemon/acl_list.h head/contrib/unbound/daemon/daemon.c head/contrib/unbound/daemon/remote.c head/contrib/unbound/daemon/remote.h head/contrib/unbound/daemon/unbound.c head/contrib/unbound/daemon/worker.c head/contrib/unbound/dns64/dns64.c head/contrib/unbound/doc/Changelog head/contrib/unbound/doc/README head/contrib/unbound/doc/example.conf head/contrib/unbound/doc/example.conf.in head/contrib/unbound/doc/libunbound.3 head/contrib/unbound/doc/libunbound.3.in head/contrib/unbound/doc/unbound-anchor.8 head/contrib/unbound/doc/unbound-anchor.8.in head/contrib/unbound/doc/unbound-checkconf.8 head/contrib/unbound/doc/unbound-checkconf.8.in head/contrib/unbound/doc/unbound-control.8 head/contrib/unbound/doc/unbound-control.8.in head/contrib/unbound/doc/unbound-host.1 head/contrib/unbound/doc/unbound-host.1.in head/contrib/unbound/doc/unbound.8 head/contrib/unbound/doc/unbound.8.in head/contrib/unbound/doc/unbound.conf.5 head/contrib/unbound/doc/unbound.conf.5.in head/contrib/unbound/doc/unbound.doxygen head/contrib/unbound/iterator/iter_hints.c head/contrib/unbound/iterator/iter_utils.c head/contrib/unbound/iterator/iterator.c head/contrib/unbound/iterator/iterator.h head/contrib/unbound/libunbound/libworker.c head/contrib/unbound/services/listen_dnsport.c head/contrib/unbound/services/localzone.c head/contrib/unbound/services/localzone.h head/contrib/unbound/services/mesh.c head/contrib/unbound/services/outside_network.c head/contrib/unbound/services/outside_network.h head/contrib/unbound/sldns/keyraw.c head/contrib/unbound/sldns/rrdef.h head/contrib/unbound/sldns/wire2str.h head/contrib/unbound/smallapp/unbound-anchor.c head/contrib/unbound/smallapp/unbound-checkconf.c head/contrib/unbound/smallapp/unbound-control.c head/contrib/unbound/smallapp/unbound-host.c head/contrib/unbound/smallapp/worker_cb.c head/contrib/unbound/util/alloc.c head/contrib/unbound/util/config_file.c head/contrib/unbound/util/config_file.h head/contrib/unbound/util/configlexer.lex head/contrib/unbound/util/configparser.y head/contrib/unbound/util/iana_ports.inc head/contrib/unbound/util/net_help.c head/contrib/unbound/util/netevent.c head/contrib/unbound/util/netevent.h head/contrib/unbound/util/storage/dnstree.c head/contrib/unbound/util/storage/dnstree.h head/contrib/unbound/util/storage/lookup3.c head/contrib/unbound/util/ub_event.c head/contrib/unbound/util/ub_event_pluggable.c head/contrib/unbound/util/winsock_event.c head/contrib/unbound/validator/autotrust.c head/contrib/unbound/validator/val_secalgo.c head/contrib/unbound/validator/val_sigcrypt.c head/contrib/unbound/validator/validator.c Directory Properties: head/contrib/unbound/ (props changed) Modified: head/contrib/unbound/Makefile.in ============================================================================== --- head/contrib/unbound/Makefile.in Thu Sep 29 17:48:53 2016 (r306456) +++ head/contrib/unbound/Makefile.in Thu Sep 29 18:24:29 2016 (r306457) @@ -81,7 +81,7 @@ LINTFLAGS+=@NETBSD_LINTFLAGS@ # compat with OpenBSD LINTFLAGS+="-Dsigset_t=long" # FreeBSD -LINTFLAGS+="-D__uint16_t=uint16_t" "-DEVP_PKEY_ASN1_METHOD=int" "-D_RuneLocale=int" "-D__va_list=va_list" +LINTFLAGS+="-D__uint16_t=uint16_t" "-DEVP_PKEY_ASN1_METHOD=int" "-D_RuneLocale=int" "-D__va_list=va_list" "-D__uint32_t=uint32_t" INSTALL=$(SHELL) $(srcdir)/install-sh @@ -228,7 +228,7 @@ SVCUNINST_OBJ_LINK=$(SVCUNINST_OBJ) w_in $(COMPAT_OBJ_WITHOUT_CTIMEARC4) ANCHORUPD_SRC=winrc/anchor-update.c ANCHORUPD_OBJ=anchor-update.lo -ANCHORUPD_OBJ_LINK=$(ANCHORUPD_OBJ) rsrc_anchorupd.o $(COMPAT_OBJ_WITHOUT_CTIMEARC4) +ANCHORUPD_OBJ_LINK=$(ANCHORUPD_OBJ) rsrc_anchorupd.o $(COMPAT_OBJ_WITHOUT_CTIMEARC4) wire2str.lo str2wire.lo parseutil.lo sbuffer.lo rrdef.lo keyraw.lo parse.lo RSRC_OBJ=rsrc_svcinst.o rsrc_svcuninst.o rsrc_anchorupd.o rsrc_unbound.o \ rsrc_unbound_host.o rsrc_unbound_anchor.o rsrc_unbound_control.o \ rsrc_unbound_checkconf.o @@ -704,11 +704,12 @@ listen_dnsport.lo listen_dnsport.o: $(sr $(srcdir)/util/rbtree.h $(srcdir)/util/log.h $(srcdir)/util/config_file.h \ $(srcdir)/util/net_help.h $(srcdir)/sldns/sbuffer.h localzone.lo localzone.o: $(srcdir)/services/localzone.c config.h $(srcdir)/services/localzone.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/sldns/sbuffer.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/util/as112.h + $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/regional.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/util/as112.h mesh.lo mesh.o: $(srcdir)/services/mesh.c config.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/netevent.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h \ @@ -759,7 +760,7 @@ fptr_wlist.lo fptr_wlist.o: $(srcdir)/ut $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/util/mini_event.h \ $(srcdir)/util/rbtree.h $(srcdir)/services/outside_network.h \ - $(srcdir)/services/localzone.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/cache/infra.h \ $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/dns64/dns64.h \ $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h \ $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_anchor.h \ @@ -956,7 +957,8 @@ unitldns.lo unitldns.o: $(srcdir)/testco $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h acl_list.lo acl_list.o: $(srcdir)/daemon/acl_list.c config.h $(srcdir)/daemon/acl_list.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/regional.h $(srcdir)/util/log.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/services/localzone.h $(srcdir)/util/locks.h \ + $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h cachedump.lo cachedump.o: $(srcdir)/daemon/cachedump.c config.h $(srcdir)/daemon/cachedump.h \ $(srcdir)/daemon/remote.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ @@ -1063,7 +1065,8 @@ worker.lo worker.o: $(srcdir)/daemon/wor $(srcdir)/libunbound/libworker.h acl_list.lo acl_list.o: $(srcdir)/daemon/acl_list.c config.h $(srcdir)/daemon/acl_list.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/regional.h $(srcdir)/util/log.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/services/localzone.h $(srcdir)/util/locks.h \ + $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ @@ -1134,8 +1137,8 @@ context.lo context.o: $(srcdir)/libunbou $(srcdir)/libunbound/unbound.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/services/localzone.h \ - $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h $(srcdir)/sldns/sbuffer.h + $(srcdir)/util/storage/dnstree.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/sldns/sbuffer.h libunbound.lo libunbound.o: $(srcdir)/libunbound/libunbound.c $(srcdir)/libunbound/unbound.h \ $(srcdir)/libunbound/unbound-event.h config.h $(srcdir)/libunbound/context.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ @@ -1143,7 +1146,7 @@ libunbound.lo libunbound.o: $(srcdir)/li $(srcdir)/util/config_file.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/regional.h \ $(srcdir)/util/random.h $(srcdir)/util/net_help.h $(srcdir)/util/tube.h $(srcdir)/util/ub_event.h \ - $(srcdir)/services/localzone.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/cache/infra.h \ $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/sldns/sbuffer.h libworker.lo libworker.o: $(srcdir)/libunbound/libworker.c config.h $(srcdir)/libunbound/libworker.h \ @@ -1153,11 +1156,12 @@ libworker.lo libworker.o: $(srcdir)/libu $(srcdir)/libunbound/unbound-event.h $(srcdir)/services/outside_network.h $(srcdir)/util/netevent.h \ $(srcdir)/services/mesh.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/services/localzone.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/services/outbound_list.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/regional.h \ - $(srcdir)/util/random.h $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgencode.h $(srcdir)/iterator/iter_fwd.h \ - $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h $(srcdir)/sldns/str2wire.h + $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/outbound_list.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/tube.h $(srcdir)/util/regional.h $(srcdir)/util/random.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/data/msgencode.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h \ + $(srcdir)/sldns/str2wire.h unbound-host.lo unbound-host.o: $(srcdir)/smallapp/unbound-host.c config.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h asynclook.lo asynclook.o: $(srcdir)/testcode/asynclook.c config.h $(srcdir)/libunbound/unbound.h \ @@ -1225,7 +1229,6 @@ snprintf.lo snprintf.o: $(srcdir)/compat strlcat.lo strlcat.o: $(srcdir)/compat/strlcat.c config.h strlcpy.lo strlcpy.o: $(srcdir)/compat/strlcpy.c config.h strptime.lo strptime.o: $(srcdir)/compat/strptime.c config.h -strsep.lo strsep.o: $(srcdir)/compat/strsep.c config.h getentropy_linux.lo getentropy_linux.o: $(srcdir)/compat/getentropy_linux.c config.h getentropy_osx.lo getentropy_osx.o: $(srcdir)/compat/getentropy_osx.c config.h getentropy_solaris.lo getentropy_solaris.o: $(srcdir)/compat/getentropy_solaris.c config.h @@ -1237,3 +1240,4 @@ arc4_lock.lo arc4_lock.o: $(srcdir)/comp sha512.lo sha512.o: $(srcdir)/compat/sha512.c config.h reallocarray.lo reallocarray.o: $(srcdir)/compat/reallocarray.c config.h isblank.lo isblank.o: $(srcdir)/compat/isblank.c config.h +strsep.lo strsep.o: $(srcdir)/compat/strsep.c config.h Modified: head/contrib/unbound/acx_python.m4 ============================================================================== --- head/contrib/unbound/acx_python.m4 Thu Sep 29 17:48:53 2016 (r306456) +++ head/contrib/unbound/acx_python.m4 Thu Sep 29 18:24:29 2016 (r306457) @@ -54,7 +54,7 @@ $ac_distutils_result]) AC_MSG_CHECKING([for Python library path]) if test -z "$PYTHON_LDFLAGS"; then PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \ - print(get_config_var('BLDLIBRARY'));"` + print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"` fi AC_MSG_RESULT([$PYTHON_LDFLAGS]) AC_SUBST([PYTHON_LDFLAGS]) Modified: head/contrib/unbound/compat/arc4random.c ============================================================================== --- head/contrib/unbound/compat/arc4random.c Thu Sep 29 17:48:53 2016 (r306456) +++ head/contrib/unbound/compat/arc4random.c Thu Sep 29 18:24:29 2016 (r306457) @@ -48,6 +48,9 @@ #else /* !__GNUC__ */ #define inline #endif /* !__GNUC__ */ +#ifndef MAP_ANON +#define MAP_ANON MAP_ANONYMOUS +#endif #define KEYSZ 32 #define IVSZ 8 Modified: head/contrib/unbound/compat/getentropy_linux.c ============================================================================== --- head/contrib/unbound/compat/getentropy_linux.c Thu Sep 29 17:48:53 2016 (r306456) +++ head/contrib/unbound/compat/getentropy_linux.c Thu Sep 29 18:24:29 2016 (r306457) @@ -60,6 +60,9 @@ #include #endif #include +#ifndef MAP_ANON +#define MAP_ANON MAP_ANONYMOUS +#endif #define REPEAT 5 #define min(a, b) (((a) < (b)) ? (a) : (b)) Modified: head/contrib/unbound/config.h ============================================================================== --- head/contrib/unbound/config.h Thu Sep 29 17:48:53 2016 (r306456) +++ head/contrib/unbound/config.h Thu Sep 29 18:24:29 2016 (r306457) @@ -52,6 +52,9 @@ /* Define to 1 if you have the `chroot' function. */ #define HAVE_CHROOT 1 +/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */ +#define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1 + /* Define to 1 if you have the `ctime_r' function. */ #define HAVE_CTIME_R 1 @@ -111,9 +114,18 @@ /* Define to 1 if you have the `endprotoent' function. */ #define HAVE_ENDPROTOENT 1 +/* Define to 1 if you have the `endpwent' function. */ +#define HAVE_ENDPWENT 1 + /* Define to 1 if you have the `endservent' function. */ #define HAVE_ENDSERVENT 1 +/* Define to 1 if you have the `ERR_free_strings' function. */ +#define HAVE_ERR_FREE_STRINGS 1 + +/* Define to 1 if you have the `ERR_load_crypto_strings' function. */ +#define HAVE_ERR_LOAD_CRYPTO_STRINGS 1 + /* Define to 1 if you have the `event_base_free' function. */ /* #undef HAVE_EVENT_BASE_FREE */ @@ -129,6 +141,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_EVENT_H */ +/* Define to 1 if you have the `EVP_cleanup' function. */ +#define HAVE_EVP_CLEANUP 1 + /* Define to 1 if you have the `EVP_MD_CTX_new' function. */ /* #undef HAVE_EVP_MD_CTX_NEW */ @@ -255,24 +270,48 @@ /* Use libnettle for crypto */ /* #undef HAVE_NETTLE */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETTLE_DSA_COMPAT_H */ + /* Use libnss for crypto */ /* #undef HAVE_NSS */ +/* Define to 1 if you have the `OpenSSL_add_all_digests' function. */ +#define HAVE_OPENSSL_ADD_ALL_DIGESTS 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_BN_H 1 + /* Define to 1 if you have the `OPENSSL_config' function. */ #define HAVE_OPENSSL_CONFIG 1 /* Define to 1 if you have the header file. */ #define HAVE_OPENSSL_CONF_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_DH_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_DSA_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_OPENSSL_ENGINE_H 1 /* Define to 1 if you have the header file. */ #define HAVE_OPENSSL_ERR_H 1 +/* Define to 1 if you have the `OPENSSL_init_crypto' function. */ +/* #undef HAVE_OPENSSL_INIT_CRYPTO */ + +/* Define to 1 if you have the `OPENSSL_init_ssl' function. */ +/* #undef HAVE_OPENSSL_INIT_SSL */ + /* Define to 1 if you have the header file. */ #define HAVE_OPENSSL_RAND_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_RSA_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_OPENSSL_SSL_H 1 @@ -297,6 +336,9 @@ /* Define to 1 if you have the `random' function. */ #define HAVE_RANDOM 1 +/* Define to 1 if you have the `RAND_cleanup' function. */ +#define HAVE_RAND_CLEANUP 1 + /* Define to 1 if you have the `reallocarray' function. */ #define HAVE_REALLOCARRAY 1 @@ -524,7 +566,7 @@ #define PACKAGE_NAME "unbound" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "unbound 1.5.9" +#define PACKAGE_STRING "unbound 1.5.10" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "unbound" @@ -533,7 +575,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.5.9" +#define PACKAGE_VERSION "1.5.10" /* default pidfile location */ #define PIDFILE "/var/unbound/unbound.pid" @@ -552,7 +594,7 @@ #define ROOT_CERT_FILE "/var/unbound/icannbundle.pem" /* version number for resource files */ -#define RSRC_PACKAGE_VERSION 1,5,9,0 +#define RSRC_PACKAGE_VERSION 1,5,10,0 /* Directory to chdir to */ #define RUN_DIR "/var/unbound" @@ -611,6 +653,12 @@ /* Define if you want to use internal select based events */ #define USE_MINI_EVENT 1 +/* Define this to enable client TCP Fast Open. */ +/* #undef USE_MSG_FASTOPEN */ + +/* Define this to enable client TCP Fast Open. */ +/* #undef USE_OSX_MSG_FASTOPEN */ + /* Define this to enable SHA256 and SHA512 support. */ #define USE_SHA2 1 @@ -636,6 +684,9 @@ #endif +/* Define this to enable server TCP Fast Open. */ +/* #undef USE_TCP_FASTOPEN */ + /* Whether the windows socket API is used */ /* #undef USE_WINSOCK */ Modified: head/contrib/unbound/config.h.in ============================================================================== --- head/contrib/unbound/config.h.in Thu Sep 29 17:48:53 2016 (r306456) +++ head/contrib/unbound/config.h.in Thu Sep 29 18:24:29 2016 (r306457) @@ -51,6 +51,9 @@ /* Define to 1 if you have the `chroot' function. */ #undef HAVE_CHROOT +/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */ +#undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA + /* Define to 1 if you have the `ctime_r' function. */ #undef HAVE_CTIME_R @@ -110,9 +113,18 @@ /* Define to 1 if you have the `endprotoent' function. */ #undef HAVE_ENDPROTOENT +/* Define to 1 if you have the `endpwent' function. */ +#undef HAVE_ENDPWENT + /* Define to 1 if you have the `endservent' function. */ #undef HAVE_ENDSERVENT +/* Define to 1 if you have the `ERR_free_strings' function. */ +#undef HAVE_ERR_FREE_STRINGS + +/* Define to 1 if you have the `ERR_load_crypto_strings' function. */ +#undef HAVE_ERR_LOAD_CRYPTO_STRINGS + /* Define to 1 if you have the `event_base_free' function. */ #undef HAVE_EVENT_BASE_FREE @@ -128,6 +140,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_EVENT_H +/* Define to 1 if you have the `EVP_cleanup' function. */ +#undef HAVE_EVP_CLEANUP + /* Define to 1 if you have the `EVP_MD_CTX_new' function. */ #undef HAVE_EVP_MD_CTX_NEW @@ -254,24 +269,48 @@ /* Use libnettle for crypto */ #undef HAVE_NETTLE +/* Define to 1 if you have the header file. */ +#undef HAVE_NETTLE_DSA_COMPAT_H + /* Use libnss for crypto */ #undef HAVE_NSS +/* Define to 1 if you have the `OpenSSL_add_all_digests' function. */ +#undef HAVE_OPENSSL_ADD_ALL_DIGESTS + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_BN_H + /* Define to 1 if you have the `OPENSSL_config' function. */ #undef HAVE_OPENSSL_CONFIG /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_CONF_H +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_DH_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_DSA_H + /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_ENGINE_H /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_ERR_H +/* Define to 1 if you have the `OPENSSL_init_crypto' function. */ +#undef HAVE_OPENSSL_INIT_CRYPTO + +/* Define to 1 if you have the `OPENSSL_init_ssl' function. */ +#undef HAVE_OPENSSL_INIT_SSL + /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_RAND_H +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_RSA_H + /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_SSL_H @@ -296,6 +335,9 @@ /* Define to 1 if you have the `random' function. */ #undef HAVE_RANDOM +/* Define to 1 if you have the `RAND_cleanup' function. */ +#undef HAVE_RAND_CLEANUP + /* Define to 1 if you have the `reallocarray' function. */ #undef HAVE_REALLOCARRAY @@ -610,6 +652,12 @@ /* Define if you want to use internal select based events */ #undef USE_MINI_EVENT +/* Define this to enable client TCP Fast Open. */ +#undef USE_MSG_FASTOPEN + +/* Define this to enable client TCP Fast Open. */ +#undef USE_OSX_MSG_FASTOPEN + /* Define this to enable SHA256 and SHA512 support. */ #undef USE_SHA2 @@ -635,6 +683,9 @@ #endif +/* Define this to enable server TCP Fast Open. */ +#undef USE_TCP_FASTOPEN + /* Whether the windows socket API is used */ #undef USE_WINSOCK Modified: head/contrib/unbound/configure ============================================================================== --- head/contrib/unbound/configure Thu Sep 29 17:48:53 2016 (r306456) +++ head/contrib/unbound/configure Thu Sep 29 18:24:29 2016 (r306457) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for unbound 1.5.9. +# Generated by GNU Autoconf 2.69 for unbound 1.5.10. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='unbound' PACKAGE_TARNAME='unbound' -PACKAGE_VERSION='1.5.9' -PACKAGE_STRING='unbound 1.5.9' +PACKAGE_VERSION='1.5.10' +PACKAGE_STRING='unbound 1.5.10' PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl' PACKAGE_URL='' @@ -834,6 +834,8 @@ enable_gost enable_ecdsa enable_dsa enable_event_api +enable_tfo_client +enable_tfo_server with_libevent with_libexpat enable_static_exe @@ -1399,7 +1401,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures unbound 1.5.9 to adapt to many kinds of systems. +\`configure' configures unbound 1.5.10 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1464,7 +1466,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of unbound 1.5.9:";; + short | recursive ) echo "Configuration of unbound 1.5.10:";; esac cat <<\_ACEOF @@ -1500,6 +1502,8 @@ Optional Features: --disable-dsa Disable DSA support --enable-event-api Enable (experimental) pluggable event base libunbound API installed to unbound-event.h + --enable-tfo-client Enable TCP Fast Open for client mode + --enable-tfo-server Enable TCP Fast Open for server mode --enable-static-exe enable to compile executables statically against (event) libs, for debug purposes --enable-lock-checks enable to check lock and unlock calls, for debug @@ -1652,7 +1656,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -unbound configure 1.5.9 +unbound configure 1.5.10 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2361,7 +2365,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by unbound $as_me 1.5.9, which was +It was created by unbound $as_me 1.5.10, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2713,11 +2717,11 @@ UNBOUND_VERSION_MAJOR=1 UNBOUND_VERSION_MINOR=5 -UNBOUND_VERSION_MICRO=9 +UNBOUND_VERSION_MICRO=10 LIBUNBOUND_CURRENT=6 -LIBUNBOUND_REVISION=1 +LIBUNBOUND_REVISION=2 LIBUNBOUND_AGE=4 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -2766,6 +2770,7 @@ LIBUNBOUND_AGE=4 # 1.5.7 had 5:10:3 # 1.5.8 had 6:0:4 # adds ub_ctx_set_stub # 1.5.9 had 6:1:4 +# 1.5.10 had 6:2:4 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -4054,7 +4059,7 @@ esac # are we on MinGW? if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes" else - if echo $target | grep mingw32 >/dev/null; then on_mingw="yes" + if echo $host $target | grep mingw32 >/dev/null; then on_mingw="yes" else on_mingw="no"; fi fi @@ -4064,7 +4069,7 @@ fi if test $on_mingw = "no"; then ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"` else - ub_conf_file="C:\\Program Files\\Unbound\\service.conf" + ub_conf_file="C:\\Program Files (x86)\\Unbound\\service.conf" fi # Check whether --with-conf_file was given. @@ -4195,7 +4200,7 @@ else if test $on_mingw = no; then UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key" else - UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key" + UNBOUND_ROOTKEY_FILE="C:\\Program Files (x86)\\Unbound\\root.key" fi fi @@ -4217,7 +4222,7 @@ else if test $on_mingw = no; then UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem" else - UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem" + UNBOUND_ROOTCERT_FILE="C:\\Program Files (x86)\\Unbound\\icannbundle.pem" fi fi @@ -16714,7 +16719,7 @@ $as_echo "$PYTHON_CPPFLAGS" >&6; } $as_echo_n "checking for Python library path... " >&6; } if test -z "$PYTHON_LDFLAGS"; then PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \ - print(get_config_var('BLDLIBRARY'));"` + print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5 $as_echo "$PYTHON_LDFLAGS" >&6; } @@ -17033,6 +17038,19 @@ if test "${with_nettle+set}" = set; then $as_echo "#define HAVE_NETTLE 1" >>confdefs.h + for ac_header in nettle/dsa-compat.h +do : + ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default +" +if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NETTLE_DSA_COMPAT_H 1 +_ACEOF + +fi + +done + if test "$withval" != "" -a "$withval" != "yes"; then CPPFLAGS="$CPPFLAGS -I$withval/include/nettle" LDFLAGS="$LDFLAGS -L$withval/lib" @@ -17397,6 +17415,47 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext SSLLIB="-lssl" + +# check if -lcrypt32 is needed because CAPIENG needs that. (on windows) +BAKLIBS="$LIBS" +LIBS="-lssl $LIBS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5 +$as_echo_n "checking if libssl needs -lcrypt32... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char HMAC_Update (); +int +main () +{ +return HMAC_Update (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + LIBS="$BAKLIBS" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + LIBS="$BAKLIBS" + LIBS="$LIBS -lcrypt32" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5 $as_echo_n "checking for LibreSSL... " >&6; } if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then @@ -17462,44 +17521,49 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -for ac_header in openssl/conf.h +for ac_header in openssl/conf.h openssl/engine.h openssl/bn.h openssl/dh.h openssl/dsa.h openssl/rsa.h do : - ac_fn_c_check_header_compile "$LINENO" "openssl/conf.h" "ac_cv_header_openssl_conf_h" "$ac_includes_default + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -if test "x$ac_cv_header_openssl_conf_h" = xyes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_OPENSSL_CONF_H 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done -for ac_header in openssl/engine.h +for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup do : - ac_fn_c_check_header_compile "$LINENO" "openssl/engine.h" "ac_cv_header_openssl_engine_h" "$ac_includes_default -" -if test "x$ac_cv_header_openssl_engine_h" = xyes; then : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_OPENSSL_ENGINE_H 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi - done -for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new + +# these check_funcs need -lssl +BAKLIBS="$LIBS" +LIBS="-lssl $LIBS" +for ac_func in OPENSSL_init_ssl do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + ac_fn_c_check_func "$LINENO" "OPENSSL_init_ssl" "ac_cv_func_OPENSSL_init_ssl" +if test "x$ac_cv_func_OPENSSL_init_ssl" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_OPENSSL_INIT_SSL 1 _ACEOF fi done +LIBS="$BAKLIBS" + ac_fn_c_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" " $ac_includes_default #ifdef HAVE_OPENSSL_ERR_H @@ -17900,6 +17964,82 @@ case "$enable_event_api" in ;; esac +# Check whether --enable-tfo-client was given. +if test "${enable_tfo_client+set}" = set; then : + enableval=$enable_tfo_client; +fi + +case "$enable_tfo_client" in + yes) + case `uname` in + Linux) ac_fn_c_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default +#include + +" +if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5 +$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;} +else + as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5 +fi + + +cat >>confdefs.h <<_ACEOF +#define USE_MSG_FASTOPEN 1 +_ACEOF + + ;; + Darwin) ac_fn_c_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default +#include + +" +if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5 +$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;} +else + as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5 +fi + + +cat >>confdefs.h <<_ACEOF +#define USE_OSX_MSG_FASTOPEN 1 +_ACEOF + + ;; + esac + ;; + no|*) + ;; +esac + +# Check whether --enable-tfo-server was given. +if test "${enable_tfo_server+set}" = set; then : + enableval=$enable_tfo_server; +fi + +case "$enable_tfo_server" in + yes) + ac_fn_c_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default +#include + +" +if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&5 +$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;} +else + as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5 +fi + + +cat >>confdefs.h <<_ACEOF +#define USE_TCP_FASTOPEN 1 +_ACEOF + + ;; + no|*) + ;; +esac + # check for libevent # Check whether --with-libevent was given. @@ -18314,10 +18454,8 @@ if test x_$enable_static_exe = x_yes; th staticexe="-static" if test "$on_mingw" = yes; then staticexe="-all-static" - # for static crosscompile, include gdi32 and zlib here. - if test "`uname`" = "Linux"; then - LIBS="$LIBS -lgdi32 -lz" - fi + # for static compile, include gdi32 and zlib here. + LIBS="$LIBS -lgdi32 -lz" fi fi @@ -18762,7 +18900,7 @@ if test "$ac_res" != no; then : fi -for ac_func in tzset sigprocmask fcntl getpwnam getrlimit setrlimit setsid chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent fsync +for ac_func in tzset sigprocmask fcntl getpwnam endpwent getrlimit setrlimit setsid chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent fsync do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -19801,12 +19939,12 @@ _ACEOF -version=1.5.9 +version=1.5.10 date=`date +'%b %e, %Y'` -ac_config_files="$ac_config_files Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8 doc/unbound-host.1 smallapp/unbound-control-setup.sh dnstap/dnstap_config.h" +ac_config_files="$ac_config_files Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8 doc/unbound-host.1 smallapp/unbound-control-setup.sh dnstap/dnstap_config.h contrib/libunbound.pc" ac_config_headers="$ac_config_headers config.h" @@ -20316,7 +20454,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by unbound $as_me 1.5.9, which was +This file was extended by unbound $as_me 1.5.10, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20382,7 +20520,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -unbound config.status 1.5.9 +unbound config.status 1.5.10 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -20804,6 +20942,7 @@ do "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;; "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;; "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;; + "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; Modified: head/contrib/unbound/configure.ac ============================================================================== --- head/contrib/unbound/configure.ac Thu Sep 29 17:48:53 2016 (r306456) +++ head/contrib/unbound/configure.ac Thu Sep 29 18:24:29 2016 (r306457) @@ -10,14 +10,14 @@ sinclude(dnstap/dnstap.m4) # must be numbers. ac_defun because of later processing m4_define([VERSION_MAJOR],[1]) m4_define([VERSION_MINOR],[5]) -m4_define([VERSION_MICRO],[9]) +m4_define([VERSION_MICRO],[10]) AC_INIT(unbound, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), unbound-bugs@nlnetlabs.nl, unbound) AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR]) AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR]) AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO]) LIBUNBOUND_CURRENT=6 -LIBUNBOUND_REVISION=1 +LIBUNBOUND_REVISION=2 LIBUNBOUND_AGE=4 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -66,6 +66,7 @@ LIBUNBOUND_AGE=4 # 1.5.7 had 5:10:3 # 1.5.8 had 6:0:4 # adds ub_ctx_set_stub # 1.5.9 had 6:1:4 +# 1.5.10 had 6:2:4 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -107,7 +108,7 @@ esac # are we on MinGW? if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes" else - if echo $target | grep mingw32 >/dev/null; then on_mingw="yes" + if echo $host $target | grep mingw32 >/dev/null; then on_mingw="yes" else on_mingw="no"; fi fi @@ -117,7 +118,7 @@ fi if test $on_mingw = "no"; then ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"` else - ub_conf_file="C:\\Program Files\\Unbound\\service.conf" + ub_conf_file="C:\\Program Files (x86)\\Unbound\\service.conf" fi AC_ARG_WITH([conf_file], AC_HELP_STRING([--with-conf-file=path], @@ -187,7 +188,7 @@ AC_ARG_WITH(rootkey-file, if test $on_mingw = no; then UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key" else - UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key" + UNBOUND_ROOTKEY_FILE="C:\\Program Files (x86)\\Unbound\\root.key" fi ) AC_SUBST(UNBOUND_ROOTKEY_FILE) @@ -201,7 +202,7 @@ AC_ARG_WITH(rootcert-file, if test $on_mingw = no; then UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem" else - UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem" + UNBOUND_ROOTCERT_FILE="C:\\Program Files (x86)\\Unbound\\icannbundle.pem" fi ) AC_SUBST(UNBOUND_ROOTCERT_FILE) @@ -629,6 +630,7 @@ AC_ARG_WITH([nettle], AC_HELP_STRING([-- [ USE_NETTLE="yes" AC_DEFINE(HAVE_NETTLE, 1, [Use libnettle for crypto]) + AC_CHECK_HEADERS([nettle/dsa-compat.h],,, [AC_INCLUDES_DEFAULT]) if test "$withval" != "" -a "$withval" != "yes"; then CPPFLAGS="$CPPFLAGS -I$withval/include/nettle" LDFLAGS="$LDFLAGS -L$withval/lib" @@ -646,6 +648,20 @@ if test $USE_NSS = "no" -a $USE_NETTLE = ACX_WITH_SSL ACX_LIB_SSL SSLLIB="-lssl" + +# check if -lcrypt32 is needed because CAPIENG needs that. (on windows) +BAKLIBS="$LIBS" +LIBS="-lssl $LIBS" +AC_MSG_CHECKING([if libssl needs -lcrypt32]) +AC_TRY_LINK_FUNC([HMAC_Update], [ + AC_MSG_RESULT([no]) + LIBS="$BAKLIBS" +], [ + AC_MSG_RESULT([yes]) + LIBS="$BAKLIBS" + LIBS="$LIBS -lcrypt32" +]) + AC_MSG_CHECKING([for LibreSSL]) if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then AC_MSG_RESULT([yes]) @@ -656,9 +672,15 @@ if grep VERSION_TEXT $ssldir/include/ope else AC_MSG_RESULT([no]) fi -AC_CHECK_HEADERS([openssl/conf.h],,, [AC_INCLUDES_DEFAULT]) -AC_CHECK_HEADERS([openssl/engine.h],,, [AC_INCLUDES_DEFAULT]) -AC_CHECK_FUNCS([OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new]) +AC_CHECK_HEADERS([openssl/conf.h openssl/engine.h openssl/bn.h openssl/dh.h openssl/dsa.h openssl/rsa.h],,, [AC_INCLUDES_DEFAULT]) +AC_CHECK_FUNCS([OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup]) + +# these check_funcs need -lssl +BAKLIBS="$LIBS" +LIBS="-lssl $LIBS" +AC_CHECK_FUNCS([OPENSSL_init_ssl]) +LIBS="$BAKLIBS" + AC_CHECK_DECLS([SSL_COMP_get_compression_methods,sk_SSL_COMP_pop_free,SSL_CTX_set_ecdh_auto], [], [], [ AC_INCLUDES_DEFAULT #ifdef HAVE_OPENSSL_ERR_H @@ -865,6 +887,42 @@ case "$enable_event_api" in ;; esac +AC_ARG_ENABLE(tfo-client, AC_HELP_STRING([--enable-tfo-client], [Enable TCP Fast Open for client mode])) +case "$enable_tfo_client" in + yes) + case `uname` in + Linux) AC_CHECK_DECL([MSG_FASTOPEN], [AC_MSG_WARN([Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO])], + [AC_MSG_ERROR([TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client])], + [AC_INCLUDES_DEFAULT +#include +]) + AC_DEFINE_UNQUOTED([USE_MSG_FASTOPEN], [1], [Define this to enable client TCP Fast Open.]) + ;; + Darwin) AC_CHECK_DECL([CONNECT_RESUME_ON_READ_WRITE], [AC_MSG_WARN([Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO])], + [AC_MSG_ERROR([TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client])], + [AC_INCLUDES_DEFAULT +#include +]) + AC_DEFINE_UNQUOTED([USE_OSX_MSG_FASTOPEN], [1], [Define this to enable client TCP Fast Open.]) + ;; + esac + ;; + no|*) + ;; +esac + +AC_ARG_ENABLE(tfo-server, AC_HELP_STRING([--enable-tfo-server], [Enable TCP Fast Open for server mode])) +case "$enable_tfo_server" in + yes) + AC_CHECK_DECL([TCP_FASTOPEN], [AC_MSG_WARN([Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO])], [AC_MSG_ERROR([TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server])], [AC_INCLUDES_DEFAULT +#include + ]) + AC_DEFINE_UNQUOTED([USE_TCP_FASTOPEN], [1], [Define this to enable server TCP Fast Open.]) + ;; + no|*) + ;; +esac + # check for libevent AC_ARG_WITH(libevent, AC_HELP_STRING([--with-libevent=pathname], *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Sep 29 19:45:26 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24615C011AB; Thu, 29 Sep 2016 19:45:26 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE15F19D3; Thu, 29 Sep 2016 19:45:25 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TJjPAY055097; Thu, 29 Sep 2016 19:45:25 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TJjP4W055096; Thu, 29 Sep 2016 19:45:25 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201609291945.u8TJjP4W055096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Thu, 29 Sep 2016 19:45:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306458 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 19:45:26 -0000 Author: lidl Date: Thu Sep 29 19:45:24 2016 New Revision: 306458 URL: https://svnweb.freebsd.org/changeset/base/306458 Log: Properly preserve ip_tos bits for IPv4 packets Restructure code slightly to save ip_tos bits earlier. Fix the bug where the ip_tos field is zeroed out before assigning to the iptos variable. Restore the ip_tos and ip_ver fields only if they have been zeroed during the pseudo-header checksum calculation. Reviewed by: cem, gnn, hiren MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D8053 Modified: head/sys/netinet/tcp_input.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Thu Sep 29 18:24:29 2016 (r306457) +++ head/sys/netinet/tcp_input.c Thu Sep 29 19:45:24 2016 (r306458) @@ -603,7 +603,7 @@ tcp_input(struct mbuf **mp, int *offp, i #ifdef TCP_SIGNATURE uint8_t sig_checked = 0; #endif - uint8_t iptos = 0; + uint8_t iptos; struct m_tag *fwd_tag = NULL; #ifdef INET6 struct ip6_hdr *ip6 = NULL; @@ -675,6 +675,7 @@ tcp_input(struct mbuf **mp, int *offp, i /* XXX stat */ goto drop; } + iptos = (ntohl(ip6->ip6_flow) >> 20) & 0xff; } #endif #if defined(INET) && defined(INET6) @@ -701,6 +702,7 @@ tcp_input(struct mbuf **mp, int *offp, i th = (struct tcphdr *)((caddr_t)ip + off0); tlen = ntohs(ip->ip_len) - off0; + iptos = ip->ip_tos; if (m->m_pkthdr.csum_flags & CSUM_DATA_VALID) { if (m->m_pkthdr.csum_flags & CSUM_PSEUDO_HDR) th->th_sum = m->m_pkthdr.csum_data; @@ -721,29 +723,20 @@ tcp_input(struct mbuf **mp, int *offp, i ipov->ih_len = htons(tlen); th->th_sum = in_cksum(m, len); /* Reset length for SDT probes. */ - ip->ip_len = htons(tlen + off0); + ip->ip_len = htons(len); + /* Reset TOS bits */ + ip->ip_tos = iptos; + /* Re-initialization for later version check */ + ip->ip_v = IPVERSION; } if (th->th_sum) { TCPSTAT_INC(tcps_rcvbadsum); goto drop; } - /* Re-initialization for later version check */ - ip->ip_v = IPVERSION; } #endif /* INET */ -#ifdef INET6 - if (isipv6) - iptos = (ntohl(ip6->ip6_flow) >> 20) & 0xff; -#endif -#if defined(INET) && defined(INET6) - else -#endif -#ifdef INET - iptos = ip->ip_tos; -#endif - /* * Check that TCP offset makes sense, * pull out TCP options and adjust length. XXX From owner-svn-src-head@freebsd.org Thu Sep 29 19:57:38 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D064AC0158D; Thu, 29 Sep 2016 19:57:38 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99DC116F; Thu, 29 Sep 2016 19:57:38 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TJvbHt058989; Thu, 29 Sep 2016 19:57:37 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TJvbVh058988; Thu, 29 Sep 2016 19:57:37 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201609291957.u8TJvbVh058988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 29 Sep 2016 19:57:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306459 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 19:57:38 -0000 Author: ae Date: Thu Sep 29 19:57:37 2016 New Revision: 306459 URL: https://svnweb.freebsd.org/changeset/base/306459 Log: Fix bug introduced in r274300. In icmp6_reflect() use original source address of erroneous packet as destination address for source selection algorithm when original destination address is not one of our own. Reported by: Mark Kamichoff Tested by: Mark Kamichoff MFC after: 1 week Modified: head/sys/netinet6/icmp6.c Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Thu Sep 29 19:45:24 2016 (r306458) +++ head/sys/netinet6/icmp6.c Thu Sep 29 19:57:37 2016 (r306459) @@ -2146,7 +2146,7 @@ icmp6_reflect(struct mbuf *m, size_t off * that we do not own. Select a source address based on the * source address of the erroneous packet. */ - in6_splitscope(&ip6->ip6_dst, &dst6, &scopeid); + in6_splitscope(&ip6->ip6_src, &dst6, &scopeid); error = in6_selectsrc_addr(RT_DEFAULT_FIB, &dst6, scopeid, NULL, &src6, &hlim); From owner-svn-src-head@freebsd.org Thu Sep 29 22:01:10 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6EFAC00A2A; Thu, 29 Sep 2016 22:01:10 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A61AB16CC; Thu, 29 Sep 2016 22:01:10 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TM19gt005018; Thu, 29 Sep 2016 22:01:09 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TM19e0005017; Thu, 29 Sep 2016 22:01:09 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609292201.u8TM19e0005017@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Thu, 29 Sep 2016 22:01:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306460 - head/sys/modules/dtb/nvidia X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 22:01:10 -0000 Author: gonzo Date: Thu Sep 29 22:01:09 2016 New Revision: 306460 URL: https://svnweb.freebsd.org/changeset/base/306460 Log: Add dtb module for Jetson-TK1 board Added: head/sys/modules/dtb/nvidia/ head/sys/modules/dtb/nvidia/Makefile (contents, props changed) Added: head/sys/modules/dtb/nvidia/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/dtb/nvidia/Makefile Thu Sep 29 22:01:09 2016 (r306460) @@ -0,0 +1,6 @@ +# $FreeBSD$ +# All the dts files for Nvidia ARM systems we support. +DTS= \ + tegra124-jetson-tk1-fbsd.dts + +.include From owner-svn-src-head@freebsd.org Thu Sep 29 22:47:24 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D10AC02484; Thu, 29 Sep 2016 22:47:24 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D4F5DBE4; Thu, 29 Sep 2016 22:47:23 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-wm0-x22b.google.com with SMTP id b4so13046055wmb.0; Thu, 29 Sep 2016 15:47:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=4WkMu+4Wvn+g3cdI24ZENcuD3jPJ8YR1hxpcuV/2dpU=; b=vp67lDef7ECWLpJY4G8k0aasGZFoGT0blUI6XWKY/h9g8xbdXbSfwtfrEz1hWfsNR8 xabVbteiKT+UNx73h/nAumjHxymH6mZGo4CQ2QGhLPq/eqFcBCvDzHXAkod2vQvAu6t0 GPy5fFsjg0IMmUHJLI98Pe2iCoPbPsplLogRMrpFzzchCBla4F57XpXeWv5cgArJmUw5 oMgLTTXnWTS5mGFXh36wAH8I6eq/CsIgYm/MbATH5KDN4vHKCpM7erTzKwDeV2qIAjou bqoImHh+XFOqr6gtCWL2XhVO+P8y70MHm0jM4yVUa/2uOzu13zErhU8emmZjGCeUPT4M Pmew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=4WkMu+4Wvn+g3cdI24ZENcuD3jPJ8YR1hxpcuV/2dpU=; b=SU6JPoy3y0ZQaHglvlA5qRUde8ZJ3DQi5vS0WsI2SQ9rleGEw2eRGHw9b4xgKo9nqe j8k0zqF5DXNkVVSH6ai/rF/66jWoTK0Dj5BMatv+BCCkFxmtn2SX0UKxUp8n9WJKZ555 /mqaLC6q8O3YeC581F88gowUD2y9/X3hnszCAmUAgkVG/EvSoRZuzGciN+BnF2t5rTUX xa5x2pkgSQvsd5A9BBzOQgCZC5zHLYOa3eQYLcEtZfcS4AZG7f7c1SBimg80CidLqwNf 5AqtURJ1VPgk0esMikY2AKUyoikMnNSEQU09/Y4AP7eoA+i+NZq/wsr3p1ui+9WzruYl 4YIg== X-Gm-Message-State: AA6/9RmvafCGnR5+H4V2NTtOF8a83sqwdZji+8LE/0plPZut60VpLQcz0dAgwmRYcmWtkdMnx5elELr+jPmxRw== X-Received: by 10.194.22.136 with SMTP id d8mr3438220wjf.5.1475189242319; Thu, 29 Sep 2016 15:47:22 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.194.15.134 with HTTP; Thu, 29 Sep 2016 15:47:21 -0700 (PDT) In-Reply-To: References: <201605270531.u4R5VE6R006890@repo.freebsd.org> From: Alan Somers Date: Thu, 29 Sep 2016 16:47:21 -0600 X-Google-Sender-Auth: -9Y3PFNeg_x8h5veuoxFIaM2pqo Message-ID: Subject: Re: svn commit: r300824 - head/lib/libmd To: Ed Schouten Cc: "Conrad E. Meyer" , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 22:47:24 -0000 On Fri, May 27, 2016 at 1:00 AM, Ed Schouten wrote: > 2016-05-27 8:50 GMT+02:00 Conrad Meyer : >> There's nothing to support =E2=80=94 literally ignoring the keyword is a= n >> acceptable implementation. So it's disappointing C++ chooses to >> reject C keywords. > > Keep in mind that C++ does not reject "static" altogether; only in > this specific context. The reason for it is that in C++, there are > other ways of enforcing similar properties. For example by using > std::array, which has the size as part of its type. > >> If sys/md5.h includes a static inline function, there are bigger >> problems with potentially trying to interpret C code as C++. > > We have quite a lot of public header files that contain static inline > functions that also work well in C++ mode. is a good > example. > >> Your proposed macro seems ok, although it is pretty long for where it >> would be used. Maybe __min_size()? > > Sure! Is anybody still intending to write this feature? I just ran into the same c++-includability bug with sha256.h and sha512.h. It would be nice to fix them the right way instead of using r300824's workaround. -Alan From owner-svn-src-head@freebsd.org Thu Sep 29 23:07:29 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0A8FC02AFA; Thu, 29 Sep 2016 23:07:29 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0A7CAEC; Thu, 29 Sep 2016 23:07:29 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8TN7Sga031744; Thu, 29 Sep 2016 23:07:28 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8TN7Sq0031742; Thu, 29 Sep 2016 23:07:28 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201609292307.u8TN7Sq0031742@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 29 Sep 2016 23:07:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306462 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 23:07:30 -0000 Author: glebius Date: Thu Sep 29 23:07:28 2016 New Revision: 306462 URL: https://svnweb.freebsd.org/changeset/base/306462 Log: Provide kern.maxphys sysctl, which returns MAXPHYS. Naming matches NetBSD. Modified: head/sys/kern/kern_mib.c head/sys/sys/sysctl.h Modified: head/sys/kern/kern_mib.c ============================================================================== --- head/sys/kern/kern_mib.c Thu Sep 29 22:52:24 2016 (r306461) +++ head/sys/kern/kern_mib.c Thu Sep 29 23:07:28 2016 (r306462) @@ -138,6 +138,9 @@ char kernelname[MAXPATHLEN] = "/kernel"; SYSCTL_STRING(_kern, KERN_BOOTFILE, bootfile, CTLFLAG_RW, kernelname, sizeof kernelname, "Name of kernel file booted"); +SYSCTL_INT(_kern, KERN_MAXPHYS, maxphys, CTLFLAG_RD | CTLFLAG_CAPRD, + SYSCTL_NULL_INT_PTR, MAXPHYS, "Maximum block I/O access size"); + SYSCTL_INT(_hw, HW_NCPU, ncpu, CTLFLAG_RD|CTLFLAG_CAPRD, &mp_ncpus, 0, "Number of active CPUs"); Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Thu Sep 29 22:52:24 2016 (r306461) +++ head/sys/sys/sysctl.h Thu Sep 29 23:07:28 2016 (r306462) @@ -835,6 +835,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e #define KERN_IOV_MAX 35 /* int: value of UIO_MAXIOV */ #define KERN_HOSTUUID 36 /* string: host UUID identifier */ #define KERN_ARND 37 /* int: from arc4rand() */ +#define KERN_MAXPHYS 38 /* int: MAXPHYS value */ /* * KERN_PROC subtypes */ From owner-svn-src-head@freebsd.org Fri Sep 30 00:10:58 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEFF2C02BD4; Fri, 30 Sep 2016 00:10:58 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD297F1E; Fri, 30 Sep 2016 00:10:58 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U0AwU2054350; Fri, 30 Sep 2016 00:10:58 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U0Aw2S054349; Fri, 30 Sep 2016 00:10:58 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201609300010.u8U0Aw2S054349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Fri, 30 Sep 2016 00:10:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306464 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 00:10:59 -0000 Author: hiren Date: Fri Sep 30 00:10:57 2016 New Revision: 306464 URL: https://svnweb.freebsd.org/changeset/base/306464 Log: This adds a sysctl which allows you to disable the TCP hostcache. This is handy during testing of network related changes where cached entries may pollute your results, or during known congestion events where you don't want to unfairly penalize hosts. Prior to r232346 this would have meant you would break any connection with a sub 1500 MTU, as the hostcache was authoritative. All entries as they stand today should simply be used to pre populate values for efficiency. Submitted by: Jason Wolfe (j at nitrology dot com) Reviewed by: rwatson, sbruno, rrs , bz (earlier version) MFC after: 2 weeks Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D6198 Modified: head/sys/netinet/tcp_hostcache.c Modified: head/sys/netinet/tcp_hostcache.c ============================================================================== --- head/sys/netinet/tcp_hostcache.c Thu Sep 29 23:41:57 2016 (r306463) +++ head/sys/netinet/tcp_hostcache.c Fri Sep 30 00:10:57 2016 (r306464) @@ -124,6 +124,12 @@ static void tcp_hc_purge(void *); static SYSCTL_NODE(_net_inet_tcp, OID_AUTO, hostcache, CTLFLAG_RW, 0, "TCP Host cache"); +VNET_DEFINE(int, tcp_use_hostcache) = 1; +#define V_tcp_use_hostcache VNET(tcp_use_hostcache) +SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, enable, CTLFLAG_VNET | CTLFLAG_RW, + &VNET_NAME(tcp_use_hostcache), 0, + "Enable the TCP hostcache"); + SYSCTL_UINT(_net_inet_tcp_hostcache, OID_AUTO, cachelimit, CTLFLAG_VNET | CTLFLAG_RDTUN, &VNET_NAME(tcp_hostcache.cache_limit), 0, "Overall entry limit for hostcache"); @@ -276,6 +282,9 @@ tcp_hc_lookup(struct in_conninfo *inc) struct hc_head *hc_head; struct hc_metrics *hc_entry; + if (!V_tcp_use_hostcache) + return NULL; + KASSERT(inc != NULL, ("tcp_hc_lookup with NULL in_conninfo pointer")); /* @@ -332,6 +341,9 @@ tcp_hc_insert(struct in_conninfo *inc) struct hc_head *hc_head; struct hc_metrics *hc_entry; + if (!V_tcp_use_hostcache) + return NULL; + KASSERT(inc != NULL, ("tcp_hc_insert with NULL in_conninfo pointer")); /* @@ -421,6 +433,9 @@ tcp_hc_get(struct in_conninfo *inc, stru { struct hc_metrics *hc_entry; + if (!V_tcp_use_hostcache) + return; + /* * Find the right bucket. */ @@ -452,7 +467,7 @@ tcp_hc_get(struct in_conninfo *inc, stru /* * External function: look up an entry in the hostcache and return the - * discovered path MTU. Returns NULL if no entry is found or value is not + * discovered path MTU. Returns 0 if no entry is found or value is not * set. */ u_long @@ -461,6 +476,9 @@ tcp_hc_getmtu(struct in_conninfo *inc) struct hc_metrics *hc_entry; u_long mtu; + if (!V_tcp_use_hostcache) + return 0; + hc_entry = tcp_hc_lookup(inc); if (hc_entry == NULL) { return 0; @@ -482,6 +500,9 @@ tcp_hc_updatemtu(struct in_conninfo *inc { struct hc_metrics *hc_entry; + if (!V_tcp_use_hostcache) + return; + /* * Find the right bucket. */ @@ -521,6 +542,9 @@ tcp_hc_update(struct in_conninfo *inc, s { struct hc_metrics *hc_entry; + if (!V_tcp_use_hostcache) + return; + hc_entry = tcp_hc_lookup(inc); if (hc_entry == NULL) { hc_entry = tcp_hc_insert(inc); From owner-svn-src-head@freebsd.org Fri Sep 30 00:16:55 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8247C02D61; Fri, 30 Sep 2016 00:16:55 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A4C71329; Fri, 30 Sep 2016 00:16:55 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U0GsnV058066; Fri, 30 Sep 2016 00:16:54 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U0GsOU058065; Fri, 30 Sep 2016 00:16:54 GMT (envelope-from np@FreeBSD.org) Message-Id: <201609300016.u8U0GsOU058065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 30 Sep 2016 00:16:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306465 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 00:16:55 -0000 Author: np Date: Fri Sep 30 00:16:54 2016 New Revision: 306465 URL: https://svnweb.freebsd.org/changeset/base/306465 Log: cxgbe(4): Claim the T6 -DBG card. Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri Sep 30 00:10:57 2016 (r306464) +++ head/sys/dev/cxgbe/t4_main.c Fri Sep 30 00:16:54 2016 (r306465) @@ -607,6 +607,7 @@ struct { {0x6407, "Chelsio T62100-LP-CR"}, /* 2 x 40/50/100G */ {0x6408, "Chelsio T62100-SO-CR"}, /* 2 x 40/50/100G, nomem */ {0x640d, "Chelsio T62100-CR"}, /* 2 x 40/50/100G */ + {0x6410, "Chelsio T62100-DBG"}, /* 2 x 40/50/100G, debug */ }; #ifdef TCP_OFFLOAD From owner-svn-src-head@freebsd.org Fri Sep 30 02:48:41 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33166C029DA; Fri, 30 Sep 2016 02:48:41 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05C3D275; Fri, 30 Sep 2016 02:48:40 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U2mekx014569; Fri, 30 Sep 2016 02:48:40 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U2meEe014568; Fri, 30 Sep 2016 02:48:40 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201609300248.u8U2meEe014568@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 30 Sep 2016 02:48:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306473 - head/sys/dev/fdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 02:48:41 -0000 Author: jhibbits Date: Fri Sep 30 02:48:40 2016 New Revision: 306473 URL: https://svnweb.freebsd.org/changeset/base/306473 Log: Use the cell-index property as the unit number if available. Summary: NXP/Freescale, among others, includes an optional cell-index property on nodes to denote the SoC block number of the node. This can be useful if, for example, a node is disabled or nonexistent in the fdt, or the blocks are not organized in address-sorted order. For instance, on the P1022, DMA2 is located at CCSR offset 0xC000, while DMA1 is located at 0x21000. Reviewed By: jmcneill Differential Revision: https://reviews.freebsd.org/D8054 Modified: head/sys/dev/fdt/simplebus.c Modified: head/sys/dev/fdt/simplebus.c ============================================================================== --- head/sys/dev/fdt/simplebus.c Fri Sep 30 01:42:29 2016 (r306472) +++ head/sys/dev/fdt/simplebus.c Fri Sep 30 02:48:40 2016 (r306473) @@ -265,6 +265,15 @@ simplebus_add_device(device_t dev, phand if ((ndi = simplebus_setup_dinfo(dev, node, di)) == NULL) return (NULL); + + /* + * If the order is unspecified, use the cell-index field, if available. + * The cell-index property is not part of any standard, but is widely + * used in NXP/Freescale and Marvell device trees. + */ + if (order == -1) + OF_getencprop(node, "cell-index", &order, sizeof(order)); + cdev = device_add_child_ordered(dev, order, name, unit); if (cdev == NULL) { device_printf(dev, "<%s>: device_add_child failed\n", From owner-svn-src-head@freebsd.org Fri Sep 30 03:03:43 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECA56C02DC7; Fri, 30 Sep 2016 03:03:43 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD14EF39; Fri, 30 Sep 2016 03:03:43 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U33grG022488; Fri, 30 Sep 2016 03:03:42 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U33gk3022487; Fri, 30 Sep 2016 03:03:42 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609300303.u8U33gk3022487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Fri, 30 Sep 2016 03:03:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306474 - head/sys/dev/atkbdc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 03:03:44 -0000 Author: gonzo Date: Fri Sep 30 03:03:42 2016 New Revision: 306474 URL: https://svnweb.freebsd.org/changeset/base/306474 Log: Replace explicit TUNABLE_INT to sysctl with CTLFLAG_TUN - Replace tunables-only hw.psm.synaptics_support, hw.psm.trackpoint_support, and hw.psm.elantech_support with respective sysctls declared with CTLFLAG_TUN. It simplifies checking them in userland, also makes them easier to get discovered by user - Get rid of debug.psm.loglevel and hw.psm.tap_enabled TUNABLE_INT declaration by adding CTLFLAG_TUN to read/write sysctls that were already declared for these tunables. Suggested by: jhb Modified: head/sys/dev/atkbdc/psm.c Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Fri Sep 30 02:48:40 2016 (r306473) +++ head/sys/dev/atkbdc/psm.c Fri Sep 30 03:03:42 2016 (r306474) @@ -457,19 +457,10 @@ static devclass_t psm_devclass; /* Tunables */ static int tap_enabled = -1; -TUNABLE_INT("hw.psm.tap_enabled", &tap_enabled); - +static int verbose = PSM_DEBUG; static int synaptics_support = 0; -TUNABLE_INT("hw.psm.synaptics_support", &synaptics_support); - static int trackpoint_support = 0; -TUNABLE_INT("hw.psm.trackpoint_support", &trackpoint_support); - static int elantech_support = 0; -TUNABLE_INT("hw.psm.elantech_support", &elantech_support); - -static int verbose = PSM_DEBUG; -TUNABLE_INT("debug.psm.loglevel", &verbose); /* for backward compatibility */ #define OLD_MOUSE_GETHWINFO _IOR('M', 1, old_mousehw_t) @@ -2460,7 +2451,7 @@ psmtimeout(void *arg) static SYSCTL_NODE(_debug, OID_AUTO, psm, CTLFLAG_RD, 0, "ps/2 mouse"); static SYSCTL_NODE(_hw, OID_AUTO, psm, CTLFLAG_RD, 0, "ps/2 mouse"); -SYSCTL_INT(_debug_psm, OID_AUTO, loglevel, CTLFLAG_RW, &verbose, 0, +SYSCTL_INT(_debug_psm, OID_AUTO, loglevel, CTLFLAG_RWTUN, &verbose, 0, "Verbosity level"); static int psmhz = 20; @@ -2482,7 +2473,7 @@ static int pkterrthresh = 2; SYSCTL_INT(_debug_psm, OID_AUTO, pkterrthresh, CTLFLAG_RW, &pkterrthresh, 0, "Number of error packets allowed before reinitializing the mouse"); -SYSCTL_INT(_hw_psm, OID_AUTO, tap_enabled, CTLFLAG_RW, &tap_enabled, 0, +SYSCTL_INT(_hw_psm, OID_AUTO, tap_enabled, CTLFLAG_RWTUN, &tap_enabled, 0, "Enable tap and drag gestures"); static int tap_threshold = PSM_TAP_THRESHOLD; SYSCTL_INT(_hw_psm, OID_AUTO, tap_threshold, CTLFLAG_RW, &tap_threshold, 0, @@ -2491,6 +2482,16 @@ static int tap_timeout = PSM_TAP_TIMEOUT SYSCTL_INT(_hw_psm, OID_AUTO, tap_timeout, CTLFLAG_RW, &tap_timeout, 0, "Tap timeout for touchpads"); +/* Tunables */ +SYSCTL_INT(_hw_psm, OID_AUTO, synaptics_support, CTLFLAG_RDTUN, + &synaptics_support, 0, "Enable support for Synaptics touchpads"); + +SYSCTL_INT(_hw_psm, OID_AUTO, trackpoint_support, CTLFLAG_RDTUN, + &trackpoint_support, 0, "Enable support for IBM/Lenovo TrackPoint"); + +SYSCTL_INT(_hw_psm, OID_AUTO, elantech_support, CTLFLAG_RDTUN, + &elantech_support, 0, "Enable support for Elantech touchpads"); + static void psmintr(void *arg) { From owner-svn-src-head@freebsd.org Fri Sep 30 03:06:37 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9040C02F04; Fri, 30 Sep 2016 03:06:37 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from id.bluezbox.com (id.bluezbox.com [45.55.20.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CD0F11B5; Fri, 30 Sep 2016 03:06:37 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from [136.179.10.143] (helo=[10.140.230.85]) by id.bluezbox.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_2 (FreeBSD)) (envelope-from ) id 1bpo9c-000NmF-5y; Thu, 29 Sep 2016 20:06:29 -0700 From: Oleksandr Tymoshenko Message-Id: <96A0937C-C028-4F8F-B209-735F3DBF4338@freebsd.org> Mime-Version: 1.0 (Mac OS X Mail 10.0 \(3226\)) Subject: Re: svn commit: r306355 - in head/sys: dev/atkbdc sys Date: Thu, 29 Sep 2016 20:05:58 -0700 In-Reply-To: <3815150.rnkVxtqPiv@ralph.baldwin.cx> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: John Baldwin References: <201609262206.u8QM6J5q070986@repo.freebsd.org> <3815150.rnkVxtqPiv@ralph.baldwin.cx> X-Mailer: Apple Mail (2.3226) Sender: gonzo@id.bluezbox.com X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: > On Sep 27, 2016, at 1:55 PM, John Baldwin wrote: > > On Monday, September 26, 2016 10:06:19 PM Oleksandr Tymoshenko wrote: >> Author: gonzo >> Date: Mon Sep 26 22:06:19 2016 >> New Revision: 306355 >> URL: https://svnweb.freebsd.org/changeset/base/306355 >> >> Log: >> Add Elantech trackpad support >> >> Elantech trackpads are found in some laptops like the Asus UX31E. They >> are "synaptics compatible" but use a slightly different protocol. >> >> Elantech hardware support is not enabled by default and just like >> Synaptic or TrackPoint devices it should be enabled by setting >> tunable, in this case hw.psm.elantech_support, to non-zero value >> >> PR: 205690 >> Submitted by: Vladimir Kondratyev >> MFC after: 1 week >> >> Modified: head/sys/dev/atkbdc/psm.c >> ============================================================================== >> --- head/sys/dev/atkbdc/psm.c Mon Sep 26 20:26:19 2016 (r306354) >> +++ head/sys/dev/atkbdc/psm.c Mon Sep 26 22:06:19 2016 (r306355) >> @@ -389,6 +465, 9 @@ TUNABLE_INT("hw.psm.synaptics_support", >> static int trackpoint_support = 0; >> TUNABLE_INT("hw.psm.trackpoint_support", &trackpoint_support); >> >> +static int elantech_support = 0; >> +TUNABLE_INT("hw.psm.elantech_support", &elantech_support); >> + >> static int verbose = PSM_DEBUG; >> TUNABLE_INT("debug.psm.loglevel", &verbose); > > It would be good to expose all these tunables as CTLFLAG_RDTUN sysctls. Exposing > them that way with a decent description string makes it easier for users to > discover tunables. [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 HTML_MESSAGE BODY: HTML included in message Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 03:06:37 -0000 > On Sep 27, 2016, at 1:55 PM, John Baldwin wrote: >=20 > On Monday, September 26, 2016 10:06:19 PM Oleksandr Tymoshenko wrote: >> Author: gonzo >> Date: Mon Sep 26 22:06:19 2016 >> New Revision: 306355 >> URL: https://svnweb.freebsd.org/changeset/base/306355 >>=20 >> Log: >> Add Elantech trackpad support >>=20 >> Elantech trackpads are found in some laptops like the Asus UX31E. = They >> are "synaptics compatible" but use a slightly different protocol. >>=20 >> Elantech hardware support is not enabled by default and just like >> Synaptic or TrackPoint devices it should be enabled by setting >> tunable, in this case hw.psm.elantech_support, to non-zero value >>=20 >> PR: 205690 >> Submitted by: Vladimir Kondratyev >> MFC after: 1 week >>=20 >> Modified: head/sys/dev/atkbdc/psm.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/dev/atkbdc/psm.c Mon Sep 26 20:26:19 2016 = (r306354) >> +++ head/sys/dev/atkbdc/psm.c Mon Sep 26 22:06:19 2016 = (r306355) >> @@ -389,6 +465,9 @@ TUNABLE_INT("hw.psm.synaptics_support",=20 >> static int trackpoint_support =3D 0; >> TUNABLE_INT("hw.psm.trackpoint_support", &trackpoint_support); >>=20 >> +static int elantech_support =3D 0; >> +TUNABLE_INT("hw.psm.elantech_support", &elantech_support); >> + >> static int verbose =3D PSM_DEBUG; >> TUNABLE_INT("debug.psm.loglevel", &verbose); >=20 > It would be good to expose all these tunables as CTLFLAG_RDTUN = sysctls. Exposing > them that way with a decent description string makes it easier for = users to > discover tunables. Thanks for suggestion, John. Committed in r306474 =E2=80=94=20 gonzo= From owner-svn-src-head@freebsd.org Fri Sep 30 04:10:54 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF4C0C03E0B; Fri, 30 Sep 2016 04:10:54 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6AFB1375; Fri, 30 Sep 2016 04:10:54 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (75-101-50-44.static.sonic.net [75.101.50.44]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id u8U4Aj0v009955 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 29 Sep 2016 21:10:46 -0700 Subject: Re: svn commit: r306473 - head/sys/dev/fdt To: Justin Hibbits , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201609300248.u8U2meEe014568@repo.freebsd.org> From: Nathan Whitehorn Message-ID: <889ba670-a36a-8b80-d9f9-8d8d23cce423@freebsd.org> Date: Thu, 29 Sep 2016 21:10:45 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <201609300248.u8U2meEe014568@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVY0zF/VhVBTqe4famJh7mb4GsbEYQzBG7EO29vN6PWut4FsMJ1K50jjFdby59WiI1oMBnH9KaHrANVm9wPns/NfkT3uEGafOcA= X-Sonic-ID: C;Astz3MOG5hGrFMEYTueg2w== M;GvS+3MOG5hGrFMEYTueg2w== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 04:10:55 -0000 I'm a little dubious about this change. It's not really safe to rely on newbus unit numbers anywhere, so making them meaningful in this context seems like a bad idea. -Nathan On 09/29/16 19:48, Justin Hibbits wrote: > Author: jhibbits > Date: Fri Sep 30 02:48:40 2016 > New Revision: 306473 > URL: https://svnweb.freebsd.org/changeset/base/306473 > > Log: > Use the cell-index property as the unit number if available. > > Summary: > NXP/Freescale, among others, includes an optional cell-index property > on nodes to denote the SoC block number of the node. This can be useful if, for > example, a node is disabled or nonexistent in the fdt, or the blocks are not > organized in address-sorted order. For instance, on the P1022, DMA2 is located > at CCSR offset 0xC000, while DMA1 is located at 0x21000. > > Reviewed By: jmcneill > > Differential Revision: https://reviews.freebsd.org/D8054 > > Modified: > head/sys/dev/fdt/simplebus.c > > Modified: head/sys/dev/fdt/simplebus.c > ============================================================================== > --- head/sys/dev/fdt/simplebus.c Fri Sep 30 01:42:29 2016 (r306472) > +++ head/sys/dev/fdt/simplebus.c Fri Sep 30 02:48:40 2016 (r306473) > @@ -265,6 +265,15 @@ simplebus_add_device(device_t dev, phand > > if ((ndi = simplebus_setup_dinfo(dev, node, di)) == NULL) > return (NULL); > + > + /* > + * If the order is unspecified, use the cell-index field, if available. > + * The cell-index property is not part of any standard, but is widely > + * used in NXP/Freescale and Marvell device trees. > + */ > + if (order == -1) > + OF_getencprop(node, "cell-index", &order, sizeof(order)); > + > cdev = device_add_child_ordered(dev, order, name, unit); > if (cdev == NULL) { > device_printf(dev, "<%s>: device_add_child failed\n", > From owner-svn-src-head@freebsd.org Fri Sep 30 04:16:51 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 185DDC03FCB; Fri, 30 Sep 2016 04:16:51 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-vk0-x22c.google.com (mail-vk0-x22c.google.com [IPv6:2607:f8b0:400c:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C3C35189F; Fri, 30 Sep 2016 04:16:50 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-vk0-x22c.google.com with SMTP id z126so93726325vkd.0; Thu, 29 Sep 2016 21:16:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Uv4Id/A1NAbrWW6Wd7SFcQPK5w9gxO5ohF4Zg/qgeoU=; b=M4UjEUR5vbZi35KrGIiRUjNzXk5X6/4pB4WYD+VccFIofYMaPJtHuDeXeu9chhVWF0 3shwtz+IvrpgHV8doVcOi6M3qImKZgtTWs4UhTx8fy6amK2P5NDER8nI8kI9OGrkqtzE xYhh9wxGfzlJfcmQP/DU9GmdFdDT++85riIsEvrK7jIdApkuTAYPNnel2EcBgrKx2AuA O57WOVpsoaAUnP/nQFsslKUNRXfit1OHnirZjqKORAiKohyDHJmWKnm2fhYZcqDclgnG wr3FhdIisGxRI3D2B+prgdZZx9QUw2+RVKVPZ3PLlUKSXec73SfgHXEMPc5DJsweprEv p5+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Uv4Id/A1NAbrWW6Wd7SFcQPK5w9gxO5ohF4Zg/qgeoU=; b=MjKFg6uZ41Ig6C1LNUKZCbk5r6qi3VweqEuoSo6TAypZaBmgBXx6+qJT8OFYl5RMLD 0sNqIkY4IXnPXHz9HSInnEm/ERvi5s0r/4gtmJ6gNIFjJiAmVaYcgGBt/UAtHt/mBZNR fkqBT0gRutyT1Cf0NSap8KuZpA/Wq9KeoTj0G/RQ6R2YuPgosC2T3WMf2O+h4XS9tAAv nOq1eWdo+h4ms8YRdSEs/TLj3ZwIPahIuUY0fajKCPP07aGfz4qESppiZhJnN1WMQwuc p0mf5cYp+s0TmVZSQbEv7sW0Fo213mw9U1lexPqhpry2/qnVZupT/ds6qUvv9zOu78d7 nPOA== X-Gm-Message-State: AA6/9RmPnmHULsRQR0bZ5OYmjk5ewK6+A5p+TxFveIGAXWjpAOW06JoAjvSwlD7P3kkw9XT+GdWjURglQ8r4KA== X-Received: by 10.31.237.193 with SMTP id l184mr4216191vkh.56.1475209009442; Thu, 29 Sep 2016 21:16:49 -0700 (PDT) MIME-Version: 1.0 Sender: chmeeedalf@gmail.com Received: by 10.103.72.141 with HTTP; Thu, 29 Sep 2016 21:16:48 -0700 (PDT) Received: by 10.103.72.141 with HTTP; Thu, 29 Sep 2016 21:16:48 -0700 (PDT) In-Reply-To: <889ba670-a36a-8b80-d9f9-8d8d23cce423@freebsd.org> References: <201609300248.u8U2meEe014568@repo.freebsd.org> <889ba670-a36a-8b80-d9f9-8d8d23cce423@freebsd.org> From: Justin Hibbits Date: Thu, 29 Sep 2016 23:16:48 -0500 X-Google-Sender-Auth: UuD5CKuSnfX5EnrtozVspm_fpAo Message-ID: Subject: Re: svn commit: r306473 - head/sys/dev/fdt To: Nathan Whitehorn Cc: src-committers , svn-src-head@freebsd.org, svn-src-all@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 04:16:51 -0000 It's more cosmetic than anything else. I did realize a potential complication with it tonight, too, if newbus devices are created as children (like DMA channels in this case), and have the cell-index property. If you object it's an easy revert. - Justin On Sep 29, 2016 23:10, "Nathan Whitehorn" wrote: > I'm a little dubious about this change. It's not really safe to rely on > newbus unit numbers anywhere, so making them meaningful in this context > seems like a bad idea. > -Nathan > > On 09/29/16 19:48, Justin Hibbits wrote: > >> Author: jhibbits >> Date: Fri Sep 30 02:48:40 2016 >> New Revision: 306473 >> URL: https://svnweb.freebsd.org/changeset/base/306473 >> >> Log: >> Use the cell-index property as the unit number if available. >> Summary: >> NXP/Freescale, among others, includes an optional cell-index property >> on nodes to denote the SoC block number of the node. This can be >> useful if, for >> example, a node is disabled or nonexistent in the fdt, or the blocks >> are not >> organized in address-sorted order. For instance, on the P1022, DMA2 >> is located >> at CCSR offset 0xC000, while DMA1 is located at 0x21000. >> Reviewed By: jmcneill >> Differential Revision: https://reviews.freebsd.org/D8054 >> >> Modified: >> head/sys/dev/fdt/simplebus.c >> >> Modified: head/sys/dev/fdt/simplebus.c >> ============================================================ >> ================== >> --- head/sys/dev/fdt/simplebus.c Fri Sep 30 01:42:29 2016 >> (r306472) >> +++ head/sys/dev/fdt/simplebus.c Fri Sep 30 02:48:40 2016 >> (r306473) >> @@ -265,6 +265,15 @@ simplebus_add_device(device_t dev, phand >> if ((ndi = simplebus_setup_dinfo(dev, node, di)) == NULL) >> return (NULL); >> + >> + /* >> + * If the order is unspecified, use the cell-index field, if >> available. >> + * The cell-index property is not part of any standard, but is >> widely >> + * used in NXP/Freescale and Marvell device trees. >> + */ >> + if (order == -1) >> + OF_getencprop(node, "cell-index", &order, sizeof(order)); >> + >> cdev = device_add_child_ordered(dev, order, name, unit); >> if (cdev == NULL) { >> device_printf(dev, "<%s>: device_add_child failed\n", >> >> > From owner-svn-src-head@freebsd.org Fri Sep 30 04:23:46 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFE1CC01280; Fri, 30 Sep 2016 04:23:46 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3A301DA4; Fri, 30 Sep 2016 04:23:46 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (75-101-50-44.static.sonic.net [75.101.50.44]) (authenticated bits=0) by c.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id u8U4Nbon032090 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 29 Sep 2016 21:23:37 -0700 Subject: Re: svn commit: r306473 - head/sys/dev/fdt To: Justin Hibbits References: <201609300248.u8U2meEe014568@repo.freebsd.org> <889ba670-a36a-8b80-d9f9-8d8d23cce423@freebsd.org> Cc: src-committers , svn-src-head@freebsd.org, svn-src-all@freebsd.org From: Nathan Whitehorn Message-ID: Date: Thu, 29 Sep 2016 21:23:37 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVb1xQpTlxdMGlYr3jwD1bwf3E29ssF4LibMK8Y3zqkC/bFHlJUVnMikGcujJpFTJhoDWdGaChZOvZuHYYJt1wVWnJFsee3SrLY= X-Sonic-ID: C;DuheqMWG5hGV98nnHcq0Mg== M;Sqe9qMWG5hGV98nnHcq0Mg== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 04:23:47 -0000 Eh, I don't care much, especially if it's for cosmetic reasons only. I'm not sure I understand your suggested complication, but will leave the choice to you in any case. -Nathan On 09/29/16 21:16, Justin Hibbits wrote: > > It's more cosmetic than anything else. I did realize a potential > complication with it tonight, too, if newbus devices are created as > children (like DMA channels in this case), and have the cell-index > property. If you object it's an easy revert. > > - Justin > > > On Sep 29, 2016 23:10, "Nathan Whitehorn" > wrote: > > I'm a little dubious about this change. It's not really safe to > rely on newbus unit numbers anywhere, so making them meaningful in > this context seems like a bad idea. > -Nathan > > On 09/29/16 19:48, Justin Hibbits wrote: > > Author: jhibbits > Date: Fri Sep 30 02:48:40 2016 > New Revision: 306473 > URL: https://svnweb.freebsd.org/changeset/base/306473 > > > Log: > Use the cell-index property as the unit number if available. > Summary: > NXP/Freescale, among others, includes an optional > cell-index property > on nodes to denote the SoC block number of the node. This > can be useful if, for > example, a node is disabled or nonexistent in the fdt, or > the blocks are not > organized in address-sorted order. For instance, on the > P1022, DMA2 is located > at CCSR offset 0xC000, while DMA1 is located at 0x21000. > Reviewed By: jmcneill > Differential Revision: https://reviews.freebsd.org/D8054 > > > Modified: > head/sys/dev/fdt/simplebus.c > > Modified: head/sys/dev/fdt/simplebus.c > ============================================================================== > --- head/sys/dev/fdt/simplebus.c Fri Sep 30 01:42:29 > 2016 (r306472) > +++ head/sys/dev/fdt/simplebus.c Fri Sep 30 02:48:40 > 2016 (r306473) > @@ -265,6 +265,15 @@ simplebus_add_device(device_t dev, phand > if ((ndi = simplebus_setup_dinfo(dev, node, di)) == NULL) > return (NULL); > + > + /* > + * If the order is unspecified, use the cell-index > field, if available. > + * The cell-index property is not part of any > standard, but is widely > + * used in NXP/Freescale and Marvell device trees. > + */ > + if (order == -1) > + OF_getencprop(node, "cell-index", &order, > sizeof(order)); > + > cdev = device_add_child_ordered(dev, order, name, unit); > if (cdev == NULL) { > device_printf(dev, "<%s>: device_add_child > failed\n", > > From owner-svn-src-head@freebsd.org Fri Sep 30 04:38:15 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A6E9C0164A; Fri, 30 Sep 2016 04:38:15 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-ua0-x22a.google.com (mail-ua0-x22a.google.com [IPv6:2607:f8b0:400c:c08::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2002E3EF; Fri, 30 Sep 2016 04:38:15 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-ua0-x22a.google.com with SMTP id n13so84384618uaa.3; Thu, 29 Sep 2016 21:38:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=WMFl/TS2yZWoBxCq9ViPWFYeS1OHLSTvZKFOczf8z6w=; b=YnSFKWUcETWuUM8+l46dnb3NwKM/V8ME+25GxvLJWG/Utxd5lL0CVszbZjUggsR3jC NgmJD2HJ1XRXoos6JcjCB8I4NvRmpln+7Rm0XurSkhAouWZ5k6S2L8/XBc96gRXmnwuW dXR7cg1MEbwGUQB2N7Vu/SKwT+Rvez7yXFrN7kiwwIzRwoF1E9iB+lKVupb5QJRe+K1m aJBxAgjB2XCwKMhQGXcyyXqda7oDzgZnrWePIHHljt9NJuaIjK0UwTWETaDMzLs2Yzkg uEeUGnPU1wWNbOxOGiyVb9KxYVxbmFv261ue3yrVNZ+kcuwWTrc1Zl/5tRxvjOb7ooNV vBCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=WMFl/TS2yZWoBxCq9ViPWFYeS1OHLSTvZKFOczf8z6w=; b=Bg3Qg//LZ5+y+bjxmMCwx/h7VE5mes6KQ5U9OKm0a8SPiF8H0wClAj70cw7sX7aWIz l4lJWnKHlZe09S83wZu6rvB4bsca39mBU4zdPBlUn2cc/IeL7tEUtGe6ePeUAldplq8g 0rl78LhpSBObYHCuz5T6+I+uAOdMOYwMqyJYELoVBPULdpLIskg2OqC4W4FcnMvMJzNz Jy5iDxvM9gKUMGGoz+8sKkBuu3cmfhAk8i2G9WQ3lMgWuWvaSMKAyJoI/LcaFkbVMW2m 27pvayGnF9GwIKSrXeMmZlFYXCxniZKpDeNfPArT7To5d4o3sDEbrs4Aq29pWt8Mo111 FjeQ== X-Gm-Message-State: AA6/9RkQIHWlo8YysTg3/z1dEaGXV/ttBG4HuKa0nTs6/m8gNoB6aiS9gu4HpV0a7VwWdXBnKx5G5iwS37jsgA== X-Received: by 10.176.2.162 with SMTP id 31mr3575013uah.41.1475210293908; Thu, 29 Sep 2016 21:38:13 -0700 (PDT) MIME-Version: 1.0 Sender: chmeeedalf@gmail.com Received: by 10.103.72.141 with HTTP; Thu, 29 Sep 2016 21:38:13 -0700 (PDT) Received: by 10.103.72.141 with HTTP; Thu, 29 Sep 2016 21:38:13 -0700 (PDT) In-Reply-To: References: <201609300248.u8U2meEe014568@repo.freebsd.org> <889ba670-a36a-8b80-d9f9-8d8d23cce423@freebsd.org> From: Justin Hibbits Date: Thu, 29 Sep 2016 23:38:13 -0500 X-Google-Sender-Auth: -sTzQCn_pSCL6PoUDTdZrm4VlJ4 Message-ID: Subject: Re: svn commit: r306473 - head/sys/dev/fdt To: Nathan Whitehorn Cc: src-committers , svn-src-head@freebsd.org, svn-src-all@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 04:38:15 -0000 If I remember correctly, newbus will throw an error if you try to create two devices with the same number. Applying the logic of using the cell-index property for all device nodes, if two sub buses from simplebus have the same set of child nodes, with the same cell-index property values, one set of children would error and not attach. Of course this change is only for simplebus, so shouldn't have too big an impact. - Justin On Sep 29, 2016 23:23, "Nathan Whitehorn" wrote: > Eh, I don't care much, especially if it's for cosmetic reasons only. I'm > not sure I understand your suggested complication, but will leave the > choice to you in any case. > -Nathan > > On 09/29/16 21:16, Justin Hibbits wrote: > >> >> It's more cosmetic than anything else. I did realize a potential >> complication with it tonight, too, if newbus devices are created as >> children (like DMA channels in this case), and have the cell-index >> property. If you object it's an easy revert. >> >> - Justin >> >> >> On Sep 29, 2016 23:10, "Nathan Whitehorn" > > wrote: >> >> I'm a little dubious about this change. It's not really safe to >> rely on newbus unit numbers anywhere, so making them meaningful in >> this context seems like a bad idea. >> -Nathan >> >> On 09/29/16 19:48, Justin Hibbits wrote: >> >> Author: jhibbits >> Date: Fri Sep 30 02:48:40 2016 >> New Revision: 306473 >> URL: https://svnweb.freebsd.org/changeset/base/306473 >> >> >> Log: >> Use the cell-index property as the unit number if available. >> Summary: >> NXP/Freescale, among others, includes an optional >> cell-index property >> on nodes to denote the SoC block number of the node. This >> can be useful if, for >> example, a node is disabled or nonexistent in the fdt, or >> the blocks are not >> organized in address-sorted order. For instance, on the >> P1022, DMA2 is located >> at CCSR offset 0xC000, while DMA1 is located at 0x21000. >> Reviewed By: jmcneill >> Differential Revision: https://reviews.freebsd.org/D8054 >> >> >> Modified: >> head/sys/dev/fdt/simplebus.c >> >> Modified: head/sys/dev/fdt/simplebus.c >> ============================================================ >> ================== >> --- head/sys/dev/fdt/simplebus.c Fri Sep 30 01:42:29 >> 2016 (r306472) >> +++ head/sys/dev/fdt/simplebus.c Fri Sep 30 02:48:40 >> 2016 (r306473) >> @@ -265,6 +265,15 @@ simplebus_add_device(device_t dev, phand >> if ((ndi = simplebus_setup_dinfo(dev, node, di)) == NULL) >> return (NULL); >> + >> + /* >> + * If the order is unspecified, use the cell-index >> field, if available. >> + * The cell-index property is not part of any >> standard, but is widely >> + * used in NXP/Freescale and Marvell device trees. >> + */ >> + if (order == -1) >> + OF_getencprop(node, "cell-index", &order, >> sizeof(order)); >> + >> cdev = device_add_child_ordered(dev, order, name, unit); >> if (cdev == NULL) { >> device_printf(dev, "<%s>: device_add_child >> failed\n", >> >> >> > From owner-svn-src-head@freebsd.org Fri Sep 30 05:25:18 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AAA8C0309D; Fri, 30 Sep 2016 05:25:18 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A38019EE; Fri, 30 Sep 2016 05:25:18 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U5PHqW075016; Fri, 30 Sep 2016 05:25:17 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U5PFN5074997; Fri, 30 Sep 2016 05:25:15 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201609300525.u8U5PFN5074997@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Fri, 30 Sep 2016 05:25:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306477 - in head/sys/arm/nvidia: . tegra124 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 05:25:18 -0000 Author: mmel Date: Fri Sep 30 05:25:15 2016 New Revision: 306477 URL: https://svnweb.freebsd.org/changeset/base/306477 Log: TEGRA: Prepare Tegra subtree for inclusion into ARM generic kernel. - use DEFINE_CLASS_0() for driver classes - unify driver names - cleanup driver definitions and bindings Modified: head/sys/arm/nvidia/as3722.c head/sys/arm/nvidia/tegra124/tegra124_car.c head/sys/arm/nvidia/tegra124/tegra124_coretemp.c head/sys/arm/nvidia/tegra124/tegra124_cpufreq.c head/sys/arm/nvidia/tegra124/tegra124_pmc.c head/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c head/sys/arm/nvidia/tegra_abpmisc.c head/sys/arm/nvidia/tegra_ahci.c head/sys/arm/nvidia/tegra_efuse.c head/sys/arm/nvidia/tegra_ehci.c head/sys/arm/nvidia/tegra_gpio.c head/sys/arm/nvidia/tegra_i2c.c head/sys/arm/nvidia/tegra_lic.c head/sys/arm/nvidia/tegra_pcie.c head/sys/arm/nvidia/tegra_pinmux.c head/sys/arm/nvidia/tegra_rtc.c head/sys/arm/nvidia/tegra_sdhci.c head/sys/arm/nvidia/tegra_soctherm.c head/sys/arm/nvidia/tegra_usbphy.c Modified: head/sys/arm/nvidia/as3722.c ============================================================================== --- head/sys/arm/nvidia/as3722.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/as3722.c Fri Sep 30 05:25:15 2016 (r306477) @@ -405,7 +405,7 @@ static device_method_t as3722_methods[] }; static devclass_t as3722_devclass; -DEFINE_CLASS_0(gpio, as3722_driver, as3722_methods, +static DEFINE_CLASS_0(gpio, as3722_driver, as3722_methods, sizeof(struct as3722_softc)); EARLY_DRIVER_MODULE(as3722, iicbus, as3722_driver, as3722_devclass, - 0, 0, 74); + NULL, NULL, 74); Modified: head/sys/arm/nvidia/tegra124/tegra124_car.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_car.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra124/tegra124_car.c Fri Sep 30 05:25:15 2016 (r306477) @@ -602,12 +602,7 @@ static device_method_t tegra124_car_meth }; static devclass_t tegra124_car_devclass; - -static driver_t tegra124_car_driver = { - "tegra124_car", - tegra124_car_methods, - sizeof(struct tegra124_car_softc), -}; - +static DEFINE_CLASS_0(car, tegra124_car_driver, tegra124_car_methods, + sizeof(struct tegra124_car_softc)); EARLY_DRIVER_MODULE(tegra124_car, simplebus, tegra124_car_driver, - tegra124_car_devclass, 0, 0, BUS_PASS_TIMER); + tegra124_car_devclass, NULL, NULL, BUS_PASS_TIMER); Modified: head/sys/arm/nvidia/tegra124/tegra124_coretemp.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_coretemp.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra124/tegra124_coretemp.c Fri Sep 30 05:25:15 2016 (r306477) @@ -250,7 +250,6 @@ tegra124_coretemp_detach(device_t dev) return (0); } - static device_method_t tegra124_coretemp_methods[] = { /* Device interface */ DEVMETHOD(device_identify, tegra124_coretemp_identify), @@ -263,11 +262,7 @@ static device_method_t tegra124_coretemp }; static devclass_t tegra124_coretemp_devclass; -static driver_t tegra124_coretemp_driver = { - "tegra124_coretemp", - tegra124_coretemp_methods, - sizeof(struct tegra124_coretemp_softc), -}; - +static DEFINE_CLASS_0(coretemp, tegra124_coretemp_driver, + tegra124_coretemp_methods, sizeof(struct tegra124_coretemp_softc)); DRIVER_MODULE(tegra124_coretemp, cpu, tegra124_coretemp_driver, - tegra124_coretemp_devclass, 0, 0); + tegra124_coretemp_devclass, NULL, NULL); Modified: head/sys/arm/nvidia/tegra124/tegra124_cpufreq.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_cpufreq.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra124/tegra124_cpufreq.c Fri Sep 30 05:25:15 2016 (r306477) @@ -588,11 +588,7 @@ static device_method_t tegra124_cpufreq_ }; static devclass_t tegra124_cpufreq_devclass; -static driver_t tegra124_cpufreq_driver = { - "tegra124_cpufreq", - tegra124_cpufreq_methods, - sizeof(struct tegra124_cpufreq_softc), -}; - +static DEFINE_CLASS_0(cpufreq, tegra124_cpufreq_driver, + tegra124_cpufreq_methods, sizeof(struct tegra124_cpufreq_softc)); DRIVER_MODULE(tegra124_cpufreq, cpu, tegra124_cpufreq_driver, - tegra124_cpufreq_devclass, 0, 0); + tegra124_cpufreq_devclass, NULL, NULL); Modified: head/sys/arm/nvidia/tegra124/tegra124_pmc.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_pmc.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra124/tegra124_pmc.c Fri Sep 30 05:25:15 2016 (r306477) @@ -555,12 +555,8 @@ static device_method_t tegra124_pmc_meth DEVMETHOD_END }; -static driver_t tegra124_pmc_driver = { - "tegra124_pmc", - tegra124_pmc_methods, - sizeof(struct tegra124_pmc_softc), -}; - static devclass_t tegra124_pmc_devclass; +static DEFINE_CLASS_0(pmc, tegra124_pmc_driver, tegra124_pmc_methods, + sizeof(struct tegra124_pmc_softc)); EARLY_DRIVER_MODULE(tegra124_pmc, simplebus, tegra124_pmc_driver, - tegra124_pmc_devclass, 0, 0, 70); + tegra124_pmc_devclass, NULL, NULL, 70); Modified: head/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c Fri Sep 30 05:25:15 2016 (r306477) @@ -575,7 +575,6 @@ xusbpadctl_attach(device_t dev) return (0); } - static device_method_t tegra_xusbpadctl_methods[] = { /* Device interface */ DEVMETHOD(device_probe, xusbpadctl_probe), @@ -591,13 +590,8 @@ static device_method_t tegra_xusbpadctl_ DEVMETHOD_END }; -static driver_t tegra_xusbpadctl_driver = { - "tegra_xusbpadctl", - tegra_xusbpadctl_methods, - sizeof(struct xusbpadctl_softc), -}; - static devclass_t tegra_xusbpadctl_devclass; - +static DEFINE_CLASS_0(xusbpadctl, tegra_xusbpadctl_driver, + tegra_xusbpadctl_methods, sizeof(struct xusbpadctl_softc)); EARLY_DRIVER_MODULE(tegra_xusbpadctl, simplebus, tegra_xusbpadctl_driver, - tegra_xusbpadctl_devclass, 0, 0, 73); + tegra_xusbpadctl_devclass, NULL, NULL, 73); Modified: head/sys/arm/nvidia/tegra_abpmisc.c ============================================================================== --- head/sys/arm/nvidia/tegra_abpmisc.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_abpmisc.c Fri Sep 30 05:25:15 2016 (r306477) @@ -187,8 +187,8 @@ static device_method_t tegra_abpmisc_met DEVMETHOD_END }; -DEFINE_CLASS_0(tegra_abpmisc, tegra_abpmisc_driver, tegra_abpmisc_methods, - sizeof(struct tegra_abpmisc_softc)); static devclass_t tegra_abpmisc_devclass; +static DEFINE_CLASS_0(abpmisc, tegra_abpmisc_driver, tegra_abpmisc_methods, + sizeof(struct tegra_abpmisc_softc)); EARLY_DRIVER_MODULE(tegra_abpmisc, simplebus, tegra_abpmisc_driver, - tegra_abpmisc_devclass, 0, 0, BUS_PASS_TIMER); + tegra_abpmisc_devclass, NULL, NULL, BUS_PASS_TIMER); Modified: head/sys/arm/nvidia/tegra_ahci.c ============================================================================== --- head/sys/arm/nvidia/tegra_ahci.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_ahci.c Fri Sep 30 05:25:15 2016 (r306477) @@ -602,7 +602,6 @@ tegra_ahci_resume(device_t dev) return (bus_generic_resume(dev)); } -static devclass_t tegra_ahci_devclass; static device_method_t tegra_ahci_methods[] = { DEVMETHOD(device_probe, tegra_ahci_probe), DEVMETHOD(device_attach, tegra_ahci_attach), @@ -620,9 +619,8 @@ static device_method_t tegra_ahci_method DEVMETHOD_END }; -static driver_t tegra_ahci_driver = { - "ahci", - tegra_ahci_methods, - sizeof(struct tegra_ahci_sc) -}; -DRIVER_MODULE(tegra_ahci, simplebus, tegra_ahci_driver, tegra_ahci_devclass, NULL, NULL); +static devclass_t tegra_ahci_devclass; +static DEFINE_CLASS_0(ahci, tegra_ahci_driver, tegra_ahci_methods, + sizeof(struct tegra_ahci_sc)); +DRIVER_MODULE(tegra_ahci, simplebus, tegra_ahci_driver, tegra_ahci_devclass, + NULL, NULL); Modified: head/sys/arm/nvidia/tegra_efuse.c ============================================================================== --- head/sys/arm/nvidia/tegra_efuse.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_efuse.c Fri Sep 30 05:25:15 2016 (r306477) @@ -357,12 +357,11 @@ static device_method_t tegra_efuse_metho DEVMETHOD(device_attach, tegra_efuse_attach), DEVMETHOD(device_detach, tegra_efuse_detach), - DEVMETHOD_END }; -DEFINE_CLASS_0(tegra_efuse, tegra_efuse_driver, tegra_efuse_methods, - sizeof(struct tegra_efuse_softc)); static devclass_t tegra_efuse_devclass; +static DEFINE_CLASS_0(efuse, tegra_efuse_driver, tegra_efuse_methods, + sizeof(struct tegra_efuse_softc)); EARLY_DRIVER_MODULE(tegra_efuse, simplebus, tegra_efuse_driver, - tegra_efuse_devclass, 0, 0, BUS_PASS_TIMER); + tegra_efuse_devclass, NULL, NULL, BUS_PASS_TIMER); Modified: head/sys/arm/nvidia/tegra_ehci.c ============================================================================== --- head/sys/arm/nvidia/tegra_ehci.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_ehci.c Fri Sep 30 05:25:15 2016 (r306477) @@ -311,12 +311,8 @@ static device_method_t ehci_methods[] = DEVMETHOD_END }; -static driver_t ehci_driver = { - "ehci", - ehci_methods, - sizeof(struct tegra_ehci_softc) -}; - static devclass_t ehci_devclass; -DRIVER_MODULE(ehci, simplebus, ehci_driver, ehci_devclass, 0, 0); -MODULE_DEPEND(ehci, usb, 1, 1, 1); \ No newline at end of file +static DEFINE_CLASS_0(ehci, ehci_driver, ehci_methods, + sizeof(struct tegra_ehci_softc)); +DRIVER_MODULE(tegra_ehci, simplebus, ehci_driver, ehci_devclass, NULL, NULL); +MODULE_DEPEND(tegra_ehci, usb, 1, 1, 1); Modified: head/sys/arm/nvidia/tegra_gpio.c ============================================================================== --- head/sys/arm/nvidia/tegra_gpio.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_gpio.c Fri Sep 30 05:25:15 2016 (r306477) @@ -885,20 +885,8 @@ static device_method_t tegra_gpio_method DEVMETHOD_END }; -static driver_t tegra_gpio_driver = { - "tegra_gpio", - tegra_gpio_methods, - sizeof(struct tegra_gpio_softc), -}; static devclass_t tegra_gpio_devclass; - +static DEFINE_CLASS_0(gpio, tegra_gpio_driver, tegra_gpio_methods, + sizeof(struct tegra_gpio_softc)); EARLY_DRIVER_MODULE(tegra_gpio, simplebus, tegra_gpio_driver, - tegra_gpio_devclass, 0, 0, 70); - -extern devclass_t ofwgpiobus_devclass; -extern driver_t ofw_gpiobus_driver; -EARLY_DRIVER_MODULE(ofw_gpiobus, tegra_gpio, ofw_gpiobus_driver, - ofwgpiobus_devclass, 0, 0, BUS_PASS_BUS); -extern devclass_t gpioc_devclass; -extern driver_t gpioc_driver; -DRIVER_MODULE(gpioc, tegra_gpio, gpioc_driver, gpioc_devclass, 0, 0); + tegra_gpio_devclass, NULL, NULL, 70); Modified: head/sys/arm/nvidia/tegra_i2c.c ============================================================================== --- head/sys/arm/nvidia/tegra_i2c.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_i2c.c Fri Sep 30 05:25:15 2016 (r306477) @@ -797,12 +797,8 @@ static device_method_t tegra_i2c_methods DEVMETHOD_END }; -DEFINE_CLASS_0(iichb, tegra_i2c_driver, tegra_i2c_methods, - sizeof(struct tegra_i2c_softc)); static devclass_t tegra_i2c_devclass; +static DEFINE_CLASS_0(iichb, tegra_i2c_driver, tegra_i2c_methods, + sizeof(struct tegra_i2c_softc)); EARLY_DRIVER_MODULE(tegra_iic, simplebus, tegra_i2c_driver, tegra_i2c_devclass, - 0, 0, 73); -extern devclass_t ofwiicbus_devclass; -extern driver_t ofw_iicbus_driver; -EARLY_DRIVER_MODULE(ofw_iicbus, tegra_iic, ofw_iicbus_driver, - ofwiicbus_devclass, 0, 0, BUS_PASS_BUS); + NULL, NULL, 73); Modified: head/sys/arm/nvidia/tegra_lic.c ============================================================================== --- head/sys/arm/nvidia/tegra_lic.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_lic.c Fri Sep 30 05:25:15 2016 (r306477) @@ -281,8 +281,9 @@ static device_method_t tegra_lic_methods #endif DEVMETHOD_END }; + devclass_t tegra_lic_devclass; -DEFINE_CLASS_0(tegra_lic, tegra_lic_driver, tegra_lic_methods, +static DEFINE_CLASS_0(lic, tegra_lic_driver, tegra_lic_methods, sizeof(struct tegra_lic_sc)); EARLY_DRIVER_MODULE(tegra_lic, simplebus, tegra_lic_driver, tegra_lic_devclass, NULL, NULL, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE + 1); Modified: head/sys/arm/nvidia/tegra_pcie.c ============================================================================== --- head/sys/arm/nvidia/tegra_pcie.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_pcie.c Fri Sep 30 05:25:15 2016 (r306477) @@ -1629,7 +1629,8 @@ static device_method_t tegra_pcib_method DEVMETHOD_END }; +static devclass_t pcib_devclass; DEFINE_CLASS_1(pcib, tegra_pcib_driver, tegra_pcib_methods, sizeof(struct tegra_pcib_softc), ofw_pci_driver); -devclass_t pcib_devclass; -DRIVER_MODULE(pcib, simplebus, tegra_pcib_driver, pcib_devclass, 0, 0); +DRIVER_MODULE(pcib, simplebus, tegra_pcib_driver, pcib_devclass, + NULL, NULL); Modified: head/sys/arm/nvidia/tegra_pinmux.c ============================================================================== --- head/sys/arm/nvidia/tegra_pinmux.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_pinmux.c Fri Sep 30 05:25:15 2016 (r306477) @@ -792,13 +792,8 @@ static device_method_t tegra_pinmux_meth DEVMETHOD_END }; -static driver_t tegra_pinmux_driver = { - "tegra_pinmux", - tegra_pinmux_methods, - sizeof(struct pinmux_softc), -}; - static devclass_t tegra_pinmux_devclass; - +static DEFINE_CLASS_0(pinmux, tegra_pinmux_driver, tegra_pinmux_methods, + sizeof(struct pinmux_softc)); EARLY_DRIVER_MODULE(tegra_pinmux, simplebus, tegra_pinmux_driver, - tegra_pinmux_devclass, 0, 0, 71); + tegra_pinmux_devclass, NULL, NULL, 71); Modified: head/sys/arm/nvidia/tegra_rtc.c ============================================================================== --- head/sys/arm/nvidia/tegra_rtc.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_rtc.c Fri Sep 30 05:25:15 2016 (r306477) @@ -297,7 +297,8 @@ static device_method_t tegra_rtc_methods DEVMETHOD_END }; -DEFINE_CLASS_0(tegra_rtc, tegra_rtc_driver, tegra_rtc_methods, - sizeof(struct tegra_rtc_softc)); static devclass_t tegra_rtc_devclass; -DRIVER_MODULE(tegra_rtc, simplebus, tegra_rtc_driver, tegra_rtc_devclass, 0, 0); +static DEFINE_CLASS_0(rtc, tegra_rtc_driver, tegra_rtc_methods, + sizeof(struct tegra_rtc_softc)); +DRIVER_MODULE(tegra_rtc, simplebus, tegra_rtc_driver, tegra_rtc_devclass, + NULL, NULL); Modified: head/sys/arm/nvidia/tegra_sdhci.c ============================================================================== --- head/sys/arm/nvidia/tegra_sdhci.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_sdhci.c Fri Sep 30 05:25:15 2016 (r306477) @@ -448,18 +448,14 @@ static device_method_t tegra_sdhci_metho DEVMETHOD(sdhci_write_4, tegra_sdhci_write_4), DEVMETHOD(sdhci_write_multi_4, tegra_sdhci_write_multi_4), - { 0, 0 } + DEVMETHOD_END }; static devclass_t tegra_sdhci_devclass; - -static driver_t tegra_sdhci_driver = { - "sdhci_tegra", - tegra_sdhci_methods, - sizeof(struct tegra_sdhci_softc), -}; - +static DEFINE_CLASS_0(sdhci, tegra_sdhci_driver, tegra_sdhci_methods, + sizeof(struct tegra_sdhci_softc)); DRIVER_MODULE(sdhci_tegra, simplebus, tegra_sdhci_driver, tegra_sdhci_devclass, - 0, 0); + NULL, NULL); MODULE_DEPEND(sdhci_tegra, sdhci, 1, 1, 1); -DRIVER_MODULE(mmc, sdhci_tegra, mmc_driver, mmc_devclass, NULL, NULL); +DRIVER_MODULE(mmc, sdhci, mmc_driver, mmc_devclass, NULL, NULL); +MODULE_DEPEND(sdhci_tegra, mmc, 1, 1, 1); Modified: head/sys/arm/nvidia/tegra_soctherm.c ============================================================================== --- head/sys/arm/nvidia/tegra_soctherm.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_soctherm.c Fri Sep 30 05:25:15 2016 (r306477) @@ -690,7 +690,7 @@ static device_method_t tegra_soctherm_me }; static devclass_t tegra_soctherm_devclass; -DEFINE_CLASS_0(tegra_soctherm, tegra_soctherm_driver, tegra_soctherm_methods, +static DEFINE_CLASS_0(soctherm, tegra_soctherm_driver, tegra_soctherm_methods, sizeof(struct soctherm_softc)); EARLY_DRIVER_MODULE(tegra_soctherm, simplebus, tegra_soctherm_driver, -tegra_soctherm_devclass, 0, 0, 79); + tegra_soctherm_devclass, NULL, NULL, 79); Modified: head/sys/arm/nvidia/tegra_usbphy.c ============================================================================== --- head/sys/arm/nvidia/tegra_usbphy.c Fri Sep 30 03:45:41 2016 (r306476) +++ head/sys/arm/nvidia/tegra_usbphy.c Fri Sep 30 05:25:15 2016 (r306477) @@ -827,13 +827,8 @@ static device_method_t tegra_usbphy_meth DEVMETHOD_END }; -static driver_t tegra_usbphy_driver = { - "tegra_usbphy", - tegra_usbphy_methods, - sizeof(struct usbphy_softc), -}; - static devclass_t tegra_usbphy_devclass; - +static DEFINE_CLASS_0(usbphy, tegra_usbphy_driver, tegra_usbphy_methods, + sizeof(struct usbphy_softc)); EARLY_DRIVER_MODULE(tegra_usbphy, simplebus, tegra_usbphy_driver, - tegra_usbphy_devclass, 0, 0, 79); + tegra_usbphy_devclass, NULL, NULL, 79); From owner-svn-src-head@freebsd.org Fri Sep 30 05:28:13 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00EC0C03120; Fri, 30 Sep 2016 05:28:13 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D06F81B92; Fri, 30 Sep 2016 05:28:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U5SCrj075145; Fri, 30 Sep 2016 05:28:12 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U5SBgc075143; Fri, 30 Sep 2016 05:28:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609300528.u8U5SBgc075143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 30 Sep 2016 05:28:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306478 - in head/sys/dev/usb: . serial X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 05:28:13 -0000 Author: hselasky Date: Fri Sep 30 05:28:11 2016 New Revision: 306478 URL: https://svnweb.freebsd.org/changeset/base/306478 Log: Add new USB ID. While at it remove some whitespaces. Submitted by: Jose Luis Duran PR: 213110 MFC after: 1 week Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Fri Sep 30 05:25:15 2016 (r306477) +++ head/sys/dev/usb/serial/u3g.c Fri Sep 30 05:28:11 2016 (r306478) @@ -522,6 +522,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(SIERRA, MC5728, 0), U3G_DEV(SIERRA, MC7354, 0), U3G_DEV(SIERRA, MC7355, 0), + U3G_DEV(SIERRA, MC7430, 0), U3G_DEV(SIERRA, MC8700, 0), U3G_DEV(SIERRA, MC8755, 0), U3G_DEV(SIERRA, MC8755_2, 0), @@ -631,7 +632,7 @@ u3g_sael_m460_init(struct usb_device *ud static const uint8_t setup[][24] = { { 0x41, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, { 0x41, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x41, 0x13, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, + { 0x41, 0x13, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, { 0xc1, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02 }, @@ -643,7 +644,7 @@ u3g_sael_m460_init(struct usb_device *ud { 0x41, 0x03, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00 }, { 0x41, 0x19, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x13 }, - { 0x41, 0x13, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, + { 0x41, 0x13, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x09, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00 }, { 0x41, 0x12, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 }, @@ -653,7 +654,7 @@ u3g_sael_m460_init(struct usb_device *ud { 0x41, 0x19, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x13 }, { 0x41, 0x13, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, - 0x09, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00 }, { 0x41, 0x07, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00 }, }; @@ -687,7 +688,7 @@ u3g_sael_m460_init(struct usb_device *ud DPRINTFN(0, "too small buffer\n"); continue; } - err = usbd_do_request(udev, NULL, &req, + err = usbd_do_request(udev, NULL, &req, __DECONST(uint8_t *, &setup[n][8])); } if (err) { @@ -863,7 +864,7 @@ u3g_attach(device_t dev) } /* copy in USB config */ - for (n = 0; n != U3G_N_TRANSFER; n++) + for (n = 0; n != U3G_N_TRANSFER; n++) u3g_config_tmp[n] = u3g_config[n]; device_set_usb_desc(dev); Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Fri Sep 30 05:25:15 2016 (r306477) +++ head/sys/dev/usb/usbdevs Fri Sep 30 05:28:11 2016 (r306478) @@ -4101,6 +4101,7 @@ product SIERRA E6893 0x6893 E6893 product SIERRA MC8700 0x68A3 MC8700 product SIERRA MC7354 0x68C0 MC7354 product SIERRA MC7355 0x9041 MC7355 +product SIERRA MC7430 0x9071 Sierra Wireless MC7430 Qualcomm Snapdragon X7 LTE-A product SIERRA AC313U 0x68aa Sierra Wireless AirCard 313U product SIERRA TRUINSTALL 0x0fff Aircard Tru Installer From owner-svn-src-head@freebsd.org Fri Sep 30 05:30:17 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FC81C031D1; Fri, 30 Sep 2016 05:30:17 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4240D1D70; Fri, 30 Sep 2016 05:30:17 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U5UG8V075295; Fri, 30 Sep 2016 05:30:16 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U5UGEx075294; Fri, 30 Sep 2016 05:30:16 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201609300530.u8U5UGEx075294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Fri, 30 Sep 2016 05:30:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306479 - head/sys/arm/allwinner X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 05:30:17 -0000 Author: mmel Date: Fri Sep 30 05:30:16 2016 New Revision: 306479 URL: https://svnweb.freebsd.org/changeset/base/306479 Log: ALLWINNER: ahci_devclass is local variable, don't export it. Modified: head/sys/arm/allwinner/a10_ahci.c Modified: head/sys/arm/allwinner/a10_ahci.c ============================================================================== --- head/sys/arm/allwinner/a10_ahci.c Fri Sep 30 05:28:11 2016 (r306478) +++ head/sys/arm/allwinner/a10_ahci.c Fri Sep 30 05:30:16 2016 (r306479) @@ -373,7 +373,7 @@ ahci_a10_detach(device_t dev) return (ahci_detach(dev)); } -devclass_t ahci_devclass; +static devclass_t ahci_devclass; static device_method_t ahci_ata_methods[] = { DEVMETHOD(device_probe, ahci_a10_probe), From owner-svn-src-head@freebsd.org Fri Sep 30 05:51:12 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB24EC03611; Fri, 30 Sep 2016 05:51:12 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 617DEAD9; Fri, 30 Sep 2016 05:51:12 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U5pBva083540; Fri, 30 Sep 2016 05:51:11 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U5pBPc083539; Fri, 30 Sep 2016 05:51:11 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609300551.u8U5pBPc083539@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 30 Sep 2016 05:51:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306480 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 05:51:12 -0000 Author: sephe Date: Fri Sep 30 05:51:11 2016 New Revision: 306480 URL: https://svnweb.freebsd.org/changeset/base/306480 Log: linuxkpi: Fix PCI BAR lazy allocation support. FreeBSD supports lazy allocation of PCI BAR, that is, when a device driver's attach method is invoked, even if the device's PCI BAR address wasn't initialized, the invocation of bus_alloc_resource_any() (the call chain: pci_alloc_resource() -> pci_alloc_multi_resource() -> pci_reserve_map() -> pci_write_bar()) would allocate a proper address for the PCI BAR and write this 'lazy allocated' address into the PCI BAR. This model works fine for native FreeBSD device drivers, but _not_ for device drivers shared with Linux (e.g. dev/mlx5/mlx5_core/mlx5_main.c and ofed/drivers/net/mlx4/main.c. Both of them use pci_request_regions(), which doesn't work properly with the PCI BAR lazy allocation, because pci_resource_type() -> _pci_get_rle() always returns NULL, so pci_request_regions() doesn't have the opportunity to invoke bus_alloc_resource_any(). We now use pci_find_bar() in pci_resource_type(), which is able to locate all available PCI BARs even if some of them will be lazy allocated. Submitted by: Dexuan Cui Reviewed by: hps MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8071 Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/pci.h Fri Sep 30 05:30:16 2016 (r306479) +++ head/sys/compat/linuxkpi/common/include/linux/pci.h Fri Sep 30 05:51:11 2016 (r306480) @@ -233,11 +233,16 @@ pci_resource_len(struct pci_dev *pdev, i static inline int pci_resource_type(struct pci_dev *pdev, int bar) { - struct resource_list_entry *rle; + struct pci_map *pm; - if ((rle = _pci_get_bar(pdev, bar)) == NULL) + pm = pci_find_bar(pdev->dev.bsddev, PCIR_BAR(bar)); + if (!pm) return (-1); - return (rle->type); + + if (PCI_BAR_IO(pm->pm_value)) + return (SYS_RES_IOPORT); + else + return (SYS_RES_MEMORY); } /* From owner-svn-src-head@freebsd.org Fri Sep 30 06:08:22 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7328C0389B; Fri, 30 Sep 2016 06:08:22 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A843811DA; Fri, 30 Sep 2016 06:08:22 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U68LeX090124; Fri, 30 Sep 2016 06:08:21 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U68LHd090123; Fri, 30 Sep 2016 06:08:21 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609300608.u8U68LHd090123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 30 Sep 2016 06:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306481 - head/sys/x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 06:08:22 -0000 Author: sephe Date: Fri Sep 30 06:08:21 2016 New Revision: 306481 URL: https://svnweb.freebsd.org/changeset/base/306481 Log: x86/ioapic: Fix destination cpu for Hyper-V On Hyper-V: - Stick to the first cpu for all I/O APIC pins. - And don't allow destination cpu changes. Reviewed by: jhb MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7949 Modified: head/sys/x86/x86/io_apic.c Modified: head/sys/x86/x86/io_apic.c ============================================================================== --- head/sys/x86/x86/io_apic.c Fri Sep 30 05:51:11 2016 (r306480) +++ head/sys/x86/x86/io_apic.c Fri Sep 30 06:08:21 2016 (r306481) @@ -412,6 +412,18 @@ ioapic_assign_cpu(struct intsrc *isrc, u u_int old_id; /* + * On Hyper-V: + * - Stick to the first cpu for all I/O APIC pins. + * - And don't allow destination cpu changes. + */ + if (vm_guest == VM_GUEST_HV) { + if (intpin->io_vector) + return (EINVAL); + else + apic_id = 0; + } + + /* * keep 1st core as the destination for NMI */ if (intpin->io_irq == IRQ_NMI) From owner-svn-src-head@freebsd.org Fri Sep 30 06:21:01 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C224C03B59; Fri, 30 Sep 2016 06:21:01 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 773651723; Fri, 30 Sep 2016 06:21:01 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U6L0vr094477; Fri, 30 Sep 2016 06:21:00 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U6L00o094475; Fri, 30 Sep 2016 06:21:00 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609300621.u8U6L00o094475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 30 Sep 2016 06:21:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306482 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 06:21:01 -0000 Author: sephe Date: Fri Sep 30 06:21:00 2016 New Revision: 306482 URL: https://svnweb.freebsd.org/changeset/base/306482 Log: hyperv/hn: If synthetic parts are detached, don't touch them. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8065 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Fri Sep 30 06:08:21 2016 (r306481) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Fri Sep 30 06:21:00 2016 (r306482) @@ -252,6 +252,7 @@ struct hn_softc { #define HN_FLAG_CHIM_CONNECTED 0x0002 #define HN_FLAG_HAS_RSSKEY 0x0004 #define HN_FLAG_HAS_RSSIND 0x0008 +#define HN_FLAG_SYNTH_ATTACHED 0x0010 #define HN_CAP_VLAN 0x0001 #define HN_CAP_MTU 0x0002 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Sep 30 06:08:21 2016 (r306481) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Sep 30 06:21:00 2016 (r306482) @@ -405,6 +405,9 @@ hn_rss_reconfig(struct hn_softc *sc) HN_LOCK_ASSERT(sc); + if ((sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) == 0) + return (ENXIO); + /* * Disable RSS first. * @@ -1618,6 +1621,11 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, HN_LOCK(sc); + if ((sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) == 0) { + HN_UNLOCK(sc); + break; + } + if ((sc->hn_caps & HN_CAP_MTU) == 0) { /* Can't change MTU */ HN_UNLOCK(sc); @@ -1671,6 +1679,11 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, case SIOCSIFFLAGS: HN_LOCK(sc); + if ((sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) == 0) { + HN_UNLOCK(sc); + break; + } + if (ifp->if_flags & IFF_UP) { /* * If only the state of the PROMISC flag changed, @@ -1782,6 +1795,9 @@ hn_stop(struct hn_softc *sc) HN_LOCK_ASSERT(sc); + KASSERT(sc->hn_flags & HN_FLAG_SYNTH_ATTACHED, + ("synthetic parts were not attached")); + /* Clear RUNNING bit _before_ hn_suspend() */ atomic_clear_int(&ifp->if_drv_flags, IFF_DRV_RUNNING); hn_suspend(sc); @@ -1858,6 +1874,9 @@ hn_init_locked(struct hn_softc *sc) HN_LOCK_ASSERT(sc); + if ((sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) == 0) + return; + if (ifp->if_drv_flags & IFF_DRV_RUNNING) return; @@ -3377,6 +3396,9 @@ hn_synth_attach(struct hn_softc *sc, int int error, nsubch, nchan, i; uint32_t old_caps; + KASSERT((sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) == 0, + ("synthetic parts were attached")); + /* Save capabilities for later verification. */ old_caps = sc->hn_caps; sc->hn_caps = 0; @@ -3489,6 +3511,8 @@ back: error = hn_attach_subchans(sc); if (error) return (error); + + sc->hn_flags |= HN_FLAG_SYNTH_ATTACHED; return (0); } @@ -3502,6 +3526,9 @@ hn_synth_detach(struct hn_softc *sc) { HN_LOCK_ASSERT(sc); + KASSERT(sc->hn_flags & HN_FLAG_SYNTH_ATTACHED, + ("synthetic parts were not attached")); + /* Detach the RNDIS first. */ hn_rndis_detach(sc); @@ -3510,6 +3537,8 @@ hn_synth_detach(struct hn_softc *sc) /* Detach all of the channels. */ hn_detach_allchans(sc); + + sc->hn_flags &= ~HN_FLAG_SYNTH_ATTACHED; } static void From owner-svn-src-head@freebsd.org Fri Sep 30 06:30:17 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D27EFC03E1B; Fri, 30 Sep 2016 06:30:17 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 890B01CB8; Fri, 30 Sep 2016 06:30:17 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U6UG77097909; Fri, 30 Sep 2016 06:30:16 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U6UGFr097908; Fri, 30 Sep 2016 06:30:16 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609300630.u8U6UGFr097908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 30 Sep 2016 06:30:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306483 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 06:30:17 -0000 Author: sephe Date: Fri Sep 30 06:30:16 2016 New Revision: 306483 URL: https://svnweb.freebsd.org/changeset/base/306483 Log: hyperv/hn: Fix detach and attach error handling. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8066 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Sep 30 06:21:00 2016 (r306482) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Sep 30 06:30:16 2016 (r306483) @@ -352,6 +352,7 @@ static void hn_resume(struct hn_softc *) static void hn_rx_drain(struct vmbus_channel *); static void hn_tx_resume(struct hn_softc *, int); static void hn_tx_ring_qflush(struct hn_tx_ring *); +static int netvsc_detach(device_t dev); static void hn_nvs_handle_notify(struct hn_softc *sc, const struct vmbus_chanpkt_hdr *pkt); @@ -739,27 +740,28 @@ netvsc_attach(device_t dev) return (0); failed: - /* TODO: reuse netvsc_detach() */ - hn_destroy_tx_data(sc); - if (ifp != NULL) - if_free(ifp); + if (sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) + hn_synth_detach(sc); + netvsc_detach(dev); return (error); } -/* - * TODO: Use this for error handling on attach path. - */ static int netvsc_detach(device_t dev) { struct hn_softc *sc = device_get_softc(dev); + struct ifnet *ifp = sc->hn_ifp; - /* TODO: ether_ifdetach */ - - HN_LOCK(sc); - /* TODO: hn_stop */ - hn_synth_detach(sc); - HN_UNLOCK(sc); + if (device_is_attached(dev)) { + HN_LOCK(sc); + if (sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + hn_stop(sc); + hn_synth_detach(sc); + } + HN_UNLOCK(sc); + ether_ifdetach(ifp); + } ifmedia_removeall(&sc->hn_media); hn_destroy_rx_data(sc); @@ -768,10 +770,12 @@ netvsc_detach(device_t dev) if (sc->hn_tx_taskq != hn_tx_taskq) taskqueue_free(sc->hn_tx_taskq); - vmbus_xact_ctx_destroy(sc->hn_xact); - HN_LOCK_DESTROY(sc); + if (sc->hn_xact != NULL) + vmbus_xact_ctx_destroy(sc->hn_xact); - /* TODO: if_free */ + if_free(ifp); + + HN_LOCK_DESTROY(sc); return (0); } From owner-svn-src-head@freebsd.org Fri Sep 30 06:49:40 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EB5DC03574; Fri, 30 Sep 2016 06:49:40 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21796C56; Fri, 30 Sep 2016 06:49:40 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U6ndoM005520; Fri, 30 Sep 2016 06:49:39 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U6ndTR005519; Fri, 30 Sep 2016 06:49:39 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609300649.u8U6ndTR005519@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 30 Sep 2016 06:49:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306484 - head/sys/modules/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 06:49:40 -0000 Author: sephe Date: Fri Sep 30 06:49:39 2016 New Revision: 306484 URL: https://svnweb.freebsd.org/changeset/base/306484 Log: hyperv/vmbus: Add missing vmbus_if.c to module build. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8067 Modified: head/sys/modules/hyperv/vmbus/Makefile Modified: head/sys/modules/hyperv/vmbus/Makefile ============================================================================== --- head/sys/modules/hyperv/vmbus/Makefile Fri Sep 30 06:30:16 2016 (r306483) +++ head/sys/modules/hyperv/vmbus/Makefile Fri Sep 30 06:49:39 2016 (r306484) @@ -11,6 +11,7 @@ SRCS= hyperv.c \ vmbus_br.c \ vmbus_chan.c \ vmbus_et.c \ + vmbus_if.c \ vmbus_xact.c SRCS+= acpi_if.h bus_if.h device_if.h opt_acpi.h vmbus_if.h From owner-svn-src-head@freebsd.org Fri Sep 30 06:58:46 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F28D0C0382B; Fri, 30 Sep 2016 06:58:46 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFE0312CC; Fri, 30 Sep 2016 06:58:46 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U6wj7n009353; Fri, 30 Sep 2016 06:58:45 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U6wj0p009351; Fri, 30 Sep 2016 06:58:45 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609300658.u8U6wj0p009351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 30 Sep 2016 06:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306485 - in head/sys: dev/hyperv/netvsc net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 06:58:47 -0000 Author: sephe Date: Fri Sep 30 06:58:45 2016 New Revision: 306485 URL: https://svnweb.freebsd.org/changeset/base/306485 Log: hyperv/hn: Add stubs for OFFLOAD_CURRENT_CONFIG and NETWORK_CHANGE status MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8068 Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c head/sys/net/rndis.h Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Fri Sep 30 06:49:39 2016 (r306484) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Fri Sep 30 06:58:45 2016 (r306485) @@ -155,6 +155,15 @@ hv_rf_receive_indicate_status(struct hn_ netvsc_linkstatus_callback(sc, 0); break; + case RNDIS_STATUS_TASK_OFFLOAD_CURRENT_CONFIG: + /* Not really useful; ignore. */ + break; + + case RNDIS_STATUS_NETWORK_CHANGE: + /* TODO */ + if_printf(sc->hn_ifp, "network changed\n"); + break; + default: /* TODO: */ if_printf(sc->hn_ifp, "unknown RNDIS status 0x%08x\n", Modified: head/sys/net/rndis.h ============================================================================== --- head/sys/net/rndis.h Fri Sep 30 06:49:39 2016 (r306484) +++ head/sys/net/rndis.h Fri Sep 30 06:58:45 2016 (r306485) @@ -31,6 +31,8 @@ #define RNDIS_STATUS_PENDING 0x00000103L #define RNDIS_STATUS_MEDIA_CONNECT 0x4001000BL #define RNDIS_STATUS_MEDIA_DISCONNECT 0x4001000CL +#define RNDIS_STATUS_NETWORK_CHANGE 0x40010018L +#define RNDIS_STATUS_TASK_OFFLOAD_CURRENT_CONFIG 0x40020006L #define RNDIS_STATUS_BUFFER_OVERFLOW 0x80000005L #define RNDIS_STATUS_FAILURE 0xC0000001L #define RNDIS_STATUS_NOT_SUPPORTED 0xC00000BBL From owner-svn-src-head@freebsd.org Fri Sep 30 08:23:09 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA4D3C02924; Fri, 30 Sep 2016 08:23:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88DAB1FAE; Fri, 30 Sep 2016 08:23:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U8N7u5043566; Fri, 30 Sep 2016 08:23:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U8N7ff043558; Fri, 30 Sep 2016 08:23:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201609300823.u8U8N7ff043558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 30 Sep 2016 08:23:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306486 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/mlx4 sys/dev/mlx4/mlx4_core sys/dev/mlx4/mlx4_en sys/dev/mlx4/mlx4_ib sys/i386/conf sys/modules sys/modules/mlx4 sys/mo... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 08:23:09 -0000 Author: hselasky Date: Fri Sep 30 08:23:06 2016 New Revision: 306486 URL: https://svnweb.freebsd.org/changeset/base/306486 Log: Move the ConnectX-3 and ConnectX-2 driver from sys/ofed into sys/dev/mlx4 like other PCI network drivers. The sys/ofed directory is now mainly reserved for generic infiniband code, with exception of the mthca driver. - Add new manual page, mlx4en(4), describing how to configure and load mlx4en. - All relevant driver C-files are now prefixed mlx4, mlx4_en and mlx4_ib respectivly to avoid object filename collisions when compiling the kernel. This also fixes an issue with proper dependency file generation for the C-files in question. - Device mlxen is now device mlx4en and depends on device mlx4, see mlx4en(4). Only the network device name remains unchanged. - The mlx4 and mlx4en modules are now built by default on i386 and amd64 targets. Only building the mlx4ib module depends on WITH_OFED=YES . Sponsored by: Mellanox Technologies Added: head/share/man/man4/mlx4en.4 (contents, props changed) head/sys/dev/mlx4/ head/sys/dev/mlx4/cmd.h - copied unchanged from r306485, head/sys/ofed/include/linux/mlx4/cmd.h head/sys/dev/mlx4/cq.h - copied, changed from r306485, head/sys/ofed/include/linux/mlx4/cq.h head/sys/dev/mlx4/device.h - copied unchanged from r306485, head/sys/ofed/include/linux/mlx4/device.h head/sys/dev/mlx4/doorbell.h - copied unchanged from r306485, head/sys/ofed/include/linux/mlx4/doorbell.h head/sys/dev/mlx4/driver.h - copied, changed from r306485, head/sys/ofed/include/linux/mlx4/driver.h head/sys/dev/mlx4/mlx4_core/ head/sys/dev/mlx4/mlx4_core/fw.h - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/fw.h head/sys/dev/mlx4/mlx4_core/icm.h - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/icm.h head/sys/dev/mlx4/mlx4_core/mlx4.h - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mlx4.h head/sys/dev/mlx4/mlx4_core/mlx4_alloc.c - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/alloc.c head/sys/dev/mlx4/mlx4_core/mlx4_catas.c - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/catas.c head/sys/dev/mlx4/mlx4_core/mlx4_cmd.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/cmd.c head/sys/dev/mlx4/mlx4_core/mlx4_cq.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/cq.c head/sys/dev/mlx4/mlx4_core/mlx4_eq.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/eq.c head/sys/dev/mlx4/mlx4_core/mlx4_fw.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/fw.c head/sys/dev/mlx4/mlx4_core/mlx4_icm.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/icm.c head/sys/dev/mlx4/mlx4_core/mlx4_intf.c - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/intf.c head/sys/dev/mlx4/mlx4_core/mlx4_main.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/main.c head/sys/dev/mlx4/mlx4_core/mlx4_mcg.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mcg.c head/sys/dev/mlx4/mlx4_core/mlx4_mr.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mr.c head/sys/dev/mlx4/mlx4_core/mlx4_pd.c - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/pd.c head/sys/dev/mlx4/mlx4_core/mlx4_port.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/port.c head/sys/dev/mlx4/mlx4_core/mlx4_profile.c - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/profile.c head/sys/dev/mlx4/mlx4_core/mlx4_qp.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/qp.c head/sys/dev/mlx4/mlx4_core/mlx4_reset.c - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/reset.c head/sys/dev/mlx4/mlx4_core/mlx4_resource_tracker.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/resource_tracker.c head/sys/dev/mlx4/mlx4_core/mlx4_sense.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/sense.c head/sys/dev/mlx4/mlx4_core/mlx4_srq.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/srq.c head/sys/dev/mlx4/mlx4_core/mlx4_sys_tune.c - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/sys_tune.c head/sys/dev/mlx4/mlx4_en/ head/sys/dev/mlx4/mlx4_en/en.h - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mlx4_en.h head/sys/dev/mlx4/mlx4_en/en_port.h - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/en_port.h head/sys/dev/mlx4/mlx4_en/mlx4_en_cq.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_cq.c head/sys/dev/mlx4/mlx4_en/mlx4_en_main.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_main.c head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_netdev.c head/sys/dev/mlx4/mlx4_en/mlx4_en_port.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_port.c head/sys/dev/mlx4/mlx4_en/mlx4_en_resources.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_resources.c head/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_rx.c head/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_tx.c head/sys/dev/mlx4/mlx4_ib/ head/sys/dev/mlx4/mlx4_ib/mlx4_exp.h - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_exp.h head/sys/dev/mlx4/mlx4_ib/mlx4_ib.h - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h head/sys/dev/mlx4/mlx4_ib/mlx4_ib_ah.c - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/ah.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_alias_GUID.c - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/alias_GUID.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_cm.c - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/cm.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_cq.c - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/cq.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_doorbell.c - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/doorbell.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_exp.c - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_exp.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_mad.c - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mad.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/main.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_mcg.c - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mcg.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_mr.c - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mr.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_qp.c - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/qp.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_srq.c - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/srq.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_sysfs.c - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_wc.c - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/wc.c head/sys/dev/mlx4/mlx4_ib/user.h - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/user.h head/sys/dev/mlx4/mlx4_ib/wc.h - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/wc.h head/sys/dev/mlx4/qp.h - copied, changed from r306485, head/sys/ofed/include/linux/mlx4/qp.h head/sys/dev/mlx4/srq.h - copied unchanged from r306485, head/sys/ofed/include/linux/mlx4/srq.h head/sys/dev/mlx4/stats.h - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/mlx4_stats.h head/sys/modules/mlx4en/ - copied from r306485, head/sys/modules/mlxen/ Deleted: head/sys/modules/mlxen/ head/sys/ofed/drivers/infiniband/hw/mlx4/ head/sys/ofed/drivers/net/ head/sys/ofed/include/linux/ Modified: head/share/man/man4/Makefile head/sys/amd64/conf/NOTES head/sys/conf/files head/sys/i386/conf/NOTES head/sys/modules/Makefile head/sys/modules/mlx4/Makefile head/sys/modules/mlx4en/Makefile head/sys/modules/mlx4ib/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Fri Sep 30 06:58:45 2016 (r306485) +++ head/share/man/man4/Makefile Fri Sep 30 08:23:06 2016 (r306486) @@ -279,6 +279,7 @@ MAN= aac.4 \ mk48txx.4 \ mld.4 \ mlx.4 \ + mlx4en.4 \ mlx5en.4 \ mly.4 \ mmc.4 \ Added: head/share/man/man4/mlx4en.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/mlx4en.4 Fri Sep 30 08:23:06 2016 (r306486) @@ -0,0 +1,95 @@ +.\" Copyright (c) 2016 Mellanox Technologies +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY 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 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$ +.\" +.Dd September 30, 2016 +.Dt MLX4EN 4 +.Os +.Sh NAME +.Nm mlx4en +.Nd "Mellanox ConnectX-3 10GbE/40GbE network adapter driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "options COMPAT_LINUXKPI" +.Cd "device mlx4" +.Cd "device mlx4en" +.Ed +.Pp +To load the driver as a module at run-time, +run the following command as root: +.Bd -literal -offset indent +kldload mlx4en +.Ed +.Pp +To load the driver as a +module at boot time, place the following lines in +.Xr loader.conf 5 : +.Bd -literal -offset indent +mlx4en_load="YES" +.Ed +.Sh DESCRIPTION +Mellanox ConnectX adapter cards with Virtual Protocol Interconnect +(VPI) provide the highest performing and most flexible interconnect +solution for Enterprise Data Centers, High-Performance Computing, and +Embedded environments. +Clustered data bases, parallelized applications, transactional +services and high-performance embedded I/O applications will achieve +significant performance improvements resulting in reduced completion +time and lower cost per operation. +.Sh HARDWARE +The +.Nm +driver supports the following network adapters: +.Pp +.Bl -bullet -compact +.It +Mellanox ConnectX-2 (ETH) +.It +Mellanox ConnectX-3 (ETH) +.El +.Sh SUPPORT +For general information and support, +go to the Mellanox support website at: +.Pa http://www.mellanox.com/ . +.Pp +If an issue is identified with this driver with a supported adapter, +email all the specific information related to the issue to +.Aq Mt freebsd-drivers@mellanox.com . +.Sh SEE ALSO +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 9.x . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Mellanox Technologies . Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Fri Sep 30 06:58:45 2016 (r306485) +++ head/sys/amd64/conf/NOTES Fri Sep 30 08:23:06 2016 (r306486) @@ -318,7 +318,7 @@ options DRM_DEBUG # Include debug print # ixl: Intel XL710 40Gbe PCIE Ethernet # ixlv: Intel XL710 40Gbe VF PCIE Ethernet # mlx4ib: Mellanox ConnectX HCA InfiniBand -# mlxen: Mellanox ConnectX HCA Ethernet +# mlx4en: Mellanox ConnectX HCA Ethernet # mthca: Mellanox HCA InfiniBand # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) # sfxge: Solarflare SFC9000 family 10Gb Ethernet adapters @@ -336,8 +336,9 @@ device iwi # Intel 2200BG/2225BG/2915A device iwn # Intel 4965/1000/5000/6000 wireless NICs. device ixl # Intel XL710 40Gbe PCIE Ethernet device ixlv # Intel XL710 40Gbe VF PCIE Ethernet +device mlx4 # Shared code module between IB and Ethernet device mlx4ib # Mellanox ConnectX HCA InfiniBand -device mlxen # Mellanox ConnectX HCA Ethernet +device mlx4en # Mellanox ConnectX HCA Ethernet device mthca # Mellanox HCA InfiniBand device nfe # nVidia nForce MCP on-board Ethernet device sfxge # Solarflare SFC9000 10Gb Ethernet Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Sep 30 06:58:45 2016 (r306485) +++ head/sys/conf/files Fri Sep 30 08:23:06 2016 (r306486) @@ -4036,131 +4036,90 @@ ofed/drivers/infiniband/ulp/sdp/sdp_cma. ofed/drivers/infiniband/ulp/sdp/sdp_tx.c optional sdp inet \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" -ofed/drivers/infiniband/hw/mlx4/alias_GUID.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/mcg.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/sysfs.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/cm.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/ah.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/cq.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/doorbell.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/mad.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/main.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/mlx4_exp.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/mr.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/qp.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/srq.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" -ofed/drivers/infiniband/hw/mlx4/wc.c optional mlx4ib \ - no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" +dev/mlx4/mlx4_ib/mlx4_ib_alias_GUID.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_mcg.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_sysfs.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_cm.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_ah.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_cq.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_doorbell.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_mad.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_main.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_exp.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_mr.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_qp.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_srq.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_ib/mlx4_ib_wc.c optional mlx4ib pci ofed \ + compile-with "${OFED_C}" -ofed/drivers/net/mlx4/alloc.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/catas.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/cmd.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/cq.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/eq.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/fw.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/icm.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/intf.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/main.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/mcg.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/ -Wno-unused" -ofed/drivers/net/mlx4/mr.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/pd.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/port.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/profile.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/qp.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/reset.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/sense.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/srq.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/resource_tracker.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/sys_tune.c optional mlx4ib | mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +dev/mlx4/mlx4_core/mlx4_alloc.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_catas.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_cmd.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_cq.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_eq.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_fw.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_icm.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_intf.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_main.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_mcg.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_mr.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_pd.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_port.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_profile.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_qp.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_reset.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_sense.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_srq.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_resource_tracker.c optional mlx4 pci \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_sys_tune.c optional mlx4 pci \ + compile-with "${OFED_C}" -ofed/drivers/net/mlx4/en_cq.c optional mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/en_main.c optional mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/en_netdev.c optional mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/en_port.c optional mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/en_resources.c optional mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/en_rx.c optional mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/en_tx.c optional mlxen \ - no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +dev/mlx4/mlx4_en/mlx4_en_cq.c optional mlx4en pci inet inet6 \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_en/mlx4_en_main.c optional mlx4en pci inet inet6 \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_en/mlx4_en_netdev.c optional mlx4en pci inet inet6 \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_en/mlx4_en_port.c optional mlx4en pci inet inet6 \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_en/mlx4_en_resources.c optional mlx4en pci inet inet6 \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_en/mlx4_en_rx.c optional mlx4en pci inet inet6 \ + compile-with "${OFED_C}" +dev/mlx4/mlx4_en/mlx4_en_tx.c optional mlx4en pci inet inet6 \ + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_alloc.c optional mlx5 pci \ compile-with "${OFED_C}" Copied: head/sys/dev/mlx4/cmd.h (from r306485, head/sys/ofed/include/linux/mlx4/cmd.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/mlx4/cmd.h Fri Sep 30 08:23:06 2016 (r306486, copy of r306485, head/sys/ofed/include/linux/mlx4/cmd.h) @@ -0,0 +1,258 @@ +/* + * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU + * General Public License (GPL) Version 2, available from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - 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. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifndef MLX4_CMD_H +#define MLX4_CMD_H + +#include +#include + +enum { + /* initialization and general commands */ + MLX4_CMD_SYS_EN = 0x1, + MLX4_CMD_SYS_DIS = 0x2, + MLX4_CMD_MAP_FA = 0xfff, + MLX4_CMD_UNMAP_FA = 0xffe, + MLX4_CMD_RUN_FW = 0xff6, + MLX4_CMD_MOD_STAT_CFG = 0x34, + MLX4_CMD_QUERY_DEV_CAP = 0x3, + MLX4_CMD_QUERY_FW = 0x4, + MLX4_CMD_ENABLE_LAM = 0xff8, + MLX4_CMD_DISABLE_LAM = 0xff7, + MLX4_CMD_QUERY_DDR = 0x5, + MLX4_CMD_QUERY_ADAPTER = 0x6, + MLX4_CMD_INIT_HCA = 0x7, + MLX4_CMD_CLOSE_HCA = 0x8, + MLX4_CMD_INIT_PORT = 0x9, + MLX4_CMD_CLOSE_PORT = 0xa, + MLX4_CMD_QUERY_HCA = 0xb, + MLX4_CMD_QUERY_PORT = 0x43, + MLX4_CMD_SENSE_PORT = 0x4d, + MLX4_CMD_HW_HEALTH_CHECK = 0x50, + MLX4_CMD_SET_PORT = 0xc, + MLX4_CMD_SET_NODE = 0x5a, + MLX4_CMD_QUERY_FUNC = 0x56, + MLX4_CMD_ACCESS_DDR = 0x2e, + MLX4_CMD_MAP_ICM = 0xffa, + MLX4_CMD_UNMAP_ICM = 0xff9, + MLX4_CMD_MAP_ICM_AUX = 0xffc, + MLX4_CMD_UNMAP_ICM_AUX = 0xffb, + MLX4_CMD_SET_ICM_SIZE = 0xffd, + /*master notify fw on finish for slave's flr*/ + MLX4_CMD_INFORM_FLR_DONE = 0x5b, + MLX4_CMD_GET_OP_REQ = 0x59, + + /* TPT commands */ + MLX4_CMD_SW2HW_MPT = 0xd, + MLX4_CMD_QUERY_MPT = 0xe, + MLX4_CMD_HW2SW_MPT = 0xf, + MLX4_CMD_READ_MTT = 0x10, + MLX4_CMD_WRITE_MTT = 0x11, + MLX4_CMD_SYNC_TPT = 0x2f, + + /* EQ commands */ + MLX4_CMD_MAP_EQ = 0x12, + MLX4_CMD_SW2HW_EQ = 0x13, + MLX4_CMD_HW2SW_EQ = 0x14, + MLX4_CMD_QUERY_EQ = 0x15, + + /* CQ commands */ + MLX4_CMD_SW2HW_CQ = 0x16, + MLX4_CMD_HW2SW_CQ = 0x17, + MLX4_CMD_QUERY_CQ = 0x18, + MLX4_CMD_MODIFY_CQ = 0x2c, + + /* SRQ commands */ + MLX4_CMD_SW2HW_SRQ = 0x35, + MLX4_CMD_HW2SW_SRQ = 0x36, + MLX4_CMD_QUERY_SRQ = 0x37, + MLX4_CMD_ARM_SRQ = 0x40, + + /* QP/EE commands */ + MLX4_CMD_RST2INIT_QP = 0x19, + MLX4_CMD_INIT2RTR_QP = 0x1a, + MLX4_CMD_RTR2RTS_QP = 0x1b, + MLX4_CMD_RTS2RTS_QP = 0x1c, + MLX4_CMD_SQERR2RTS_QP = 0x1d, + MLX4_CMD_2ERR_QP = 0x1e, + MLX4_CMD_RTS2SQD_QP = 0x1f, + MLX4_CMD_SQD2SQD_QP = 0x38, + MLX4_CMD_SQD2RTS_QP = 0x20, + MLX4_CMD_2RST_QP = 0x21, + MLX4_CMD_QUERY_QP = 0x22, + MLX4_CMD_INIT2INIT_QP = 0x2d, + MLX4_CMD_SUSPEND_QP = 0x32, + MLX4_CMD_UNSUSPEND_QP = 0x33, + MLX4_CMD_UPDATE_QP = 0x61, + /* special QP and management commands */ + MLX4_CMD_CONF_SPECIAL_QP = 0x23, + MLX4_CMD_MAD_IFC = 0x24, + + /* multicast commands */ + MLX4_CMD_READ_MCG = 0x25, + MLX4_CMD_WRITE_MCG = 0x26, + MLX4_CMD_MGID_HASH = 0x27, + + /* miscellaneous commands */ + MLX4_CMD_DIAG_RPRT = 0x30, + MLX4_CMD_NOP = 0x31, + MLX4_CMD_ACCESS_MEM = 0x2e, + MLX4_CMD_SET_VEP = 0x52, + + /* Ethernet specific commands */ + MLX4_CMD_SET_VLAN_FLTR = 0x47, + MLX4_CMD_SET_MCAST_FLTR = 0x48, + MLX4_CMD_DUMP_ETH_STATS = 0x49, + + /* Communication channel commands */ + MLX4_CMD_ARM_COMM_CHANNEL = 0x57, + MLX4_CMD_GEN_EQE = 0x58, + + /* virtual commands */ + MLX4_CMD_ALLOC_RES = 0xf00, + MLX4_CMD_FREE_RES = 0xf01, + MLX4_CMD_MCAST_ATTACH = 0xf05, + MLX4_CMD_UCAST_ATTACH = 0xf06, + MLX4_CMD_PROMISC = 0xf08, + MLX4_CMD_QUERY_FUNC_CAP = 0xf0a, + MLX4_CMD_QP_ATTACH = 0xf0b, + + /* debug commands */ + MLX4_CMD_QUERY_DEBUG_MSG = 0x2a, + MLX4_CMD_SET_DEBUG_MSG = 0x2b, + + /* statistics commands */ + MLX4_CMD_QUERY_IF_STAT = 0X54, + MLX4_CMD_SET_IF_STAT = 0X55, + + /* register/delete flow steering network rules */ + MLX4_QP_FLOW_STEERING_ATTACH = 0x65, + MLX4_QP_FLOW_STEERING_DETACH = 0x66, + MLX4_FLOW_STEERING_IB_UC_QP_RANGE = 0x64, +}; + +enum { + MLX4_CMD_TIME_CLASS_A = 60000, + MLX4_CMD_TIME_CLASS_B = 60000, + MLX4_CMD_TIME_CLASS_C = 60000, +}; + +enum { + MLX4_MAILBOX_SIZE = 4096, + MLX4_ACCESS_MEM_ALIGN = 256, +}; + +enum { + /* set port opcode modifiers */ + MLX4_SET_PORT_GENERAL = 0x0, + MLX4_SET_PORT_RQP_CALC = 0x1, + MLX4_SET_PORT_MAC_TABLE = 0x2, + MLX4_SET_PORT_VLAN_TABLE = 0x3, + MLX4_SET_PORT_PRIO_MAP = 0x4, + MLX4_SET_PORT_GID_TABLE = 0x5, + MLX4_SET_PORT_PRIO2TC = 0x8, + MLX4_SET_PORT_SCHEDULER = 0x9 +}; + +enum { + MLX4_CMD_WRAPPED, + MLX4_CMD_NATIVE +}; + +struct mlx4_dev; + +struct mlx4_cmd_mailbox { + void *buf; + dma_addr_t dma; +}; + +int __mlx4_cmd(struct mlx4_dev *dev, u64 in_param, u64 *out_param, + int out_is_imm, u32 in_modifier, u8 op_modifier, + u16 op, unsigned long timeout, int native); + +/* Invoke a command with no output parameter */ +static inline int mlx4_cmd(struct mlx4_dev *dev, u64 in_param, u32 in_modifier, + u8 op_modifier, u16 op, unsigned long timeout, + int native) +{ + return __mlx4_cmd(dev, in_param, NULL, 0, in_modifier, + op_modifier, op, timeout, native); +} + +/* Invoke a command with an output mailbox */ +static inline int mlx4_cmd_box(struct mlx4_dev *dev, u64 in_param, u64 out_param, + u32 in_modifier, u8 op_modifier, u16 op, + unsigned long timeout, int native) +{ + return __mlx4_cmd(dev, in_param, &out_param, 0, in_modifier, + op_modifier, op, timeout, native); +} + +/* + * Invoke a command with an immediate output parameter (and copy the + * output into the caller's out_param pointer after the command + * executes). + */ +static inline int mlx4_cmd_imm(struct mlx4_dev *dev, u64 in_param, u64 *out_param, + u32 in_modifier, u8 op_modifier, u16 op, + unsigned long timeout, int native) +{ + return __mlx4_cmd(dev, in_param, out_param, 1, in_modifier, + op_modifier, op, timeout, native); +} + +struct mlx4_cmd_mailbox *mlx4_alloc_cmd_mailbox(struct mlx4_dev *dev); +void mlx4_free_cmd_mailbox(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox); + +u32 mlx4_comm_get_version(void); +int mlx4_set_vf_mac(struct mlx4_dev *dev, int port, int vf, u8 *mac); +int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan, u8 qos); +int mlx4_set_vf_spoofchk(struct mlx4_dev *dev, int port, int vf, bool setting); +int mlx4_set_vf_link_state(struct mlx4_dev *dev, int port, int vf, int link_state); +int mlx4_get_vf_link_state(struct mlx4_dev *dev, int port, int vf); +/* + * mlx4_get_slave_default_vlan - + * retrun true if VST ( default vlan) + * if VST will fill vlan & qos (if not NULL) + */ +bool mlx4_get_slave_default_vlan(struct mlx4_dev *dev, int port, int slave, u16 *vlan, u8 *qos); + +enum { + IFLA_VF_LINK_STATE_AUTO, /* link state of the uplink */ + IFLA_VF_LINK_STATE_ENABLE, /* link always up */ + IFLA_VF_LINK_STATE_DISABLE, /* link always down */ + __IFLA_VF_LINK_STATE_MAX, +}; + +#define MLX4_COMM_GET_IF_REV(cmd_chan_ver) (u8)((cmd_chan_ver) >> 8) + +#endif /* MLX4_CMD_H */ Copied and modified: head/sys/dev/mlx4/cq.h (from r306485, head/sys/ofed/include/linux/mlx4/cq.h) ============================================================================== --- head/sys/ofed/include/linux/mlx4/cq.h Fri Sep 30 06:58:45 2016 (r306485, copy source) +++ head/sys/dev/mlx4/cq.h Fri Sep 30 08:23:06 2016 (r306486) @@ -35,8 +35,8 @@ #include -#include -#include +#include +#include struct mlx4_cqe { __be32 vlan_my_qpn; Copied: head/sys/dev/mlx4/device.h (from r306485, head/sys/ofed/include/linux/mlx4/device.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/mlx4/device.h Fri Sep 30 08:23:06 2016 (r306486, copy of r306485, head/sys/ofed/include/linux/mlx4/device.h) @@ -0,0 +1,1327 @@ +/* + * Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU + * General Public License (GPL) Version 2, available from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - 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. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifndef MLX4_DEVICE_H +#define MLX4_DEVICE_H + +#include +#include +#include +#include +#include +#include +#include + +#include + +#define MAX_MSIX_P_PORT 17 +#define MAX_MSIX 64 +#define MSIX_LEGACY_SZ 4 +#define MIN_MSIX_P_PORT 5 + +#define MLX4_ROCE_MAX_GIDS 128 +#define MLX4_ROCE_PF_GIDS 16 + +#define MLX4_NUM_UP 8 +#define MLX4_NUM_TC 8 +#define MLX4_MAX_100M_UNITS_VAL 255 /* + * work around: can't set values + * greater then this value when + * using 100 Mbps units. + */ +#define MLX4_RATELIMIT_100M_UNITS 3 /* 100 Mbps */ +#define MLX4_RATELIMIT_1G_UNITS 4 /* 1 Gbps */ +#define MLX4_RATELIMIT_DEFAULT 0x00ff + +#define CORE_CLOCK_MASK 0xffffffffffffULL + +enum { + MLX4_FLAG_MSI_X = 1 << 0, + MLX4_FLAG_OLD_PORT_CMDS = 1 << 1, + MLX4_FLAG_MASTER = 1 << 2, + MLX4_FLAG_SLAVE = 1 << 3, + MLX4_FLAG_SRIOV = 1 << 4, + MLX4_FLAG_DEV_NUM_STR = 1 << 5, + MLX4_FLAG_OLD_REG_MAC = 1 << 6, +}; + +enum { + MLX4_PORT_CAP_IS_SM = 1 << 1, + MLX4_PORT_CAP_DEV_MGMT_SUP = 1 << 19, +}; + +enum { + MLX4_MAX_PORTS = 2, + MLX4_MAX_PORT_PKEYS = 128 +}; + +/* base qkey for use in sriov tunnel-qp/proxy-qp communication. + * These qkeys must not be allowed for general use. This is a 64k range, + * and to test for violation, we use the mask (protect against future chg). + */ +#define MLX4_RESERVED_QKEY_BASE (0xFFFF0000) +#define MLX4_RESERVED_QKEY_MASK (0xFFFF0000) + +enum { + MLX4_BOARD_ID_LEN = 64, + MLX4_VSD_LEN = 208 +}; + +enum { + MLX4_MAX_NUM_PF = 16, + MLX4_MAX_NUM_VF = 64, + MLX4_MFUNC_MAX = 80, + MLX4_MAX_EQ_NUM = 1024, + MLX4_MFUNC_EQ_NUM = 4, + MLX4_MFUNC_MAX_EQES = 8, + MLX4_MFUNC_EQE_MASK = (MLX4_MFUNC_MAX_EQES - 1) +}; + +/* Driver supports 3 different device methods to manage traffic steering: + * -device managed - High level API for ib and eth flow steering. FW is + * managing flow steering tables. + * - B0 steering mode - Common low level API for ib and (if supported) eth. + * - A0 steering mode - Limited low level API for eth. In case of IB, + * B0 mode is in use. + */ +enum { + MLX4_STEERING_MODE_A0, + MLX4_STEERING_MODE_B0, + MLX4_STEERING_MODE_DEVICE_MANAGED +}; + +static inline const char *mlx4_steering_mode_str(int steering_mode) +{ + switch (steering_mode) { + case MLX4_STEERING_MODE_A0: + return "A0 steering"; + + case MLX4_STEERING_MODE_B0: + return "B0 steering"; + + case MLX4_STEERING_MODE_DEVICE_MANAGED: + return "Device managed flow steering"; + + default: + return "Unrecognize steering mode"; + } +} + +enum { + MLX4_DEV_CAP_FLAG_RC = 1LL << 0, + MLX4_DEV_CAP_FLAG_UC = 1LL << 1, + MLX4_DEV_CAP_FLAG_UD = 1LL << 2, + MLX4_DEV_CAP_FLAG_XRC = 1LL << 3, + MLX4_DEV_CAP_FLAG_SRQ = 1LL << 6, + MLX4_DEV_CAP_FLAG_IPOIB_CSUM = 1LL << 7, + MLX4_DEV_CAP_FLAG_BAD_PKEY_CNTR = 1LL << 8, + MLX4_DEV_CAP_FLAG_BAD_QKEY_CNTR = 1LL << 9, + MLX4_DEV_CAP_FLAG_DPDP = 1LL << 12, + MLX4_DEV_CAP_FLAG_BLH = 1LL << 15, + MLX4_DEV_CAP_FLAG_MEM_WINDOW = 1LL << 16, + MLX4_DEV_CAP_FLAG_APM = 1LL << 17, + MLX4_DEV_CAP_FLAG_ATOMIC = 1LL << 18, + MLX4_DEV_CAP_FLAG_RAW_MCAST = 1LL << 19, + MLX4_DEV_CAP_FLAG_UD_AV_PORT = 1LL << 20, + MLX4_DEV_CAP_FLAG_UD_MCAST = 1LL << 21, + MLX4_DEV_CAP_FLAG_IBOE = 1LL << 30, + MLX4_DEV_CAP_FLAG_UC_LOOPBACK = 1LL << 32, + MLX4_DEV_CAP_FLAG_FCS_KEEP = 1LL << 34, + MLX4_DEV_CAP_FLAG_WOL_PORT1 = 1LL << 37, + MLX4_DEV_CAP_FLAG_WOL_PORT2 = 1LL << 38, + MLX4_DEV_CAP_FLAG_UDP_RSS = 1LL << 40, + MLX4_DEV_CAP_FLAG_VEP_UC_STEER = 1LL << 41, + MLX4_DEV_CAP_FLAG_VEP_MC_STEER = 1LL << 42, + MLX4_DEV_CAP_FLAG_CROSS_CHANNEL = 1LL << 44, + MLX4_DEV_CAP_FLAG_COUNTERS = 1LL << 48, + MLX4_DEV_CAP_FLAG_COUNTERS_EXT = 1LL << 49, + MLX4_DEV_CAP_FLAG_SET_PORT_ETH_SCHED = 1LL << 53, + MLX4_DEV_CAP_FLAG_SENSE_SUPPORT = 1LL << 55, + MLX4_DEV_CAP_FLAG_FAST_DROP = 1LL << 57, + MLX4_DEV_CAP_FLAG_PORT_MNG_CHG_EV = 1LL << 59, + MLX4_DEV_CAP_FLAG_64B_EQE = 1LL << 61, + MLX4_DEV_CAP_FLAG_64B_CQE = 1LL << 62 +}; + +enum { + MLX4_DEV_CAP_FLAG2_RSS = 1LL << 0, + MLX4_DEV_CAP_FLAG2_RSS_TOP = 1LL << 1, + MLX4_DEV_CAP_FLAG2_RSS_XOR = 1LL << 2, + MLX4_DEV_CAP_FLAG2_FS_EN = 1LL << 3, + MLX4_DEV_CAP_FLAG2_FSM = 1LL << 4, + MLX4_DEV_CAP_FLAG2_VLAN_CONTROL = 1LL << 5, + MLX4_DEV_CAP_FLAG2_UPDATE_QP = 1LL << 6, + MLX4_DEV_CAP_FLAG2_LB_SRC_CHK = 1LL << 7, + MLX4_DEV_CAP_FLAG2_DMFS_IPOIB = 1LL << 8, + MLX4_DEV_CAP_FLAG2_ETS_CFG = 1LL << 9, + MLX4_DEV_CAP_FLAG2_ETH_BACKPL_AN_REP = 1LL << 10, + MLX4_DEV_CAP_FLAG2_FLOWSTATS_EN = 1LL << 11, + MLX4_DEV_CAP_FLAG2_RECOVERABLE_ERROR_EVENT = 1LL << 12, + MLX4_DEV_CAP_FLAG2_TS = 1LL << 13, + MLX4_DEV_CAP_FLAG2_DRIVER_VERSION_TO_FW = 1LL << 14, + MLX4_DEV_CAP_FLAG2_REASSIGN_MAC_EN = 1LL << 15, + MLX4_DEV_CAP_FLAG2_VXLAN_OFFLOADS = 1LL << 16, + MLX4_DEV_CAP_FLAG2_FS_EN_NCSI = 1LL << 17, + MLX4_DEV_CAP_FLAG2_80_VFS = 1LL << 18, + MLX4_DEV_CAP_FLAG2_DMFS_TAG_MODE = 1LL << 19, + MLX4_DEV_CAP_FLAG2_ROCEV2 = 1LL << 20, + MLX4_DEV_CAP_FLAG2_ETH_PROT_CTRL = 1LL << 21, + MLX4_DEV_CAP_FLAG2_CQE_STRIDE = 1LL << 22, + MLX4_DEV_CAP_FLAG2_EQE_STRIDE = 1LL << 23, + MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB = 1LL << 24, + MLX4_DEV_CAP_FLAG2_RX_CSUM_MODE = 1LL << 25, +}; + +/* bit enums for an 8-bit flags field indicating special use + * QPs which require special handling in qp_reserve_range. + * Currently, this only includes QPs used by the ETH interface, + * where we expect to use blueflame. These QPs must not have + * bits 6 and 7 set in their qp number. + * + * This enum may use only bits 0..7. + */ +enum { + MLX4_RESERVE_BF_QP = 1 << 7, +}; + +enum { + MLX4_DEV_CAP_CQ_FLAG_IO = 1 << 0 +}; + +enum { + MLX4_DEV_CAP_64B_EQE_ENABLED = 1LL << 0, + MLX4_DEV_CAP_64B_CQE_ENABLED = 1LL << 1 +}; + +enum { + MLX4_USER_DEV_CAP_64B_CQE = 1L << 0 +}; + +enum { + MLX4_FUNC_CAP_64B_EQE_CQE = 1L << 0 +}; + + +#define MLX4_ATTR_EXTENDED_PORT_INFO cpu_to_be16(0xff90) + +enum { + MLX4_BMME_FLAG_WIN_TYPE_2B = 1 << 1, + MLX4_BMME_FLAG_LOCAL_INV = 1 << 6, + MLX4_BMME_FLAG_REMOTE_INV = 1 << 7, + MLX4_BMME_FLAG_TYPE_2_WIN = 1 << 9, + MLX4_BMME_FLAG_RESERVED_LKEY = 1 << 10, + MLX4_BMME_FLAG_FAST_REG_WR = 1 << 11, +}; + +enum mlx4_event { + MLX4_EVENT_TYPE_COMP = 0x00, + MLX4_EVENT_TYPE_PATH_MIG = 0x01, + MLX4_EVENT_TYPE_COMM_EST = 0x02, + MLX4_EVENT_TYPE_SQ_DRAINED = 0x03, + MLX4_EVENT_TYPE_SRQ_QP_LAST_WQE = 0x13, + MLX4_EVENT_TYPE_SRQ_LIMIT = 0x14, + MLX4_EVENT_TYPE_CQ_ERROR = 0x04, + MLX4_EVENT_TYPE_WQ_CATAS_ERROR = 0x05, + MLX4_EVENT_TYPE_EEC_CATAS_ERROR = 0x06, + MLX4_EVENT_TYPE_PATH_MIG_FAILED = 0x07, + MLX4_EVENT_TYPE_WQ_INVAL_REQ_ERROR = 0x10, + MLX4_EVENT_TYPE_WQ_ACCESS_ERROR = 0x11, + MLX4_EVENT_TYPE_SRQ_CATAS_ERROR = 0x12, + MLX4_EVENT_TYPE_LOCAL_CATAS_ERROR = 0x08, + MLX4_EVENT_TYPE_PORT_CHANGE = 0x09, + MLX4_EVENT_TYPE_EQ_OVERFLOW = 0x0f, + MLX4_EVENT_TYPE_ECC_DETECT = 0x0e, + MLX4_EVENT_TYPE_CMD = 0x0a, + MLX4_EVENT_TYPE_VEP_UPDATE = 0x19, + MLX4_EVENT_TYPE_COMM_CHANNEL = 0x18, + MLX4_EVENT_TYPE_OP_REQUIRED = 0x1a, + MLX4_EVENT_TYPE_FATAL_WARNING = 0x1b, + MLX4_EVENT_TYPE_FLR_EVENT = 0x1c, + MLX4_EVENT_TYPE_PORT_MNG_CHG_EVENT = 0x1d, + MLX4_EVENT_TYPE_RECOVERABLE_ERROR_EVENT = 0x3e, + MLX4_EVENT_TYPE_NONE = 0xff, +}; + +enum { + MLX4_PORT_CHANGE_SUBTYPE_DOWN = 1, + MLX4_PORT_CHANGE_SUBTYPE_ACTIVE = 4 +}; + +enum { + MLX4_RECOVERABLE_ERROR_EVENT_SUBTYPE_BAD_CABLE = 1, + MLX4_RECOVERABLE_ERROR_EVENT_SUBTYPE_UNSUPPORTED_CABLE = 2, +}; + +enum { + MLX4_FATAL_WARNING_SUBTYPE_WARMING = 0, +}; + +enum slave_port_state { + SLAVE_PORT_DOWN = 0, + SLAVE_PENDING_UP, + SLAVE_PORT_UP, +}; + +enum slave_port_gen_event { + SLAVE_PORT_GEN_EVENT_DOWN = 0, + SLAVE_PORT_GEN_EVENT_UP, + SLAVE_PORT_GEN_EVENT_NONE, +}; + +enum slave_port_state_event { + MLX4_PORT_STATE_DEV_EVENT_PORT_DOWN, + MLX4_PORT_STATE_DEV_EVENT_PORT_UP, + MLX4_PORT_STATE_IB_PORT_STATE_EVENT_GID_VALID, + MLX4_PORT_STATE_IB_EVENT_GID_INVALID, +}; + +enum { + MLX4_PERM_LOCAL_READ = 1 << 10, + MLX4_PERM_LOCAL_WRITE = 1 << 11, + MLX4_PERM_REMOTE_READ = 1 << 12, + MLX4_PERM_REMOTE_WRITE = 1 << 13, + MLX4_PERM_ATOMIC = 1 << 14, + MLX4_PERM_BIND_MW = 1 << 15, +}; + +enum { + MLX4_OPCODE_NOP = 0x00, + MLX4_OPCODE_SEND_INVAL = 0x01, + MLX4_OPCODE_RDMA_WRITE = 0x08, + MLX4_OPCODE_RDMA_WRITE_IMM = 0x09, + MLX4_OPCODE_SEND = 0x0a, + MLX4_OPCODE_SEND_IMM = 0x0b, + MLX4_OPCODE_LSO = 0x0e, + MLX4_OPCODE_RDMA_READ = 0x10, + MLX4_OPCODE_ATOMIC_CS = 0x11, + MLX4_OPCODE_ATOMIC_FA = 0x12, + MLX4_OPCODE_MASKED_ATOMIC_CS = 0x14, + MLX4_OPCODE_MASKED_ATOMIC_FA = 0x15, + MLX4_OPCODE_BIND_MW = 0x18, + MLX4_OPCODE_FMR = 0x19, + MLX4_OPCODE_LOCAL_INVAL = 0x1b, + MLX4_OPCODE_CONFIG_CMD = 0x1f, + + MLX4_RECV_OPCODE_RDMA_WRITE_IMM = 0x00, + MLX4_RECV_OPCODE_SEND = 0x01, + MLX4_RECV_OPCODE_SEND_IMM = 0x02, + MLX4_RECV_OPCODE_SEND_INVAL = 0x03, + + MLX4_CQE_OPCODE_ERROR = 0x1e, + MLX4_CQE_OPCODE_RESIZE = 0x16, +}; + +enum { + MLX4_STAT_RATE_OFFSET = 5 +}; + +enum mlx4_protocol { + MLX4_PROT_IB_IPV6 = 0, + MLX4_PROT_ETH, + MLX4_PROT_IB_IPV4, + MLX4_PROT_FCOE +}; + +enum { + MLX4_MTT_FLAG_PRESENT = 1 +}; + +enum { + MLX4_MAX_MTT_SHIFT = 31 +}; + +enum mlx4_qp_region { + MLX4_QP_REGION_FW = 0, + MLX4_QP_REGION_ETH_ADDR, + MLX4_QP_REGION_FC_ADDR, + MLX4_QP_REGION_FC_EXCH, + MLX4_NUM_QP_REGION +}; + +enum mlx4_port_type { + MLX4_PORT_TYPE_NONE = 0, + MLX4_PORT_TYPE_IB = 1, + MLX4_PORT_TYPE_ETH = 2, + MLX4_PORT_TYPE_AUTO = 3, + MLX4_PORT_TYPE_NA = 4 +}; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Sep 30 08:24:19 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5EB1C0298F; Fri, 30 Sep 2016 08:24:19 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: from mail-ua0-x232.google.com (mail-ua0-x232.google.com [IPv6:2607:f8b0:400c:c08::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 52AA61CB; Fri, 30 Sep 2016 08:24:19 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: by mail-ua0-x232.google.com with SMTP id n13so87923688uaa.3; Fri, 30 Sep 2016 01:24:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zNuOb9GPAyuaPN0B7Ic7omR4Aa+zrih0V2B0NAXPzw4=; b=EDLzGxnMU6Y44RONZLNPNnS+NOJMtzzgh6geZTRjiwUuBKzg8XeI9E0aDEV6sYWWBH GUB1i+OYL6JX7dFa/zAvkX3NAk4GOCPKLlQIN4Kxi/badVovbEOPiK9fNV+5fiO53KSF hngGZgr7cYzEWeMoDZNAtfd6NTsKsiV5KIhS0Wdq6qVz+fnKQ2caK1v9LSxPTYAPQX5B e8RoTOd2q4QIT6J7gvvhAtDuLTvqY+K6djtjny77hG0QkRYL9j2m4F+kNAqYT4TY4rVe 6VW6/FLMWXETYOTcngJg57L7N2O8skPqfvSfoDb/2fq95o2JcCrPEG+OsqfGYOC6Zw6O Nolw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zNuOb9GPAyuaPN0B7Ic7omR4Aa+zrih0V2B0NAXPzw4=; b=I6XKULc2mYlMtBH5VHwH5/ZWJ4nAzFiXReF56p3hWx75FwOB1WmnVxe4iirdCoNax7 nCh5e0YrNgiYQf9LWfoOdddio/ZK2zTL24Nr4zwGI5YNREiVNe2MG0abW8PutbLxyRUb QcbAYfraY333ZSG7zJFWSXOvnxt2SCX/3XUAAW8lncx0Z/5GaJ/XlpBBoKD+NWCCU8bJ 7qzM18ytxDpkbhyNZ5zQ+r59pS6pEX2vcHOTI4dEchbBwG8IZJsto5WG2/nBOpkpZQdO QFs64xt7uOqvo8pneJgrnqyDfoKjhI0ZmVdF/K/2RBJXwU9EGxClSmwtO2SM+XmH4grB hEIg== X-Gm-Message-State: AA6/9Rmum4bpsfUHC7xzsx7AJrsHrbPfe5iSWLimFi5OiibClGC5KMAJP9arNuqcZkc86eiGXWvazMR1p/+Wlg== X-Received: by 10.176.69.238 with SMTP id u101mr1904148uau.175.1475223857991; Fri, 30 Sep 2016 01:24:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.81.121 with HTTP; Fri, 30 Sep 2016 01:24:17 -0700 (PDT) In-Reply-To: <201609300823.u8U8N7ff043558@repo.freebsd.org> References: <201609300823.u8U8N7ff043558@repo.freebsd.org> From: Sepherosa Ziehau Date: Fri, 30 Sep 2016 16:24:17 +0800 Message-ID: Subject: Re: svn commit: r306486 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/mlx4 sys/dev/mlx4/mlx4_core sys/dev/mlx4/mlx4_en sys/dev/mlx4/mlx4_ib sys/i386/conf sys/modules sys/modules/mlx4 sys/mo... To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 08:24:19 -0000 Nice! :) On Fri, Sep 30, 2016 at 4:23 PM, Hans Petter Selasky wrote: > Author: hselasky > Date: Fri Sep 30 08:23:06 2016 > New Revision: 306486 > URL: https://svnweb.freebsd.org/changeset/base/306486 > > Log: > Move the ConnectX-3 and ConnectX-2 driver from sys/ofed into sys/dev/mlx4 > like other PCI network drivers. The sys/ofed directory is now mainly > reserved for generic infiniband code, with exception of the mthca driver. > > - Add new manual page, mlx4en(4), describing how to configure and load > mlx4en. > > - All relevant driver C-files are now prefixed mlx4, mlx4_en and > mlx4_ib respectivly to avoid object filename collisions when compiling > the kernel. This also fixes an issue with proper dependency file > generation for the C-files in question. > > - Device mlxen is now device mlx4en and depends on device mlx4, see > mlx4en(4). Only the network device name remains unchanged. > > - The mlx4 and mlx4en modules are now built by default on i386 and > amd64 targets. Only building the mlx4ib module depends on > WITH_OFED=YES . > > Sponsored by: Mellanox Technologies > > Added: > head/share/man/man4/mlx4en.4 (contents, props changed) > head/sys/dev/mlx4/ > head/sys/dev/mlx4/cmd.h > - copied unchanged from r306485, head/sys/ofed/include/linux/mlx4/cmd.h > head/sys/dev/mlx4/cq.h > - copied, changed from r306485, head/sys/ofed/include/linux/mlx4/cq.h > head/sys/dev/mlx4/device.h > - copied unchanged from r306485, head/sys/ofed/include/linux/mlx4/device.h > head/sys/dev/mlx4/doorbell.h > - copied unchanged from r306485, head/sys/ofed/include/linux/mlx4/doorbell.h > head/sys/dev/mlx4/driver.h > - copied, changed from r306485, head/sys/ofed/include/linux/mlx4/driver.h > head/sys/dev/mlx4/mlx4_core/ > head/sys/dev/mlx4/mlx4_core/fw.h > - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/fw.h > head/sys/dev/mlx4/mlx4_core/icm.h > - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/icm.h > head/sys/dev/mlx4/mlx4_core/mlx4.h > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mlx4.h > head/sys/dev/mlx4/mlx4_core/mlx4_alloc.c > - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/alloc.c > head/sys/dev/mlx4/mlx4_core/mlx4_catas.c > - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/catas.c > head/sys/dev/mlx4/mlx4_core/mlx4_cmd.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/cmd.c > head/sys/dev/mlx4/mlx4_core/mlx4_cq.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/cq.c > head/sys/dev/mlx4/mlx4_core/mlx4_eq.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/eq.c > head/sys/dev/mlx4/mlx4_core/mlx4_fw.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/fw.c > head/sys/dev/mlx4/mlx4_core/mlx4_icm.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/icm.c > head/sys/dev/mlx4/mlx4_core/mlx4_intf.c > - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/intf.c > head/sys/dev/mlx4/mlx4_core/mlx4_main.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/main.c > head/sys/dev/mlx4/mlx4_core/mlx4_mcg.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mcg.c > head/sys/dev/mlx4/mlx4_core/mlx4_mr.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mr.c > head/sys/dev/mlx4/mlx4_core/mlx4_pd.c > - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/pd.c > head/sys/dev/mlx4/mlx4_core/mlx4_port.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/port.c > head/sys/dev/mlx4/mlx4_core/mlx4_profile.c > - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/profile.c > head/sys/dev/mlx4/mlx4_core/mlx4_qp.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/qp.c > head/sys/dev/mlx4/mlx4_core/mlx4_reset.c > - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/reset.c > head/sys/dev/mlx4/mlx4_core/mlx4_resource_tracker.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/resource_tracker.c > head/sys/dev/mlx4/mlx4_core/mlx4_sense.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/sense.c > head/sys/dev/mlx4/mlx4_core/mlx4_srq.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/srq.c > head/sys/dev/mlx4/mlx4_core/mlx4_sys_tune.c > - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/sys_tune.c > head/sys/dev/mlx4/mlx4_en/ > head/sys/dev/mlx4/mlx4_en/en.h > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/mlx4_en.h > head/sys/dev/mlx4/mlx4_en/en_port.h > - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/en_port.h > head/sys/dev/mlx4/mlx4_en/mlx4_en_cq.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_cq.c > head/sys/dev/mlx4/mlx4_en/mlx4_en_main.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_main.c > head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_netdev.c > head/sys/dev/mlx4/mlx4_en/mlx4_en_port.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_port.c > head/sys/dev/mlx4/mlx4_en/mlx4_en_resources.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_resources.c > head/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_rx.c > head/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c > - copied, changed from r306485, head/sys/ofed/drivers/net/mlx4/en_tx.c > head/sys/dev/mlx4/mlx4_ib/ > head/sys/dev/mlx4/mlx4_ib/mlx4_exp.h > - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_exp.h > head/sys/dev/mlx4/mlx4_ib/mlx4_ib.h > - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_ah.c > - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/ah.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_alias_GUID.c > - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/alias_GUID.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_cm.c > - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/cm.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_cq.c > - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/cq.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_doorbell.c > - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/doorbell.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_exp.c > - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_exp.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_mad.c > - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mad.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c > - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/main.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_mcg.c > - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mcg.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_mr.c > - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/mr.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_qp.c > - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/qp.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_srq.c > - copied, changed from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/srq.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_sysfs.c > - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c > head/sys/dev/mlx4/mlx4_ib/mlx4_ib_wc.c > - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/wc.c > head/sys/dev/mlx4/mlx4_ib/user.h > - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/user.h > head/sys/dev/mlx4/mlx4_ib/wc.h > - copied unchanged from r306485, head/sys/ofed/drivers/infiniband/hw/mlx4/wc.h > head/sys/dev/mlx4/qp.h > - copied, changed from r306485, head/sys/ofed/include/linux/mlx4/qp.h > head/sys/dev/mlx4/srq.h > - copied unchanged from r306485, head/sys/ofed/include/linux/mlx4/srq.h > head/sys/dev/mlx4/stats.h > - copied unchanged from r306485, head/sys/ofed/drivers/net/mlx4/mlx4_stats.h > head/sys/modules/mlx4en/ > - copied from r306485, head/sys/modules/mlxen/ > Deleted: > head/sys/modules/mlxen/ > head/sys/ofed/drivers/infiniband/hw/mlx4/ > head/sys/ofed/drivers/net/ > head/sys/ofed/include/linux/ > Modified: > head/share/man/man4/Makefile > head/sys/amd64/conf/NOTES > head/sys/conf/files > head/sys/i386/conf/NOTES > head/sys/modules/Makefile > head/sys/modules/mlx4/Makefile > head/sys/modules/mlx4en/Makefile > head/sys/modules/mlx4ib/Makefile > > Modified: head/share/man/man4/Makefile > ============================================================================== > --- head/share/man/man4/Makefile Fri Sep 30 06:58:45 2016 (r306485) > +++ head/share/man/man4/Makefile Fri Sep 30 08:23:06 2016 (r306486) > @@ -279,6 +279,7 @@ MAN= aac.4 \ > mk48txx.4 \ > mld.4 \ > mlx.4 \ > + mlx4en.4 \ > mlx5en.4 \ > mly.4 \ > mmc.4 \ > > Added: head/share/man/man4/mlx4en.4 > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/share/man/man4/mlx4en.4 Fri Sep 30 08:23:06 2016 (r306486) > @@ -0,0 +1,95 @@ > +.\" Copyright (c) 2016 Mellanox Technologies > +.\" All rights reserved. > +.\" > +.\" Redistribution and use in source and binary forms, with or without > +.\" modification, are permitted provided that the following conditions > +.\" are met: > +.\" 1. Redistributions of source code must retain the above copyright > +.\" notice, this list of conditions and the following disclaimer. > +.\" 2. Redistributions in binary form must reproduce the above copyright > +.\" notice, this list of conditions and the following disclaimer in the > +.\" documentation and/or other materials provided with the distribution. > +.\" > +.\" THIS SOFTWARE IS PROVIDED BY 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 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$ > +.\" > +.Dd September 30, 2016 > +.Dt MLX4EN 4 > +.Os > +.Sh NAME > +.Nm mlx4en > +.Nd "Mellanox ConnectX-3 10GbE/40GbE network adapter driver" > +.Sh SYNOPSIS > +To compile this driver into the kernel, > +place the following lines in your > +kernel configuration file: > +.Bd -ragged -offset indent > +.Cd "options COMPAT_LINUXKPI" > +.Cd "device mlx4" > +.Cd "device mlx4en" > +.Ed > +.Pp > +To load the driver as a module at run-time, > +run the following command as root: > +.Bd -literal -offset indent > +kldload mlx4en > +.Ed > +.Pp > +To load the driver as a > +module at boot time, place the following lines in > +.Xr loader.conf 5 : > +.Bd -literal -offset indent > +mlx4en_load="YES" > +.Ed > +.Sh DESCRIPTION > +Mellanox ConnectX adapter cards with Virtual Protocol Interconnect > +(VPI) provide the highest performing and most flexible interconnect > +solution for Enterprise Data Centers, High-Performance Computing, and > +Embedded environments. > +Clustered data bases, parallelized applications, transactional > +services and high-performance embedded I/O applications will achieve > +significant performance improvements resulting in reduced completion > +time and lower cost per operation. > +.Sh HARDWARE > +The > +.Nm > +driver supports the following network adapters: > +.Pp > +.Bl -bullet -compact > +.It > +Mellanox ConnectX-2 (ETH) > +.It > +Mellanox ConnectX-3 (ETH) > +.El > +.Sh SUPPORT > +For general information and support, > +go to the Mellanox support website at: > +.Pa http://www.mellanox.com/ . > +.Pp > +If an issue is identified with this driver with a supported adapter, > +email all the specific information related to the issue to > +.Aq Mt freebsd-drivers@mellanox.com . > +.Sh SEE ALSO > +.Xr ifconfig 8 > +.Sh HISTORY > +The > +.Nm > +device driver first appeared in > +.Fx 9.x . > +.Sh AUTHORS > +.An -nosplit > +The > +.Nm > +driver was written by > +.An Mellanox Technologies . > > Modified: head/sys/amd64/conf/NOTES > ============================================================================== > --- head/sys/amd64/conf/NOTES Fri Sep 30 06:58:45 2016 (r306485) > +++ head/sys/amd64/conf/NOTES Fri Sep 30 08:23:06 2016 (r306486) > @@ -318,7 +318,7 @@ options DRM_DEBUG # Include debug print > # ixl: Intel XL710 40Gbe PCIE Ethernet > # ixlv: Intel XL710 40Gbe VF PCIE Ethernet > # mlx4ib: Mellanox ConnectX HCA InfiniBand > -# mlxen: Mellanox ConnectX HCA Ethernet > +# mlx4en: Mellanox ConnectX HCA Ethernet > # mthca: Mellanox HCA InfiniBand > # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) > # sfxge: Solarflare SFC9000 family 10Gb Ethernet adapters > @@ -336,8 +336,9 @@ device iwi # Intel 2200BG/2225BG/2915A > device iwn # Intel 4965/1000/5000/6000 wireless NICs. > device ixl # Intel XL710 40Gbe PCIE Ethernet > device ixlv # Intel XL710 40Gbe VF PCIE Ethernet > +device mlx4 # Shared code module between IB and Ethernet > device mlx4ib # Mellanox ConnectX HCA InfiniBand > -device mlxen # Mellanox ConnectX HCA Ethernet > +device mlx4en # Mellanox ConnectX HCA Ethernet > device mthca # Mellanox HCA InfiniBand > device nfe # nVidia nForce MCP on-board Ethernet > device sfxge # Solarflare SFC9000 10Gb Ethernet > > Modified: head/sys/conf/files > ============================================================================== > --- head/sys/conf/files Fri Sep 30 06:58:45 2016 (r306485) > +++ head/sys/conf/files Fri Sep 30 08:23:06 2016 (r306486) > @@ -4036,131 +4036,90 @@ ofed/drivers/infiniband/ulp/sdp/sdp_cma. > ofed/drivers/infiniband/ulp/sdp/sdp_tx.c optional sdp inet \ > compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" > > -ofed/drivers/infiniband/hw/mlx4/alias_GUID.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/mcg.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/sysfs.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/cm.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/ah.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/cq.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/doorbell.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/mad.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/main.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/mlx4_exp.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/mr.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/qp.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/srq.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > -ofed/drivers/infiniband/hw/mlx4/wc.c optional mlx4ib \ > - no-depend obj-prefix "mlx4ib_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" > +dev/mlx4/mlx4_ib/mlx4_ib_alias_GUID.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_mcg.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_sysfs.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_cm.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_ah.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_cq.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_doorbell.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_mad.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_main.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_exp.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_mr.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_qp.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_srq.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_ib/mlx4_ib_wc.c optional mlx4ib pci ofed \ > + compile-with "${OFED_C}" > > -ofed/drivers/net/mlx4/alloc.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/catas.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/cmd.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/cq.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/eq.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/fw.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/icm.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/intf.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/main.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/mcg.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/ -Wno-unused" > -ofed/drivers/net/mlx4/mr.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/pd.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/port.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/profile.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/qp.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/reset.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/sense.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/srq.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/resource_tracker.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/sys_tune.c optional mlx4ib | mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > +dev/mlx4/mlx4_core/mlx4_alloc.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_catas.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_cmd.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_cq.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_eq.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_fw.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_icm.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_intf.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_main.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_mcg.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_mr.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_pd.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_port.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_profile.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_qp.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_reset.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_sense.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_srq.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_resource_tracker.c optional mlx4 pci \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_core/mlx4_sys_tune.c optional mlx4 pci \ > + compile-with "${OFED_C}" > > -ofed/drivers/net/mlx4/en_cq.c optional mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/en_main.c optional mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/en_netdev.c optional mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/en_port.c optional mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/en_resources.c optional mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/en_rx.c optional mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > -ofed/drivers/net/mlx4/en_tx.c optional mlxen \ > - no-depend obj-prefix "mlx4_" \ > - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" > +dev/mlx4/mlx4_en/mlx4_en_cq.c optional mlx4en pci inet inet6 \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_en/mlx4_en_main.c optional mlx4en pci inet inet6 \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_en/mlx4_en_netdev.c optional mlx4en pci inet inet6 \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_en/mlx4_en_port.c optional mlx4en pci inet inet6 \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_en/mlx4_en_resources.c optional mlx4en pci inet inet6 \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_en/mlx4_en_rx.c optional mlx4en pci inet inet6 \ > + compile-with "${OFED_C}" > +dev/mlx4/mlx4_en/mlx4_en_tx.c optional mlx4en pci inet inet6 \ > + compile-with "${OFED_C}" > > dev/mlx5/mlx5_core/mlx5_alloc.c optional mlx5 pci \ > compile-with "${OFED_C}" > > Copied: head/sys/dev/mlx4/cmd.h (from r306485, head/sys/ofed/include/linux/mlx4/cmd.h) > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/dev/mlx4/cmd.h Fri Sep 30 08:23:06 2016 (r306486, copy of r306485, head/sys/ofed/include/linux/mlx4/cmd.h) > @@ -0,0 +1,258 @@ > +/* > + * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. > + * > + * This software is available to you under a choice of one of two > + * licenses. You may choose to be licensed under the terms of the GNU > + * General Public License (GPL) Version 2, available from the file > + * COPYING in the main directory of this source tree, or the > + * OpenIB.org BSD license below: > + * > + * Redistribution and use in source and binary forms, with or > + * without modification, are permitted provided that the following > + * conditions are met: > + * > + * - Redistributions of source code must retain the above > + * copyright notice, this list of conditions and the following > + * disclaimer. > + * > + * - 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. > + * > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, > + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF > + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND > + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS > + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN > + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN > + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE > + * SOFTWARE. > + */ > + > +#ifndef MLX4_CMD_H > +#define MLX4_CMD_H > + > +#include > +#include > + > +enum { > + /* initialization and general commands */ > + MLX4_CMD_SYS_EN = 0x1, > + MLX4_CMD_SYS_DIS = 0x2, > + MLX4_CMD_MAP_FA = 0xfff, > + MLX4_CMD_UNMAP_FA = 0xffe, > + MLX4_CMD_RUN_FW = 0xff6, > + MLX4_CMD_MOD_STAT_CFG = 0x34, > + MLX4_CMD_QUERY_DEV_CAP = 0x3, > + MLX4_CMD_QUERY_FW = 0x4, > + MLX4_CMD_ENABLE_LAM = 0xff8, > + MLX4_CMD_DISABLE_LAM = 0xff7, > + MLX4_CMD_QUERY_DDR = 0x5, > + MLX4_CMD_QUERY_ADAPTER = 0x6, > + MLX4_CMD_INIT_HCA = 0x7, > + MLX4_CMD_CLOSE_HCA = 0x8, > + MLX4_CMD_INIT_PORT = 0x9, > + MLX4_CMD_CLOSE_PORT = 0xa, > + MLX4_CMD_QUERY_HCA = 0xb, > + MLX4_CMD_QUERY_PORT = 0x43, > + MLX4_CMD_SENSE_PORT = 0x4d, > + MLX4_CMD_HW_HEALTH_CHECK = 0x50, > + MLX4_CMD_SET_PORT = 0xc, > + MLX4_CMD_SET_NODE = 0x5a, > + MLX4_CMD_QUERY_FUNC = 0x56, > + MLX4_CMD_ACCESS_DDR = 0x2e, > + MLX4_CMD_MAP_ICM = 0xffa, > + MLX4_CMD_UNMAP_ICM = 0xff9, > + MLX4_CMD_MAP_ICM_AUX = 0xffc, > + MLX4_CMD_UNMAP_ICM_AUX = 0xffb, > + MLX4_CMD_SET_ICM_SIZE = 0xffd, > + /*master notify fw on finish for slave's flr*/ > + MLX4_CMD_INFORM_FLR_DONE = 0x5b, > + MLX4_CMD_GET_OP_REQ = 0x59, > + > + /* TPT commands */ > + MLX4_CMD_SW2HW_MPT = 0xd, > + MLX4_CMD_QUERY_MPT = 0xe, > + MLX4_CMD_HW2SW_MPT = 0xf, > + MLX4_CMD_READ_MTT = 0x10, > + MLX4_CMD_WRITE_MTT = 0x11, > + MLX4_CMD_SYNC_TPT = 0x2f, > + > + /* EQ commands */ > + MLX4_CMD_MAP_EQ = 0x12, > + MLX4_CMD_SW2HW_EQ = 0x13, > + MLX4_CMD_HW2SW_EQ = 0x14, > + MLX4_CMD_QUERY_EQ = 0x15, > + > + /* CQ commands */ > + MLX4_CMD_SW2HW_CQ = 0x16, > + MLX4_CMD_HW2SW_CQ = 0x17, > + MLX4_CMD_QUERY_CQ = 0x18, > + MLX4_CMD_MODIFY_CQ = 0x2c, > + > + /* SRQ commands */ > + MLX4_CMD_SW2HW_SRQ = 0x35, > + MLX4_CMD_HW2SW_SRQ = 0x36, > + MLX4_CMD_QUERY_SRQ = 0x37, > + MLX4_CMD_ARM_SRQ = 0x40, > + > + /* QP/EE commands */ > + MLX4_CMD_RST2INIT_QP = 0x19, > + MLX4_CMD_INIT2RTR_QP = 0x1a, > + MLX4_CMD_RTR2RTS_QP = 0x1b, > + MLX4_CMD_RTS2RTS_QP = 0x1c, > + MLX4_CMD_SQERR2RTS_QP = 0x1d, > + MLX4_CMD_2ERR_QP = 0x1e, > + MLX4_CMD_RTS2SQD_QP = 0x1f, > + MLX4_CMD_SQD2SQD_QP = 0x38, > + MLX4_CMD_SQD2RTS_QP = 0x20, > + MLX4_CMD_2RST_QP = 0x21, > + MLX4_CMD_QUERY_QP = 0x22, > + MLX4_CMD_INIT2INIT_QP = 0x2d, > + MLX4_CMD_SUSPEND_QP = 0x32, > + MLX4_CMD_UNSUSPEND_QP = 0x33, > + MLX4_CMD_UPDATE_QP = 0x61, > + /* special QP and management commands */ > + MLX4_CMD_CONF_SPECIAL_QP = 0x23, > + MLX4_CMD_MAD_IFC = 0x24, > + > + /* multicast commands */ > + MLX4_CMD_READ_MCG = 0x25, > + MLX4_CMD_WRITE_MCG = 0x26, > + MLX4_CMD_MGID_HASH = 0x27, > + > + /* miscellaneous commands */ > + MLX4_CMD_DIAG_RPRT = 0x30, > + MLX4_CMD_NOP = 0x31, > + MLX4_CMD_ACCESS_MEM = 0x2e, > + MLX4_CMD_SET_VEP = 0x52, > + > + /* Ethernet specific commands */ > + MLX4_CMD_SET_VLAN_FLTR = 0x47, > + MLX4_CMD_SET_MCAST_FLTR = 0x48, > + MLX4_CMD_DUMP_ETH_STATS = 0x49, > + > + /* Communication channel commands */ > + MLX4_CMD_ARM_COMM_CHANNEL = 0x57, > + MLX4_CMD_GEN_EQE = 0x58, > + > + /* virtual commands */ > + MLX4_CMD_ALLOC_RES = 0xf00, > + MLX4_CMD_FREE_RES = 0xf01, > + MLX4_CMD_MCAST_ATTACH = 0xf05, > + MLX4_CMD_UCAST_ATTACH = 0xf06, > + MLX4_CMD_PROMISC = 0xf08, > + MLX4_CMD_QUERY_FUNC_CAP = 0xf0a, > + MLX4_CMD_QP_ATTACH = 0xf0b, > + > + /* debug commands */ > + MLX4_CMD_QUERY_DEBUG_MSG = 0x2a, > + MLX4_CMD_SET_DEBUG_MSG = 0x2b, > + > + /* statistics commands */ > + MLX4_CMD_QUERY_IF_STAT = 0X54, > + MLX4_CMD_SET_IF_STAT = 0X55, > + > + /* register/delete flow steering network rules */ > + MLX4_QP_FLOW_STEERING_ATTACH = 0x65, > + MLX4_QP_FLOW_STEERING_DETACH = 0x66, > + MLX4_FLOW_STEERING_IB_UC_QP_RANGE = 0x64, > +}; > + > +enum { > + MLX4_CMD_TIME_CLASS_A = 60000, > + MLX4_CMD_TIME_CLASS_B = 60000, > + MLX4_CMD_TIME_CLASS_C = 60000, > +}; > + > +enum { > + MLX4_MAILBOX_SIZE = 4096, > + MLX4_ACCESS_MEM_ALIGN = 256, > +}; > + > +enum { > + /* set port opcode modifiers */ > + MLX4_SET_PORT_GENERAL = 0x0, > + MLX4_SET_PORT_RQP_CALC = 0x1, > + MLX4_SET_PORT_MAC_TABLE = 0x2, > + MLX4_SET_PORT_VLAN_TABLE = 0x3, > + MLX4_SET_PORT_PRIO_MAP = 0x4, > + MLX4_SET_PORT_GID_TABLE = 0x5, > + MLX4_SET_PORT_PRIO2TC = 0x8, > + MLX4_SET_PORT_SCHEDULER = 0x9 > +}; > + > +enum { > + MLX4_CMD_WRAPPED, > + MLX4_CMD_NATIVE > +}; > + > +struct mlx4_dev; > + > +struct mlx4_cmd_mailbox { > + void *buf; > + dma_addr_t dma; > +}; > + > +int __mlx4_cmd(struct mlx4_dev *dev, u64 in_param, u64 *out_param, > + int out_is_imm, u32 in_modifier, u8 op_modifier, > + u16 op, unsigned long timeout, int native); > + > +/* Invoke a command with no output parameter */ > +static inline int mlx4_cmd(struct mlx4_dev *dev, u64 in_param, u32 in_modifier, > + u8 op_modifier, u16 op, unsigned long timeout, > + int native) > +{ > + return __mlx4_cmd(dev, in_param, NULL, 0, in_modifier, > + op_modifier, op, timeout, native); > +} > + > +/* Invoke a command with an output mailbox */ > +static inline int mlx4_cmd_box(struct mlx4_dev *dev, u64 in_param, u64 out_param, > + u32 in_modifier, u8 op_modifier, u16 op, > + unsigned long timeout, int native) > +{ > + return __mlx4_cmd(dev, in_param, &out_param, 0, in_modifier, > + op_modifier, op, timeout, native); > +} > + > +/* > + * Invoke a command with an immediate output parameter (and copy the > + * output into the caller's out_param pointer after the command > + * executes). > + */ > +static inline int mlx4_cmd_imm(struct mlx4_dev *dev, u64 in_param, u64 *out_param, > + u32 in_modifier, u8 op_modifier, u16 op, > + unsigned long timeout, int native) > +{ > + return __mlx4_cmd(dev, in_param, out_param, 1, in_modifier, > + op_modifier, op, timeout, native); > +} > + > +struct mlx4_cmd_mailbox *mlx4_alloc_cmd_mailbox(struct mlx4_dev *dev); > +void mlx4_free_cmd_mailbox(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox); > + > +u32 mlx4_comm_get_version(void); > +int mlx4_set_vf_mac(struct mlx4_dev *dev, int port, int vf, u8 *mac); > +int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan, u8 qos); > +int mlx4_set_vf_spoofchk(struct mlx4_dev *dev, int port, int vf, bool setting); > +int mlx4_set_vf_link_state(struct mlx4_dev *dev, int port, int vf, int link_state); > +int mlx4_get_vf_link_state(struct mlx4_dev *dev, int port, int vf); > +/* > + * mlx4_get_slave_default_vlan - > + * retrun true if VST ( default vlan) > + * if VST will fill vlan & qos (if not NULL) > + */ > +bool mlx4_get_slave_default_vlan(struct mlx4_dev *dev, int port, int slave, u16 *vlan, u8 *qos); > + > +enum { > + IFLA_VF_LINK_STATE_AUTO, /* link state of the uplink */ > + IFLA_VF_LINK_STATE_ENABLE, /* link always up */ > + IFLA_VF_LINK_STATE_DISABLE, /* link always down */ > + __IFLA_VF_LINK_STATE_MAX, > +}; > + > +#define MLX4_COMM_GET_IF_REV(cmd_chan_ver) (u8)((cmd_chan_ver) >> 8) > + > +#endif /* MLX4_CMD_H */ > > Copied and modified: head/sys/dev/mlx4/cq.h (from r306485, head/sys/ofed/include/linux/mlx4/cq.h) > ============================================================================== > --- head/sys/ofed/include/linux/mlx4/cq.h Fri Sep 30 06:58:45 2016 (r306485, copy source) > +++ head/sys/dev/mlx4/cq.h Fri Sep 30 08:23:06 2016 (r306486) > @@ -35,8 +35,8 @@ > > #include > > -#include > -#include > +#include > +#include > > struct mlx4_cqe { > __be32 vlan_my_qpn; > > Copied: head/sys/dev/mlx4/device.h (from r306485, head/sys/ofed/include/linux/mlx4/device.h) > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/dev/mlx4/device.h Fri Sep 30 08:23:06 2016 (r306486, copy of r306485, head/sys/ofed/include/linux/mlx4/device.h) > @@ -0,0 +1,1327 @@ > +/* > + * Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved. > + * > + * This software is available to you under a choice of one of two > + * licenses. You may choose to be licensed under the terms of the GNU > + * General Public License (GPL) Version 2, available from the file > + * COPYING in the main directory of this source tree, or the > + * OpenIB.org BSD license below: > + * > + * Redistribution and use in source and binary forms, with or > + * without modification, are permitted provided that the following > + * conditions are met: > + * > + * - Redistributions of source code must retain the above > + * copyright notice, this list of conditions and the following > + * disclaimer. > + * > + * - 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. > + * > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, > + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF > + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND > + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS > + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN > + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN > + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE > + * SOFTWARE. > + */ > + > +#ifndef MLX4_DEVICE_H > +#define MLX4_DEVICE_H > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > + > +#define MAX_MSIX_P_PORT 17 > +#define MAX_MSIX 64 > +#define MSIX_LEGACY_SZ 4 > +#define MIN_MSIX_P_PORT 5 > + > +#define MLX4_ROCE_MAX_GIDS 128 > +#define MLX4_ROCE_PF_GIDS 16 > + > +#define MLX4_NUM_UP 8 > +#define MLX4_NUM_TC 8 > +#define MLX4_MAX_100M_UNITS_VAL 255 /* > + * work around: can't set values > + * greater then this value when > + * using 100 Mbps units. > + */ > +#define MLX4_RATELIMIT_100M_UNITS 3 /* 100 Mbps */ > +#define MLX4_RATELIMIT_1G_UNITS 4 /* 1 Gbps */ > +#define MLX4_RATELIMIT_DEFAULT 0x00ff > + > +#define CORE_CLOCK_MASK 0xffffffffffffULL > + > +enum { > + MLX4_FLAG_MSI_X = 1 << 0, > + MLX4_FLAG_OLD_PORT_CMDS = 1 << 1, > + MLX4_FLAG_MASTER = 1 << 2, > + MLX4_FLAG_SLAVE = 1 << 3, > + MLX4_FLAG_SRIOV = 1 << 4, > + MLX4_FLAG_DEV_NUM_STR = 1 << 5, > + MLX4_FLAG_OLD_REG_MAC = 1 << 6, > +}; > + > +enum { > + MLX4_PORT_CAP_IS_SM = 1 << 1, > + MLX4_PORT_CAP_DEV_MGMT_SUP = 1 << 19, > +}; > + > +enum { > + MLX4_MAX_PORTS = 2, > + MLX4_MAX_PORT_PKEYS = 128 > +}; > + > +/* base qkey for use in sriov tunnel-qp/proxy-qp communication. > + * These qkeys must not be allowed for general use. This is a 64k range, > + * and to test for violation, we use the mask (protect against future chg). > + */ > +#define MLX4_RESERVED_QKEY_BASE (0xFFFF0000) > +#define MLX4_RESERVED_QKEY_MASK (0xFFFF0000) > + > +enum { > + MLX4_BOARD_ID_LEN = 64, > + MLX4_VSD_LEN = 208 > +}; > + > +enum { > + MLX4_MAX_NUM_PF = 16, > + MLX4_MAX_NUM_VF = 64, > + MLX4_MFUNC_MAX = 80, > + MLX4_MAX_EQ_NUM = 1024, > + MLX4_MFUNC_EQ_NUM = 4, > + MLX4_MFUNC_MAX_EQES = 8, > + MLX4_MFUNC_EQE_MASK = (MLX4_MFUNC_MAX_EQES - 1) > +}; > + > +/* Driver supports 3 different device methods to manage traffic steering: > + * -device managed - High level API for ib and eth flow steering. FW is > + * managing flow steering tables. > + * - B0 steering mode - Common low level API for ib and (if supported) eth. > + * - A0 steering mode - Limited low level API for eth. In case of IB, > + * B0 mode is in use. > + */ > +enum { > + MLX4_STEERING_MODE_A0, > + MLX4_STEERING_MODE_B0, > + MLX4_STEERING_MODE_DEVICE_MANAGED > +}; > + > +static inline const char *mlx4_steering_mode_str(int steering_mode) > +{ > + switch (steering_mode) { > + case MLX4_STEERING_MODE_A0: > + return "A0 steering"; > + > + case MLX4_STEERING_MODE_B0: > + return "B0 steering"; > + > + case MLX4_STEERING_MODE_DEVICE_MANAGED: > + return "Device managed flow steering"; > + > + default: > + return "Unrecognize steering mode"; > + } > +} > + > +enum { > + MLX4_DEV_CAP_FLAG_RC = 1LL << 0, > + MLX4_DEV_CAP_FLAG_UC = 1LL << 1, > + MLX4_DEV_CAP_FLAG_UD = 1LL << 2, > + MLX4_DEV_CAP_FLAG_XRC = 1LL << 3, > + MLX4_DEV_CAP_FLAG_SRQ = 1LL << 6, > + MLX4_DEV_CAP_FLAG_IPOIB_CSUM = 1LL << 7, > + MLX4_DEV_CAP_FLAG_BAD_PKEY_CNTR = 1LL << 8, > + MLX4_DEV_CAP_FLAG_BAD_QKEY_CNTR = 1LL << 9, > + MLX4_DEV_CAP_FLAG_DPDP = 1LL << 12, > + MLX4_DEV_CAP_FLAG_BLH = 1LL << 15, > + MLX4_DEV_CAP_FLAG_MEM_WINDOW = 1LL << 16, > + MLX4_DEV_CAP_FLAG_APM = 1LL << 17, > + MLX4_DEV_CAP_FLAG_ATOMIC = 1LL << 18, > + MLX4_DEV_CAP_FLAG_RAW_MCAST = 1LL << 19, > + MLX4_DEV_CAP_FLAG_UD_AV_PORT = 1LL << 20, > + MLX4_DEV_CAP_FLAG_UD_MCAST = 1LL << 21, > + MLX4_DEV_CAP_FLAG_IBOE = 1LL << 30, > + MLX4_DEV_CAP_FLAG_UC_LOOPBACK = 1LL << 32, > + MLX4_DEV_CAP_FLAG_FCS_KEEP = 1LL << 34, > + MLX4_DEV_CAP_FLAG_WOL_PORT1 = 1LL << 37, > + MLX4_DEV_CAP_FLAG_WOL_PORT2 = 1LL << 38, > + MLX4_DEV_CAP_FLAG_UDP_RSS = 1LL << 40, > + MLX4_DEV_CAP_FLAG_VEP_UC_STEER = 1LL << 41, > + MLX4_DEV_CAP_FLAG_VEP_MC_STEER = 1LL << 42, > + MLX4_DEV_CAP_FLAG_CROSS_CHANNEL = 1LL << 44, > + MLX4_DEV_CAP_FLAG_COUNTERS = 1LL << 48, > + MLX4_DEV_CAP_FLAG_COUNTERS_EXT = 1LL << 49, > + MLX4_DEV_CAP_FLAG_SET_PORT_ETH_SCHED = 1LL << 53, > + MLX4_DEV_CAP_FLAG_SENSE_SUPPORT = 1LL << 55, > + MLX4_DEV_CAP_FLAG_FAST_DROP = 1LL << 57, > + MLX4_DEV_CAP_FLAG_PORT_MNG_CHG_EV = 1LL << 59, > + MLX4_DEV_CAP_FLAG_64B_EQE = 1LL << 61, > + MLX4_DEV_CAP_FLAG_64B_CQE = 1LL << 62 > +}; > + > +enum { > + MLX4_DEV_CAP_FLAG2_RSS = 1LL << 0, > + MLX4_DEV_CAP_FLAG2_RSS_TOP = 1LL << 1, > + MLX4_DEV_CAP_FLAG2_RSS_XOR = 1LL << 2, > + MLX4_DEV_CAP_FLAG2_FS_EN = 1LL << 3, > + MLX4_DEV_CAP_FLAG2_FSM = 1LL << 4, > + MLX4_DEV_CAP_FLAG2_VLAN_CONTROL = 1LL << 5, > + MLX4_DEV_CAP_FLAG2_UPDATE_QP = 1LL << 6, > + MLX4_DEV_CAP_FLAG2_LB_SRC_CHK = 1LL << 7, > + MLX4_DEV_CAP_FLAG2_DMFS_IPOIB = 1LL << 8, > + MLX4_DEV_CAP_FLAG2_ETS_CFG = 1LL << 9, > + MLX4_DEV_CAP_FLAG2_ETH_BACKPL_AN_REP = 1LL << 10, > + MLX4_DEV_CAP_FLAG2_FLOWSTATS_EN = 1LL << 11, > + MLX4_DEV_CAP_FLAG2_RECOVERABLE_ERROR_EVENT = 1LL << 12, > + MLX4_DEV_CAP_FLAG2_TS = 1LL << 13, > + MLX4_DEV_CAP_FLAG2_DRIVER_VERSION_TO_FW = 1LL << 14, > + MLX4_DEV_CAP_FLAG2_REASSIGN_MAC_EN = 1LL << 15, > + MLX4_DEV_CAP_FLAG2_VXLAN_OFFLOADS = 1LL << 16, > + MLX4_DEV_CAP_FLAG2_FS_EN_NCSI = 1LL << 17, > + MLX4_DEV_CAP_FLAG2_80_VFS = 1LL << 18, > + MLX4_DEV_CAP_FLAG2_DMFS_TAG_MODE = 1LL << 19, > + MLX4_DEV_CAP_FLAG2_ROCEV2 = 1LL << 20, > + MLX4_DEV_CAP_FLAG2_ETH_PROT_CTRL = 1LL << 21, > + MLX4_DEV_CAP_FLAG2_CQE_STRIDE = 1LL << 22, > + MLX4_DEV_CAP_FLAG2_EQE_STRIDE = 1LL << 23, > + MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB = 1LL << 24, > + MLX4_DEV_CAP_FLAG2_RX_CSUM_MODE = 1LL << 25, > +}; > + > +/* bit enums for an 8-bit flags field indicating special use > + * QPs which require special handling in qp_reserve_range. > + * Currently, this only includes QPs used by the ETH interface, > + * where we expect to use blueflame. These QPs must not have > + * bits 6 and 7 set in their qp number. > + * > + * This enum may use only bits 0..7. > + */ > +enum { > + MLX4_RESERVE_BF_QP = 1 << 7, > +}; > + > +enum { > + MLX4_DEV_CAP_CQ_FLAG_IO = 1 << 0 > +}; > + > +enum { > + MLX4_DEV_CAP_64B_EQE_ENABLED = 1LL << 0, > + MLX4_DEV_CAP_64B_CQE_ENABLED = 1LL << 1 > +}; > + > +enum { > + MLX4_USER_DEV_CAP_64B_CQE = 1L << 0 > +}; > + > +enum { > + MLX4_FUNC_CAP_64B_EQE_CQE = 1L << 0 > +}; > + > + > +#define MLX4_ATTR_EXTENDED_PORT_INFO cpu_to_be16(0xff90) > + > +enum { > + MLX4_BMME_FLAG_WIN_TYPE_2B = 1 << 1, > + MLX4_BMME_FLAG_LOCAL_INV = 1 << 6, > + MLX4_BMME_FLAG_REMOTE_INV = 1 << 7, > + MLX4_BMME_FLAG_TYPE_2_WIN = 1 << 9, > + MLX4_BMME_FLAG_RESERVED_LKEY = 1 << 10, > + MLX4_BMME_FLAG_FAST_REG_WR = 1 << 11, > +}; > + > +enum mlx4_event { > + MLX4_EVENT_TYPE_COMP = 0x00, > + MLX4_EVENT_TYPE_PATH_MIG = 0x01, > + MLX4_EVENT_TYPE_COMM_EST = 0x02, > + MLX4_EVENT_TYPE_SQ_DRAINED = 0x03, > + MLX4_EVENT_TYPE_SRQ_QP_LAST_WQE = 0x13, > + MLX4_EVENT_TYPE_SRQ_LIMIT = 0x14, > + MLX4_EVENT_TYPE_CQ_ERROR = 0x04, > + MLX4_EVENT_TYPE_WQ_CATAS_ERROR = 0x05, > + MLX4_EVENT_TYPE_EEC_CATAS_ERROR = 0x06, > + MLX4_EVENT_TYPE_PATH_MIG_FAILED = 0x07, > + MLX4_EVENT_TYPE_WQ_INVAL_REQ_ERROR = 0x10, > + MLX4_EVENT_TYPE_WQ_ACCESS_ERROR = 0x11, > + MLX4_EVENT_TYPE_SRQ_CATAS_ERROR = 0x12, > + MLX4_EVENT_TYPE_LOCAL_CATAS_ERROR = 0x08, > + MLX4_EVENT_TYPE_PORT_CHANGE = 0x09, > + MLX4_EVENT_TYPE_EQ_OVERFLOW = 0x0f, > + MLX4_EVENT_TYPE_ECC_DETECT = 0x0e, > + MLX4_EVENT_TYPE_CMD = 0x0a, > + MLX4_EVENT_TYPE_VEP_UPDATE = 0x19, > + MLX4_EVENT_TYPE_COMM_CHANNEL = 0x18, > + MLX4_EVENT_TYPE_OP_REQUIRED = 0x1a, > + MLX4_EVENT_TYPE_FATAL_WARNING = 0x1b, > + MLX4_EVENT_TYPE_FLR_EVENT = 0x1c, > + MLX4_EVENT_TYPE_PORT_MNG_CHG_EVENT = 0x1d, > + MLX4_EVENT_TYPE_RECOVERABLE_ERROR_EVENT = 0x3e, > + MLX4_EVENT_TYPE_NONE = 0xff, > +}; > + > +enum { > + MLX4_PORT_CHANGE_SUBTYPE_DOWN = 1, > + MLX4_PORT_CHANGE_SUBTYPE_ACTIVE = 4 > +}; > + > +enum { > + MLX4_RECOVERABLE_ERROR_EVENT_SUBTYPE_BAD_CABLE = 1, > + MLX4_RECOVERABLE_ERROR_EVENT_SUBTYPE_UNSUPPORTED_CABLE = 2, > +}; > + > +enum { > + MLX4_FATAL_WARNING_SUBTYPE_WARMING = 0, > +}; > + > +enum slave_port_state { > + SLAVE_PORT_DOWN = 0, > + SLAVE_PENDING_UP, > + SLAVE_PORT_UP, > +}; > + > +enum slave_port_gen_event { > + SLAVE_PORT_GEN_EVENT_DOWN = 0, > + SLAVE_PORT_GEN_EVENT_UP, > + SLAVE_PORT_GEN_EVENT_NONE, > +}; > + > +enum slave_port_state_event { > + MLX4_PORT_STATE_DEV_EVENT_PORT_DOWN, > + MLX4_PORT_STATE_DEV_EVENT_PORT_UP, > + MLX4_PORT_STATE_IB_PORT_STATE_EVENT_GID_VALID, > + MLX4_PORT_STATE_IB_EVENT_GID_INVALID, > +}; > + > +enum { > + MLX4_PERM_LOCAL_READ = 1 << 10, > + MLX4_PERM_LOCAL_WRITE = 1 << 11, > + MLX4_PERM_REMOTE_READ = 1 << 12, > + MLX4_PERM_REMOTE_WRITE = 1 << 13, > + MLX4_PERM_ATOMIC = 1 << 14, > + MLX4_PERM_BIND_MW = 1 << 15, > +}; > + > +enum { > + MLX4_OPCODE_NOP = 0x00, > + MLX4_OPCODE_SEND_INVAL = 0x01, > + MLX4_OPCODE_RDMA_WRITE = 0x08, > + MLX4_OPCODE_RDMA_WRITE_IMM = 0x09, > + MLX4_OPCODE_SEND = 0x0a, > + MLX4_OPCODE_SEND_IMM = 0x0b, > + MLX4_OPCODE_LSO = 0x0e, > + MLX4_OPCODE_RDMA_READ = 0x10, > + MLX4_OPCODE_ATOMIC_CS = 0x11, > + MLX4_OPCODE_ATOMIC_FA = 0x12, > + MLX4_OPCODE_MASKED_ATOMIC_CS = 0x14, > + MLX4_OPCODE_MASKED_ATOMIC_FA = 0x15, > + MLX4_OPCODE_BIND_MW = 0x18, > + MLX4_OPCODE_FMR = 0x19, > + MLX4_OPCODE_LOCAL_INVAL = 0x1b, > + MLX4_OPCODE_CONFIG_CMD = 0x1f, > + > + MLX4_RECV_OPCODE_RDMA_WRITE_IMM = 0x00, > + MLX4_RECV_OPCODE_SEND = 0x01, > + MLX4_RECV_OPCODE_SEND_IMM = 0x02, > + MLX4_RECV_OPCODE_SEND_INVAL = 0x03, > + > + MLX4_CQE_OPCODE_ERROR = 0x1e, > + MLX4_CQE_OPCODE_RESIZE = 0x16, > +}; > + > +enum { > + MLX4_STAT_RATE_OFFSET = 5 > +}; > + > +enum mlx4_protocol { > + MLX4_PROT_IB_IPV6 = 0, > + MLX4_PROT_ETH, > + MLX4_PROT_IB_IPV4, > + MLX4_PROT_FCOE > +}; > + > +enum { > + MLX4_MTT_FLAG_PRESENT = 1 > +}; > + > +enum { > + MLX4_MAX_MTT_SHIFT = 31 > +}; > + > +enum mlx4_qp_region { > + MLX4_QP_REGION_FW = 0, > + MLX4_QP_REGION_ETH_ADDR, > + MLX4_QP_REGION_FC_ADDR, > + MLX4_QP_REGION_FC_EXCH, > + MLX4_NUM_QP_REGION > +}; > + > +enum mlx4_port_type { > + MLX4_PORT_TYPE_NONE = 0, > + MLX4_PORT_TYPE_IB = 1, > + MLX4_PORT_TYPE_ETH = 2, > + MLX4_PORT_TYPE_AUTO = 3, > + MLX4_PORT_TYPE_NA = 4 > +}; > + > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > -- Tomorrow Will Never Die From owner-svn-src-head@freebsd.org Fri Sep 30 09:23:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 554FCC03B8E; Fri, 30 Sep 2016 09:23:30 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F1DB6CA; Fri, 30 Sep 2016 09:23:29 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8U9NT8q067479; Fri, 30 Sep 2016 09:23:29 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8U9NTP6067478; Fri, 30 Sep 2016 09:23:29 GMT (envelope-from des@FreeBSD.org) Message-Id: <201609300923.u8U9NTP6067478@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 30 Sep 2016 09:23:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306488 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 09:23:30 -0000 Author: des Date: Fri Sep 30 09:23:29 2016 New Revision: 306488 URL: https://svnweb.freebsd.org/changeset/base/306488 Log: Format the table correctly, using cell separators instead of relying on *roff or mandoc to guess where one cell ends and the next begins. MFC after: 1 week Modified: head/lib/libc/sys/sigaction.2 Modified: head/lib/libc/sys/sigaction.2 ============================================================================== --- head/lib/libc/sys/sigaction.2 Fri Sep 30 09:20:44 2016 (r306487) +++ head/lib/libc/sys/sigaction.2 Fri Sep 30 09:23:29 2016 (r306488) @@ -307,46 +307,109 @@ The following is a list of all signals with names as in the include file .In signal.h : .Bl -column SIGVTALARMXX "create core imagexxx" -.It Sy "NAME Default Action Description" -.It Dv SIGHUP No " terminate process" " terminal line hangup" -.It Dv SIGINT No " terminate process" " interrupt program" -.It Dv SIGQUIT No " create core image" " quit program" -.It Dv SIGILL No " create core image" " illegal instruction" -.It Dv SIGTRAP No " create core image" " trace trap" -.It Dv SIGABRT No " create core image" Ta Xr abort 3 +.It Sy NAME +.Ta Sy Default Action +.Ta Sy Description +.It Dv SIGHUP +.Ta terminate process +.Ta terminal line hangup +.It Dv SIGINT +.Ta terminate process +.Ta interrupt program +.It Dv SIGQUIT +.Ta create core image +.Ta quit program +.It Dv SIGILL +.Ta create core image +.Ta illegal instruction +.It Dv SIGTRAP +.Ta create core image +.Ta trace trap +.It Dv SIGABRT +.Ta create core image +.Ta Xr abort 3 call (formerly .Dv SIGIOT ) -.It Dv SIGEMT No " create core image" " emulate instruction executed" -.It Dv SIGFPE No " create core image" " floating-point exception" -.It Dv SIGKILL No " terminate process" " kill program" -.It Dv SIGBUS No " create core image" " bus error" -.It Dv SIGSEGV No " create core image" " segmentation violation" -.It Dv SIGSYS No " create core image" " non-existent system call invoked" -.It Dv SIGPIPE No " terminate process" " write on a pipe with no reader" -.It Dv SIGALRM No " terminate process" " real-time timer expired" -.It Dv SIGTERM No " terminate process" " software termination signal" -.It Dv SIGURG No " discard signal" " urgent condition present on socket" -.It Dv SIGSTOP No " stop process" " stop (cannot be caught or ignored)" -.It Dv SIGTSTP No " stop process" " stop signal generated from keyboard" -.It Dv SIGCONT No " discard signal" " continue after stop" -.It Dv SIGCHLD No " discard signal" " child status has changed" -.It Dv SIGTTIN No " stop process" " background read attempted from control terminal" -.It Dv SIGTTOU No " stop process" " background write attempted to control terminal" -.It Dv SIGIO No " discard signal" Tn " I/O" -is possible on a descriptor (see +.It Dv SIGEMT +.Ta create core image +.Ta emulate instruction executed +.It Dv SIGFPE +.Ta create core image +.Ta floating-point exception +.It Dv SIGKILL +.Ta terminate process +.Ta kill program +.It Dv SIGBUS +.Ta create core image +.Ta bus error +.It Dv SIGSEGV +.Ta create core image +.Ta segmentation violation +.It Dv SIGSYS +.Ta create core image +.Ta non-existent system call invoked +.It Dv SIGPIPE +.Ta terminate process +.Ta write on a pipe with no reader +.It Dv SIGALRM +.Ta terminate process +.Ta real-time timer expired +.It Dv SIGTERM +.Ta terminate process +.Ta software termination signal +.It Dv SIGURG +.Ta discard signal +.Ta urgent condition present on socket +.It Dv SIGSTOP +.Ta stop process +.Ta stop (cannot be caught or ignored) +.It Dv SIGTSTP +.Ta stop process +.Ta stop signal generated from keyboard +.It Dv SIGCONT +.Ta discard signal +.Ta continue after stop +.It Dv SIGCHLD +.Ta discard signal +.Ta child status has changed +.It Dv SIGTTIN +.Ta stop process +.Ta background read attempted from control terminal +.It Dv SIGTTOU +.Ta stop process +.Ta background write attempted to control terminal +.It Dv SIGIO +.Ta discard signal +.Ta I/O is possible on a descriptor (see .Xr fcntl 2 ) -.It Dv SIGXCPU No " terminate process" " cpu time limit exceeded (see" +.It Dv SIGXCPU +.Ta terminate process +.Ta cpu time limit exceeded (see .Xr setrlimit 2 ) -.It Dv SIGXFSZ No " terminate process" " file size limit exceeded (see" +.It Dv SIGXFSZ +.Ta terminate process +.Ta file size limit exceeded (see .Xr setrlimit 2 ) -.It Dv SIGVTALRM No " terminate process" " virtual time alarm (see" +.It Dv SIGVTALRM +.Ta terminate process +.Ta virtual time alarm (see .Xr setitimer 2 ) -.It Dv SIGPROF No " terminate process" " profiling timer alarm (see" +.It Dv SIGPROF +.Ta terminate process +.Ta profiling timer alarm (see .Xr setitimer 2 ) -.It Dv SIGWINCH No " discard signal" " Window size change" -.It Dv SIGINFO No " discard signal" " status request from keyboard" -.It Dv SIGUSR1 No " terminate process" " User defined signal 1" -.It Dv SIGUSR2 No " terminate process" " User defined signal 2" +.It Dv SIGWINCH +.Ta discard signal +.Ta Window size change +.It Dv SIGINFO +.Ta discard signal +.Ta status request from keyboard +.It Dv SIGUSR1 +.Ta terminate process +.Ta User defined signal 1 +.It Dv SIGUSR2 +.Ta terminate process +.Ta User defined signal 2 .El .Sh NOTE The From owner-svn-src-head@freebsd.org Fri Sep 30 10:00:59 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08C05C015FF; Fri, 30 Sep 2016 10:00:59 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB8501C27; Fri, 30 Sep 2016 10:00:58 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UA0wEi081972; Fri, 30 Sep 2016 10:00:58 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UA0wSN081971; Fri, 30 Sep 2016 10:00:58 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201609301000.u8UA0wSN081971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 30 Sep 2016 10:00:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306489 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 10:00:59 -0000 Author: manu Date: Fri Sep 30 10:00:57 2016 New Revision: 306489 URL: https://svnweb.freebsd.org/changeset/base/306489 Log: bcm2835_cpufreq: Only attach driver if we correcly match on the machine compatible string. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Fri Sep 30 09:23:29 2016 (r306488) +++ head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Fri Sep 30 10:00:57 2016 (r306489) @@ -44,6 +44,11 @@ __FBSDID("$FreeBSD$"); #include #include +#include + +#include +#include + #include #include #include @@ -119,6 +124,13 @@ struct bcm2835_cpufreq_softc { struct intr_config_hook init_hook; }; +static struct ofw_compat_data compat_data[] = { + { "broadcom,bcm2835-vc", 1 }, + { "broadcom,bcm2708-vc", 1 }, + { "brcm,bcm2709", 1 }, + { NULL, 0 } +}; + static int cpufreq_verbose = 0; TUNABLE_INT("hw.bcm2835.cpufreq.verbose", &cpufreq_verbose); static int cpufreq_lowest_freq = DEFAULT_LOWEST_FREQ; @@ -1244,6 +1256,16 @@ bcm2835_cpufreq_init(void *arg) static void bcm2835_cpufreq_identify(driver_t *driver, device_t parent) { + const struct ofw_compat_data *compat; + phandle_t root; + + root = OF_finddevice("/"); + for (compat = compat_data; compat->ocd_str != NULL; compat++) + if (fdt_is_compatible(root, compat->ocd_str)) + break; + + if (compat->ocd_data == 0) + return; DPRINTF("driver=%p, parent=%p\n", driver, parent); if (device_find_child(parent, "bcm2835_cpufreq", -1) != NULL) From owner-svn-src-head@freebsd.org Fri Sep 30 10:20:54 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DC93C01F01; Fri, 30 Sep 2016 10:20:54 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECA33A7D; Fri, 30 Sep 2016 10:20:53 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UAKrM4087719; Fri, 30 Sep 2016 10:20:53 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UAKriZ087716; Fri, 30 Sep 2016 10:20:53 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609301020.u8UAKriZ087716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 30 Sep 2016 10:20:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306490 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 10:20:54 -0000 Author: andrew Date: Fri Sep 30 10:20:53 2016 New Revision: 306490 URL: https://svnweb.freebsd.org/changeset/base/306490 Log: Add support for Tegra to the armv6 GENERIC kernel. Reviewed by: imp, mmel Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D8084 Modified: head/sys/arm/conf/GENERIC Modified: head/sys/arm/conf/GENERIC ============================================================================== --- head/sys/arm/conf/GENERIC Fri Sep 30 10:00:57 2016 (r306489) +++ head/sys/arm/conf/GENERIC Fri Sep 30 10:20:53 2016 (r306490) @@ -33,6 +33,7 @@ files "../allwinner/a20/files.a20" files "../allwinner/a31/files.a31" files "../allwinner/a83t/files.a83t" files "../allwinner/h3/files.h3" +files "../nvidia/tegra124/files.tegra124" files "../qemu/files.qemu" options SOC_ALLWINNER_A20 @@ -46,6 +47,7 @@ options SMP # Enable multiple cores options PLATFORM options PLATFORM_SMP options MULTIDELAY +options LINUX_BOOT_ABI # EXT_RESOURCES pseudo devices options EXT_RESOURCES @@ -62,6 +64,7 @@ device gic device generic_timer # MMC/SD/SDIO Card slot support +device sdhci # SD controller device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards @@ -69,6 +72,13 @@ device mmcsd # mmc/sd flash cards device ahci # AHCI-compatible SATA controllers #device ata # Legacy ATA/SATA controllers +# PCI +options NEW_PCIB +device pci + +# PCI NICs +device re # RealTek 8139C+/8169/8169S/8110S + # VirtIO device virtio device virtio_mmio @@ -77,11 +87,12 @@ device vtnet # Console and misc device uart +device uart_ns8250 device uart_snps device pl011 device pty device snp -device md +device md # Memory "disks" device random # Entropy device device psci @@ -92,6 +103,7 @@ device twsi device rsb device axp209 # AXP209 Power Management Unit device axp81x # AXP813/818 Power Management Unit +device icee # GPIO device gpio @@ -99,6 +111,7 @@ device gpioled device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) +device cd # CD device pass # Passthrough device (direct ATA/SCSI access) # USB support @@ -108,11 +121,14 @@ device usb device ohci device ehci -device umass +device umass # Disks/Mass storage - Requires scbus and da +device uhid # "Human Interface Devices" +device ukbd # Allow keyboard like HIDs to control console # Ethernet device loop device ether +device vlan # 802.1Q VLAN support device mii device bpf From owner-svn-src-head@freebsd.org Fri Sep 30 10:21:05 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71732C01F33; Fri, 30 Sep 2016 10:21:05 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 447BAC15; Fri, 30 Sep 2016 10:21:05 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UAL4RF089785; Fri, 30 Sep 2016 10:21:04 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UAL4QP089783; Fri, 30 Sep 2016 10:21:04 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201609301021.u8UAL4QP089783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 30 Sep 2016 10:21:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306491 - in head/sys/arm: broadcom/bcm2835 conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 10:21:05 -0000 Author: manu Date: Fri Sep 30 10:21:04 2016 New Revision: 306491 URL: https://svnweb.freebsd.org/changeset/base/306491 Log: RPI2: Add support for MULTIDELAY, this is needed for inclusion into GENERIC. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c head/sys/arm/conf/RPI2 Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Fri Sep 30 10:20:53 2016 (r306490) +++ head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Fri Sep 30 10:21:04 2016 (r306491) @@ -147,5 +147,5 @@ static platform_method_t bcm2836_methods PLATFORMMETHOD_END, }; -FDT_PLATFORM_DEF(bcm2836, "bcm2836", 0, "brcm,bcm2709", 0); +FDT_PLATFORM_DEF(bcm2836, "bcm2836", 0, "brcm,bcm2709", 100); #endif Modified: head/sys/arm/conf/RPI2 ============================================================================== --- head/sys/arm/conf/RPI2 Fri Sep 30 10:20:53 2016 (r306490) +++ head/sys/arm/conf/RPI2 Fri Sep 30 10:21:04 2016 (r306491) @@ -30,6 +30,7 @@ options SCHED_ULE # ULE scheduler options SMP # Enable multiple cores options PLATFORM options PLATFORM_SMP +options MULTIDELAY # NFS root from boopt/dhcp #options BOOTP From owner-svn-src-head@freebsd.org Fri Sep 30 10:22:52 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30F67C02134; Fri, 30 Sep 2016 10:22:52 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0F45F76; Fri, 30 Sep 2016 10:22:51 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UAMpLS090490; Fri, 30 Sep 2016 10:22:51 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UAMpJm090489; Fri, 30 Sep 2016 10:22:51 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609301022.u8UAMpJm090489@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 30 Sep 2016 10:22:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306492 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 10:22:52 -0000 Author: andrew Date: Fri Sep 30 10:22:50 2016 New Revision: 306492 URL: https://svnweb.freebsd.org/changeset/base/306492 Log: Remove the duplicate ukbd device from the armv6 GENERIC Sponsored by: ABT Systems Ltd Modified: head/sys/arm/conf/GENERIC Modified: head/sys/arm/conf/GENERIC ============================================================================== --- head/sys/arm/conf/GENERIC Fri Sep 30 10:21:04 2016 (r306491) +++ head/sys/arm/conf/GENERIC Fri Sep 30 10:22:50 2016 (r306492) @@ -146,7 +146,6 @@ device sound device vt device kbdmux device ums -device ukbd device videomode device hdmi From owner-svn-src-head@freebsd.org Fri Sep 30 10:46:28 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75CBDC0254E; Fri, 30 Sep 2016 10:46:28 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1470B1877; Fri, 30 Sep 2016 10:46:28 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UAkRh7098221; Fri, 30 Sep 2016 10:46:27 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UAkR4Q098220; Fri, 30 Sep 2016 10:46:27 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201609301046.u8UAkR4Q098220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 30 Sep 2016 10:46:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306493 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 10:46:28 -0000 Author: manu Date: Fri Sep 30 10:46:27 2016 New Revision: 306493 URL: https://svnweb.freebsd.org/changeset/base/306493 Log: Add support for RPI2 to the armv6 GENERIC kernel. Modified: head/sys/arm/conf/GENERIC Modified: head/sys/arm/conf/GENERIC ============================================================================== --- head/sys/arm/conf/GENERIC Fri Sep 30 10:22:50 2016 (r306492) +++ head/sys/arm/conf/GENERIC Fri Sep 30 10:46:27 2016 (r306493) @@ -33,6 +33,8 @@ files "../allwinner/a20/files.a20" files "../allwinner/a31/files.a31" files "../allwinner/a83t/files.a83t" files "../allwinner/h3/files.h3" +files "../broadcom/bcm2835/files.bcm2836" +files "../broadcom/bcm2835/files.bcm283x" files "../nvidia/tegra124/files.tegra124" files "../qemu/files.qemu" @@ -41,6 +43,7 @@ options SOC_ALLWINNER_A31 options SOC_ALLWINNER_A31S options SOC_ALLWINNER_A83T options SOC_ALLWINNER_H3 +options SOC_BCM2836 options SCHED_ULE # ULE scheduler options SMP # Enable multiple cores @@ -103,12 +106,17 @@ device twsi device rsb device axp209 # AXP209 Power Management Unit device axp81x # AXP813/818 Power Management Unit +device bcm2835_bsc device icee # GPIO device gpio device gpioled +# SPI +device spibus +device bcm2835_spi + device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD @@ -120,6 +128,7 @@ device usb #device uhci device ohci device ehci +device dwcotg # DWC OTG controller device umass # Disks/Mass storage - Requires scbus and da device uhid # "Human Interface Devices" @@ -137,6 +146,8 @@ device dwc # 10/100/1000 integrated G device awg # 10/100/1000 integrated EMAC controller # USB ethernet support, requires miibus +device smcphy +device smsc device miibus # Sound support @@ -148,6 +159,7 @@ device kbdmux device ums device videomode device hdmi +device vchiq # Pinmux device fdt_pinctrl @@ -157,4 +169,4 @@ options EFI # Flattened Device Tree options FDT # Configure using FDT/DTB data -makeoptions MODULES_EXTRA=dtb/allwinner +makeoptions MODULES_EXTRA="dtb/allwinner dtb/rpi" From owner-svn-src-head@freebsd.org Fri Sep 30 10:48:59 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D706C02606; Fri, 30 Sep 2016 10:48:59 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 18DB61A1D; Fri, 30 Sep 2016 10:48:58 +0000 (UTC) (envelope-from des@des.no) Received: from desk.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id C12B5473E; Fri, 30 Sep 2016 10:48:51 +0000 (UTC) Received: by desk.des.no (Postfix, from userid 1001) id D29C3445E3; Fri, 30 Sep 2016 12:48:50 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306488 - head/lib/libc/sys References: <201609300923.u8U9NTP6067478@repo.freebsd.org> Date: Fri, 30 Sep 2016 12:48:50 +0200 In-Reply-To: <201609300923.u8U9NTP6067478@repo.freebsd.org> ("Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav=22's?= message of "Fri, 30 Sep 2016 09:23:29 +0000 (UTC)") Message-ID: <86k2dtr7cd.fsf@desk.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 10:48:59 -0000 Dag-Erling Sm=C3=B8rgrav writes: > Log: > Format the table correctly, using cell separators instead of relying > on *roff or mandoc to guess where one cell ends and the next begins. So apparently, the old version works with *roff but not with mandoc, while the new version works with mandoc but not *roff. Since mandoc is the default in 11+, I'll leave this in while I consult with the authors of mandoc. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@freebsd.org Fri Sep 30 11:05:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62295C02A40; Fri, 30 Sep 2016 11:05:30 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 244AE1D0; Fri, 30 Sep 2016 11:05:30 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UB5Tkm005884; Fri, 30 Sep 2016 11:05:29 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UB5Tng005883; Fri, 30 Sep 2016 11:05:29 GMT (envelope-from des@FreeBSD.org) Message-Id: <201609301105.u8UB5Tng005883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 30 Sep 2016 11:05:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306494 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 11:05:30 -0000 Author: des Date: Fri Sep 30 11:05:29 2016 New Revision: 306494 URL: https://svnweb.freebsd.org/changeset/base/306494 Log: After perusal of the documentation and some experimentation, I found a version that works with both groff and mandoc. Hat tip to: kib MFC after: 1 week Modified: head/lib/libc/sys/sigaction.2 Modified: head/lib/libc/sys/sigaction.2 ============================================================================== --- head/lib/libc/sys/sigaction.2 Fri Sep 30 10:46:27 2016 (r306493) +++ head/lib/libc/sys/sigaction.2 Fri Sep 30 11:05:29 2016 (r306494) @@ -307,109 +307,38 @@ The following is a list of all signals with names as in the include file .In signal.h : .Bl -column SIGVTALARMXX "create core imagexxx" -.It Sy NAME -.Ta Sy Default Action -.Ta Sy Description -.It Dv SIGHUP -.Ta terminate process -.Ta terminal line hangup -.It Dv SIGINT -.Ta terminate process -.Ta interrupt program -.It Dv SIGQUIT -.Ta create core image -.Ta quit program -.It Dv SIGILL -.Ta create core image -.Ta illegal instruction -.It Dv SIGTRAP -.Ta create core image -.Ta trace trap -.It Dv SIGABRT -.Ta create core image -.Ta Xr abort 3 -call (formerly -.Dv SIGIOT ) -.It Dv SIGEMT -.Ta create core image -.Ta emulate instruction executed -.It Dv SIGFPE -.Ta create core image -.Ta floating-point exception -.It Dv SIGKILL -.Ta terminate process -.Ta kill program -.It Dv SIGBUS -.Ta create core image -.Ta bus error -.It Dv SIGSEGV -.Ta create core image -.Ta segmentation violation -.It Dv SIGSYS -.Ta create core image -.Ta non-existent system call invoked -.It Dv SIGPIPE -.Ta terminate process -.Ta write on a pipe with no reader -.It Dv SIGALRM -.Ta terminate process -.Ta real-time timer expired -.It Dv SIGTERM -.Ta terminate process -.Ta software termination signal -.It Dv SIGURG -.Ta discard signal -.Ta urgent condition present on socket -.It Dv SIGSTOP -.Ta stop process -.Ta stop (cannot be caught or ignored) -.It Dv SIGTSTP -.Ta stop process -.Ta stop signal generated from keyboard -.It Dv SIGCONT -.Ta discard signal -.Ta continue after stop -.It Dv SIGCHLD -.Ta discard signal -.Ta child status has changed -.It Dv SIGTTIN -.Ta stop process -.Ta background read attempted from control terminal -.It Dv SIGTTOU -.Ta stop process -.Ta background write attempted to control terminal -.It Dv SIGIO -.Ta discard signal -.Ta I/O is possible on a descriptor (see -.Xr fcntl 2 ) -.It Dv SIGXCPU -.Ta terminate process -.Ta cpu time limit exceeded (see -.Xr setrlimit 2 ) -.It Dv SIGXFSZ -.Ta terminate process -.Ta file size limit exceeded (see -.Xr setrlimit 2 ) -.It Dv SIGVTALRM -.Ta terminate process -.Ta virtual time alarm (see -.Xr setitimer 2 ) -.It Dv SIGPROF -.Ta terminate process -.Ta profiling timer alarm (see -.Xr setitimer 2 ) -.It Dv SIGWINCH -.Ta discard signal -.Ta Window size change -.It Dv SIGINFO -.Ta discard signal -.Ta status request from keyboard -.It Dv SIGUSR1 -.Ta terminate process -.Ta User defined signal 1 -.It Dv SIGUSR2 -.Ta terminate process -.Ta User defined signal 2 +.It Sy NAME Ta Sy Default Action Ta Sy Description +.It Dv SIGHUP Ta terminate process Ta terminal line hangup +.It Dv SIGINT Ta terminate process Ta interrupt program +.It Dv SIGQUIT Ta create core image Ta quit program +.It Dv SIGILL Ta create core image Ta illegal instruction +.It Dv SIGTRAP Ta create core image Ta trace trap +.It Dv SIGABRT Ta create core image Ta Xr abort 3 call (formerly Dv SIGIOT ) +.It Dv SIGEMT Ta create core image Ta emulate instruction executed +.It Dv SIGFPE Ta create core image Ta floating-point exception +.It Dv SIGKILL Ta terminate process Ta kill program +.It Dv SIGBUS Ta create core image Ta bus error +.It Dv SIGSEGV Ta create core image Ta segmentation violation +.It Dv SIGSYS Ta create core image Ta non-existent system call invoked +.It Dv SIGPIPE Ta terminate process Ta write on a pipe with no reader +.It Dv SIGALRM Ta terminate process Ta real-time timer expired +.It Dv SIGTERM Ta terminate process Ta software termination signal +.It Dv SIGURG Ta discard signal Ta urgent condition present on socket +.It Dv SIGSTOP Ta stop process Ta stop (cannot be caught or ignored) +.It Dv SIGTSTP Ta stop process Ta stop signal generated from keyboard +.It Dv SIGCONT Ta discard signal Ta continue after stop +.It Dv SIGCHLD Ta discard signal Ta child status has changed +.It Dv SIGTTIN Ta stop process Ta background read attempted from control terminal +.It Dv SIGTTOU Ta stop process Ta background write attempted to control terminal +.It Dv SIGIO Ta discard signal Ta I/O is possible on a descriptor (see Xr fcntl 2 ) +.It Dv SIGXCPU Ta terminate process Ta cpu time limit exceeded (see setrlimit 2 ) +.It Dv SIGXFSZ Ta terminate process Ta file size limit exceeded (see setrlimit 2 ) +.It Dv SIGVTALRM Ta terminate process Ta virtual time alarm (see setitimer 2 ) +.It Dv SIGPROF Ta terminate process Ta profiling timer alarm (see setitimer 2 ) +.It Dv SIGWINCH Ta discard signal Ta window size change +.It Dv SIGINFO Ta discard signal Ta status request from keyboard +.It Dv SIGUSR1 Ta terminate process Ta user defined signal 1 +.It Dv SIGUSR2 Ta terminate process Ta user defined signal 2 .El .Sh NOTE The From owner-svn-src-head@freebsd.org Fri Sep 30 13:04:19 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2416C0263E; Fri, 30 Sep 2016 13:04:19 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 850501803; Fri, 30 Sep 2016 13:04:19 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UD4I0L050802; Fri, 30 Sep 2016 13:04:18 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UD4IT9050801; Fri, 30 Sep 2016 13:04:18 GMT (envelope-from des@FreeBSD.org) Message-Id: <201609301304.u8UD4IT9050801@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 30 Sep 2016 13:04:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306495 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 13:04:19 -0000 Author: des Date: Fri Sep 30 13:04:18 2016 New Revision: 306495 URL: https://svnweb.freebsd.org/changeset/base/306495 Log: Minor markup and wording fixes. MFC after: 1 week Modified: head/lib/libc/sys/getrlimit.2 Modified: head/lib/libc/sys/getrlimit.2 ============================================================================== --- head/lib/libc/sys/getrlimit.2 Fri Sep 30 11:05:29 2016 (r306494) +++ head/lib/libc/sys/getrlimit.2 Fri Sep 30 13:04:18 2016 (r306495) @@ -28,7 +28,7 @@ .\" @(#)getrlimit.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd August 19, 2015 +.Dd September 30, 2016 .Dt GETRLIMIT 2 .Os .Sh NAME @@ -137,7 +137,7 @@ For example, if the RSS hard limit is ex .Pp The .Vt rlimit -structure is used to specify the hard and soft limits on a resource, +structure is used to specify the hard and soft limits on a resource. .Bd -literal -offset indent struct rlimit { rlim_t rlim_cur; /* current (soft) limit */ @@ -183,9 +183,9 @@ soft limit will cause the write to fail to be generated; this normally terminates the process, but may be caught. When -the soft cpu time limit is exceeded, a signal +the soft cpu time limit is exceeded, a .Dv SIGXCPU -is sent to the +signal is sent to the offending process. .Pp When most operations would allocate more virtual memory than allowed by the @@ -198,7 +198,9 @@ A notable exception is stack extension, If stack extension would allocate more virtual memory than allowed by the soft limit of .Dv RLIMIT_AS , -the signal SIGSEGV will be delivered. +a +.Dv SIGSEGV +signal will be delivered. The caller is free to raise the soft address space limit up to the hard limit and retry the allocation. .Sh RETURN VALUES From owner-svn-src-head@freebsd.org Fri Sep 30 13:05:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40433C026AD; Fri, 30 Sep 2016 13:05:34 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E59E5197A; Fri, 30 Sep 2016 13:05:33 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UD5XMi050891; Fri, 30 Sep 2016 13:05:33 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UD5XdK050890; Fri, 30 Sep 2016 13:05:33 GMT (envelope-from des@FreeBSD.org) Message-Id: <201609301305.u8UD5XdK050890@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 30 Sep 2016 13:05:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306496 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 13:05:34 -0000 Author: des Date: Fri Sep 30 13:05:32 2016 New Revision: 306496 URL: https://svnweb.freebsd.org/changeset/base/306496 Log: Reinstate Xr macros that were accidentally removed in a previous commit. Add some missing cross-references to the SEE ALSO section. Bump date now that there are content changes. MFC after: 1 week Modified: head/lib/libc/sys/sigaction.2 Modified: head/lib/libc/sys/sigaction.2 ============================================================================== --- head/lib/libc/sys/sigaction.2 Fri Sep 30 13:04:18 2016 (r306495) +++ head/lib/libc/sys/sigaction.2 Fri Sep 30 13:05:32 2016 (r306496) @@ -28,7 +28,7 @@ .\" From: @(#)sigaction.2 8.2 (Berkeley) 4/3/94 .\" $FreeBSD$ .\" -.Dd September 6, 2013 +.Dd September 30, 2016 .Dt SIGACTION 2 .Os .Sh NAME @@ -331,10 +331,10 @@ with names as in the include file .It Dv SIGTTIN Ta stop process Ta background read attempted from control terminal .It Dv SIGTTOU Ta stop process Ta background write attempted to control terminal .It Dv SIGIO Ta discard signal Ta I/O is possible on a descriptor (see Xr fcntl 2 ) -.It Dv SIGXCPU Ta terminate process Ta cpu time limit exceeded (see setrlimit 2 ) -.It Dv SIGXFSZ Ta terminate process Ta file size limit exceeded (see setrlimit 2 ) -.It Dv SIGVTALRM Ta terminate process Ta virtual time alarm (see setitimer 2 ) -.It Dv SIGPROF Ta terminate process Ta profiling timer alarm (see setitimer 2 ) +.It Dv SIGXCPU Ta terminate process Ta cpu time limit exceeded (see Xr setrlimit 2 ) +.It Dv SIGXFSZ Ta terminate process Ta file size limit exceeded (see Xr setrlimit 2 ) +.It Dv SIGVTALRM Ta terminate process Ta virtual time alarm (see Xr setitimer 2 ) +.It Dv SIGPROF Ta terminate process Ta profiling timer alarm (see Xr setitimer 2 ) .It Dv SIGWINCH Ta discard signal Ta window size change .It Dv SIGINFO Ta discard signal Ta status request from keyboard .It Dv SIGUSR1 Ta terminate process Ta user defined signal 1 @@ -731,6 +731,8 @@ or .Xr kill 1 , .Xr kill 2 , .Xr ptrace 2 , +.Xr setitimer 2 , +.Xr setrlimit 2 , .Xr sigaltstack 2 , .Xr sigpending 2 , .Xr sigprocmask 2 , From owner-svn-src-head@freebsd.org Fri Sep 30 13:16:05 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C393C028DD; Fri, 30 Sep 2016 13:16:05 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C2781DE6; Fri, 30 Sep 2016 13:16:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UDG4gt054571; Fri, 30 Sep 2016 13:16:04 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UDG4WA054570; Fri, 30 Sep 2016 13:16:04 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609301316.u8UDG4WA054570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 30 Sep 2016 13:16:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306497 - head/usr.sbin/crunch/crunchgen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 13:16:05 -0000 Author: emaste Date: Fri Sep 30 13:16:04 2016 New Revision: 306497 URL: https://svnweb.freebsd.org/changeset/base/306497 Log: crunchgen: do not strip crunched binary (it will be done by install) Reviewed by: adrian, imp (earlier) Differential Revision: https://reviews.freebsd.org/D2003 Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c ============================================================================== --- head/usr.sbin/crunch/crunchgen/crunchgen.c Fri Sep 30 13:05:32 2016 (r306496) +++ head/usr.sbin/crunch/crunchgen/crunchgen.c Fri Sep 30 13:16:04 2016 (r306497) @@ -985,7 +985,6 @@ top_makefile_rules(FILE *outmk) prog_t *p; fprintf(outmk, "LD?= ld\n"); - fprintf(outmk, "STRIPBIN?= strip\n"); if ( subtract_strlst(&libs, &libs_so) ) fprintf(outmk, "# NOTE: Some LIBS declarations below overridden by LIBS_SO\n"); @@ -1033,7 +1032,6 @@ top_makefile_rules(FILE *outmk) fprintf(outmk, "\t$(CC) -static -o %s %s.o $(CRUNCHED_OBJS) $(LIBS)\n", execfname, execfname); fprintf(outmk, ".endif\n"); - fprintf(outmk, "\t$(STRIPBIN) %s\n", execfname); fprintf(outmk, "realclean: clean subclean\n"); fprintf(outmk, "clean:\n\trm -f %s *.lo *.o *_stub.c\n", execfname); fprintf(outmk, "subclean: $(SUBCLEAN_TARGETS)\n"); From owner-svn-src-head@freebsd.org Fri Sep 30 13:37:51 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77565C02E4C; Fri, 30 Sep 2016 13:37:51 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 445D0C4E; Fri, 30 Sep 2016 13:37:51 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UDboeb062208; Fri, 30 Sep 2016 13:37:50 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UDboeL062207; Fri, 30 Sep 2016 13:37:50 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201609301337.u8UDboeL062207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 30 Sep 2016 13:37:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306498 - head/sys/dev/ral X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 13:37:51 -0000 Author: avos Date: Fri Sep 30 13:37:50 2016 New Revision: 306498 URL: https://svnweb.freebsd.org/changeset/base/306498 Log: ral (rt2860): eliminate duplicate ieee80211_process_callback() call (left after r287197) MFC after: 1 week Modified: head/sys/dev/ral/rt2860.c Modified: head/sys/dev/ral/rt2860.c ============================================================================== --- head/sys/dev/ral/rt2860.c Fri Sep 30 13:16:04 2016 (r306497) +++ head/sys/dev/ral/rt2860.c Fri Sep 30 13:37:50 2016 (r306498) @@ -1140,10 +1140,6 @@ rt2860_tx_intr(struct rt2860_softc *sc, bus_dmamap_sync(sc->txwi_dmat, data->map, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->txwi_dmat, data->map); - if (data->m->m_flags & M_TXCB) { - ieee80211_process_callback(data->ni, data->m, - 0); - } ieee80211_tx_complete(data->ni, data->m, 0); data->ni = NULL; data->m = NULL; From owner-svn-src-head@freebsd.org Fri Sep 30 13:41:26 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36352C02F7A; Fri, 30 Sep 2016 13:41:26 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E073AC4; Fri, 30 Sep 2016 13:41:25 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UDfPt9065475; Fri, 30 Sep 2016 13:41:25 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UDfPnM065474; Fri, 30 Sep 2016 13:41:25 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201609301341.u8UDfPnM065474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Fri, 30 Sep 2016 13:41:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306499 - head/sys/xen/interface/io X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 13:41:26 -0000 Author: royger Date: Fri Sep 30 13:41:24 2016 New Revision: 306499 URL: https://svnweb.freebsd.org/changeset/base/306499 Log: xen/vchan: change license of header from Lesser GPL v2.1 to BSD This is a license change only commit, which can be found upstream in the Xen tree as 937324f032f4f77866e80e39de0d697fa5131df1. Sponsored by: Citrix Systems R&D Modified: head/sys/xen/interface/io/libxenvchan.h Modified: head/sys/xen/interface/io/libxenvchan.h ============================================================================== --- head/sys/xen/interface/io/libxenvchan.h Fri Sep 30 13:37:50 2016 (r306498) +++ head/sys/xen/interface/io/libxenvchan.h Fri Sep 30 13:41:24 2016 (r306499) @@ -10,18 +10,23 @@ * * @section LICENSE * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; If not, see . + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. * * @section DESCRIPTION * From owner-svn-src-head@freebsd.org Fri Sep 30 13:47:53 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8DAB6C023D7; Fri, 30 Sep 2016 13:47:53 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69E1F979; Fri, 30 Sep 2016 13:47:53 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UDlqF3066594; Fri, 30 Sep 2016 13:47:52 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UDlqPH066592; Fri, 30 Sep 2016 13:47:52 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609301347.u8UDlqPH066592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 30 Sep 2016 13:47:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306500 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 13:47:53 -0000 Author: andrew Date: Fri Sep 30 13:47:52 2016 New Revision: 306500 URL: https://svnweb.freebsd.org/changeset/base/306500 Log: Fix the spelling of Cortex. Modified: head/sys/arm/include/armreg.h head/sys/arm/include/cpu-v6.h Modified: head/sys/arm/include/armreg.h ============================================================================== --- head/sys/arm/include/armreg.h Fri Sep 30 13:41:24 2016 (r306499) +++ head/sys/arm/include/armreg.h Fri Sep 30 13:47:52 2016 (r306500) @@ -144,7 +144,7 @@ #define CPU_ID_CORTEXA9R2 (CPU_ID_CORTEXA9 | (2 << CPU_ID_VARIANT_SHIFT)) #define CPU_ID_CORTEXA9R3 (CPU_ID_CORTEXA9 | (3 << CPU_ID_VARIANT_SHIFT)) #define CPU_ID_CORTEXA9R4 (CPU_ID_CORTEXA9 | (4 << CPU_ID_VARIANT_SHIFT)) -/* XXX: Cortx-A12 is the old name for this part, it has been renamed the A17 */ +/* XXX: Cortex-A12 is the old name for this part, it has been renamed the A17 */ #define CPU_ID_CORTEXA12 (CPU_ID_ARM_LTD | CPU_ID_CPUID_SCHEME | 0xc0d0) #define CPU_ID_CORTEXA12R0 (CPU_ID_CORTEXA12 | (0 << CPU_ID_VARIANT_SHIFT)) #define CPU_ID_CORTEXA15 (CPU_ID_ARM_LTD | CPU_ID_CPUID_SCHEME | 0xc0f0) Modified: head/sys/arm/include/cpu-v6.h ============================================================================== --- head/sys/arm/include/cpu-v6.h Fri Sep 30 13:41:24 2016 (r306499) +++ head/sys/arm/include/cpu-v6.h Fri Sep 30 13:47:52 2016 (r306500) @@ -345,12 +345,18 @@ tlb_flush_range_local(vm_offset_t va, vm /* Broadcasting operations. */ #if __ARM_ARCH >= 7 && defined SMP +/* Used to detect SMP */ +extern int mp_ncpus; + static __inline void tlb_flush_all(void) { dsb(); - _CP15_TLBIALLIS(); + if (mp_ncpus == 1) + _CP15_TLBIALL(); + else + _CP15_TLBIALLIS(); dsb(); } @@ -359,7 +365,10 @@ tlb_flush_all_ng(void) { dsb(); - _CP15_TLBIASIDIS(CPU_ASID_KERNEL); + if (mp_ncpus == 1) + _CP15_TLBIASID(CPU_ASID_KERNEL); + else + _CP15_TLBIASIDIS(CPU_ASID_KERNEL); dsb(); } @@ -370,7 +379,10 @@ tlb_flush(vm_offset_t va) KASSERT((va & PAGE_MASK) == 0, ("%s: va %#x not aligned", __func__, va)); dsb(); - _CP15_TLBIMVAAIS(va); + if (mp_ncpus == 1) + _CP15_TLBIMVA(va | CPU_ASID_KERNEL); + else + _CP15_TLBIMVAAIS(va); dsb(); } @@ -384,8 +396,13 @@ tlb_flush_range(vm_offset_t va, vm_size size)); dsb(); - for (; va < eva; va += PAGE_SIZE) - _CP15_TLBIMVAAIS(va); + if (mp_ncpus == 1) { + for (; va < eva; va += PAGE_SIZE) + _CP15_TLBIMVA(va | CPU_ASID_KERNEL); + } else { + for (; va < eva; va += PAGE_SIZE) + _CP15_TLBIMVAAIS(va); + } dsb(); } #else /* SMP */ @@ -411,17 +428,19 @@ icache_sync(vm_offset_t va, vm_size_t si va &= ~cpuinfo.dcache_line_mask; for ( ; va < eva; va += cpuinfo.dcache_line_size) { #if __ARM_ARCH >= 7 && defined SMP - _CP15_DCCMVAU(va); -#else - _CP15_DCCMVAC(va); + if (mp_ncpus > 1) + _CP15_DCCMVAU(va); + else #endif + _CP15_DCCMVAC(va); } dsb(); #if __ARM_ARCH >= 7 && defined SMP - _CP15_ICIALLUIS(); -#else - _CP15_ICIALLU(); + if (mp_ncpus > 1) + _CP15_ICIALLUIS(); + else #endif + _CP15_ICIALLU(); dsb(); isb(); } @@ -431,10 +450,11 @@ static __inline void icache_inv_all(void) { #if __ARM_ARCH >= 7 && defined SMP - _CP15_ICIALLUIS(); -#else - _CP15_ICIALLU(); + if (mp_ncpus > 1) + _CP15_ICIALLUIS(); + else #endif + _CP15_ICIALLU(); dsb(); isb(); } @@ -444,10 +464,11 @@ static __inline void bpb_inv_all(void) { #if __ARM_ARCH >= 7 && defined SMP - _CP15_BPIALLIS(); -#else - _CP15_BPIALL(); + if (mp_ncpus > 1) + _CP15_BPIALLIS(); + else #endif + _CP15_BPIALL(); dsb(); isb(); } @@ -462,10 +483,11 @@ dcache_wb_pou(vm_offset_t va, vm_size_t va &= ~cpuinfo.dcache_line_mask; for ( ; va < eva; va += cpuinfo.dcache_line_size) { #if __ARM_ARCH >= 7 && defined SMP - _CP15_DCCMVAU(va); -#else - _CP15_DCCMVAC(va); + if (mp_ncpus > 1) + _CP15_DCCMVAU(va); + else #endif + _CP15_DCCMVAC(va); } dsb(); } From owner-svn-src-head@freebsd.org Fri Sep 30 13:50:31 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE73FC025FF; Fri, 30 Sep 2016 13:50:31 +0000 (UTC) (envelope-from royger@gmail.com) Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 54261D6D; Fri, 30 Sep 2016 13:50:31 +0000 (UTC) (envelope-from royger@gmail.com) Received: by mail-wm0-x22a.google.com with SMTP id b4so48702606wmb.0; Fri, 30 Sep 2016 06:50:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=fjFqY53vHLKTbclCohjzsDd1A1yZ6OXvdZy2CPGu1p4=; b=mO+Xcowhgm0dtHpMtDCnwSdYgnE/Sstza2zFPIfyLDkWae3q4u7MtQ8ZT5RMLNyw7f XhU7bdkogcUzMGEpY+VrwltaEtc1W46jfCZzfGudcLAun8Ic0cpYLoWKEcSP+gItiYqH 38UdAMZCo9PmDILwbKbLp+wZaLmZaHT8L5EKDOYr9NSSu95kxuyUzGtX2ZsNTV1/jSHE ePhmpBSS5OMpCbxK+AeBEhZLuWv7uvBwD374z/Hqvqlx2oYj7wcklgmXnCpuGHzT61yM r6P3X9Dn5c8VEwK448KtoINUI0VpmsxxunPC+MuFqq0fPUH4gDt+1eqC4pBewro7sPxC VkiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=fjFqY53vHLKTbclCohjzsDd1A1yZ6OXvdZy2CPGu1p4=; b=ODgoNK1Mo8II3wQgrwg+unw6U/vNMUINrU9nu+fCmlueOO6o7Fcy4sqa1xaRfSR/hW ODWT/uuM6CEe75ssqyrD9dBtvY8xakXJJqsoaJ3hViQU4bkA1LRZJbVm8XjY3sdw0y8M wZcWpnkD77JpIIi11Va8h8dRDq9W0yTaWqXpf8CekkubjiD393xZgPPdRWoVooyYiS69 jjwSHPA6cckKIOW9FnluSRlgRsrErY8/hOttt353NyQHKKABzQ2O4Dq7EoUR6w8Wz5xY lPb/BzFNAnA7ei+7I33P/pXpQR3DJVig6L+YpnP+/FrTyiImp5qgorjp3xt3s5PzxGZ3 mEOg== X-Gm-Message-State: AA6/9Rk+1t0fjGd4WDBf8CAKM+AXCw2JQP0bc2pojH1eK7u+eE5tQiGkq9EQwzVCL279FQ== X-Received: by 10.194.173.168 with SMTP id bl8mr7038087wjc.105.1475243429541; Fri, 30 Sep 2016 06:50:29 -0700 (PDT) Received: from localhost (61.red-79-152-18.dynamicip.rima-tde.net. [79.152.18.61]) by smtp.gmail.com with ESMTPSA id n7sm4257224wmf.18.2016.09.30.06.50.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Sep 2016 06:50:28 -0700 (PDT) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Date: Fri, 30 Sep 2016 15:50:25 +0200 From: Roger Pau =?iso-8859-1?Q?Monn=E9?= To: Oliver Pinter Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r299064 - head/sys/kern Message-ID: <20160930135025.mvy5k5bbdatn4ccx@mac> References: <201605041348.u44Dmxd0092688@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20160916 (1.7.0) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 13:50:31 -0000 On Sat, Sep 03, 2016 at 01:29:45AM +0200, Oliver Pinter wrote: > Hi! > > This commit never gets MFCd back to 10-STABLE. Do you still plan to do it? Ops, sorry for the delay, should be MFC'ed now. Thanks, Roger. From owner-svn-src-head@freebsd.org Fri Sep 30 13:51:00 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2497C02649; Fri, 30 Sep 2016 13:51:00 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81341F12; Fri, 30 Sep 2016 13:51:00 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UDoxDa066805; Fri, 30 Sep 2016 13:50:59 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UDoxZx066804; Fri, 30 Sep 2016 13:50:59 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609301350.u8UDoxZx066804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 30 Sep 2016 13:50:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306502 - head/usr.bin/primes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 13:51:00 -0000 Author: emaste Date: Fri Sep 30 13:50:59 2016 New Revision: 306502 URL: https://svnweb.freebsd.org/changeset/base/306502 Log: primes: trivially capsicumize Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7982 Modified: head/usr.bin/primes/primes.c Modified: head/usr.bin/primes/primes.c ============================================================================== --- head/usr.bin/primes/primes.c Fri Sep 30 13:49:50 2016 (r306501) +++ head/usr.bin/primes/primes.c Fri Sep 30 13:50:59 2016 (r306502) @@ -61,6 +61,7 @@ static const char rcsid[] = * validation check: there are 664579 primes between 0 and 10^7 */ +#include #include #include #include @@ -70,6 +71,7 @@ static const char rcsid[] = #include #include #include +#include #include #include "primes.h" @@ -99,6 +101,12 @@ main(int argc, char *argv[]) int ch; char *p; + /* Cache NLS data, for strerror, for err(3), before cap_enter. */ + (void)catopen("libc", NL_CAT_LOCALE); + + if (cap_enter() < 0 && errno != ENOSYS) + err(1, "cap_enter"); + while ((ch = getopt(argc, argv, "h")) != -1) switch (ch) { case 'h': From owner-svn-src-head@freebsd.org Fri Sep 30 14:00:25 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1798C02937; Fri, 30 Sep 2016 14:00:24 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B043B1568; Fri, 30 Sep 2016 14:00:24 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UE0NJE070842; Fri, 30 Sep 2016 14:00:23 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UE0NgG070841; Fri, 30 Sep 2016 14:00:23 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609301400.u8UE0NgG070841@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 30 Sep 2016 14:00:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306503 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 14:00:25 -0000 Author: andrew Date: Fri Sep 30 14:00:23 2016 New Revision: 306503 URL: https://svnweb.freebsd.org/changeset/base/306503 Log: Revert an accedintal commit. Modified: head/sys/arm/include/cpu-v6.h Modified: head/sys/arm/include/cpu-v6.h ============================================================================== --- head/sys/arm/include/cpu-v6.h Fri Sep 30 13:50:59 2016 (r306502) +++ head/sys/arm/include/cpu-v6.h Fri Sep 30 14:00:23 2016 (r306503) @@ -345,18 +345,12 @@ tlb_flush_range_local(vm_offset_t va, vm /* Broadcasting operations. */ #if __ARM_ARCH >= 7 && defined SMP -/* Used to detect SMP */ -extern int mp_ncpus; - static __inline void tlb_flush_all(void) { dsb(); - if (mp_ncpus == 1) - _CP15_TLBIALL(); - else - _CP15_TLBIALLIS(); + _CP15_TLBIALLIS(); dsb(); } @@ -365,10 +359,7 @@ tlb_flush_all_ng(void) { dsb(); - if (mp_ncpus == 1) - _CP15_TLBIASID(CPU_ASID_KERNEL); - else - _CP15_TLBIASIDIS(CPU_ASID_KERNEL); + _CP15_TLBIASIDIS(CPU_ASID_KERNEL); dsb(); } @@ -379,10 +370,7 @@ tlb_flush(vm_offset_t va) KASSERT((va & PAGE_MASK) == 0, ("%s: va %#x not aligned", __func__, va)); dsb(); - if (mp_ncpus == 1) - _CP15_TLBIMVA(va | CPU_ASID_KERNEL); - else - _CP15_TLBIMVAAIS(va); + _CP15_TLBIMVAAIS(va); dsb(); } @@ -396,13 +384,8 @@ tlb_flush_range(vm_offset_t va, vm_size size)); dsb(); - if (mp_ncpus == 1) { - for (; va < eva; va += PAGE_SIZE) - _CP15_TLBIMVA(va | CPU_ASID_KERNEL); - } else { - for (; va < eva; va += PAGE_SIZE) - _CP15_TLBIMVAAIS(va); - } + for (; va < eva; va += PAGE_SIZE) + _CP15_TLBIMVAAIS(va); dsb(); } #else /* SMP */ @@ -428,19 +411,17 @@ icache_sync(vm_offset_t va, vm_size_t si va &= ~cpuinfo.dcache_line_mask; for ( ; va < eva; va += cpuinfo.dcache_line_size) { #if __ARM_ARCH >= 7 && defined SMP - if (mp_ncpus > 1) - _CP15_DCCMVAU(va); - else + _CP15_DCCMVAU(va); +#else + _CP15_DCCMVAC(va); #endif - _CP15_DCCMVAC(va); } dsb(); #if __ARM_ARCH >= 7 && defined SMP - if (mp_ncpus > 1) - _CP15_ICIALLUIS(); - else + _CP15_ICIALLUIS(); +#else + _CP15_ICIALLU(); #endif - _CP15_ICIALLU(); dsb(); isb(); } @@ -450,11 +431,10 @@ static __inline void icache_inv_all(void) { #if __ARM_ARCH >= 7 && defined SMP - if (mp_ncpus > 1) - _CP15_ICIALLUIS(); - else + _CP15_ICIALLUIS(); +#else + _CP15_ICIALLU(); #endif - _CP15_ICIALLU(); dsb(); isb(); } @@ -464,11 +444,10 @@ static __inline void bpb_inv_all(void) { #if __ARM_ARCH >= 7 && defined SMP - if (mp_ncpus > 1) - _CP15_BPIALLIS(); - else + _CP15_BPIALLIS(); +#else + _CP15_BPIALL(); #endif - _CP15_BPIALL(); dsb(); isb(); } @@ -483,11 +462,10 @@ dcache_wb_pou(vm_offset_t va, vm_size_t va &= ~cpuinfo.dcache_line_mask; for ( ; va < eva; va += cpuinfo.dcache_line_size) { #if __ARM_ARCH >= 7 && defined SMP - if (mp_ncpus > 1) - _CP15_DCCMVAU(va); - else + _CP15_DCCMVAU(va); +#else + _CP15_DCCMVAC(va); #endif - _CP15_DCCMVAC(va); } dsb(); } From owner-svn-src-head@freebsd.org Fri Sep 30 14:01:33 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3257BC02ACF; Fri, 30 Sep 2016 14:01:33 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-lf0-x242.google.com (mail-lf0-x242.google.com [IPv6:2a00:1450:4010:c07::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A6B16178B; Fri, 30 Sep 2016 14:01:32 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by mail-lf0-x242.google.com with SMTP id l131so6092693lfl.0; Fri, 30 Sep 2016 07:01:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=5tox44vjpVBT7uh6CR2P0m8VRXA/0DpcHJB0U7J45hw=; b=VCdhyDpZkLbyJzW0GnUUmIYHRqtVLEYc9PN0lwn2j8jqtn30mutuwZR23zRzWmA4ZC MphCVvijRKetjFyUhJt/YvUR2Ol7AniAcdu8rDJeBcEU8KLwn1X8zfByc/xWTSMfSlD6 FC8o9gRXg5toHxYL9Y/y+KCKEeJw5Ubb2MdqsG6NuWnuJlydJblro/eld5nZA2R721WS 1bTzW3pzfKKYfAYqEsfzU/7YCSTdo2fjwTfHdcZENqF5DUMvDJo1h6CGp/zpCMvFETqO IS8/6qBLUltHG1nK8hsHvBRebeNSBmpvgaFjQBN6n1HBM++0VfbZ1a4MrjzIw49iYDiD zSaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=5tox44vjpVBT7uh6CR2P0m8VRXA/0DpcHJB0U7J45hw=; b=ftCSpFJ3tQsVOiB2OHMwTJYsD1vnaBahhLcmRBtwaYsJ06b/Un0eNFHXrM+H8JtFIg Ir4N2q3K36sy9Ml9rrC0mVJ7OPpoCu8WsTqpHjqiO8SRKv/4WahtrB8BgBa+lSI13hup 6p02Y1Z/kJZVrHSLZOYzAQ6cyjI1O3ZU5hm3jpbYopMA5Ssdtcb7jr7pVEIyoq0rpcfa VzncBkQz2cTHcwPgKEtT3KK7nzuB2EVDku5jZ0WpS7xXylarsT+SyVUBnOcz7aOcaAEM NTjP6fbXIwUkriggcdT+9FXb1vI9P2VdYsTFTHQPWGKPRtE84gLilMjUolnnJfK1Z6Pr MOkg== X-Gm-Message-State: AA6/9RkWKXSVRgXaSt3SA6B/ZkXwzm3zd+ChioxCAgk7Ds6Addw+ly5wLaicqjcJzFrvEQ== X-Received: by 10.25.18.157 with SMTP id 29mr2772018lfs.10.1475244089573; Fri, 30 Sep 2016 07:01:29 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id h78sm3026767ljh.45.2016.09.30.07.01.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Sep 2016 07:01:28 -0700 (PDT) Sender: Baptiste Daroussin Date: Fri, 30 Sep 2016 16:01:27 +0200 From: Baptiste Daroussin To: David C Somayajulu Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306284 - head/sys/dev/bxe Message-ID: <20160930140127.ou5a6pjzrfc2ovew@ivaldir.etoilebsd.net> References: <201609232318.u8NNIsxj072044@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wkdvbas7v7hkqeak" Content-Disposition: inline In-Reply-To: <201609232318.u8NNIsxj072044@repo.freebsd.org> User-Agent: Mutt/1.6.2-neo (2016-08-08) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 14:01:33 -0000 --wkdvbas7v7hkqeak Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 23, 2016 at 11:18:54PM +0000, David C Somayajulu wrote: > Author: davidcs > Date: Fri Sep 23 23:18:54 2016 > New Revision: 306284 > URL: https://svnweb.freebsd.org/changeset/base/306284 >=20 > Log: > Fixes for issues under high workloads > =20 > MFC after:5 days Please do not MFC as this change makes the kernel panic as soon as one setu= p the network: I had to revert the patch to get my machine running again bxe0@pci0:1:0:0: class=3D0x020000 card=3D0x06361028 chip=3D0x168e14e= 4 rev=3D0x10 hdr=3D0x00 vendor =3D 'Broadcom Corporation' device =3D 'NetXtreme II BCM57810 10 Gigabit Ethernet' class =3D network subclass =3D ethernet bxe1@pci0:1:0:1: class=3D0x020000 card=3D0x06361028 chip=3D0x168e14e= 4 rev=3D0x10 hdr=3D0x00 vendor =3D 'Broadcom Corporation' device =3D 'NetXtreme II BCM57810 10 Gigabit Ethernet' class =3D network subclass =3D ethernet With the following trace: _callout_init_lock() at _callout_init_lock+0xa8/frame 0xfffffe201bde8370 _timeout_task_init() at _timeout_task_init+0x31/frame 0xfffffe201bde8390 bxe_nic_load() at bxe_nic_load+0x128a/frame 0xfffffe201bde8610 bxe_init_locked() at bxe_init_locked+0xd16/frame 0xfffffe201bde8690 bxe_init() at bxe_init+0x2f/frame 0xfffffe201bde86b0 ether_ioctl() at ether_ioctl+0x4c/frame 0xfffffe201bde86e0 in_control() at in_control+0x882/frame 0xfffffe201bde8760 ifioctl() at ifioctl+0xdc1/frame 0xfffffe201bde87f0 kern_ioctl() at kern_ioctl+0x246/frame 0xfffffe201bde8850 Best regards, Bapt --wkdvbas7v7hkqeak Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX7nAyAAoJEGOJi9zxtz5a0hsQAN7dyFZBlFjltGqhEnr+yDFx 3k68A01TpTp+Ee2FeVl/X4ed/0Au58Ollis3NjuvLdEeJqhutxGIeCVpEozoqCWF 0/FImTEs8dyR3aPDwIIOLlEmoF3UBReyZIde9XtmBM0CTCmaUNbuMKYjKvgEjF5J xt9lAEzZz/ovfxq+5RCN8fANGPkfXcX9/ZWwbvA5vyRggLaYqn2aNM6bsAHSJCyf R4NojmcK/GBe1O1WF8Y6NcTkejtySv7O+vPsd1f0Cc1GKOH8geYhpuPkE6uPigv/ faGW3BuCjjkS7PqULV0YK1PwW+Pr4YNfVs/HNBiXeOxOb+oPYQCvQjC9HdWTBeEP 1QBxRQM/fD0C4YUqgXEE7JgBJKDmcp4ELVMiQ3sMCHEKvEEPnfTArtjSW6SIxPW3 iMk0XgVKoNWvJf0jtpo2fWgTXm7qaimHXdIviKOAAa4h3EuG+QCs+gAoJP6W83Er GD+ZUC5UaZSjWA59U8R8Lafu3WhnCV3X50ZdX8w6F9hkMjp6BE40zUYRB/HtGMtq 5GvYLy2/OWTumtr2u7A3bMsZm9/D2L7n3Jk6yFHv4qRoVEa9vksDKOSQPblo3aAK 1io2jf21AabEPEwYLDdWLN5LCPKz8JaWA0eJyMcZur44SqDEqOHODmUQ407niROY W1+Iq19UY4k9s5X7VEiO =xUoF -----END PGP SIGNATURE----- --wkdvbas7v7hkqeak-- From owner-svn-src-head@freebsd.org Fri Sep 30 14:13:58 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 337F4C02F86; Fri, 30 Sep 2016 14:13:58 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A515D131; Fri, 30 Sep 2016 14:13:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u8UEDqOW019614 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 30 Sep 2016 17:13:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u8UEDqOW019614 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u8UEDqpm019613; Fri, 30 Sep 2016 17:13:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 30 Sep 2016 17:13:52 +0300 From: Konstantin Belousov To: Baptiste Daroussin Cc: David C Somayajulu , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306284 - head/sys/dev/bxe Message-ID: <20160930141352.GR38409@kib.kiev.ua> References: <201609232318.u8NNIsxj072044@repo.freebsd.org> <20160930140127.ou5a6pjzrfc2ovew@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160930140127.ou5a6pjzrfc2ovew@ivaldir.etoilebsd.net> User-Agent: Mutt/1.6.1 (2016-04-27) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 14:13:58 -0000 On Fri, Sep 30, 2016 at 04:01:27PM +0200, Baptiste Daroussin wrote: > On Fri, Sep 23, 2016 at 11:18:54PM +0000, David C Somayajulu wrote: > > Author: davidcs > > Date: Fri Sep 23 23:18:54 2016 > > New Revision: 306284 > > URL: https://svnweb.freebsd.org/changeset/base/306284 > > > > Log: > > Fixes for issues under high workloads > > > > MFC after:5 days > > Please do not MFC as this change makes the kernel panic as soon as one setup the > network: > > I had to revert the patch to get my machine running again > > bxe0@pci0:1:0:0: class=0x020000 card=0x06361028 chip=0x168e14e4 rev=0x10 hdr=0x00 > vendor = 'Broadcom Corporation' > device = 'NetXtreme II BCM57810 10 Gigabit Ethernet' > class = network > subclass = ethernet > bxe1@pci0:1:0:1: class=0x020000 card=0x06361028 chip=0x168e14e4 rev=0x10 hdr=0x00 > vendor = 'Broadcom Corporation' > device = 'NetXtreme II BCM57810 10 Gigabit Ethernet' > class = network > subclass = ethernet > > With the following trace: > _callout_init_lock() at _callout_init_lock+0xa8/frame 0xfffffe201bde8370 > _timeout_task_init() at _timeout_task_init+0x31/frame 0xfffffe201bde8390 > bxe_nic_load() at bxe_nic_load+0x128a/frame 0xfffffe201bde8610 > bxe_init_locked() at bxe_init_locked+0xd16/frame 0xfffffe201bde8690 > bxe_init() at bxe_init+0x2f/frame 0xfffffe201bde86b0 > ether_ioctl() at ether_ioctl+0x4c/frame 0xfffffe201bde86e0 > in_control() at in_control+0x882/frame 0xfffffe201bde8760 > ifioctl() at ifioctl+0xdc1/frame 0xfffffe201bde87f0 > kern_ioctl() at kern_ioctl+0x246/frame 0xfffffe201bde8850 > The issue seems to be that the bxe_interrupt_attach() creates fast taskqueue, i.e. the taskqueue lock is spinlock. Then the queue is passed to TIMEOUT_TASK_INIT(), which can only operate with the sleepable mutex locks. From owner-svn-src-head@freebsd.org Fri Sep 30 15:41:13 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92E80C031E9; Fri, 30 Sep 2016 15:41:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BF5511E8; Fri, 30 Sep 2016 15:41:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UFfCI8010944; Fri, 30 Sep 2016 15:41:12 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UFfCIF010943; Fri, 30 Sep 2016 15:41:12 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201609301541.u8UFfCIF010943@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 30 Sep 2016 15:41:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306504 - head/sys/boot/efi/loader X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 15:41:13 -0000 Author: imp Date: Fri Sep 30 15:41:12 2016 New Revision: 306504 URL: https://svnweb.freebsd.org/changeset/base/306504 Log: Fix a cluster of bugs in list EFI environment variables: 1. Size returned for variable name is in bytes, not CHAR16 (the UEFI standard is unclear on this, where it is clear on the size of the variable). 2. Dynamically allocate the buffers so we can grow them if someone defines a super-long variable name. These two fixes allow me to examine all the variables in my BIOS and also removes the repeated printing of variables. Modified: head/sys/boot/efi/loader/main.c Modified: head/sys/boot/efi/loader/main.c ============================================================================== --- head/sys/boot/efi/loader/main.c Fri Sep 30 14:00:23 2016 (r306503) +++ head/sys/boot/efi/loader/main.c Fri Sep 30 15:41:12 2016 (r306504) @@ -814,8 +814,10 @@ command_efi_show(int argc, char *argv[]) EFI_GUID varguid = { 0,0,0,{0,0,0,0,0,0,0,0} }; EFI_GUID matchguid = { 0,0,0,{0,0,0,0,0,0,0,0} }; uint32_t uuid_status; - CHAR16 varname[128]; + CHAR16 *varname; + CHAR16 *newnm; CHAR16 varnamearg[128]; + UINTN varalloc; UINTN varsz; while ((ch = getopt(argc, argv, "ag:lv:")) != -1) { @@ -910,10 +912,33 @@ command_efi_show(int argc, char *argv[]) * to specify the initial call must be a poiner to a NULL * character. */ - varsz = nitems(varname); + varalloc = 1024; + varname = malloc(varalloc); + if (varname == NULL) { + printf("Can't allocate memory to get variables\n"); + pager_close(); + return (CMD_ERROR); + } varname[0] = 0; - while ((status = RS->GetNextVariableName(&varsz, varname, &varguid)) != - EFI_NOT_FOUND) { + while (1) { + varsz = varalloc; + status = RS->GetNextVariableName(&varsz, varname, &varguid); + if (status == EFI_BUFFER_TOO_SMALL) { + varalloc = varsz; + newnm = malloc(varalloc); + if (newnm == NULL) { + printf("Can't allocate memory to get variables\n"); + free(varname); + pager_close(); + return (CMD_ERROR); + } + memcpy(newnm, varname, varsz); + free(varname); + varname = newnm; + continue; /* Try again with bigger buffer */ + } + if (status != EFI_SUCCESS) + break; if (aflag) { if (efi_print_var(varname, &varguid, lflag) != CMD_OK) break; @@ -934,6 +959,7 @@ command_efi_show(int argc, char *argv[]) } } } + free(varname); pager_close(); return (CMD_OK); From owner-svn-src-head@freebsd.org Fri Sep 30 15:47:15 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 289BEC0331B; Fri, 30 Sep 2016 15:47:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA8341689; Fri, 30 Sep 2016 15:47:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UFlErp012166; Fri, 30 Sep 2016 15:47:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UFlEV3012165; Fri, 30 Sep 2016 15:47:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609301547.u8UFlEV3012165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 30 Sep 2016 15:47:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306505 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 15:47:15 -0000 Author: kib Date: Fri Sep 30 15:47:13 2016 New Revision: 306505 URL: https://svnweb.freebsd.org/changeset/base/306505 Log: Add an article. Submitted by: wblock MFC after: 3 days Modified: head/lib/libc/sys/cap_enter.2 Modified: head/lib/libc/sys/cap_enter.2 ============================================================================== --- head/lib/libc/sys/cap_enter.2 Fri Sep 30 15:41:12 2016 (r306504) +++ head/lib/libc/sys/cap_enter.2 Fri Sep 30 15:47:13 2016 (r306505) @@ -73,7 +73,7 @@ sandbox. If the .Dv kern.trap_enocap sysctl MIB is set to a non-zero value, then for any process executing in a -capability mode sandbox, any syscall which results in either +capability mode sandbox, any syscall which results in either an .Er ENOTCAPABLE or .Er ECAPMODE From owner-svn-src-head@freebsd.org Fri Sep 30 16:02:26 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C373C03841; Fri, 30 Sep 2016 16:02:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F37C1DB; Fri, 30 Sep 2016 16:02:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UG2P3l019789; Fri, 30 Sep 2016 16:02:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UG2PtJ019788; Fri, 30 Sep 2016 16:02:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609301602.u8UG2PtJ019788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 30 Sep 2016 16:02:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306506 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 16:02:26 -0000 Author: kib Date: Fri Sep 30 16:02:25 2016 New Revision: 306506 URL: https://svnweb.freebsd.org/changeset/base/306506 Log: Reword the statement. Submitted by: wblock MFC after: 3 days Modified: head/lib/libc/sys/thr_suspend.2 Modified: head/lib/libc/sys/thr_suspend.2 ============================================================================== --- head/lib/libc/sys/thr_suspend.2 Fri Sep 30 15:47:13 2016 (r306505) +++ head/lib/libc/sys/thr_suspend.2 Fri Sep 30 16:02:25 2016 (r306506) @@ -61,9 +61,9 @@ system call puts the calling thread in a not eligible for CPU time. This state is exited by another thread calling .Xr thr_wake 2 , -by expiration of the timeout specified in the +when the time interval specified by .Fa timeout -argument, +has elapsed, or by the delivery of a signal to the suspended thread. .Pp If the From owner-svn-src-head@freebsd.org Fri Sep 30 16:31:13 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2C51C03485; Fri, 30 Sep 2016 16:31:13 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5CFC1A0F; Fri, 30 Sep 2016 16:31:13 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UGVC8Z029050; Fri, 30 Sep 2016 16:31:12 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UGVCLc029049; Fri, 30 Sep 2016 16:31:12 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201609301631.u8UGVCLc029049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Fri, 30 Sep 2016 16:31:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306507 - head/contrib/blacklist/bin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 16:31:14 -0000 Author: lidl Date: Fri Sep 30 16:31:12 2016 New Revision: 306507 URL: https://svnweb.freebsd.org/changeset/base/306507 Log: Update blacklistd.8 with changes from NetBSD Obtained from: NetBSD MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8079 Modified: head/contrib/blacklist/bin/blacklistd.8 Modified: head/contrib/blacklist/bin/blacklistd.8 ============================================================================== --- head/contrib/blacklist/bin/blacklistd.8 Fri Sep 30 16:02:25 2016 (r306506) +++ head/contrib/blacklist/bin/blacklistd.8 Fri Sep 30 16:31:12 2016 (r306507) @@ -1,4 +1,4 @@ -.\" $NetBSD: blacklistd.8,v 1.15 2016/03/11 17:16:40 christos Exp $ +.\" $NetBSD: blacklistd.8,v 1.18 2016/07/30 06:09:29 dholland Exp $ .\" .\" Copyright (c) 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -47,7 +47,7 @@ .Nm is a daemon similar to .Xr syslogd 8 -that listens to a sockets at paths specified in the +that listens to sockets at paths specified in the .Ar sockpathsfile for notifications from other daemons about successful or failed connection attempts. @@ -218,7 +218,8 @@ Socket to receive connection notificatio .Nm first appeared in .Nx 7 . -.Fx support for +.Fx +support for .Nm was implemented in .Fx 11 . From owner-svn-src-head@freebsd.org Fri Sep 30 16:35:31 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD0E1C03703; Fri, 30 Sep 2016 16:35:31 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 711811F4B; Fri, 30 Sep 2016 16:35:31 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UGZUpO031960; Fri, 30 Sep 2016 16:35:30 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UGZU8u031958; Fri, 30 Sep 2016 16:35:30 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201609301635.u8UGZU8u031958@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Fri, 30 Sep 2016 16:35:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306508 - head/contrib/blacklist/bin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 16:35:31 -0000 Author: lidl Date: Fri Sep 30 16:35:30 2016 New Revision: 306508 URL: https://svnweb.freebsd.org/changeset/base/306508 Log: Fix blacklistd's state restoral at startup The blacklistd daemon attempted to restore the filtering rules before the database of blocked addresses was opened, so no rules were being reloaded. Now the rules are properly recreated when the daemon is started with '-r'. This bug was fixed locally, and then sent upstream to NetBSD. This changeset is the import the NetBSD version of the change, which added debugging output to alert about a null database. Reviewed by: emaste Obtained from: NetBSD MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/contrib/blacklist/bin/blacklistd.c head/contrib/blacklist/bin/state.c Modified: head/contrib/blacklist/bin/blacklistd.c ============================================================================== --- head/contrib/blacklist/bin/blacklistd.c Fri Sep 30 16:31:12 2016 (r306507) +++ head/contrib/blacklist/bin/blacklistd.c Fri Sep 30 16:35:30 2016 (r306508) @@ -1,4 +1,4 @@ -/* $NetBSD: blacklistd.c,v 1.34 2016/04/04 15:52:56 christos Exp $ */ +/* $NetBSD: blacklistd.c,v 1.35 2016/09/26 19:43:43 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include "config.h" #endif #include -__RCSID("$NetBSD: blacklistd.c,v 1.34 2016/04/04 15:52:56 christos Exp $"); +__RCSID("$NetBSD: blacklistd.c,v 1.35 2016/09/26 19:43:43 christos Exp $"); #include #include @@ -473,9 +473,6 @@ main(int argc, char *argv[]) flags |= O_TRUNC; } - if (restore) - rules_restore(); - struct pollfd *pfd = NULL; bl_t *bl = NULL; size_t nfd = 0; @@ -500,6 +497,9 @@ main(int argc, char *argv[]) if (state == NULL) return EXIT_FAILURE; + if (restore) + rules_restore(); + if (!debug) { if (daemon(0, 0) == -1) err(EXIT_FAILURE, "daemon failed"); Modified: head/contrib/blacklist/bin/state.c ============================================================================== --- head/contrib/blacklist/bin/state.c Fri Sep 30 16:31:12 2016 (r306507) +++ head/contrib/blacklist/bin/state.c Fri Sep 30 16:35:30 2016 (r306508) @@ -1,4 +1,4 @@ -/* $NetBSD: state.c,v 1.18 2016/04/04 15:52:56 christos Exp $ */ +/* $NetBSD: state.c,v 1.19 2016/09/26 19:43:43 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #endif #include -__RCSID("$NetBSD: state.c,v 1.18 2016/04/04 15:52:56 christos Exp $"); +__RCSID("$NetBSD: state.c,v 1.19 2016/09/26 19:43:43 christos Exp $"); #include #include @@ -200,8 +200,10 @@ state_iterate(DB *db, struct conf *c, st int rv; DBT k, v; - if (db == NULL) + if (db == NULL) { + (*lfun)(LOG_ERR, "%s: called with no database file", __func__); return -1; + } first = first ? R_FIRST : R_NEXT; From owner-svn-src-head@freebsd.org Fri Sep 30 17:11:05 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FF5AC0327F; Fri, 30 Sep 2016 17:11:05 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B400180B; Fri, 30 Sep 2016 17:11:05 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UHB4kX046398; Fri, 30 Sep 2016 17:11:04 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UHB35d046389; Fri, 30 Sep 2016 17:11:03 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201609301711.u8UHB35d046389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 30 Sep 2016 17:11:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 17:11:05 -0000 Author: mjg Date: Fri Sep 30 17:11:03 2016 New Revision: 306509 URL: https://svnweb.freebsd.org/changeset/base/306509 Log: vfs: remove the __bo_vnode field from struct vnode The pointer can be obtained using __containerof instead. Reviewed by: kib Modified: head/sys/fs/nandfs/nandfs_subr.c head/sys/kern/vfs_bio.c head/sys/kern/vfs_subr.c head/sys/sys/bufobj.h head/sys/sys/vnode.h head/sys/ufs/ffs/ffs_snapshot.c head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/fs/nandfs/nandfs_subr.c ============================================================================== --- head/sys/fs/nandfs/nandfs_subr.c Fri Sep 30 16:35:30 2016 (r306508) +++ head/sys/fs/nandfs/nandfs_subr.c Fri Sep 30 17:11:03 2016 (r306509) @@ -80,7 +80,7 @@ nandfs_bufsync(struct bufobj *bo, int wa struct vnode *vp; int error = 0; - vp = bo->__bo_vnode; + vp = bo2vnode(bo); ASSERT_VOP_LOCKED(vp, __func__); error = nandfs_sync_file(vp); Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Fri Sep 30 16:35:30 2016 (r306508) +++ head/sys/kern/vfs_bio.c Fri Sep 30 17:11:03 2016 (r306509) @@ -4544,7 +4544,7 @@ int bufsync(struct bufobj *bo, int waitfor) { - return (VOP_FSYNC(bo->__bo_vnode, waitfor, curthread)); + return (VOP_FSYNC(bo2vnode(bo), waitfor, curthread)); } void Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Fri Sep 30 16:35:30 2016 (r306508) +++ head/sys/kern/vfs_subr.c Fri Sep 30 17:11:03 2016 (r306509) @@ -372,7 +372,6 @@ vnode_init(void *mem, int size, int flag * Initialize bufobj. */ bo = &vp->v_bufobj; - bo->__bo_vnode = vp; rw_init(BO_LOCKPTR(bo), "bufobj interlock"); bo->bo_private = vp; TAILQ_INIT(&bo->bo_clean.bv_hd); @@ -2052,7 +2051,7 @@ sync_vnode(struct synclist *slp, struct *bo = LIST_FIRST(slp); if (*bo == NULL) return (0); - vp = (*bo)->__bo_vnode; /* XXX */ + vp = bo2vnode(*bo); if (VOP_ISLOCKED(vp) != 0 || VI_TRYLOCK(vp) == 0) return (1); /* Modified: head/sys/sys/bufobj.h ============================================================================== --- head/sys/sys/bufobj.h Fri Sep 30 16:35:30 2016 (r306508) +++ head/sys/sys/bufobj.h Fri Sep 30 17:11:03 2016 (r306509) @@ -94,11 +94,6 @@ struct bufobj { struct vm_object *bo_object; /* v Place to store VM object */ LIST_ENTRY(bufobj) bo_synclist; /* S dirty vnode list */ void *bo_private; /* private pointer */ - struct vnode *__bo_vnode; /* - * XXX: This vnode pointer is here - * XXX: only to keep the syncer working - * XXX: for now. - */ struct bufv bo_clean; /* i Clean buffers */ struct bufv bo_dirty; /* i Dirty buffers */ long bo_numoutput; /* i Writes in progress */ Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Fri Sep 30 16:35:30 2016 (r306508) +++ head/sys/sys/vnode.h Fri Sep 30 17:11:03 2016 (r306509) @@ -179,6 +179,8 @@ struct vnode { #define v_rdev v_un.vu_cdev #define v_fifoinfo v_un.vu_fifoinfo +#define bo2vnode(bo) __containerof((bo), struct vnode, v_bufobj) + /* XXX: These are temporary to avoid a source sweep at this time */ #define v_object v_bufobj.bo_object Modified: head/sys/ufs/ffs/ffs_snapshot.c ============================================================================== --- head/sys/ufs/ffs/ffs_snapshot.c Fri Sep 30 16:35:30 2016 (r306508) +++ head/sys/ufs/ffs/ffs_snapshot.c Fri Sep 30 17:11:03 2016 (r306509) @@ -2170,7 +2170,7 @@ ffs_bdflush(bo, bp) td = curthread; vp = bp->b_vp; - devvp = bo->__bo_vnode; + devvp = bo2vnode(bo); KASSERT(vp == devvp, ("devvp != vp %p %p", bo, bp)); VI_LOCK(devvp); Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Fri Sep 30 16:35:30 2016 (r306508) +++ head/sys/ufs/ffs/ffs_vfsops.c Fri Sep 30 17:11:03 2016 (r306509) @@ -2177,7 +2177,7 @@ ffs_geom_strategy(struct bufobj *bo, str struct buf *tbp; int nocopy; - vp = bo->__bo_vnode; + vp = bo2vnode(bo); if (bp->b_iocmd == BIO_WRITE) { if ((bp->b_flags & B_VALIDSUSPWRT) == 0 && bp->b_vp != NULL && bp->b_vp->v_mount != NULL && From owner-svn-src-head@freebsd.org Fri Sep 30 17:16:03 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35509C0377E; Fri, 30 Sep 2016 17:16:03 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05A071F18; Fri, 30 Sep 2016 17:16:02 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UHG2Zm047217; Fri, 30 Sep 2016 17:16:02 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UHG2WQ047216; Fri, 30 Sep 2016 17:16:02 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201609301716.u8UHG2WQ047216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Fri, 30 Sep 2016 17:16:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306510 - head/sys/arm/ti/cpsw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 17:16:03 -0000 Author: loos Date: Fri Sep 30 17:16:02 2016 New Revision: 306510 URL: https://svnweb.freebsd.org/changeset/base/306510 Log: Sort and remove unnecessary includes. No functional changes. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/arm/ti/cpsw/if_cpsw.c Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Fri Sep 30 17:11:03 2016 (r306509) +++ head/sys/arm/ti/cpsw/if_cpsw.c Fri Sep 30 17:16:02 2016 (r306510) @@ -48,35 +48,27 @@ __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 -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include #include #include @@ -273,7 +265,6 @@ cpsw_debugf_head(const char *funcname) printf("%02d:%02d:%02d %s ", t / (60 * 60), (t / 60) % 60, t % 60, funcname); } -#include static void cpsw_debugf(const char *fmt, ...) { From owner-svn-src-head@freebsd.org Fri Sep 30 17:18:49 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 720D6C037F4 for ; Fri, 30 Sep 2016 17:18:49 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-yb0-x232.google.com (mail-yb0-x232.google.com [IPv6:2607:f8b0:4002:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2AA27150 for ; Fri, 30 Sep 2016 17:18:49 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-yb0-x232.google.com with SMTP id t5so30407601yba.2 for ; Fri, 30 Sep 2016 10:18:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=mTgAFN4AOWgSIjbkNTlEeXAA5J15ByXimsPqjFG6AJc=; b=EQig7EzvFjRNGv+SaNXODNe7c7Cu4ErAvdVbMj6lH7hm8JObVTWGf4+At8zS97G0RB ctpJAQsCvPb6/qcsoW450SwWwPCqM9pUTYxys0HfV9P+/Vudh1aiwcEW7QYKUMDn+wcf 4xw+lRvWWUHMB53LFUO+DGFQxMi5Dh7qR951BaChzf7oSO3oseUx96rIGehZxoC+gmov HF9LZvujuwA74uteV41Fov2zZo4brDp80ngl0UDNp3VOyi57IRL8QYoe4UK0SdbE8fa9 9x7c0S4UqwUUZmKkGaUFiGuAtFjVD9zBmKQHS22kyOXMlms14z9IlpDvD69kQh9YfxBZ 6lqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=mTgAFN4AOWgSIjbkNTlEeXAA5J15ByXimsPqjFG6AJc=; b=CujM7i7BT0GPdiTngJ3g6Z7OZ8BFwDUOpIT0ueDKeASp9LCjp7iuM7UJXVLKVyuTxd arDCxVKmSsRSVL2tstMRFA9xkSvENze2H06BAzytyp6Q2nlzKaq7E9XMh9f9baono1Ey Xoo9Hj7ZwpGW9oOhjC0A1HolhBb3lL5obBTc46ZVfHHlvFiQ+HQXNZh/MqcYYb6C0/6f TcgsnJCef5SghEopwt+2CI2YEquKXJjk62Cnf1JNXCxOnRob4wE1O4cbom4bXpP1hVoA aCQ+xmg1tyqH4Lb0iMNRoHqIZTyWBtTxsgExQj2p4M7SSR3GO3HjK7Ik569JNcJmhP/P F1+w== X-Gm-Message-State: AA6/9RmhJJpoMVTqIUtWbq96Nj4GyDNlGMe+f21aUDgD57miWPA56PrGA+5Slcx0a7kYw5hA X-Received: by 10.37.209.80 with SMTP id i77mr2390942ybg.165.1475255928113; Fri, 30 Sep 2016 10:18:48 -0700 (PDT) Received: from mutt-hardenedbsd (pool-100-16-218-231.bltmmd.fios.verizon.net. [100.16.218.231]) by smtp.gmail.com with ESMTPSA id x68sm9306875ywx.10.2016.09.30.10.18.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Sep 2016 10:18:47 -0700 (PDT) Date: Fri, 30 Sep 2016 13:18:45 -0400 From: Shawn Webb To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs Message-ID: <20160930171845.GA62393@mutt-hardenedbsd> References: <201609301711.u8UHB35d046389@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0F1p//8PRICkK4MW" Content-Disposition: inline In-Reply-To: <201609301711.u8UHB35d046389@repo.freebsd.org> X-Operating-System: FreeBSD mutt-hardenedbsd 12.0-CURRENT-HBSD FreeBSD 12.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 17:18:49 -0000 --0F1p//8PRICkK4MW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 30, 2016 at 05:11:03PM +0000, Mateusz Guzik wrote: > Author: mjg > Date: Fri Sep 30 17:11:03 2016 > New Revision: 306509 > URL: https://svnweb.freebsd.org/changeset/base/306509 >=20 > Log: > vfs: remove the __bo_vnode field from struct vnode > =20 > The pointer can be obtained using __containerof instead. > =20 > Reviewed by: kib Should __FreeBSD_Version be bumped? Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --0F1p//8PRICkK4MW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX7p5yAAoJEGqEZY9SRW7uM7EP/jNjKMq1uitom1MVaW5Sgqr/ IlFamaCi2kWUX7aZ2/j1Li+cR/PJLbuuSc9dPAtI1PYuAAJdalXUWoTdinhfN/ei jqBry4nIri4uXvE4Lh3KWfC4zyfHjh1ByJmiudiIwYmXLDw6oupJyJ6vfprBk/yk hodFjOFp00wrffdSq2yfAivZhevNIZlTsXByKJK1pOtjL2giNOx6hnq3lW5QHY7P QB6JUCQkT5efXA8w0XY2lwQYec54Alj7vjHUr0aFyHQPNL+A2l3LtkdF69IHEupi SAdCnj5RzCUJ2o4z2MzaDl1Cwm/h35NhO0AEULHY37Knt6kShSwvZKjq1c8rsUPS mLxUVPnuO4bRN6vtsdabIQx1XmRugO/DjEO/zztbGtZpCel5CZTWhwf6XIEC12TX yg0/p6XMZOr8pXzRhODRpoJVVTuD+VdCkKpx6xNqszO7hBjrimNDDuz3VruggwOA cmINxzI4Rh+inQ/+g7bqR7MGK7ZHHyXuFZm3YEAjtDHMC02tmmPUll/Y7ValeORu x9AddFt1qF0hrovTp9/bxnDuKq8n9lrbGWWgAWIX3eEShgexLi5fti/KwmGwIXat ZFuv+/yG0ou51FP+BK2A1AHSUiPhrl54ovL07SPe7SBhabpIuKX2sA2VellJQ83j zza37ASpKaGpSwlt5yRd =nti/ -----END PGP SIGNATURE----- --0F1p//8PRICkK4MW-- From owner-svn-src-head@freebsd.org Fri Sep 30 17:19:44 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 386D9C0385E; Fri, 30 Sep 2016 17:19:44 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1659A303; Fri, 30 Sep 2016 17:19:44 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UHJhn8047382; Fri, 30 Sep 2016 17:19:43 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UHJhdv047381; Fri, 30 Sep 2016 17:19:43 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201609301719.u8UHJhdv047381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Fri, 30 Sep 2016 17:19:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306511 - head/sys/arm/ti/cpsw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 17:19:44 -0000 Author: loos Date: Fri Sep 30 17:19:43 2016 New Revision: 306511 URL: https://svnweb.freebsd.org/changeset/base/306511 Log: Fix a typo in CPSW_DEBUG MACRO and then replace all the CPSWP_DEBUG() calls with CPSW_DEBUG(). Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/arm/ti/cpsw/if_cpsw.c Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Fri Sep 30 17:16:02 2016 (r306510) +++ head/sys/arm/ti/cpsw/if_cpsw.c Fri Sep 30 17:19:43 2016 (r306511) @@ -255,8 +255,6 @@ static struct cpsw_stat { * Basic debug support. */ -#define IF_DEBUG(_sc) if ((_sc)->if_flags & IFF_DEBUG) - static void cpsw_debugf_head(const char *funcname) { @@ -278,20 +276,12 @@ cpsw_debugf(const char *fmt, ...) } #define CPSW_DEBUGF(_sc, a) do { \ - if (sc->debug) { \ + if ((_sc)->debug) { \ cpsw_debugf_head(__func__); \ cpsw_debugf a; \ } \ } while (0) -#define CPSWP_DEBUGF(_sc, a) do { \ - IF_DEBUG((_sc)) { \ - cpsw_debugf_head(__func__); \ - cpsw_debugf a; \ - } \ -} while (0) - - /* * Locking macros */ @@ -1052,7 +1042,7 @@ cpswp_detach(device_t dev) struct cpswp_softc *sc; sc = device_get_softc(dev); - CPSWP_DEBUGF(sc, ("")); + CPSW_DEBUGF(sc->swsc, ("")); if (device_is_attached(dev)) { ether_ifdetach(sc->ifp); CPSW_PORT_LOCK(sc); @@ -1098,7 +1088,7 @@ cpswp_init(void *arg) { struct cpswp_softc *sc = arg; - CPSWP_DEBUGF(sc, ("")); + CPSW_DEBUGF(sc->swsc, ("")); CPSW_PORT_LOCK(sc); cpswp_init_locked(arg); CPSW_PORT_UNLOCK(sc); @@ -1111,7 +1101,7 @@ cpswp_init_locked(void *arg) struct ifnet *ifp; uint32_t reg; - CPSWP_DEBUGF(sc, ("")); + CPSW_DEBUGF(sc->swsc, ("")); CPSW_PORT_LOCK_ASSERT(sc); ifp = sc->ifp; if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) @@ -1240,7 +1230,7 @@ cpswp_stop_locked(struct cpswp_softc *sc uint32_t reg; ifp = sc->ifp; - CPSWP_DEBUGF(sc, ("")); + CPSW_DEBUGF(sc->swsc, ("")); CPSW_PORT_LOCK_ASSERT(sc); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) @@ -1362,7 +1352,7 @@ cpswp_ioctl(struct ifnet *ifp, u_long co if (ifp->if_flags & IFF_UP) { if (ifp->if_drv_flags & IFF_DRV_RUNNING) { changed = ifp->if_flags ^ sc->if_flags; - CPSWP_DEBUGF(sc, + CPSW_DEBUGF(sc->swsc, ("SIOCSIFFLAGS: UP & RUNNING (changed=0x%x)", changed)); if (changed & IFF_PROMISC) @@ -1372,12 +1362,12 @@ cpswp_ioctl(struct ifnet *ifp, u_long co cpsw_set_allmulti(sc, ifp->if_flags & IFF_ALLMULTI); } else { - CPSWP_DEBUGF(sc, + CPSW_DEBUGF(sc->swsc, ("SIOCSIFFLAGS: UP but not RUNNING; starting up")); cpswp_init_locked(sc); } } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - CPSWP_DEBUGF(sc, + CPSW_DEBUGF(sc->swsc, ("SIOCSIFFLAGS: not UP but RUNNING; shutting down")); cpswp_stop_locked(sc); } @@ -1488,7 +1478,7 @@ cpswp_miibus_statchg(device_t dev) uint32_t mac_control, reg; sc = device_get_softc(dev); - CPSWP_DEBUGF(sc, ("")); + CPSW_DEBUGF(sc->swsc, ("")); reg = CPSW_SL_MACCONTROL(sc->unit); mac_control = cpsw_read_4(sc->swsc, reg); @@ -1766,7 +1756,7 @@ cpswp_tx_enqueue(struct cpswp_softc *sc) "Can't defragment packet; dropping\n"); m_freem(slot->mbuf); } else { - CPSWP_DEBUGF(sc, + CPSW_DEBUGF(sc->swsc, ("Requeueing defragmented packet")); IF_PREPEND(&sc->ifp->if_snd, m0); } @@ -1786,7 +1776,7 @@ cpswp_tx_enqueue(struct cpswp_softc *sc) bus_dmamap_sync(sc->swsc->mbuf_dtag, slot->dmamap, BUS_DMASYNC_PREWRITE); - CPSWP_DEBUGF(sc, + CPSW_DEBUGF(sc->swsc, ("Queueing TX packet: %d segments + %d pad bytes", nsegs, padlen)); @@ -2115,7 +2105,7 @@ cpswp_ifmedia_sts(struct ifnet *ifp, str struct mii_data *mii; sc = ifp->if_softc; - CPSWP_DEBUGF(sc, ("")); + CPSW_DEBUGF(sc->swsc, ("")); CPSW_PORT_LOCK(sc); mii = sc->mii; @@ -2132,7 +2122,7 @@ cpswp_ifmedia_upd(struct ifnet *ifp) struct cpswp_softc *sc; sc = ifp->if_softc; - CPSWP_DEBUGF(sc, ("")); + CPSW_DEBUGF(sc->swsc, ("")); CPSW_PORT_LOCK(sc); mii_mediachg(sc->mii); sc->media_status = sc->mii->mii_media.ifm_media; From owner-svn-src-head@freebsd.org Fri Sep 30 17:27:19 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BD73C03BA5; Fri, 30 Sep 2016 17:27:19 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31123B9F; Fri, 30 Sep 2016 17:27:19 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UHRIWh051377; Fri, 30 Sep 2016 17:27:18 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UHRIgD051373; Fri, 30 Sep 2016 17:27:18 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201609301727.u8UHRIgD051373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 30 Sep 2016 17:27:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306512 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 17:27:19 -0000 Author: mjg Date: Fri Sep 30 17:27:17 2016 New Revision: 306512 URL: https://svnweb.freebsd.org/changeset/base/306512 Log: vfs: batch free vnodes in per-mnt lists Previously free vnodes would always by directly returned to the global LRU list. With this change up to mnt_free_list_batch vnodes are collected first. syncer runs always return the batch regardless of its size. While vnodes on per-mnt lists are not counted as free, they can be returned in case of vnode shortage. Reviewed by: kib Tested by: pho Modified: head/sys/kern/vfs_mount.c head/sys/kern/vfs_subr.c head/sys/sys/mount.h head/sys/sys/vnode.h Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Fri Sep 30 17:19:43 2016 (r306511) +++ head/sys/kern/vfs_mount.c Fri Sep 30 17:27:17 2016 (r306512) @@ -109,6 +109,7 @@ mount_init(void *mem, int size, int flag mp = (struct mount *)mem; mtx_init(&mp->mnt_mtx, "struct mount mtx", NULL, MTX_DEF); + mtx_init(&mp->mnt_listmtx, "struct mount vlist mtx", NULL, MTX_DEF); lockinit(&mp->mnt_explock, PVFS, "explock", 0, 0); return (0); } @@ -120,6 +121,7 @@ mount_fini(void *mem, int size) mp = (struct mount *)mem; lockdestroy(&mp->mnt_explock); + mtx_destroy(&mp->mnt_listmtx); mtx_destroy(&mp->mnt_mtx); } @@ -461,6 +463,8 @@ vfs_mount_alloc(struct vnode *vp, struct mp->mnt_nvnodelistsize = 0; TAILQ_INIT(&mp->mnt_activevnodelist); mp->mnt_activevnodelistsize = 0; + TAILQ_INIT(&mp->mnt_tmpfreevnodelist); + mp->mnt_tmpfreevnodelistsize = 0; mp->mnt_ref = 0; (void) vfs_busy(mp, MBF_NOWAIT); atomic_add_acq_int(&vfsp->vfc_refcount, 1); Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Fri Sep 30 17:19:43 2016 (r306511) +++ head/sys/kern/vfs_subr.c Fri Sep 30 17:27:17 2016 (r306512) @@ -112,6 +112,7 @@ static void vfs_knllock(void *arg); static void vfs_knlunlock(void *arg); static void vfs_knl_assert_locked(void *arg); static void vfs_knl_assert_unlocked(void *arg); +static void vnlru_return_batches(struct vfsops *mnt_op); static void destroy_vpollinfo(struct vpollinfo *vi); /* @@ -127,6 +128,10 @@ static u_long vnodes_created; SYSCTL_ULONG(_vfs, OID_AUTO, vnodes_created, CTLFLAG_RD, &vnodes_created, 0, "Number of vnodes created by getnewvnode"); +static u_long mnt_free_list_batch = 128; +SYSCTL_ULONG(_vfs, OID_AUTO, mnt_free_list_batch, CTLFLAG_RW, + &mnt_free_list_batch, 0, "Limit of vnodes held on mnt's free list"); + /* * Conversion tables for conversion from vnode types to inode formats * and back. @@ -953,7 +958,9 @@ vnlru_free_locked(int count, struct vfso { struct vnode *vp; struct mount *mp; + bool tried_batches; + tried_batches = false; mtx_assert(&vnode_free_list_mtx, MA_OWNED); if (count > max_vnlru_free) count = max_vnlru_free; @@ -963,8 +970,16 @@ vnlru_free_locked(int count, struct vfso * The list can be modified while the free_list_mtx * has been dropped and vp could be NULL here. */ - if (!vp) - break; + if (vp == NULL) { + if (tried_batches) + break; + mtx_unlock(&vnode_free_list_mtx); + vnlru_return_batches(mnt_op); + tried_batches = true; + mtx_lock(&vnode_free_list_mtx); + continue; + } + VNASSERT(vp->v_op != NULL, vp, ("vnlru_free: vnode already reclaimed.")); KASSERT((vp->v_iflag & VI_FREE) != 0, @@ -1041,6 +1056,63 @@ vspace(void) return (space); } +static void +vnlru_return_batch_locked(struct mount *mp) +{ + struct vnode *vp; + + mtx_assert(&mp->mnt_listmtx, MA_OWNED); + + if (mp->mnt_tmpfreevnodelistsize == 0) + return; + + mtx_lock(&vnode_free_list_mtx); + TAILQ_FOREACH(vp, &mp->mnt_tmpfreevnodelist, v_actfreelist) { + VNASSERT((vp->v_mflag & VMP_TMPMNTFREELIST) != 0, vp, + ("vnode without VMP_TMPMNTFREELIST on mnt_tmpfreevnodelist")); + vp->v_mflag &= ~VMP_TMPMNTFREELIST; + } + TAILQ_CONCAT(&vnode_free_list, &mp->mnt_tmpfreevnodelist, v_actfreelist); + freevnodes += mp->mnt_tmpfreevnodelistsize; + mp->mnt_tmpfreevnodelistsize = 0; + mtx_unlock(&vnode_free_list_mtx); +} + +static void +vnlru_return_batch(struct mount *mp) +{ + + mtx_lock(&mp->mnt_listmtx); + vnlru_return_batch_locked(mp); + mtx_unlock(&mp->mnt_listmtx); +} + +static void +vnlru_return_batches(struct vfsops *mnt_op) +{ + struct mount *mp, *nmp; + bool need_unbusy; + + mtx_lock(&mountlist_mtx); + for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) { + need_unbusy = false; + if (mnt_op != NULL && mp->mnt_op != mnt_op) + goto next; + if (mp->mnt_tmpfreevnodelistsize == 0) + goto next; + if (vfs_busy(mp, MBF_NOWAIT | MBF_MNTLSTLOCK) == 0) { + vnlru_return_batch(mp); + need_unbusy = true; + mtx_lock(&mountlist_mtx); + } +next: + nmp = TAILQ_NEXT(mp, mnt_list); + if (need_unbusy) + vfs_unbusy(mp); + } + mtx_unlock(&mountlist_mtx); +} + /* * Attempt to recycle vnodes in a context that is always safe to block. * Calling vlrurecycle() from the bowels of filesystem code has some @@ -1068,9 +1140,8 @@ vnlru_proc(void) * adjusted using its sysctl, or emergency growth), first * try to reduce it by discarding from the free list. */ - if (numvnodes > desiredvnodes && freevnodes > 0) - vnlru_free_locked(ulmin(numvnodes - desiredvnodes, - freevnodes), NULL); + if (numvnodes > desiredvnodes) + vnlru_free_locked(numvnodes - desiredvnodes, NULL); /* * Sleep if the vnode cache is in a good state. This is * when it is not over-full and has space for about a 4% @@ -1457,10 +1528,10 @@ delmntque(struct vnode *vp) active = vp->v_iflag & VI_ACTIVE; vp->v_iflag &= ~VI_ACTIVE; if (active) { - mtx_lock(&vnode_free_list_mtx); + mtx_lock(&mp->mnt_listmtx); TAILQ_REMOVE(&mp->mnt_activevnodelist, vp, v_actfreelist); mp->mnt_activevnodelistsize--; - mtx_unlock(&vnode_free_list_mtx); + mtx_unlock(&mp->mnt_listmtx); } vp->v_mount = NULL; VI_UNLOCK(vp); @@ -1525,10 +1596,10 @@ insmntque1(struct vnode *vp, struct moun KASSERT((vp->v_iflag & VI_ACTIVE) == 0, ("Activating already active vnode")); vp->v_iflag |= VI_ACTIVE; - mtx_lock(&vnode_free_list_mtx); + mtx_lock(&mp->mnt_listmtx); TAILQ_INSERT_HEAD(&mp->mnt_activevnodelist, vp, v_actfreelist); mp->mnt_activevnodelistsize++; - mtx_unlock(&vnode_free_list_mtx); + mtx_unlock(&mp->mnt_listmtx); VI_UNLOCK(vp); MNT_IUNLOCK(mp); return (0); @@ -2753,17 +2824,25 @@ _vhold(struct vnode *vp, bool locked) * Remove a vnode from the free list, mark it as in use, * and put it on the active list. */ - mtx_lock(&vnode_free_list_mtx); - TAILQ_REMOVE(&vnode_free_list, vp, v_actfreelist); - freevnodes--; - vp->v_iflag &= ~VI_FREE; + mp = vp->v_mount; + mtx_lock(&mp->mnt_listmtx); + if ((vp->v_mflag & VMP_TMPMNTFREELIST) != 0) { + TAILQ_REMOVE(&mp->mnt_tmpfreevnodelist, vp, v_actfreelist); + mp->mnt_tmpfreevnodelistsize--; + vp->v_mflag &= ~VMP_TMPMNTFREELIST; + } else { + mtx_lock(&vnode_free_list_mtx); + TAILQ_REMOVE(&vnode_free_list, vp, v_actfreelist); + freevnodes--; + mtx_unlock(&vnode_free_list_mtx); + } KASSERT((vp->v_iflag & VI_ACTIVE) == 0, ("Activating already active vnode")); + vp->v_iflag &= ~VI_FREE; vp->v_iflag |= VI_ACTIVE; - mp = vp->v_mount; TAILQ_INSERT_HEAD(&mp->mnt_activevnodelist, vp, v_actfreelist); mp->mnt_activevnodelistsize++; - mtx_unlock(&vnode_free_list_mtx); + mtx_unlock(&mp->mnt_listmtx); refcount_acquire(&vp->v_holdcnt); if (!locked) VI_UNLOCK(vp); @@ -2819,21 +2898,25 @@ _vdrop(struct vnode *vp, bool locked) if ((vp->v_iflag & VI_OWEINACT) == 0) { vp->v_iflag &= ~VI_ACTIVE; mp = vp->v_mount; - mtx_lock(&vnode_free_list_mtx); + mtx_lock(&mp->mnt_listmtx); if (active) { TAILQ_REMOVE(&mp->mnt_activevnodelist, vp, v_actfreelist); mp->mnt_activevnodelistsize--; } - TAILQ_INSERT_TAIL(&vnode_free_list, vp, + TAILQ_INSERT_TAIL(&mp->mnt_tmpfreevnodelist, vp, v_actfreelist); - freevnodes++; + mp->mnt_tmpfreevnodelistsize++; vp->v_iflag |= VI_FREE; - mtx_unlock(&vnode_free_list_mtx); + vp->v_mflag |= VMP_TMPMNTFREELIST; + VI_UNLOCK(vp); + if (mp->mnt_tmpfreevnodelistsize >= mnt_free_list_batch) + vnlru_return_batch_locked(mp); + mtx_unlock(&mp->mnt_listmtx); } else { + VI_UNLOCK(vp); atomic_add_long(&free_owe_inact, 1); } - VI_UNLOCK(vp); return; } /* @@ -3926,6 +4009,9 @@ vfs_msync(struct mount *mp, int flags) struct vm_object *obj; CTR2(KTR_VFS, "%s: mp %p", __func__, mp); + + vnlru_return_batch(mp); + MNT_VNODE_FOREACH_ACTIVE(vp, mp, mvp) { obj = vp->v_object; if (obj != NULL && (obj->flags & OBJ_MIGHTBEDIRTY) != 0 && @@ -5236,7 +5322,7 @@ mnt_vnode_next_active(struct vnode **mvp { struct vnode *vp, *nvp; - mtx_assert(&vnode_free_list_mtx, MA_OWNED); + mtx_assert(&mp->mnt_listmtx, MA_OWNED); KASSERT((*mvp)->v_mount == mp, ("marker vnode mount list mismatch")); restart: vp = TAILQ_NEXT(*mvp, v_actfreelist); @@ -5249,9 +5335,9 @@ restart: if (!VI_TRYLOCK(vp)) { if (mp_ncpus == 1 || should_yield()) { TAILQ_INSERT_BEFORE(vp, *mvp, v_actfreelist); - mtx_unlock(&vnode_free_list_mtx); + mtx_unlock(&mp->mnt_listmtx); pause("vnacti", 1); - mtx_lock(&vnode_free_list_mtx); + mtx_lock(&mp->mnt_listmtx); goto restart; } continue; @@ -5268,12 +5354,12 @@ restart: /* Check if we are done */ if (vp == NULL) { - mtx_unlock(&vnode_free_list_mtx); + mtx_unlock(&mp->mnt_listmtx); mnt_vnode_markerfree_active(mvp, mp); return (NULL); } TAILQ_INSERT_AFTER(&mp->mnt_activevnodelist, vp, *mvp, v_actfreelist); - mtx_unlock(&vnode_free_list_mtx); + mtx_unlock(&mp->mnt_listmtx); ASSERT_VI_LOCKED(vp, "active iter"); KASSERT((vp->v_iflag & VI_ACTIVE) != 0, ("Non-active vp %p", vp)); return (vp); @@ -5285,7 +5371,7 @@ __mnt_vnode_next_active(struct vnode **m if (should_yield()) kern_yield(PRI_USER); - mtx_lock(&vnode_free_list_mtx); + mtx_lock(&mp->mnt_listmtx); return (mnt_vnode_next_active(mvp, mp)); } @@ -5301,10 +5387,10 @@ __mnt_vnode_first_active(struct vnode ** (*mvp)->v_type = VMARKER; (*mvp)->v_mount = mp; - mtx_lock(&vnode_free_list_mtx); + mtx_lock(&mp->mnt_listmtx); vp = TAILQ_FIRST(&mp->mnt_activevnodelist); if (vp == NULL) { - mtx_unlock(&vnode_free_list_mtx); + mtx_unlock(&mp->mnt_listmtx); mnt_vnode_markerfree_active(mvp, mp); return (NULL); } @@ -5319,8 +5405,8 @@ __mnt_vnode_markerfree_active(struct vno if (*mvp == NULL) return; - mtx_lock(&vnode_free_list_mtx); + mtx_lock(&mp->mnt_listmtx); TAILQ_REMOVE(&mp->mnt_activevnodelist, *mvp, v_actfreelist); - mtx_unlock(&vnode_free_list_mtx); + mtx_unlock(&mp->mnt_listmtx); mnt_vnode_markerfree_active(mvp, mp); } Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Fri Sep 30 17:19:43 2016 (r306511) +++ head/sys/sys/mount.h Fri Sep 30 17:27:17 2016 (r306512) @@ -147,6 +147,7 @@ struct vfsopt { * put on a doubly linked list. * * Lock reference: + * l - mnt_listmtx * m - mountlist_mtx * i - interlock * v - vnode freelist mutex @@ -166,8 +167,6 @@ struct mount { int mnt_ref; /* (i) Reference count */ struct vnodelst mnt_nvnodelist; /* (i) list of vnodes */ int mnt_nvnodelistsize; /* (i) # of vnodes */ - struct vnodelst mnt_activevnodelist; /* (v) list of active vnodes */ - int mnt_activevnodelistsize;/* (v) # of active vnodes */ int mnt_writeopcount; /* (i) write syscalls pending */ int mnt_kern_flag; /* (i) kernel only flags */ uint64_t mnt_flag; /* (i) flags shared with user */ @@ -188,6 +187,11 @@ struct mount { struct thread *mnt_susp_owner; /* (i) thread owning suspension */ #define mnt_endzero mnt_gjprovider char *mnt_gjprovider; /* gjournal provider name */ + struct mtx mnt_listmtx; + struct vnodelst mnt_activevnodelist; /* (l) list of active vnodes */ + int mnt_activevnodelistsize;/* (l) # of active vnodes */ + struct vnodelst mnt_tmpfreevnodelist; /* (l) list of free vnodes */ + int mnt_tmpfreevnodelistsize;/* (l) # of free vnodes */ struct lock mnt_explock; /* vfs_export walkers lock */ TAILQ_ENTRY(mount) mnt_upper_link; /* (m) we in the all uppers */ TAILQ_HEAD(, mount) mnt_uppers; /* (m) upper mounts over us*/ Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Fri Sep 30 17:19:43 2016 (r306511) +++ head/sys/sys/vnode.h Fri Sep 30 17:27:17 2016 (r306512) @@ -75,8 +75,8 @@ struct vpollinfo { * * Lock reference: * c - namecache mutex - * f - freelist mutex * i - interlock + * l - mp mnt_listmtx or freelist mutex * I - updated with atomics, 0->1 and 1->0 transitions with interlock held * m - mount point interlock * p - pollinfo lock @@ -144,7 +144,7 @@ struct vnode { /* * The machinery of being a vnode */ - TAILQ_ENTRY(vnode) v_actfreelist; /* f vnode active/free lists */ + TAILQ_ENTRY(vnode) v_actfreelist; /* l vnode active/free lists */ struct bufobj v_bufobj; /* * Buffer cache object */ /* @@ -167,6 +167,7 @@ struct vnode { u_int v_usecount; /* I ref count of users */ u_int v_iflag; /* i vnode flags (see below) */ u_int v_vflag; /* v vnode flags */ + u_int v_mflag; /* l mnt-specific vnode flags */ int v_writecount; /* v ref count of writers */ u_int v_hash; enum vtype v_type; /* u vnode type */ @@ -256,6 +257,8 @@ struct xvnode { #define VV_MD 0x0800 /* vnode backs the md device */ #define VV_FORCEINSMQ 0x1000 /* force the insmntque to succeed */ +#define VMP_TMPMNTFREELIST 0x0001 /* Vnode is on mnt's tmp free list */ + /* * Vnode attributes. A field value of VNOVAL represents a field whose value * is unavailable (getattr) or which is not to be changed (setattr). From owner-svn-src-head@freebsd.org Fri Sep 30 17:28:50 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 918F6C03CB5; Fri, 30 Sep 2016 17:28:50 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 36B64D41; Fri, 30 Sep 2016 17:28:50 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x22e.google.com with SMTP id b4so59938445wmb.0; Fri, 30 Sep 2016 10:28:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Rbjn8T4Dl35ZL8CDfZ31Au5IvCuOyhZH/r0XUwTqiwA=; b=Zgflm3GsjDhCyVi5iF1Z/nTsnmwEV2AnVpxKtvZhz8CNo25WA6EJRpJq5m2DnpeAbX CB9N4Dhh8CEFinxYYZLNXNOx2p/rOibrmKlg548GDdQD9LukIAYZYxQivQVEY+mgXNs9 dMPJb5+Tm779cRtmXkCZq9+gDVLqFaGxpJ8b7JNbrfacbPlmPU5AFJ1ythQgu4UASwy7 rYIPbUyxdgLfMSFhnEF5FZN7Du6r7f9W+yuOvkw7xKlNJnPBq9jKuq68WeZWlTCt727x 5AYUoWgvwO70+4tnk2farzFLoOWRdHUjEnrG7Prt0lRgOokuf2gzjIprRC0K7TYfiIzF L5DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Rbjn8T4Dl35ZL8CDfZ31Au5IvCuOyhZH/r0XUwTqiwA=; b=V3zXqOxCiABG9dJGSZF22fjDIdP9F/hrxoDdoZWy34aQnnzKjJK2r//3L8XVHqvUO+ Nc00q2q9eAZVKMrgBBCprfnb5TACE1NTBvy+G1NkTlxzEDeEWMog/DRnN9XNiZLr7Rj9 68lDe/o/afQ5FNCRQc8rswDXpXK7xcoCezHMga70jO3lA3T4wBTDe2HLgv0jjBmoykTe oZ+yPSPAYRc4GOYwDEZVN7mBouRxszh3gU7DKzk2tr5BUhtFXSWKOsi/bw6qr6PJz0q7 UmJLC8UpNOtljBhICTTQpiDz+98DV69Grf/2MmBJPnqet3Vk/8hHw35ZT62uQ6gR8FhN vUtQ== X-Gm-Message-State: AA6/9Rm0WCwsmIiLH+a6ZOoHHZgmvsFyTsy9wqkR/HZ7hTK390LSKyxFhUEq65Vd29eAVw== X-Received: by 10.28.222.213 with SMTP id v204mr5301094wmg.55.1475256528454; Fri, 30 Sep 2016 10:28:48 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id us3sm4114092wjb.32.2016.09.30.10.28.47 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 30 Sep 2016 10:28:47 -0700 (PDT) Date: Fri, 30 Sep 2016 19:28:45 +0200 From: Mateusz Guzik To: Shawn Webb Cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs Message-ID: <20160930172845.GC3714@dft-labs.eu> References: <201609301711.u8UHB35d046389@repo.freebsd.org> <20160930171845.GA62393@mutt-hardenedbsd> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160930171845.GA62393@mutt-hardenedbsd> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 17:28:50 -0000 On Fri, Sep 30, 2016 at 01:18:45PM -0400, Shawn Webb wrote: > On Fri, Sep 30, 2016 at 05:11:03PM +0000, Mateusz Guzik wrote: > > Author: mjg > > Date: Fri Sep 30 17:11:03 2016 > > New Revision: 306509 > > URL: https://svnweb.freebsd.org/changeset/base/306509 > > > > Log: > > vfs: remove the __bo_vnode field from struct vnode > > > > The pointer can be obtained using __containerof instead. > > > > Reviewed by: kib > > Should __FreeBSD_Version be bumped? > Unlikely. It can be in an odd case it turns out there is a module which is using the field. -- Mateusz Guzik From owner-svn-src-head@freebsd.org Fri Sep 30 17:30:40 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED1B8C03D86; Fri, 30 Sep 2016 17:30:40 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC149FC1; Fri, 30 Sep 2016 17:30:40 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UHUddD051709; Fri, 30 Sep 2016 17:30:39 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UHUdRR051708; Fri, 30 Sep 2016 17:30:39 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201609301730.u8UHUdRR051708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Fri, 30 Sep 2016 17:30:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306513 - head/sys/arm/ti/cpsw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 17:30:41 -0000 Author: loos Date: Fri Sep 30 17:30:39 2016 New Revision: 306513 URL: https://svnweb.freebsd.org/changeset/base/306513 Log: Remove the GLOBAL queue lock which just adds unnecessary complexity to code (when used together with the individual tx and rx locks). Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/arm/ti/cpsw/if_cpsw.c Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Fri Sep 30 17:27:17 2016 (r306512) +++ head/sys/arm/ti/cpsw/if_cpsw.c Fri Sep 30 17:30:39 2016 (r306513) @@ -301,25 +301,6 @@ cpsw_debugf(const char *fmt, ...) #define CPSW_RX_UNLOCK(sc) mtx_unlock(&(sc)->rx.lock) #define CPSW_RX_LOCK_ASSERT(sc) mtx_assert(&(sc)->rx.lock, MA_OWNED) -#define CPSW_GLOBAL_LOCK(sc) do { \ - if ((mtx_owned(&(sc)->tx.lock) ? 1 : 0) != \ - (mtx_owned(&(sc)->rx.lock) ? 1 : 0)) { \ - panic("cpsw deadlock possibility detection!"); \ - } \ - mtx_lock(&(sc)->tx.lock); \ - mtx_lock(&(sc)->rx.lock); \ -} while (0) - -#define CPSW_GLOBAL_UNLOCK(sc) do { \ - CPSW_RX_UNLOCK(sc); \ - CPSW_TX_UNLOCK(sc); \ -} while (0) - -#define CPSW_GLOBAL_LOCK_ASSERT(sc) do { \ - CPSW_TX_LOCK_ASSERT(sc); \ - CPSW_RX_LOCK_ASSERT(sc); \ -} while (0) - #define CPSW_PORT_LOCK(_sc) do { \ mtx_assert(&(_sc)->lock, MA_NOTOWNED); \ mtx_lock(&(_sc)->lock); \ @@ -1179,7 +1160,7 @@ cpsw_rx_teardown_locked(struct cpsw_soft cpsw_write_4(sc, CPSW_CPDMA_RX_TEARDOWN, 0); for (;;) { received = cpsw_rx_dequeue(sc); - CPSW_GLOBAL_UNLOCK(sc); + CPSW_RX_UNLOCK(sc); while (received != NULL) { next = received->m_nextpkt; received->m_nextpkt = NULL; @@ -1188,7 +1169,7 @@ cpsw_rx_teardown_locked(struct cpsw_soft if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); received = next; } - CPSW_GLOBAL_LOCK(sc); + CPSW_RX_LOCK(sc); if (!sc->rx.running) { CPSW_DEBUGF(sc, ("finished RX teardown (%d retries)", i)); @@ -1245,10 +1226,12 @@ cpswp_stop_locked(struct cpswp_softc *sc /* Tear down the RX/TX queues. */ if (cpsw_ports_down(sc->swsc)) { - CPSW_GLOBAL_LOCK(sc->swsc); + CPSW_RX_LOCK(sc->swsc); cpsw_rx_teardown_locked(sc->swsc); + CPSW_RX_UNLOCK(sc->swsc); + CPSW_TX_LOCK(sc->swsc); cpsw_tx_teardown_locked(sc->swsc); - CPSW_GLOBAL_UNLOCK(sc->swsc); + CPSW_TX_UNLOCK(sc->swsc); } /* Stop MAC RX/TX modules. */ @@ -2155,7 +2138,7 @@ cpsw_tx_watchdog(void *msc) struct cpsw_softc *sc; sc = msc; - CPSW_GLOBAL_LOCK(sc); + CPSW_TX_LOCK(sc); if (sc->tx.active_queue_len == 0 || !sc->tx.running) { sc->watchdog.timer = 0; /* Nothing to do. */ } else if (sc->tx.queue_removes > sc->tx.queue_removes_at_last_tick) { @@ -2172,7 +2155,7 @@ cpsw_tx_watchdog(void *msc) } } sc->tx.queue_removes_at_last_tick = sc->tx.queue_removes; - CPSW_GLOBAL_UNLOCK(sc); + CPSW_TX_UNLOCK(sc); /* Schedule another timeout one second from now */ callout_reset(&sc->watchdog.callout, hz, cpsw_tx_watchdog, sc); From owner-svn-src-head@freebsd.org Fri Sep 30 17:35:42 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 216B5C03036; Fri, 30 Sep 2016 17:35:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 002641533; Fri, 30 Sep 2016 17:35:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id B742910AF74; Fri, 30 Sep 2016 13:35:40 -0400 (EDT) From: John Baldwin To: Justin Hibbits Cc: Nathan Whitehorn , src-committers , svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r306473 - head/sys/dev/fdt Date: Fri, 30 Sep 2016 10:16:15 -0700 Message-ID: <1997344.mDN9V1EHvR@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201609300248.u8U2meEe014568@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 30 Sep 2016 13:35:40 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 17:35:42 -0000 On Thursday, September 29, 2016 11:38:13 PM Justin Hibbits wrote: > If I remember correctly, newbus will throw an error if you try to create > two devices with the same number. Applying the logic of using the > cell-index property for all device nodes, if two sub buses from simplebus > have the same set of child nodes, with the same cell-index property values, > one set of children would error and not attach. Of course this change is > only for simplebus, so shouldn't have too big an impact. Yes, new-bus doesn't let you add devices with the same unit. We used to force the unit of PCI bridges/buses but removed all that to better cope with multi-domain systems. I think in general it's best to use wildcard units outside of something like hints. -- John Baldwin From owner-svn-src-head@freebsd.org Fri Sep 30 17:35:44 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5CF6C03057; Fri, 30 Sep 2016 17:35:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 861AE1560; Fri, 30 Sep 2016 17:35:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id A27E310AF7D; Fri, 30 Sep 2016 13:35:43 -0400 (EDT) From: John Baldwin To: Oleksandr Tymoshenko Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306474 - head/sys/dev/atkbdc Date: Thu, 29 Sep 2016 22:47:02 -0700 Message-ID: <2470669.D5ILR5p8RK@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201609300303.u8U33gk3022487@repo.freebsd.org> References: <201609300303.u8U33gk3022487@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 30 Sep 2016 13:35:43 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 17:35:44 -0000 On Friday, September 30, 2016 03:03:42 AM Oleksandr Tymoshenko wrote: > Author: gonzo > Date: Fri Sep 30 03:03:42 2016 > New Revision: 306474 > URL: https://svnweb.freebsd.org/changeset/base/306474 > > Log: > Replace explicit TUNABLE_INT to sysctl with CTLFLAG_TUN > > - Replace tunables-only hw.psm.synaptics_support, hw.psm.trackpoint_support, > and hw.psm.elantech_support with respective sysctls declared with > CTLFLAG_TUN. It simplifies checking them in userland, also makes them > easier to get discovered by user > - Get rid of debug.psm.loglevel and hw.psm.tap_enabled TUNABLE_INT > declaration by adding CTLFLAG_TUN to read/write sysctls that were > already declared for these tunables. > > Suggested by: jhb Thanks! -- John Baldwin From owner-svn-src-head@freebsd.org Fri Sep 30 17:36:28 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0AE8C0314B; Fri, 30 Sep 2016 17:36:28 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (thebighonker.lerctr.org [IPv6:2001:470:1f0f:3ad:223:7dff:fe9e:6e8a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "thebighonker.lerctr.org", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BD53B1870; Fri, 30 Sep 2016 17:36:28 +0000 (UTC) (envelope-from ler@lerctr.org) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Message-ID:References:In-Reply-To:Subject:Cc:To:From:Date: Content-Transfer-Encoding:Content-Type:MIME-Version:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=JhFLH4Bmxw/bZIlbanvtvnK9qID8XmvHuokL6fwXhXw=; b=ixjEnibfmuVX1I2493IC2gT8fc 1rLk9s0bFaf/ksIrFzf8BvsS7DDngq8YWpy6fJBEfvU0EYI/j3Jjs9hPfmxG9AuCn5lasQNVxvo12 XmfK+ZbZ6gyqlyI2cbduXI9EOBMRwUkFmT+Ig/u1wjP7bW2vGXOHvfVEI+T+SIuNoDSU=; Received: from thebighonker.lerctr.org ([2001:470:1f0f:3ad:223:7dff:fe9e:6e8a]:60423 helo=webmail.lerctr.org) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87 (FreeBSD)) (envelope-from ) id 1bq1jW-0004Xc-Kb; Fri, 30 Sep 2016 12:36:26 -0500 Received: from ool-2f1063cc.dyn.optonline.net ([47.16.99.204]) by webmail.lerctr.org with HTTP (HTTP/1.1 POST); Fri, 30 Sep 2016 12:36:26 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 30 Sep 2016 13:36:26 -0400 From: Larry Rosenman To: Mateusz Guzik Cc: Shawn Webb , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik , owner-svn-src-all@freebsd.org Subject: Re: svn commit: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs In-Reply-To: <20160930172845.GC3714@dft-labs.eu> References: <201609301711.u8UHB35d046389@repo.freebsd.org> <20160930171845.GA62393@mutt-hardenedbsd> <20160930172845.GC3714@dft-labs.eu> Message-ID: <9eddf030ed57a527c2d23e32289df7cf@thebighonker.lerctr.org> X-Sender: ler@lerctr.org User-Agent: Roundcube Webmail/1.2.0 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 17:36:29 -0000 On 2016-09-30 13:28, Mateusz Guzik wrote: > On Fri, Sep 30, 2016 at 01:18:45PM -0400, Shawn Webb wrote: >> On Fri, Sep 30, 2016 at 05:11:03PM +0000, Mateusz Guzik wrote: >> > Author: mjg >> > Date: Fri Sep 30 17:11:03 2016 >> > New Revision: 306509 >> > URL: https://svnweb.freebsd.org/changeset/base/306509 >> > >> > Log: >> > vfs: remove the __bo_vnode field from struct vnode >> > >> > The pointer can be obtained using __containerof instead. >> > >> > Reviewed by: kib >> >> Should __FreeBSD_Version be bumped? >> > > Unlikely. It can be in an odd case it turns out there is a module which > is using the field. Can someone do me a favor and make sure sysutils/lsof still compiles/works? I'm OOT at the moment, and have a test IPv6 patch on my 12 system. -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: ler@lerctr.org US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281 From owner-svn-src-head@freebsd.org Fri Sep 30 17:49:06 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 215D3C03487; Fri, 30 Sep 2016 17:49:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F19821F79; Fri, 30 Sep 2016 17:49:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UHn5Kf059230; Fri, 30 Sep 2016 17:49:05 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UHn5Ok059229; Fri, 30 Sep 2016 17:49:05 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201609301749.u8UHn5Ok059229@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 30 Sep 2016 17:49:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306514 - head/sys/cam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 17:49:06 -0000 Author: imp Date: Fri Sep 30 17:49:04 2016 New Revision: 306514 URL: https://svnweb.freebsd.org/changeset/base/306514 Log: Compute two new metrics. Disk load, the average number of transactions we have queued up normaliazed to the queue size. Also compute buckets of latency to help compute, in userland, estimates of Median, P90, P95 and P99 values. Sponsored by: Netflix, Inc Modified: head/sys/cam/cam_iosched.c Modified: head/sys/cam/cam_iosched.c ============================================================================== --- head/sys/cam/cam_iosched.c Fri Sep 30 17:30:39 2016 (r306513) +++ head/sys/cam/cam_iosched.c Fri Sep 30 17:49:04 2016 (r306514) @@ -42,12 +42,14 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include #include +#include #include #include @@ -73,14 +75,31 @@ SYSCTL_INT(_kern_cam, OID_AUTO, do_dynam &do_dynamic_iosched, 1, "Enable Dynamic I/O scheduler optimizations."); +/* + * For an EMA, with an alpha of alpha, we know + * alpha = 2 / (N + 1) + * or + * N = 1 + (2 / alpha) + * where N is the number of samples that 86% of the current + * EMA is derived from. + * + * So we invent[*] alpha_bits: + * alpha_bits = -log_2(alpha) + * alpha = 2^-alpha_bits + * So + * N = 1 + 2^(alpha_bits + 1) + * + * The default 9 gives a 1025 lookback for 86% of the data. + * For a brief intro: https://en.wikipedia.org/wiki/Moving_average + * + * [*] Steal from the load average code and many other places. + */ static int alpha_bits = 9; TUNABLE_INT("kern.cam.iosched_alpha_bits", &alpha_bits); SYSCTL_INT(_kern_cam, OID_AUTO, iosched_alpha_bits, CTLFLAG_RW, &alpha_bits, 1, "Bits in EMA's alpha."); - - struct iop_stats; struct cam_iosched_softc; @@ -208,11 +227,17 @@ struct iop_stats /* * Statistics on different bits of the process. */ - /* Exp Moving Average, alpha = 1 / (1 << alpha_bits) */ + /* Exp Moving Average, see alpha_bits for more details */ sbintime_t ema; sbintime_t emss; /* Exp Moving sum of the squares */ sbintime_t sd; /* Last computed sd */ + uint32_t state_flags; +#define IOP_RATE_LIMITED 1u + +#define LAT_BUCKETS 12 /* < 1ms < 2ms ... 512ms < 1024ms > 1024ms */ + uint64_t latencies[LAT_BUCKETS]; + struct cam_iosched_softc *softc; }; @@ -258,6 +283,7 @@ struct cam_iosched_softc int read_bias; /* Read bias setting */ int current_read_bias; /* Current read bias state */ int total_ticks; + int load; /* EMA of 'load average' of disk / 2^16 */ struct bio_queue_head write_queue; struct iop_stats read_stats, write_stats, trim_stats; @@ -509,6 +535,7 @@ cam_iosched_ticker(void *arg) { struct cam_iosched_softc *isc = arg; sbintime_t now, delta; + int pending; callout_reset(&isc->ticker, hz / isc->quanta - 1, cam_iosched_ticker, isc); @@ -525,6 +552,36 @@ cam_iosched_ticker(void *arg) cam_iosched_schedule(isc, isc->periph); + /* + * isc->load is an EMA of the pending I/Os at each tick. The number of + * pending I/Os is the sum of the I/Os queued to the hardware, and those + * in the software queue that could be queued to the hardware if there + * were slots. + * + * ios_stats.pending is a count of requests in the SIM right now for + * each of these types of I/O. So the total pending count is the sum of + * these I/Os and the sum of the queued I/Os still in the software queue + * for those operations that aren't being rate limited at the moment. + * + * The reason for the rate limiting bit is because those I/Os + * aren't part of the software queued load (since we could + * give them to hardware, but choose not to). + * + * Note: due to a bug in counting pending TRIM in the device, we + * don't include them in this count. We count each BIO_DELETE in + * the pending count, but the periph drivers collapse them down + * into one TRIM command. That one trim command gets the completion + * so the counts get off. + */ + pending = isc->read_stats.pending + isc->write_stats.pending /* + isc->trim_stats.pending */; + pending += !!(isc->read_stats.state_flags & IOP_RATE_LIMITED) * isc->read_stats.queued + + !!(isc->write_stats.state_flags & IOP_RATE_LIMITED) * isc->write_stats.queued /* + + !!(isc->trim_stats.state_flags & IOP_RATE_LIMITED) * isc->trim_stats.queued */ ; + pending <<= 16; + pending /= isc->periph->path->device->ccbq.total_openings; + + isc->load = (pending + (isc->load << 13) - isc->load) >> 13; /* see above: 13 -> 16139 / 200/s = ~81s ~1 minute */ + isc->total_ticks++; } @@ -610,7 +667,7 @@ cam_iosched_cl_maybe_steer(struct contro if (isc->write_stats.current > isc->write_stats.max) isc->write_stats.current = isc->write_stats.max; if (old != isc->write_stats.current && iosched_debug) - printf("Steering write from %d kBps to %d kBps due to latency of %jdms\n", + printf("Steering write from %d kBps to %d kBps due to latency of %jdus\n", old, isc->write_stats.current, (uintmax_t)((uint64_t)1000000 * (uint32_t)lat) >> 32); break; @@ -714,7 +771,7 @@ cam_iosched_limiter_sysctl(SYSCTL_HANDLE char buf[16]; struct iop_stats *ios; struct cam_iosched_softc *isc; - int value, i, error, cantick; + int value, i, error; const char *p; ios = arg1; @@ -742,21 +799,9 @@ cam_iosched_limiter_sysctl(SYSCTL_HANDLE cam_periph_unlock(isc->periph); return error; } - cantick = !!limsw[isc->read_stats.limiter].l_tick + - !!limsw[isc->write_stats.limiter].l_tick + - !!limsw[isc->trim_stats.limiter].l_tick + - 1; /* Control loop requires it */ - if (isc->flags & CAM_IOSCHED_FLAG_CALLOUT_ACTIVE) { - if (cantick == 0) { - callout_stop(&isc->ticker); - isc->flags &= ~CAM_IOSCHED_FLAG_CALLOUT_ACTIVE; - } - } else { - if (cantick != 0) { - callout_reset(&isc->ticker, hz / isc->quanta - 1, cam_iosched_ticker, isc); - isc->flags |= CAM_IOSCHED_FLAG_CALLOUT_ACTIVE; - } - } + /* Note: disk load averate requires ticker to be always running */ + callout_reset(&isc->ticker, hz / isc->quanta - 1, cam_iosched_ticker, isc); + isc->flags |= CAM_IOSCHED_FLAG_CALLOUT_ACTIVE; cam_periph_unlock(isc->periph); return 0; @@ -821,6 +866,25 @@ cam_iosched_sbintime_sysctl(SYSCTL_HANDL return 0; } +static int +cam_iosched_sysctl_latencies(SYSCTL_HANDLER_ARGS) +{ + int i, error; + struct sbuf sb; + uint64_t *latencies; + + latencies = arg1; + sbuf_new_for_sysctl(&sb, NULL, LAT_BUCKETS * 16, req); + + for (i = 0; i < LAT_BUCKETS - 1; i++) + sbuf_printf(&sb, "%jd,", (intmax_t)latencies[i]); + sbuf_printf(&sb, "%jd", (intmax_t)latencies[LAT_BUCKETS - 1]); + error = sbuf_finish(&sb); + sbuf_delete(&sb); + + return (error); +} + static void cam_iosched_iop_stats_sysctl_init(struct cam_iosched_softc *isc, struct iop_stats *ios, char *name) { @@ -884,6 +948,11 @@ cam_iosched_iop_stats_sysctl_init(struct &ios->current, 0, "current resource"); + SYSCTL_ADD_PROC(ctx, n, + OID_AUTO, "latencies", CTLTYPE_STRING | CTLFLAG_RD, + &ios->latencies, 0, + cam_iosched_sysctl_latencies, "A", + "Array of power of 2 latency from 1ms to 1.024s"); } static void @@ -1051,6 +1120,11 @@ void cam_iosched_sysctl_init(struct cam_ OID_AUTO, "total_ticks", CTLFLAG_RD, &isc->total_ticks, 0, "Total number of ticks we've done"); + + SYSCTL_ADD_INT(ctx, n, + OID_AUTO, "load", CTLFLAG_RD, + &isc->load, 0, + "scaled load average / 100"); #endif } @@ -1100,6 +1174,7 @@ cam_iosched_get_write(struct cam_iosched if (iosched_debug) printf("Reads present and current_read_bias is %d queued writes %d queued reads %d\n", isc->current_read_bias, isc->write_stats.queued, isc->read_stats.queued); isc->current_read_bias--; + /* We're not limiting writes, per se, just doing reads first */ return NULL; } @@ -1109,6 +1184,7 @@ cam_iosched_get_write(struct cam_iosched if (cam_iosched_limiter_iop(&isc->write_stats, bp) != 0) { if (iosched_debug) printf("Can't write because limiter says no.\n"); + isc->write_stats.state_flags |= IOP_RATE_LIMITED; return NULL; } @@ -1125,6 +1201,7 @@ cam_iosched_get_write(struct cam_iosched } if (iosched_debug > 9) printf("HWQ : %p %#x\n", bp, bp->bio_cmd); + isc->write_stats.state_flags &= ~IOP_RATE_LIMITED; return bp; } #endif @@ -1224,14 +1301,17 @@ cam_iosched_next_bio(struct cam_iosched_ #ifdef CAM_IOSCHED_DYNAMIC /* - * For the netflix scheduler, bio_queue is only for reads, so enforce + * For the dynamic scheduler, bio_queue is only for reads, so enforce * the limits here. Enforce only for reads. */ if (do_dynamic_iosched) { if (bp->bio_cmd == BIO_READ && - cam_iosched_limiter_iop(&isc->read_stats, bp) != 0) + cam_iosched_limiter_iop(&isc->read_stats, bp) != 0) { + isc->read_stats.state_flags |= IOP_RATE_LIMITED; return NULL; + } } + isc->read_stats.state_flags &= ~IOP_RATE_LIMITED; #endif bioq_remove(&isc->bio_queue, bp); #ifdef CAM_IOSCHED_DYNAMIC @@ -1478,13 +1558,41 @@ mul(uint64_t a, uint64_t b) return ((ah * bh) << 32) + al * bh + ah * bl + ((al * bl) >> 32); } +static sbintime_t latencies[] = { + SBT_1MS << 0, + SBT_1MS << 1, + SBT_1MS << 2, + SBT_1MS << 3, + SBT_1MS << 4, + SBT_1MS << 5, + SBT_1MS << 6, + SBT_1MS << 7, + SBT_1MS << 8, + SBT_1MS << 9, + SBT_1MS << 10 +}; + static void cam_iosched_update(struct iop_stats *iop, sbintime_t sim_latency) { sbintime_t y, yy; uint64_t var; + int i; + + /* + * Keep counts for latency. We do it by power of two buckets. + * This helps us spot outlier behavior obscured by averages. + */ + for (i = 0; i < LAT_BUCKETS - 1; i++) { + if (sim_latency < latencies[i]) { + iop->latencies[i]++; + break; + } + } + if (i == LAT_BUCKETS - 1) + iop->latencies[i]++; /* Put all > 1024ms values into the last bucket. */ - /* + /* * Classic expoentially decaying average with a tiny alpha * (2 ^ -alpha_bits). For more info see the NIST statistical * handbook. From owner-svn-src-head@freebsd.org Fri Sep 30 17:55:45 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53F7DC0362A; Fri, 30 Sep 2016 17:55:45 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E0AB466B; Fri, 30 Sep 2016 17:55:44 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x22b.google.com with SMTP id k125so39446135wma.1; Fri, 30 Sep 2016 10:55:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=vWK13XDppviuhYv7qV+qfPpy3+J/FIe3D/LnlQRzSec=; b=RJdqm9c784AaVG2IzIg82xTSq6TUthT22NDxt08sun3B7JskZCit0MLI0cHnISAJ7W llc8XqWjU2nvHd6QgdQAbcodcAK0IZJ0MRpaHa7UWXC+zEbSDSgs3+YEwd5LiiWG2lQ6 vxF53VFEUZUPvRVJlwTbeIUEXTa+9/CKzwiIpOldjMuplmPjRKn6Cr62wdFxgaxlX3+4 qQVePj+dlehMRRkrtD0Ai8b0beI+5M/KoI4stTNCuu/PavXzmaH8r0k5Kyr31HT9flcm QwPpT5rDkU6OTyzh6JzBNMekOkhsfGXAvv7HxmVLksMqSY9eAOFcURqKxLI4ryN9+Yhw QvZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=vWK13XDppviuhYv7qV+qfPpy3+J/FIe3D/LnlQRzSec=; b=makHkS/Slsd3Rj+tVfNasa2HSSjsPO6p7DE0t+UCLerh5nQ2jPL5TROOK05GSfal3l qhYiTsXEc2d+reNRtgYNmN8Xb2Xh+WTU5lNYA06CApZXyk424213G3ajtezjdnOZK7Rq w5IU3mQRVxC9l9wTavyBqD9lAW607qiuw+T3kqlgdQPdf4U0C/wNTDcdSX/OlxhjeLUN IpPQUMENGzI34s5DdpT9n5PidoUINN1J6Vh1bX7JdReyhsYlcCASUgRvUHGrcYlKkqQd yskkDdidt3WaF3gq5bkXrE5B+8047ot0WJYxbSXZ+4ThZF1Un+h7DmBoykABW5I5Uvhu 8SIw== X-Gm-Message-State: AA6/9Rn86zqtlPZISrqbu3BxwNldiX80Tg/y3Ir0eUSwMvH7BJsqyYCM4GAJv5yhS6JV9A== X-Received: by 10.194.84.134 with SMTP id z6mr7314716wjy.204.1475258143402; Fri, 30 Sep 2016 10:55:43 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id uw3sm20775042wjb.21.2016.09.30.10.55.42 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 30 Sep 2016 10:55:42 -0700 (PDT) Date: Fri, 30 Sep 2016 19:55:40 +0200 From: Mateusz Guzik To: Larry Rosenman Cc: Shawn Webb , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik , owner-svn-src-all@freebsd.org Subject: Re: svn commit: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs Message-ID: <20160930175540.GD3714@dft-labs.eu> References: <201609301711.u8UHB35d046389@repo.freebsd.org> <20160930171845.GA62393@mutt-hardenedbsd> <20160930172845.GC3714@dft-labs.eu> <9eddf030ed57a527c2d23e32289df7cf@thebighonker.lerctr.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <9eddf030ed57a527c2d23e32289df7cf@thebighonker.lerctr.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 17:55:45 -0000 On Fri, Sep 30, 2016 at 01:36:26PM -0400, Larry Rosenman wrote: > On 2016-09-30 13:28, Mateusz Guzik wrote: > >On Fri, Sep 30, 2016 at 01:18:45PM -0400, Shawn Webb wrote: > >>On Fri, Sep 30, 2016 at 05:11:03PM +0000, Mateusz Guzik wrote: > >>> Author: mjg > >>> Date: Fri Sep 30 17:11:03 2016 > >>> New Revision: 306509 > >>> URL: https://svnweb.freebsd.org/changeset/base/306509 > >>> > >>> Log: > >>> vfs: remove the __bo_vnode field from struct vnode > >>> > >>> The pointer can be obtained using __containerof instead. > >>> > >>> Reviewed by: kib > >> > >>Should __FreeBSD_Version be bumped? > >> > > > >Unlikely. It can be in an odd case it turns out there is a module which > >is using the field. > > Can someone do me a favor and make sure sysutils/lsof still > compiles/works? > > I'm OOT at the moment, and have a test IPv6 patch on my 12 system. I just ran lsof and it worked fine at least for the basic case. Apparently it indeed still goes through kernel memory. Did anyone ask the author what kind of interfaces would they want to NOT have to do this? Also, it looks like it constains some kind of a loop to imitate closefrom. On truss I see over 3.7 milion (yes, MILION) calls to close. Like this: close(3773297) ERR#9 'Bad file descriptor' close(3773298) ERR#9 'Bad file descriptor' close(3773299) ERR#9 'Bad file descriptor' close(3773300) ERR#9 'Bad file descriptor' close(3773301) ERR#9 'Bad file descriptor' close(3773302) ERR#9 'Bad file descriptor' close(3773303) ERR#9 'Bad file descriptor' [snip] At least for freebsd this can be patched with the use of closefrom() on all supported releases. Arguably this may be a side effect of limits set too high, perhaps linux sets them sigifnicanly lower and the problem is not that terrible. -- Mateusz Guzik From owner-svn-src-head@freebsd.org Fri Sep 30 17:58:18 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25BE0C036EF; Fri, 30 Sep 2016 17:58:18 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (thebighonker.lerctr.org [IPv6:2001:470:1f0f:3ad:223:7dff:fe9e:6e8a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "thebighonker.lerctr.org", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 017B696F; Fri, 30 Sep 2016 17:58:18 +0000 (UTC) (envelope-from ler@lerctr.org) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Message-ID:References:In-Reply-To:Subject:Cc:To:From:Date: Content-Transfer-Encoding:Content-Type:MIME-Version:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=PgMeWG1Kk0CWm0piFOBe3sgQu/VnikItzdkYkOoxxHw=; b=YsNAcwcWkPQmo4cuFC9Ugb296E 3Dz9eJ8Ov6LXrzL4DtrZQMDAEXRJSrUNjcj6yq2Z44oJEztBixvZgDq/JdBeX2nERlmj2F0hw8ByL r2LVddT3E81mOG2LeMVXsonY6hgx1ttF4uVPXNGSOCJS0Tv3XgdxK+pAHv5/DZdSSXTI=; Received: from thebighonker.lerctr.org ([2001:470:1f0f:3ad:223:7dff:fe9e:6e8a]:36196 helo=webmail.lerctr.org) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87 (FreeBSD)) (envelope-from ) id 1bq24e-0005Jc-Nj; Fri, 30 Sep 2016 12:58:16 -0500 Received: from ool-2f1063cc.dyn.optonline.net ([47.16.99.204]) by webmail.lerctr.org with HTTP (HTTP/1.1 POST); Fri, 30 Sep 2016 12:58:16 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 30 Sep 2016 13:58:16 -0400 From: Larry Rosenman To: Mateusz Guzik Cc: Shawn Webb , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik , owner-svn-src-all@freebsd.org Subject: Re: svn commit: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs In-Reply-To: <20160930175540.GD3714@dft-labs.eu> References: <201609301711.u8UHB35d046389@repo.freebsd.org> <20160930171845.GA62393@mutt-hardenedbsd> <20160930172845.GC3714@dft-labs.eu> <9eddf030ed57a527c2d23e32289df7cf@thebighonker.lerctr.org> <20160930175540.GD3714@dft-labs.eu> Message-ID: <08ad38dde4ccabe7cf9ee09571c71ca2@thebighonker.lerctr.org> X-Sender: ler@lerctr.org User-Agent: Roundcube Webmail/1.2.0 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 17:58:18 -0000 On 2016-09-30 13:55, Mateusz Guzik wrote: > On Fri, Sep 30, 2016 at 01:36:26PM -0400, Larry Rosenman wrote: >> On 2016-09-30 13:28, Mateusz Guzik wrote: >> >On Fri, Sep 30, 2016 at 01:18:45PM -0400, Shawn Webb wrote: >> >>On Fri, Sep 30, 2016 at 05:11:03PM +0000, Mateusz Guzik wrote: >> >>> Author: mjg >> >>> Date: Fri Sep 30 17:11:03 2016 >> >>> New Revision: 306509 >> >>> URL: https://svnweb.freebsd.org/changeset/base/306509 >> >>> >> >>> Log: >> >>> vfs: remove the __bo_vnode field from struct vnode >> >>> >> >>> The pointer can be obtained using __containerof instead. >> >>> >> >>> Reviewed by: kib >> >> >> >>Should __FreeBSD_Version be bumped? >> >> >> > >> >Unlikely. It can be in an odd case it turns out there is a module which >> >is using the field. >> >> Can someone do me a favor and make sure sysutils/lsof still >> compiles/works? >> >> I'm OOT at the moment, and have a test IPv6 patch on my 12 system. > > I just ran lsof and it worked fine at least for the basic case. > > Apparently it indeed still goes through kernel memory. Did anyone ask > the author what kind of interfaces would they want to NOT have to do > this? > > Also, it looks like it constains some kind of a loop to imitate > closefrom. > > On truss I see over 3.7 milion (yes, MILION) calls to close. Like this: > close(3773297) ERR#9 'Bad file > descriptor' > close(3773298) ERR#9 'Bad file > descriptor' > close(3773299) ERR#9 'Bad file > descriptor' > close(3773300) ERR#9 'Bad file > descriptor' > close(3773301) ERR#9 'Bad file > descriptor' > close(3773302) ERR#9 'Bad file > descriptor' > close(3773303) ERR#9 'Bad file > descriptor' > [snip] > > At least for freebsd this can be patched with the use of closefrom() on > all supported releases. > > Arguably this may be a side effect of limits set too high, perhaps > linux > sets them sigifnicanly lower and the problem is not that terrible. We've had this discussion before (re: interfaces). I thought the current versions of lsof only close the first 1k FD's. (what version of lsof is this? on 12-CURRENT?) -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: ler@lerctr.org US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281 From owner-svn-src-head@freebsd.org Fri Sep 30 18:01:12 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42E05C037E6; Fri, 30 Sep 2016 18:01:12 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD79EBE7; Fri, 30 Sep 2016 18:01:11 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x234.google.com with SMTP id b80so57436868wme.0; Fri, 30 Sep 2016 11:01:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=PIcS7/d/wdKMVuDtcmaBVCcd92UH9FVPj/h8PF/tukM=; b=QrWH7L0zsVbrQV8qsfTVZGi9loY6WSOO7SOjpo9n+pENHT+mY+DA2p/BokbZv8Stnh 6SktwnZXUZ4N7fGnQ8DWQLC9j4Dp9MBSR/jIYzhRYENGGMCE2e9Fy9jEMQgBX9JTxgxf wQmLzqlqTA96wIbr4cS+nrknhV72b2pvFHyRL1UO9O8+t1Wr9wCizBKMxP30AcsPeKuE HsBKLP5zOQbHRXVzAsciEwIFoI3h/k2S5bMsSBVrZCl8bG9zd65zsFk2DhtWbHDr1nqs XhJ6scTV+mgCrhpXZuHJKvwfAZ5NXzPY/6SU5yyc9HrE4qcdFPFUXoz5Hkx0deHhDfMm MmQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=PIcS7/d/wdKMVuDtcmaBVCcd92UH9FVPj/h8PF/tukM=; b=fR1/aYCagUC6wpC0sz4VNZTUgfzsraCvCtE9pGR7MbNHqQEQ+odNlmbkSg+W0DKAK4 tO5DuaOYD4qEuL9SiKxyOaNg5XSvczs7bpPHD+58H6B4KtZmPCYbpAC70R3GxK07eaz1 YC3KPJVlb+8UZylpKaVkmbovIhVpTPA11+XRsMgqH4yKyoQQEIZuOGoKfk0g/FSSpeti 22PVY8FKmvgV8AWwwgG3UkulB1SzOlJaDel6NrmCaw5FoAALhLhBkx/hpv0Zgk9Ea/D1 JqdAaE/+JIa/sKl1qLYgkEfZO7spYNzYLk43px/91Emf3jkivZBy60Y2ILuigFFh0/kX oleg== X-Gm-Message-State: AA6/9RktrZqldgzIrSKysrwyMnlFj/P5rNGecQLTLdjaUug7FGOekR8y5Dk/gIIavqtR0g== X-Received: by 10.28.130.197 with SMTP id e188mr5482994wmd.131.1475258470344; Fri, 30 Sep 2016 11:01:10 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id k206sm5284144wmf.19.2016.09.30.11.01.09 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 30 Sep 2016 11:01:09 -0700 (PDT) Date: Fri, 30 Sep 2016 20:01:07 +0200 From: Mateusz Guzik To: Larry Rosenman Cc: Shawn Webb , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik , owner-svn-src-all@freebsd.org Subject: Re: svn commit: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs Message-ID: <20160930180107.GE3714@dft-labs.eu> References: <201609301711.u8UHB35d046389@repo.freebsd.org> <20160930171845.GA62393@mutt-hardenedbsd> <20160930172845.GC3714@dft-labs.eu> <9eddf030ed57a527c2d23e32289df7cf@thebighonker.lerctr.org> <20160930175540.GD3714@dft-labs.eu> <08ad38dde4ccabe7cf9ee09571c71ca2@thebighonker.lerctr.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <08ad38dde4ccabe7cf9ee09571c71ca2@thebighonker.lerctr.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 18:01:12 -0000 On Fri, Sep 30, 2016 at 01:58:16PM -0400, Larry Rosenman wrote: > On 2016-09-30 13:55, Mateusz Guzik wrote: > >On Fri, Sep 30, 2016 at 01:36:26PM -0400, Larry Rosenman wrote: > >>On 2016-09-30 13:28, Mateusz Guzik wrote: > >>>On Fri, Sep 30, 2016 at 01:18:45PM -0400, Shawn Webb wrote: > >>>>On Fri, Sep 30, 2016 at 05:11:03PM +0000, Mateusz Guzik wrote: > >>>>> Author: mjg > >>>>> Date: Fri Sep 30 17:11:03 2016 > >>>>> New Revision: 306509 > >>>>> URL: https://svnweb.freebsd.org/changeset/base/306509 > >>>>> > >>>>> Log: > >>>>> vfs: remove the __bo_vnode field from struct vnode > >>>>> > >>>>> The pointer can be obtained using __containerof instead. > >>>>> > >>>>> Reviewed by: kib > >>>> > >>>>Should __FreeBSD_Version be bumped? > >>>> > >>> > >>>Unlikely. It can be in an odd case it turns out there is a module which > >>>is using the field. > >> > >>Can someone do me a favor and make sure sysutils/lsof still > >>compiles/works? > >> > >>I'm OOT at the moment, and have a test IPv6 patch on my 12 system. > > > >I just ran lsof and it worked fine at least for the basic case. > > > >Apparently it indeed still goes through kernel memory. Did anyone ask > >the author what kind of interfaces would they want to NOT have to do > >this? > > > >Also, it looks like it constains some kind of a loop to imitate > >closefrom. > > > >On truss I see over 3.7 milion (yes, MILION) calls to close. Like this: > >close(3773297) ERR#9 'Bad file > >descriptor' > >close(3773298) ERR#9 'Bad file > >descriptor' > >close(3773299) ERR#9 'Bad file > >descriptor' > >close(3773300) ERR#9 'Bad file > >descriptor' > >close(3773301) ERR#9 'Bad file > >descriptor' > >close(3773302) ERR#9 'Bad file > >descriptor' > >close(3773303) ERR#9 'Bad file > >descriptor' > >[snip] > > > >At least for freebsd this can be patched with the use of closefrom() on > >all supported releases. > > > >Arguably this may be a side effect of limits set too high, perhaps > >linux > >sets them sigifnicanly lower and the problem is not that terrible. > > We've had this discussion before (re: interfaces). I thought the > current versions of lsof only close > the first 1k FD's. (what version of lsof is this? on 12-CURRENT?) > This is 4.90.g,8 "formally" built for 11.0. The typical limit for fd is 1024 on linux, while it is higher on fbsd. I presume it goes up to the limit. (as in, ulimit -n) So what's up with the discussion on interfaces? The current state seems detrimental to everyone. -- Mateusz Guzik From owner-svn-src-head@freebsd.org Fri Sep 30 18:04:15 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 659A0C0397F; Fri, 30 Sep 2016 18:04:15 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (thebighonker.lerctr.org [IPv6:2001:470:1f0f:3ad:223:7dff:fe9e:6e8a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "thebighonker.lerctr.org", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 40014F5E; Fri, 30 Sep 2016 18:04:15 +0000 (UTC) (envelope-from ler@lerctr.org) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Message-ID:References:In-Reply-To:Subject:Cc:To:From:Date: Content-Transfer-Encoding:Content-Type:MIME-Version:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=khKMaytrwwqTVOYEgaVp/iRV2H4Gql5TqXv+x3o14X4=; b=jU397EzzwpGNGlD9EZcJAhkBEw DvUDNz5eu6FFMofuI3x+rew4Je6syZVcPJTH9uPjzbvWuR/dHTqvD4uEVEjUhDuP9B8umi5NUUtDa EriEkP0bokDSNxfyhkiUWMocqLgm/Yv/T45tdKqqBDLSJregUK3pJOyKwMrTZU92ACm8=; Received: from thebighonker.lerctr.org ([2001:470:1f0f:3ad:223:7dff:fe9e:6e8a]:36381 helo=webmail.lerctr.org) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87 (FreeBSD)) (envelope-from ) id 1bq2AP-0005W3-RT; Fri, 30 Sep 2016 13:04:13 -0500 Received: from ool-2f1063cc.dyn.optonline.net ([47.16.99.204]) by webmail.lerctr.org with HTTP (HTTP/1.1 POST); Fri, 30 Sep 2016 13:04:13 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 30 Sep 2016 14:04:13 -0400 From: Larry Rosenman To: Mateusz Guzik Cc: Shawn Webb , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik , owner-svn-src-all@freebsd.org Subject: Re: svn commit: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs In-Reply-To: <20160930180107.GE3714@dft-labs.eu> References: <201609301711.u8UHB35d046389@repo.freebsd.org> <20160930171845.GA62393@mutt-hardenedbsd> <20160930172845.GC3714@dft-labs.eu> <9eddf030ed57a527c2d23e32289df7cf@thebighonker.lerctr.org> <20160930175540.GD3714@dft-labs.eu> <08ad38dde4ccabe7cf9ee09571c71ca2@thebighonker.lerctr.org> <20160930180107.GE3714@dft-labs.eu> Message-ID: <0ced80c92e1f6a24a4fc033254db3461@thebighonker.lerctr.org> X-Sender: ler@lerctr.org User-Agent: Roundcube Webmail/1.2.0 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 18:04:15 -0000 On 2016-09-30 14:01, Mateusz Guzik wrote: > On Fri, Sep 30, 2016 at 01:58:16PM -0400, Larry Rosenman wrote: >> On 2016-09-30 13:55, Mateusz Guzik wrote: >> >On Fri, Sep 30, 2016 at 01:36:26PM -0400, Larry Rosenman wrote: >> >>On 2016-09-30 13:28, Mateusz Guzik wrote: >> >>>On Fri, Sep 30, 2016 at 01:18:45PM -0400, Shawn Webb wrote: >> >>>>On Fri, Sep 30, 2016 at 05:11:03PM +0000, Mateusz Guzik wrote: >> >>>>> Author: mjg >> >>>>> Date: Fri Sep 30 17:11:03 2016 >> >>>>> New Revision: 306509 >> >>>>> URL: https://svnweb.freebsd.org/changeset/base/306509 >> >>>>> >> >>>>> Log: >> >>>>> vfs: remove the __bo_vnode field from struct vnode >> >>>>> >> >>>>> The pointer can be obtained using __containerof instead. >> >>>>> >> >>>>> Reviewed by: kib >> >>>> >> >>>>Should __FreeBSD_Version be bumped? >> >>>> >> >>> >> >>>Unlikely. It can be in an odd case it turns out there is a module which >> >>>is using the field. >> >> >> >>Can someone do me a favor and make sure sysutils/lsof still >> >>compiles/works? >> >> >> >>I'm OOT at the moment, and have a test IPv6 patch on my 12 system. >> > >> >I just ran lsof and it worked fine at least for the basic case. >> > >> >Apparently it indeed still goes through kernel memory. Did anyone ask >> >the author what kind of interfaces would they want to NOT have to do >> >this? >> > >> >Also, it looks like it constains some kind of a loop to imitate >> >closefrom. >> > >> >On truss I see over 3.7 milion (yes, MILION) calls to close. Like this: >> >close(3773297) ERR#9 'Bad file >> >descriptor' >> >close(3773298) ERR#9 'Bad file >> >descriptor' >> >close(3773299) ERR#9 'Bad file >> >descriptor' >> >close(3773300) ERR#9 'Bad file >> >descriptor' >> >close(3773301) ERR#9 'Bad file >> >descriptor' >> >close(3773302) ERR#9 'Bad file >> >descriptor' >> >close(3773303) ERR#9 'Bad file >> >descriptor' >> >[snip] >> > >> >At least for freebsd this can be patched with the use of closefrom() on >> >all supported releases. >> > >> >Arguably this may be a side effect of limits set too high, perhaps >> >linux >> >sets them sigifnicanly lower and the problem is not that terrible. >> >> We've had this discussion before (re: interfaces). I thought the >> current versions of lsof only close >> the first 1k FD's. (what version of lsof is this? on 12-CURRENT?) >> > > This is 4.90.g,8 "formally" built for 11.0. The typical limit for fd is > 1024 on linux, while it is higher on fbsd. I presume it goes up to the > limit. (as in, ulimit -n) > > So what's up with the discussion on interfaces? > > The current state seems detrimental to everyone. Vic Abell (Author, Retired from Purdue, 70+ yrs old) has to maintain portability to other OS's, and every time we go through this discussion it drops off. You are welcome to try again, but I wouldn't bet on it. Vic Abell -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: ler@lerctr.org US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281 From owner-svn-src-head@freebsd.org Fri Sep 30 18:08:18 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D569C03A97; Fri, 30 Sep 2016 18:08:18 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B4AE1346; Fri, 30 Sep 2016 18:08:18 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UI8HhE066971; Fri, 30 Sep 2016 18:08:17 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UI8H21066968; Fri, 30 Sep 2016 18:08:17 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201609301808.u8UI8H21066968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Fri, 30 Sep 2016 18:08:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306515 - head/sys/dev/bxe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 18:08:18 -0000 Author: davidcs Date: Fri Sep 30 18:08:16 2016 New Revision: 306515 URL: https://svnweb.freebsd.org/changeset/base/306515 Log: Revert commit r306284 - Fixes for issues under high workloads Will fix and recommit patch Modified: head/sys/dev/bxe/bxe.c head/sys/dev/bxe/bxe.h head/sys/dev/bxe/bxe_stats.h Modified: head/sys/dev/bxe/bxe.c ============================================================================== --- head/sys/dev/bxe/bxe.c Fri Sep 30 17:49:04 2016 (r306514) +++ head/sys/dev/bxe/bxe.c Fri Sep 30 18:08:16 2016 (r306515) @@ -27,7 +27,7 @@ #include __FBSDID("$FreeBSD$"); -#define BXE_DRIVER_VERSION "1.78.89" +#define BXE_DRIVER_VERSION "1.78.81" #include "bxe.h" #include "ecore_sp.h" @@ -489,16 +489,7 @@ static const struct { { STATS_OFFSET32(mbuf_alloc_tpa), 4, STATS_FLAGS_FUNC, "mbuf_alloc_tpa"}, { STATS_OFFSET32(tx_queue_full_return), - 4, STATS_FLAGS_FUNC, "tx_queue_full_return"}, - { STATS_OFFSET32(bxe_tx_mq_start_lock_failures), - 4, STATS_FLAGS_FUNC, "bxe_tx_mq_start_lock_failures"}, - { STATS_OFFSET32(tx_request_link_down_failures), - 4, STATS_FLAGS_FUNC, "tx_request_link_down_failures"}, - { STATS_OFFSET32(bd_avail_too_less_failures), - 4, STATS_FLAGS_FUNC, "bd_avail_too_less_failures"}, - { STATS_OFFSET32(tx_mq_not_empty), - 4, STATS_FLAGS_FUNC, "tx_mq_not_empty"} - + 4, STATS_FLAGS_FUNC, "tx_queue_full_return"} }; static const struct { @@ -611,15 +602,7 @@ static const struct { { Q_STATS_OFFSET32(mbuf_alloc_tpa), 4, "mbuf_alloc_tpa"}, { Q_STATS_OFFSET32(tx_queue_full_return), - 4, "tx_queue_full_return"}, - { Q_STATS_OFFSET32(bxe_tx_mq_start_lock_failures), - 4, "bxe_tx_mq_start_lock_failures"}, - { Q_STATS_OFFSET32(tx_request_link_down_failures), - 4, "tx_request_link_down_failures"}, - { Q_STATS_OFFSET32(bd_avail_too_less_failures), - 4, "bd_avail_too_less_failures"}, - { Q_STATS_OFFSET32(tx_mq_not_empty), - 4, "tx_mq_not_empty"} + 4, "tx_queue_full_return"} }; #define BXE_NUM_ETH_STATS ARRAY_SIZE(bxe_eth_stats_arr) @@ -5638,18 +5621,11 @@ bxe_tx_mq_start_locked(struct bxe_softc return (EINVAL); } - if (m != NULL) { - rc = drbr_enqueue(ifp, tx_br, m); - if (rc != 0) { - fp->eth_q_stats.tx_soft_errors++; - goto bxe_tx_mq_start_locked_exit; - } - } - if (!sc->link_vars.link_up || (if_getdrvflags(ifp) & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != IFF_DRV_RUNNING) { - fp->eth_q_stats.tx_request_link_down_failures++; + if (m != NULL) + rc = drbr_enqueue(ifp, tx_br, m); goto bxe_tx_mq_start_locked_exit; } @@ -5659,22 +5635,24 @@ bxe_tx_mq_start_locked(struct bxe_softc fp->eth_q_stats.tx_max_drbr_queue_depth = depth; } - /* keep adding entries while there are frames to send */ - while ((next = drbr_peek(ifp, tx_br)) != NULL) { - /* handle any completions if we're running low */ - tx_bd_avail = bxe_tx_avail(sc, fp); - if (tx_bd_avail < BXE_TX_CLEANUP_THRESHOLD) { - /* bxe_txeof will set IFF_DRV_OACTIVE appropriately */ - bxe_txeof(sc, fp); - tx_bd_avail = bxe_tx_avail(sc, fp); - if (tx_bd_avail < (BXE_TSO_MAX_SEGMENTS + 1)) { - fp->eth_q_stats.bd_avail_too_less_failures++; - m_freem(next); - drbr_advance(ifp, tx_br); - rc = ENOBUFS; - break; - } + if (m == NULL) { + /* no new work, check for pending frames */ + next = drbr_dequeue_drv(ifp, tx_br); + } else if (drbr_needs_enqueue_drv(ifp, tx_br)) { + /* have both new and pending work, maintain packet order */ + rc = drbr_enqueue(ifp, tx_br, m); + if (rc != 0) { + fp->eth_q_stats.tx_soft_errors++; + goto bxe_tx_mq_start_locked_exit; } + next = drbr_dequeue_drv(ifp, tx_br); + } else { + /* new work only and nothing pending */ + next = m; + } + + /* keep adding entries while there are frames to send */ + while (next != NULL) { /* the mbuf now belongs to us */ fp->eth_q_stats.mbuf_alloc_tx++; @@ -5689,12 +5667,12 @@ bxe_tx_mq_start_locked(struct bxe_softc fp->eth_q_stats.tx_encap_failures++; if (next != NULL) { /* mark the TX queue as full and save the frame */ - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - drbr_putback(ifp, tx_br, next); + if_setdrvflagbits(ifp, IFF_DRV_OACTIVE, 0); + /* XXX this may reorder the frame */ + rc = drbr_enqueue(ifp, tx_br, next); fp->eth_q_stats.mbuf_alloc_tx--; fp->eth_q_stats.tx_frames_deferred++; - } else - drbr_advance(ifp, tx_br); + } /* stop looking for more work */ break; @@ -5704,9 +5682,20 @@ bxe_tx_mq_start_locked(struct bxe_softc tx_count++; /* send a copy of the frame to any BPF listeners */ - BPF_MTAP(ifp, next); + if_etherbpfmtap(ifp, next); + + tx_bd_avail = bxe_tx_avail(sc, fp); - drbr_advance(ifp, tx_br); + /* handle any completions if we're running low */ + if (tx_bd_avail < BXE_TX_CLEANUP_THRESHOLD) { + /* bxe_txeof will set IFF_DRV_OACTIVE appropriately */ + bxe_txeof(sc, fp); + if (if_getdrvflags(ifp) & IFF_DRV_OACTIVE) { + break; + } + } + + next = drbr_dequeue_drv(ifp, tx_br); } /* all TX packets were dequeued and/or the tx ring is full */ @@ -5716,32 +5705,10 @@ bxe_tx_mq_start_locked(struct bxe_softc } bxe_tx_mq_start_locked_exit: - /* If we didn't drain the drbr, enqueue a task in the future to do it. */ - if (!drbr_empty(ifp, tx_br)) { - fp->eth_q_stats.tx_mq_not_empty++; - taskqueue_enqueue_timeout(fp->tq, &fp->tx_timeout_task, 1); - } return (rc); } -static void -bxe_tx_mq_start_deferred(void *arg, - int pending) -{ - struct bxe_fastpath *fp = (struct bxe_fastpath *)arg; - struct bxe_softc *sc = fp->sc; -#if __FreeBSD_version >= 800000 - if_t ifp = sc->ifp; -#else - struct ifnet *ifp = sc->ifnet; -#endif /* #if __FreeBSD_version >= 800000 */ - - BXE_FP_TX_LOCK(fp); - bxe_tx_mq_start_locked(sc, ifp, fp, NULL); - BXE_FP_TX_UNLOCK(fp); -} - /* Multiqueue (TSS) dispatch routine. */ static int bxe_tx_mq_start(struct ifnet *ifp, @@ -5763,10 +5730,8 @@ bxe_tx_mq_start(struct ifnet *ifp, if (BXE_FP_TX_TRYLOCK(fp)) { rc = bxe_tx_mq_start_locked(sc, ifp, fp, m); BXE_FP_TX_UNLOCK(fp); - } else { + } else rc = drbr_enqueue(ifp, fp->tx_br, m); - taskqueue_enqueue(fp->tq, &fp->tx_task); - } return (rc); } @@ -6988,8 +6953,6 @@ bxe_link_attn(struct bxe_softc *sc) uint32_t pause_enabled = 0; struct host_port_stats *pstats; int cmng_fns; - struct bxe_fastpath *fp; - int i; /* Make sure that we are synced with the current statistics */ bxe_stats_handle(sc, STATS_EVENT_STOP); @@ -7021,12 +6984,6 @@ bxe_link_attn(struct bxe_softc *sc) if (sc->state == BXE_STATE_OPEN) { bxe_stats_handle(sc, STATS_EVENT_LINK_UP); } - - /* Restart tx when the link comes back. */ - FOR_EACH_ETH_QUEUE(sc, i) { - fp = &sc->fp[i]; - taskqueue_enqueue(fp->tq, &fp->tx_task); - } } if (sc->link_vars.link_up && sc->link_vars.line_speed) { @@ -8636,6 +8593,11 @@ bxe_handle_fp_tq(void *context, * we need to add a "process/continue" flag here that the driver * can use to tell the task here not to do anything. */ +#if 0 + if (!(if_getdrvflags(sc->ifp) & IFF_DRV_RUNNING)) { + return; + } +#endif /* update the fastpath index */ bxe_update_fp_sb_idx(fp); @@ -9073,10 +9035,6 @@ bxe_interrupt_detach(struct bxe_softc *s fp = &sc->fp[i]; if (fp->tq) { taskqueue_drain(fp->tq, &fp->tq_task); - taskqueue_drain(fp->tq, &fp->tx_task); - while (taskqueue_cancel_timeout(fp->tq, &fp->tx_timeout_task, - NULL)) - taskqueue_drain_timeout(fp->tq, &fp->tx_timeout_task); taskqueue_free(fp->tq); fp->tq = NULL; } @@ -9121,12 +9079,9 @@ bxe_interrupt_attach(struct bxe_softc *s snprintf(fp->tq_name, sizeof(fp->tq_name), "bxe%d_fp%d_tq", sc->unit, i); TASK_INIT(&fp->tq_task, 0, bxe_handle_fp_tq, fp); - TASK_INIT(&fp->tx_task, 0, bxe_tx_mq_start_deferred, fp); fp->tq = taskqueue_create_fast(fp->tq_name, M_NOWAIT, taskqueue_thread_enqueue, &fp->tq); - TIMEOUT_TASK_INIT(fp->tq, &fp->tx_timeout_task, 0, - bxe_tx_mq_start_deferred, fp); taskqueue_start_threads(&fp->tq, 1, PI_NET, /* higher priority */ "%s", fp->tq_name); } @@ -12159,12 +12114,9 @@ static void bxe_periodic_callout_func(void *xsc) { struct bxe_softc *sc = (struct bxe_softc *)xsc; - int i; - -#if __FreeBSD_version < 800000 struct bxe_fastpath *fp; uint16_t tx_bd_avail; -#endif + int i; if (!BXE_CORE_TRYLOCK(sc)) { /* just bail and try again next time */ @@ -12186,7 +12138,28 @@ bxe_periodic_callout_func(void *xsc) return; } -#if __FreeBSD_version < 800000 +#if __FreeBSD_version >= 800000 + + FOR_EACH_QUEUE(sc, i) { + fp = &sc->fp[i]; + + if (BXE_FP_TX_TRYLOCK(fp)) { + if_t ifp = sc->ifp; + /* + * If interface was stopped due to unavailable + * bds, try to process some tx completions + */ + (void) bxe_txeof(sc, fp); + + tx_bd_avail = bxe_tx_avail(sc, fp); + if (tx_bd_avail >= BXE_TX_CLEANUP_THRESHOLD) { + bxe_tx_mq_start_locked(sc, ifp, fp, NULL); + } + BXE_FP_TX_UNLOCK(fp); + } + } + +#else fp = &sc->fp[0]; if (BXE_FP_TX_TRYLOCK(fp)) { @@ -12204,7 +12177,7 @@ bxe_periodic_callout_func(void *xsc) BXE_FP_TX_UNLOCK(fp); } - + #endif /* #if __FreeBSD_version >= 800000 */ /* Check for TX timeouts on any fastpath. */ Modified: head/sys/dev/bxe/bxe.h ============================================================================== --- head/sys/dev/bxe/bxe.h Fri Sep 30 17:49:04 2016 (r306514) +++ head/sys/dev/bxe/bxe.h Fri Sep 30 18:08:16 2016 (r306515) @@ -644,9 +644,6 @@ struct bxe_fastpath { struct taskqueue *tq; char tq_name[32]; - struct task tx_task; - struct timeout_task tx_timeout_task; - /* ethernet client ID (each fastpath set of RX/TX/CQE is a client) */ uint8_t cl_id; #define FP_CL_ID(fp) (fp->cl_id) @@ -2303,7 +2300,7 @@ void bxe_dump_mbuf_data(struct bxe_softc extern int bxe_grc_dump(struct bxe_softc *sc); #if __FreeBSD_version >= 800000 -#if (__FreeBSD_version >= 1001513 && __FreeBSD_version < 1100000) || __FreeBSD_version >= 1100048 +#if __FreeBSD_version >= 1000000 #define BXE_SET_FLOWID(m) M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE) #define BXE_VALID_FLOWID(m) (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) #else Modified: head/sys/dev/bxe/bxe_stats.h ============================================================================== --- head/sys/dev/bxe/bxe_stats.h Fri Sep 30 17:49:04 2016 (r306514) +++ head/sys/dev/bxe/bxe_stats.h Fri Sep 30 18:08:16 2016 (r306515) @@ -266,12 +266,6 @@ struct bxe_eth_stats { /* num. of times tx queue full occurred */ uint32_t tx_queue_full_return; - - /* debug stats */ - uint32_t bxe_tx_mq_start_lock_failures; - uint32_t tx_request_link_down_failures; - uint32_t bd_avail_too_less_failures; - uint32_t tx_mq_not_empty; }; @@ -378,12 +372,6 @@ struct bxe_eth_q_stats { /* num. of times tx queue full occurred */ uint32_t tx_queue_full_return; - - /* debug stats */ - uint32_t bxe_tx_mq_start_lock_failures; - uint32_t tx_request_link_down_failures; - uint32_t bd_avail_too_less_failures; - uint32_t tx_mq_not_empty; }; struct bxe_eth_stats_old { From owner-svn-src-head@freebsd.org Fri Sep 30 18:12:18 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54D82C03CF5; Fri, 30 Sep 2016 18:12:18 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 304381825; Fri, 30 Sep 2016 18:12:18 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UICHKU070684; Fri, 30 Sep 2016 18:12:17 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UICHqP070679; Fri, 30 Sep 2016 18:12:17 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201609301812.u8UICHqP070679@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Fri, 30 Sep 2016 18:12:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306516 - in head/sys: amd64/amd64 amd64/include x86/include x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 18:12:18 -0000 Author: cem Date: Fri Sep 30 18:12:16 2016 New Revision: 306516 URL: https://svnweb.freebsd.org/changeset/base/306516 Log: Reduce the cost of TLB invalidation on x86 by using per-CPU completion flags Reduce contention during TLB invalidation operations by using a per-CPU completion flag, rather than a single atomically-updated variable. On a Westmere system (2 sockets x 4 cores x 1 threads), dtrace measurements show that smp_tlb_shootdown is about 50% faster with this patch; observations with VTune show that the percentage of time spent in invlrng_single_page on an interrupt (actually doing invalidation, rather than synchronization) increases from 31% with the old mechanism to 71% with the new one. (Running a basic file server workload.) Submitted by: Anton Rang Reviewed by: cem (earlier version), kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D8041 Modified: head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/include/pcpu.h head/sys/x86/include/x86_smp.h head/sys/x86/x86/mp_x86.c Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Fri Sep 30 18:08:16 2016 (r306515) +++ head/sys/amd64/amd64/mp_machdep.c Fri Sep 30 18:12:16 2016 (r306516) @@ -409,6 +409,7 @@ void invltlb_invpcid_handler(void) { struct invpcid_descr d; + uint64_t generation; #ifdef COUNT_XINVLTLB_HITS xhits_gbl[PCPU_GET(cpuid)]++; @@ -417,17 +418,20 @@ invltlb_invpcid_handler(void) (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ + generation = smp_tlb_generation; d.pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid; d.pad = 0; d.addr = 0; invpcid(&d, smp_tlb_pmap == kernel_pmap ? INVPCID_CTXGLOB : INVPCID_CTX); - atomic_add_int(&smp_tlb_wait, 1); + PCPU_SET(smp_tlb_done, generation); } void invltlb_pcid_handler(void) { + uint64_t generation; + #ifdef COUNT_XINVLTLB_HITS xhits_gbl[PCPU_GET(cpuid)]++; #endif /* COUNT_XINVLTLB_HITS */ @@ -435,6 +439,7 @@ invltlb_pcid_handler(void) (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ + generation = smp_tlb_generation; if (smp_tlb_pmap == kernel_pmap) { invltlb_glob(); } else { @@ -450,5 +455,5 @@ invltlb_pcid_handler(void) smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid); } } - atomic_add_int(&smp_tlb_wait, 1); + PCPU_SET(smp_tlb_done, generation); } Modified: head/sys/amd64/include/pcpu.h ============================================================================== --- head/sys/amd64/include/pcpu.h Fri Sep 30 18:08:16 2016 (r306515) +++ head/sys/amd64/include/pcpu.h Fri Sep 30 18:12:16 2016 (r306516) @@ -65,7 +65,8 @@ u_int pc_vcpu_id; /* Xen vCPU ID */ \ uint32_t pc_pcid_next; \ uint32_t pc_pcid_gen; \ - char __pad[149] /* be divisor of PAGE_SIZE \ + uint64_t pc_smp_tlb_done; /* TLB op acknowledgement */ \ + char __pad[141] /* be divisor of PAGE_SIZE \ after cache alignment */ #define PC_DBREG_CMD_NONE 0 Modified: head/sys/x86/include/x86_smp.h ============================================================================== --- head/sys/x86/include/x86_smp.h Fri Sep 30 18:08:16 2016 (r306515) +++ head/sys/x86/include/x86_smp.h Fri Sep 30 18:12:16 2016 (r306516) @@ -35,7 +35,7 @@ extern volatile int aps_ready; extern struct mtx ap_boot_mtx; extern int cpu_logical; extern int cpu_cores; -extern volatile int smp_tlb_wait; +extern volatile uint64_t smp_tlb_generation; extern struct pmap *smp_tlb_pmap; extern u_int xhits_gbl[]; extern u_int xhits_pg[]; Modified: head/sys/x86/x86/mp_x86.c ============================================================================== --- head/sys/x86/x86/mp_x86.c Fri Sep 30 18:08:16 2016 (r306515) +++ head/sys/x86/x86/mp_x86.c Fri Sep 30 18:12:16 2016 (r306516) @@ -1304,12 +1304,15 @@ cpususpend_handler(void) void invlcache_handler(void) { + uint64_t generation; + #ifdef COUNT_IPIS (*ipi_invlcache_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ + generation = smp_tlb_generation; wbinvd(); - atomic_add_int(&smp_tlb_wait, 1); + PCPU_SET(smp_tlb_done, generation); } /* @@ -1367,7 +1370,7 @@ SYSINIT(mp_ipi_intrcnt, SI_SUB_INTR, SI_ /* Variables needed for SMP tlb shootdown. */ static vm_offset_t smp_tlb_addr1, smp_tlb_addr2; pmap_t smp_tlb_pmap; -volatile int smp_tlb_wait; +volatile uint64_t smp_tlb_generation; #ifdef __amd64__ #define read_eflags() read_rflags() @@ -1377,15 +1380,16 @@ static void smp_targeted_tlb_shootdown(cpuset_t mask, u_int vector, pmap_t pmap, vm_offset_t addr1, vm_offset_t addr2) { - int cpu, ncpu, othercpus; - - othercpus = mp_ncpus - 1; /* does not shootdown self */ + cpuset_t other_cpus; + volatile uint64_t *p_cpudone; + uint64_t generation; + int cpu; /* * Check for other cpus. Return if none. */ if (CPU_ISFULLSET(&mask)) { - if (othercpus < 1) + if (mp_ncpus <= 1) return; } else { CPU_CLR(PCPU_GET(cpuid), &mask); @@ -1399,23 +1403,28 @@ smp_targeted_tlb_shootdown(cpuset_t mask smp_tlb_addr1 = addr1; smp_tlb_addr2 = addr2; smp_tlb_pmap = pmap; - smp_tlb_wait = 0; + generation = ++smp_tlb_generation; if (CPU_ISFULLSET(&mask)) { - ncpu = othercpus; ipi_all_but_self(vector); + other_cpus = all_cpus; + CPU_CLR(PCPU_GET(cpuid), &other_cpus); } else { - ncpu = 0; + other_cpus = mask; while ((cpu = CPU_FFS(&mask)) != 0) { cpu--; CPU_CLR(cpu, &mask); CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__, cpu, vector); ipi_send_cpu(cpu, vector); - ncpu++; } } - while (smp_tlb_wait < ncpu) - ia32_pause(); + while ((cpu = CPU_FFS(&other_cpus)) != 0) { + cpu--; + CPU_CLR(cpu, &other_cpus); + p_cpudone = &cpuid_to_pcpu[cpu]->pc_smp_tlb_done; + while (*p_cpudone != generation) + ia32_pause(); + } mtx_unlock_spin(&smp_ipi_mtx); } @@ -1473,6 +1482,8 @@ smp_cache_flush(void) void invltlb_handler(void) { + uint64_t generation; + #ifdef COUNT_XINVLTLB_HITS xhits_gbl[PCPU_GET(cpuid)]++; #endif /* COUNT_XINVLTLB_HITS */ @@ -1480,16 +1491,19 @@ invltlb_handler(void) (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ + generation = smp_tlb_generation; if (smp_tlb_pmap == kernel_pmap) invltlb_glob(); else invltlb(); - atomic_add_int(&smp_tlb_wait, 1); + PCPU_SET(smp_tlb_done, generation); } void invlpg_handler(void) { + uint64_t generation; + #ifdef COUNT_XINVLTLB_HITS xhits_pg[PCPU_GET(cpuid)]++; #endif /* COUNT_XINVLTLB_HITS */ @@ -1497,14 +1511,16 @@ invlpg_handler(void) (*ipi_invlpg_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ + generation = smp_tlb_generation; invlpg(smp_tlb_addr1); - atomic_add_int(&smp_tlb_wait, 1); + PCPU_SET(smp_tlb_done, generation); } void invlrng_handler(void) { - vm_offset_t addr; + vm_offset_t addr, addr2; + uint64_t generation; #ifdef COUNT_XINVLTLB_HITS xhits_rng[PCPU_GET(cpuid)]++; @@ -1514,10 +1530,12 @@ invlrng_handler(void) #endif /* COUNT_IPIS */ addr = smp_tlb_addr1; + addr2 = smp_tlb_addr2; + generation = smp_tlb_generation; do { invlpg(addr); addr += PAGE_SIZE; - } while (addr < smp_tlb_addr2); + } while (addr < addr2); - atomic_add_int(&smp_tlb_wait, 1); + PCPU_SET(smp_tlb_done, generation); } From owner-svn-src-head@freebsd.org Fri Sep 30 18:36:24 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E63D6C044B0; Fri, 30 Sep 2016 18:36:24 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6ACB937; Fri, 30 Sep 2016 18:36:24 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UIaNah078614; Fri, 30 Sep 2016 18:36:23 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UIaNUi078613; Fri, 30 Sep 2016 18:36:23 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201609301836.u8UIaNUi078613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Fri, 30 Sep 2016 18:36:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306518 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 18:36:25 -0000 Author: sevan (doc committer) Date: Fri Sep 30 18:36:23 2016 New Revision: 306518 URL: https://svnweb.freebsd.org/changeset/base/306518 Log: Add myself to the list & note who is my mentor. Approved by: bcr (mentor) Modified: head/share/misc/committers-doc.dot Modified: head/share/misc/committers-doc.dot ============================================================================== --- head/share/misc/committers-doc.dot Fri Sep 30 18:14:05 2016 (r306517) +++ head/share/misc/committers-doc.dot Fri Sep 30 18:36:23 2016 (r306518) @@ -85,6 +85,7 @@ pluknet [label="Sergey Kandaurov\nplukne remko [label="Remko Lodder\nremko@FreeBSD.org\n2004/10/16"] rene [label="Rene Ladan\nrene@FreeBSD.org\n2008/11/03"] ryusuke [label="Ryusuke Suzuki\nryusuke@FreeBSD.org\n2009/12/21"] +sevan [label="Sevan Janiyan\nsevan@FreeBSD.org\n2016/09/16"] simon [label="Simon L. Nielsen\nsimon@FreeBSD.org\n2003/07/20"] skreuzer [label="Steven Kreuzer\nskreuzer@FreeBSD.org\n2014/01/15"] taras [label="Taras Korenko\ntaras@FreeBSD.org\n2010/06/25"] @@ -104,6 +105,7 @@ bcr -> crees bcr -> jgh bcr -> allanjude bcr -> bhd +bcr -> sevan blackend -> ale From owner-svn-src-head@freebsd.org Fri Sep 30 18:43:40 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E485C04614; Fri, 30 Sep 2016 18:43:40 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09A6ED7B; Fri, 30 Sep 2016 18:43:39 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UIhdFF082705; Fri, 30 Sep 2016 18:43:39 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UIhdY1082704; Fri, 30 Sep 2016 18:43:39 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201609301843.u8UIhdY1082704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 30 Sep 2016 18:43:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306519 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 18:43:40 -0000 Author: avos Date: Fri Sep 30 18:43:39 2016 New Revision: 306519 URL: https://svnweb.freebsd.org/changeset/base/306519 Log: net80211: do not cancel scan when packet is sent. Restore pre-r300383 behavior when a frame is sent: - stop scan; - send frame; - when beacon arrives and our bit in TIM is not set - restart the scan. NOTE: Ideally, this should introduce new interface (ieee80211_pause_anyscan()); however, since ieee80211_cancel_anyscan() is not used by drivers and only called by ieee80211_start_pkt() the current patch overrides it's behavior instead. Tested with Intel 3945BG, STA mode Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D7979 Modified: head/sys/net80211/ieee80211_scan_sw.c Modified: head/sys/net80211/ieee80211_scan_sw.c ============================================================================== --- head/sys/net80211/ieee80211_scan_sw.c Fri Sep 30 18:36:23 2016 (r306518) +++ head/sys/net80211/ieee80211_scan_sw.c Fri Sep 30 18:43:39 2016 (r306519) @@ -57,9 +57,11 @@ struct scan_state { u_int ss_iflags; /* flags used internally */ #define ISCAN_MINDWELL 0x0001 /* min dwell time reached */ #define ISCAN_DISCARD 0x0002 /* discard rx'd frames */ -#define ISCAN_CANCEL 0x0004 /* cancel current scan */ -#define ISCAN_ABORT 0x0008 /* end the scan immediately */ -#define ISCAN_RUNNING 0x0010 /* scan was started */ +#define ISCAN_INTERRUPT 0x0004 /* interrupt current scan */ +#define ISCAN_CANCEL 0x0008 /* cancel current scan */ +#define ISCAN_PAUSE (ISCAN_INTERRUPT | ISCAN_CANCEL) +#define ISCAN_ABORT 0x0010 /* end the scan immediately */ +#define ISCAN_RUNNING 0x0020 /* scan was started */ unsigned long ss_chanmindwell; /* min dwell on curchan */ unsigned long ss_scanend; /* time scan must stop */ @@ -415,27 +417,31 @@ cancel_scan(struct ieee80211vap *vap, in { struct ieee80211com *ic = vap->iv_ic; struct ieee80211_scan_state *ss = ic->ic_scan; + struct scan_state *ss_priv = SCAN_PRIVATE(ss); + int signal; IEEE80211_LOCK(ic); + signal = any ? ISCAN_PAUSE : ISCAN_CANCEL; if ((ic->ic_flags & IEEE80211_F_SCAN) && (any || ss->ss_vap == vap) && - (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL) == 0) { + (ss_priv->ss_iflags & signal) == 0) { IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: cancel %s scan\n", func, + "%s: %s %s scan\n", func, + any ? "pause" : "cancel", ss->ss_flags & IEEE80211_SCAN_ACTIVE ? "active" : "passive"); /* clear bg scan NOPICK */ ss->ss_flags &= ~IEEE80211_SCAN_NOPICK; - /* mark cancel request and wake up the scan task */ - scan_signal_locked(ss, ISCAN_CANCEL); + /* mark request and wake up the scan task */ + scan_signal_locked(ss, signal); } else { IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: called; F_SCAN=%d, vap=%s, CANCEL=%d\n", + "%s: called; F_SCAN=%d, vap=%s, signal=%d\n", func, !! (ic->ic_flags & IEEE80211_F_SCAN), (ss->ss_vap == vap ? "match" : "nomatch"), - !! (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL)); + !! (ss_priv->ss_iflags & signal)); } IEEE80211_UNLOCK(ic); } @@ -868,9 +874,11 @@ scan_done(struct ieee80211_scan_state *s if (ss->ss_next >= ss->ss_last) ic->ic_flags_ext &= ~IEEE80211_FEXT_BGSCAN; - ieee80211_notify_scan_done(vap); + /* send 'scan done' event if not interrupted due to traffic. */ + if (!(ss_priv->ss_iflags & ISCAN_INTERRUPT)) + ieee80211_notify_scan_done(vap); } - ss_priv->ss_iflags &= ~(ISCAN_CANCEL|ISCAN_ABORT); + ss_priv->ss_iflags &= ~(ISCAN_PAUSE | ISCAN_ABORT); ss_priv->ss_scanend = 0; ss->ss_flags &= ~(IEEE80211_SCAN_ONCE | IEEE80211_SCAN_PICK1ST); IEEE80211_UNLOCK(ic); From owner-svn-src-head@freebsd.org Fri Sep 30 18:58:52 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16CBAC049A6; Fri, 30 Sep 2016 18:58:52 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8BFAA2F; Fri, 30 Sep 2016 18:58:51 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UIwpak086861; Fri, 30 Sep 2016 18:58:51 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UIwo8v086857; Fri, 30 Sep 2016 18:58:50 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201609301858.u8UIwo8v086857@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Fri, 30 Sep 2016 18:58:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306521 - in head/sys: amd64/amd64 amd64/include x86/include x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 18:58:52 -0000 Author: cem Date: Fri Sep 30 18:58:50 2016 New Revision: 306521 URL: https://svnweb.freebsd.org/changeset/base/306521 Log: Revert r306516 for now, it is incomplete on i386 Noted by: kib Modified: head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/include/pcpu.h head/sys/x86/include/x86_smp.h head/sys/x86/x86/mp_x86.c Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Fri Sep 30 18:47:34 2016 (r306520) +++ head/sys/amd64/amd64/mp_machdep.c Fri Sep 30 18:58:50 2016 (r306521) @@ -409,7 +409,6 @@ void invltlb_invpcid_handler(void) { struct invpcid_descr d; - uint64_t generation; #ifdef COUNT_XINVLTLB_HITS xhits_gbl[PCPU_GET(cpuid)]++; @@ -418,20 +417,17 @@ invltlb_invpcid_handler(void) (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ - generation = smp_tlb_generation; d.pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid; d.pad = 0; d.addr = 0; invpcid(&d, smp_tlb_pmap == kernel_pmap ? INVPCID_CTXGLOB : INVPCID_CTX); - PCPU_SET(smp_tlb_done, generation); + atomic_add_int(&smp_tlb_wait, 1); } void invltlb_pcid_handler(void) { - uint64_t generation; - #ifdef COUNT_XINVLTLB_HITS xhits_gbl[PCPU_GET(cpuid)]++; #endif /* COUNT_XINVLTLB_HITS */ @@ -439,7 +435,6 @@ invltlb_pcid_handler(void) (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ - generation = smp_tlb_generation; if (smp_tlb_pmap == kernel_pmap) { invltlb_glob(); } else { @@ -455,5 +450,5 @@ invltlb_pcid_handler(void) smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid); } } - PCPU_SET(smp_tlb_done, generation); + atomic_add_int(&smp_tlb_wait, 1); } Modified: head/sys/amd64/include/pcpu.h ============================================================================== --- head/sys/amd64/include/pcpu.h Fri Sep 30 18:47:34 2016 (r306520) +++ head/sys/amd64/include/pcpu.h Fri Sep 30 18:58:50 2016 (r306521) @@ -65,8 +65,7 @@ u_int pc_vcpu_id; /* Xen vCPU ID */ \ uint32_t pc_pcid_next; \ uint32_t pc_pcid_gen; \ - uint64_t pc_smp_tlb_done; /* TLB op acknowledgement */ \ - char __pad[141] /* be divisor of PAGE_SIZE \ + char __pad[149] /* be divisor of PAGE_SIZE \ after cache alignment */ #define PC_DBREG_CMD_NONE 0 Modified: head/sys/x86/include/x86_smp.h ============================================================================== --- head/sys/x86/include/x86_smp.h Fri Sep 30 18:47:34 2016 (r306520) +++ head/sys/x86/include/x86_smp.h Fri Sep 30 18:58:50 2016 (r306521) @@ -35,7 +35,7 @@ extern volatile int aps_ready; extern struct mtx ap_boot_mtx; extern int cpu_logical; extern int cpu_cores; -extern volatile uint64_t smp_tlb_generation; +extern volatile int smp_tlb_wait; extern struct pmap *smp_tlb_pmap; extern u_int xhits_gbl[]; extern u_int xhits_pg[]; Modified: head/sys/x86/x86/mp_x86.c ============================================================================== --- head/sys/x86/x86/mp_x86.c Fri Sep 30 18:47:34 2016 (r306520) +++ head/sys/x86/x86/mp_x86.c Fri Sep 30 18:58:50 2016 (r306521) @@ -1304,15 +1304,12 @@ cpususpend_handler(void) void invlcache_handler(void) { - uint64_t generation; - #ifdef COUNT_IPIS (*ipi_invlcache_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ - generation = smp_tlb_generation; wbinvd(); - PCPU_SET(smp_tlb_done, generation); + atomic_add_int(&smp_tlb_wait, 1); } /* @@ -1370,7 +1367,7 @@ SYSINIT(mp_ipi_intrcnt, SI_SUB_INTR, SI_ /* Variables needed for SMP tlb shootdown. */ static vm_offset_t smp_tlb_addr1, smp_tlb_addr2; pmap_t smp_tlb_pmap; -volatile uint64_t smp_tlb_generation; +volatile int smp_tlb_wait; #ifdef __amd64__ #define read_eflags() read_rflags() @@ -1380,16 +1377,15 @@ static void smp_targeted_tlb_shootdown(cpuset_t mask, u_int vector, pmap_t pmap, vm_offset_t addr1, vm_offset_t addr2) { - cpuset_t other_cpus; - volatile uint64_t *p_cpudone; - uint64_t generation; - int cpu; + int cpu, ncpu, othercpus; + + othercpus = mp_ncpus - 1; /* does not shootdown self */ /* * Check for other cpus. Return if none. */ if (CPU_ISFULLSET(&mask)) { - if (mp_ncpus <= 1) + if (othercpus < 1) return; } else { CPU_CLR(PCPU_GET(cpuid), &mask); @@ -1403,28 +1399,23 @@ smp_targeted_tlb_shootdown(cpuset_t mask smp_tlb_addr1 = addr1; smp_tlb_addr2 = addr2; smp_tlb_pmap = pmap; - generation = ++smp_tlb_generation; + smp_tlb_wait = 0; if (CPU_ISFULLSET(&mask)) { + ncpu = othercpus; ipi_all_but_self(vector); - other_cpus = all_cpus; - CPU_CLR(PCPU_GET(cpuid), &other_cpus); } else { - other_cpus = mask; + ncpu = 0; while ((cpu = CPU_FFS(&mask)) != 0) { cpu--; CPU_CLR(cpu, &mask); CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__, cpu, vector); ipi_send_cpu(cpu, vector); + ncpu++; } } - while ((cpu = CPU_FFS(&other_cpus)) != 0) { - cpu--; - CPU_CLR(cpu, &other_cpus); - p_cpudone = &cpuid_to_pcpu[cpu]->pc_smp_tlb_done; - while (*p_cpudone != generation) - ia32_pause(); - } + while (smp_tlb_wait < ncpu) + ia32_pause(); mtx_unlock_spin(&smp_ipi_mtx); } @@ -1482,8 +1473,6 @@ smp_cache_flush(void) void invltlb_handler(void) { - uint64_t generation; - #ifdef COUNT_XINVLTLB_HITS xhits_gbl[PCPU_GET(cpuid)]++; #endif /* COUNT_XINVLTLB_HITS */ @@ -1491,19 +1480,16 @@ invltlb_handler(void) (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ - generation = smp_tlb_generation; if (smp_tlb_pmap == kernel_pmap) invltlb_glob(); else invltlb(); - PCPU_SET(smp_tlb_done, generation); + atomic_add_int(&smp_tlb_wait, 1); } void invlpg_handler(void) { - uint64_t generation; - #ifdef COUNT_XINVLTLB_HITS xhits_pg[PCPU_GET(cpuid)]++; #endif /* COUNT_XINVLTLB_HITS */ @@ -1511,16 +1497,14 @@ invlpg_handler(void) (*ipi_invlpg_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ - generation = smp_tlb_generation; invlpg(smp_tlb_addr1); - PCPU_SET(smp_tlb_done, generation); + atomic_add_int(&smp_tlb_wait, 1); } void invlrng_handler(void) { - vm_offset_t addr, addr2; - uint64_t generation; + vm_offset_t addr; #ifdef COUNT_XINVLTLB_HITS xhits_rng[PCPU_GET(cpuid)]++; @@ -1530,12 +1514,10 @@ invlrng_handler(void) #endif /* COUNT_IPIS */ addr = smp_tlb_addr1; - addr2 = smp_tlb_addr2; - generation = smp_tlb_generation; do { invlpg(addr); addr += PAGE_SIZE; - } while (addr < addr2); + } while (addr < smp_tlb_addr2); - PCPU_SET(smp_tlb_done, generation); + atomic_add_int(&smp_tlb_wait, 1); } From owner-svn-src-head@freebsd.org Fri Sep 30 19:21:03 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E252AC0304F; Fri, 30 Sep 2016 19:21:03 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 664FDC9C; Fri, 30 Sep 2016 19:21:03 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UJL2D7095319; Fri, 30 Sep 2016 19:21:02 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UJL2Ws095317; Fri, 30 Sep 2016 19:21:02 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201609301921.u8UJL2Ws095317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Fri, 30 Sep 2016 19:21:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306522 - head/sys/dev/qlxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 19:21:04 -0000 Author: davidcs Date: Fri Sep 30 19:21:02 2016 New Revision: 306522 URL: https://svnweb.freebsd.org/changeset/base/306522 Log: Upgrade Firmware/Bootloader/ResetSeq/Minidump to revision 5.4.62 MFC after:5 days Modified: head/sys/dev/qlxgbe/ql_boot.c head/sys/dev/qlxgbe/ql_fw.c head/sys/dev/qlxgbe/ql_minidump.c head/sys/dev/qlxgbe/ql_reset.c Modified: head/sys/dev/qlxgbe/ql_boot.c ============================================================================== --- head/sys/dev/qlxgbe/ql_boot.c Fri Sep 30 18:58:50 2016 (r306521) +++ head/sys/dev/qlxgbe/ql_boot.c Fri Sep 30 19:21:02 2016 (r306522) @@ -35,13 +35,13 @@ __FBSDID("$FreeBSD$"); unsigned int ql83xx_bootloader_version_major = 5; unsigned int ql83xx_bootloader_version_minor = 4; -unsigned int ql83xx_bootloader_version_sub = 58; +unsigned int ql83xx_bootloader_version_sub = 62; unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x04, 0x00, 0xc0, 0x81, 0x05, 0x1f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0xc0, 0x83, 0x05, 0x1f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1e, 0x02, 0x21, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, @@ -71,7 +71,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x83, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x8b, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -703,11 +703,11 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x80, 0x02, 0xe0, 0x0e, 0x07, 0x84, 0x0b, 0x08, 0x60, 0x00, 0xa0, 0xc3, 0x01, 0x81, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x4f, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0c, 0x00, 0x0d, 0x01, + 0x57, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0c, 0x00, 0x0d, 0x01, 0x40, 0x04, 0x1a, 0x03, 0x00, 0x10, 0x78, 0x02, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x4c, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x54, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1384,7 +1384,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x81, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x14, 0xe0, 0x11, 0x20, 0xa2, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbb, 0x11, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x02, 0x00, 0x80, 0x40, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0b, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, @@ -1421,14 +1421,14 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0x11, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0x02, 0x16, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x49, 0x07, + 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x49, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x07, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x80, 0x01, 0xa0, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x40, 0x00, 0x00, 0x0c, 0x1c, 0x00, 0x00, 0x00, 0x40, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x5e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfe, 0x1f, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, @@ -1535,7 +1535,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x20, 0x50, 0x00, 0x02, 0x00, 0x00, 0x00, 0x60, 0x52, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xb5, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x00, + 0xbd, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0xa0, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1589,7 +1589,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb5, 0x14, 0x7c, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x40, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0xa0, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, @@ -1624,7 +1624,7 @@ unsigned char ql83xx_bootloader[] = { 0x04, 0x00, 0x00, 0x00, 0x0e, 0x04, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x35, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x3d, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x08, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x4c, 0x01, @@ -1739,13 +1739,13 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x05, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x04, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, 0x00, 0xa8, 0x22, 0x00, 0x40, 0x02, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x07, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x07, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x0f, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x0d, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, 0x00, 0x20, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x08, 0x00, 0x00, 0x40, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x17, 0x7c, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x20, 0x50, 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0xe0, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, @@ -1803,8 +1803,8 @@ unsigned char ql83xx_bootloader[] = { 0x0e, 0x1e, 0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x80, 0x40, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xb5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x35, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0xbd, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x3d, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xf8, 0x0e, 0x00, 0xe0, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x06, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x00, @@ -1827,8 +1827,8 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x20, 0x50, 0x04, 0x01, 0x8d, 0x02, 0x32, 0x04, 0x1b, 0x08, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x19, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x19, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x64, 0x19, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x64, 0x19, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x0d, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x85, 0x01, 0x40, 0x06, 0x00, 0x00, 0x00, 0x78, 0x38, 0x04, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x84, 0x02, @@ -1988,7 +1988,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x29, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xa5, 0x03, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc0, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xc8, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x00, 0x18, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x80, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -2104,7 +2104,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x40, 0x00, 0x80, 0x40, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xcf, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xd7, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -2119,7 +2119,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xd0, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, + 0xd8, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -2135,7 +2135,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x4d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x0a, 0x00, 0x80, 0x01, 0xa0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xd2, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x01, + 0xda, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x05, 0x00, 0x40, 0x16, 0x00, 0x00, @@ -2196,7 +2196,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0xe0, 0x01, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0xd0, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x80, 0xd8, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -2209,7 +2209,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4, 0x15, 0x7c, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, @@ -2903,7 +2903,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xd6, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x02, + 0xde, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x05, 0x00, 0x40, 0x16, 0x00, 0x00, @@ -3097,7 +3097,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x08, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x78, 0x00, 0x00, 0xe0, 0x01, 0xa0, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xd7, 0x15, 0x7c, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xdf, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x41, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x78, 0x00, 0x00, 0xe0, 0x01, 0xa0, @@ -3147,7 +3147,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xd9, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, + 0xe1, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -3264,7 +3264,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x2d, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xdb, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xe3, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x81, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x09, 0x00, @@ -3313,7 +3313,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x80, 0x01, 0xa0, 0x00, 0x0a, 0x0c, 0x03, 0x08, 0x92, 0x20, 0x0b, 0x00, 0x08, 0xf8, 0x08, 0x00, 0x82, 0x01, 0xa0, 0x80, 0x00, 0xcc, 0x02, 0x06, 0x0f, 0x00, 0x00, 0x00, 0x08, 0xf8, 0x09, 0x00, 0x82, 0x01, 0xa0, - 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbd, 0x15, 0x7c, 0x00, + 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x8c, 0x00, 0x42, 0x03, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x0a, 0xe0, 0x82, 0x01, 0xa0, 0x0a, 0x94, 0xa0, 0x01, 0xa0, 0x7b, 0x10, 0x80, 0x01, 0x13, 0xe8, 0x00, 0xb0, 0x02, 0x40, 0x81, @@ -3329,7 +3329,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x7a, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x20, 0x50, 0x00, 0x01, 0x00, 0xc0, 0x41, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbd, 0x15, 0x7c, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x40, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x01, 0x00, 0xc0, 0x01, 0x00, 0xa0, @@ -3361,18 +3361,18 @@ unsigned char ql83xx_bootloader[] = { 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xdd, 0x15, 0x7c, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x41, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x09, 0x00, 0x40, 0x16, 0x00, 0x00, 0x00, 0xd8, 0x78, 0x00, 0x00, 0xe2, 0x01, 0xa0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xdf, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x01, 0x01, + 0xe7, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9b, 0x0a, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x78, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0xdf, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x80, 0xe7, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -3683,7 +3683,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xe1, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x0c, 0x03, + 0xe9, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -3707,7 +3707,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xe3, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x81, 0x01, + 0xeb, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x81, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x09, 0x00, 0x40, 0x16, 0x00, 0x00, @@ -3888,7 +3888,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xe5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xed, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x41, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -4067,7 +4067,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0xcd, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x0a, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xe7, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, + 0xef, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -4143,7 +4143,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xe8, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x00, + 0xf0, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x09, 0x00, 0x40, 0x16, 0x00, 0x00, @@ -4373,7 +4373,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xea, 0x15, 0x7c, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf2, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, @@ -4448,7 +4448,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x6b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xec, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xf4, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x05, 0x00, @@ -5093,17 +5093,17 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0xcd, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x08, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x0b, 0x20, 0x80, 0x01, 0xa0, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xcd, 0x15, 0x7c, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xd5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, - 0xd1, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x0d, 0x01, + 0xd9, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x0d, 0x01, 0x40, 0x0a, 0x00, 0x00, 0x00, 0x08, 0xf8, 0x08, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x5d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x08, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xfb, 0x0b, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x15, 0x7c, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xfa, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x08, + 0x02, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x08, 0x20, 0x0f, 0x07, 0x04, 0x00, 0x00, 0x00, 0x02, 0x88, 0xc3, 0x01, 0x81, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -5773,7 +5773,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x15, 0x7c, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, @@ -5800,7 +5800,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x5a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0e, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0xff, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x80, 0x07, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x01, 0x00, @@ -5840,7 +5840,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x38, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x00, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x01, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x80, 0x09, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x45, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x01, 0x00, @@ -6426,1136 +6426,1146 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, 0x0e, 0x1e, 0x00, 0x00, 0x10, 0x41, 0x22, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0xc0, 0xf9, 0x3f, - 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x01, 0xcd, 0x01, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x02, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x21, 0x04, - 0x00, 0x00, 0x00, 0x60, 0x20, 0x02, 0x00, 0x00, 0x40, 0x0a, 0x4a, 0x09, - 0x00, 0x08, 0x30, 0x00, 0x20, 0x06, 0x00, 0xa0, 0x00, 0x00, 0x59, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0xcd, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xe8, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x00, 0x80, 0x01, 0xc0, 0x0f, 0x07, 0x04, 0x0e, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0d, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, - 0x47, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x08, 0x00, 0x00, - 0x30, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x6b, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x20, 0x50, 0x00, 0x10, 0x00, 0x00, 0x40, 0x18, 0x00, 0x00, - 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, - 0x00, 0x1a, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfa, - 0x1f, 0x00, 0x20, 0x50, 0x00, 0x01, 0x00, 0x00, 0x3a, 0x11, 0x00, 0x00, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x02, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x40, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x03, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0x03, 0x04, 0x00, 0x00, 0xa0, 0x00, - 0xb8, 0xc3, 0x00, 0x81, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, - 0x0e, 0x9e, 0x20, 0x02, 0x00, 0xc0, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0xc0, 0xf9, 0x3f, - 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x01, 0xcd, 0x01, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x02, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, + 0x20, 0x02, 0x00, 0x00, 0x40, 0x0a, 0x4a, 0x09, 0x00, 0x08, 0x30, 0x00, + 0x20, 0x06, 0x00, 0xa0, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x18, 0x00, 0xfc, 0x1f, 0xbc, 0xbe, 0x00, 0x9c, 0x99, 0x45, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x3c, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x20, 0x00, 0x00, + 0x40, 0x1a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0xf9, 0x1f, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0x03, 0x04, + 0x00, 0x00, 0xa0, 0x00, 0xb8, 0xc3, 0x00, 0x81, 0x00, 0x00, 0x11, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, + 0x04, 0x80, 0x00, 0x00, 0x0e, 0xbe, 0x20, 0x02, 0x00, 0xc0, 0x31, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, + 0x00, 0xc0, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0xcd, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x02, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x80, 0x01, 0xc0, 0x0f, 0x07, 0x04, + 0x0e, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x0d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x20, 0x02, 0x00, 0x00, 0x40, 0x0a, 0x4a, 0x09, 0x00, 0x08, 0x30, 0x00, 0x40, 0x06, 0x00, 0xa0, 0x00, 0x00, 0x59, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, - 0x47, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x08, 0x00, 0x00, - 0x30, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x6b, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x20, 0x50, 0x00, 0x10, 0x00, 0x00, 0x40, 0x18, 0x00, 0x00, - 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, - 0x00, 0x1a, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfa, - 0x1f, 0x00, 0x20, 0x50, 0x00, 0x01, 0x00, 0x00, 0x3a, 0x11, 0x00, 0x00, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x02, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x40, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x03, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0x03, 0x04, 0x00, 0x00, 0xa0, 0x00, - 0xb8, 0xc3, 0x00, 0x81, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, - 0x0e, 0x9e, 0x20, 0x02, 0x00, 0xc0, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, - 0x00, 0x82, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, - 0x00, 0xd0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8d, 0x03, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x80, 0x40, 0xcd, 0x41, 0x40, 0x0e, 0x1a, 0x0e, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x00, 0xf8, 0x31, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, 0x00, 0x00, 0x26, 0x00, - 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x20, 0x00, 0x00, 0x00, - 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x01, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x06, 0x00, 0xf8, 0x27, 0x00, - 0x00, 0x04, 0x00, 0xa0, 0x20, 0x00, 0x89, 0x01, 0x40, 0x0a, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x00, 0xc0, - 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x80, 0x00, 0x00, 0x0e, 0x1e, 0x1d, 0x02, 0x00, 0x40, 0x31, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, - 0x00, 0x40, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x48, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, - 0x80, 0x00, 0xcd, 0x41, 0x40, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x40, 0x8d, 0x03, - 0x40, 0x04, 0x1a, 0x0e, 0x00, 0x10, 0x78, 0x01, 0x00, 0x82, 0x01, 0xa0, - 0x00, 0x02, 0x00, 0x80, 0x40, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, 0x00, 0x04, 0x00, 0x00, - 0x40, 0x14, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0xa0, 0x18, 0x00, 0xfc, 0x1f, 0xbc, 0xbe, 0x00, 0x9c, + 0x99, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x3c, 0x06, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf9, 0x1f, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xe7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x3c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0e, 0x00, 0x00, 0x26, 0x00, - 0xe0, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1c, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x40, 0x04, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x04, 0x00, 0x00, 0x3c, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, - 0x0e, 0x5e, 0x20, 0x02, 0x00, 0x40, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, - 0x00, 0x82, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x10, 0xd0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8d, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x80, 0x40, 0xcd, 0x41, 0x40, 0x0e, 0x1a, 0x0e, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x08, 0x00, 0x00, 0x00, 0x3c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x00, 0x28, 0x30, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x4c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x04, 0x00, 0x00, 0x26, 0x00, - 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x20, 0x01, 0x60, 0x21, 0x22, 0x00, 0x8c, 0x03, - 0x40, 0x0a, 0x1f, 0x01, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x0a, 0x20, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x41, 0xf8, 0x3f, - 0xb8, 0xc3, 0x00, 0x81, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x80, - 0x41, 0x04, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x14, 0xe0, 0x11, 0x20, 0xa0, - 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x0b, 0x00, 0x80, 0x26, 0x00, - 0x20, 0x04, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, - 0x00, 0x40, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x4a, 0x05, 0x00, 0xf8, 0x27, 0x00, 0x00, 0x04, 0x00, 0xa0, - 0x08, 0xa2, 0x21, 0xe4, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xd8, 0x03, - 0xfd, 0x00, 0x00, 0x87, 0x04, 0x00, 0x20, 0x00, 0x44, 0x08, 0x01, 0x1c, - 0x43, 0x61, 0x18, 0x82, 0x48, 0x10, 0x8a, 0x80, 0x80, 0x04, 0xcd, 0x41, - 0x40, 0x2e, 0x46, 0x0a, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x00, 0x40, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xd0, 0x42, 0x01, 0xc0, 0x81, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, - 0x3c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x0f, 0x03, 0x04, 0x00, 0x00, 0xa0, 0x00, 0xb8, 0xc3, 0x00, 0x81, + 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, 0x0e, 0xbe, 0x20, 0x02, + 0x00, 0xc0, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, + 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0xd0, 0x0f, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x80, 0x40, 0xcd, 0x41, + 0x40, 0x0e, 0x1a, 0x0e, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, - 0x40, 0x06, 0x00, 0x00, 0x00, 0xe8, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x40, 0x06, 0x00, 0x00, 0x00, 0xf8, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x9a, 0x0c, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, - 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, - 0x00, 0x00, 0x20, 0x50, 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, - 0x00, 0xe8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, - 0x40, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x9a, 0x09, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, + 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, + 0x00, 0x00, 0x20, 0x50, 0x20, 0x00, 0x00, 0x00, 0x40, 0x0a, 0x00, 0x00, + 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x01, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x4a, 0x06, 0x00, 0xf8, 0x27, 0x00, 0x00, 0x04, 0x00, 0xa0, + 0x20, 0x00, 0x89, 0x01, 0x40, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, + 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, + 0x0e, 0x1e, 0x1d, 0x02, 0x00, 0x40, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, + 0x00, 0x82, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x48, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, 0x80, 0x00, 0xcd, 0x41, + 0x40, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x12, 0x7c, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x40, 0x8d, 0x03, 0x40, 0x04, 0x1a, 0x0e, + 0x00, 0x10, 0x78, 0x01, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x02, 0x00, 0x80, + 0x40, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, + 0x00, 0x00, 0x20, 0x50, 0x00, 0x04, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, + 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x12, 0x7c, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x3c, 0x04, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x9a, 0x0e, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, + 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x12, 0x7c, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, + 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x04, 0x00, 0x00, + 0x3c, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, 0x0e, 0xbe, 0x20, 0x02, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, 0x0e, 0x5e, 0x20, 0x02, 0x00, 0x40, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, - 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x80, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, - 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x80, 0x00, 0xcd, 0x41, 0x40, 0x0e, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xcf, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x01, 0x8d, 0x83, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x20, 0x50, - 0x20, 0x00, 0x00, 0x00, 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, - 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xe8, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x04, 0x00, 0x80, 0x40, 0x14, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x0a, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, - 0x20, 0x00, 0x00, 0x00, 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x29, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x30, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0e, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x1c, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x20, 0x00, 0x00, 0x00, 0x3c, 0x0a, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x8c, 0xc3, - 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0x0c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x80, 0x00, 0x00, 0x0e, 0x1e, 0x1d, 0x02, 0x00, 0x80, 0x31, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, - 0x00, 0x00, 0xea, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x03, 0xe0, 0x0e, 0x07, 0x04, - 0x1f, 0x08, 0xa0, 0x00, 0xc0, 0xc3, 0x01, 0x81, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x04, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, 0x00, 0x00, 0x00, 0x60, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x05, 0x00, 0x00, 0x30, 0x00, - 0x40, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x4d, 0x41, - 0x41, 0x06, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x01, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x30, 0x12, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x20, 0x50, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x04, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, - 0x00, 0x08, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, + 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0xd0, 0x0f, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x80, 0x40, 0xcd, 0x41, + 0x40, 0x0e, 0x1a, 0x0e, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, - 0x00, 0xb8, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0xc8, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0xe0, 0x01, 0xa0, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, + 0x3c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, - 0x40, 0x06, 0x00, 0x00, 0x00, 0x18, 0x22, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x40, 0x06, 0x00, 0x00, 0x00, 0x28, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x08, 0x00, 0x00, - 0x30, 0x02, 0x9a, 0x0b, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, - 0x00, 0x00, 0x1b, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x13, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x19, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x01, 0x00, - 0xa0, 0x01, 0x00, 0xa0, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x9a, 0x04, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x20, 0x01, 0x60, 0x21, 0x22, 0x00, 0x8c, 0x03, 0x40, 0x0a, 0x1f, 0x01, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x0a, 0x20, 0xa8, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x43, 0x41, 0xf8, 0x3f, 0xb8, 0xc3, 0x00, 0x81, + 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x80, 0x41, 0x04, 0x00, 0x00, + 0x00, 0xc0, 0x01, 0x14, 0xe0, 0x11, 0x20, 0xa0, 0x00, 0x08, 0x00, 0x00, + 0x00, 0x00, 0xa2, 0x0b, 0x00, 0x80, 0x26, 0x00, 0x20, 0x04, 0x00, 0xa0, + 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, + 0x00, 0x82, 0x01, 0xa0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x05, + 0x00, 0xf8, 0x27, 0x00, 0x00, 0x04, 0x00, 0xa0, 0x08, 0xa2, 0x21, 0xe4, + 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xd8, 0x03, 0xfd, 0x00, 0x00, 0x87, + 0x04, 0x00, 0x20, 0x00, 0x44, 0x08, 0x01, 0x1c, 0x43, 0x61, 0x18, 0x82, + 0x48, 0x10, 0x8a, 0x80, 0x80, 0x04, 0xcd, 0x41, 0x40, 0x2e, 0x46, 0x0a, + 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, + 0x00, 0x40, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x42, 0x01, + 0xc0, 0x81, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x3c, 0x06, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, - 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, - 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, + 0x00, 0xe8, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x00, 0xf8, 0x23, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0c, + 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x0c, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, 0x00, 0xe8, 0x33, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xc0, + 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, + 0x04, 0x80, 0x00, 0x00, 0x0e, 0xbe, 0x20, 0x02, 0x00, 0x40, 0x31, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, + 0x00, 0x80, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x80, 0x00, 0xcd, 0x41, 0x40, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, + 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xd3, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x01, 0x8d, 0x83, + 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, 0x00, 0x00, 0x26, 0x00, + 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x20, 0x50, 0x20, 0x00, 0x00, 0x00, + 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x48, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x04, 0x00, 0x80, 0x40, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x0a, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, 0x20, 0x00, 0x00, 0x00, + 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x20, 0x01, 0x00, 0x00, 0x00, 0x10, 0x20, 0x05, - 0x00, 0x08, 0x30, 0x00, 0xe0, 0x07, 0x00, 0xa1, 0x00, 0x01, 0x00, 0x00, - 0x30, 0x11, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x02, 0x00, 0xa0, - 0x00, 0x00, 0x58, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xeb, - 0x1f, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x02, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x31, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x30, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0e, 0x00, 0x00, 0x26, 0x00, + 0xe0, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1c, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x40, 0x04, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x20, 0x00, 0x00, 0x00, 0x3c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x8c, 0xc3, 0x41, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x0c, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, + 0x0e, 0x1e, 0x1d, 0x02, 0x00, 0x80, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x00, 0xea, 0x3f, + 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x80, 0x00, 0x00, 0x00, 0x40, 0x0e, 0x00, 0x00, 0x00, 0xf8, 0x27, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x40, 0x10, 0x00, 0x00, - 0x26, 0x19, 0x87, 0x06, 0x00, 0x10, 0x34, 0x00, 0x60, 0x07, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x03, 0xe0, 0x0e, 0x07, 0x04, 0x1f, 0x08, 0xa0, 0x00, + 0xc0, 0xc3, 0x01, 0x81, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, 0x00, 0x00, 0x00, 0x60, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x04, 0x00, 0x00, 0x26, 0x00, + 0xe0, 0x04, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, + 0x01, 0x8e, 0x80, 0x02, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x44, 0x05, 0x00, 0x00, 0x30, 0x00, 0x40, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x80, 0x89, 0x06, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x11, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0xa0, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x4d, 0x41, 0x41, 0x06, 0x00, 0x00, + 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x01, 0x00, 0x00, + 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x02, 0x00, 0x00, 0x30, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x04, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, + 0x08, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, 0x00, 0xb8, 0x30, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, - 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, - 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, + 0x00, 0x18, 0x22, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x00, 0xe8, 0x23, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0d, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x08, 0x00, 0x00, 0x30, 0x02, 0x9a, 0x0b, + 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x1b, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc7, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x0a, - 0x00, 0x00, 0x30, 0x00, 0x40, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x0a, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0x00, 0x98, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc7, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc7, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, + 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x01, 0x00, 0xa0, 0x01, 0x00, 0xa0, + 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, + 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, + 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, + 0x40, 0x06, 0x00, 0x00, 0x00, 0xf8, 0x23, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, 0x00, 0x00, 0x26, 0x00, + 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x20, 0x01, 0x00, 0x00, 0x00, 0x10, 0x20, 0x05, 0x00, 0x08, 0x30, 0x00, + 0xe0, 0x07, 0x00, 0xa1, 0x00, 0x01, 0x00, 0x00, 0x30, 0x11, 0x00, 0x00, + 0x00, 0x00, 0x26, 0x00, 0xe0, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x58, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xeb, 0x1f, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x80, 0x00, 0x00, 0x00, + 0x40, 0x0e, 0x00, 0x00, 0x00, 0xf8, 0x27, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, + 0x00, 0x00, 0x00, 0x60, 0x40, 0x10, 0x00, 0x00, 0x26, 0x19, 0x87, 0x06, + 0x00, 0x10, 0x34, 0x00, 0x60, 0x07, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc7, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x4c, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x03, 0x00, 0x80, 0x01, 0xa0, + 0x08, 0x00, 0x00, 0x80, 0x89, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x01, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, + 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xc0, 0x01, 0x00, 0xa0, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Sep 30 19:59:58 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9895DC03E59; Fri, 30 Sep 2016 19:59:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5803CC4D; Fri, 30 Sep 2016 19:59:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UJxv7x011573; Fri, 30 Sep 2016 19:59:57 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UJxvJg011567; Fri, 30 Sep 2016 19:59:57 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201609301959.u8UJxvJg011567@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 30 Sep 2016 19:59:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306525 - in head/lib: . librss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 19:59:58 -0000 Author: adrian Date: Fri Sep 30 19:59:56 2016 New Revision: 306525 URL: https://svnweb.freebsd.org/changeset/base/306525 Log: Add librss, a simple wrapper around RSS APIs so applications can begin auto-tuning. I've used this in a handful of RSS test applications. It is just some very simple functions to fetch the RSS configuration, query the per-bucket CPU set, and mark sockets as local to an RSS bucket. It should be sufficient for both thread-based and process-based workloads. (Yes, I wrote a manpage.) This is based on some early RSS API and wrapper API work I did whilst I was at Netflix. Thanks to Netflix for the very original work that spawned this; thanks to Peter Grehan for his feedback about RSS APIs and thanks to Jack Vogel and Navdeep Parhar for the NIC-facing side of the APIs. These fed into the simple userland API I wrote up here. Reviewed by: gallatin Added: head/lib/librss/ head/lib/librss/Makefile (contents, props changed) head/lib/librss/librss.3 (contents, props changed) head/lib/librss/librss.c (contents, props changed) head/lib/librss/librss.h (contents, props changed) Modified: head/lib/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Fri Sep 30 19:46:50 2016 (r306524) +++ head/lib/Makefile Fri Sep 30 19:59:56 2016 (r306525) @@ -89,6 +89,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ libprocstat \ ${_libradius} \ librpcsvc \ + librss \ librt \ ${_librtld_db} \ libsbuf \ Added: head/lib/librss/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/librss/Makefile Fri Sep 30 19:59:56 2016 (r306525) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +PACKAGE= lib${LIB} +SHLIBDIR?= /lib + +.include + +LIB= rss +SHLIB_MAJOR= 1 + +SRCS=librss.c + +.include Added: head/lib/librss/librss.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/librss/librss.3 Fri Sep 30 19:59:56 2016 (r306525) @@ -0,0 +1,153 @@ +.\" $FreeBSD$ +.\" +.Dd September 29, 2016 +.Dt LIBRSS 3 +.Os +.Sh NAME +.Nm librss +.Nd Provide Receive-side scaling awareness to userland applications +.Sh LIBRARY +.Lb librss +.Sh SYNOPSIS +.In librss.h +.Ft struct rss_config * +.Fn rss_config_get "void" +.Ft void +.Fn rss_config_free "struct rss_config *cfg" +.Ft int +.Fn rss_config_get_bucket_count "struct rss_config *cfg" +.Ft int +.Fn rss_set_bucket_rebalance_cb "rss_bucket_rebalance_cb_t *cb" "void *cbdata" +.Ft int +.Fn rss_sock_set_bindmulti "int fd" "int af" "int val" +.Ft int +.Fn rss_sock_set_rss_bucket "int fd" "int af" "int rss_bucket" +.Ft int +.Fn rss_sock_set_recvrss "int fd" "int af" "int val" +.Sh DESCRIPTION +The +.Nm +library and the functions it provides are used for both fetching +the system RSS configuration and interacting with RSS aware +sockets. +.Pp +Applications will typically call +.Fn rss_config_get +to fetch the current RSS configuration from the system and perform +initial setup. +This typically involves spawning worker threads, one per RSS bucket, +and optionally binding them to the per-bucket CPU set. +.Pp +The +.Vt rss_config +struct is defined as: +.Bd -literal +struct rss_config { + int rss_ncpus; + int rss_nbuckets; + int rss_basecpu; + int *rss_bucket_map; +}; +.Ed +.Pp +Applications will typically use the +.Fn rss_config_get_bucket_count +function to fetch the number of RSS buckets, create one thread +per RSS bucket for RSS aware work, then one RSS aware socket to receive +UDP datagrams or TCP connections +in each particular RSS bucket / thread. +.Pp +The +.Fn rss_get_bucket_cpuset +function sets the given cpuset up for the given +RSS bucket and behaviour. +Typically applications will wish to just query for +.Vt RSS_BUCKET_TYPE_KERNEL_ALL +unless they wish to potentially setup different +worker threads for transmit and receive. +.Pp +The +.Vt rss_bucket_type_t +enum is defined as: +.Bd -literal +typedef enum { + RSS_BUCKET_TYPE_NONE = 0, + RSS_BUCKET_TYPE_KERNEL_ALL = 1, + RSS_BUCKET_TYPE_KERNEL_TX = 2, + RSS_BUCKET_TYPE_KERNEL_RX = 3, + RSS_BUCKET_TYPE_MAX = 3, +} rss_bucket_type_t; +.Ed +.Pp +The rebalance callback +.Vt rss_bucket_rebalance_cb_t +is defined as: +.Bd -literal +typedef void rss_bucket_rebalance_cb_t(void *arg); +.Ed +.Pp +The +.Fn rss_set_bucket_rebalance_cb +function sets an optional callback that will be called if the kernel +rebalances RSS buckets. +This is intended as a future expansion to rebalance buckets rather than +reprogram the RSS key, so typically the only work to be performed +is to rebind worker threads to an updated cpuset. +.Pp +Once RSS setup is completed, +.Fn rss_config_free +is called to free the RSS configuration structure. +.Pp +To make a +.Vt bind +socket RSS aware, the +.Fn rss_sock_set_bindmulti +function is used to enable or disable per-RSS bucket +behaviour. +The socket filedescriptor, address family and enable flag +.Vt val +are passed in. +.Pp +If +.Vt val +is set to 1, the socket can be placed in an RSS bucket and will only accept +datagrams (for UDP) or connections (for TCP) that are received for that +RSS bucket. +If set to 0, the socket is placed in the default PCB and will see +datagrams/connections that are not initially consumed by a PCB aware +socket. +.Pp +The +.Fn rss_sock_set_rss_bucket +function configures the RSS bucket which a socket belongs in. +Note that TCP sockets created by +.Xr accept 2 +will automatically be assigned to the RSS bucket. +.Pp +The +.Fn rss_sock_set_recvrss +function enables or disables receiving RSS related information +as socket options in. +.2 recvmsg +calls. +.Pp +When enabled, UDP datagrams will have a message with the +.Vt IP_RECVFLOWID +option indicating the 32-bit receive flowid as a uint32_t, +and the +.Vt IP_RECVRSSBUCKETID +option indicating the 32 bit RSS bucket id as a uint32_t. +.Sh ERRORS +The functions return either <0 or NULL as appropriate upon error. +.Sh SEE ALSO +.Xr PCBGROUP 9 +.Sh HISTORY +The +.Xr librss.3 +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.An Adrian Chadd Aq Mt adrian@FreeBSD.org +.Sh BUGS +There is currently no kernel mechanism to rebalance the RSS bucket to CPU +mapping, and so the callback mechanism is a no-op. Added: head/lib/librss/librss.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/librss/librss.c Fri Sep 30 19:59:56 2016 (r306525) @@ -0,0 +1,311 @@ +/* + * Copyright (c) 2016 Adrian Chadd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "librss.h" + +int +rss_sock_set_bindmulti(int fd, int af, int val) +{ + int opt; + socklen_t optlen; + int retval; + + /* Set bindmulti */ + opt = val; + optlen = sizeof(opt); + retval = setsockopt(fd, + af == AF_INET ? IPPROTO_IP : IPPROTO_IPV6, + af == AF_INET ? IP_BINDMULTI : IPV6_BINDMULTI, + &opt, + optlen); + if (retval < 0) { + warn("%s: setsockopt(IP_BINDMULTI)", __func__); + return (-1); + } + return (0); +} + +int +rss_sock_set_rss_bucket(int fd, int af, int rss_bucket) +{ + int opt; + socklen_t optlen; + int retval; + int f, p; + + switch (af) { + case AF_INET: + p = IPPROTO_IP; + f = IP_RSS_LISTEN_BUCKET; + break; + case AF_INET6: + p = IPPROTO_IPV6; + f = IPV6_RSS_LISTEN_BUCKET; + break; + default: + return (-1); + } + + /* Set RSS bucket */ + opt = rss_bucket; + optlen = sizeof(opt); + retval = setsockopt(fd, p, f, &opt, optlen); + if (retval < 0) { + warn("%s: setsockopt(IP_RSS_LISTEN_BUCKET)", __func__); + return (-1); + } + return (0); +} + +int +rss_sock_set_recvrss(int fd, int af, int val) +{ + int opt, retval; + socklen_t optlen; + int f1, f2, p; + + switch (af) { + case AF_INET: + p = IPPROTO_IP; + f1 = IP_RECVFLOWID; + f2 = IP_RECVRSSBUCKETID; + break; + case AF_INET6: + p = IPPROTO_IPV6; + f1 = IPV6_RECVFLOWID; + f2 = IPV6_RECVRSSBUCKETID; + break; + default: + return (-1); + } + + /* Enable/disable flowid */ + opt = val; + optlen = sizeof(opt); + retval = setsockopt(fd, p, f1, &opt, optlen); + if (retval < 0) { + warn("%s: setsockopt(IP_RECVFLOWID)", __func__); + return (-1); + } + + /* Enable/disable RSS bucket reception */ + opt = val; + optlen = sizeof(opt); + retval = setsockopt(fd, p, f2, &opt, optlen); + if (retval < 0) { + warn("%s: setsockopt(IP_RECVRSSBUCKETID)", __func__); + return (-1); + } + + return (0); +} + +static int +rss_getsysctlint(const char *s) +{ + int val, retval; + size_t rlen; + + rlen = sizeof(int); + retval = sysctlbyname(s, &val, &rlen, NULL, 0); + if (retval < 0) { + warn("sysctlbyname (%s)", s); + return (-1); + } + + return (val); +} + +static int +rss_getbucketmap(int *bucket_map, int nbuckets) +{ + /* XXX I'm lazy; so static string it is */ + char bstr[2048]; + int retval; + size_t rlen; + char *s, *ss; + int r, b, c; + + /* Paranoia */ + memset(bstr, '\0', sizeof(bstr)); + + rlen = sizeof(bstr) - 1; + retval = sysctlbyname("net.inet.rss.bucket_mapping", bstr, &rlen, NULL, 0); + if (retval < 0) { + warn("sysctlbyname (net.inet.rss.bucket_mapping)"); + return (-1); + } + + ss = bstr; + while ((s = strsep(&ss, " ")) != NULL) { + r = sscanf(s, "%d:%d", &b, &c); + if (r != 2) { + fprintf(stderr, "%s: string (%s) not parsable\n", + __func__, + s); + return (-1); + } + if (b > nbuckets) { + fprintf(stderr, "%s: bucket %d > nbuckets %d\n", + __func__, + b, + nbuckets); + return (-1); + } + /* XXX no maxcpu check */ + bucket_map[b] = c; + } + return (0); +} + +struct rss_config * +rss_config_get(void) +{ + struct rss_config *rc = NULL; + + rc = calloc(1, sizeof(*rc)); + if (rc == NULL) { + warn("%s: calloc", __func__); + goto error; + } + + rc->rss_ncpus = rss_getsysctlint("net.inet.rss.ncpus"); + if (rc->rss_ncpus < 0) { + fprintf(stderr, "%s: couldn't fetch net.inet.rss.ncpus\n", __func__); + goto error; + } + + rc->rss_nbuckets = rss_getsysctlint("net.inet.rss.buckets"); + if (rc->rss_nbuckets < 0) { + fprintf(stderr, "%s: couldn't fetch net.inet.rss.nbuckets\n", __func__); + goto error; + } + + rc->rss_basecpu = rss_getsysctlint("net.inet.rss.basecpu"); + if (rc->rss_basecpu< 0) { + fprintf(stderr, "%s: couldn't fetch net.inet.rss.basecpu\n", __func__); + goto error; + } + + rc->rss_bucket_map = calloc(rc->rss_nbuckets, sizeof(int)); + if (rc->rss_bucket_map == NULL) { + warn("%s: calloc (rss buckets; %d entries)", __func__, rc->rss_nbuckets); + goto error; + } + + if (rss_getbucketmap(rc->rss_bucket_map, rc->rss_nbuckets) != 0) { + fprintf(stderr, "%s: rss_getbucketmap failed\n", __func__); + goto error; + } + + return (rc); + +error: + if ((rc != NULL) && rc->rss_bucket_map) + free(rc->rss_bucket_map); + if (rc != NULL) + free(rc); + return (NULL); +} + +void +rss_config_free(struct rss_config *rc) +{ + + if ((rc != NULL) && rc->rss_bucket_map) + free(rc->rss_bucket_map); + if (rc != NULL) + free(rc); +} + +int +rss_config_get_bucket_count(struct rss_config *rc) +{ + + if (rc == NULL) + return (-1); + return (rc->rss_nbuckets); +} + +int +rss_get_bucket_cpuset(struct rss_config *rc, rss_bucket_type_t btype, + int bucket, cpuset_t *cs) +{ + + if (bucket < 0 || bucket >= rc->rss_nbuckets) { + errno = EINVAL; + return (-1); + } + + /* + * For now all buckets are the same, but eventually we'll want + * to allow administrators to set separate RSS cpusets for + * {kernel,user} {tx, rx} combinations. + */ + if (btype <= RSS_BUCKET_TYPE_NONE || btype > RSS_BUCKET_TYPE_MAX) { + errno = ENOTSUP; + return (-1); + } + + CPU_ZERO(cs); + CPU_SET(rc->rss_bucket_map[bucket], cs); + + return (0); +} + +int +rss_set_bucket_rebalance_cb(rss_bucket_rebalance_cb_t *cb, void *cbdata) +{ + + (void) cb; + (void) cbdata; + + /* + * For now there's no rebalance callback, so + * just return 0 and ignore it. + */ + return (0); +} Added: head/lib/librss/librss.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/librss/librss.h Fri Sep 30 19:59:56 2016 (r306525) @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2016 Adrian Chadd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __LIBRSS_H__ +#define __LIBRSS_H__ + +struct rss_config { + int rss_ncpus; + int rss_nbuckets; + int rss_basecpu; + int *rss_bucket_map; +}; + +typedef enum { + RSS_BUCKET_TYPE_NONE = 0, + RSS_BUCKET_TYPE_KERNEL_ALL = 1, + RSS_BUCKET_TYPE_KERNEL_TX = 2, + RSS_BUCKET_TYPE_KERNEL_RX = 3, + RSS_BUCKET_TYPE_MAX = 3, +} rss_bucket_type_t; + +typedef void rss_bucket_rebalance_cb_t(void *arg); + +/* + * Enable/disable whether to allow for multiple bind()s to the + * given PCB entry. + * + * This must be done before bind(). + */ +extern int rss_sock_set_bindmulti(int fd, int af, int val); + +/* + * Set the RSS bucket for the given file descriptor. + * + * This must be done before bind(). + */ +extern int rss_sock_set_rss_bucket(int fd, int af, int rss_bucket); + +/* + * Enable or disable receiving RSS/flowid information on + * received UDP frames. + */ +extern int rss_sock_set_recvrss(int fd, int af, int val); + +/* + * Fetch RSS configuration information. + */ +extern struct rss_config * rss_config_get(void); + +/* + * Free an RSS configuration structure. + */ +extern void rss_config_free(struct rss_config *rc); + +/* + * Return how many RSS buckets there are. + */ +extern int rss_config_get_bucket_count(struct rss_config *rc); + +/* + * Fetch the cpuset configuration for the given RSS bucket and + * type. + */ +extern int rss_get_bucket_cpuset(struct rss_config *rc, + rss_bucket_type_t btype, int bucket, cpuset_t *cs); + +/* + * Set a callback for bucket rebalancing. + * + * This will occur in a separate thread context rather than + * a signal handler. + */ +extern int rss_set_bucket_rebalance_cb(rss_bucket_rebalance_cb_t *cb, + void *cbdata); + +#endif /* __LIBRSS_H__ */ From owner-svn-src-head@freebsd.org Fri Sep 30 20:06:06 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57257C0404A; Fri, 30 Sep 2016 20:06:06 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3236A112; Fri, 30 Sep 2016 20:06:06 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UK65EJ015359; Fri, 30 Sep 2016 20:06:05 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UK65BY015358; Fri, 30 Sep 2016 20:06:05 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201609302006.u8UK65BY015358@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Fri, 30 Sep 2016 20:06:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306526 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 20:06:06 -0000 Author: sevan (doc committer) Date: Fri Sep 30 20:06:05 2016 New Revision: 306526 URL: https://svnweb.freebsd.org/changeset/base/306526 Log: Add NetBSD 5.1.4, 5.2.2 & 7.0.1 releases to the tree. Ammend the position of NetBSD 6.0.2 release in the tree as it came after OpenBSD[1] & DragonFlyBSD[2] release according to the release information. The entries for the 6.0.5 & 6.1.5 releases were incorrect (fetched from NetBSD CVS copy) and confirmed with history page[3] [1] http://www.openbsd.org/53.html [2] https://www.dragonflybsd.org/releases/ [3] http://netbsd.org/releases/formal.html#history Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8099 Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Fri Sep 30 19:59:56 2016 (r306525) +++ head/share/misc/bsd-family-tree Fri Sep 30 20:06:05 2016 (r306526) @@ -258,6 +258,9 @@ FreeBSD 5.2 | | | | 8.3 | | | | | | | | | | | | NetBSD | | | | | | | | 5.1.3 | | + | | | | | | | | | + | | | | | | NetBSD | | + | | | | | | 5.1.4 | | | | | | | | OpenBSD 5.1 | | | | Mac OS X | `----. | | | | | 10.8 | \ | | @@ -268,14 +271,17 @@ FreeBSD 5.2 | | | | | | | | | | | | | | | | | | | NetBSD | | | | | | | | | 5.2.1 | | + | | | | | | | | | | + | | | | | | | NetBSD | | + | | | | | | | 5.2.2 | | | | | | | | | | | | | | | | | \ | | | | | | | | NetBSD | | | | | | | | 6.0.1 | | - | | | | | | | | | + | | | | | | | OpenBSD 5.3 DragonFly 3.4.1 | | | | | | NetBSD | | | | | | | | 6.0.2 | | - | | | | | | | OpenBSD 5.3 DragonFly 3.4.1 + | | | | | | | | | | | | | | | NetBSD | | | | | | | | 6.0.3 | | | | | | | | | | | @@ -338,6 +344,7 @@ FreeBSD 5.2 | | | | | | | DragonFly 4.4.1 | FreeBSD | | OpenBSD 5.9 | | 10.3 | | | | + | | NetBSD 7.0.1 | | | | | | DragonFly 4.6.0 *--FreeBSD | | OpenBSD 6.0 | | 11.0 | | | | @@ -661,12 +668,14 @@ Mac OS X 10.9 2013-10-22 [APL] OpenBSD 5.4 2013-11-01 [OBD] DragonFly 3.6.0 2013-11-25 [DFB] FreeBSD 10.0 2014-01-20 [FBD] -NetBSD 6.0.4 2014-01-27 [NBD] -NetBSD 6.1.3 2014-01-27 [NBD] +NetBSD 5.1.4 2014-01-25 [NBD] +NetBSD 5.2.2 2014-01-25 [NBD] +NetBSD 6.0.4 2014-01-25 [NBD] +NetBSD 6.1.3 2014-01-25 [NBD] DragonFly 3.6.1 2014-02-22 [DFB] DragonFly 3.6.2 2014-04-10 [DFB] -NetBSD 6.0.5 2014-04-19 [NDB] -NetBSD 6.1.4 2014-04-19 [NDB] +NetBSD 6.0.5 2014-04-12 [NDB] +NetBSD 6.1.4 2014-04-12 [NDB] OpenBSD 5.5 2014-05-01 [OBD] DragonFly 3.8.0 2014-06-04 [DFB] DragonFly 3.8.1 2014-06-16 [DFB] @@ -691,6 +700,7 @@ OpenBSD 5.8 2015-10-18 [OBD] DragonFly 4.4.1 2015-12-07 [DFB] OpenBSD 5.9 2016-03-29 [OBD] FreeBSD 10.3 2016-04-04 [FBD] +NetBSD 7.0.1 2016-05-22 [NBD] DragonFly 4.6.0 2016-08-02 [DFB] OpenBSD 6.0 2016-09-01 [OBD] From owner-svn-src-head@freebsd.org Fri Sep 30 20:20:08 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC2A8C0421E; Fri, 30 Sep 2016 20:20:08 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D314940; Fri, 30 Sep 2016 20:20:08 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UKK78Z019280; Fri, 30 Sep 2016 20:20:07 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UKK7Db019277; Fri, 30 Sep 2016 20:20:07 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609302020.u8UKK7Db019277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 30 Sep 2016 20:20:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306527 - head/lib/msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 20:20:08 -0000 Author: emaste Date: Fri Sep 30 20:20:07 2016 New Revision: 306527 URL: https://svnweb.freebsd.org/changeset/base/306527 Log: libm: remove unused variables for LDBL_MANT_DIG != 113 Sponsored by: The FreeBSD Foundation Modified: head/lib/msun/src/e_coshl.c head/lib/msun/src/e_sinhl.c head/lib/msun/src/s_tanhl.c Modified: head/lib/msun/src/e_coshl.c ============================================================================== --- head/lib/msun/src/e_coshl.c Fri Sep 30 20:06:05 2016 (r306526) +++ head/lib/msun/src/e_coshl.c Fri Sep 30 20:20:07 2016 (r306527) @@ -86,7 +86,9 @@ long double coshl(long double x) { long double hi,lo,x2,x4; +#if LDBL_MANT_DIG == 113 double dx2; +#endif uint16_t ix; GET_LDBL_EXPSIGN(ix,x); Modified: head/lib/msun/src/e_sinhl.c ============================================================================== --- head/lib/msun/src/e_sinhl.c Fri Sep 30 20:06:05 2016 (r306526) +++ head/lib/msun/src/e_sinhl.c Fri Sep 30 20:20:07 2016 (r306527) @@ -85,7 +85,10 @@ long double sinhl(long double x) { long double hi,lo,x2,x4; - double dx2,s; +#if LDBL_MANT_DIG == 113 + double dx2; +#endif + double s; int16_t ix,jx; GET_LDBL_EXPSIGN(jx,x); Modified: head/lib/msun/src/s_tanhl.c ============================================================================== --- head/lib/msun/src/s_tanhl.c Fri Sep 30 20:06:05 2016 (r306526) +++ head/lib/msun/src/s_tanhl.c Fri Sep 30 20:20:07 2016 (r306527) @@ -113,7 +113,9 @@ long double tanhl(long double x) { long double hi,lo,s,x2,x4,z; +#if LDBL_MANT_DIG == 113 double dx2; +#endif int16_t jx,ix; GET_LDBL_EXPSIGN(jx,x); From owner-svn-src-head@freebsd.org Fri Sep 30 20:35:14 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2933FC045FE; Fri, 30 Sep 2016 20:35:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB6C8134D; Fri, 30 Sep 2016 20:35:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UKZDY0026984; Fri, 30 Sep 2016 20:35:13 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UKZDHf026983; Fri, 30 Sep 2016 20:35:13 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201609302035.u8UKZDHf026983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 30 Sep 2016 20:35:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306528 - head/usr.sbin/sesutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 20:35:14 -0000 Author: mav Date: Fri Sep 30 20:35:12 2016 New Revision: 306528 URL: https://svnweb.freebsd.org/changeset/base/306528 Log: Fix `sesutil fault` operation. Fault and ident bits are located in different control bytes, so previous code was just doing nothing, writing into reserved bit. MFC after: 1 week Modified: head/usr.sbin/sesutil/sesutil.c Modified: head/usr.sbin/sesutil/sesutil.c ============================================================================== --- head/usr.sbin/sesutil/sesutil.c Fri Sep 30 20:20:07 2016 (r306527) +++ head/usr.sbin/sesutil/sesutil.c Fri Sep 30 20:35:12 2016 (r306528) @@ -118,10 +118,16 @@ do_led(int fd, unsigned int idx, bool on err(EXIT_FAILURE, "ENCIOC_GETELMSTAT"); } o.cstat[0] |= 0x80; - if (onoff) { - o.cstat[2] |= (setfault ? 0x20 : 0x02); + if (setfault) { + if (onoff) + o.cstat[3] |= 0x20; + else + o.cstat[3] &= 0xdf; } else { - o.cstat[2] &= (setfault ? 0xdf : 0xfd); + if (onoff) + o.cstat[2] |= 0x02; + else + o.cstat[2] &= 0xfd; } if (ioctl(fd, ENCIOC_SETELMSTAT, (caddr_t) &o) < 0) { From owner-svn-src-head@freebsd.org Fri Sep 30 21:00:11 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 360AAC049B6; Fri, 30 Sep 2016 21:00:11 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0119B1CFF; Fri, 30 Sep 2016 21:00:10 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UL0AH9034817; Fri, 30 Sep 2016 21:00:10 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UL0A3w034815; Fri, 30 Sep 2016 21:00:10 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201609302100.u8UL0A3w034815@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 30 Sep 2016 21:00:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306529 - head/sys/cam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 21:00:11 -0000 Author: markj Date: Fri Sep 30 21:00:09 2016 New Revision: 306529 URL: https://svnweb.freebsd.org/changeset/base/306529 Log: cam_periph_ccbwait could return while ccb in progress In cam_periph_runccb, cam_periph_ccbwait was using the value of the ccb pinfo.index and status fields to determine whether the ccb was done, but these fields are updated without a contending lock and could glitch into states that would be erroneously interpreted as done. Instead, have cam_periph_ccbwait look for the explicit result of the function cam_periph_done. Submitted by: Ryan Libby Reviewed by: mav MFC after: 3 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D8020 Modified: head/sys/cam/cam_periph.c head/sys/cam/cam_periph.h Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Fri Sep 30 20:35:12 2016 (r306528) +++ head/sys/cam/cam_periph.c Fri Sep 30 21:00:09 2016 (r306529) @@ -975,16 +975,6 @@ cam_periph_unmapmem(union ccb *ccb, stru PRELE(curproc); } -void -cam_periph_ccbwait(union ccb *ccb) -{ - - if ((ccb->ccb_h.pinfo.index != CAM_UNQUEUED_INDEX) - || ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_INPROG)) - xpt_path_sleep(ccb->ccb_h.path, &ccb->ccb_h.cbfcnp, PRIBIO, - "cbwait", 0); -} - int cam_periph_ioctl(struct cam_periph *periph, u_long cmd, caddr_t addr, int (*error_routine)(union ccb *ccb, @@ -1048,13 +1038,38 @@ cam_periph_ioctl(struct cam_periph *peri } static void +cam_periph_done_panic(struct cam_periph *periph, union ccb *done_ccb) +{ + + panic("%s: already done with ccb %p", __func__, done_ccb); +} + +static void cam_periph_done(struct cam_periph *periph, union ccb *done_ccb) { /* Caller will release the CCB */ + xpt_path_assert(done_ccb->ccb_h.path, MA_OWNED); + done_ccb->ccb_h.cbfcnp = cam_periph_done_panic; wakeup(&done_ccb->ccb_h.cbfcnp); } +static void +cam_periph_ccbwait(union ccb *ccb) +{ + + if ((ccb->ccb_h.func_code & XPT_FC_QUEUED) != 0) { + while (ccb->ccb_h.cbfcnp != cam_periph_done_panic) + xpt_path_sleep(ccb->ccb_h.path, &ccb->ccb_h.cbfcnp, + PRIBIO, "cbwait", 0); + } + KASSERT(ccb->ccb_h.pinfo.index == CAM_UNQUEUED_INDEX && + (ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_INPROG, + ("%s: proceeding with incomplete ccb: ccb=%p, func_code=%#x, " + "status=%#x, index=%d", __func__, ccb, ccb->ccb_h.func_code, + ccb->ccb_h.status, ccb->ccb_h.pinfo.index)); +} + int cam_periph_runccb(union ccb *ccb, int (*error_routine)(union ccb *ccb, @@ -1069,6 +1084,9 @@ cam_periph_runccb(union ccb *ccb, starttime = NULL; xpt_path_assert(ccb->ccb_h.path, MA_OWNED); + KASSERT((ccb->ccb_h.flags & CAM_UNLOCKED) == 0, + ("%s: ccb=%p, func_code=%#x, flags=%#x", __func__, ccb, + ccb->ccb_h.func_code, ccb->ccb_h.flags)); /* * If the user has supplied a stats structure, and if we understand @@ -1088,9 +1106,10 @@ cam_periph_runccb(union ccb *ccb, cam_periph_ccbwait(ccb); if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) error = 0; - else if (error_routine != NULL) + else if (error_routine != NULL) { + ccb->ccb_h.cbfcnp = cam_periph_done; error = (*error_routine)(ccb, camflags, sense_flags); - else + } else error = 0; } while (error == ERESTART); Modified: head/sys/cam/cam_periph.h ============================================================================== --- head/sys/cam/cam_periph.h Fri Sep 30 20:35:12 2016 (r306528) +++ head/sys/cam/cam_periph.h Fri Sep 30 21:00:09 2016 (r306529) @@ -166,7 +166,6 @@ void cam_periph_unmapmem(union ccb *ccb struct cam_periph_map_info *mapinfo); union ccb *cam_periph_getccb(struct cam_periph *periph, u_int32_t priority); -void cam_periph_ccbwait(union ccb *ccb); int cam_periph_runccb(union ccb *ccb, int (*error_routine)(union ccb *ccb, cam_flags camflags, From owner-svn-src-head@freebsd.org Fri Sep 30 21:04:58 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04DCAC04B0B; Fri, 30 Sep 2016 21:04:58 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7DE41C9; Fri, 30 Sep 2016 21:04:57 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UL4uAK038657; Fri, 30 Sep 2016 21:04:56 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UL4uaS038654; Fri, 30 Sep 2016 21:04:56 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609302104.u8UL4uaS038654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Fri, 30 Sep 2016 21:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306530 - in head/sys/dev: evdev usb/input X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 21:04:58 -0000 Author: gonzo Date: Fri Sep 30 21:04:56 2016 New Revision: 306530 URL: https://svnweb.freebsd.org/changeset/base/306530 Log: Declare a module for evdev and add dependency to ukbd(4) and ums(4) Prepare for making evdev a module. "Pure" evdev device drivers (like touchscreen) and evdev itself can be built as a modules regardless of "options EVDEV" in kernel config. So if people does not require evdev functionality in hybrid drivers like ums and ukbd they can, for instance, kldload evdev and utouchscreen to run FreeBSD in kiosk mode. Modified: head/sys/dev/evdev/evdev.c head/sys/dev/usb/input/ukbd.c head/sys/dev/usb/input/ums.c Modified: head/sys/dev/evdev/evdev.c ============================================================================== --- head/sys/dev/evdev/evdev.c Fri Sep 30 21:00:09 2016 (r306529) +++ head/sys/dev/evdev/evdev.c Fri Sep 30 21:04:56 2016 (r306530) @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -916,3 +917,23 @@ evdev_stop_repeat(struct evdev_dev *evde evdev->ev_rep_key = KEY_RESERVED; } } + +static int +evdev_modevent(module_t mod, int type, void *unused) +{ + switch (type) { + case MOD_LOAD: + return 0; + case MOD_UNLOAD: + return 0; + } + return EINVAL; +} + +static moduledata_t evdev_mod = { + "evdev", + evdev_modevent, + 0 +}; +DECLARE_MODULE(evdev, evdev_mod, SI_SUB_DRIVERS, SI_ORDER_ANY); +MODULE_VERSION(evdev, 1); Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Fri Sep 30 21:00:09 2016 (r306529) +++ head/sys/dev/usb/input/ukbd.c Fri Sep 30 21:04:56 2016 (r306530) @@ -2300,5 +2300,8 @@ static driver_t ukbd_driver = { DRIVER_MODULE(ukbd, uhub, ukbd_driver, ukbd_devclass, ukbd_driver_load, 0); MODULE_DEPEND(ukbd, usb, 1, 1, 1); +#ifdef EVDEV +MODULE_DEPEND(ukbd, evdev, 1, 1, 1); +#endif MODULE_VERSION(ukbd, 1); USB_PNP_HOST_INFO(ukbd_devs); Modified: head/sys/dev/usb/input/ums.c ============================================================================== --- head/sys/dev/usb/input/ums.c Fri Sep 30 21:00:09 2016 (r306529) +++ head/sys/dev/usb/input/ums.c Fri Sep 30 21:04:56 2016 (r306530) @@ -1199,5 +1199,8 @@ static driver_t ums_driver = { DRIVER_MODULE(ums, uhub, ums_driver, ums_devclass, NULL, 0); MODULE_DEPEND(ums, usb, 1, 1, 1); +#ifdef EVDEV +MODULE_DEPEND(ums, evdev, 1, 1, 1); +#endif MODULE_VERSION(ums, 1); USB_PNP_HOST_INFO(ums_devs); From owner-svn-src-head@freebsd.org Fri Sep 30 21:13:20 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80491C04D72; Fri, 30 Sep 2016 21:13:20 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50B20B57; Fri, 30 Sep 2016 21:13:20 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8ULDJ10042386; Fri, 30 Sep 2016 21:13:19 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8ULDJBU042385; Fri, 30 Sep 2016 21:13:19 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609302113.u8ULDJBU042385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Fri, 30 Sep 2016 21:13:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306531 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 21:13:20 -0000 Author: gonzo Date: Fri Sep 30 21:13:19 2016 New Revision: 306531 URL: https://svnweb.freebsd.org/changeset/base/306531 Log: Add dependency to evdev module (if required) Modified: head/sys/arm/ti/ti_adc.c Modified: head/sys/arm/ti/ti_adc.c ============================================================================== --- head/sys/arm/ti/ti_adc.c Fri Sep 30 21:04:56 2016 (r306530) +++ head/sys/arm/ti/ti_adc.c Fri Sep 30 21:13:19 2016 (r306531) @@ -958,3 +958,6 @@ static devclass_t ti_adc_devclass; DRIVER_MODULE(ti_adc, simplebus, ti_adc_driver, ti_adc_devclass, 0, 0); MODULE_VERSION(ti_adc, 1); MODULE_DEPEND(ti_adc, simplebus, 1, 1, 1); +#ifdef EVDEV +MODULE_DEPEND(ti_adc, evdev, 1, 1, 1); +#endif From owner-svn-src-head@freebsd.org Fri Sep 30 21:14:43 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2BEAC04E83; Fri, 30 Sep 2016 21:14:43 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3329DEC; Fri, 30 Sep 2016 21:14:43 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8ULEg0q042600; Fri, 30 Sep 2016 21:14:42 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8ULEg0X042599; Fri, 30 Sep 2016 21:14:42 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201609302114.u8ULEg0X042599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Fri, 30 Sep 2016 21:14:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306532 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 21:14:43 -0000 Author: gonzo Date: Fri Sep 30 21:14:42 2016 New Revision: 306532 URL: https://svnweb.freebsd.org/changeset/base/306532 Log: Add dependency to evdev module Modified: head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c Fri Sep 30 21:13:19 2016 (r306531) +++ head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c Fri Sep 30 21:14:42 2016 (r306532) @@ -335,3 +335,4 @@ static driver_t ft5406ts_driver = { }; DRIVER_MODULE(ft5406ts, ofwbus, ft5406ts_driver, ft5406ts_devclass, 0, 0); +MODULE_DEPEND(ft5406ts, evdev, 1, 1, 1); From owner-svn-src-head@freebsd.org Fri Sep 30 22:28:22 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 278D9C04186; Fri, 30 Sep 2016 22:28:22 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBDCB176F; Fri, 30 Sep 2016 22:28:21 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UMSLGA068685; Fri, 30 Sep 2016 22:28:21 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UMSLuQ068684; Fri, 30 Sep 2016 22:28:21 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201609302228.u8UMSLuQ068684@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Fri, 30 Sep 2016 22:28:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306534 - head/lib/libstand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 22:28:22 -0000 Author: tsoome Date: Fri Sep 30 22:28:20 2016 New Revision: 306534 URL: https://svnweb.freebsd.org/changeset/base/306534 Log: cd9660_open should check for padding The libstand cd9660 reader code must check for extents having padding. Reviewed by: jhb Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D8101 Modified: head/lib/libstand/cd9660.c Modified: head/lib/libstand/cd9660.c ============================================================================== --- head/lib/libstand/cd9660.c Fri Sep 30 22:05:47 2016 (r306533) +++ head/lib/libstand/cd9660.c Fri Sep 30 22:28:20 2016 (r306534) @@ -353,7 +353,15 @@ cd9660_open(const char *path, struct ope dp = (struct iso_directory_record *) ((char *) dp + isonum_711(dp->length)); - off += isonum_711(dp->length); + + /* if the new block is zero length, its padding */ + if (isonum_711(dp->length) == 0) { + /* skip to next block, if any */ + off = boff * ISO_DEFAULT_BLOCK_SIZE; + continue; + } else { + off += isonum_711(dp->length); + } } if (off >= dsize) { rc = ENOENT; From owner-svn-src-head@freebsd.org Fri Sep 30 23:01:38 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 854C9C04785; Fri, 30 Sep 2016 23:01:38 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BCCD1FC8; Fri, 30 Sep 2016 23:01:38 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UN1bNb083046; Fri, 30 Sep 2016 23:01:37 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UN1bde083045; Fri, 30 Sep 2016 23:01:37 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201609302301.u8UN1bde083045@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Fri, 30 Sep 2016 23:01:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306537 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 23:01:38 -0000 Author: cem Date: Fri Sep 30 23:01:37 2016 New Revision: 306537 URL: https://svnweb.freebsd.org/changeset/base/306537 Log: open.2: Document Capsicum behavior Document open(2) and openat(2) behavior in Capsicum capability mode. Reviewed by: ed (previous version), emaste, rwatson (previous version), wblock Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D7947 Modified: head/lib/libc/sys/open.2 Modified: head/lib/libc/sys/open.2 ============================================================================== --- head/lib/libc/sys/open.2 Fri Sep 30 22:40:58 2016 (r306536) +++ head/lib/libc/sys/open.2 Fri Sep 30 23:01:37 2016 (r306537) @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd April 2, 2015 +.Dd September 30, 2016 .Dt OPEN 2 .Os .Sh NAME @@ -95,6 +95,28 @@ parameter, the current working directory and the behavior is identical to a call to .Fn open . .Pp +In +.Xr capsicum 4 +capability mode, +.Fn open +is not permitted. +The +.Fa path +argument to +.Fn openat +must be strictly relative to a file descriptor +.Fa fd , +as defined in +.Pa sys/kern/vfs_lookup.c . +.Fa path +must not be an absolute path and must not contain ".." components. +Additionally, no symbolic link in +.Fa path +may contain ".." components either. +.Fa fd +must not be +.Dv AT_FDCWD . +.Pp The flags specified are formed by .Em or Ns 'ing the following values @@ -447,8 +469,18 @@ nor a file descriptor associated with a .It Bq Er ENOTDIR .Dv O_DIRECTORY is specified and the file is not a directory. +.It Bq Er ECAPMODE +.Dv AT_FDCWD +is specified and the process is in capability mode. +.It Bq Er ECAPMODE +.Fn open +was called and the process is in capability mode. +.It Bq Er ENOTCAPABLE +.Fa path +is an absolute path or contained "..". .El .Sh SEE ALSO +.Xr capsicum 4 , .Xr chmod 2 , .Xr close 2 , .Xr dup 2 , From owner-svn-src-head@freebsd.org Fri Sep 30 23:19:09 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B9E0C04B42; Fri, 30 Sep 2016 23:19:09 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DE17AB1; Fri, 30 Sep 2016 23:19:09 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UNJ81V087618; Fri, 30 Sep 2016 23:19:08 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UNJ8oh087617; Fri, 30 Sep 2016 23:19:08 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201609302319.u8UNJ8oh087617@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Fri, 30 Sep 2016 23:19:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306538 - head/lib/libstand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 23:19:09 -0000 Author: tsoome Date: Fri Sep 30 23:19:08 2016 New Revision: 306538 URL: https://svnweb.freebsd.org/changeset/base/306538 Log: cstyle fix of cd9660_open in libstand rS306534 did create bad cstyle by my mistake, correcting it. Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D8103 Modified: head/lib/libstand/cd9660.c Modified: head/lib/libstand/cd9660.c ============================================================================== --- head/lib/libstand/cd9660.c Fri Sep 30 23:01:37 2016 (r306537) +++ head/lib/libstand/cd9660.c Fri Sep 30 23:19:08 2016 (r306538) @@ -356,11 +356,11 @@ cd9660_open(const char *path, struct ope /* if the new block is zero length, its padding */ if (isonum_711(dp->length) == 0) { - /* skip to next block, if any */ - off = boff * ISO_DEFAULT_BLOCK_SIZE; - continue; + /* skip to next block, if any */ + off = boff * ISO_DEFAULT_BLOCK_SIZE; + continue; } else { - off += isonum_711(dp->length); + off += isonum_711(dp->length); } } if (off >= dsize) { From owner-svn-src-head@freebsd.org Fri Sep 30 23:20:13 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A4ECC04BA8; Fri, 30 Sep 2016 23:20:13 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-lf0-x22f.google.com (mail-lf0-x22f.google.com [IPv6:2a00:1450:4010:c07::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8EA50C47; Fri, 30 Sep 2016 23:20:12 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by mail-lf0-x22f.google.com with SMTP id l131so118585541lfl.2; Fri, 30 Sep 2016 16:20:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XjO1oND5mXDoPMFRUAIE/nCiNfUDkI4xagemrlSBjAA=; b=bAlXp3SvzHwlig7n+P5QVkpE163QS9tEcN97Fygf4+pPTxmjB+6bwxz7yQg7A/MavJ 1Ko0+XKPv2DTEvgDuJ99JfysBrEqaLiKHpcpmdnpGjxzqqQoaEHUzIAEAOhyAYSQ8YwE IDo5zXTmC2CVljyzA7gQlBns8s4YiUundslPSHu2mqyM+1MraOrg9MHngFqcUih/+p8f SFHNkxojEY8juuMoSpvJ6EGSFBXF80jKAkpvfN8WaL3XxBWbHYd0Tf8/rcFadATLM53+ lHsbNe+XaetAR4iEGeVOFQEdILtMil8Q+ydO2dgNbpbTS6Iy3kOiO3qFRutrU2ghAM+c gQYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=XjO1oND5mXDoPMFRUAIE/nCiNfUDkI4xagemrlSBjAA=; b=PxFUlZq2AWnTKF92TpBvg0n7utsYcWzDQ1iJS3RcQ0gFz5I/AQu4nklA0A3l45wsxq Tf4SSEkFdG/7zel5XeSmcX6zgjRdiGjbcO5mlII36T0saXoAhyEEDQTN0nykKm8tiEQn WX5q4BxnQ1dm1DMV0TiVdNW0TJvrHmnAu+2khuelf5SESeThIEpD28Ny9zseJAHl70tf KTea+rivjDtxYz7OUzktuZM2CDiyMKbMDg3pkgMYAL/Shll4HmzDLBWBAteKnteRio2e 4e9yMdefSDvUGZ5PoA/lrRR5Mebf+Ti56OHy7F/GzyRtO8vPMvXo/mOsaos0Q/QFfZXH 64rw== X-Gm-Message-State: AA6/9Rn+E08MZ6sVVCrzLXli+ltxA+mrG2ECYO7xncfedSh9exM/cfJzsyD+eU22c5Q9Yg== X-Received: by 10.46.32.205 with SMTP id g74mr3820940lji.1.1475277609923; Fri, 30 Sep 2016 16:20:09 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id u68sm1804613lfg.33.2016.09.30.16.20.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Sep 2016 16:20:09 -0700 (PDT) Sender: Baptiste Daroussin Date: Sat, 1 Oct 2016 01:20:08 +0200 From: Baptiste Daroussin To: David C Somayajulu Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306515 - head/sys/dev/bxe Message-ID: <20160930232007.i57uir32aynbrljy@ivaldir.etoilebsd.net> References: <201609301808.u8UI8H21066968@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dnvrzbyiwp73yw2g" Content-Disposition: inline In-Reply-To: <201609301808.u8UI8H21066968@repo.freebsd.org> User-Agent: Mutt/1.6.2-neo (2016-08-08) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 23:20:13 -0000 --dnvrzbyiwp73yw2g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 30, 2016 at 06:08:17PM +0000, David C Somayajulu wrote: > Author: davidcs > Date: Fri Sep 30 18:08:16 2016 > New Revision: 306515 > URL: https://svnweb.freebsd.org/changeset/base/306515 >=20 > Log: > Revert commit > r306284 - Fixes for issues under high workloads > =20 > Will fix and recommit patch >=20 > Modified: > head/sys/dev/bxe/bxe.c > head/sys/dev/bxe/bxe.h > head/sys/dev/bxe/bxe_stats.h >=20 Thanks! Best regards, Bapt --dnvrzbyiwp73yw2g Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX7vMiAAoJEGOJi9zxtz5aD34P/RjBDA+P4RncTh4FMHLKHgKy QxZrR73Xwnc+9WU3pw5bVZ6FYsxYoWuagypLURRw7rbNRmvZz1M/thTql2l+8aU3 +NIitS99RlOutR5mI7UbYNBcPiSFf09ma0ydhrcXS5drsi9l+nbDc3+uOkZJMkAj kNnxPIxTGOtx+3L+ezzyN3XWDnL44H279s/Lywg7lLrCNyc7RdI8eqjJIK5/6vRv F2AecKTknC4pw1eCbK5D6jDaSYePrpWDu4XVVPiGU+TQYRtO/EkV9P5Tqkv7V8Tq /yle8t6++iOp+BDwNHCG/Cv/h3jP5XecV/+2Cb1htki9yQ3MHKi2MSbASDIwU3gH kpk3M9R5uZPcau7dmpZyMyf++NwykCPARqYGu3tNi89l61wtY19dbU89z8K8pS2A ehezJVItA61XjauKoUEOXsrjRuX50757MDdjx0AA776QP6QGuHcbccnSGShvexVs l2GW0CT/Wo2xbVIjGDThEZ82qH+RMlr3SjOCO5QZToKGUC+GQNsGDOcXCcy5LdB1 UpTsUw0Nuow+WuViDs8W4wDQanKkAwRAE+LVih3XQXQf728wFDn8Iy6vDsM7TVq7 EfYQr9D30GyjW6ZpPoYOtyej46V4w8KHy/YaP0rAbzISeDaIqyu8cl86vsLWJ1kt bT2RI4bkG+X5peJfkWN2 =NymC -----END PGP SIGNATURE----- --dnvrzbyiwp73yw2g-- From owner-svn-src-head@freebsd.org Fri Sep 30 23:38:27 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1BFBC04210; Fri, 30 Sep 2016 23:38:27 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6ACD71965; Fri, 30 Sep 2016 23:38:27 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8UNcQrk095180; Fri, 30 Sep 2016 23:38:26 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8UNcQoW095179; Fri, 30 Sep 2016 23:38:26 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201609302338.u8UNcQoW095179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 30 Sep 2016 23:38:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306541 - head/contrib/dma X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 23:38:27 -0000 Author: bapt Date: Fri Sep 30 23:38:26 2016 New Revision: 306541 URL: https://svnweb.freebsd.org/changeset/base/306541 Log: Import dma 20160929 MFC after: 1 week Modified: head/contrib/dma/dma-mbox-create.c Directory Properties: head/contrib/dma/ (props changed) Modified: head/contrib/dma/dma-mbox-create.c ============================================================================== --- head/contrib/dma/dma-mbox-create.c Fri Sep 30 23:36:28 2016 (r306540) +++ head/contrib/dma/dma-mbox-create.c Fri Sep 30 23:38:26 2016 (r306541) @@ -89,9 +89,7 @@ main(int argc, char **argv) struct group *gr; uid_t user_uid; gid_t mail_gid; - int error; - char fn[PATH_MAX+1]; - int f; + int f, maildirfd; openlog("dma-mbox-create", 0, LOG_MAIL); @@ -131,26 +129,22 @@ main(int argc, char **argv) if (!pw) logfail(EX_NOUSER, "cannot find user `%s'", user); - user_uid = pw->pw_uid; + maildirfd = open(_PATH_MAILDIR, O_RDONLY); + if (maildirfd < 0) + logfail(EX_NOINPUT, "cannot open maildir %s", _PATH_MAILDIR); - error = snprintf(fn, sizeof(fn), "%s/%s", _PATH_MAILDIR, user); - if (error < 0 || (size_t)error >= sizeof(fn)) { - if (error >= 0) { - errno = 0; - logfail(EX_USAGE, "mbox path too long"); - } - logfail(EX_CANTCREAT, "cannot build mbox path for `%s/%s'", _PATH_MAILDIR, user); - } + user_uid = pw->pw_uid; - f = open(fn, O_RDONLY|O_CREAT|O_NOFOLLOW, 0600); + f = openat(maildirfd, user, O_RDONLY|O_CREAT|O_NOFOLLOW, 0600); if (f < 0) - logfail(EX_NOINPUT, "cannt open mbox `%s'", fn); + logfail(EX_NOINPUT, "cannot open mbox `%s'", user); if (fchown(f, user_uid, mail_gid)) - logfail(EX_OSERR, "cannot change owner of mbox `%s'", fn); + logfail(EX_OSERR, "cannot change owner of mbox `%s'", user); if (fchmod(f, 0620)) - logfail(EX_OSERR, "cannot change permissions of mbox `%s'", fn); + logfail(EX_OSERR, "cannot change permissions of mbox `%s'", + user); /* file should be present with the right owner and permissions */ From owner-svn-src-head@freebsd.org Sat Oct 1 00:14:03 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB5B8C04CAC; Sat, 1 Oct 2016 00:14:03 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85698E5C; Sat, 1 Oct 2016 00:14:03 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u910E2RR010581; Sat, 1 Oct 2016 00:14:02 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u910E1Gu010568; Sat, 1 Oct 2016 00:14:01 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201610010014.u910E1Gu010568@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 1 Oct 2016 00:14:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306544 - in head/contrib/libucl: . haskell include m4 python python/src python/tests src tests/schema X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 00:14:03 -0000 Author: bapt Date: Sat Oct 1 00:14:01 2016 New Revision: 306544 URL: https://svnweb.freebsd.org/changeset/base/306544 Log: Import libucl 20160812 Added: head/contrib/libucl/haskell/ - copied from r306543, vendor/libucl/dist/haskell/ head/contrib/libucl/m4/gcov.m4 - copied unchanged from r306543, vendor/libucl/dist/m4/gcov.m4 head/contrib/libucl/python/tests/ - copied from r306543, vendor/libucl/dist/python/tests/ Deleted: head/contrib/libucl/python/test.sh head/contrib/libucl/python/test_uclmodule.py Modified: head/contrib/libucl/CMakeLists.txt head/contrib/libucl/Makefile.unix head/contrib/libucl/Makefile.w32 head/contrib/libucl/README.md head/contrib/libucl/include/ucl++.h head/contrib/libucl/include/ucl.h head/contrib/libucl/python/setup.py head/contrib/libucl/python/src/uclmodule.c head/contrib/libucl/src/ucl_parser.c head/contrib/libucl/src/ucl_schema.c head/contrib/libucl/src/ucl_util.c head/contrib/libucl/tests/schema/patternProperties.json head/contrib/libucl/tests/schema/refRemote.json Directory Properties: head/contrib/libucl/ (props changed) Modified: head/contrib/libucl/CMakeLists.txt ============================================================================== --- head/contrib/libucl/CMakeLists.txt Sat Oct 1 00:12:03 2016 (r306543) +++ head/contrib/libucl/CMakeLists.txt Sat Oct 1 00:14:01 2016 (r306544) @@ -205,8 +205,7 @@ SET(UCLSRC src/ucl_util.c src/ucl_hash.c src/ucl_schema.c src/ucl_msgpack.c - src/ucl_sexp.c - src/xxhash.c) + src/ucl_sexp.c) SET (LIB_TYPE STATIC) Modified: head/contrib/libucl/Makefile.unix ============================================================================== --- head/contrib/libucl/Makefile.unix Sat Oct 1 00:12:03 2016 (r306543) +++ head/contrib/libucl/Makefile.unix Sat Oct 1 00:14:01 2016 (r306544) @@ -1,7 +1,7 @@ CC ?= gcc DESTDIR ?= /usr/local LD ?= gcc -C_COMMON_FLAGS ?= -fPIC -Wall -W -Wno-unused-parameter -Wno-pointer-sign -I./include -I./uthash -I./src +C_COMMON_FLAGS ?= -fPIC -Wall -W -Wno-unused-parameter -Wno-pointer-sign -I./include -I./uthash -I./src -I./klib MAJOR_VERSION = 0 MINOR_VERSION = 2 PATCH_VERSION = 9 @@ -25,13 +25,12 @@ HDEPS = $(SRCDIR)/ucl_hash.h \ $(SRCDIR)/ucl_chartable.h \ $(SRCDIR)/ucl_internal.h \ $(INCLUDEDIR)/ucl.h \ - $(SRCDIR)/xxhash.h + $(SRCDIR)/mum.h OBJECTS = $(OBJDIR)/ucl_hash.o \ $(OBJDIR)/ucl_util.o \ $(OBJDIR)/ucl_parser.o \ $(OBJDIR)/ucl_emitter.o \ - $(OBJDIR)/ucl_schema.o \ - $(OBJDIR)/xxhash.o + $(OBJDIR)/ucl_schema.o all: $(OBJDIR) $(OBJDIR)/$(SONAME) @@ -55,8 +54,6 @@ $(OBJDIR)/ucl_hash.o: $(SRCDIR)/ucl_hash $(CC) -o $(OBJDIR)/ucl_hash.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_hash.c $(OBJDIR)/ucl_schema.o: $(SRCDIR)/ucl_schema.c $(HDEPS) $(CC) -o $(OBJDIR)/ucl_schema.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/ucl_schema.c -$(OBJDIR)/xxhash.o: $(SRCDIR)/xxhash.c $(HDEPS) - $(CC) -o $(OBJDIR)/xxhash.o $(CPPFLAGS) $(COPT_FLAGS) $(CFLAGS) $(C_COMMON_FLAGS) $(SSL_CFLAGS) $(FETCH_FLAGS) -c $(SRCDIR)/xxhash.c clean: $(RM) $(OBJDIR)/*.o $(OBJDIR)/$(SONAME_FULL) $(OBJDIR)/$(SONAME) $(OBJDIR)/chargen $(OBJDIR)/test_basic $(OBJDIR)/test_speed $(OBJDIR)/objdump $(OBJDIR)/test_generate $(OBJDIR)/test_schema || true Modified: head/contrib/libucl/Makefile.w32 ============================================================================== --- head/contrib/libucl/Makefile.w32 Sat Oct 1 00:12:03 2016 (r306543) +++ head/contrib/libucl/Makefile.w32 Sat Oct 1 00:14:01 2016 (r306544) @@ -28,14 +28,13 @@ HDEPS = $(SRCDIR)/ucl_hash.h \ $(SRCDIR)/ucl_chartable.h \ $(SRCDIR)/ucl_internal.h \ $(INCLUDEDIR)/ucl.h \ - $(SRCDIR)/xxhash.h + $(SRCDIR)/mum.h OBJECTS = $(OBJDIR)/ucl_hash.o \ $(OBJDIR)/ucl_util.o \ $(OBJDIR)/ucl_parser.o \ $(OBJDIR)/ucl_emitter.o \ $(OBJDIR)/ucl_emitter_utils.o \ - $(OBJDIR)/ucl_schema.o \ - $(OBJDIR)/xxhash.o + $(OBJDIR)/ucl_schema.o all: $(OBJDIR) $(OBJDIR)/$(SONAME) Modified: head/contrib/libucl/README.md ============================================================================== --- head/contrib/libucl/README.md Sat Oct 1 00:12:03 2016 (r306543) +++ head/contrib/libucl/README.md Sat Oct 1 00:14:01 2016 (r306544) @@ -12,7 +12,7 @@ - [Named keys hierarchy](#named-keys-hierarchy) - [Convenient numbers and booleans](#convenient-numbers-and-booleans) - [General improvements](#general-improvements) - - [Commments](#commments) + - [Comments](#comments) - [Macros support](#macros-support) - [Variables support](#variables-support) - [Multiline strings](#multiline-strings) @@ -21,7 +21,7 @@ - [Performance](#performance) - [Conclusion](#conclusion) -## Introduction +## Introduction This document describes the main features and principles of the configuration language called `UCL` - universal configuration language. @@ -47,7 +47,7 @@ section { string = "something"; subsection { host = { - host = "hostname"; + host = "hostname"; port = 900; } host = { @@ -163,9 +163,9 @@ section { } } ``` - + Plain definitions may be more complex and contain more than a single level of nested objects: - + ```nginx section "blah" "foo" { key = value; @@ -174,7 +174,7 @@ section "blah" "foo" { is presented as: -```nginx +```nginx section { blah { foo { @@ -196,17 +196,17 @@ section { ## General improvements -### Commments +### Comments UCL supports different style of comments: -* single line: `#` +* single line: `#` * multiline: `/* ... */` Multiline comments may be nested: ```c # Sample single line comment -/* +/* some comment /* nested comment */ end of comment @@ -263,7 +263,7 @@ all files that matches the specified pat for your operating system). This option is meaningless for URL includes. * `url` (default: **true**) - allow URL includes. * `path` (default: empty) - A UCL_ARRAY of directories to search for the include file. -Search ends after the first patch, unless `glob` is true, then all matches are included. +Search ends after the first match, unless `glob` is true, then all matches are included. * `prefix` (default false) - Put included contents inside an object, instead of loading them into the root. If no `key` is provided, one is automatically generated based on each files basename() * `key` (default: ) - Key to load contents of include into. If @@ -273,7 +273,7 @@ object or an array. * `priority` (default: 0) - specify priority for the include (see below). * `duplicate` (default: 'append') - specify policy of duplicates resolving: - `append` - default strategy, if we have new object of higher priority then it replaces old one, if we have new object with less priority it is ignored completely, and if we have two duplicate objects with the same priority then we have a multi-value key (implicit array) - - `merge` - if we have object or array, then new keys are merged inside, if we have a plain object then an implicit array is formed (regardeless of priorities) + - `merge` - if we have object or array, then new keys are merged inside, if we have a plain object then an implicit array is formed (regardless of priorities) - `error` - create error on duplicate keys and stop parsing - `rewrite` - always rewrite an old value with new one (ignoring priorities) @@ -320,7 +320,7 @@ Here are some rules for this syntax: * Multiline terminator must start just after `<<` symbols and it must consist of capital letters only (e.g. `< +#include +#include +#include #include #include @@ -100,6 +103,68 @@ private: return func; }; + static bool ucl_variable_getter(const unsigned char *data, size_t len, + unsigned char ** /*replace*/, size_t * /*replace_len*/, bool *need_free, void* ud) + { + *need_free = false; + + auto vars = reinterpret_cast *>(ud); + if (vars && data && len != 0) { + vars->emplace (data, data + len); + } + return false; + } + + static bool ucl_variable_replacer (const unsigned char *data, size_t len, + unsigned char **replace, size_t *replace_len, bool *need_free, void* ud) + { + *need_free = false; + + auto replacer = reinterpret_cast(ud); + if (!replacer) { + return false; + } + + std::string var_name (data, data + len); + if (!replacer->is_variable (var_name)) { + return false; + } + + std::string var_value = replacer->replace (var_name); + if (var_value.empty ()) { + return false; + } + + *replace = (unsigned char *)UCL_ALLOC (var_value.size ()); + memcpy (*replace, var_value.data (), var_value.size ()); + + *replace_len = var_value.size (); + *need_free = true; + + return true; + } + + template + static Ucl parse_with_strategy_function (C config_func, P parse_func, std::string &err) + { + auto parser = ucl_parser_new (UCL_PARSER_DEFAULT); + + config_func (parser); + + if (!parse_func (parser)) { + err.assign (ucl_parser_get_error (parser)); + ucl_parser_free (parser); + + return nullptr; + } + + auto obj = ucl_parser_get_object (parser); + ucl_parser_free (parser); + + // Obj will handle ownership + return Ucl (obj); + } + std::unique_ptr obj; public: @@ -117,9 +182,9 @@ public: const_iterator(const Ucl &obj) { it = std::shared_ptr(ucl_object_iterate_new (obj.obj.get()), - ucl_iter_deleter()); + ucl_iter_deleter()); cur.reset (new Ucl(ucl_object_iterate_safe (it.get(), true))); - if (!*cur) { + if (cur->type() == UCL_NULL) { it.reset (); cur.reset (); } @@ -153,7 +218,7 @@ public: cur.reset (new Ucl(ucl_object_iterate_safe (it.get(), true))); } - if (!*cur) { + if (cur && cur->type() == UCL_NULL) { it.reset (); cur.reset (); } @@ -171,6 +236,17 @@ public: } }; + struct variable_replacer { + virtual ~variable_replacer() {} + + virtual bool is_variable (const std::string &str) const + { + return !str.empty (); + } + + virtual std::string replace (const std::string &var) const = 0; + }; + // We grab ownership if get non-const ucl_object_t Ucl(ucl_object_t *other) { obj.reset (other); @@ -211,20 +287,20 @@ public: obj.reset (ucl_object_fromstring_common (value.data (), value.size (), UCL_STRING_RAW)); } - Ucl(const char * value) { + Ucl(const char *value) { obj.reset (ucl_object_fromstring_common (value, 0, UCL_STRING_RAW)); } // Implicit constructor: anything with a to_json() function. template - Ucl(const T & t) : Ucl(t.to_ucl()) {} + Ucl(const T &t) : Ucl(t.to_ucl()) {} // Implicit constructor: map-like objects (std::map, std::unordered_map, etc) template ::value && std::is_constructible::value, int>::type = 0> - Ucl(const M & m) { + Ucl(const M &m) { obj.reset (ucl_object_typed_new (UCL_OBJECT)); auto cobj = obj.get (); @@ -238,7 +314,7 @@ public: template ::value, int>::type = 0> - Ucl(const V & v) { + Ucl(const V &v) { obj.reset (ucl_object_typed_new (UCL_ARRAY)); auto cobj = obj.get (); @@ -356,46 +432,138 @@ public: return out; } - static Ucl parse (const std::string & in, std::string & err) + static Ucl parse (const std::string &in, std::string &err) { - auto parser = ucl_parser_new (UCL_PARSER_DEFAULT); + return parse (in, std::map(), err); + } - if (!ucl_parser_add_chunk (parser, (const unsigned char *)in.data (), - in.size ())) { - err.assign (ucl_parser_get_error (parser)); - ucl_parser_free (parser); + static Ucl parse (const std::string &in, const std::map &vars, std::string &err) + { + auto config_func = [&vars] (ucl_parser *parser) { + for (const auto & item : vars) { + ucl_parser_register_variable (parser, item.first.c_str (), item.second.c_str ()); + } + }; + + auto parse_func = [&in] (ucl_parser *parser) { + return ucl_parser_add_chunk (parser, (unsigned char *)in.data (), in.size ()); + }; + + return parse_with_strategy_function (config_func, parse_func, err); + } + static Ucl parse (const std::string &in, const variable_replacer &replacer, std::string &err) + { + auto config_func = [&replacer] (ucl_parser *parser) { + ucl_parser_set_variables_handler (parser, ucl_variable_replacer, + &const_cast(replacer)); + }; + + auto parse_func = [&in] (ucl_parser *parser) { + return ucl_parser_add_chunk (parser, (unsigned char *) in.data (), in.size ()); + }; + + return parse_with_strategy_function (config_func, parse_func, err); + } + + static Ucl parse (const char *in, std::string &err) + { + return parse (in, std::map(), err); + } + + static Ucl parse (const char *in, const std::map &vars, std::string &err) + { + if (!in) { + err = "null input"; return nullptr; } + return parse (std::string (in), vars, err); + } - auto obj = ucl_parser_get_object (parser); + static Ucl parse (const char *in, const variable_replacer &replacer, std::string &err) + { + if (!in) { + err = "null input"; + return nullptr; + } + return parse (std::string(in), replacer, err); + } + + static Ucl parse_from_file (const std::string &filename, std::string &err) + { + return parse_from_file (filename, std::map(), err); + } + + static Ucl parse_from_file (const std::string &filename, const std::map &vars, std::string &err) + { + auto config_func = [&vars] (ucl_parser *parser) { + for (const auto & item : vars) { + ucl_parser_register_variable (parser, item.first.c_str (), item.second.c_str ()); + } + }; + + auto parse_func = [&filename] (ucl_parser *parser) { + return ucl_parser_add_file (parser, filename.c_str ()); + }; + + return parse_with_strategy_function (config_func, parse_func, err); + } + + static Ucl parse_from_file (const std::string &filename, const variable_replacer &replacer, std::string &err) + { + auto config_func = [&replacer] (ucl_parser *parser) { + ucl_parser_set_variables_handler (parser, ucl_variable_replacer, + &const_cast(replacer)); + }; + + auto parse_func = [&filename] (ucl_parser *parser) { + return ucl_parser_add_file (parser, filename.c_str ()); + }; + + return parse_with_strategy_function (config_func, parse_func, err); + } + + static std::vector find_variable (const std::string &in) + { + auto parser = ucl_parser_new (UCL_PARSER_DEFAULT); + + std::set vars; + ucl_parser_set_variables_handler (parser, ucl_variable_getter, &vars); + ucl_parser_add_chunk (parser, (const unsigned char *)in.data (), in.size ()); ucl_parser_free (parser); - // Obj will handle ownership - return Ucl (obj); + std::vector result; + std::move (vars.begin (), vars.end (), std::back_inserter (result)); + return result; } - static Ucl parse (const char * in, std::string & err) + static std::vector find_variable (const char *in) { - if (in) { - return parse (std::string(in), err); - } else { - err = "null input"; - return nullptr; + if (!in) { + return std::vector(); } + return find_variable (std::string (in)); } - static Ucl parse (std::istream &ifs, std::string &err) + static std::vector find_variable_from_file (const std::string &filename) { - return Ucl::parse (std::string(std::istreambuf_iterator(ifs), - std::istreambuf_iterator()), err); + auto parser = ucl_parser_new (UCL_PARSER_DEFAULT); + + std::set vars; + ucl_parser_set_variables_handler (parser, ucl_variable_getter, &vars); + ucl_parser_add_file (parser, filename.c_str ()); + ucl_parser_free (parser); + + std::vector result; + std::move (vars.begin (), vars.end (), std::back_inserter (result)); + return std::move (result); } - Ucl& operator= (Ucl rhs) - { - obj.swap (rhs.obj); - return *this; - } + Ucl& operator= (Ucl rhs) + { + obj.swap (rhs.obj); + return *this; + } bool operator== (const Ucl &rhs) const { Modified: head/contrib/libucl/include/ucl.h ============================================================================== --- head/contrib/libucl/include/ucl.h Sat Oct 1 00:12:03 2016 (r306543) +++ head/contrib/libucl/include/ucl.h Sat Oct 1 00:14:01 2016 (r306544) @@ -1016,7 +1016,6 @@ UCL_EXTERN bool ucl_parser_add_string_pr * Load and add data from a file * @param parser parser structure * @param filename the name of file - * @param err if *err is NULL it is set to parser error * @return true if chunk has been added and false in case of error */ UCL_EXTERN bool ucl_parser_add_file (struct ucl_parser *parser, @@ -1026,7 +1025,6 @@ UCL_EXTERN bool ucl_parser_add_file (str * Load and add data from a file * @param parser parser structure * @param filename the name of file - * @param err if *err is NULL it is set to parser error * @param priority the desired priority of a chunk (only 4 least significant bits * are considered for this parameter) * @return true if chunk has been added and false in case of error @@ -1035,6 +1033,20 @@ UCL_EXTERN bool ucl_parser_add_file_prio const char *filename, unsigned priority); /** + * Load and add data from a file + * @param parser parser structure + * @param filename the name of file + * @param priority the desired priority of a chunk (only 4 least significant bits + * are considered for this parameter) + * @param strat Merge strategy to use while parsing this file + * @param parse_type Parser type to use while parsing this file + * @return true if chunk has been added and false in case of error + */ +UCL_EXTERN bool ucl_parser_add_file_full (struct ucl_parser *parser, const char *filename, + unsigned priority, enum ucl_duplicate_strategy strat, + enum ucl_parse_type parse_type); + +/** * Load and add data from a file descriptor * @param parser parser structure * @param filename the name of file Copied: head/contrib/libucl/m4/gcov.m4 (from r306543, vendor/libucl/dist/m4/gcov.m4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libucl/m4/gcov.m4 Sat Oct 1 00:14:01 2016 (r306544, copy of r306543, vendor/libucl/dist/m4/gcov.m4) @@ -0,0 +1,89 @@ +# SYNOPSIS +# +# Add code coverage support with gcov/lcov. +# +# AX_CODE_COVERAGE() +# +# DESCRIPTION +# +# Provides a --enable-coverage option which checks for available +# gcov/lcov binaries and provides ENABLE_CODE_COVERAGE conditional. +# +# LAST MODIFICATION +# +# $Id: coverage.m4 40881 2013-08-20 17:54:39Z damon $ +# +# COPYLEFT +# +# Copyright (c) 2012 Roy H. Stogner +# Copyright (c) 2010 Karl W. Schulz +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. + +AC_DEFUN([AX_CODE_COVERAGE], +[ + +AC_ARG_ENABLE(coverage, AC_HELP_STRING([--enable-coverage],[configure code coverage analysis tools])) + +HAVE_GCOV_TOOLS=0 + +GCOV_FLAGS="" + +if test "x$enable_coverage" = "xyes"; then + + # ---------------------------- + # Check for gcov/lcov binaries + # ---------------------------- + + AC_ARG_VAR([GCOV], [Coverage testing command]) + if test "x$GCOV" = "x"; then + AC_PATH_PROG(GCOV, gcov, no) + else + AC_PATH_PROG(GCOV, $GCOV, no) + fi + + AC_PATH_PROG(LCOV, lcov, no) + AC_PATH_PROG(GENHTML, genhtml) + + # ---------------------------------- + # include coverage compiler options + # ---------------------------------- + AC_MSG_CHECKING([for clang]) + + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([], [[ + #ifndef __clang__ + not clang + #endif + ]])], + [CLANG=yes], [CLANG=no]) + + AC_MSG_RESULT([$CLANG]) + HAVE_GCOV_TOOLS=1 + COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage" + COVERAGE_LDFLAGS="--coverage -fprofile-arcs -ftest-coverage" + COVERAGE_OPTFLAGS="-O0" + + # Test for C... + CFLAGS="${GCOV_FLAGS} ${CFLAGS}" + CXXFLAGS="${GCOV_FLAGS} ${CXXFLAGS}" + if test "x$GCC" = "xyes" -a "x$CLANG" = "xno"; then + COVERAGE_LIBS="-lgcov" + else + COVERAGE_LIBS="" + fi +fi + +AC_SUBST([GCOV]) +AC_SUBST([LCOV]) +AC_SUBST([GENHTML]) +AC_SUBST([GENHTML_OPTIONS]) +AC_SUBST([COVERAGE_CFLAGS]) +AC_SUBST([COVERAGE_OPTFLAGS]) +AC_SUBST([COVERAGE_LDFLAGS]) +AC_SUBST([COVERAGE_LIBS]) +AM_CONDITIONAL(CODE_COVERAGE_ENABLED,test x$HAVE_GCOV_TOOLS = x1) + +]) Modified: head/contrib/libucl/python/setup.py ============================================================================== --- head/contrib/libucl/python/setup.py Sat Oct 1 00:12:03 2016 (r306543) +++ head/contrib/libucl/python/setup.py Sat Oct 1 00:14:01 2016 (r306544) @@ -1,37 +1,43 @@ -import distutils.ccompiler -import distutils.sysconfig -from distutils.core import setup, Extension +try: + from setuptools import setup, Extension +except ImportError: + from distutils.core import setup, Extension + import os +import sys +tests_require = [] -compiler = distutils.ccompiler.new_compiler() -search_paths=[os.path.expanduser('~/{}'), '/opt/local/{}', '/usr/local/{}', '/usr/{}'] -lib_paths = [ a.format("lib") for a in search_paths] -inc_paths = [ a.format("include") for a in search_paths] +if sys.version < '2.7': + tests_require.append('unittest2') -uclmodule = Extension('ucl', - include_dirs = inc_paths, - library_dirs = lib_paths, - libraries = ['ucl'], - sources = ['src/uclmodule.c'], - runtime_library_dirs = lib_paths, - language='c') +uclmodule = Extension( + 'ucl', + libraries = ['ucl'], + sources = ['src/uclmodule.c'], + language = 'c' +) -setup(name='ucl', - version='1.0', - description='ucl parser and emmitter', +setup( + name = 'ucl', + version = '0.8', + description = 'ucl parser and emmitter', ext_modules = [uclmodule], - author="Eitan Adler", - author_email="lists@eitanadler.com", - url="https://github.com/vstakhov/libucl/", - license="MIT", - classifiers=["Development Status :: 3 - Alpha", + test_suite = 'tests', + tests_require = tests_require, + author = "Eitan Adler, Denis Volpato Martins", + author_email = "lists@eitanadler.com", + url = "https://github.com/vstakhov/libucl/", + license = "MIT", + classifiers = [ + "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: DFSG approved", "License :: OSI Approved :: MIT License", "Programming Language :: C", + "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Libraries", - ] - ) + ] +) Modified: head/contrib/libucl/python/src/uclmodule.c ============================================================================== --- head/contrib/libucl/python/src/uclmodule.c Sat Oct 1 00:12:03 2016 (r306543) +++ head/contrib/libucl/python/src/uclmodule.c Sat Oct 1 00:14:01 2016 (r306544) @@ -2,6 +2,8 @@ #include #include +static PyObject *SchemaError; + static PyObject * _basic_ucl_type (ucl_object_t const *obj) { @@ -13,9 +15,11 @@ _basic_ucl_type (ucl_object_t const *obj case UCL_STRING: return Py_BuildValue ("s", ucl_object_tostring (obj)); case UCL_BOOLEAN: - return ucl_object_toboolean (obj) ? Py_True : Py_False; + return PyBool_FromLong (ucl_object_toboolean (obj)); case UCL_TIME: return Py_BuildValue ("d", ucl_object_todouble (obj)); + case UCL_NULL: + Py_RETURN_NONE; } return NULL; } @@ -124,26 +128,60 @@ _iterate_python (PyObject *obj) { if (obj == Py_None) { return ucl_object_new(); - } else if (PyBool_Check (obj)) { + } + else if (PyBool_Check (obj)) { return ucl_object_frombool (obj == Py_True); - } else if (PyInt_Check (obj)) { + } +#if PY_MAJOR_VERSION < 3 + else if (PyInt_Check (obj)) { return ucl_object_fromint (PyInt_AsLong (obj)); - } else if (PyFloat_Check (obj)) { + } +#endif + else if (PyLong_Check (obj)) { + return ucl_object_fromint (PyLong_AsLong (obj)); + } + else if (PyFloat_Check (obj)) { return ucl_object_fromdouble (PyFloat_AsDouble (obj)); - } else if (PyString_Check (obj)) { + } + else if (PyUnicode_Check (obj)) { + ucl_object_t *ucl_str; + PyObject *str = PyUnicode_AsASCIIString(obj); + ucl_str = ucl_object_fromstring (PyBytes_AsString (str)); + Py_DECREF(str); + return ucl_str; + } +#if PY_MAJOR_VERSION < 3 + else if (PyString_Check (obj)) { return ucl_object_fromstring (PyString_AsString (obj)); - // } else if (PyDateTime_Check (obj)) { } +#endif else if (PyDict_Check(obj)) { PyObject *key, *value; Py_ssize_t pos = 0; ucl_object_t *top, *elm; + char *keystr = NULL; top = ucl_object_typed_new (UCL_OBJECT); while (PyDict_Next(obj, &pos, &key, &value)) { elm = _iterate_python(value); - ucl_object_insert_key (top, elm, PyString_AsString(key), 0, true); + + if (PyUnicode_Check(key)) { + PyObject *keyascii = PyUnicode_AsASCIIString(key); + keystr = PyBytes_AsString(keyascii); + Py_DECREF(keyascii); + } +#if PY_MAJOR_VERSION < 3 + else if (PyString_Check(key)) { + keystr = PyString_AsString(key); + } +#endif + else { + PyErr_SetString(PyExc_TypeError, "Unknown key type"); + return NULL; + } + + ucl_object_insert_key (top, elm, keystr, 0, true); } return top; @@ -195,11 +233,6 @@ ucl_dump (PyObject *self, PyObject *args Py_RETURN_NONE; } - if (!PyDict_Check(obj)) { - PyErr_SetString(PyExc_TypeError, "Argument must be dict"); - return NULL; - } - root = _iterate_python(obj); if (root) { PyObject *ret; @@ -207,7 +240,11 @@ ucl_dump (PyObject *self, PyObject *args buf = (char *) ucl_object_emit (root, emitter); ucl_object_unref (root); +#if PY_MAJOR_VERSION < 3 ret = PyString_FromString (buf); +#else + ret = PyUnicode_FromString (buf); +#endif free(buf); return ret; @@ -219,17 +256,35 @@ ucl_dump (PyObject *self, PyObject *args static PyObject * ucl_validate (PyObject *self, PyObject *args) { - char *uclstr, *schema; + PyObject *dataobj, *schemaobj; + ucl_object_t *data, *schema; + bool r; + struct ucl_schema_error err; - if (PyArg_ParseTuple(args, "zz", &uclstr, &schema)) { - if (!uclstr || !schema) { - Py_RETURN_NONE; - } + if (!PyArg_ParseTuple (args, "OO", &schemaobj, &dataobj)) { + PyErr_SetString (PyExc_TypeError, "Unhandled object type"); + return NULL; + } - PyErr_SetString(PyExc_NotImplementedError, "schema validation is not yet supported"); + schema = _iterate_python(schemaobj); + if (!schema) + return NULL; + + data = _iterate_python(dataobj); + if (!data) + return NULL; + + // validation + r = ucl_object_validate (schema, data, &err); + ucl_object_unref (schema); + ucl_object_unref (data); + + if (!r) { + PyErr_SetString (SchemaError, err.msg); + return NULL; } - return NULL; + Py_RETURN_TRUE; } static PyMethodDef uclMethods[] = { @@ -247,6 +302,10 @@ init_macros(PyObject *mod) PyModule_AddIntMacro(mod, UCL_EMIT_CONFIG); PyModule_AddIntMacro(mod, UCL_EMIT_YAML); PyModule_AddIntMacro(mod, UCL_EMIT_MSGPACK); + + SchemaError = PyErr_NewException("ucl.SchemaError", NULL, NULL); + Py_INCREF(SchemaError); + PyModule_AddObject(mod, "SchemaError", SchemaError); } #if PY_MAJOR_VERSION >= 3 Modified: head/contrib/libucl/src/ucl_parser.c ============================================================================== --- head/contrib/libucl/src/ucl_parser.c Sat Oct 1 00:12:03 2016 (r306543) +++ head/contrib/libucl/src/ucl_parser.c Sat Oct 1 00:14:01 2016 (r306544) @@ -342,6 +342,7 @@ ucl_check_variable_safe (struct ucl_pars /* Call generic handler */ if (parser->var_handler (ptr, remain, &dst, &dstlen, &need_free, parser->var_data)) { + *out_len += dstlen; *found = true; if (need_free) { free (dst); @@ -458,11 +459,18 @@ ucl_expand_single_variable (struct ucl_p } if (!found) { if (strict && parser->var_handler != NULL) { - if (parser->var_handler (ptr, remain, &dst, &dstlen, &need_free, + size_t var_len = 0; + while (var_len < remain && p[var_len] != '}') + var_len ++; + + if (parser->var_handler (p, var_len, &dst, &dstlen, &need_free, parser->var_data)) { memcpy (d, dst, dstlen); - ret += dstlen; - d += remain; + ret += var_len; + d += dstlen; + if (need_free) { + free (dst); + } found = true; } } Modified: head/contrib/libucl/src/ucl_schema.c ============================================================================== --- head/contrib/libucl/src/ucl_schema.c Sat Oct 1 00:12:03 2016 (r306543) +++ head/contrib/libucl/src/ucl_schema.c Sat Oct 1 00:14:01 2016 (r306544) @@ -69,7 +69,7 @@ ucl_schema_create_error (struct ucl_sche * Check whether we have a pattern specified */ static const ucl_object_t * -ucl_schema_test_pattern (const ucl_object_t *obj, const char *pattern) +ucl_schema_test_pattern (const ucl_object_t *obj, const char *pattern, bool recursive) { const ucl_object_t *res = NULL; #ifdef HAVE_REGEX_H @@ -78,11 +78,16 @@ ucl_schema_test_pattern (const ucl_objec ucl_object_iter_t iter = NULL; if (regcomp (®, pattern, REG_EXTENDED | REG_NOSUB) == 0) { - while ((elt = ucl_object_iterate (obj, &iter, true)) != NULL) { - if (regexec (®, ucl_object_key (elt), 0, NULL, 0) == 0) { - res = elt; - break; + if (recursive) { + while ((elt = ucl_object_iterate (obj, &iter, true)) != NULL) { + if (regexec (®, ucl_object_key (elt), 0, NULL, 0) == 0) { + res = elt; + break; + } } + } else { + if (regexec (®, ucl_object_key (obj), 0, NULL, 0) == 0) + res = obj; } regfree (®); } @@ -205,12 +210,17 @@ ucl_schema_validate_object (const ucl_ob } } else if (strcmp (ucl_object_key (elt), "patternProperties") == 0) { + const ucl_object_t *vobj; + ucl_object_iter_t viter; piter = NULL; while (ret && (prop = ucl_object_iterate (elt, &piter, true)) != NULL) { - found = ucl_schema_test_pattern (obj, ucl_object_key (prop)); - if (found) { - ret = ucl_schema_validate (prop, found, true, err, root, - ext_ref); + viter = NULL; + while (ret && (vobj = ucl_object_iterate (obj, &viter, true)) != NULL) { + found = ucl_schema_test_pattern (vobj, ucl_object_key (prop), false); + if (found) { + ret = ucl_schema_validate (prop, found, true, err, root, + ext_ref); + } } } } @@ -234,7 +244,7 @@ ucl_schema_validate_object (const ucl_ob piter = NULL; pat = ucl_object_lookup (schema, "patternProperties"); while ((pelt = ucl_object_iterate (pat, &piter, true)) != NULL) { - found = ucl_schema_test_pattern (obj, ucl_object_key (pelt)); + found = ucl_schema_test_pattern (obj, ucl_object_key (pelt), true); if (found != NULL) { break; } Modified: head/contrib/libucl/src/ucl_util.c ============================================================================== --- head/contrib/libucl/src/ucl_util.c Sat Oct 1 00:12:03 2016 (r306543) +++ head/contrib/libucl/src/ucl_util.c Sat Oct 1 00:14:01 2016 (r306544) @@ -1795,8 +1795,9 @@ ucl_parser_set_filevars (struct ucl_pars } bool -ucl_parser_add_file_priority (struct ucl_parser *parser, const char *filename, - unsigned priority) +ucl_parser_add_file_full (struct ucl_parser *parser, const char *filename, + unsigned priority, enum ucl_duplicate_strategy strat, + enum ucl_parse_type parse_type) { unsigned char *buf; size_t len; @@ -1819,7 +1820,8 @@ ucl_parser_add_file_priority (struct ucl } parser->cur_file = strdup (realbuf); ucl_parser_set_filevars (parser, realbuf, false); - ret = ucl_parser_add_chunk_priority (parser, buf, len, priority); + ret = ucl_parser_add_chunk_full (parser, buf, len, priority, strat, + parse_type); if (len > 0) { ucl_munmap (buf, len); @@ -1829,14 +1831,27 @@ ucl_parser_add_file_priority (struct ucl } bool +ucl_parser_add_file_priority (struct ucl_parser *parser, const char *filename, + unsigned priority) +{ + if (parser == NULL) { + return false; + } + + return ucl_parser_add_file_full(parser, filename, priority, + UCL_DUPLICATE_APPEND, UCL_PARSE_UCL); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sat Oct 1 00:18:59 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69431C04D9D; Sat, 1 Oct 2016 00:18:59 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 30F1D1020; Sat, 1 Oct 2016 00:18:58 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c110-21-100-78.carlnfd1.nsw.optusnet.com.au [110.21.100.78]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 525D7D619A3; Sat, 1 Oct 2016 10:18:50 +1000 (AEST) Date: Sat, 1 Oct 2016 10:18:49 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Toomas Soome cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306538 - head/lib/libstand In-Reply-To: <201609302319.u8UNJ8oh087617@repo.freebsd.org> Message-ID: <20161001101040.Y3821@besplex.bde.org> References: <201609302319.u8UNJ8oh087617@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=EfU1O6SC c=1 sm=1 tr=0 a=uGjuzT6u7JdBDS7kH8taPg==:117 a=uGjuzT6u7JdBDS7kH8taPg==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=nXofmzNChi7GuVKgM7EA:9 a=BSl6DtumEp4S0mM4:21 a=CWG8BAMRxDi_WXHg:21 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 00:18:59 -0000 On Fri, 30 Sep 2016, Toomas Soome wrote: > Author: tsoome > Date: Fri Sep 30 23:19:08 2016 > New Revision: 306538 > URL: https://svnweb.freebsd.org/changeset/base/306538 > > Log: > cstyle fix of cd9660_open in libstand > > rS306534 did create bad cstyle by my mistake, correcting it. > > Modified: head/lib/libstand/cd9660.c > ============================================================================== > --- head/lib/libstand/cd9660.c Fri Sep 30 23:01:37 2016 (r306537) > +++ head/lib/libstand/cd9660.c Fri Sep 30 23:19:08 2016 (r306538) > @@ -356,11 +356,11 @@ cd9660_open(const char *path, struct ope > > /* if the new block is zero length, its padding */ > if (isonum_711(dp->length) == 0) { > - /* skip to next block, if any */ > - off = boff * ISO_DEFAULT_BLOCK_SIZE; > - continue; > + /* skip to next block, if any */ > + off = boff * ISO_DEFAULT_BLOCK_SIZE; > + continue; > } else { > - off += isonum_711(dp->length); > + off += isonum_711(dp->length); > } > } > if (off >= dsize) { Fixing the remaining style bugs gives: [Delete blank line here.] /* If the new block has zero length, it is padding. */ if (isonum_711(dp->length) == 0) { /* Skip to next block, if any. */ off = boff * ISO_DEFAULT_BLOCK_SIZE; continue; } off += isonum_711(dp->length); Bruce From owner-svn-src-head@freebsd.org Sat Oct 1 01:10:52 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79C1CC0269A; Sat, 1 Oct 2016 01:10:52 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AF3829F; Sat, 1 Oct 2016 01:10:52 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u911ApMh028065; Sat, 1 Oct 2016 01:10:51 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u911ApTJ028064; Sat, 1 Oct 2016 01:10:51 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201610010110.u911ApTJ028064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 1 Oct 2016 01:10:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306545 - head/sys/dev/fdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 01:10:52 -0000 Author: jhibbits Date: Sat Oct 1 01:10:51 2016 New Revision: 306545 URL: https://svnweb.freebsd.org/changeset/base/306545 Log: Revert r306473. Some objections were noted, and it was purely a cosmetic change anyway. Modified: head/sys/dev/fdt/simplebus.c Modified: head/sys/dev/fdt/simplebus.c ============================================================================== --- head/sys/dev/fdt/simplebus.c Sat Oct 1 00:14:01 2016 (r306544) +++ head/sys/dev/fdt/simplebus.c Sat Oct 1 01:10:51 2016 (r306545) @@ -265,15 +265,6 @@ simplebus_add_device(device_t dev, phand if ((ndi = simplebus_setup_dinfo(dev, node, di)) == NULL) return (NULL); - - /* - * If the order is unspecified, use the cell-index field, if available. - * The cell-index property is not part of any standard, but is widely - * used in NXP/Freescale and Marvell device trees. - */ - if (order == -1) - OF_getencprop(node, "cell-index", &order, sizeof(order)); - cdev = device_add_child_ordered(dev, order, name, unit); if (cdev == NULL) { device_printf(dev, "<%s>: device_add_child failed\n", From owner-svn-src-head@freebsd.org Sat Oct 1 01:30:36 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AABBC02CE9; Sat, 1 Oct 2016 01:30:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D14971052; Sat, 1 Oct 2016 01:30:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u911UZnr035643; Sat, 1 Oct 2016 01:30:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u911UZbn035642; Sat, 1 Oct 2016 01:30:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610010130.u911UZbn035642@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 1 Oct 2016 01:30:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306548 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 01:30:36 -0000 Author: markj Date: Sat Oct 1 01:30:34 2016 New Revision: 306548 URL: https://svnweb.freebsd.org/changeset/base/306548 Log: nd6_dad_timer(): don't assert that the address is tentative. It appears that this assertion can be tripped in some cases when multiple interfaces are on the same link. Until this is resolved, revert a part of r306305 and simply log a message if the DAD timer fires on a non-tentative address. Reported by: jhb X-MFC With: r306305 Modified: head/sys/netinet6/nd6_nbr.c Modified: head/sys/netinet6/nd6_nbr.c ============================================================================== --- head/sys/netinet6/nd6_nbr.c Sat Oct 1 01:24:24 2016 (r306547) +++ head/sys/netinet6/nd6_nbr.c Sat Oct 1 01:30:34 2016 (r306548) @@ -1316,8 +1316,6 @@ nd6_dad_timer(struct dadq *dp) char ip6buf[INET6_ADDRSTRLEN]; KASSERT(ia != NULL, ("DAD entry %p with no address", dp)); - KASSERT((ia->ia6_flags & IN6_IFF_TENTATIVE) != 0, - ("DAD entry %p for non-tentative address", dp)); if (ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) { /* Do not need DAD for ifdisabled interface. */ @@ -1332,6 +1330,13 @@ nd6_dad_timer(struct dadq *dp) ifa->ifa_ifp ? if_name(ifa->ifa_ifp) : "???"); goto err; } + if ((ia->ia6_flags & IN6_IFF_TENTATIVE) == 0) { + log(LOG_ERR, "nd6_dad_timer: called with non-tentative address " + "%s(%s)\n", + ip6_sprintf(ip6buf, &ia->ia_addr.sin6_addr), + ifa->ifa_ifp ? if_name(ifa->ifa_ifp) : "???"); + goto err; + } /* Stop DAD if the interface is down even after dad_maxtry attempts. */ if ((dp->dad_ns_tcount > V_dad_maxtry) && From owner-svn-src-head@freebsd.org Sat Oct 1 03:35:04 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61E5FC03F88; Sat, 1 Oct 2016 03:35:04 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EB76969; Sat, 1 Oct 2016 03:35:04 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u913Z3l6085019; Sat, 1 Oct 2016 03:35:03 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u913Z3iK085018; Sat, 1 Oct 2016 03:35:03 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201610010335.u913Z3iK085018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sat, 1 Oct 2016 03:35:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306550 - head/sys/arm/nvidia/tegra124 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 03:35:04 -0000 Author: mmel Date: Sat Oct 1 03:35:03 2016 New Revision: 306550 URL: https://svnweb.freebsd.org/changeset/base/306550 Log: TEGRA: Extend timeout for PLLs lock to 5 ms. Real lock time for PLLA has been very near to old limit. Modified: head/sys/arm/nvidia/tegra124/tegra124_clk_pll.c Modified: head/sys/arm/nvidia/tegra124/tegra124_clk_pll.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_clk_pll.c Sat Oct 1 03:24:53 2016 (r306549) +++ head/sys/arm/nvidia/tegra124/tegra124_clk_pll.c Sat Oct 1 03:35:03 2016 (r306550) @@ -86,7 +86,7 @@ enum pll_type { #define PLLRE_IDDQ_BIT 16 #define PLLSS_IDDQ_BIT 19 -#define PLL_LOCK_TIMEOUT 1000 +#define PLL_LOCK_TIMEOUT 5000 /* Post divider <-> register value mapping. */ struct pdiv_table { From owner-svn-src-head@freebsd.org Sat Oct 1 06:50:18 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 466D0C05ACC; Sat, 1 Oct 2016 06:50:18 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE920616; Sat, 1 Oct 2016 06:50:17 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u916oHxe057553; Sat, 1 Oct 2016 06:50:17 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u916oHb9057551; Sat, 1 Oct 2016 06:50:17 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201610010650.u916oHb9057551@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sat, 1 Oct 2016 06:50:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306551 - head/sys/arm/nvidia/tegra124 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 06:50:18 -0000 Author: mmel Date: Sat Oct 1 06:50:16 2016 New Revision: 306551 URL: https://svnweb.freebsd.org/changeset/base/306551 Log: TEGRA: Fix bindings for cpufreq and coretemp drivers, it was broken in r306477. Correct a description for coretemp driver. Modified: head/sys/arm/nvidia/tegra124/tegra124_coretemp.c head/sys/arm/nvidia/tegra124/tegra124_cpufreq.c Modified: head/sys/arm/nvidia/tegra124/tegra124_coretemp.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_coretemp.c Sat Oct 1 03:35:03 2016 (r306550) +++ head/sys/arm/nvidia/tegra124/tegra124_coretemp.c Sat Oct 1 06:50:16 2016 (r306551) @@ -179,9 +179,9 @@ static void tegra124_coretemp_identify(driver_t *driver, device_t parent) { - if (device_find_child(parent, "tegra124_coretemp", -1) != NULL) + if (device_find_child(parent, "coretemp", -1) != NULL) return; - if (BUS_ADD_CHILD(parent, 0, "tegra124_coretemp", -1) == NULL) + if (BUS_ADD_CHILD(parent, 0, "coretemp", -1) == NULL) device_printf(parent, "add child failed\n"); } @@ -189,7 +189,7 @@ static int tegra124_coretemp_probe(device_t dev) { - device_set_desc(dev, "CPU Frequency Control"); + device_set_desc(dev, "CPU Thermal Sensor"); return (0); } Modified: head/sys/arm/nvidia/tegra124/tegra124_cpufreq.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_cpufreq.c Sat Oct 1 03:35:03 2016 (r306550) +++ head/sys/arm/nvidia/tegra124/tegra124_cpufreq.c Sat Oct 1 06:50:16 2016 (r306551) @@ -476,6 +476,8 @@ static void tegra124_cpufreq_identify(driver_t *driver, device_t parent) { + if (device_get_unit(parent) != 0) + return; if (device_find_child(parent, "tegra124_cpufreq", -1) != NULL) return; if (BUS_ADD_CHILD(parent, 0, "tegra124_cpufreq", -1) == NULL) @@ -486,8 +488,6 @@ static int tegra124_cpufreq_probe(device_t dev) { - if (device_get_unit(dev) != 0) - return (ENXIO); device_set_desc(dev, "CPU Frequency Control"); return (0); @@ -588,7 +588,7 @@ static device_method_t tegra124_cpufreq_ }; static devclass_t tegra124_cpufreq_devclass; -static DEFINE_CLASS_0(cpufreq, tegra124_cpufreq_driver, +static DEFINE_CLASS_0(tegra124_cpufreq, tegra124_cpufreq_driver, tegra124_cpufreq_methods, sizeof(struct tegra124_cpufreq_softc)); DRIVER_MODULE(tegra124_cpufreq, cpu, tegra124_cpufreq_driver, tegra124_cpufreq_devclass, NULL, NULL); From owner-svn-src-head@freebsd.org Sat Oct 1 07:46:29 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A672DC05064; Sat, 1 Oct 2016 07:46:29 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 794CF1D94; Sat, 1 Oct 2016 07:46:29 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u917kSYF079759; Sat, 1 Oct 2016 07:46:28 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u917kSbB079758; Sat, 1 Oct 2016 07:46:28 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201610010746.u917kSbB079758@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sat, 1 Oct 2016 07:46:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306552 - head/lib/libstand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 07:46:29 -0000 Author: tsoome Date: Sat Oct 1 07:46:28 2016 New Revision: 306552 URL: https://svnweb.freebsd.org/changeset/base/306552 Log: Fix remaining cstyle issues in libstand/cd9660.c Reported by: Bruce Evans Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D8107 Modified: head/lib/libstand/cd9660.c Modified: head/lib/libstand/cd9660.c ============================================================================== --- head/lib/libstand/cd9660.c Sat Oct 1 06:50:16 2016 (r306551) +++ head/lib/libstand/cd9660.c Sat Oct 1 07:46:28 2016 (r306552) @@ -353,15 +353,13 @@ cd9660_open(const char *path, struct ope dp = (struct iso_directory_record *) ((char *) dp + isonum_711(dp->length)); - /* if the new block is zero length, its padding */ if (isonum_711(dp->length) == 0) { /* skip to next block, if any */ off = boff * ISO_DEFAULT_BLOCK_SIZE; continue; - } else { - off += isonum_711(dp->length); } + off += isonum_711(dp->length); } if (off >= dsize) { rc = ENOENT; From owner-svn-src-head@freebsd.org Sat Oct 1 11:43:38 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76977C041AB; Sat, 1 Oct 2016 11:43:38 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47BD21D53; Sat, 1 Oct 2016 11:43:38 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91Bhb4B072792; Sat, 1 Oct 2016 11:43:37 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91BhbNG072791; Sat, 1 Oct 2016 11:43:37 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201610011143.u91BhbNG072791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 1 Oct 2016 11:43:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306554 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 11:43:38 -0000 Author: bapt Date: Sat Oct 1 11:43:37 2016 New Revision: 306554 URL: https://svnweb.freebsd.org/changeset/base/306554 Log: Use accept4 with O_NONBLOCK rather than accept + fcntl Modified: head/usr.sbin/bhyve/dbgport.c Modified: head/usr.sbin/bhyve/dbgport.c ============================================================================== --- head/usr.sbin/bhyve/dbgport.c Sat Oct 1 09:19:43 2016 (r306553) +++ head/usr.sbin/bhyve/dbgport.c Sat Oct 1 11:43:37 2016 (r306554) @@ -73,10 +73,8 @@ again: printf("Waiting for connection from gdb\r\n"); printonce = 1; } - conn_fd = accept(listen_fd, NULL, NULL); - if (conn_fd >= 0) - fcntl(conn_fd, F_SETFL, O_NONBLOCK); - else if (errno != EINTR) + conn_fd = accept4(listen_fd, NULL, NULL, O_NONBLOCK); + if (conn_fd < 0 && errno != EINTR) perror("accept"); } From owner-svn-src-head@freebsd.org Sat Oct 1 18:16:23 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11948A94085; Sat, 1 Oct 2016 18:16:23 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D46283E2; Sat, 1 Oct 2016 18:16:22 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91HmfKW034678; Sat, 1 Oct 2016 17:48:41 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91HmfV8034677; Sat, 1 Oct 2016 17:48:41 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201610011748.u91HmfV8034677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sat, 1 Oct 2016 17:48:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306556 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 18:16:23 -0000 Author: gonzo Date: Sat Oct 1 17:48:41 2016 New Revision: 306556 URL: https://svnweb.freebsd.org/changeset/base/306556 Log: Bump _FreeBSD_version after adding fb_memattr field to fb_info in r306555 Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sat Oct 1 17:43:02 2016 (r306555) +++ head/sys/sys/param.h Sat Oct 1 17:48:41 2016 (r306556) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200010 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200011 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Sat Oct 1 18:16:23 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 715C8A94089; Sat, 1 Oct 2016 18:16:23 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 427763E3; Sat, 1 Oct 2016 18:16:23 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91HvWu0038395; Sat, 1 Oct 2016 17:57:32 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91HvWKj038394; Sat, 1 Oct 2016 17:57:32 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201610011757.u91HvWKj038394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sat, 1 Oct 2016 17:57:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306557 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 18:16:23 -0000 Author: gonzo Date: Sat Oct 1 17:57:32 2016 New Revision: 306557 URL: https://svnweb.freebsd.org/changeset/base/306557 Log: Use VM_MEMATTR_WRITE_COMBINING memattr for mmap(2) on framebuffer VM_MEMATTR_WRITE_COMBINING sets write-through cache flag for framebuffer memory that prevents pixel data from being stuck in cache until evicition happens Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Sat Oct 1 17:48:41 2016 (r306556) +++ head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Sat Oct 1 17:57:32 2016 (r306557) @@ -113,6 +113,8 @@ bcm_fb_setup_fbd(struct bcmsc_softc *sc) sc->info.fb_stride = fb.pitch; sc->info.fb_width = fb.xres; sc->info.fb_height = fb.yres; + sc->info.fb_flags = FB_FLAG_MEMATTR; + sc->info.fb_memattr = VM_MEMATTR_WRITE_COMBINING; if (sc->fbswap) { switch (sc->info.fb_bpp) { From owner-svn-src-head@freebsd.org Sat Oct 1 18:16:24 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72DB2A9408F; Sat, 1 Oct 2016 18:16:24 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29D033E6; Sat, 1 Oct 2016 18:16:24 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91Hh2Ui034405; Sat, 1 Oct 2016 17:43:02 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91Hh2Kq034403; Sat, 1 Oct 2016 17:43:02 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201610011743.u91Hh2Kq034403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sat, 1 Oct 2016 17:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306555 - in head/sys: dev/fb sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 18:16:24 -0000 Author: gonzo Date: Sat Oct 1 17:43:02 2016 New Revision: 306555 URL: https://svnweb.freebsd.org/changeset/base/306555 Log: Provide way for framebuffer driver to request mmap(2) mapping type On ARM if memattr is not overriden mmap(2) maps framebuffer memory as WBWA which means part of changes to content in userland end up in cache and appear on screen gradually as cache lines are evicted. This change adds configurable memattr that hardware fb implementation can set to get the memory mapping type it requires: - Add new flag FB_FLAG_MEMATTR that indicates that framebuffer driver overrides default memattr - Add new field fb_memattr to struct fb_info to specify requested memattr Reviewed by: ray Differential Revision: https://reviews.freebsd.org/D8064 Modified: head/sys/dev/fb/fbd.c head/sys/sys/fbio.h Modified: head/sys/dev/fb/fbd.c ============================================================================== --- head/sys/dev/fb/fbd.c Sat Oct 1 11:43:37 2016 (r306554) +++ head/sys/dev/fb/fbd.c Sat Oct 1 17:43:02 2016 (r306555) @@ -178,6 +178,8 @@ fb_mmap(struct cdev *dev, vm_ooffset_t o *paddr = vtophys((uint8_t *)info->fb_vbase + offset); else *paddr = info->fb_pbase + offset; + if (info->fb_flags & FB_FLAG_MEMATTR) + *memattr = info->fb_memattr; return (0); } return (EINVAL); Modified: head/sys/sys/fbio.h ============================================================================== --- head/sys/sys/fbio.h Sat Oct 1 11:43:37 2016 (r306554) +++ head/sys/sys/fbio.h Sat Oct 1 17:43:02 2016 (r306555) @@ -142,6 +142,8 @@ struct fb_info { uint32_t fb_flags; #define FB_FLAG_NOMMAP 1 /* mmap unsupported. */ #define FB_FLAG_NOWRITE 2 /* disable writes for the time being */ +#define FB_FLAG_MEMATTR 4 /* override memattr for mmap */ + vm_memattr_t fb_memattr; int fb_stride; int fb_bpp; /* bits per pixel */ uint32_t fb_cmap[16]; From owner-svn-src-head@freebsd.org Sat Oct 1 19:39:10 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63775A9445A; Sat, 1 Oct 2016 19:39:10 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33E11F60; Sat, 1 Oct 2016 19:39:10 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91Jd9AW076291; Sat, 1 Oct 2016 19:39:09 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91Jd9hb076290; Sat, 1 Oct 2016 19:39:09 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201610011939.u91Jd9hb076290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 1 Oct 2016 19:39:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306559 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 19:39:10 -0000 Author: rmacklem Date: Sat Oct 1 19:39:09 2016 New Revision: 306559 URL: https://svnweb.freebsd.org/changeset/base/306559 Log: r297225 broke udp_output() for the case where the "addr" argument is NULL and the function jumps to the "release:" label. For this case, the "inp" was write locked, but the code attempted to read unlock it. This patch fixes the problem. This case could occur for NFS over UDP mounts, where the server was down for a few minutes under certain circumstances. Reported by: bde Tested by: bde Reviewed by: gnn MFC after: 2 weeks Modified: head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Sat Oct 1 19:30:28 2016 (r306558) +++ head/sys/netinet/udp_usrreq.c Sat Oct 1 19:39:09 2016 (r306559) @@ -1567,12 +1567,18 @@ udp_output(struct inpcb *inp, struct mbu release: if (unlock_udbinfo == UH_WLOCKED) { + KASSERT(unlock_inp == UH_WLOCKED, + ("%s: excl udbinfo lock, shared inp lock", __func__)); INP_HASH_WUNLOCK(pcbinfo); INP_WUNLOCK(inp); } else if (unlock_udbinfo == UH_RLOCKED) { + KASSERT(unlock_inp == UH_RLOCKED, + ("%s: shared udbinfo lock, excl inp lock", __func__)); INP_HASH_RUNLOCK(pcbinfo); INP_RUNLOCK(inp); - } else + } else if (unlock_inp == UH_WLOCKED) + INP_WUNLOCK(inp); + else INP_RUNLOCK(inp); m_freem(m); return (error); From owner-svn-src-head@freebsd.org Sat Oct 1 20:31:01 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 402C6A9419A; Sat, 1 Oct 2016 20:31:01 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 108C0CF6; Sat, 1 Oct 2016 20:31:00 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91KV0gD098851; Sat, 1 Oct 2016 20:31:00 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91KV09v098850; Sat, 1 Oct 2016 20:31:00 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201610012031.u91KV09v098850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 1 Oct 2016 20:31:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306560 - head/usr.bin/patch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 20:31:01 -0000 Author: pfg Date: Sat Oct 1 20:31:00 2016 New Revision: 306560 URL: https://svnweb.freebsd.org/changeset/base/306560 Log: patch(1): make some macros look boolean. Minor cleanup inspired by a new patch(1) variant in schily tools. For reference: https://sourceforge.net/p/schillix-on/ MFC after: 1 week Modified: head/usr.bin/patch/common.h Modified: head/usr.bin/patch/common.h ============================================================================== --- head/usr.bin/patch/common.h Sat Oct 1 19:39:09 2016 (r306559) +++ head/usr.bin/patch/common.h Sat Oct 1 20:31:00 2016 (r306560) @@ -48,9 +48,9 @@ /* handy definitions */ #define strNE(s1,s2) (strcmp(s1, s2)) -#define strEQ(s1,s2) (!strcmp(s1, s2)) +#define strEQ(s1,s2) (strcmp(s1, s2) == 0) #define strnNE(s1,s2,l) (strncmp(s1, s2, l)) -#define strnEQ(s1,s2,l) (!strncmp(s1, s2, l)) +#define strnEQ(s1,s2,l) (strncmp(s1, s2, l) == 0) /* typedefs */ From owner-svn-src-head@freebsd.org Sat Oct 1 20:46:03 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28215A94815; Sat, 1 Oct 2016 20:46:03 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA1B98C0; Sat, 1 Oct 2016 20:46:02 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91Kk2vg003863; Sat, 1 Oct 2016 20:46:02 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91Kk2q6003862; Sat, 1 Oct 2016 20:46:02 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201610012046.u91Kk2q6003862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 1 Oct 2016 20:46:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306561 - head/usr.bin/patch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 20:46:03 -0000 Author: pfg Date: Sat Oct 1 20:46:01 2016 New Revision: 306561 URL: https://svnweb.freebsd.org/changeset/base/306561 Log: patch(1): make some macros look boolean. Similar to r306560, plus remove an unused macro. Suggested by: jmallett Modified: head/usr.bin/patch/common.h Modified: head/usr.bin/patch/common.h ============================================================================== --- head/usr.bin/patch/common.h Sat Oct 1 20:31:00 2016 (r306560) +++ head/usr.bin/patch/common.h Sat Oct 1 20:46:01 2016 (r306561) @@ -47,9 +47,8 @@ /* handy definitions */ -#define strNE(s1,s2) (strcmp(s1, s2)) #define strEQ(s1,s2) (strcmp(s1, s2) == 0) -#define strnNE(s1,s2,l) (strncmp(s1, s2, l)) +#define strnNE(s1,s2,l) (strncmp(s1, s2, l) != 0) #define strnEQ(s1,s2,l) (strncmp(s1, s2, l) == 0) /* typedefs */ From owner-svn-src-head@freebsd.org Sat Oct 1 22:01:42 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48F76A94C04; Sat, 1 Oct 2016 22:01:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 217B89A5; Sat, 1 Oct 2016 22:01:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91M1fmT033480; Sat, 1 Oct 2016 22:01:41 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91M1fBV033479; Sat, 1 Oct 2016 22:01:41 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610012201.u91M1fBV033479@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 1 Oct 2016 22:01:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306562 - head/usr.bin/kdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 22:01:42 -0000 Author: jhb Date: Sat Oct 1 22:01:41 2016 New Revision: 306562 URL: https://svnweb.freebsd.org/changeset/base/306562 Log: Handle 64-bit system call arguments (off_t, id_t). In particular, 64-bit system call arguments use up two register_t arguments for 32-bit processes. They must also be aligned on a 64-bit boundary on 32-bit powerpc processes. This fixes the decoding of lseek(), procctl(), and wait6() arguments for 32-bit processes (both native and via freebsd32). Note that the ktrace system call return record only returns a single register, so the return value of lseek is always truncated to the low 32-bits for 32-bit processes. Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Sat Oct 1 20:46:01 2016 (r306561) +++ head/usr.bin/kdump/kdump.c Sat Oct 1 22:01:41 2016 (r306562) @@ -74,6 +74,7 @@ extern int errno; #include #include #include +#include #include #include #include @@ -132,6 +133,27 @@ static struct ktr_header ktr_header; #define TIME_FORMAT "%b %e %T %Y" #define eqs(s1, s2) (strcmp((s1), (s2)) == 0) +#define print_number64(first,i,n,c) do { \ + uint64_t __v; \ + \ + if (quad_align && (((ptrdiff_t)((i) - (first))) & 1) == 1) { \ + (i)++; \ + (n)--; \ + } \ + if (quad_slots == 2) \ + __v = (uint64_t)(uint32_t)(i)[0] | \ + ((uint64_t)(uint32_t)(i)[1]) << 32; \ + else \ + __v = (uint64_t)*(i); \ + if (decimal) \ + printf("%c%jd", (c), (intmax_t)__v); \ + else \ + printf("%c%#jx", (c), (uintmax_t)__v); \ + (i) += quad_slots; \ + (n) -= quad_slots; \ + (c) = ','; \ +} while (0) + #define print_number(i,n,c) do { \ if (decimal) \ printf("%c%jd", c, (intmax_t)*i); \ @@ -705,16 +727,25 @@ void ktrsyscall(struct ktr_syscall *ktr, u_int sv_flags) { int narg = ktr->ktr_narg; - register_t *ip; + register_t *ip, *first; intmax_t arg; + int quad_align, quad_slots; syscallname(ktr->ktr_code, sv_flags); - ip = &ktr->ktr_args[0]; + ip = first = &ktr->ktr_args[0]; if (narg) { char c = '('; if (fancy && (sv_flags == 0 || (sv_flags & SV_ABI_MASK) == SV_ABI_FREEBSD)) { + quad_align = 0; + if (sv_flags & SV_ILP32) { +#ifdef __powerpc__ + quad_align = 1; +#endif + quad_slots = 2; + } else + quad_slots = 1; switch (ktr->ktr_code) { case SYS_bindat: case SYS_connectat: @@ -796,7 +827,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in c = ','; ip++; narg--; - print_number(ip, narg, c); + print_number64(first, ip, narg, c); print_number(ip, narg, c); putchar(','); wait6optname(*ip); @@ -996,7 +1027,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in print_number(ip, narg, c); /* Hidden 'pad' argument, not in lseek(2) */ print_number(ip, narg, c); - print_number(ip, narg, c); + print_number64(first, ip, narg, c); putchar(','); whencename(*ip); ip++; @@ -1005,8 +1036,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in #endif case SYS_lseek: print_number(ip, narg, c); - /* Hidden 'pad' argument, not in lseek(2) */ - print_number(ip, narg, c); + print_number64(first, ip, narg, c); putchar(','); whencename(*ip); ip++; @@ -1285,7 +1315,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in c = ','; ip++; narg--; - print_number(ip, narg, c); + print_number64(first, ip, narg, c); putchar(','); procctlcmdname(*ip); ip++; From owner-svn-src-head@freebsd.org Sat Oct 1 22:03:42 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3AACA94CF4; Sat, 1 Oct 2016 22:03:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7106CCFE; Sat, 1 Oct 2016 22:03:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91M3fbO033589; Sat, 1 Oct 2016 22:03:41 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91M3f2K033588; Sat, 1 Oct 2016 22:03:41 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610012203.u91M3f2K033588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 1 Oct 2016 22:03:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306563 - head/usr.bin/kdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 22:03:42 -0000 Author: jhb Date: Sat Oct 1 22:03:41 2016 New Revision: 306563 URL: https://svnweb.freebsd.org/changeset/base/306563 Log: Decode arguments to truncate and ftruncate. In particular, decode the off_t argument as a 64-bit argument to fix decoding for 32-bit processes. Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Sat Oct 1 22:01:41 2016 (r306562) +++ head/usr.bin/kdump/kdump.c Sat Oct 1 22:03:41 2016 (r306563) @@ -1341,6 +1341,12 @@ ktrsyscall(struct ktr_syscall *ktr, u_in } ip++; narg--; + break; + case SYS_ftruncate: + case SYS_truncate: + print_number(ip, narg, c); + print_number64(first, ip, narg, c); + break; } } while (narg > 0) { From owner-svn-src-head@freebsd.org Sat Oct 1 22:08:09 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E6EDA94D83; Sat, 1 Oct 2016 22:08:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24FF6E8C; Sat, 1 Oct 2016 22:08:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91M88VA033784; Sat, 1 Oct 2016 22:08:08 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91M88U2033782; Sat, 1 Oct 2016 22:08:08 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610012208.u91M88U2033782@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 1 Oct 2016 22:08:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306564 - in head: sys/sys usr.bin/kdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 22:08:09 -0000 Author: jhb Date: Sat Oct 1 22:08:07 2016 New Revision: 306564 URL: https://svnweb.freebsd.org/changeset/base/306564 Log: Expose kernel-only errno values if _WANT_KERNEL_ERRNO is defined. The kernel uses a few negative errno values for internal conditions such as requesting a system call restart. Normally these errno values are not exposed to userland. However, kdump needs access to these values as some of then can be present in a ktrace system call return record. Previously kdump was defining _KERNEL to gain access to ehse values, but was then having to manually declare 'errno' (and doing it incorrectly). Now, kdump uses _WANT_KERNEL_ERRNO instead of _KERNEL and uses the system-provided declaration of errno. Modified: head/sys/sys/errno.h head/usr.bin/kdump/kdump.c Modified: head/sys/sys/errno.h ============================================================================== --- head/sys/sys/errno.h Sat Oct 1 22:03:41 2016 (r306563) +++ head/sys/sys/errno.h Sat Oct 1 22:08:07 2016 (r306564) @@ -184,7 +184,7 @@ __END_DECLS #define ELAST 96 /* Must be equal largest errno */ #endif /* _POSIX_SOURCE */ -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_WANT_KERNEL_ERRNO) /* pseudo-errors returned inside kernel to modify return to process */ #define ERESTART (-1) /* restart syscall */ #define EJUSTRETURN (-2) /* don't modify regs, just return */ Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Sat Oct 1 22:03:41 2016 (r306563) +++ head/usr.bin/kdump/kdump.c Sat Oct 1 22:08:07 2016 (r306564) @@ -41,10 +41,7 @@ static char sccsid[] = "@(#)kdump.c 8.1 #include __FBSDID("$FreeBSD$"); -#define _KERNEL -extern int errno; -#include -#undef _KERNEL +#define _WANT_KERNEL_ERRNO #include #include #include From owner-svn-src-head@freebsd.org Sat Oct 1 22:12:35 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 409BCA94F47; Sat, 1 Oct 2016 22:12:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E30FB286; Sat, 1 Oct 2016 22:12:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91MCY6l037284; Sat, 1 Oct 2016 22:12:34 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91MCYDc037283; Sat, 1 Oct 2016 22:12:34 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610012212.u91MCYDc037283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 1 Oct 2016 22:12:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306565 - head/usr.bin/kdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 22:12:35 -0000 Author: jhb Date: Sat Oct 1 22:12:33 2016 New Revision: 306565 URL: https://svnweb.freebsd.org/changeset/base/306565 Log: Use timercmp() and timersub() in kdump. Previously, kdump used the kernel-only timervalsub() macro which required defining _KERNEL when including . Now, kdump uses the existing userland API. The timercmp() usage to check for a backwards timestamp is also clearer and simpler than the previous code which checked the result of the subtraction for a negative value. While here, take advantage of the 3-arg timersub() to store the subtraction results in a tempory timeval instead of overwriting the timestamp in the ktrace record and then having to restore it. Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Sat Oct 1 22:08:07 2016 (r306564) +++ head/usr.bin/kdump/kdump.c Sat Oct 1 22:12:33 2016 (r306565) @@ -45,9 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define _KERNEL #include -#undef _KERNEL #include #include #include @@ -637,27 +635,23 @@ dumpheader(struct ktr_header *kth) if (timestamp & TIMESTAMP_ELAPSED) { if (prevtime_e.tv_sec == 0) prevtime_e = kth->ktr_time; - timevalsub(&kth->ktr_time, &prevtime_e); - printf("%jd.%06ld ", (intmax_t)kth->ktr_time.tv_sec, - kth->ktr_time.tv_usec); - timevaladd(&kth->ktr_time, &prevtime_e); + timersub(&kth->ktr_time, &prevtime_e, &temp); + printf("%jd.%06ld ", (intmax_t)temp.tv_sec, + temp.tv_usec); } if (timestamp & TIMESTAMP_RELATIVE) { if (prevtime.tv_sec == 0) prevtime = kth->ktr_time; - temp = kth->ktr_time; - timevalsub(&kth->ktr_time, &prevtime); - if ((intmax_t)kth->ktr_time.tv_sec < 0) { - kth->ktr_time = prevtime; - prevtime = temp; - timevalsub(&kth->ktr_time, &prevtime); + if (timercmp(&kth->ktr_time, &prevtime, <)) { + timersub(&prevtime, &kth->ktr_time, &temp); sign = "-"; } else { - prevtime = temp; + timersub(&kth->ktr_time, &prevtime, &temp); sign = ""; } - printf("%s%jd.%06ld ", sign, (intmax_t)kth->ktr_time.tv_sec, - kth->ktr_time.tv_usec); + prevtime = kth->ktr_time; + printf("%s%jd.%06ld ", sign, (intmax_t)temp.tv_sec, + temp.tv_usec); } } printf("%s ", type); From owner-svn-src-head@freebsd.org Sat Oct 1 22:17:42 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14284A94FCC; Sat, 1 Oct 2016 22:17:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D08BA667; Sat, 1 Oct 2016 22:17:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91MHflI037518; Sat, 1 Oct 2016 22:17:41 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91MHfvf037517; Sat, 1 Oct 2016 22:17:41 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610012217.u91MHfvf037517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 1 Oct 2016 22:17:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306566 - head/usr.bin/kdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 22:17:42 -0000 Author: jhb Date: Sat Oct 1 22:17:40 2016 New Revision: 306566 URL: https://svnweb.freebsd.org/changeset/base/306566 Log: Don't declare the 'temp' timeval as static. Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Sat Oct 1 22:12:33 2016 (r306565) +++ head/usr.bin/kdump/kdump.c Sat Oct 1 22:17:40 2016 (r306566) @@ -562,7 +562,8 @@ void dumpheader(struct ktr_header *kth) { static char unknown[64]; - static struct timeval prevtime, prevtime_e, temp; + static struct timeval prevtime, prevtime_e; + struct timeval temp; const char *type; const char *sign; From owner-svn-src-head@freebsd.org Sat Oct 1 22:21:11 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 355F5A940C2; Sat, 1 Oct 2016 22:21:11 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05B5C99F; Sat, 1 Oct 2016 22:21:10 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91MLA0S040373; Sat, 1 Oct 2016 22:21:10 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91MLAvZ040372; Sat, 1 Oct 2016 22:21:10 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201610012221.u91MLAvZ040372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 1 Oct 2016 22:21:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306567 - head/sys/dev/lmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 22:21:11 -0000 Author: vangyzen Date: Sat Oct 1 22:21:10 2016 New Revision: 306567 URL: https://svnweb.freebsd.org/changeset/base/306567 Log: lmc(4): fix the build without the bpf device "make buildkernel" now works with and without "device bpf". Reported by: Dave Mischler MFC after: 3 days Sponsored by: Dell EMC Modified: head/sys/dev/lmc/if_lmc.c Modified: head/sys/dev/lmc/if_lmc.c ============================================================================== --- head/sys/dev/lmc/if_lmc.c Sat Oct 1 22:17:40 2016 (r306566) +++ head/sys/dev/lmc/if_lmc.c Sat Oct 1 22:21:10 2016 (r306567) @@ -91,7 +91,11 @@ # define P2P 0 /* not in FreeBSD */ # define NSPPP 1 /* No count devices in FreeBSD 5 */ # include "opt_bpf.h" /* DEV_BPF */ -# define NBPFILTER DEV_BPF +# ifdef DEV_BPF +# define NBPFILTER 1 +# else +# define NBPFILTER 0 +# endif # define GEN_HDLC 0 /* not in FreeBSD */ # # include From owner-svn-src-head@freebsd.org Sat Oct 1 22:34:40 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B1ADA9449D; Sat, 1 Oct 2016 22:34:40 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00A25F7C; Sat, 1 Oct 2016 22:34:39 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91MYdtE044970; Sat, 1 Oct 2016 22:34:39 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91MYdSO044969; Sat, 1 Oct 2016 22:34:39 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201610012234.u91MYdSO044969@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 1 Oct 2016 22:34:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306568 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 22:34:40 -0000 Author: vangyzen Date: Sat Oct 1 22:34:38 2016 New Revision: 306568 URL: https://svnweb.freebsd.org/changeset/base/306568 Log: Add the __printflike attribute to the declaration of dprintf(3) MFC after: 3 days Sponsored by: Dell EMC Modified: head/include/stdio.h Modified: head/include/stdio.h ============================================================================== --- head/include/stdio.h Sat Oct 1 22:21:10 2016 (r306567) +++ head/include/stdio.h Sat Oct 1 22:34:38 2016 (r306568) @@ -359,7 +359,7 @@ int renameat(int, const char *, int, co int vdprintf(int, const char * __restrict, __va_list); /* _WITH_GETLINE to allow pre 11 sources to build on 11+ systems */ ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict); -int dprintf(int, const char * __restrict, ...); +int dprintf(int, const char * __restrict, ...) __printflike(2, 3); #endif /* __POSIX_VISIBLE >= 200809 */ /* From owner-svn-src-head@freebsd.org Sat Oct 1 23:08:27 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CE7DA94C15; Sat, 1 Oct 2016 23:08:27 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FBCBCDD; Sat, 1 Oct 2016 23:08:27 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u91N8QVf056259; Sat, 1 Oct 2016 23:08:26 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u91N8Qh9056258; Sat, 1 Oct 2016 23:08:26 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201610012308.u91N8Qh9056258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 1 Oct 2016 23:08:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306569 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 23:08:27 -0000 Author: vangyzen Date: Sat Oct 1 23:08:26 2016 New Revision: 306569 URL: https://svnweb.freebsd.org/changeset/base/306569 Log: Add the __printflike attribute to the declaration of vdprintf(3) I intended to add this in r306568. MFC after: 3 days Sponsored by: Dell EMC Modified: head/include/stdio.h Modified: head/include/stdio.h ============================================================================== --- head/include/stdio.h Sat Oct 1 22:34:38 2016 (r306568) +++ head/include/stdio.h Sat Oct 1 23:08:26 2016 (r306569) @@ -356,7 +356,7 @@ ssize_t getdelim(char ** __restrict, si FILE * __restrict); FILE *open_memstream(char **, size_t *); int renameat(int, const char *, int, const char *); -int vdprintf(int, const char * __restrict, __va_list); +int vdprintf(int, const char * __restrict, __va_list) __printflike(2, 0); /* _WITH_GETLINE to allow pre 11 sources to build on 11+ systems */ ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict); int dprintf(int, const char * __restrict, ...) __printflike(2, 3);