Re: svn commit: r316064 - head/sys/boot/i386/boot2
On Mon, 27 Mar 2017, Warner Losh wrote: Log: Fix build with path names with 'align' or 'nop' in them. clang is now inserting .file directives with the entire path in them. This is fine, except that our sed peephole optimizer removes them if ${SRCTOP} or ${OBJTOP} contains 'align' or 'nop', leading to build failures. The sed peephole optimizer removes useful things for boot2 when used with clang, so restrict its use to gcc. Also, gcc no longer generates nops to pad things, so there's no point in removing it. Specialize the optimization to just removing the .align 4 lines to preclude inadvertant path matching. Sponsored by: Netflix Commit brought to you the path: /home/xxx/NCD-3592-logsynopts/FreeBSD Modified: head/sys/boot/i386/boot2/Makefile Modified: head/sys/boot/i386/boot2/Makefile == --- head/sys/boot/i386/boot2/Makefile Mon Mar 27 22:34:43 2017 (r316063) +++ head/sys/boot/i386/boot2/Makefile Mon Mar 27 22:53:36 2017 (r316064) @@ -91,10 +91,18 @@ boot2.o: boot2.s SRCS= boot2.c boot2.h +# Gcc (4.2.1 at least) benefits from removing the forced alignment +# clang doesn't. Make the removal as specific as possible to avoid +# false positives (like path names with odd names for debugging info). +# In the past, gcc benefited from nop removal, but not in 4.2.1. +# Think of this as a poor-man's peephole optimizer for gcc 4.2.1 boot2.s: boot2.c boot2.h ${.CURDIR}/../../common/ufsread.c ${CC} ${CFLAGS} -S -o boot2.s.tmp ${.CURDIR}/boot2.c - sed -e '/align/d' -e '/nop/d' < boot2.s.tmp > boot2.s - rm -f boot2.s.tmp +.if ${COMPILER_TYPE} == "gcc" + sed -e '/\.align 4/d' < boot2.s.tmp > boot2.s +.else + cp boot2.s.tmp boot2.s +.endif boot2.h: boot1.out ${NM} -t d ${.ALLSRC} | awk '/([0-9])+ T xread/ \ That's silly; if you just fix the regexps to actually be as specifice as possible, then they would just work with no need for large comments or ifdefs. '\.align' instead of 'align' is a good start. ' 4' instead of nothing is not so good. There should also be a check for nothing except whitespace before '\.align'. The whitespace before '4' might be a tab, but perhaps gcc only generates a space, and only generates unwanted alignments of precisely 4, with no fill bytes. The general syntax would be too hard to parse, but it is easy to handle any digit, and also '\.p2align', and allow nothing except whitespace after the digit. Last time I looked at this about 5 years ago, but after clang, the whole optimization step was silly. It made little difference for gcc and no difference for clang as you say. The nop removal that you removed was silliest. I think compilers stopped generating nops for padding many years before that code was written. In text sections, They should generate something like '.p2align x,y,z', where x is the alignment, y is empty (it is the fill byte, which defaults to nop, but we don't want that but want a larger null instruction for multiple bytes) and z is a limit on the amount of padding (x is only a preference and z limits it). This syntax would be hard to parse. But CFLAGS has -Os, and that works for preventing padding in the text section, so nop is never generated, not even with the spelling 'align'. -Os doesn't work so well for other things. For kernels, it is completely broken with gcc-4.2.1 unless -fno-inline-functions is also used (it breaks the inlining parameters whose misconfiguration is probably the actual bug. This doesn't seem to be a problem for boot code. IIRC, the only simply broken thing is that alignment is still done for variables. This generates ".align 4". -Os is differently broken for clang, so the simple editing doesn't help. -Wa,-al to see what the assembler is doing is broken for clang. -mpreferred-stack-boundary doesn't work for clang, so is not used, but clang does better stack alignment by default. This might still waste some instructions, but not for every function. -mno-align-long-strings doesn't work for clang or for gcc > 4.2.1, so is not used. clang does quite different string padding by default, and IIRC it is worse. But boot2 hardly has any long strings. boot code is hard to test since it is not modular. This is much more broken than when I last tested the size of boot2.o. The most obvious new bugs are: - something like SRCTOP breaks finding the relative path to ufs headers in a FreeBSD-11 sys tree - ${CLANG_OPT_SMALL} is added for all compilers. This is defined out-of-tree in /usr/share/mk/bsd.sys.mk. (I tested on a host running nearly -current with a nearly FreeBSD-10 sys tree). In boot2, CLANG_P{T_SMALL is wrong even for clang since it contains -mstack-alignment=8 unconditionally, but the stack alignment should be 4 or even 1 with -m32 -Os. Fixing this makes no difference for boot2.o compiled by clang. The corresponding -mpreferred-stack-boundary=2 for gcc is
svn commit: r316067 - head/sys/arm/conf
Author: emaste Date: Tue Mar 28 00:57:33 2017 New Revision: 316067 URL: https://svnweb.freebsd.org/changeset/base/316067 Log: Remove usfs(4) from arm kernel configs cfumass(4) is not usable if usfs(4) is loaded or compiled into the kernel. Remove usfs so that the user may kldload the USB mass storage target they prefer. PR: 218169 Reviewed by: trasz, hselasky (no objection) Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D10153 Modified: head/sys/arm/conf/ATMEL head/sys/arm/conf/BEAGLEBONE head/sys/arm/conf/EB9200 head/sys/arm/conf/GENERIC head/sys/arm/conf/KB920X Modified: head/sys/arm/conf/ATMEL == --- head/sys/arm/conf/ATMEL Tue Mar 28 00:39:41 2017(r316066) +++ head/sys/arm/conf/ATMEL Tue Mar 28 00:57:33 2017(r316067) @@ -145,7 +145,6 @@ device umass # Disks/Mass storage - R # USB device (gadget) support device at91_dci# Atmel's usb device -device usfs# emulate a flash device cdce# emulate an ethernet device usb_template# Control of the gadget Modified: head/sys/arm/conf/BEAGLEBONE == --- head/sys/arm/conf/BEAGLEBONETue Mar 28 00:39:41 2017 (r316066) +++ head/sys/arm/conf/BEAGLEBONETue Mar 28 00:57:33 2017 (r316067) @@ -114,9 +114,8 @@ device bpf # USB Ethernet support, requires miibus device miibus -# Device mode support and USFS template +# Device mode support device usb_template# Control of the gadget -device usfs # Pinmux device fdt_pinctrl Modified: head/sys/arm/conf/EB9200 == --- head/sys/arm/conf/EB9200Tue Mar 28 00:39:41 2017(r316066) +++ head/sys/arm/conf/EB9200Tue Mar 28 00:57:33 2017(r316067) @@ -111,7 +111,6 @@ device umass # Disks/Mass storage - R # USB device (gadget) support #deviceat91_dci# Atmel's usb device -#deviceusfs# emulate a flash #devicecdce# emulate an ethernet #deviceusb_template# Control of the gadget Modified: head/sys/arm/conf/GENERIC == --- head/sys/arm/conf/GENERIC Tue Mar 28 00:39:41 2017(r316066) +++ head/sys/arm/conf/GENERIC Tue Mar 28 00:57:33 2017(r316067) @@ -183,9 +183,8 @@ device umass # Disks/Mass storage - R device uhid# "Human Interface Devices" device ukbd# Allow keyboard like HIDs to control console -# Device mode support and USFS template +# Device mode support device usb_template# Control of the gadget -device usfs # Ethernet device loop Modified: head/sys/arm/conf/KB920X == --- head/sys/arm/conf/KB920XTue Mar 28 00:39:41 2017(r316066) +++ head/sys/arm/conf/KB920XTue Mar 28 00:57:33 2017(r316067) @@ -153,7 +153,6 @@ device zyd # ZyDAS zd1211/zd1211b wir # USB device (gadget) support device at91_dci# Atmel's usb device -device usfs# emulate a flash device cdce# emulate an ethernet device usb_template# Control of the gadget ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316066 - head/sys/cam/scsi
Author: bdrewery Date: Tue Mar 28 00:39:41 2017 New Revision: 316066 URL: https://svnweb.freebsd.org/changeset/base/316066 Log: Release ccb if mode_buffer allocation fails. MFC after:2 weeks Obtained from:OneFS Sponsored by: Dell EMC Isilon Modified: head/sys/cam/scsi/scsi_ch.c Modified: head/sys/cam/scsi/scsi_ch.c == --- head/sys/cam/scsi/scsi_ch.c Mon Mar 27 23:48:36 2017(r316065) +++ head/sys/cam/scsi/scsi_ch.c Tue Mar 28 00:39:41 2017(r316066) @@ -1569,6 +1569,7 @@ chgetparams(struct cam_periph *periph) if (mode_buffer == NULL) { printf("chgetparams: couldn't malloc mode sense data\n"); + xpt_release_ccb(ccb); return(ENOSPC); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316065 - head/sys/netinet
Author: karels Date: Mon Mar 27 23:48:36 2017 New Revision: 316065 URL: https://svnweb.freebsd.org/changeset/base/316065 Log: Enable route and LLE (ndp) caching in TCP/IPv6 tcp_output.c was using a route on the stack for IPv6, which does not allow route caching or LLE/ndp caching. Switch to using the route (v6 flavor) in the in_pcb, which was already present, which caches both L3 and L2 lookups. Reviewed by: gnn hiren MFC after:2 weeks Modified: head/sys/netinet/tcp_output.c Modified: head/sys/netinet/tcp_output.c == --- head/sys/netinet/tcp_output.c Mon Mar 27 22:53:36 2017 (r316064) +++ head/sys/netinet/tcp_output.c Mon Mar 27 23:48:36 2017 (r316065) @@ -1377,9 +1377,6 @@ send: */ #ifdef INET6 if (isipv6) { - struct route_in6 ro; - - bzero(, sizeof(ro)); /* * we separately set hoplimit for every segment, since the * user might want to change the value via setsockopt. @@ -1411,13 +1408,13 @@ send: #endif /* TODO: IPv6 IP6TOS_ECT bit on */ - error = ip6_output(m, tp->t_inpcb->in6p_outputopts, , + error = ip6_output(m, tp->t_inpcb->in6p_outputopts, + >t_inpcb->inp_route6, ((so->so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0), NULL, NULL, tp->t_inpcb); - if (error == EMSGSIZE && ro.ro_rt != NULL) - mtu = ro.ro_rt->rt_mtu; - RO_RTFREE(); + if (error == EMSGSIZE && tp->t_inpcb->inp_route6.ro_rt != NULL) + mtu = tp->t_inpcb->inp_route6.ro_rt->rt_mtu; } #endif /* INET6 */ #if defined(INET) && defined(INET6) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316064 - head/sys/boot/i386/boot2
Author: imp Date: Mon Mar 27 22:53:36 2017 New Revision: 316064 URL: https://svnweb.freebsd.org/changeset/base/316064 Log: Fix build with path names with 'align' or 'nop' in them. clang is now inserting .file directives with the entire path in them. This is fine, except that our sed peephole optimizer removes them if ${SRCTOP} or ${OBJTOP} contains 'align' or 'nop', leading to build failures. The sed peephole optimizer removes useful things for boot2 when used with clang, so restrict its use to gcc. Also, gcc no longer generates nops to pad things, so there's no point in removing it. Specialize the optimization to just removing the .align 4 lines to preclude inadvertant path matching. Sponsored by: Netflix Commit brought to you the path: /home/xxx/NCD-3592-logsynopts/FreeBSD Modified: head/sys/boot/i386/boot2/Makefile Modified: head/sys/boot/i386/boot2/Makefile == --- head/sys/boot/i386/boot2/Makefile Mon Mar 27 22:34:43 2017 (r316063) +++ head/sys/boot/i386/boot2/Makefile Mon Mar 27 22:53:36 2017 (r316064) @@ -91,10 +91,18 @@ boot2.o: boot2.s SRCS= boot2.c boot2.h +# Gcc (4.2.1 at least) benefits from removing the forced alignment +# clang doesn't. Make the removal as specific as possible to avoid +# false positives (like path names with odd names for debugging info). +# In the past, gcc benefited from nop removal, but not in 4.2.1. +# Think of this as a poor-man's peephole optimizer for gcc 4.2.1 boot2.s: boot2.c boot2.h ${.CURDIR}/../../common/ufsread.c ${CC} ${CFLAGS} -S -o boot2.s.tmp ${.CURDIR}/boot2.c - sed -e '/align/d' -e '/nop/d' < boot2.s.tmp > boot2.s - rm -f boot2.s.tmp +.if ${COMPILER_TYPE} == "gcc" + sed -e '/\.align 4/d' < boot2.s.tmp > boot2.s +.else + cp boot2.s.tmp boot2.s +.endif boot2.h: boot1.out ${NM} -t d ${.ALLSRC} | awk '/([0-9])+ T xread/ \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316063 - in head: etc/mtree lib/libevent lib/libsqlite3
Author: adrian Date: Mon Mar 27 22:34:43 2017 New Revision: 316063 URL: https://svnweb.freebsd.org/changeset/base/316063 Log: [private] add libevent1 and sqlite3 include files for our private libraries. This, like including ucl private headers, is useful for writing new base system tools. Yes, anyone using these libraries shouldn't assume ABI compatibility. Reviewed by: bdrewery, bapt Differential Revision:https://reviews.freebsd.org/D10123 Modified: head/etc/mtree/BSD.usr.dist head/lib/libevent/Makefile head/lib/libsqlite3/Makefile Modified: head/etc/mtree/BSD.usr.dist == --- head/etc/mtree/BSD.usr.dist Mon Mar 27 22:00:03 2017(r316062) +++ head/etc/mtree/BSD.usr.dist Mon Mar 27 22:34:43 2017(r316063) @@ -11,6 +11,10 @@ private bsdstat .. +event +.. +sqlite3 +.. ucl .. .. Modified: head/lib/libevent/Makefile == --- head/lib/libevent/Makefile Mon Mar 27 22:00:03 2017(r316062) +++ head/lib/libevent/Makefile Mon Mar 27 22:34:43 2017(r316063) @@ -10,7 +10,7 @@ SHLIB_MAJOR= 1 PRIVATELIB= SRCS= buffer.c evbuffer.c event.c kqueue.c log.c poll.c select.c signal.c -HDRS= event.h +INCS= event.h CFLAGS+= -I${.CURDIR} \ -DHAVE_CLOCK_GETTIME \ Modified: head/lib/libsqlite3/Makefile == --- head/lib/libsqlite3/MakefileMon Mar 27 22:00:03 2017 (r316062) +++ head/lib/libsqlite3/MakefileMon Mar 27 22:34:43 2017 (r316063) @@ -7,6 +7,7 @@ SHLIB_MAJOR?= 0 LIBADD+= pthread SRCS= sqlite3.c +INCS= sqlite3.h sqlite3ext.h SQLITE=${SRCTOP}/contrib/sqlite3 .PATH: ${SQLITE} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316062 - head/sys/dev/cxgbe/iw_cxgbe
Author: np Date: Mon Mar 27 22:00:03 2017 New Revision: 316062 URL: https://svnweb.freebsd.org/changeset/base/316062 Log: cxgbe/iw_cxgbe: Defer the handling of error CQEs and RDMA_TERMINATE to the thread that deals with socket state changes. This eliminates various bad races with the ithread. Submitted by: KrishnamRaju ErapaRaju @ Chelsio (original version) MFC after:3 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c == --- head/sys/dev/cxgbe/iw_cxgbe/cm.cMon Mar 27 21:02:22 2017 (r316061) +++ head/sys/dev/cxgbe/iw_cxgbe/cm.cMon Mar 27 22:00:03 2017 (r316062) @@ -76,15 +76,15 @@ static spinlock_t req_lock; static TAILQ_HEAD(c4iw_ep_list, c4iw_ep_common) req_list; static struct work_struct c4iw_task; static struct workqueue_struct *c4iw_taskq; -static LIST_HEAD(timeout_list); -static spinlock_t timeout_lock; +static LIST_HEAD(err_cqe_list); +static spinlock_t err_cqe_lock; static void process_req(struct work_struct *ctx); static void start_ep_timer(struct c4iw_ep *ep); static int stop_ep_timer(struct c4iw_ep *ep); static int set_tcpinfo(struct c4iw_ep *ep); static void process_timeout(struct c4iw_ep *ep); -static void process_timedout_eps(void); +static void process_err_cqes(void); static enum c4iw_ep_state state_read(struct c4iw_ep_common *epc); static void __state_set(struct c4iw_ep_common *epc, enum c4iw_ep_state tostate); static void state_set(struct c4iw_ep_common *epc, enum c4iw_ep_state tostate); @@ -115,7 +115,10 @@ static void process_connected(struct c4i static int c4iw_so_upcall(struct socket *so, void *arg, int waitflag); static void process_socket_event(struct c4iw_ep *ep); static void release_ep_resources(struct c4iw_ep *ep); - +static int process_terminate(struct c4iw_ep *ep); +static int terminate(struct sge_iq *iq, const struct rss_header *rss, +struct mbuf *m); +static int add_ep_to_req_list(struct c4iw_ep *ep, int ep_events); #define START_EP_TIMER(ep) \ do { \ CTR3(KTR_IW_CXGBE, "start_ep_timer (%s:%d) ep %p", \ @@ -224,22 +227,32 @@ static void process_timeout(struct c4iw_ return; } -static void process_timedout_eps(void) +struct cqe_list_entry { + struct list_head entry; + struct c4iw_dev *rhp; + struct t4_cqe err_cqe; +}; + +static void +process_err_cqes(void) { - struct c4iw_ep *ep; + unsigned long flag; + struct cqe_list_entry *cle; - spin_lock(_lock); - while (!list_empty(_list)) { + spin_lock_irqsave(_cqe_lock, flag); + while (!list_empty(_cqe_list)) { struct list_head *tmp; - tmp = timeout_list.next; + tmp = err_cqe_list.next; list_del(tmp); tmp->next = tmp->prev = NULL; - spin_unlock(_lock); - ep = list_entry(tmp, struct c4iw_ep, entry); - process_timeout(ep); - spin_lock(_lock); + spin_unlock_irqrestore(_cqe_lock, flag); + cle = list_entry(tmp, struct cqe_list_entry, entry); + c4iw_ev_dispatch(cle->rhp, >err_cqe); + free(cle, M_CXGBE); + spin_lock_irqsave(_cqe_lock, flag); } - spin_unlock(_lock); + spin_unlock_irqrestore(_cqe_lock, flag); + return; } @@ -247,23 +260,31 @@ static void process_req(struct work_struct *ctx) { struct c4iw_ep_common *epc; + unsigned long flag; + int ep_events; - process_timedout_eps(); - spin_lock(_lock); + process_err_cqes(); + spin_lock_irqsave(_lock, flag); while (!TAILQ_EMPTY(_list)) { epc = TAILQ_FIRST(_list); TAILQ_REMOVE(_list, epc, entry); epc->entry.tqe_prev = NULL; - spin_unlock(_lock); - CTR3(KTR_IW_CXGBE, "%s so :%p, ep:%p", __func__, - epc->so, epc); - if (epc->so) + ep_events = epc->ep_events; + epc->ep_events = 0; + spin_unlock_irqrestore(_lock, flag); + CTR4(KTR_IW_CXGBE, "%s: so %p, ep %p, events 0x%x", __func__, + epc->so, epc, ep_events); + if (ep_events & C4IW_EVENT_TERM) + process_terminate((struct c4iw_ep *)epc); + if (ep_events & C4IW_EVENT_TIMEOUT) + process_timeout((struct c4iw_ep *)epc); + if (ep_events & C4IW_EVENT_SOCKET) process_socket_event((struct c4iw_ep *)epc); c4iw_put_ep(epc); - process_timedout_eps(); - spin_lock(_lock); + process_err_cqes(); + spin_lock_irqsave(_lock, flag); } -
svn commit: r316061 - head/share/misc
Author: bapt Date: Mon Mar 27 21:02:22 2017 New Revision: 316061 URL: https://svnweb.freebsd.org/changeset/base/316061 Log: Update pci_vendors to 2017-03-16 Modified: head/share/misc/pci_vendors Modified: head/share/misc/pci_vendors == --- head/share/misc/pci_vendors Mon Mar 27 21:00:49 2017(r316060) +++ head/share/misc/pci_vendors Mon Mar 27 21:02:22 2017(r316061) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2017.02.15 -# Date:2017-02-15 03:15:02 +# Version: 2017.03.16 +# Date:2017-03-16 03:15:01 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -2426,6 +2426,7 @@ 144d c0c7 Radeon HD 7550M 6842 Thames LE [Radeon HD 7000M Series] 6843 Thames [Radeon HD 7670M] + 687f Vega [Radeon RX Vega] 6888 Cypress XT [FirePro V8800] 6889 Cypress PRO [FirePro V7800] 1002 0301 FirePro V7800P @@ -10114,6 +10115,7 @@ 10d8 GT218 [NVS 300] 10ef GP102 HDMI Audio Controller 10f0 GP104 High Definition Audio Controller + 10f1 GP106 High Definition Audio Controller 1140 GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] 1019 0799 GeForce 820M 1019 999f GeForce GT 720M @@ -10692,6 +10694,7 @@ 17fd GM200GL [Tesla M40] 1b00 GP102 [TITAN X] 1b01 GP102 + 1b06 GP102 [GeForce GTX 1080 Ti] 1b30 GP102GL [Quadro P6000] 1b38 GP102GL [Tesla P40] 1b70 GP102GL @@ -10720,6 +10723,8 @@ 1c30 GP106GL 1c35 GP106 1c60 GP106M [GeForce GTX 1060 Mobile] + 1c61 GP106M [GeForce GTX 1050 Ti Mobile] + 1c62 GP106M [GeForce GTX 1050 Mobile] 1c70 GP106GL 1c80 GP107 1c81 GP107 [GeForce GTX 1050] @@ -10731,6 +10736,7 @@ 1ca8 GP107GL 1caa GP107GL 1d01 GP108 + 1d81 GV100 10df Emulex Corporation 0720 OneConnect NIC (Skyhawk) 103c 1934 FlexFabric 20Gb 2-port 650M Adapter @@ -11050,6 +11056,7 @@ 8813 RTL8813AE 802.11ac PCIe Wireless Network Adapter 8821 RTL8821AE 802.11ac PCIe Wireless Network Adapter b723 RTL8723BE PCIe Wireless Network Adapter + 10ec 8739 Dell Wireless 1801 10ed Ascii Corporation 7310 V7310 10ee Xilinx Corporation @@ -16459,6 +16466,14 @@ 1028 1fc1 Express Flash NVMe PM1725 800GB SFF 1028 1fc2 Express Flash NVMe PM1725 1.6TB SFF 1028 1fc4 Express Flash NVMe PM1725 1.6TB AIC + a822 NVMe SSD Controller 172Xa + 1028 1fd9 Express Flash NVMe PM1725a 800GB SFF + 1028 1fda Express Flash PM1725a 1.6TB SFF + 1028 1fdb Express Flash PM1725a 3.2TB SFF + 1028 1fdc Express Flash PM1725a 6.4TB SFF + 1028 1fdd Express Flash PM1725a 1.6TB AIC + 1028 1fde Express Flash PM1725a 3.2TB AIC + 1028 1fdf Express Flash PM1725a 6.4TB AIC 144e OLITEC 144f Askey Computer Corp. 1450 Octave Communications Ind. @@ -17098,14 +17113,14 @@ 16c8 BCM57301 NetXtreme-C 10Gb Ethernet Controller 16c9 BCM57302 NetXtreme-C 10Gb/25Gb Ethernet Controller 16ca BCM57304 NetXtreme-C 10Gb/25Gb/40Gb/50Gb Ethernet Controller - 16cb BCM57304 NetXtreme-C Ethernet Virtual Function + 16cb NetXtreme-C Ethernet Virtual Function 16cc BCM57417 NetXtreme-E Ethernet Partition 16ce BCM57311 NetXtreme-C 10Gb RDMA Ethernet Controller 16cf BCM57312 NetXtreme-C 10Gb/25Gb RDMA Ethernet Controller 16d0 BCM57402 NetXtreme-E 10Gb Ethernet Controller 16d1 BCM57404 NetXtreme-E 10Gb/25Gb Ethernet Controller 16d2 BCM57406 NetXtreme-E 10GBASE-T Ethernet Controller - 16d3 BCM57404 NetXtreme-E Ethernet Virtual Function + 16d3 NetXtreme-E Ethernet Virtual Function 16d4 BCM57402 NetXtreme-E Ethernet Partition 16d5 BCM57407 NetXtreme-E 10GBase-T Ethernet Controller 16d6 BCM57412 NetXtreme-E 10Gb RDMA Ethernet Controller @@ -17117,14 +17132,15 @@ 1590 0212 Ethernet 10Gb 2-port 535FLR-T Adapter 16d9 BCM57417 NetXtreme-E 10GBASE-T RDMA Ethernet Controller 108e 4866 Dual Port 10GBase-T Ethernet Controller - 16dc BCM57414 NetXtreme-E Ethernet Virtual Function + 16dc NetXtreme-E Ethernet Virtual Function 16dd NetLink BCM5781 Gigabit Ethernet PCI Express 16de BCM57412 NetXtreme-E Ethernet Partition 16df BCM57314 NetXtreme-C 10Gb/25Gb/40Gb/50Gb RDMA Ethernet Controller - 16e1 BCM57314 NetXtreme-C Ethernet Virtual Function + 16e1 NetXtreme-C Ethernet Virtual Function 16e2 BCM57417 NetXtreme-E 10Gb/25Gb
svn commit: r316060 - head/contrib/tzdata
Author: bapt Date: Mon Mar 27 21:00:49 2017 New Revision: 316060 URL: https://svnweb.freebsd.org/changeset/base/316060 Log: Import tzdata 2017b MFC after:2 days Modified: head/contrib/tzdata/Makefile head/contrib/tzdata/NEWS head/contrib/tzdata/Theory head/contrib/tzdata/africa head/contrib/tzdata/antarctica head/contrib/tzdata/asia head/contrib/tzdata/australasia head/contrib/tzdata/backward head/contrib/tzdata/backzone head/contrib/tzdata/europe head/contrib/tzdata/leap-seconds.list head/contrib/tzdata/leapseconds head/contrib/tzdata/northamerica head/contrib/tzdata/southamerica head/contrib/tzdata/version head/contrib/tzdata/zone.tab head/contrib/tzdata/zone1970.tab Directory Properties: head/contrib/tzdata/ (props changed) Modified: head/contrib/tzdata/Makefile == --- head/contrib/tzdata/MakefileMon Mar 27 20:57:44 2017 (r316059) +++ head/contrib/tzdata/MakefileMon Mar 27 21:00:49 2017 (r316060) @@ -72,11 +72,11 @@ MANDIR= $(TOPDIR)/man LIBDIR=$(TOPDIR)/lib -# If you always want time values interpreted as "seconds since the epoch -# (not counting leap seconds)", use +# If you want only POSIX time, with time values interpreted as +# seconds since the epoch (not counting leap seconds), use # REDO= posix_only -# below. If you always want right time values interpreted as "seconds since -# the epoch" (counting leap seconds)", use +# below. If you want want only "right" time, with values interpreted +# as seconds since the epoch (counting leap seconds), use # REDO= right_only # below. If you want both sets of data available, with leap seconds not # counted normally, use @@ -85,7 +85,10 @@ LIBDIR= $(TOPDIR)/lib # normally, use # REDO= right_posix # below. POSIX mandates that leap seconds not be counted; for compatibility -# with it, use "posix_only" or "posix_right". +# with it, use "posix_only" or "posix_right". Use POSIX time on systems with +# leap smearing; this can work better than unsmeared "right" time with +# applications that are not leap second aware, and is closer to unsmeared +# "right" time than unsmeared POSIX time is (e.g., 0.5 vs 1.0 s max error). REDO= posix_right @@ -165,7 +168,7 @@ GCC_DEBUG_FLAGS = -Dlint -g3 -O3 -fno-co -Wshadow -Wstrict-prototypes -Wsuggest-attribute=const \ -Wsuggest-attribute=format -Wsuggest-attribute=noreturn \ -Wsuggest-attribute=pure -Wtrampolines \ - -Wunused -Wwrite-strings \ + -Wundef -Wunused -Wwrite-strings \ -Wno-address -Wno-format-nonliteral -Wno-sign-compare \ -Wno-type-limits -Wno-unused-parameter # Modified: head/contrib/tzdata/NEWS == --- head/contrib/tzdata/NEWSMon Mar 27 20:57:44 2017(r316059) +++ head/contrib/tzdata/NEWSMon Mar 27 21:00:49 2017(r316060) @@ -1,5 +1,129 @@ News for the tz database +Release 2017b - 2017-03-17 07:30:38 -0700 + + Briefly: Haiti has resumed DST. + + Changes to past and future time stamps + +Haiti resumed observance of DST in 2017. (Thanks to Steffen Thorsen.) + + Changes to past time stamps + +Liberia changed from -004430 to +00 on 1972-01-07, not 1972-05-01. + +Use "MMT" to abbreviate Liberia's time zone before 1972, as "-004430" +is one byte over the POSIX limit. (Problem reported by Derick Rethans.) + + +Release 2017a - 2017-02-28 00:05:36 -0800 + + Briefly: Southern Chile moves from -04/-03 to -03, and Mongolia + discontinues DST. + + Changes to future time stamps + +Mongolia no longer observes DST. (Thanks to Ganbold Tsagaankhuu.) + +Chile's Region of Magallanes moves from -04/-03 to -03 year-round. +Its clocks diverge from America/Santiago starting 2017-05-13 at +23:00, hiving off a new zone America/Punta_Arenas. Although the +Chilean government says this change expires in May 2019, for now +assume it's permanent. (Thanks to Juan Correa and Deborah +Goldsmith.) This also affects Antarctica/Palmer. + + Changes to past time stamps + +Fix many entries for historical time stamps for Europe/Madrid +before 1979, to agree with tables compiled by Pere Planesas of the +National Astronomical Observatory of Spain. As a side effect, +this changes some time stamps for Africa/Ceuta before 1929, which +are probably guesswork anyway. (Thanks to Steve Allen and +Pierpaolo Bernardi for the heads-ups, and to Michael Deckers for +correcting the 1901 transition.) + +Ecuador observed DST from 1992-11-28 to 1993-02-05. +(Thanks to Alois Treindl.) + +Asia/Atyrau and Asia/Oral were at +03 (not +04) before 1930-06-21. +(Thanks to Stepan Golosunov.) + + Changes to past and future time zone abbreviations + +
svn commit: r316057 - head/share/man/man9
Author: trasz Date: Mon Mar 27 20:32:12 2017 New Revision: 316057 URL: https://svnweb.freebsd.org/changeset/base/316057 Log: Document EVENTHANDLER_DEFINE(9). MFC after:2 weeks Sponsored by: DARPA, AFRL Modified: head/share/man/man9/EVENTHANDLER.9 head/share/man/man9/Makefile Modified: head/share/man/man9/EVENTHANDLER.9 == --- head/share/man/man9/EVENTHANDLER.9 Mon Mar 27 20:28:56 2017 (r316056) +++ head/share/man/man9/EVENTHANDLER.9 Mon Mar 27 20:32:12 2017 (r316057) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" $FreeBSD$ .\" -.Dd April 19, 2014 +.Dd March 27, 2017 .Dt EVENTHANDLER 9 .Os .Sh NAME @@ -32,6 +32,7 @@ .Sh SYNOPSIS .In sys/eventhandler.h .Fn EVENTHANDLER_DECLARE name type +.Fn EVENTHANDLER_DEFINE name func arg priority .Fn EVENTHANDLER_INVOKE name ... .Ft eventhandler_tag .Fn EVENTHANDLER_REGISTER name func arg priority @@ -60,6 +61,20 @@ mechanism provides a way for kernel subs kernel events and have their callback functions invoked when these events occur. .Pp +Callback functions are invoked in order of priority. +The relative priority of each callback among other callbacks +associated with an event is given by argument +.Fa priority , +which is an integer ranging from +.Dv EVENTHANDLER_PRI_FIRST +(highest priority), to +.Dv EVENTHANDLER_PRI_LAST +(lowest priority). +The symbol +.Dv EVENTHANDLER_PRI_ANY +may be used if the handler does not have a specific priority +associated with it. +.Pp The normal way to use this subsystem is via the macro interface. The macros that can be used for working with event handlers and callback function lists are: @@ -69,6 +84,21 @@ This macro declares an event handler nam .Fa name with callback functions of type .Fa type . +.It Fn EVENTHANDLER_DEFINE +This macro uses +.Xr SYSINIT 9 +to register a callback function +.Fa func +with event handler +.Fa name . +When invoked, function +.Fa func +will be invoked with argument +.Fa arg +as its first parameter along with any additional parameters passed in +via macro +.Fn EVENTHANDLER_INVOKE +(see below). .It Fn EVENTHANDLER_REGISTER This macro registers a callback function .Fa func @@ -82,19 +112,6 @@ as its first parameter along with any ad via macro .Fn EVENTHANDLER_INVOKE (see below). -Callback functions are invoked in order of priority. -The relative priority of each callback among other callbacks -associated with an event is given by argument -.Fa priority , -which is an integer ranging from -.Dv EVENTHANDLER_PRI_FIRST -(highest priority), to -.Dv EVENTHANDLER_PRI_LAST -(lowest priority). -The symbol -.Dv EVENTHANDLER_PRI_ANY -may be used if the handler does not have a specific priority -associated with it. If registration is successful, .Fn EVENTHANDLER_REGISTER returns a cookie of type Modified: head/share/man/man9/Makefile == --- head/share/man/man9/MakefileMon Mar 27 20:28:56 2017 (r316056) +++ head/share/man/man9/MakefileMon Mar 27 20:32:12 2017 (r316057) @@ -797,6 +797,7 @@ MLINKS+=DRIVER_MODULE.9 DRIVER_MODULE_OR DRIVER_MODULE.9 EARLY_DRIVER_MODULE.9 \ DRIVER_MODULE.9 EARLY_DRIVER_MODULE_ORDERED.9 MLINKS+=EVENTHANDLER.9 EVENTHANDLER_DECLARE.9 \ + EVENTHANDLER.9 EVENTHANDLER_DEFINE.9 \ EVENTHANDLER.9 EVENTHANDLER_DEREGISTER.9 \ EVENTHANDLER.9 eventhandler_deregister.9 \ EVENTHANDLER.9 eventhandler_find_list.9 \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316056 - head/share/man/man9
Author: trasz Date: Mon Mar 27 20:28:56 2017 New Revision: 316056 URL: https://svnweb.freebsd.org/changeset/base/316056 Log: The cn_consume was removed in r296716. MFC after:2 weeks Sponsored by: DARPA, AFRL Modified: head/share/man/man9/VOP_LOOKUP.9 Modified: head/share/man/man9/VOP_LOOKUP.9 == --- head/share/man/man9/VOP_LOOKUP.9Mon Mar 27 20:24:18 2017 (r316055) +++ head/share/man/man9/VOP_LOOKUP.9Mon Mar 27 20:28:56 2017 (r316056) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 24, 1997 +.Dd March 27, 2017 .Dt VOP_LOOKUP 9 .Os .Sh NAME @@ -71,7 +71,6 @@ struct componentname { char*cn_nameptr;/* pointer to looked up name */ longcn_namelen; /* length of looked up component */ u_long cn_hash;/* hash value of looked up name */ - longcn_consume; /* chars to consume in lookup() */ }; .Ed .Pp ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316055 - head/usr.sbin/makefs
Author: emaste Date: Mon Mar 27 20:24:18 2017 New Revision: 316055 URL: https://svnweb.freebsd.org/changeset/base/316055 Log: makefs: sort roundup with the other off_t members in fsinfo_t MFC after:1 week Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/makefs/makefs.h Modified: head/usr.sbin/makefs/makefs.h == --- head/usr.sbin/makefs/makefs.h Mon Mar 27 19:26:09 2017 (r316054) +++ head/usr.sbin/makefs/makefs.h Mon Mar 27 20:24:18 2017 (r316055) @@ -151,12 +151,12 @@ typedef struct makefs_fsinfo { off_t maxsize;/* maximum size image can be */ off_t freefiles; /* free file entries to leave */ off_t freeblocks; /* free blocks to leave */ + off_t roundup;/* round image size up to this value */ int freefilepc; /* free file % */ int freeblockpc;/* free block % */ int needswap; /* non-zero if byte swapping needed */ int sectorsize; /* sector size */ int sparse; /* sparse image, don't fill it with zeros */ - off_t roundup;/* round image size up to this value */ void*fs_specific; /* File system specific additions. */ option_t *fs_options; /* File system specific options */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r316029 - head/contrib/llvm/tools/lld/ELF
On 27 March 2017 at 12:01, Ed Mastewrote: > Author: emaste > Date: Mon Mar 27 16:01:16 2017 > New Revision: 316029 > URL: https://svnweb.freebsd.org/changeset/base/316029 > > Log: > lld: hack version and help output for compatibility with libtool For the record, I think this is a terrible hack and I wish we didn't need it. However, it was committed upstream and should be the most expedient way to get libtool-using third party software to link with lld. As Sean Silva wrote in https://reviews.llvm.org/D31199: Btw, I think this is one of the clearest proofs that LLD has crossed a big milestone and is now entering "production quality". You don't see this kind of hack in a non-production-quality program. I still hope libtool will gain native support for lld, and perhaps many years from now this can be removed. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316054 - in head/sys: conf mips/atheros/ar531x
Author: mizhka Date: Mon Mar 27 19:26:09 2017 New Revision: 316054 URL: https://svnweb.freebsd.org/changeset/base/316054 Log: [etherswitch] simplify kernconf for recently added etherswitch drivers This simple patch adds e6060sw, adm6996fc and ksz8995ma into conf/files. Submitted by: Hiroki MoriReviewed by: adrian, mizhka MFC after:1 week Differential Revision:https://reviews.freebsd.org/D9255 Modified: head/sys/conf/files head/sys/mips/atheros/ar531x/files.ar5315 Modified: head/sys/conf/files == --- head/sys/conf/files Mon Mar 27 19:17:30 2017(r316053) +++ head/sys/conf/files Mon Mar 27 19:26:09 2017(r316054) @@ -1605,6 +1605,9 @@ dev/etherswitch/ip17x/ip17x_vlans.c opti dev/etherswitch/miiproxy.c optional miiproxy dev/etherswitch/rtl8366/rtl8366rb.coptional rtl8366rb dev/etherswitch/e6000sw/e6000sw.c optional e6000sw +dev/etherswitch/e6000sw/e6060sw.c optional e6060sw +dev/etherswitch/infineon/adm6996fc.c optional adm6996fc +dev/etherswitch/micrel/ksz8995ma.c optional ksz8995ma dev/etherswitch/ukswitch/ukswitch.coptional ukswitch dev/evdev/cdev.c optional evdev dev/evdev/evdev.c optional evdev Modified: head/sys/mips/atheros/ar531x/files.ar5315 == --- head/sys/mips/atheros/ar531x/files.ar5315 Mon Mar 27 19:17:30 2017 (r316053) +++ head/sys/mips/atheros/ar531x/files.ar5315 Mon Mar 27 19:26:09 2017 (r316054) @@ -16,7 +16,5 @@ mips/atheros/ar531x/ar5312_chip.c stand mips/atheros/ar71xx_bus_space_reversed.c standard mips/mips/tick.c standard -dev/etherswitch/e6000sw/e6060sw.c optional etherswitch - # Non Intrng mips/mips/intr_machdep.c optional !intrng ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316053 - head/share/man/man3
Author: ngie Date: Mon Mar 27 19:17:30 2017 New Revision: 316053 URL: https://svnweb.freebsd.org/changeset/base/316053 Log: pthread_mutex_consistent: sort SEE ALSO by reference name MFC after:3 days Reported by: make manlint Sponsored by: Dell EMC Isilon Modified: head/share/man/man3/pthread_mutex_consistent.3 Modified: head/share/man/man3/pthread_mutex_consistent.3 == --- head/share/man/man3/pthread_mutex_consistent.3 Mon Mar 27 19:06:29 2017(r316052) +++ head/share/man/man3/pthread_mutex_consistent.3 Mon Mar 27 19:17:30 2017(r316053) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 8, 2016 +.Dd March 27, 2017 .Dt PTHREAD_MUTEX_CONSISTENT 3 .Os .Sh NAME @@ -83,10 +83,10 @@ The mutex pointed to by the argument is not robust, or is not in the inconsistent state. .El .Sh SEE ALSO -.Xr pthread_mutexattr_setrobust 3 , .Xr pthread_mutex_init 3 , .Xr pthread_mutex_lock 3 , -.Xr pthread_mutex_unlock 3 +.Xr pthread_mutex_unlock 3 , +.Xr pthread_mutexattr_setrobust 3 .Sh STANDARDS The .Fn pthread_mutex_lock ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316052 - head/sys/dev/etherswitch/e6000sw
Author: mizhka Date: Mon Mar 27 19:06:29 2017 New Revision: 316052 URL: https://svnweb.freebsd.org/changeset/base/316052 Log: [etherswitch] add support for Marvell 88E6065 ethernet switch incl. 802.1q This patch brings 802.1q support for Marvell 88E606x ethernet switches. Test is done on 88E6065 chip (Aterm WR1200). Submitted by: Hiroki MoriReviewed by: mizhka MFC after:1 week Differential Revision:https://reviews.freebsd.org/D10144 Modified: head/sys/dev/etherswitch/e6000sw/e6060sw.c Modified: head/sys/dev/etherswitch/e6000sw/e6060sw.c == --- head/sys/dev/etherswitch/e6000sw/e6060sw.c Mon Mar 27 19:01:34 2017 (r316051) +++ head/sys/dev/etherswitch/e6000sw/e6060sw.c Mon Mar 27 19:06:29 2017 (r316052) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2016 Hiroki Mori + * Copyright (c) 2016-2017 Hiroki Mori * Copyright (c) 2013 Luiz Otavio O Souza. * Copyright (c) 2011-2012 Stefan Bethke. * Copyright (c) 2012 Adrian Chadd. @@ -32,8 +32,9 @@ /* * This code is Marvell 88E6060 ethernet switch support code on etherswitch * framework. - * Current code is only support port base vlan. Not support ingress/egress - * trailer. This switch chip can't work vlan(4) support. + * 88E6060 support is only port vlan support. Not support ingress/egress + * trailer. + * 88E6065 support is port and dot1q vlan. Also group base tag support. */ #include @@ -66,11 +67,43 @@ #include "miibus_if.h" #include "etherswitch_if.h" -#defineSMI_OFFSET 0x10 -#defineCORE_REGISTER (SMI_OFFSET + 8) - +#defineCORE_REGISTER 0x8 #defineSWITCH_ID 3 + +#definePORT_CONTROL4 +#defineENGRESSFSHIFT 2 +#defineENGRESSFMASK3 +#defineENGRESSTAGSHIFT 12 +#defineENGRESSTAGMASK 3 + #definePORT_VLAN_MAP 6 +#defineFORCEMAPSHIFT 8 +#defineFORCEMAPMASK1 + +#definePORT_DEFVLAN7 +#defineDEFVIDMASK 0xfff +#defineDEFPRIMASK 7 + +#definePORT_CONTROL2 8 +#defineDOT1QMODESHIFT 10 +#defineDOT1QMODEMASK 3 +#defineDOT1QNONE 0 +#defineDOT1QFALLBACK 1 +#defineDOT1QCHECK 2 +#defineDOT1QSECURE 3 + +#defineGLOBAL_REGISTER 0xf + +#defineVTU_OPERATION 5 +#defineVTU_VID_REG 6 +#defineVTU_DATA1_REG 7 +#defineVTU_DATA2_REG 8 +#defineVTU_DATA3_REG 9 +#defineVTU_BUSY0x8000 +#defineVTU_FLASH 1 +#defineVTU_LOAD_PURGE 3 +#defineVTU_GET_NEXT4 +#defineVTU_VIOLATION 7 MALLOC_DECLARE(M_E6060SW); MALLOC_DEFINE(M_E6060SW, "e6060sw", "e6060sw data structures"); @@ -90,8 +123,16 @@ struct e6060sw_softc { struct ifnet**ifp; struct callout callout_tick; etherswitch_info_t info; + int smi_offset; + int sw_model; }; +/* Switch Identifier DeviceID */ + +#defineE6060 0x60 +#defineE6063 0x63 +#defineE6065 0x65 + #defineE6060SW_LOCK(_sc) \ mtx_lock(&(_sc)->sc_mtx) #defineE6060SW_UNLOCK(_sc) \ @@ -112,24 +153,50 @@ static void e6060sw_tick(void *); static int e6060sw_ifmedia_upd(struct ifnet *); static void e6060sw_ifmedia_sts(struct ifnet *, struct ifmediareq *); +static void e6060sw_setup(device_t dev); +static int e6060sw_read_vtu(device_t dev, int num, int *data1, int *data2); +static void e6060sw_set_vtu(device_t dev, int num, int data1, int data2); + static int e6060sw_probe(device_t dev) { int data; struct e6060sw_softc *sc; + int devid, i; + char *devname; + char desc[80]; sc = device_get_softc(dev); bzero(sc, sizeof(*sc)); - data = MDIO_READREG(device_get_parent(dev), CORE_REGISTER, SWITCH_ID); - if (bootverbose) - device_printf(dev,"Switch Identifier Register %x\n", data); - - if ((data >> 4) != 0x060) { - return (ENXIO); + for (i = 0; i < 2; ++i) { + data = MDIO_READREG(device_get_parent(dev), + CORE_REGISTER + i * 0x10, SWITCH_ID); + if (bootverbose) + device_printf(dev,"Switch Identifier Register %x\n", + data); + + devid = data >> 4; + if (devid == E6060 || + devid == E6063 || devid == E6065) { + sc->sw_model = devid; + sc->smi_offset = i * 0x10; + break; + } } + if (i == 2) + return (ENXIO); + + if (devid == E6060) + devname = "88E6060"; + else if (devid ==
svn commit: r316051 - head/usr.sbin/ctladm
Author: ngie Date: Mon Mar 27 19:01:34 2017 New Revision: 316051 URL: https://svnweb.freebsd.org/changeset/base/316051 Log: ctldadm: sort #includes per style(9) - Only include sys/types.h or sys/param.h, not both. - Sort alphabetically. MFC after:3 days Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/ctladm/ctladm.c Modified: head/usr.sbin/ctladm/ctladm.c == --- head/usr.sbin/ctladm/ctladm.c Mon Mar 27 18:59:49 2017 (r316050) +++ head/usr.sbin/ctladm/ctladm.c Mon Mar 27 19:01:34 2017 (r316051) @@ -43,25 +43,24 @@ #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 #include #include #include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316050 - head/usr.sbin/ctld
Author: ngie Date: Mon Mar 27 18:59:49 2017 New Revision: 316050 URL: https://svnweb.freebsd.org/changeset/base/316050 Log: ctld: sort #includes per style(9) - Only include sys/types.h or sys/param.h, not both. - Sort alphabetically. MFC after:3 days Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/ctld/kernel.c Modified: head/usr.sbin/ctld/kernel.c == --- head/usr.sbin/ctld/kernel.c Mon Mar 27 18:40:20 2017(r316049) +++ head/usr.sbin/ctld/kernel.c Mon Mar 27 18:59:49 2017(r316050) @@ -37,15 +37,14 @@ #include __FBSDID("$FreeBSD$"); -#include -#include -#include #include +#include +#include +#include #include #include -#include #include -#include +#include #include #include #include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316049 - head/usr.sbin/ctld
Author: ngie Date: Mon Mar 27 18:40:20 2017 New Revision: 316049 URL: https://svnweb.freebsd.org/changeset/base/316049 Log: Allow WARNS to be overridden by the end-user MFC after:3 days Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/ctld/Makefile Modified: head/usr.sbin/ctld/Makefile == --- head/usr.sbin/ctld/Makefile Mon Mar 27 18:31:00 2017(r316048) +++ head/usr.sbin/ctld/Makefile Mon Mar 27 18:40:20 2017(r316049) @@ -18,7 +18,7 @@ LIBADD= bsdxml l md sbuf util ucl m YFLAGS+= -v CLEANFILES=y.tab.c y.tab.h y.output -WARNS= 6 +WARNS?=6 NO_WMISSING_VARIABLE_DECLARATIONS= .include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316038 - in head/sys/modules: . tcp
Author: tuexen Date: Mon Mar 27 18:20:32 2017 New Revision: 316038 URL: https://svnweb.freebsd.org/changeset/base/316038 Log: Tweak the Makefiles a bit to allow using "tcp" in MODULES_OVERRIDE to build the tcp modules. Sponsored by: Netflix, Inc. Added: head/sys/modules/tcp/Makefile (contents, props changed) Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Mon Mar 27 17:27:46 2017(r316037) +++ head/sys/modules/Makefile Mon Mar 27 18:20:32 2017(r316038) @@ -355,9 +355,8 @@ SUBDIR= \ ${_sym} \ ${_syscons} \ sysvipc \ + tcp \ ${_ti} \ - ${_tcp_fastpath} \ - ${_tcpmd5} \ tests/framework \ tests/callout_test \ tl \ @@ -437,10 +436,6 @@ _random_other= random_other SUBDIR+= cuse .endif -.if ${MK_EXTRA_TCP_STACKS} != "no" || defined(ALL_MODULES) -_tcp_fastpath= tcp/fastpath -.endif - .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \ defined(ALL_MODULES) _carp= carp @@ -450,7 +445,6 @@ _if_gif=if_gif _if_gre= if_gre .if ${MK_IPSEC_SUPPORT} != "no" _ipsec=ipsec -_tcpmd5= tcp/tcpmd5 .endif .endif Added: head/sys/modules/tcp/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/tcp/Makefile Mon Mar 27 18:20:32 2017 (r316038) @@ -0,0 +1,23 @@ +# +# $FreeBSD$ +# + +SYSDIR?=${SRCTOP}/sys +.include "${SYSDIR}/conf/kern.opts.mk" + +SUBDIR=\ + ${_tcp_fastpath} \ + ${_tcpmd5} \ + +.if ${MK_EXTRA_TCP_STACKS} != "no" || defined(ALL_MODULES) +_tcp_fastpath= fastpath +.endif + +.if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \ + defined(ALL_MODULES) +.if ${MK_IPSEC_SUPPORT} != "no" +_tcpmd5= tcpmd5 +.endif +.endif + +.include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r315974 - in head: lib/libthread_db/arch/arm sys/arm/arm sys/arm/include
On Mon, Mar 27, 2017 at 11:07 AM, John Baldwinwrote: > On Sunday, March 26, 2017 08:36:56 AM Michal Meloun wrote: >> Author: mmel >> Date: Sun Mar 26 08:36:56 2017 >> New Revision: 315974 >> URL: https://svnweb.freebsd.org/changeset/base/315974 >> >> Log: >> Preserve VFP state across signal delivery. >> >> We don't have enouch space to store full VFP context within mcontext >> stucture. Due to this: >>- follow i386/amd64 way and store VFP state outside of the mcontext_t >> but point to it. Use the size of VFP state structure as an 'magic' >> indicator of the saved VFP state presence. >>- teach set_mcontext() about this external storage. >>- for signal delivery, store VFP state to expanded 'struct sigframe'. >> >> Submited by:Andrew Gierth (initial version) >> PR: 217611 >> MFC after: 2 weeks >> >> Modified: >> head/lib/libthread_db/arch/arm/libpthread_md.c >> head/sys/arm/arm/machdep.c >> head/sys/arm/include/frame.h >> head/sys/arm/include/ucontext.h >> >> Modified: head/lib/libthread_db/arch/arm/libpthread_md.c >> == >> --- head/lib/libthread_db/arch/arm/libpthread_md.cSun Mar 26 08:36:20 >> 2017(r315973) >> +++ head/lib/libthread_db/arch/arm/libpthread_md.cSun Mar 26 08:36:56 >> 2017(r315974) >> @@ -90,7 +90,9 @@ pt_fpreg_to_ucontext(const struct fpreg >> mcontext_t *mc = >uc_mcontext; >> >> /* XXX */ >> - memset(>mc_spare, 0, sizeof(mc->mc_spare)); >> + mc->mc_vfp_size = 0; >> + mc->mc_vfp_ptr = NULL; >> + memset(mc->mc_spare, 0, sizeof(mc->mc_spare)); >> } > > I suspect you don't need this bit? Has FreeBSD/arm ever supported VFP on a > release > that also shipped libkse? (i.e. not libthr but the other thread library) No. And even if we had, we blew up binary compat when we went from OABI to EABI. Warner ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316037 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: jpaetzel Date: Mon Mar 27 17:27:46 2017 New Revision: 316037 URL: https://svnweb.freebsd.org/changeset/base/316037 Log: MFV: 315989 7603 xuio_stat_wbuf_* should be declared (void) illumos/illumos-gate@99aa8b55058e512798eafbd71f72f916bdc10181 https://github.com/illumos/illumos-gate/commit/99aa8b55058e512798eafbd71f72f916bdc10181 https://www.illumos.org/issues/7603 The funcs are declared k style, where the args are not specified: void xuio_stat_wbuf_copied(); They should be declared to take no arguments: void xuio_stat_wbuf_copied(void); Need to change both .c and .h. Author: Prashanth SreenivasaReviewed by: Matthew Ahrens Reviewed by: Paul Dagnelie Reviewed by: Robert Mustacchi Approved by: Richard Lowe Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Mon Mar 27 17:24:40 2017(r316036) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Mon Mar 27 17:27:46 2017(r316037) @@ -1124,13 +1124,13 @@ xuio_stat_fini(void) } void -xuio_stat_wbuf_copied() +xuio_stat_wbuf_copied(void) { XUIOSTAT_BUMP(xuiostat_wbuf_copied); } void -xuio_stat_wbuf_nocopy() +xuio_stat_wbuf_nocopy(void) { XUIOSTAT_BUMP(xuiostat_wbuf_nocopy); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Mon Mar 27 17:24:40 2017(r316036) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Mon Mar 27 17:27:46 2017(r316037) @@ -762,8 +762,8 @@ int dmu_xuio_add(struct xuio *uio, struc int dmu_xuio_cnt(struct xuio *uio); struct arc_buf *dmu_xuio_arcbuf(struct xuio *uio, int i); void dmu_xuio_clear(struct xuio *uio, int i); -void xuio_stat_wbuf_copied(); -void xuio_stat_wbuf_nocopy(); +void xuio_stat_wbuf_copied(void); +void xuio_stat_wbuf_nocopy(void); extern boolean_t zfs_prefetch_disable; extern int zfs_max_recordsize; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316036 - head/share/man/man4
Author: markj Date: Mon Mar 27 17:24:40 2017 New Revision: 316036 URL: https://svnweb.freebsd.org/changeset/base/316036 Log: Typo. MFC after:1 week Modified: head/share/man/man4/rights.4 Modified: head/share/man/man4/rights.4 == --- head/share/man/man4/rights.4Mon Mar 27 17:18:04 2017 (r316035) +++ head/share/man/man4/rights.4Mon Mar 27 17:24:40 2017 (r316036) @@ -212,7 +212,7 @@ with the .Dv O_EXEC flag; .Dv CAP_READ -is also be required. +is also required. .It Dv CAP_FLOCK Permit .Xr flock 2 , ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r315974 - in head: lib/libthread_db/arch/arm sys/arm/arm sys/arm/include
On Sunday, March 26, 2017 08:36:56 AM Michal Meloun wrote: > Author: mmel > Date: Sun Mar 26 08:36:56 2017 > New Revision: 315974 > URL: https://svnweb.freebsd.org/changeset/base/315974 > > Log: > Preserve VFP state across signal delivery. > > We don't have enouch space to store full VFP context within mcontext > stucture. Due to this: >- follow i386/amd64 way and store VFP state outside of the mcontext_t > but point to it. Use the size of VFP state structure as an 'magic' > indicator of the saved VFP state presence. >- teach set_mcontext() about this external storage. >- for signal delivery, store VFP state to expanded 'struct sigframe'. > > Submited by:Andrew Gierth (initial version) > PR: 217611 > MFC after: 2 weeks > > Modified: > head/lib/libthread_db/arch/arm/libpthread_md.c > head/sys/arm/arm/machdep.c > head/sys/arm/include/frame.h > head/sys/arm/include/ucontext.h > > Modified: head/lib/libthread_db/arch/arm/libpthread_md.c > == > --- head/lib/libthread_db/arch/arm/libpthread_md.cSun Mar 26 08:36:20 > 2017(r315973) > +++ head/lib/libthread_db/arch/arm/libpthread_md.cSun Mar 26 08:36:56 > 2017(r315974) > @@ -90,7 +90,9 @@ pt_fpreg_to_ucontext(const struct fpreg > mcontext_t *mc = >uc_mcontext; > > /* XXX */ > - memset(>mc_spare, 0, sizeof(mc->mc_spare)); > + mc->mc_vfp_size = 0; > + mc->mc_vfp_ptr = NULL; > + memset(mc->mc_spare, 0, sizeof(mc->mc_spare)); > } I suspect you don't need this bit? Has FreeBSD/arm ever supported VFP on a release that also shipped libkse? (i.e. not libthr but the other thread library) -- John Baldwin ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316035 - head/sys/compat/linuxkpi/common/include/linux
Author: hselasky Date: Mon Mar 27 17:18:04 2017 New Revision: 316035 URL: https://svnweb.freebsd.org/changeset/base/316035 Log: Implement vmalloc_32() in the LinuxKPI. Obtained from:kmacy @ MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/slab.h Modified: head/sys/compat/linuxkpi/common/include/linux/slab.h == --- head/sys/compat/linuxkpi/common/include/linux/slab.hMon Mar 27 17:09:11 2017(r316034) +++ head/sys/compat/linuxkpi/common/include/linux/slab.hMon Mar 27 17:18:04 2017(r316035) @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -106,6 +107,12 @@ __vmalloc(size_t size, gfp_t flags, int } static inline void * +vmalloc_32(size_t size) +{ + return (contigmalloc(size, M_KMALLOC, M_WAITOK, 0, UINT_MAX, 1, 1)); +} + +static inline void * kmalloc_array(size_t n, size_t size, gfp_t flags) { if (size != 0 && n > (SIZE_MAX / size)) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316034 - head/sys/compat/linuxkpi/common/src
Author: hselasky Date: Mon Mar 27 17:09:11 2017 New Revision: 316034 URL: https://svnweb.freebsd.org/changeset/base/316034 Log: Add more platforms supporting the direct map feature in the LinuxKPI. MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_page.c Modified: head/sys/compat/linuxkpi/common/src/linux_page.c == --- head/sys/compat/linuxkpi/common/src/linux_page.cMon Mar 27 17:04:11 2017(r316033) +++ head/sys/compat/linuxkpi/common/src/linux_page.cMon Mar 27 17:09:11 2017(r316034) @@ -63,10 +63,16 @@ __FBSDID("$FreeBSD$"); #include #include +#if defined(__amd64__) || defined(__aarch64__) || defined(__riscv__) +#defineLINUXKPI_HAVE_DMAP +#else +#undef LINUXKPI_HAVE_DMAP +#endif + void * linux_page_address(struct page *page) { -#ifdef __amd64__ +#ifdef LINUXKPI_HAVE_DMAP return ((void *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(page))); #else if (page->object != kmem_object && page->object != kernel_object) @@ -79,7 +85,7 @@ linux_page_address(struct page *page) vm_page_t linux_alloc_pages(gfp_t flags, unsigned int order) { -#ifdef __amd64__ +#ifdef LINUXKPI_HAVE_DMAP unsigned long npages = 1UL << order; int req = (flags & M_ZERO) ? (VM_ALLOC_ZERO | VM_ALLOC_NOOBJ | VM_ALLOC_NORMAL) : (VM_ALLOC_NOOBJ | VM_ALLOC_NORMAL); @@ -137,7 +143,7 @@ retry: void linux_free_pages(vm_page_t page, unsigned int order) { -#ifdef __amd64__ +#ifdef LINUXKPI_HAVE_DMAP unsigned long npages = 1UL << order; unsigned long x; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316033 - in head/sys/compat/linuxkpi/common: include/asm include/linux src
Author: hselasky Date: Mon Mar 27 17:04:11 2017 New Revision: 316033 URL: https://svnweb.freebsd.org/changeset/base/316033 Log: Implement a series of physical page management related functions in the LinuxKPI for accessing user-space memory in the kernel. Add functions to hold and wire physical page(s) based on a given range of user-space virtual addresses. Add functions to get and put a reference on, wire, hold, mark accessed, copy and dirty a physical page. Add new VM related structures and defines as a preparation step for advancing the memory map capabilities of the LinuxKPI. Add function to figure out if a virtual address was allocated using malloc(). Add function to convert a virtual kernel address into its physical page pointer. Obtained from:kmacy @ MFC after:1 week Sponsored by: Mellanox Technologies Added: head/sys/compat/linuxkpi/common/include/linux/pfn.h (contents, props changed) head/sys/compat/linuxkpi/common/include/linux/pfn_t.h (contents, props changed) head/sys/compat/linuxkpi/common/include/linux/preempt.h (contents, props changed) Modified: head/sys/compat/linuxkpi/common/include/asm/pgtable.h head/sys/compat/linuxkpi/common/include/linux/mm.h head/sys/compat/linuxkpi/common/include/linux/page.h head/sys/compat/linuxkpi/common/include/linux/types.h head/sys/compat/linuxkpi/common/src/linux_page.c Modified: head/sys/compat/linuxkpi/common/include/asm/pgtable.h == --- head/sys/compat/linuxkpi/common/include/asm/pgtable.h Mon Mar 27 16:25:58 2017(r316032) +++ head/sys/compat/linuxkpi/common/include/asm/pgtable.h Mon Mar 27 17:04:11 2017(r316033) @@ -33,4 +33,11 @@ #include +typedef unsigned long pteval_t; +typedef unsigned long pmdval_t; +typedef unsigned long pudval_t; +typedef unsigned long pgdval_t; +typedef unsigned long pgprotval_t; +typedef struct page *pgtable_t; + #endif /* _ASM_PGTABLE_H_ */ Modified: head/sys/compat/linuxkpi/common/include/linux/mm.h == --- head/sys/compat/linuxkpi/common/include/linux/mm.h Mon Mar 27 16:25:58 2017(r316032) +++ head/sys/compat/linuxkpi/common/include/linux/mm.h Mon Mar 27 17:04:11 2017(r316033) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2017 Mellanox Technologies, Ltd. * Copyright (c) 2015 François Tigeot * Copyright (c) 2015 Matthew Dillon* All rights reserved. @@ -37,9 +37,57 @@ #include #include #include +#include + +#include #definePAGE_ALIGN(x) ALIGN(x, PAGE_SIZE) +/* + * Make sure our LinuxKPI defined virtual memory flags don't conflict + * with the ones defined by FreeBSD: + */ +CTASSERT((VM_PROT_ALL & -(1 << 8)) == 0); + +#defineVM_PFNINTERNAL (1 << 8)/* FreeBSD private flag to vm_insert_pfn() */ +#defineVM_MIXEDMAP (1 << 9) +#defineVM_NORESERVE(1 << 10) +#defineVM_PFNMAP (1 << 11) +#defineVM_IO (1 << 12) +#defineVM_MAYWRITE (1 << 13) +#defineVM_DONTCOPY (1 << 14) +#defineVM_DONTEXPAND (1 << 15) +#defineVM_DONTDUMP (1 << 16) + +#defineVMA_MAX_PREFAULT_RECORD 1 + +#defineFOLL_WRITE (1 << 0) +#defineFOLL_FORCE (1 << 1) + +#defineVM_FAULT_OOM(1 << 0) +#defineVM_FAULT_SIGBUS (1 << 1) +#defineVM_FAULT_MAJOR (1 << 2) +#defineVM_FAULT_WRITE (1 << 3) +#defineVM_FAULT_HWPOISON (1 << 4) +#defineVM_FAULT_HWPOISON_LARGE (1 << 5) +#defineVM_FAULT_SIGSEGV(1 << 6) +#defineVM_FAULT_NOPAGE (1 << 7) +#defineVM_FAULT_LOCKED (1 << 8) +#defineVM_FAULT_RETRY (1 << 9) +#defineVM_FAULT_FALLBACK (1 << 10) + +#defineFAULT_FLAG_WRITE(1 << 0) +#defineFAULT_FLAG_MKWRITE (1 << 1) +#defineFAULT_FLAG_ALLOW_RETRY (1 << 2) +#defineFAULT_FLAG_RETRY_NOWAIT (1 << 3) +#defineFAULT_FLAG_KILLABLE (1 << 4) +#defineFAULT_FLAG_TRIED(1 << 5) +#defineFAULT_FLAG_USER (1 << 6) +#defineFAULT_FLAG_REMOTE (1 << 7) +#defineFAULT_FLAG_INSTRUCTION (1 << 8) + +typedef int (*pte_fn_t)(pte_t *, pgtable_t, unsigned long addr, void *data); + struct vm_area_struct { vm_offset_t vm_start; vm_offset_t vm_end; @@ -49,6 +97,19 @@ struct vm_area_struct { vm_memattr_tvm_page_prot; }; +struct vm_fault {
svn commit: r316032 - head/sys/geom/mirror
Author: markj Date: Mon Mar 27 16:25:58 2017 New Revision: 316032 URL: https://svnweb.freebsd.org/changeset/base/316032 Log: Refine r301173 a bit. - Don't execute any of g_mirror_shutdown_post_sync() when panicking. We cannot safely idle the mirror or stop synchronization in that state, and the current attempts to do so complicate debugging of gmirror itself. - Check for a non-NULL panicstr instead of using SCHEDULER_STOPPED(). The latter was added for use in the locking primitives. Reviewed by: mav, pjd MFC after:2 weeks Sponsored by: Dell EMC Isilon Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c == --- head/sys/geom/mirror/g_mirror.c Mon Mar 27 16:18:19 2017 (r316031) +++ head/sys/geom/mirror/g_mirror.c Mon Mar 27 16:25:58 2017 (r316032) @@ -3040,7 +3040,7 @@ g_mirror_destroy(struct g_mirror_softc * g_topology_assert_not(); sx_assert(>sc_lock, SX_XLOCKED); - if (sc->sc_provider_open != 0 || SCHEDULER_STOPPED()) { + if (sc->sc_provider_open != 0) { switch (how) { case G_MIRROR_DESTROY_SOFT: G_MIRROR_DEBUG(1, @@ -3374,6 +3374,9 @@ g_mirror_shutdown_post_sync(void *arg, i struct g_mirror_softc *sc; int error; + if (panicstr != NULL) + return; + mp = arg; g_topology_lock(); g_mirror_shutdown = 1; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316031 - head/sys/i386/include
Author: markj Date: Mon Mar 27 16:18:19 2017 New Revision: 316031 URL: https://svnweb.freebsd.org/changeset/base/316031 Log: Adjust the constraint for "src" in atomic_(f)cmpset_8. "r" is not sufficient to prevent the use of invalid byte-width registers with at least gcc. Reported and reviewed by: bde X-MFC-With: r315718 Modified: head/sys/i386/include/atomic.h Modified: head/sys/i386/include/atomic.h == --- head/sys/i386/include/atomic.h Mon Mar 27 16:01:44 2017 (r316030) +++ head/sys/i386/include/atomic.h Mon Mar 27 16:18:19 2017 (r316031) @@ -182,7 +182,7 @@ struct __hack * * Returns 0 on failure, non-zero on success. */ -#defineATOMIC_CMPSET(TYPE) \ +#defineATOMIC_CMPSET(TYPE, CONS) \ static __inline int\ atomic_cmpset_##TYPE(volatile u_##TYPE *dst, u_##TYPE expect, u_##TYPE src) \ { \ @@ -196,7 +196,7 @@ atomic_cmpset_##TYPE(volatile u_##TYPE * : "=q" (res), /* 0 */ \ "+m" (*dst), /* 1 */ \ "+a" (expect) /* 2 */ \ - : "r" (src) /* 3 */ \ + : CONS (src)/* 3 */ \ : "memory", "cc"); \ return (res); \ } \ @@ -214,14 +214,14 @@ atomic_fcmpset_##TYPE(volatile u_##TYPE : "=q" (res), /* 0 */ \ "+m" (*dst), /* 1 */ \ "+a" (*expect)/* 2 */ \ - : "r" (src) /* 3 */ \ + : CONS (src)/* 3 */ \ : "memory", "cc"); \ return (res); \ } -ATOMIC_CMPSET(char); -ATOMIC_CMPSET(short); -ATOMIC_CMPSET(int); +ATOMIC_CMPSET(char, "q"); +ATOMIC_CMPSET(short, "r"); +ATOMIC_CMPSET(int, "r"); /* * Atomically add the value of v to the integer pointed to by p and return ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316030 - head/usr.bin/sed
Author: brd (doc,ports committer) Date: Mon Mar 27 16:01:44 2017 New Revision: 316030 URL: https://svnweb.freebsd.org/changeset/base/316030 Log: Add some useful examples to the sed man page. Reviewed by: wblock, bcr MFC after:1 week Differential Revision:https://reviews.freebsd.org/D9958 Modified: head/usr.bin/sed/sed.1 Modified: head/usr.bin/sed/sed.1 == --- head/usr.bin/sed/sed.1 Mon Mar 27 16:01:16 2017(r316029) +++ head/usr.bin/sed/sed.1 Mon Mar 27 16:01:44 2017(r316030) @@ -31,7 +31,7 @@ .\"@(#)sed.1 8.2 (Berkeley) 12/30/93 .\" $FreeBSD$ .\" -.Dd May 10, 2016 +.Dd March 27, 2017 .Dt SED 1 .Os .Sh NAME @@ -586,6 +586,36 @@ as described in .Xr environ 7 . .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +Replace +.Ql bar +with +.Ql baz +when piped from another command: +.Bd -literal -offset indent +echo "An alternate word, like bar, is sometimes used in examples." | sed 's/bar/baz/' +.Ed +.Pp +Using backlashes can sometimes be hard to read and follow: +.Bd -literal -offset indent +echo "/home/example" | sed 's/\\/home\\/example/\\/usr\\/local\\/example/' +.Ed +.Pp +Using a different separator can be handy when working with paths: +.Bd -literal -offset indent +echo "/home/example" | sed 's#/home/example#/usr/local/example#' +.Ed +.Pp +Replace all occurances of +.Ql foo +with +.Ql bar +in the file +.Pa test.txt , +without creating a backup of the file: +.Bd -literal -offset indent +sed -i '' -e 's/foo/bar/' test.txt +.Ed .Sh SEE ALSO .Xr awk 1 , .Xr ed 1 , ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316029 - head/contrib/llvm/tools/lld/ELF
Author: emaste Date: Mon Mar 27 16:01:16 2017 New Revision: 316029 URL: https://svnweb.freebsd.org/changeset/base/316029 Log: lld: hack version and help output for compatibility with libtool GNU libtool checks the output from invoking the linker with --version and --help, in order to determine the linker "flavour" and the command- ine arguments to use for various link operations (e.g. generating shared libraries). To detect GNU ld it looks for the strings "GNU" and "supported targets:.*elf". Since LLD is compatible with GNU ld we include those same strings to fool libtool. Quoting from a comment in the change: This is somewhat ugly hack, but in reality, we had no choice other than doing this. Considering the very long release cycle of Libtool, it is not easy to improve it to recognize LLD as a GNU compatible linker in a timely manner. Even if we can make it, there are still a lot of "configure" scripts out there that are generated by old version of Libtool. We cannot convince every software developer to migrate to the latest version and re-generate scripts. So we have this hack. Upstream LLVM revisions r298532, r298568, r298591 Obtained from:LLVM MFC after:1 week Sponsored by: The FreeBSD Foundation Modified: head/contrib/llvm/tools/lld/ELF/Driver.cpp head/contrib/llvm/tools/lld/ELF/DriverUtils.cpp Modified: head/contrib/llvm/tools/lld/ELF/Driver.cpp == --- head/contrib/llvm/tools/lld/ELF/Driver.cpp Mon Mar 27 15:20:31 2017 (r316028) +++ head/contrib/llvm/tools/lld/ELF/Driver.cpp Mon Mar 27 16:01:16 2017 (r316029) @@ -281,11 +281,27 @@ void LinkerDriver::main(ArrayRefhttps://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r316026 - head/sys/dev/bnxt
On Mon, Mar 27, 2017 at 02:55:24PM +, Sean Bruno wrote: > New Revision: 316026 > URL: https://svnweb.freebsd.org/changeset/base/316026 > > Log: > Change the default rss_type to M_HASHTYPE_OPAQUE_HASH. > > Submitted by: Venkat Duvvuru> MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D9905 Commit message should explain the changes, not just describe what's being obvious from the diff itself. (DR gives slightly more information, but still not enough.) ./danfe ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316028 - head/usr.sbin/makefs/tests
Author: brd (doc,ports committer) Date: Mon Mar 27 15:20:31 2017 New Revision: 316028 URL: https://svnweb.freebsd.org/changeset/base/316028 Log: Check to see if the kernel has cd9660 before running tests that require it Approved by: ngie MFC after:1 week Differential Revision:https://reviews.freebsd.org/D10096 Modified: head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh Modified: head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh == --- head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh Mon Mar 27 15:08:02 2017(r316027) +++ head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh Mon Mar 27 15:20:31 2017(r316028) @@ -61,6 +61,11 @@ check_base_iso9660_image_contents() atf_check -e empty -o empty -s exit:0 test -f $TEST_MOUNT_DIR/c } +check_cd9660_support() { + kldstat -m cd9660 || \ + atf_skip "Requires cd9660 filesystem support to be present in the kernel" +} + atf_test_case D_flag cleanup D_flag_body() { @@ -91,6 +96,8 @@ D_flag_cleanup() atf_test_case F_flag cleanup F_flag_body() { + check_cd9660_support + create_test_inputs atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ @@ -110,6 +117,8 @@ F_flag_cleanup() atf_test_case from_mtree_spec_file cleanup from_mtree_spec_file_body() { + check_cd9660_support + create_test_inputs atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ @@ -130,6 +139,8 @@ from_mtree_spec_file_cleanup() atf_test_case from_multiple_dirs cleanup from_multiple_dirs_body() { + check_cd9660_support + test_inputs_dir2=$TMPDIR/inputs2 create_test_inputs @@ -152,6 +163,8 @@ from_multiple_dirs_cleanup() atf_test_case from_single_dir cleanup from_single_dir_body() { + check_cd9660_support + create_test_inputs atf_check -e empty -o empty -s exit:0 \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316027 - head/sys/dev/e1000
Author: sbruno Date: Mon Mar 27 15:08:02 2017 New Revision: 316027 URL: https://svnweb.freebsd.org/changeset/base/316027 Log: Access *correct* ifp data structure when debug sysctl is invoked. Submitted by: Kevin BowlingSponsored by: Limelight Networks Differential Revision:https://reviews.freebsd.org/D10126 Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c == --- head/sys/dev/e1000/if_em.c Mon Mar 27 14:55:23 2017(r316026) +++ head/sys/dev/e1000/if_em.c Mon Mar 27 15:08:02 2017(r316027) @@ -4341,16 +4341,17 @@ em_if_debug(if_ctx_t ctx) static void em_print_debug_info(struct adapter *adapter) { - device_t dev = adapter->dev; + device_t dev = iflib_get_dev(adapter->ctx); + struct ifnet *ifp = iflib_get_ifp(adapter->ctx); struct tx_ring *txr = >tx_queues->txr; struct rx_ring *rxr = >rx_queues->rxr; - if (if_getdrvflags(adapter->ifp) & IFF_DRV_RUNNING) + if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) printf("Interface is RUNNING "); else printf("Interface is NOT RUNNING\n"); - if (if_getdrvflags(adapter->ifp) & IFF_DRV_OACTIVE) + if (if_getdrvflags(ifp) & IFF_DRV_OACTIVE) printf("and INACTIVE\n"); else printf("and ACTIVE\n"); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316026 - head/sys/dev/bnxt
Author: sbruno Date: Mon Mar 27 14:55:23 2017 New Revision: 316026 URL: https://svnweb.freebsd.org/changeset/base/316026 Log: Change the default rss_type to M_HASHTYPE_OPAQUE_HASH. Submitted by: Venkat DuvvuruMFC after:1 week Differential Revision:https://reviews.freebsd.org/D9905 Modified: head/sys/dev/bnxt/bnxt_txrx.c Modified: head/sys/dev/bnxt/bnxt_txrx.c == --- head/sys/dev/bnxt/bnxt_txrx.c Mon Mar 27 14:37:35 2017 (r316025) +++ head/sys/dev/bnxt/bnxt_txrx.c Mon Mar 27 14:55:23 2017 (r316026) @@ -452,7 +452,7 @@ bnxt_set_rsstype(if_rxd_info_t ri, uint8 ri->iri_rsstype = M_HASHTYPE_RSS_IPV6; break; default: - ri->iri_rsstype = M_HASHTYPE_OPAQUE; + ri->iri_rsstype = M_HASHTYPE_OPAQUE_HASH; break; } } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316025 - head/share/misc
Author: pluknet Date: Mon Mar 27 14:37:35 2017 New Revision: 316025 URL: https://svnweb.freebsd.org/changeset/base/316025 Log: macOS 10.12 release date added. Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree == --- head/share/misc/bsd-family-tree Mon Mar 27 14:32:34 2017 (r316024) +++ head/share/misc/bsd-family-tree Mon Mar 27 14:37:35 2017 (r316025) @@ -705,6 +705,7 @@ FreeBSD 10.32016-04-04 [FBD] NetBSD 7.0.1 2016-05-22 [NBD] DragonFly 4.6.02016-08-02 [DFB] OpenBSD 6.02016-09-01 [OBD] +macOS 10.122016-09-20 [APL] FreeBSD 11.0 2016-10-10 [FBD] NetBSD 7.1 2017-03-11 [NBD] ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316024 - head/share/man/man9
Author: pluknet Date: Mon Mar 27 14:32:34 2017 New Revision: 316024 URL: https://svnweb.freebsd.org/changeset/base/316024 Log: Fix pfil_add_hook() and pfil_remove_hook() type. Modified: head/share/man/man9/pfil.9 Modified: head/share/man/man9/pfil.9 == --- head/share/man/man9/pfil.9 Mon Mar 27 13:37:40 2017(r316023) +++ head/share/man/man9/pfil.9 Mon Mar 27 14:32:34 2017(r316024) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 23, 2013 +.Dd March 27, 2017 .Dt PFIL 9 .Os .Sh NAME @@ -57,9 +57,9 @@ typedef int (*pfil_func_t)(void *arg, st .Fn pfil_head_unregister "struct pfil_head *head" .Ft "struct pfil_head *" .Fn pfil_head_get "int af" "u_long dlt" -.Ft void +.Ft int .Fn pfil_add_hook "pfil_func_t" "void *arg" "int flags" "struct pfil_head *" -.Ft void +.Ft int .Fn pfil_remove_hook "pfil_func_t" "void *arg" "int flags" "struct pfil_head *" .Ft int .Fn pfil_run_hooks "struct pfil_head *head" "struct mbuf **mp" "struct ifnet *" "int dir" "struct inpcb *" ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316023 - head/usr.sbin/jail
Author: jamie Date: Mon Mar 27 13:37:40 2017 New Revision: 316023 URL: https://svnweb.freebsd.org/changeset/base/316023 Log: Same as r316022 (Fix hexadecimal escape codes in jail.conf(5)), but do it right this time. Reported by: Kyle Evans MFC after:3 days Modified: head/usr.sbin/jail/jaillex.l Modified: head/usr.sbin/jail/jaillex.l == --- head/usr.sbin/jail/jaillex.lMon Mar 27 13:27:39 2017 (r316022) +++ head/usr.sbin/jail/jaillex.lMon Mar 27 13:37:40 2017 (r316023) @@ -216,7 +216,7 @@ text2lval(size_t triml, size_t trimr, in *d = *++s - '0'; else if (s[1] >= 'A' && s[1] <= 'F') *d = *++s + (0xA - 'A'); - else if (s[1] >= 'a' && s[1] <= 'F') + else if (s[1] >= 'a' && s[1] <= 'f') *d = *++s + (0xa - 'a'); else break; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316022 - head/usr.sbin/jail
Author: jamie Date: Mon Mar 27 13:27:39 2017 New Revision: 316022 URL: https://svnweb.freebsd.org/changeset/base/316022 Log: Fix hexadecimal escape codes in jail.conf(5). PR: 218154 Submitted by: Masahiro KonishiMFC after:3 days Modified: head/usr.sbin/jail/jaillex.l Modified: head/usr.sbin/jail/jaillex.l == --- head/usr.sbin/jail/jaillex.lMon Mar 27 12:34:29 2017 (r316021) +++ head/usr.sbin/jail/jaillex.lMon Mar 27 13:27:39 2017 (r316022) @@ -216,7 +216,7 @@ text2lval(size_t triml, size_t trimr, in *d = *++s - '0'; else if (s[1] >= 'A' && s[1] <= 'F') *d = *++s + (0xA - 'A'); - else if (s[1] >= 'a' && s[1] <= 'a') + else if (s[1] >= 'a' && s[1] <= 'F') *d = *++s + (0xa - 'a'); else break; @@ -226,7 +226,7 @@ text2lval(size_t triml, size_t trimr, in *d = *d * 0x10 + (*++s - '0'); else if (s[1] >= 'A' && s[1] <= 'F') *d = *d * 0x10 + (*++s + (0xA - 'A')); - else if (s[1] >= 'a' && s[1] <= 'a') + else if (s[1] >= 'a' && s[1] <= 'f') *d = *d * 0x10 + (*++s + (0xa - 'a')); } } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316021 - in head/sys: amd64/amd64 amd64/vmm amd64/vmm/amd i386/i386 x86/include x86/x86 x86/xen
Author: avg Date: Mon Mar 27 12:34:29 2017 New Revision: 316021 URL: https://svnweb.freebsd.org/changeset/base/316021 Log: revert r315959 because it causes build problems The change introduced a dependency between genassym.c and header files generated from .m files, but that dependency is not specified in the make files. Also, the change could be not as useful as I thought it was. Reported by: dchagin, Manfred Antar, and many others Modified: head/sys/amd64/amd64/apic_vector.S head/sys/amd64/amd64/genassym.c head/sys/amd64/vmm/amd/svm.c head/sys/amd64/vmm/vmm.c head/sys/amd64/vmm/vmm_host.h head/sys/i386/i386/apic_vector.s head/sys/i386/i386/genassym.c head/sys/x86/include/apicvar.h head/sys/x86/x86/io_apic.c head/sys/x86/x86/local_apic.c head/sys/x86/x86/msi.c head/sys/x86/xen/xen_apic.c Modified: head/sys/amd64/amd64/apic_vector.S == --- head/sys/amd64/amd64/apic_vector.S Mon Mar 27 11:04:57 2017 (r316020) +++ head/sys/amd64/amd64/apic_vector.S Mon Mar 27 12:34:29 2017 (r316021) @@ -50,6 +50,22 @@ #define LK #endif + .text + SUPERALIGN_TEXT + /* End Of Interrupt to APIC */ +as_lapic_eoi: + cmpl$0,x2apic_mode + jne 1f + movqlapic_map,%rax + movl$0,LA_EOI(%rax) + ret +1: + movl$MSR_APIC_EOI,%ecx + xorl%eax,%eax + xorl%edx,%edx + wrmsr + ret + /* * I/O Interrupt Entry Point. Rather than having one entry point for * each interrupt source, we use one entry point for each 32-bit word @@ -166,7 +182,7 @@ IDTVEC(xen_intr_upcall) SUPERALIGN_TEXT invltlb_ret: - callnative_lapic_eoi + callas_lapic_eoi POP_FRAME jmp doreti_iret @@ -175,21 +191,18 @@ IDTVEC(invltlb) PUSH_FRAME callinvltlb_handler - movl$IPI_INVLTLB, %edi jmp invltlb_ret IDTVEC(invltlb_pcid) PUSH_FRAME callinvltlb_pcid_handler - movl$IPI_INVLTLB, %edi jmp invltlb_ret IDTVEC(invltlb_invpcid) PUSH_FRAME callinvltlb_invpcid_handler - movl$IPI_INVLTLB, %edi jmp invltlb_ret /* @@ -202,7 +215,6 @@ IDTVEC(invlpg) PUSH_FRAME callinvlpg_handler - movl$IPI_INVLPG, %edi jmp invltlb_ret /* @@ -214,7 +226,6 @@ IDTVEC(invlrng) PUSH_FRAME callinvlrng_handler - movl$IPI_INVLRNG, %edi jmp invltlb_ret /* @@ -226,7 +237,6 @@ IDTVEC(invlcache) PUSH_FRAME callinvlcache_handler - movl$IPI_INVLCACHE, %edi jmp invltlb_ret /* @@ -237,8 +247,7 @@ IDTVEC(invlcache) IDTVEC(ipi_intr_bitmap_handler) PUSH_FRAME - movl$IPI_BITMAP_VECTOR, %edi - callnative_lapic_eoi + callas_lapic_eoi FAKE_MCOUNT(TF_RIP(%rsp)) @@ -254,8 +263,7 @@ IDTVEC(ipi_intr_bitmap_handler) IDTVEC(cpustop) PUSH_FRAME - movl$IPI_STOP, %edi - callnative_lapic_eoi + callas_lapic_eoi callcpustop_handler jmp doreti @@ -269,8 +277,7 @@ IDTVEC(cpususpend) PUSH_FRAME callcpususpend_handler - movl$IPI_SUSPEND, %edi - callnative_lapic_eoi + callas_lapic_eoi jmp doreti /* @@ -288,22 +295,37 @@ IDTVEC(rendezvous) incq(%rax) #endif callsmp_rendezvous_action - movl$IPI_RENDEZVOUS, %edi - callnative_lapic_eoi + callas_lapic_eoi jmp doreti /* * IPI handler whose purpose is to interrupt the CPU with minimum overhead. * This is used by bhyve to force a host cpu executing in guest context to * trap into the hypervisor. + * + * This handler is different from other IPI handlers in the following aspects: + * + * 1. It doesn't push a trapframe on the stack. + * + * This implies that a DDB backtrace involving 'justreturn' will skip the + * function that was interrupted by this handler. + * + * 2. It doesn't 'swapgs' when userspace is interrupted. + * + * The 'justreturn' handler does not access any pcpu data so it is not an + * issue. Moreover the 'justreturn' handler can only be interrupted by an NMI + * whose handler already doesn't trust GS.base when kernel code is interrupted. */ .text SUPERALIGN_TEXT IDTVEC(justreturn) - PUSH_FRAME - movlvmm_ipinum, %edi - callnative_lapic_eoi - POP_FRAME + pushq %rax + pushq %rcx + pushq %rdx + callas_lapic_eoi + popq%rdx + popq%rcx + popq%rax jmp doreti_iret #endif /* SMP */ Modified: head/sys/amd64/amd64/genassym.c
Re: svn commit: r315959 - in head/sys: amd64/amd64 amd64/vmm amd64/vmm/amd i386/i386 x86/include x86/x86 x86/xen
On 27/03/2017 14:05, Chagin Dmitry wrote: > I believe it, but on my machine genassym.c is processed before device_if.m Yeah, looks like the order could be arbitrary because the dependency is not defined. Anyway, I am reverting the change. Thank you for the report and sorry for the trouble. -- Andriy Gapon ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r315959 - in head/sys: amd64/amd64 amd64/vmm amd64/vmm/amd i386/i386 x86/include x86/x86 x86/xen
On Mon, Mar 27, 2017 at 11:30:42AM +0300, Andriy Gapon wrote: > On 03/26/2017 11:30, Chagin Dmitry wrote: > > On Sat, Mar 25, 2017 at 06:45:09PM +, Andriy Gapon wrote: > >> Author: avg > >> Date: Sat Mar 25 18:45:09 2017 > >> New Revision: 315959 > >> URL: https://svnweb.freebsd.org/changeset/base/315959 > >> > >> Log: > >> specific end of interrupt implementation for AMD Local APIC > >> > >> The change is more intrusive than I would like because the feature > >> requires that a vector number is written to a special register. > >> Thus, now the vector number has to be provided to lapic_eoi(). > >> It was readily available in the IO-APIC and MSI cases, but the IPI > >> handlers required more work. > >> Also, we now store the VMM IPI number in a global variable, so that it > >> is available to the justreturn handler for the same reason. > >> > >> Reviewed by: kib > >> MFC after: 6 weeks > >> Differential Revision: https://reviews.freebsd.org/D9880 > >> > >> Modified: > >> head/sys/amd64/amd64/apic_vector.S > >> head/sys/amd64/amd64/genassym.c > > > > > > > > Hi, Andriy, u broke the build > > > > > > /usr/local/bin/clang40 -c -O2 -pipe -fno-strict-aliasing -g -nostdinc -I. > > -I/home/git/head/sys -I/home/git/head/sys/contrib/libfdt -D_KERNEL > > -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-omit-frame-pointer > > -mno-omit-leaf-frame-pointer -MD -MF.depend.genassym.o -MTgenassym.o > > -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float > > -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector > > -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes > > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef > > -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs > > -fdiagnostics-show-option -Wno-unknown-pragmas > > -Wno-error-tautological-compare -Wno-error-empty-body > > -Wno-error-parentheses-equality -Wno-error-unused-function > > -Wno-error-pointer-sign -Wno-error-shift-negative-value > > -Wno-error-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 > > /home/git/head/sys/amd64/amd64/genassym.c > > In file included from /home/git/head/sys/amd64/amd64/genassym.c:47: > > /home/git/head/sys/sys/bus.h:730:10: fatal error: 'device_if.h' file not > > found > > #include "device_if.h" > > ^ > > 1 error generated. > > *** Error code 1 > > I've got another report about this problem, but I can not reproduce it here > with > a clean kernel build of GENERIC. > I am not sure what the problem is. > Do you have anything unusual in make.conf, src.conf or your kernel > configuration? > I believe it, but on my machine genassym.c is processed before device_if.m cat /etc/make.conf: SENDMAIL_CF_DIR=/usr/local/share/sendmail/cf DEFAULT_VERSIONS+=linux=c6_64 KERNCONF= YOY CFLAGS += -ferror-limit=1 DEBUG_FLAGS += -g MODULES_OVERRIDE+=usb/usb usb/xhci usb/ehci usb/ukbd usb/umass usb/uhid usb/ums MODULES_OVERRIDE+=vmm nmdm drm2/drm2 drm2/i915kms fdescfs MODULES_OVERRIDE+=linux linux64 linprocfs linsysfs procfs pseudofs linux_common acpi/acpi_ibm CC=/usr/local/bin/clang40 CXX=/usr/local/bin/clang++40 CPP=/usr/local/bin/clang-cpp40 cat /etc/src.conf: WITHOUT_GAMES=yes WITHOUT_HTML=yes WITHOUT_IPFILTER=yes WITHOUT_IPFW=yes WITHOUT_NDIS=yes WITHOUT_NIS=yes WITHOUT_SVNLITE=yes WITHOUT_SYSINSTALL=yes WITHOUT_TESTS=yes WITHOUT_CLANG_FULL=yes WITHOUT_CLANG_BOOTSTRAP=yes ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316020 - head/sys/x86/x86
Author: avg Date: Mon Mar 27 11:04:57 2017 New Revision: 316020 URL: https://svnweb.freebsd.org/changeset/base/316020 Log: update comment describing topo_probe_amd() MFC after:2 weeks MFC with: r316017 Modified: head/sys/x86/x86/mp_x86.c Modified: head/sys/x86/x86/mp_x86.c == --- head/sys/x86/x86/mp_x86.c Mon Mar 27 10:48:28 2017(r316019) +++ head/sys/x86/x86/mp_x86.c Mon Mar 27 11:04:57 2017(r316020) @@ -227,11 +227,10 @@ add_deterministic_cache(int type, int le * Determine topology of processing units and caches for AMD CPUs. * See: * - AMD CPUID Specification (Publication # 25481) - * - BKDG For AMD Family 10h Processors (Publication # 31116), section 2.15 * - BKDG for AMD NPT Family 0Fh Processors (Publication # 32559) - * XXX At the moment the code does not recognize grouping of AMD CMT threads, - * if supported, into cores, so each thread is treated as being in its own - * core. In other words, each logical CPU is considered to be a core. + * - BKDG For AMD Family 10h Processors (Publication # 31116) + * - BKDG For AMD Family 15h Models 00h-0Fh Processors (Publication # 42301) + * - BKDG For AMD Family 16h Models 00h-0Fh Processors (Publication # 48751) */ static void topo_probe_amd(void) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316019 - in head/sys: kern teken
Author: bde Date: Mon Mar 27 10:48:28 2017 New Revision: 316019 URL: https://svnweb.freebsd.org/changeset/base/316019 Log: Oops, my fix for bright colors broke bright black some more (in cases that used to work via the bold hack). Fix the table entry for bright black. Fix spelling of plain black in nearby table entries (use the macro for black everywhere everywhere). Fix the currently-unused non-bright color table to not have bright colors in entries 9-15. Improve nearby comments. Start converting to the xterm terminology and default rendering of "bright" instead of "light" for bright colors. Syscons wasn't affected by the bug since I optimized it a little by converting colors 0-15 directly. This also fixes the layering of the conversion for these colors. Apply the same optimization to vt (actually the layer above it). This also moves the conversion 1 closer to the correct layer for colors 0-15. The optimization of just avoiding 2 calls to a trivial function is worth about 10% for simple output to the virtual buffer with occasional rendering. The optimization is so large because the 2 calls are done on every character, so although there are too many other calls and other instructions per character, there are only about 10 times as many. Old versions of syscons were about 10 times faster for simple output, by using a fast path with about 12 instructions per character. Rendering to even slow hardware takes relatively little time provided it is rarely actually done. Modified: head/sys/kern/subr_terminal.c head/sys/teken/teken.c Modified: head/sys/kern/subr_terminal.c == --- head/sys/kern/subr_terminal.c Mon Mar 27 10:38:53 2017 (r316018) +++ head/sys/kern/subr_terminal.c Mon Mar 27 10:48:28 2017 (r316019) @@ -146,9 +146,18 @@ static const teken_attr_t default_messag TCOLOR_BG(_c & 7) | ((_c & 8) << 20); \ }) +#defineTCOLOR_256TO16(color) __extension__ ({ \ + teken_color_t _c; \ + \ + _c = (color); \ + if (_c >= 16) \ + _c = teken_256to16(_c); \ + _c; \ +}) + #defineTCHAR_CREATE(c, a) ((c) | TFORMAT((a)->ta_format) | \ - TCOLOR_FG_FUDGED(teken_256to16((a)->ta_fgcolor)) | \ - TCOLOR_BG_FUDGED(teken_256to16((a)->ta_bgcolor))) + TCOLOR_FG_FUDGED(TCOLOR_256TO16((a)->ta_fgcolor)) | \ + TCOLOR_BG_FUDGED(TCOLOR_256TO16((a)->ta_bgcolor))) static void terminal_init(struct terminal *tm) Modified: head/sys/teken/teken.c == --- head/sys/teken/teken.c Mon Mar 27 10:38:53 2017(r316018) +++ head/sys/teken/teken.c Mon Mar 27 10:48:28 2017(r316019) @@ -491,11 +491,11 @@ teken_state_numbers(teken_t *t, teken_ch * be twice as large as green in (0, 1, 2). */ static const teken_color_t teken_256to8tab[] = { - /* xterm-16+ 8 dark colors: */ - 0, r, g, y, b, m, c, w, + /* xterm normal colors: */ + k, r, g, y, b, m, c, w, - /* xterm-16+ 8 light colors: */ - 0, R, G, Y, B, M, C, W, + /* xterm bright colors: */ + k, r, g, y, b, m, c, w, /* Red0 submap. */ k, b, b, b, b, b, @@ -559,11 +559,11 @@ static const teken_color_t teken_256to8t * used for different fine tuning of the tables. */ static const teken_color_t teken_256to16tab[] = { - /* xterm-16+ 8 dark colors: */ - 0, r, g, y, b, m, c, w, + /* xterm normal colors: */ + k, r, g, y, b, m, c, w, - /* xterm-16+ 8 light colors: */ - 0, R, G, Y, B, M, C, W, + /* xterm bright colors: */ + K, R, G, Y, B, M, C, W, /* Red0 submap. */ k, b, b, b, b, b, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316018 - head/sys/security/audit
Author: rwatson Date: Mon Mar 27 10:38:53 2017 New Revision: 316018 URL: https://svnweb.freebsd.org/changeset/base/316018 Log: Introduce an audit event identifier -> audit event name mapping database in the kernel audit implementation, similar the exist class mapping database. This will be used by the DTrace audit provider to map audit event identifiers originating in the system-call table back into strings for the purposes of setting probe names. The database is initialised and maintained by auditd(8), which reads values in from the audit_events configuration file, and then manages them using the A_GETEVENT and A_SETEVENT auditon(2) operations. Obtained from:TrustedBSD Project Sponsored by: DARPA, AFRL MFC after:3 weeks Modified: head/sys/security/audit/audit_bsm.c head/sys/security/audit/audit_bsm_klib.c head/sys/security/audit/audit_private.h head/sys/security/audit/audit_syscalls.c Modified: head/sys/security/audit/audit_bsm.c == --- head/sys/security/audit/audit_bsm.c Mon Mar 27 09:45:27 2017 (r316017) +++ head/sys/security/audit/audit_bsm.c Mon Mar 27 10:38:53 2017 (r316018) @@ -1,7 +1,13 @@ /* * Copyright (c) 1999-2009 Apple Inc. + * Copyright (c) 2016-2017 Robert N. M. Watson * All rights reserved. * + * Portions of this software were developed by BAE Systems, the University of + * Cambridge Computer Laboratory, and Memorial University under DARPA/AFRL + * contract FA8650-15-C-7558 ("CADETS"), as part of the DARPA Transparent + * Computing (TC) research program. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -67,6 +73,7 @@ kau_init(void) { au_evclassmap_init(); + au_evnamemap_init(); } /* Modified: head/sys/security/audit/audit_bsm_klib.c == --- head/sys/security/audit/audit_bsm_klib.cMon Mar 27 09:45:27 2017 (r316017) +++ head/sys/security/audit/audit_bsm_klib.cMon Mar 27 10:38:53 2017 (r316018) @@ -1,8 +1,13 @@ /* * Copyright (c) 1999-2009 Apple Inc. - * Copyright (c) 2005 Robert N. M. Watson + * Copyright (c) 2005, 2016 Robert N. M. Watson * All rights reserved. * + * Portions of this software were developed by BAE Systems, the University of + * Cambridge Computer Laboratory, and Memorial University under DARPA/AFRL + * contract FA8650-15-C-7558 ("CADETS"), as part of the DARPA Transparent + * Computing (TC) research program. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -42,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -76,6 +82,30 @@ static struct evclass_list evclass_hash[ #defineEVCLASS_WLOCK() rw_wlock(_lock) #defineEVCLASS_WUNLOCK() rw_wunlock(_lock) +/* + * Hash table maintaining a mapping from audit event numbers to audit event + * names. For now, used only by DTrace, but present always so that userspace + * tools can register and inspect fields consistently even if DTrace is not + * present. + * + * struct evname_elem is defined in audit_private.h so that audit_dtrace.c can + * use the definition. + */ +#defineEVNAMEMAP_HASH_TABLE_SIZE 251 +struct evname_list { + LIST_HEAD(, evname_elem)enl_head; +}; + +static MALLOC_DEFINE(M_AUDITEVNAME, "audit_evname", "Audit event name"); +static struct sx evnamemap_lock; +static struct evname_list evnamemap_hash[EVNAMEMAP_HASH_TABLE_SIZE]; + +#defineEVNAMEMAP_LOCK_INIT() sx_init(_lock, "evnamemap_lock"); +#defineEVNAMEMAP_RLOCK() sx_slock(_lock) +#defineEVNAMEMAP_RUNLOCK() sx_sunlock(_lock) +#defineEVNAMEMAP_WLOCK() sx_xlock(_lock) +#defineEVNAMEMAP_WUNLOCK() sx_xunlock(_lock) + struct aue_open_event { int aoe_flags; au_event_t aoe_event; @@ -222,6 +252,117 @@ au_preselect(au_event_t event, au_class_ } /* + * Look up the name for an audit event in the event-to-name mapping table. + */ +int +au_event_name(au_event_t event, char *name) +{ + struct evname_list *enl; + struct evname_elem *ene; + int error; + + error = ENOENT; + EVNAMEMAP_RLOCK(); + enl = _hash[event % EVNAMEMAP_HASH_TABLE_SIZE]; + LIST_FOREACH(ene, >enl_head, ene_entry) { + if (ene->ene_event == event) { + strlcpy(name, ene->ene_name, EVNAMEMAP_NAME_SIZE); + error = 0; + goto out; + } + } +out: + EVNAMEMAP_RUNLOCK(); + return (error); +} + +/* + * Insert a event-to-name mapping. If
svn commit: r316017 - head/sys/x86/x86
Author: avg Date: Mon Mar 27 09:45:27 2017 New Revision: 316017 URL: https://svnweb.freebsd.org/changeset/base/316017 Log: add SMT detection for newer AMD processors The change seems to be more in the nomenclature than in the way the topology is advertised by the hardware. Tested by:truckman (earlier version of the change) MFC after:2 weeks Modified: head/sys/x86/x86/mp_x86.c Modified: head/sys/x86/x86/mp_x86.c == --- head/sys/x86/x86/mp_x86.c Mon Mar 27 08:29:46 2017(r316016) +++ head/sys/x86/x86/mp_x86.c Mon Mar 27 09:45:27 2017(r316017) @@ -255,6 +255,22 @@ topo_probe_amd(void) pkg_id_shift = mask_width((cpu_procinfo2 & AMDID_CMP_CORES) + 1); + /* +* Families prior to 16h define the following value as +* cores per compute unit and we don't really care about the AMD +* compute units at the moment. Perhaps we should treat them as +* cores and cores within the compute units as hardware threads, +* but that's up for debate. +* Later families define the value as threads per compute unit, +* so we are following AMD's nomenclature here. +*/ + if ((amd_feature2 & AMDID2_TOPOLOGY) != 0 && + CPUID_TO_FAMILY(cpu_id) >= 0x16) { + cpuid_count(0x801e, 0, p); + share_count = ((p[1] >> 8) & 0xff) + 1; + core_id_shift = mask_width(share_count); + } + if ((amd_feature2 & AMDID2_TOPOLOGY) != 0) { for (i = 0; ; i++) { cpuid_count(0x801d, i, p); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r315959 - in head/sys: amd64/amd64 amd64/vmm amd64/vmm/amd i386/i386 x86/include x86/x86 x86/xen
On 03/26/2017 11:30, Chagin Dmitry wrote: > On Sat, Mar 25, 2017 at 06:45:09PM +, Andriy Gapon wrote: >> Author: avg >> Date: Sat Mar 25 18:45:09 2017 >> New Revision: 315959 >> URL: https://svnweb.freebsd.org/changeset/base/315959 >> >> Log: >> specific end of interrupt implementation for AMD Local APIC >> >> The change is more intrusive than I would like because the feature >> requires that a vector number is written to a special register. >> Thus, now the vector number has to be provided to lapic_eoi(). >> It was readily available in the IO-APIC and MSI cases, but the IPI >> handlers required more work. >> Also, we now store the VMM IPI number in a global variable, so that it >> is available to the justreturn handler for the same reason. >> >> Reviewed by: kib >> MFC after: 6 weeks >> Differential Revision: https://reviews.freebsd.org/D9880 >> >> Modified: >> head/sys/amd64/amd64/apic_vector.S >> head/sys/amd64/amd64/genassym.c > > > > Hi, Andriy, u broke the build > > > /usr/local/bin/clang40 -c -O2 -pipe -fno-strict-aliasing -g -nostdinc -I. > -I/home/git/head/sys -I/home/git/head/sys/contrib/libfdt -D_KERNEL > -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-omit-frame-pointer > -mno-omit-leaf-frame-pointer -MD -MF.depend.genassym.o -MTgenassym.o > -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float > -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector > -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef > -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs > -fdiagnostics-show-option -Wno-unknown-pragmas > -Wno-error-tautological-compare -Wno-error-empty-body > -Wno-error-parentheses-equality -Wno-error-unused-function > -Wno-error-pointer-sign -Wno-error-shift-negative-value > -Wno-error-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 > /home/git/head/sys/amd64/amd64/genassym.c > In file included from /home/git/head/sys/amd64/amd64/genassym.c:47: > /home/git/head/sys/sys/bus.h:730:10: fatal error: 'device_if.h' file not found > #include "device_if.h" > ^ > 1 error generated. > *** Error code 1 I've got another report about this problem, but I can not reproduce it here with a clean kernel build of GENERIC. I am not sure what the problem is. Do you have anything unusual in make.conf, src.conf or your kernel configuration? -- Andriy Gapon ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316015 - head/sys/security/audit
Author: rwatson Date: Mon Mar 27 08:29:17 2017 New Revision: 316015 URL: https://svnweb.freebsd.org/changeset/base/316015 Log: Extend comment describing path canonicalisation in audit. Sponsored by: DARPA, AFRL Obtained from:TrustedBSD Project MFC after:3 days Modified: head/sys/security/audit/audit_arg.c Modified: head/sys/security/audit/audit_arg.c == --- head/sys/security/audit/audit_arg.c Mon Mar 27 08:29:02 2017 (r316014) +++ head/sys/security/audit/audit_arg.c Mon Mar 27 08:29:17 2017 (r316015) @@ -708,7 +708,8 @@ audit_arg_file(struct proc *p, struct fi * Store a path as given by the user process for auditing into the audit * record stored on the user thread. This function will allocate the memory * to store the path info if not already available. This memory will be - * freed when the audit record is freed. + * freed when the audit record is freed. The path is canonlicalised with + * respect to the thread and directory descriptor passed. */ static void audit_arg_upath(struct thread *td, int dirfd, char *upath, char **pathp) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316013 - head/sys/net
Author: ae Date: Mon Mar 27 08:18:13 2017 New Revision: 316013 URL: https://svnweb.freebsd.org/changeset/base/316013 Log: ake pfil's locking macros private. Obtained from:Yandex LLC MFC after:1 week Modified: head/sys/net/pfil.c head/sys/net/pfil.h Modified: head/sys/net/pfil.c == --- head/sys/net/pfil.c Mon Mar 27 07:56:41 2017(r316012) +++ head/sys/net/pfil.c Mon Mar 27 08:18:13 2017(r316013) @@ -63,6 +63,32 @@ VNET_DEFINE(struct pfilheadhead, pfil_he VNET_DEFINE(struct rmlock, pfil_lock); #defineV_pfil_lock VNET(pfil_lock) +#definePFIL_LOCK_INIT_REAL(l, t) \ + rm_init_flags(l, "PFil " t " rmlock", RM_RECURSE) +#definePFIL_LOCK_DESTROY_REAL(l) \ + rm_destroy(l) +#definePFIL_LOCK_INIT(p) do {\ + if ((p)->flags & PFIL_FLAG_PRIVATE_LOCK) { \ + PFIL_LOCK_INIT_REAL(&(p)->ph_lock, "private"); \ + (p)->ph_plock = &(p)->ph_lock; \ + } else \ + (p)->ph_plock = _pfil_lock; \ +} while (0) +#definePFIL_LOCK_DESTROY(p)do {\ + if ((p)->flags & PFIL_FLAG_PRIVATE_LOCK)\ + PFIL_LOCK_DESTROY_REAL((p)->ph_plock); \ +} while (0) + +#definePFIL_TRY_RLOCK(p, t)rm_try_rlock((p)->ph_plock, (t)) +#definePFIL_RLOCK(p, t)rm_rlock((p)->ph_plock, (t)) +#definePFIL_WLOCK(p) rm_wlock((p)->ph_plock) +#definePFIL_RUNLOCK(p, t) rm_runlock((p)->ph_plock, (t)) +#definePFIL_WUNLOCK(p) rm_wunlock((p)->ph_plock) +#definePFIL_WOWNED(p) rm_wowned((p)->ph_plock) + +#definePFIL_HEADLIST_LOCK()mtx_lock(_global_lock) +#definePFIL_HEADLIST_UNLOCK() mtx_unlock(_global_lock) + /* * pfil_run_hooks() runs the specified packet filter hook chain. */ Modified: head/sys/net/pfil.h == --- head/sys/net/pfil.h Mon Mar 27 07:56:41 2017(r316012) +++ head/sys/net/pfil.h Mon Mar 27 08:18:13 2017(r316013) @@ -109,7 +109,6 @@ int pfil_head_register(struct pfil_head intpfil_head_unregister(struct pfil_head *); /* Public pfil locking functions for self managed locks by packet filters. */ -struct rm_priotracker; /* Do not require including rmlock header */ intpfil_try_rlock(struct pfil_head *, struct rm_priotracker *); void pfil_rlock(struct pfil_head *, struct rm_priotracker *); void pfil_runlock(struct pfil_head *, struct rm_priotracker *); @@ -117,32 +116,4 @@ void pfil_wlock(struct pfil_head *); void pfil_wunlock(struct pfil_head *); intpfil_wowned(struct pfil_head *ph); -/* Internal pfil locking functions. */ -#definePFIL_LOCK_INIT_REAL(l, t) \ - rm_init_flags(l, "PFil " t " rmlock", RM_RECURSE) -#definePFIL_LOCK_DESTROY_REAL(l) \ - rm_destroy(l) -#definePFIL_LOCK_INIT(p) do {\ - if ((p)->flags & PFIL_FLAG_PRIVATE_LOCK) { \ - PFIL_LOCK_INIT_REAL(&(p)->ph_lock, "private"); \ - (p)->ph_plock = &(p)->ph_lock; \ - } else \ - (p)->ph_plock = _pfil_lock; \ -} while (0) -#definePFIL_LOCK_DESTROY(p)do {\ - if ((p)->flags & PFIL_FLAG_PRIVATE_LOCK)\ - PFIL_LOCK_DESTROY_REAL((p)->ph_plock); \ -} while (0) - -#definePFIL_TRY_RLOCK(p, t)rm_try_rlock((p)->ph_plock, (t)) -#definePFIL_RLOCK(p, t)rm_rlock((p)->ph_plock, (t)) -#definePFIL_WLOCK(p) rm_wlock((p)->ph_plock) -#definePFIL_RUNLOCK(p, t) rm_runlock((p)->ph_plock, (t)) -#definePFIL_WUNLOCK(p) rm_wunlock((p)->ph_plock) -#definePFIL_WOWNED(p) rm_wowned((p)->ph_plock) - -/* Internal locking macros for global/vnet pfil_head_list. */ -#definePFIL_HEADLIST_LOCK()mtx_lock(_global_lock) -#definePFIL_HEADLIST_UNLOCK() mtx_unlock(_global_lock) - #endif /* _NET_PFIL_H_ */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316012 - head/sys/net
Author: ae Date: Mon Mar 27 07:56:41 2017 New Revision: 316012 URL: https://svnweb.freebsd.org/changeset/base/316012 Log: Declare module version. MFC after:1 week Modified: head/sys/net/if_enc.c Modified: head/sys/net/if_enc.c == --- head/sys/net/if_enc.c Mon Mar 27 07:06:45 2017(r316011) +++ head/sys/net/if_enc.c Mon Mar 27 07:56:41 2017(r316012) @@ -423,3 +423,4 @@ static moduledata_t enc_mod = { }; DECLARE_MODULE(if_enc, enc_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); +MODULE_VERSION(if_enc, 1); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316011 - head/sys/x86/iommu
Author: kib Date: Mon Mar 27 07:06:45 2017 New Revision: 316011 URL: https://svnweb.freebsd.org/changeset/base/316011 Log: Timeout DMAR commands. Implement timeouts for register-based DMAR commands. Tunable/sysctl hw.dmar.timeout specifies the timeout in nanoseconds, set it to zero to allow infinite wait. Default is 1ms. Runtime modification of the sysctl is not safe, it is allowed for debugging. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/x86/iommu/intel_dmar.h head/sys/x86/iommu/intel_drv.c head/sys/x86/iommu/intel_qi.c head/sys/x86/iommu/intel_utils.c Modified: head/sys/x86/iommu/intel_dmar.h == --- head/sys/x86/iommu/intel_dmar.h Mon Mar 27 07:02:27 2017 (r316010) +++ head/sys/x86/iommu/intel_dmar.h Mon Mar 27 07:06:45 2017 (r316011) @@ -290,6 +290,8 @@ int dmar_enable_ir(struct dmar_unit *uni int dmar_disable_ir(struct dmar_unit *unit); bool dmar_barrier_enter(struct dmar_unit *dmar, u_int barrier_id); void dmar_barrier_exit(struct dmar_unit *dmar, u_int barrier_id); +uint64_t dmar_get_timeout(void); +void dmar_update_timeout(uint64_t newval); int dmar_fault_intr(void *arg); void dmar_enable_fault_intr(struct dmar_unit *unit); @@ -507,6 +509,36 @@ dmar_test_boundary(dmar_gaddr_t start, d return (start + size <= ((start + boundary) & ~(boundary - 1))); } +extern struct timespec dmar_hw_timeout; + +#defineDMAR_WAIT_UNTIL(cond) \ +{ \ + struct timespec last, curr; \ + bool forever; \ + \ + if (dmar_hw_timeout.tv_sec == 0 && \ + dmar_hw_timeout.tv_nsec == 0) { \ + forever = true; \ + } else {\ + forever = false;\ + nanouptime(); \ + last = curr;\ + timespecadd(, _hw_timeout); \ + } \ + for (;;) { \ + if (cond) { \ + error = 0; \ + break; \ + } \ + nanouptime(); \ + if (!forever && timespeccmp(, , <)) { \ + error = ETIMEDOUT; \ + break; \ + } \ + cpu_spinwait(); \ + } \ +} + #ifdef INVARIANTS #defineTD_PREP_PINNED_ASSERT \ int old_td_pinned; \ Modified: head/sys/x86/iommu/intel_drv.c == --- head/sys/x86/iommu/intel_drv.c Mon Mar 27 07:02:27 2017 (r316010) +++ head/sys/x86/iommu/intel_drv.c Mon Mar 27 07:06:45 2017 (r316011) @@ -402,6 +402,7 @@ dmar_attach(device_t dev) { struct dmar_unit *unit; ACPI_DMAR_HARDWARE_UNIT *dmaru; + uint64_t timeout; int i, error; unit = device_get_softc(dev); @@ -426,6 +427,10 @@ dmar_attach(device_t dev) dmar_print_caps(dev, unit, dmaru); dmar_quirks_post_ident(unit); + timeout = dmar_get_timeout(); + TUNABLE_UINT64_FETCH("hw.dmar.timeout", ); + dmar_update_timeout(timeout); + for (i = 0; i < DMAR_INTR_TOTAL; i++) unit->intrs[i].irq = -1; Modified: head/sys/x86/iommu/intel_qi.c == --- head/sys/x86/iommu/intel_qi.c Mon Mar 27 07:02:27 2017 (r316010) +++ head/sys/x86/iommu/intel_qi.c Mon Mar 27 07:06:45 2017 (r316011) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -70,27 +71,27 @@ dmar_qi_seq_processed(const struct dmar_ static int dmar_enable_qi(struct dmar_unit *unit) { + int error; DMAR_ASSERT_LOCKED(unit); unit->hw_gcmd |= DMAR_GCMD_QIE; dmar_write4(unit, DMAR_GCMD_REG, unit->hw_gcmd); - /* XXXKIB should have a timeout */ - while ((dmar_read4(unit,
Re: svn commit: r315981 - head/sys/dev/iwn
Sun, 26 Mar 2017 17:43:18 +0300 було написано Hartmann, O.: On Sun, 26 Mar 2017 09:10:02 + (UTC) Andriy Voskoboinyk wrote: Author: avos Date: Sun Mar 26 09:10:01 2017 New Revision: 315981 URL: https://svnweb.freebsd.org/changeset/base/315981 Log: iwn: omit unneeded bus_dmamap_sync() calls when compiled without 'options IWN_DEBUG' Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c == --- head/sys/dev/iwn/if_iwn.c Sun Mar 26 08:54:08 2017 (r315980) +++ head/sys/dev/iwn/if_iwn.c Sun Mar 26 09:10:01 2017(r315981) @@ -3944,6 +3944,7 @@ iwn_notif_intr(struct iwn_softc *sc) sc->errptr = le32toh(uc->errptr); break; } +#ifdef IWN_DEBUG case IWN_STATE_CHANGED: { /* @@ -3953,27 +3954,26 @@ iwn_notif_intr(struct iwn_softc *sc) */ bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); -#ifdef IWN_DEBUG + uint32_t *status = (uint32_t *)(desc + 1); DPRINTF(sc, IWN_DEBUG_INTR | IWN_DEBUG_STATE, "state changed to %x\n", le32toh(*status)); -#endif break; } case IWN_START_SCAN: { bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); -#ifdef IWN_DEBUG + struct iwn_start_scan *scan = (struct iwn_start_scan *)(desc + 1); DPRINTF(sc, IWN_DEBUG_ANY, "%s: scanning channel %d status %x\n", __func__, scan->chan, le32toh(scan->status)); -#endif break; } +#endif case IWN_STOP_SCAN: { bus_dmamap_sync(sc->rxq.data_dmat, data->map, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org" It seems when iwm is configured in a kernel without debugging enabled, builkernel failsas shown below: [...] -- stage 3.1: building everything -- cd /usr/obj/usr/src/sys/HERMANN; COMPILER_VERSION=4 COMPILER_TYPE=clang COMPILER_FREEBSD_VERSION=126 MAKEOBJDIRPREFIX=/usr/obj MACHINE_ARCH=amd64 MACHINE=amd64 CPUTYPE=native BUILD_TOOLS_META=.NOMETA_CMP GROFF_BIN_PATH=/usr/obj/usr/src/tmp/legacy/usr/bin GROFF_FONT_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/groff_font GROFF_TMAC_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/tmac CC="cc -target x86_64-unknown-freebsd12.0 --sysroot=/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin" CXX="c++ -target x86_64-unknown-freebsd12.0 --sysroot=/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin" CPP="cpp -target x86_64-unknown-freebsd12.0 --sysroot=/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin" AS="as" AR="ar" LD="ld" LLVM_LINK="" NM=nm OBJCOPY="objcopy" RANLIB=ranlib STRINGS= SIZE="size" INSTALL="sh /usr/src/tools/install.sh" PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin make -m /usr/src/share/mk KERNEL=kernel all -DNO_MODULES_OBJ Building /usr/obj/usr/src/sys/HERMANN/if_iwm_scan.o /usr/src/sys/dev/iwm/if_iwm_scan.c:224:12: error: unused variable 'aborted' [-Werror,-Wunused-variable] boolean_t aborted = (scan_notif->status == IWM_SCAN_OFFLOAD_ABORTED); ^ /usr/src/sys/dev/iwm/if_iwm_scan.c:251:11: error: unused variable 'uid' [-Werror,-Wunused-variable] uint32_t uid = le32toh(notif->uid); Fixed in r316010. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316010 - head/sys/dev/iwm
Author: avos Date: Mon Mar 27 07:02:27 2017 New Revision: 316010 URL: https://svnweb.freebsd.org/changeset/base/316010 Log: iwm: fix build without IWM_DEBUG. Reported by: O. HartmannReviewed by: adrian Differential Revision:https://reviews.freebsd.org/D10146 Modified: head/sys/dev/iwm/if_iwm_scan.c Modified: head/sys/dev/iwm/if_iwm_scan.c == --- head/sys/dev/iwm/if_iwm_scan.c Mon Mar 27 06:37:03 2017 (r316009) +++ head/sys/dev/iwm/if_iwm_scan.c Mon Mar 27 07:02:27 2017 (r316010) @@ -201,6 +201,7 @@ iwm_mvm_scan_rate_n_flags(struct iwm_sof return htole32(IWM_RATE_6M_PLCP | tx_ant); } +#ifdef IWM_DEBUG static const char * iwm_mvm_ebs_status_str(enum iwm_scan_ebs_status status) { @@ -216,12 +217,18 @@ iwm_mvm_ebs_status_str(enum iwm_scan_ebs } } +static const char * +iwm_mvm_offload_status_str(enum iwm_scan_offload_complete_status status) +{ + return (status == IWM_SCAN_OFFLOAD_ABORTED) ? "aborted" : "completed"; +} +#endif + void iwm_mvm_rx_lmac_scan_complete_notif(struct iwm_softc *sc, struct iwm_rx_packet *pkt) { struct iwm_periodic_scan_complete *scan_notif = (void *)pkt->data; - boolean_t aborted = (scan_notif->status == IWM_SCAN_OFFLOAD_ABORTED); /* If this happens, the firmware has mistakenly sent an LMAC * notification during UMAC scans -- warn and ignore it. @@ -234,7 +241,7 @@ iwm_mvm_rx_lmac_scan_complete_notif(stru } IWM_DPRINTF(sc, IWM_DEBUG_SCAN, "Regular scan %s, EBS status %s (FW)\n", - aborted ? "aborted" : "completed", + iwm_mvm_offload_status_str(scan_notif->status), iwm_mvm_ebs_status_str(scan_notif->ebs_status)); sc->last_ebs_successful = @@ -248,13 +255,11 @@ iwm_mvm_rx_umac_scan_complete_notif(stru struct iwm_rx_packet *pkt) { struct iwm_umac_scan_complete *notif = (void *)pkt->data; - uint32_t uid = le32toh(notif->uid); - boolean_t aborted = (notif->status == IWM_SCAN_OFFLOAD_ABORTED); IWM_DPRINTF(sc, IWM_DEBUG_SCAN, "Scan completed, uid %u, status %s, EBS status %s\n", - uid, - aborted ? "aborted" : "completed", + le32toh(notif->uid), + iwm_mvm_offload_status_str(notif->status), iwm_mvm_ebs_status_str(notif->ebs_status)); if (notif->ebs_status != IWM_SCAN_EBS_SUCCESS && ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316009 - head/sys/sys
Author: kib Date: Mon Mar 27 06:37:03 2017 New Revision: 316009 URL: https://svnweb.freebsd.org/changeset/base/316009 Log: Fix TUNABLE_UINT64() on 32bit architectures. The macro is not used in the tree. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/sys/kernel.h Modified: head/sys/sys/kernel.h == --- head/sys/sys/kernel.h Mon Mar 27 03:11:51 2017(r316008) +++ head/sys/sys/kernel.h Mon Mar 27 06:37:03 2017(r316009) @@ -352,7 +352,7 @@ struct tunable_uint64 { uint64_t *var; }; #defineTUNABLE_UINT64(path, var) \ - static struct tunable_ulong __CONCAT(__tunable_uint64_, __LINE__) = { \ + static struct tunable_uint64 __CONCAT(__tunable_uint64_, __LINE__) = { \ (path), \ (var), \ }; \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"