svn commit: r304735 - head/sys/dev/usb/input
Author: bde Date: Wed Aug 24 05:54:11 2016 New Revision: 304735 URL: https://svnweb.freebsd.org/changeset/base/304735 Log: Fix key delay and repeat, part 2. Use sbintime_t timeouts with precision control to get very accurate timing. It costs little to always ask for about 1% accuracy, and the not so new event timer implementation usual delivers that, and when it can't it gets much closer than our previous coarse timeouts and buggy simple countdown. The 2 fastest atkbd repeat rates have periods 34 and 38 msec, and ukbd pretended to support rates in between these. This requires sub-microsecond precision and accuracy even to handle the 4 msec difference very well, but ukbd asked the timeout subsystem for timeouts of 25 msec and the buggy simple countdown of this gave a a wide range of precisions and accuracies depending on HZ and other timer configuration (sometimes better than 25 msec but usually more like 50 msec). We now ask for and usually get precision and accuracy of about 1% for each repeat and much better on average. The 1% accuracy is overkill. Rounding of 30 cps to 34 msec instead of 33 already gives an error of +2% instead of -1%, and ut AT keyboards on PS/2 interfaces have similar errors. A timeout is now scheduled for every keypress and release. This allows some simplifications that are not done. It allows removing the timeout scheduling for exiting polled mode where it was unsafe in ddb mode. This is done. Exiting polled mode had some problems with extra repeats. Now exiting polled mode lets an extra timeout fire and the state is fudged so that the timeout handler does very little. The sc->time_ms variable is unsigned to avoid overflow. Differences of it need to be signed. Signed comparisons were emulated by testing an emulated sign bits. This only works easily for '<' comparisonss, but we now need a '<=' comparison. Change the difference variable to signed and use a signed comparison. Using unsigned types here didn't prevent overflow bugs but just reduced them. Overflow occurs with n repeats at the silly repeat period of [U]INT_MAX / n. The old countdown had an off by 1 error, and the simplifications would simply count down 1 to 0 and not need to accumulate possibly-large repeat repeats. Modified: head/sys/dev/usb/input/ukbd.c Modified: head/sys/dev/usb/input/ukbd.c == --- head/sys/dev/usb/input/ukbd.c Wed Aug 24 05:01:20 2016 (r304734) +++ head/sys/dev/usb/input/ukbd.c Wed Aug 24 05:54:11 2016 (r304735) @@ -163,6 +163,8 @@ struct ukbd_softc { struct usb_interface *sc_iface; struct usb_xfer *sc_xfer[UKBD_N_TRANSFER]; + sbintime_t sc_co_basetime; + int sc_delay; uint32_t sc_ntime[UKBD_NKEYCODE]; uint32_t sc_otime[UKBD_NKEYCODE]; uint32_t sc_input[UKBD_IN_BUF_SIZE];/* input buffer */ @@ -182,7 +184,6 @@ struct ukbd_softc { #defineUKBD_FLAG_APPLE_EJECT 0x0040 #defineUKBD_FLAG_APPLE_FN 0x0080 #defineUKBD_FLAG_APPLE_SWAP0x0100 -#defineUKBD_FLAG_TIMER_RUNNING 0x0200 #defineUKBD_FLAG_CTRL_L0x0400 #defineUKBD_FLAG_CTRL_R0x0800 #defineUKBD_FLAG_SHIFT_L 0x1000 @@ -393,8 +394,14 @@ ukbd_any_key_pressed(struct ukbd_softc * static void ukbd_start_timer(struct ukbd_softc *sc) { - sc->sc_flags |= UKBD_FLAG_TIMER_RUNNING; - usb_callout_reset(>sc_callout, hz / 40, _timeout, sc); + sbintime_t delay, prec; + + delay = SBT_1MS * sc->sc_delay; + sc->sc_co_basetime += delay; + /* This is rarely called, so prefer precision to efficiency. */ + prec = qmin(delay >> 7, SBT_1MS * 10); + callout_reset_sbt(>sc_callout.co, sc->sc_co_basetime, prec, + ukbd_timeout, sc, C_ABSOLUTE); } static void @@ -503,10 +510,11 @@ ukbd_get_key(struct ukbd_softc *sc, uint static void ukbd_interrupt(struct ukbd_softc *sc) { + struct timeval ctv; uint32_t n_mod; uint32_t o_mod; uint32_t now = sc->sc_time_ms; - uint32_t dtime; + int32_t dtime; uint8_t key; uint8_t i; uint8_t j; @@ -564,7 +572,7 @@ rfound: ; sc->sc_ntime[i] = sc->sc_otime[j]; dtime = (sc->sc_otime[j] - now); - if (!(dtime & 0x8000)) { + if (dtime > 0) { /* time has not elapsed */ goto pfound; } @@ -572,6 +580,15 @@ rfound:; break; } } + if (j < UKBD_NKEYCODE) { + /* Old key repeating. */ +
svn commit: r304734 - vendor/sqlite3/sqlite-3140100
Author: cy Date: Wed Aug 24 05:01:20 2016 New Revision: 304734 URL: https://svnweb.freebsd.org/changeset/base/304734 Log: Tag import of sqlite3-3.14.1 (3140100). Added: vendor/sqlite3/sqlite-3140100/ - copied from r304733, vendor/sqlite3/dist/ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304733 - svnadmin/conf
Author: cy Date: Wed Aug 24 04:58:49 2016 New Revision: 304733 URL: https://svnweb.freebsd.org/changeset/base/304733 Log: sqlite3-3.14.1 (3140100) vendor import complete. Revert size limit restriction. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf == --- svnadmin/conf/sizelimit.confWed Aug 24 04:57:29 2016 (r304732) +++ svnadmin/conf/sizelimit.confWed Aug 24 04:58:49 2016 (r304733) @@ -17,7 +17,6 @@ achim bapt brooks -cy davidcs dim imp ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304731 - svnadmin/conf
Author: cy Date: Wed Aug 24 04:56:56 2016 New Revision: 304731 URL: https://svnweb.freebsd.org/changeset/base/304731 Log: Temporarily remove size limit restriction in order to import sqlite3-3.14.1 (3140100) into the vendor branch. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf == --- svnadmin/conf/sizelimit.confWed Aug 24 04:36:04 2016 (r304730) +++ svnadmin/conf/sizelimit.confWed Aug 24 04:56:56 2016 (r304731) @@ -17,6 +17,7 @@ achim bapt brooks +cy davidcs dim imp ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304732 - in vendor/sqlite3/dist: . tea tea/doc tea/generic tea/tclconfig tea/win
Author: cy Date: Wed Aug 24 04:57:29 2016 New Revision: 304732 URL: https://svnweb.freebsd.org/changeset/base/304732 Log: Import sqlite3-3.14.1 (3140100) Added: vendor/sqlite3/dist/Makefile.msc (contents, props changed) vendor/sqlite3/dist/Replace.cs vendor/sqlite3/dist/compile (contents, props changed) vendor/sqlite3/dist/sqlite3.rc vendor/sqlite3/dist/tea/ vendor/sqlite3/dist/tea/Makefile.in (contents, props changed) vendor/sqlite3/dist/tea/README vendor/sqlite3/dist/tea/aclocal.m4 vendor/sqlite3/dist/tea/configure (contents, props changed) vendor/sqlite3/dist/tea/configure.ac vendor/sqlite3/dist/tea/doc/ vendor/sqlite3/dist/tea/doc/sqlite3.n vendor/sqlite3/dist/tea/generic/ vendor/sqlite3/dist/tea/generic/tclsqlite3.c (contents, props changed) vendor/sqlite3/dist/tea/license.terms vendor/sqlite3/dist/tea/pkgIndex.tcl.in (contents, props changed) vendor/sqlite3/dist/tea/tclconfig/ vendor/sqlite3/dist/tea/tclconfig/install-sh vendor/sqlite3/dist/tea/tclconfig/tcl.m4 vendor/sqlite3/dist/tea/win/ vendor/sqlite3/dist/tea/win/makefile.vc (contents, props changed) vendor/sqlite3/dist/tea/win/nmakehlp.c (contents, props changed) vendor/sqlite3/dist/tea/win/rules.vc Modified: vendor/sqlite3/dist/Makefile.am vendor/sqlite3/dist/Makefile.in vendor/sqlite3/dist/configure vendor/sqlite3/dist/configure.ac vendor/sqlite3/dist/shell.c vendor/sqlite3/dist/sqlite3.c vendor/sqlite3/dist/sqlite3.h vendor/sqlite3/dist/sqlite3ext.h Modified: vendor/sqlite3/dist/Makefile.am == --- vendor/sqlite3/dist/Makefile.am Wed Aug 24 04:56:56 2016 (r304731) +++ vendor/sqlite3/dist/Makefile.am Wed Aug 24 04:57:29 2016 (r304732) @@ -1,5 +1,5 @@ -AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_EXTENSION_FLAGS@ @FTS5_FLAGS@ @JSON1_FLAGS@ -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE +AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_EXTENSION_FLAGS@ @FTS5_FLAGS@ @JSON1_FLAGS@ @SESSION_FLAGS@ -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE lib_LTLIBRARIES = libsqlite3.la libsqlite3_la_SOURCES = sqlite3.c Modified: vendor/sqlite3/dist/Makefile.in == --- vendor/sqlite3/dist/Makefile.in Wed Aug 24 04:56:56 2016 (r304731) +++ vendor/sqlite3/dist/Makefile.in Wed Aug 24 04:57:29 2016 (r304732) @@ -305,6 +305,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ +SESSION_FLAGS = @SESSION_FLAGS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -362,7 +363,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_EXTENSION_FLAGS@ @FTS5_FLAGS@ @JSON1_FLAGS@ -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE +AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_EXTENSION_FLAGS@ @FTS5_FLAGS@ @JSON1_FLAGS@ @SESSION_FLAGS@ -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE lib_LTLIBRARIES = libsqlite3.la libsqlite3_la_SOURCES = sqlite3.c libsqlite3_la_LDFLAGS = -no-undefined -version-info 8:6:8 Added: vendor/sqlite3/dist/Makefile.msc == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/sqlite3/dist/Makefile.mscWed Aug 24 04:57:29 2016 (r304732) @@ -0,0 +1,971 @@ + DO NOT EDIT +# This makefile is automatically generated from the Makefile.msc at +# the root of the canonical SQLite source tree (not the +# amalgamation tarball) using the tool/mkmsvcmin.tcl +# script. +# + +# +# nmake Makefile for SQLite +# +### +## START OF OPTIONS ### +### + +# The toplevel directory of the source tree. This is the directory +# that contains this "Makefile.msc". +# +TOP = . + + +# Set this non-0 to enable full warnings (-W4, etc) when compiling. +# +!IFNDEF USE_FULLWARN +USE_FULLWARN = 0 +!ENDIF + +# Set this non-0 to enable full runtime error checks (-RTC1, etc). This +# has no effect if (any) optimizations are enabled. +# +!IFNDEF USE_RUNTIME_CHECKS +USE_RUNTIME_CHECKS = 0 +!ENDIF + +# Set this non-0 to use "stdcall" calling convention for the core library +# and shell executable. +# +!IFNDEF USE_STDCALL +USE_STDCALL = 0 +!ENDIF + +# Set this non-0 to have the shell executable link against the core dynamic +# link library. +# +!IFNDEF DYNAMIC_SHELL +DYNAMIC_SHELL = 0 +!ENDIF + +# Set this non-0 to enable extra code that attempts to detect misuse of the +# SQLite API. +# +!IFNDEF API_ARMOR +API_ARMOR = 0 +!ENDIF + +# If necessary, create a list of harmless compiler warnings to disable when +# compiling the various tools. For the
svn commit: r304730 - head/sys/dev/hyperv/utilities
Author: sephe Date: Wed Aug 24 04:36:04 2016 New Revision: 304730 URL: https://svnweb.freebsd.org/changeset/base/304730 Log: hyperv/ic: Redefine IC version negotiate message. And stringent input IC version negotiate message checks. MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7614 Added: head/sys/dev/hyperv/utilities/vmbus_icreg.h (contents, props changed) Modified: head/sys/dev/hyperv/utilities/hv_heartbeat.c head/sys/dev/hyperv/utilities/hv_shutdown.c head/sys/dev/hyperv/utilities/hv_timesync.c head/sys/dev/hyperv/utilities/hv_util.c head/sys/dev/hyperv/utilities/hv_util.h Modified: head/sys/dev/hyperv/utilities/hv_heartbeat.c == --- head/sys/dev/hyperv/utilities/hv_heartbeat.cWed Aug 24 04:33:21 2016(r304729) +++ head/sys/dev/hyperv/utilities/hv_heartbeat.cWed Aug 24 04:36:04 2016(r304730) @@ -80,7 +80,11 @@ hv_heartbeat_cb(struct vmbus_channel *ch [sizeof(struct hv_vmbus_pipe_hdr)]; if (icmsghdrp->icmsgtype == HV_ICMSGTYPE_NEGOTIATE) { - hv_negotiate_version(icmsghdrp, buf); + int error; + + error = vmbus_ic_negomsg(softc, buf, recvlen); + if (error) + return; } else { heartbeat_msg = (struct hv_vmbus_heartbeat_msg_data *) Modified: head/sys/dev/hyperv/utilities/hv_shutdown.c == --- head/sys/dev/hyperv/utilities/hv_shutdown.c Wed Aug 24 04:33:21 2016 (r304729) +++ head/sys/dev/hyperv/utilities/hv_shutdown.c Wed Aug 24 04:36:04 2016 (r304730) @@ -85,7 +85,11 @@ hv_shutdown_cb(struct vmbus_channel *cha [sizeof(struct hv_vmbus_pipe_hdr)]; if (icmsghdrp->icmsgtype == HV_ICMSGTYPE_NEGOTIATE) { - hv_negotiate_version(icmsghdrp, buf); + int error; + + error = vmbus_ic_negomsg(softc, buf, recv_len); + if (error) + return; } else { shutdown_msg = (struct hv_vmbus_shutdown_msg_data *) Modified: head/sys/dev/hyperv/utilities/hv_timesync.c == --- head/sys/dev/hyperv/utilities/hv_timesync.c Wed Aug 24 04:33:21 2016 (r304729) +++ head/sys/dev/hyperv/utilities/hv_timesync.c Wed Aug 24 04:36:04 2016 (r304730) @@ -160,7 +160,11 @@ hv_timesync_cb(struct vmbus_channel *cha sizeof(struct hv_vmbus_pipe_hdr)]; if (icmsghdrp->icmsgtype == HV_ICMSGTYPE_NEGOTIATE) { - hv_negotiate_version(icmsghdrp, time_buf); + int error; + + error = vmbus_ic_negomsg(>util_sc, time_buf, recvlen); + if (error) + return; } else { timedatap = (struct hv_ictimesync_data *) _buf[ sizeof(struct hv_vmbus_pipe_hdr) + Modified: head/sys/dev/hyperv/utilities/hv_util.c == --- head/sys/dev/hyperv/utilities/hv_util.c Wed Aug 24 04:33:21 2016 (r304729) +++ head/sys/dev/hyperv/utilities/hv_util.c Wed Aug 24 04:36:04 2016 (r304730) @@ -36,44 +36,62 @@ #include #include #include +#include #include -#include #include #include -#include #include +#include #include "vmbus_if.h" #define VMBUS_IC_BRSIZE(4 * PAGE_SIZE) -void -hv_negotiate_version(struct hv_vmbus_icmsg_hdr *icmsghdrp, uint8_t *buf) +CTASSERT(sizeof(struct vmbus_icmsg_negotiate) < VMBUS_IC_BRSIZE); + +int +vmbus_ic_negomsg(struct hv_util_sc *sc, void *data, int dlen) { - struct hv_vmbus_icmsg_negotiate *negop; + struct vmbus_icmsg_negotiate *nego; + int cnt, major; - icmsghdrp->icmsgsize = 0x10; + /* +* Preliminary message size verification +*/ + if (dlen < sizeof(*nego)) { + device_printf(sc->ic_dev, "truncated ic negotiate, len %d\n", + dlen); + return EINVAL; + } + nego = data; - negop = (struct hv_vmbus_icmsg_negotiate *)[ - sizeof(struct hv_vmbus_pipe_hdr) + - sizeof(struct hv_vmbus_icmsg_hdr)]; - - if (negop->icframe_vercnt >= 2 && - negop->icversion_data[1].major == 3) { - negop->icversion_data[0].major = 3; - negop->icversion_data[0].minor = 0; - negop->icversion_data[1].major = 3; - negop->icversion_data[1].minor = 0; - } else { - negop->icversion_data[0].major = 1; - negop->icversion_data[0].minor = 0; - negop->icversion_data[1].major = 1; -
svn commit: r304729 - releng/11.0/sys/conf
Author: gjb Date: Wed Aug 24 04:33:21 2016 New Revision: 304729 URL: https://svnweb.freebsd.org/changeset/base/304729 Log: Update releng/11.0 to RC2 status as part of the 11.0-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/sys/conf/newvers.sh Modified: releng/11.0/sys/conf/newvers.sh == --- releng/11.0/sys/conf/newvers.sh Wed Aug 24 04:21:15 2016 (r304728) +++ releng/11.0/sys/conf/newvers.sh Wed Aug 24 04:33:21 2016 (r304729) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="11.0" -BRANCH="RC1" +BRANCH="RC2" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304728 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Wed Aug 24 04:21:15 2016 New Revision: 304728 URL: https://svnweb.freebsd.org/changeset/base/304728 Log: hyperv/hn: Log a warning for RESET_CMPLT. RESET is not used by the hn(4) at all, and RESET_CMPLT does not even have a rid to match with the pending requests. So, let's put it onto an independent switch branch and log a warning about it. MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7602 Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c == --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.cWed Aug 24 03:51:40 2016(r304727) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.cWed Aug 24 04:21:15 2016(r304728) @@ -324,16 +324,9 @@ hv_rf_receive_response(rndis_device *dev memcpy(>response_msg, response, response->msg_len); } else { - if (response->ndis_msg_type == REMOTE_NDIS_RESET_CMPLT) { - /* Does not have a request id field */ - request->response_msg.msg.reset_complete.status = - STATUS_BUFFER_OVERFLOW; - } else { - request->response_msg.msg.init_complete.status = - STATUS_BUFFER_OVERFLOW; - } + request->response_msg.msg.init_complete.status = + STATUS_BUFFER_OVERFLOW; } - sema_post(>wait_sema); } } @@ -566,29 +559,40 @@ hv_rf_on_receive(struct hn_softc *sc, st rndis_hdr = data; switch (rndis_hdr->ndis_msg_type) { - /* data message */ case REMOTE_NDIS_PACKET_MSG: hv_rf_receive_data(rxr, data, dlen); break; + /* completion messages */ case REMOTE_NDIS_INITIALIZE_CMPLT: case REMOTE_NDIS_QUERY_CMPLT: case REMOTE_NDIS_SET_CMPLT: - case REMOTE_NDIS_RESET_CMPLT: case REMOTE_NDIS_KEEPALIVE_CMPLT: hv_rf_receive_response(rndis_dev, rndis_hdr); break; + /* notification message */ case REMOTE_NDIS_INDICATE_STATUS_MSG: hv_rf_receive_indicate_status(rndis_dev, rndis_hdr); break; + + case REMOTE_NDIS_RESET_CMPLT: + /* +* Reset completed, no rid. +* +* NOTE: +* RESET is not issued by hn(4), so this message should +* _not_ be observed. +*/ + if_printf(sc->hn_ifp, "RESET CMPLT received\n"); + break; + default: - printf("hv_rf_on_receive(): Unknown msg_type 0x%x\n", + if_printf(sc->hn_ifp, "unknown RNDIS message 0x%x\n", rndis_hdr->ndis_msg_type); break; } - return (0); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304727 - in head/sys/powerpc: booke include
Author: jhibbits Date: Wed Aug 24 03:51:40 2016 New Revision: 304727 URL: https://svnweb.freebsd.org/changeset/base/304727 Log: Fix system hang when large FDT is in use Summary: Kernel maps only one page of FDT. When FDT is more than one page in size, data TLB miss occurs on memmove() when FDT is moved to kernel storage (sys/powerpc/booke/booke_machdep.c, booke_init()) This introduces a pmap_early_io_unmap() to complement pmap_early_io_map(), which can be used for any early I/O mapping, but currently is only used when mapping the fdt. Submitted by: Ivan Krivonos Differential Revision: https://reviews.freebsd.org/D7605 Modified: head/sys/powerpc/booke/booke_machdep.c head/sys/powerpc/booke/pmap.c head/sys/powerpc/include/pmap.h Modified: head/sys/powerpc/booke/booke_machdep.c == --- head/sys/powerpc/booke/booke_machdep.c Wed Aug 24 03:44:20 2016 (r304726) +++ head/sys/powerpc/booke/booke_machdep.c Wed Aug 24 03:51:40 2016 (r304727) @@ -249,6 +249,7 @@ static int booke_check_for_fdt(uint32_t arg1, vm_offset_t *dtbp) { void *ptr; + int fdt_size; if (arg1 % 8 != 0) return (-1); @@ -257,6 +258,19 @@ booke_check_for_fdt(uint32_t arg1, vm_of if (fdt_check_header(ptr) != 0) return (-1); + /* +* Read FDT total size from the header of FDT. +* This for sure hits within first page which is +* already mapped. +*/ + fdt_size = fdt_totalsize((void *)ptr); + + /* +* Ok, arg1 points to FDT, so we need to map it in. +* First, unmap this page and then map FDT again with full size +*/ + pmap_early_io_unmap((vm_offset_t)ptr, PAGE_SIZE); + ptr = (void *)pmap_early_io_map(arg1, fdt_size); *dtbp = (vm_offset_t)ptr; return (0); Modified: head/sys/powerpc/booke/pmap.c == --- head/sys/powerpc/booke/pmap.c Wed Aug 24 03:44:20 2016 (r304726) +++ head/sys/powerpc/booke/pmap.c Wed Aug 24 03:51:40 2016 (r304727) @@ -3419,6 +3419,29 @@ tlb1_init() set_mas4_defaults(); } +void +pmap_early_io_unmap(vm_offset_t va, vm_size_t size) +{ + int i; + tlb_entry_t e; + + for (i = 0; i < TLB1_ENTRIES && size > 0; i ++) { + tlb1_read_entry(, i); + if (!(e.mas1 & MAS1_VALID)) + continue; + /* +* FIXME: this code does not work if VA region +* spans multiple TLB entries. This does not cause +* problems right now but shall be fixed in the future +*/ + if (va >= e.virt && (va + size) <= (e.virt + e.size)) { + size -= e.size; + e.mas1 &= ~MAS1_VALID; + tlb1_write_entry(, i); + } + } +} + vm_offset_t pmap_early_io_map(vm_paddr_t pa, vm_size_t size) { Modified: head/sys/powerpc/include/pmap.h == --- head/sys/powerpc/include/pmap.h Wed Aug 24 03:44:20 2016 (r304726) +++ head/sys/powerpc/include/pmap.h Wed Aug 24 03:51:40 2016 (r304727) @@ -260,6 +260,7 @@ extern vm_offset_t msgbuf_phys; extern int pmap_bootstrapped; vm_offset_t pmap_early_io_map(vm_paddr_t pa, vm_size_t size); +void pmap_early_io_unmap(vm_offset_t va, vm_size_t size); #endif ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304725 - head/sys/dev/usb/input
Author: kevlo Date: Wed Aug 24 03:44:16 2016 New Revision: 304725 URL: https://svnweb.freebsd.org/changeset/base/304725 Log: Bring datasheet URL up to date. Modified: head/sys/dev/usb/input/uep.c Modified: head/sys/dev/usb/input/uep.c == --- head/sys/dev/usb/input/uep.cWed Aug 24 03:28:58 2016 (r304724) +++ head/sys/dev/usb/input/uep.cWed Aug 24 03:44:16 2016 (r304725) @@ -27,7 +27,7 @@ */ /* - * http://home.eeti.com.tw/web20/drivers/Software%20Programming%20Guide_v2.0.pdf + * http://www.eeti.com.tw/pdf/Software%20Programming%20Guide_v2.0.pdf */ #include ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304724 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Wed Aug 24 03:28:58 2016 New Revision: 304724 URL: https://svnweb.freebsd.org/changeset/base/304724 Log: hyperv/hn: Remove the redundant rid setting for RNDIS HALT. MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7595 Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c == --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.cWed Aug 24 03:16:25 2016(r304723) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.cWed Aug 24 03:28:58 2016(r304724) @@ -928,7 +928,6 @@ static int hv_rf_halt_device(rndis_device *device) { rndis_request *request; - rndis_halt_request *halt; int i, ret; /* Attempt to do a rndis device halt */ @@ -941,12 +940,6 @@ hv_rf_halt_device(rndis_device *device) /* initialize "poor man's semaphore" */ request->halt_complete_flag = 0; - /* Set up the rndis set */ - halt = >request_msg.msg.halt_request; - halt->request_id = atomic_fetchadd_int(>new_request_id, 1); - /* Increment to get the new value (call above returns old value) */ - halt->request_id += 1; - ret = hv_rf_send_request(device, request, REMOTE_NDIS_HALT_MSG); if (ret != 0) { return (-1); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304723 - head/sys/net
Author: sephe Date: Wed Aug 24 03:16:25 2016 New Revision: 304723 URL: https://svnweb.freebsd.org/changeset/base/304723 Log: net/rndis: Fix RNDIS_STATUS_PENDING definition. While I'm here, sort the RNDIS status in ascending order. MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7594 Modified: head/sys/net/rndis.h Modified: head/sys/net/rndis.h == --- head/sys/net/rndis.hWed Aug 24 03:08:13 2016(r304722) +++ head/sys/net/rndis.hWed Aug 24 03:16:25 2016(r304723) @@ -27,15 +27,15 @@ #defineRNDIS_VERSION_MAJOR 0x0001 #defineRNDIS_VERSION_MINOR 0x -#defineRNDIS_STATUS_BUFFER_OVERFLOW0x8005L -#defineRNDIS_STATUS_FAILURE0xC001L -#defineRNDIS_STATUS_INVALID_DATA 0xC0010015L +#defineRNDIS_STATUS_SUCCESS0xL +#defineRNDIS_STATUS_PENDING0x0103L #defineRNDIS_STATUS_MEDIA_CONNECT 0x4001000BL #defineRNDIS_STATUS_MEDIA_DISCONNECT 0x4001000CL +#defineRNDIS_STATUS_BUFFER_OVERFLOW0x8005L +#defineRNDIS_STATUS_FAILURE0xC001L #defineRNDIS_STATUS_NOT_SUPPORTED 0xC0BBL -#defineRNDIS_STATUS_PENDINGSTATUS_PENDING /* XXX */ #defineRNDIS_STATUS_RESOURCES 0xC09AL -#defineRNDIS_STATUS_SUCCESS0xL +#defineRNDIS_STATUS_INVALID_DATA 0xC0010015L #defineOID_GEN_SUPPORTED_LIST 0x00010101 #defineOID_GEN_HARDWARE_STATUS 0x00010102 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304722 - in head/sys: dev/usb/net net
Author: sephe Date: Wed Aug 24 03:08:13 2016 New Revision: 304722 URL: https://svnweb.freebsd.org/changeset/base/304722 Log: net/rndis: Add canonical RNDIS major/minor version as of today. Reviewed by: hps MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7593 Modified: head/sys/dev/usb/net/if_urndis.c head/sys/net/rndis.h Modified: head/sys/dev/usb/net/if_urndis.c == --- head/sys/dev/usb/net/if_urndis.cWed Aug 24 02:41:24 2016 (r304721) +++ head/sys/dev/usb/net/if_urndis.cWed Aug 24 03:08:13 2016 (r304722) @@ -658,7 +658,7 @@ urndis_ctrl_init(struct urndis_softc *sc msg.rm_type = htole32(REMOTE_NDIS_INITIALIZE_MSG); msg.rm_len = htole32(sizeof(msg)); msg.rm_rid = 0; - msg.rm_ver_major = htole32(1); + msg.rm_ver_major = htole32(RNDIS_VERSION_MAJOR); msg.rm_ver_minor = htole32(1); msg.rm_max_xfersz = htole32(RNDIS_RX_MAXLEN); Modified: head/sys/net/rndis.h == --- head/sys/net/rndis.hWed Aug 24 02:41:24 2016(r304721) +++ head/sys/net/rndis.hWed Aug 24 03:08:13 2016(r304722) @@ -23,6 +23,10 @@ #ifndef_NET_RNDIS_H_ #define_NET_RNDIS_H_ +/* Canonical major/minor version as of 22th Aug. 2016. */ +#defineRNDIS_VERSION_MAJOR 0x0001 +#defineRNDIS_VERSION_MINOR 0x + #defineRNDIS_STATUS_BUFFER_OVERFLOW0x8005L #defineRNDIS_STATUS_FAILURE0xC001L #defineRNDIS_STATUS_INVALID_DATA 0xC0010015L ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r304567 - head/sys/dev/usb/input
On Tue, 23 Aug 2016, Ngie Cooper (yaneurabeya) wrote: On Aug 23, 2016, at 13:57, Bryan Drewerywrote: ... Well yours only supports stable/10+ and not 9- with the older merge style. *shrugs* The older method promoted broken mergeinfo? The method I wrote up works fine with ^/stable/9- ? just with non-sparse checkouts (I don?t recommend sparse checkouts, again because it can screw up mergeinfo) :). I have to/want to use a very sparse checkout. Currently 19MB. This doesn't seem to have caused any problems so far, except I somehow got .svn databases in the most active subdirs. Bruce___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304721 - head/usr.sbin/ntp/doc
Author: cy Date: Wed Aug 24 02:41:24 2016 New Revision: 304721 URL: https://svnweb.freebsd.org/changeset/base/304721 Log: Fixup man page formatting. Submitted by: Steve KarglDiscussed with: bjk@ MFC after:3 days Modified: head/usr.sbin/ntp/doc/sntp.8 Modified: head/usr.sbin/ntp/doc/sntp.8 == --- head/usr.sbin/ntp/doc/sntp.8Wed Aug 24 02:32:40 2016 (r304720) +++ head/usr.sbin/ntp/doc/sntp.8Wed Aug 24 02:41:24 2016 (r304721) @@ -213,7 +213,7 @@ of seconds specified before giving up. more than enough for a unicast response. If \fBsntp\fP is only waiting for a broadcast response a longer timeout is likely needed. -.It Fl \-wait , " Fl \-no\-wait" +.It Fl \-wait , Fl \-no\-wait Wait for pending replies (if not setting the time). The \fIno\-wait\fP form will disable the option. This option is enabled by default. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304720 - in releng/11.0: share/mk sys/conf
Author: bdrewery Date: Wed Aug 24 02:32:40 2016 New Revision: 304720 URL: https://svnweb.freebsd.org/changeset/base/304720 Log: MFS r304717: MFC r304697: FAST_DEPEND: Fix 'make all install' not properly rebuilding based on .depend.* files. Approved by: re (gjb) Modified: releng/11.0/share/mk/bsd.dep.mk releng/11.0/sys/conf/kern.post.mk Directory Properties: releng/11.0/ (props changed) Modified: releng/11.0/share/mk/bsd.dep.mk == --- releng/11.0/share/mk/bsd.dep.mk Wed Aug 24 02:31:03 2016 (r304719) +++ releng/11.0/share/mk/bsd.dep.mk Wed Aug 24 02:32:40 2016 (r304720) @@ -76,12 +76,13 @@ tags: ${SRCS} _meta_filemon= 1 .endif -# Skip reading .depend when not needed to speed up tree-walks -# and simple lookups. +# Skip reading .depend when not needed to speed up tree-walks and simple +# lookups. For install, only do this if no other targets are specified. # Also skip generating or including .depend.* files if in meta+filemon mode # since it will track dependencies itself. OBJS_DEPEND_GUESS is still used. .if !empty(.MAKEFLAGS:M-V${_V_READ_DEPEND}) || make(obj) || make(clean*) || \ -make(install*) || make(analyze) || defined(_meta_filemon) +${.TARGETS:M*install*} == ${.TARGETS} || \ +make(analyze) || defined(_meta_filemon) _SKIP_READ_DEPEND= 1 .if ${MK_DIRDEPS_BUILD} == "no" .MAKE.DEPENDFILE= /dev/null Modified: releng/11.0/sys/conf/kern.post.mk == --- releng/11.0/sys/conf/kern.post.mk Wed Aug 24 02:31:03 2016 (r304719) +++ releng/11.0/sys/conf/kern.post.mk Wed Aug 24 02:32:40 2016 (r304720) @@ -196,12 +196,13 @@ ${SYSTEM_OBJS} genassym.o vers.o: opt_gl .if !empty(.MAKE.MODE:Unormal:Mmeta) && empty(.MAKE.MODE:Unormal:Mnofilemon) _meta_filemon= 1 .endif -# Skip reading .depend when not needed to speed up tree-walks -# and simple lookups. +# Skip reading .depend when not needed to speed up tree-walks and simple +# lookups. For install, only do this if no other targets are specified. # Also skip generating or including .depend.* files if in meta+filemon mode # since it will track dependencies itself. OBJS_DEPEND_GUESS is still used. .if !empty(.MAKEFLAGS:M-V${_V_READ_DEPEND}) || make(obj) || make(clean*) || \ -make(install*) || make(kernel-obj) || make(kernel-clean*) || \ +${.TARGETS:M*install*} == ${.TARGETS} || \ +make(kernel-obj) || make(kernel-clean*) || \ make(kernel-install*) || defined(_meta_filemon) _SKIP_READ_DEPEND= 1 .MAKE.DEPENDFILE= /dev/null ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304719 - releng/11.0/sys/net80211
Author: bdrewery Date: Wed Aug 24 02:31:03 2016 New Revision: 304719 URL: https://svnweb.freebsd.org/changeset/base/304719 Log: MFS r304715: MFC r304322: [net80211] correctly lock the ifp before accessing the lladdr. Approved by: re (gjb) Modified: releng/11.0/sys/net80211/ieee80211_ioctl.c Directory Properties: releng/11.0/ (props changed) Modified: releng/11.0/sys/net80211/ieee80211_ioctl.c == --- releng/11.0/sys/net80211/ieee80211_ioctl.c Wed Aug 24 02:29:25 2016 (r304718) +++ releng/11.0/sys/net80211/ieee80211_ioctl.c Wed Aug 24 02:31:03 2016 (r304719) @@ -3394,10 +3394,12 @@ ieee80211_ioctl(struct ifnet *ifp, u_lon * Check if the MAC address was changed * via SIOCSIFLLADDR ioctl. */ + if_addr_rlock(ifp); if ((ifp->if_flags & IFF_UP) == 0 && !IEEE80211_ADDR_EQ(vap->iv_myaddr, IF_LLADDR(ifp))) IEEE80211_ADDR_COPY(vap->iv_myaddr, IF_LLADDR(ifp)); + if_addr_runlock(ifp); } break; case SIOCADDMULTI: ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304718 - releng/11.0/share/i18n/esdb
Author: bdrewery Date: Wed Aug 24 02:29:25 2016 New Revision: 304718 URL: https://svnweb.freebsd.org/changeset/base/304718 Log: MFS r304714: MFC r304643: Fix building on read-only source trees. PR: 211952 Approved by: re (gjb) Modified: releng/11.0/share/i18n/esdb/Makefile.part Directory Properties: releng/11.0/ (props changed) Modified: releng/11.0/share/i18n/esdb/Makefile.part == --- releng/11.0/share/i18n/esdb/Makefile.part Wed Aug 24 02:23:03 2016 (r304717) +++ releng/11.0/share/i18n/esdb/Makefile.part Wed Aug 24 02:29:25 2016 (r304718) @@ -67,9 +67,11 @@ codesets: ${ESDB} .if !defined(NO_PREPROC) .for i in ${PART} +.if !exists(${.CURDIR}/${EPREFIX}${i:S/:/@/}.src) ${EPREFIX}${i:S/:/@/}.src: ${CODE}.src sed ${SED_EXP:S@%%PART%%@${i}@} ${.ALLSRC} > ${.TARGET} @echo ${.TARGET} >>.tmpfiles +.endif .endfor .endif ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304717 - in stable/11: share/mk sys/conf
Author: bdrewery Date: Wed Aug 24 02:23:03 2016 New Revision: 304717 URL: https://svnweb.freebsd.org/changeset/base/304717 Log: MFC r304697: FAST_DEPEND: Fix 'make all install' not properly rebuilding based on .depend.* files. Modified: stable/11/share/mk/bsd.dep.mk stable/11/sys/conf/kern.post.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/bsd.dep.mk == --- stable/11/share/mk/bsd.dep.mk Wed Aug 24 01:56:30 2016 (r304716) +++ stable/11/share/mk/bsd.dep.mk Wed Aug 24 02:23:03 2016 (r304717) @@ -76,12 +76,13 @@ tags: ${SRCS} _meta_filemon= 1 .endif -# Skip reading .depend when not needed to speed up tree-walks -# and simple lookups. +# Skip reading .depend when not needed to speed up tree-walks and simple +# lookups. For install, only do this if no other targets are specified. # Also skip generating or including .depend.* files if in meta+filemon mode # since it will track dependencies itself. OBJS_DEPEND_GUESS is still used. .if !empty(.MAKEFLAGS:M-V${_V_READ_DEPEND}) || make(obj) || make(clean*) || \ -make(install*) || make(analyze) || defined(_meta_filemon) +${.TARGETS:M*install*} == ${.TARGETS} || \ +make(analyze) || defined(_meta_filemon) _SKIP_READ_DEPEND= 1 .if ${MK_DIRDEPS_BUILD} == "no" .MAKE.DEPENDFILE= /dev/null Modified: stable/11/sys/conf/kern.post.mk == --- stable/11/sys/conf/kern.post.mk Wed Aug 24 01:56:30 2016 (r304716) +++ stable/11/sys/conf/kern.post.mk Wed Aug 24 02:23:03 2016 (r304717) @@ -196,12 +196,13 @@ ${SYSTEM_OBJS} genassym.o vers.o: opt_gl .if !empty(.MAKE.MODE:Unormal:Mmeta) && empty(.MAKE.MODE:Unormal:Mnofilemon) _meta_filemon= 1 .endif -# Skip reading .depend when not needed to speed up tree-walks -# and simple lookups. +# Skip reading .depend when not needed to speed up tree-walks and simple +# lookups. For install, only do this if no other targets are specified. # Also skip generating or including .depend.* files if in meta+filemon mode # since it will track dependencies itself. OBJS_DEPEND_GUESS is still used. .if !empty(.MAKEFLAGS:M-V${_V_READ_DEPEND}) || make(obj) || make(clean*) || \ -make(install*) || make(kernel-obj) || make(kernel-clean*) || \ +${.TARGETS:M*install*} == ${.TARGETS} || \ +make(kernel-obj) || make(kernel-clean*) || \ make(kernel-install*) || defined(_meta_filemon) _SKIP_READ_DEPEND= 1 .MAKE.DEPENDFILE= /dev/null ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304716 - in releng/11.0/sys: conf kern net sys
Author: shurd (ports committer) Date: Wed Aug 24 01:56:30 2016 New Revision: 304716 URL: https://svnweb.freebsd.org/changeset/base/304716 Log: MFS r304704: Update iflib to support more NIC designs - Move group task queue into kern/subr_gtaskqueue.c - Change intr_enable to return an int so it can be detected if it's not implemented - Allow different TX/RX queues per set to be different sizes - Don't split up TX mbufs before transmit - Allow a completion queue for TX as well as RX - Pass the RX budget to isc_rxd_available() to allow an earlier return and avoid multiple calls Approved by: re (glb), davidch Requested by: shurd Added: releng/11.0/sys/kern/subr_gtaskqueue.c - copied unchanged from r304704, stable/11/sys/kern/subr_gtaskqueue.c releng/11.0/sys/sys/gtaskqueue.h - copied unchanged from r304704, stable/11/sys/sys/gtaskqueue.h Modified: releng/11.0/sys/conf/files releng/11.0/sys/kern/subr_taskqueue.c releng/11.0/sys/net/ifdi_if.m releng/11.0/sys/net/iflib.c releng/11.0/sys/net/iflib.h releng/11.0/sys/sys/_task.h releng/11.0/sys/sys/taskqueue.h Directory Properties: releng/11.0/ (props changed) Modified: releng/11.0/sys/conf/files == --- releng/11.0/sys/conf/files Wed Aug 24 01:44:53 2016(r304715) +++ releng/11.0/sys/conf/files Wed Aug 24 01:56:30 2016(r304716) @@ -3344,6 +3344,7 @@ kern/subr_disk.c standard kern/subr_eventhandler.c standard kern/subr_fattime.cstandard kern/subr_firmware.c optional firmware +kern/subr_gtaskqueue.c standard kern/subr_hash.c standard kern/subr_hints.c standard kern/subr_kdb.cstandard Copied: releng/11.0/sys/kern/subr_gtaskqueue.c (from r304704, stable/11/sys/kern/subr_gtaskqueue.c) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ releng/11.0/sys/kern/subr_gtaskqueue.c Wed Aug 24 01:56:30 2016 (r304716, copy of r304704, stable/11/sys/kern/subr_gtaskqueue.c) @@ -0,0 +1,864 @@ +/*- + * Copyright (c) 2000 Doug Rabson + * Copyright (c) 2014 Jeff Roberson + * Copyright (c) 2016 Matthew Macy + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static MALLOC_DEFINE(M_GTASKQUEUE, "taskqueue", "Task Queues"); +static voidgtaskqueue_thread_enqueue(void *); +static voidgtaskqueue_thread_loop(void *arg); + + +struct gtaskqueue_busy { + struct gtask*tb_running; + TAILQ_ENTRY(gtaskqueue_busy) tb_link; +}; + +static struct gtask * const TB_DRAIN_WAITER = (struct gtask *)0x1; + +struct gtaskqueue { + STAILQ_HEAD(, gtask)tq_queue; + gtaskqueue_enqueue_fn tq_enqueue; + void*tq_context; + char*tq_name; + TAILQ_HEAD(, gtaskqueue_busy) tq_active; + struct mtx tq_mutex; + struct thread **tq_threads; + int tq_tcount; + int tq_spin; + int tq_flags; + int tq_callouts; + taskqueue_callback_fn tq_callbacks[TASKQUEUE_NUM_CALLBACKS]; + void*tq_cb_contexts[TASKQUEUE_NUM_CALLBACKS]; +}; + +#defineTQ_FLAGS_ACTIVE (1 << 0) +#define
svn commit: r304715 - stable/11/sys/net80211
Author: bdrewery Date: Wed Aug 24 01:44:53 2016 New Revision: 304715 URL: https://svnweb.freebsd.org/changeset/base/304715 Log: MFC r304322: [net80211] correctly lock the ifp before accessing the lladdr. Modified: stable/11/sys/net80211/ieee80211_ioctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net80211/ieee80211_ioctl.c == --- stable/11/sys/net80211/ieee80211_ioctl.cWed Aug 24 01:34:22 2016 (r304714) +++ stable/11/sys/net80211/ieee80211_ioctl.cWed Aug 24 01:44:53 2016 (r304715) @@ -3394,10 +3394,12 @@ ieee80211_ioctl(struct ifnet *ifp, u_lon * Check if the MAC address was changed * via SIOCSIFLLADDR ioctl. */ + if_addr_rlock(ifp); if ((ifp->if_flags & IFF_UP) == 0 && !IEEE80211_ADDR_EQ(vap->iv_myaddr, IF_LLADDR(ifp))) IEEE80211_ADDR_COPY(vap->iv_myaddr, IF_LLADDR(ifp)); + if_addr_runlock(ifp); } break; case SIOCADDMULTI: ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304714 - stable/11/share/i18n/esdb
Author: bdrewery Date: Wed Aug 24 01:34:22 2016 New Revision: 304714 URL: https://svnweb.freebsd.org/changeset/base/304714 Log: MFC r304643: Fix building on read-only source trees. PR: 211952 Modified: stable/11/share/i18n/esdb/Makefile.part Directory Properties: stable/11/ (props changed) Modified: stable/11/share/i18n/esdb/Makefile.part == --- stable/11/share/i18n/esdb/Makefile.part Wed Aug 24 00:52:30 2016 (r304713) +++ stable/11/share/i18n/esdb/Makefile.part Wed Aug 24 01:34:22 2016 (r304714) @@ -67,9 +67,11 @@ codesets: ${ESDB} .if !defined(NO_PREPROC) .for i in ${PART} +.if !exists(${.CURDIR}/${EPREFIX}${i:S/:/@/}.src) ${EPREFIX}${i:S/:/@/}.src: ${CODE}.src sed ${SED_EXP:S@%%PART%%@${i}@} ${.ALLSRC} > ${.TARGET} @echo ${.TARGET} >>.tmpfiles +.endif .endfor .endif ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304713 - head/sys/netinet6
Author: karels Date: Wed Aug 24 00:52:30 2016 New Revision: 304713 URL: https://svnweb.freebsd.org/changeset/base/304713 Log: Fix L2 caching for UDP over IPv6 ip6_output() was missing cache invalidation code analougous to ip_output.c. r304545 disabled L2 caching for UDP/IPv6 as a workaround. This change adds the missing cache invalidation code and reverts r304545. Reviewed by: gnn Approved by: gnn (mentor) Tested by:peter@, Mike Andrews MFC after:3 weeks Differential Revision:https://reviews.freebsd.org/D7591 Modified: head/sys/netinet6/ip6_output.c head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet6/ip6_output.c == --- head/sys/netinet6/ip6_output.c Wed Aug 24 00:02:20 2016 (r304712) +++ head/sys/netinet6/ip6_output.c Wed Aug 24 00:52:30 2016 (r304713) @@ -87,6 +87,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -552,6 +553,9 @@ again: rt = ro->ro_rt; ifp = ro->ro_rt->rt_ifp; } else { + if (ro->ro_lle) + LLE_FREE(ro->ro_lle); /* zeros ro_lle */ + ro->ro_lle = NULL; if (fwd_tag == NULL) { bzero(_sa, sizeof(dst_sa)); dst_sa.sin6_family = AF_INET6; @@ -821,6 +825,9 @@ again: } else { RO_RTFREE(ro); needfiblookup = 1; /* Redo the routing table lookup. */ + if (ro->ro_lle) + LLE_FREE(ro->ro_lle); /* zeros ro_lle */ + ro->ro_lle = NULL; } } /* See if fib was changed by packet filter. */ @@ -829,6 +836,9 @@ again: fibnum = M_GETFIB(m); RO_RTFREE(ro); needfiblookup = 1; + if (ro->ro_lle) + LLE_FREE(ro->ro_lle); /* zeros ro_lle */ + ro->ro_lle = NULL; } if (needfiblookup) goto again; Modified: head/sys/netinet6/udp6_usrreq.c == --- head/sys/netinet6/udp6_usrreq.c Wed Aug 24 00:02:20 2016 (r304712) +++ head/sys/netinet6/udp6_usrreq.c Wed Aug 24 00:52:30 2016 (r304713) @@ -898,7 +898,7 @@ udp6_output(struct inpcb *inp, struct mb UDP_PROBE(send, NULL, inp, ip6, inp, udp6); UDPSTAT_INC(udps_opackets); - error = ip6_output(m, optp, NULL, flags, + error = ip6_output(m, optp, >inp_route6, flags, inp->in6p_moptions, NULL, inp); break; case AF_INET: ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304712 - head/lib/libc/gen
Author: brooks Date: Wed Aug 24 00:02:20 2016 New Revision: 304712 URL: https://svnweb.freebsd.org/changeset/base/304712 Log: Avoid a redecleartion of __getosreldate(). Sponsored by: DARPA, AFRL Modified: head/lib/libc/gen/__getosreldate.c Modified: head/lib/libc/gen/__getosreldate.c == --- head/lib/libc/gen/__getosreldate.c Wed Aug 24 00:00:54 2016 (r304711) +++ head/lib/libc/gen/__getosreldate.c Wed Aug 24 00:02:20 2016 (r304712) @@ -33,8 +33,6 @@ __FBSDID("$FreeBSD$"); #include #include "libc_private.h" -int __getosreldate(void); - /* * This is private to libc. It is intended for wrapping syscall stubs in order * to avoid having to put SIGSYS signal handlers in place to test for presence ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304711 - head/contrib/binutils/bfd
Author: brooks Date: Wed Aug 24 00:00:54 2016 New Revision: 304711 URL: https://svnweb.freebsd.org/changeset/base/304711 Log: Spell MIPS more traditionally in "bfd_elf32_ntradbigmips_vec". Sponsored by: DAPRA, AFRL Modified: head/contrib/binutils/bfd/config.bfd Modified: head/contrib/binutils/bfd/config.bfd == --- head/contrib/binutils/bfd/config.bfdTue Aug 23 22:26:50 2016 (r304710) +++ head/contrib/binutils/bfd/config.bfdWed Aug 24 00:00:54 2016 (r304711) @@ -875,11 +875,11 @@ case "${targ}" in ;; mips*el-*-freebsd*) targ_defvec=bfd_elf32_tradlittlemips_vec -targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf32_ntradbigmisp_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec" +targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec" ;; mips*-*-freebsd*) targ_defvec=bfd_elf32_tradbigmips_vec -targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf32_ntradbigmisp_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec" +targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec" ;; mips*-dec-* | mips*el-*-ecoff*) targ_defvec=ecoff_little_vec ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r304703 - head/include/xlocale
On 23.08.2016 23:53, Ngie Cooper (yaneurabeya) wrote: > >> On Aug 23, 2016, at 13:33, Andrey A. Chernovwrote: >> >> Author: ache >> Date: Tue Aug 23 20:33:56 2016 >> New Revision: 304703 >> URL: https://svnweb.freebsd.org/changeset/base/304703 >> >> Log: >> LC_*_MASK bit shifting order was partially broken from the initial commit >> time at year 2012. Only LC_COLLATE_MASK and LC_CTYPE_MASK are in the >> right order. >> >> The order here should match XLC_* from "xlocale_private.h" which, in turn, >> match LC_* publicly visible order from which determines how >> locale components are stored in the structure. >> LC_*_MASK -> XLC_* translation done as "ffs(mask) - 1" in the querylocale() >> and equivalent shift loop in the newlocale(), so mapped to some wrong >> components (excluding two mentioned above). >> >> Formally the fix is ABI breakage, but old code using those masks >> never works properly in any case. >> Only newlocale() and querylocale() are affected. >> >> MFC after: 7 days >> >> Modified: >> head/include/xlocale/_locale.h > > Should __FreeBSD_version be bumped? > Thanks, > -Ngie > Yes, I'll do it later. signature.asc Description: OpenPGP digital signature
Re: svn commit: r304704 - in stable/11/sys: conf kern net sys
Hopefully the formatting is OK, I used webmail for this. On Tue, 23 Aug 2016 15:18:48 -0700, Navdeep Parhar wrote: (I'm assuming that you do not plan to merge this to releng/11.0.) I'm working to get this into releng/11.0. The merge to stable/11 had to be done before a merge request can be sent to re@. It looks like the changes to iflib.h will break any external NIC driver written/compiled against the iflib.h in 11.0. That is correct. All the currently known drivers (all of which are presently external) which use iflib have been converted to the new header already. Therre are at present no iflib.h consumers in the tree or in ports. Is iflib considered part of the KPI/KBI in FreeBSD 11 or is it for in-tree use only with no interface guarantees? If it's the latter then why do we even have iflib in 11.0 given that no in-tree driver in 11.0 uses it? There was hope to get one or two drivers in-tree for 11.0 (see the review here: https://reviews.freebsd.org/D7551), but given the timing and the API changes, it seems unlikely. Thanks, Stephen Hurd ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304710 - head/sys/arm/allwinner
Author: manu Date: Tue Aug 23 22:26:50 2016 New Revision: 304710 URL: https://svnweb.freebsd.org/changeset/base/304710 Log: Allwinner: Add thermal sensor driver for A10/A20 The thermal sensor lives in the touch screen controller. Touch screen part isn't done for now. Temperature is read every ~2 seconds and exposed via sysctl. Added: head/sys/arm/allwinner/aw_ts.c (contents, props changed) Modified: head/sys/arm/allwinner/files.allwinner Added: head/sys/arm/allwinner/aw_ts.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/aw_ts.c Tue Aug 23 22:26:50 2016 (r304710) @@ -0,0 +1,230 @@ +/*- + * Copyright (c) 2016 Emmanuel Vadot+ * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Allwinner Touch Sreen driver + * Touch screen part is not done, only the thermal sensor part is. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#defineREAD(_sc, _r) bus_read_4((_sc)->res[0], (_r)) +#defineWRITE(_sc, _r, _v) bus_write_4((_sc)->res[0], (_r), (_v)) + +/* Control register 0 */ +#defineTP_CTRL00x00 +#define TP_CTRL0_TACQ(x) ((x & 0xFF) << 0) +#define TP_CTRL0_FS_DIV(x) ((x & 0xF) << 16) +#define TP_CTRL0_CLK_DIV(x)((x & 0x3) << 20) +#define TP_CTRL0_CLK_SELECT(x) ((x & 0x1) << 22) + +/* Control register 1 */ +#defineTP_CTRL10x04 +#define TP_CTRL1_MODE_EN (1 << 4) + +/* Control register 2 */ +#defineTP_CTRL20x08 + +/* Control register 3 */ +#defineTP_CTRL30x0C + +/* Int/FIFO control register */ +#defineTP_FIFOC0x10 +#define TP_FIFOC_TEMP_IRQ_ENABLE (1 << 18) + +/* Int/FIFO status register */ +#defineTP_FIFOS0x14 +#define TP_FIFOS_TEMP_IRQ_PENDING (1 << 18) + +/* Temperature Period Register */ +#defineTP_TPR 0x18 +#define TP_TPR_TEMP_EN (1 << 16) +#define TP_TPR_TEMP_PERIOD(x) (x << 0) + +/* Common data register */ +#defineTP_CDAT 0x1C + +/* Temperature data register */ +#defineTEMP_DATA 0x20 + +/* TP Data register*/ +#defineTP_DATA 0x24 + +/* TP IO config register */ +#defineTP_IO_CONFIG0x28 + +/* TP IO port data register */ +#defineTP_IO_DATA 0x2C + +struct aw_ts_softc { + device_tdev; + struct resource * res[2]; + void * intrhand; + int temp_data; + int temp_offset; + int temp_step; +}; + +static struct resource_spec aw_ts_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 0, RF_ACTIVE | RF_SHAREABLE }, + { -1, 0 } +}; + +#defineA10_TS 1 +#defineA13_TS 2 + +#defineAW_TS_TEMP_SYSCTL 1 + +static struct ofw_compat_data compat_data[] = { + {"allwinner,sun4i-a10-ts", A10_TS}, + {"allwinner,sun5i-a13-ts", A13_TS}, + {NULL, 0} +}; + +static void +aw_ts_intr(void *arg) +{ + struct aw_ts_softc *sc; + int val; + + sc= (struct aw_ts_softc *)arg; + + val = READ(sc, TP_FIFOS); + if (val & TP_FIFOS_TEMP_IRQ_PENDING) { + /* Convert the value to millicelsius then millikelvin */ + sc->temp_data = (READ(sc, TEMP_DATA) * sc->temp_step - sc->temp_offset)
Re: svn commit: r304704 - in stable/11/sys: conf kern net sys
On 08/23/2016 14:21, Stephen Hurd wrote: > Author: shurd (ports committer) > Date: Tue Aug 23 21:21:56 2016 > New Revision: 304704 > URL: https://svnweb.freebsd.org/changeset/base/304704 > > Log: > MFC r304021: Update iflib to support more NIC designs > > - Move group task queue into kern/subr_gtaskqueue.c > - Change intr_enable to return an int so it can be detected if it's not > implemented > - Allow different TX/RX queues per set to be different sizes > - Don't split up TX mbufs before transmit > - Allow a completion queue for TX as well as RX > - Pass the RX budget to isc_rxd_available() to allow an earlier return > and avoid multiple calls > > Approved by: sbruno > > Added: > stable/11/sys/kern/subr_gtaskqueue.c > - copied unchanged from r304021, head/sys/kern/subr_gtaskqueue.c > stable/11/sys/sys/gtaskqueue.h > - copied unchanged from r304021, head/sys/sys/gtaskqueue.h > Modified: > stable/11/sys/conf/files > stable/11/sys/kern/subr_taskqueue.c > stable/11/sys/net/ifdi_if.m > stable/11/sys/net/iflib.c > stable/11/sys/net/iflib.h (I'm assuming that you do not plan to merge this to releng/11.0.) It looks like the changes to iflib.h will break any external NIC driver written/compiled against the iflib.h in 11.0. Is iflib considered part of the KPI/KBI in FreeBSD 11 or is it for in-tree use only with no interface guarantees? If it's the latter then why do we even have iflib in 11.0 given that no in-tree driver in 11.0 uses it? Regards, Navdeep > stable/11/sys/sys/_task.h > stable/11/sys/sys/taskqueue.h > Directory Properties: > stable/11/ (props changed) > > ... ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r304704 - in stable/11/sys: conf kern net sys
Hi. In subr_gtaskqueue.c - taskqgroup_bind() for (i = 0; i < qgroup->tqg_cnt; i++) { gtask = malloc(sizeof (*gtask), M_DEVBUF, M_NOWAIT); GTASK_INIT(>bt_task, 0, 0, taskqgroup_binder, gtask); Why we are not check (gtask == NULL) ? ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304704 - in stable/11/sys: conf kern net sys
Author: shurd (ports committer) Date: Tue Aug 23 21:21:56 2016 New Revision: 304704 URL: https://svnweb.freebsd.org/changeset/base/304704 Log: MFC r304021: Update iflib to support more NIC designs - Move group task queue into kern/subr_gtaskqueue.c - Change intr_enable to return an int so it can be detected if it's not implemented - Allow different TX/RX queues per set to be different sizes - Don't split up TX mbufs before transmit - Allow a completion queue for TX as well as RX - Pass the RX budget to isc_rxd_available() to allow an earlier return and avoid multiple calls Approved by: sbruno Added: stable/11/sys/kern/subr_gtaskqueue.c - copied unchanged from r304021, head/sys/kern/subr_gtaskqueue.c stable/11/sys/sys/gtaskqueue.h - copied unchanged from r304021, head/sys/sys/gtaskqueue.h Modified: stable/11/sys/conf/files stable/11/sys/kern/subr_taskqueue.c stable/11/sys/net/ifdi_if.m stable/11/sys/net/iflib.c stable/11/sys/net/iflib.h stable/11/sys/sys/_task.h stable/11/sys/sys/taskqueue.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/files == --- stable/11/sys/conf/filesTue Aug 23 20:33:56 2016(r304703) +++ stable/11/sys/conf/filesTue Aug 23 21:21:56 2016(r304704) @@ -3344,6 +3344,7 @@ kern/subr_disk.c standard kern/subr_eventhandler.c standard kern/subr_fattime.cstandard kern/subr_firmware.c optional firmware +kern/subr_gtaskqueue.c standard kern/subr_hash.c standard kern/subr_hints.c standard kern/subr_kdb.cstandard Copied: stable/11/sys/kern/subr_gtaskqueue.c (from r304021, head/sys/kern/subr_gtaskqueue.c) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/kern/subr_gtaskqueue.cTue Aug 23 21:21:56 2016 (r304704, copy of r304021, head/sys/kern/subr_gtaskqueue.c) @@ -0,0 +1,864 @@ +/*- + * Copyright (c) 2000 Doug Rabson + * Copyright (c) 2014 Jeff Roberson + * Copyright (c) 2016 Matthew Macy + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static MALLOC_DEFINE(M_GTASKQUEUE, "taskqueue", "Task Queues"); +static voidgtaskqueue_thread_enqueue(void *); +static voidgtaskqueue_thread_loop(void *arg); + + +struct gtaskqueue_busy { + struct gtask*tb_running; + TAILQ_ENTRY(gtaskqueue_busy) tb_link; +}; + +static struct gtask * const TB_DRAIN_WAITER = (struct gtask *)0x1; + +struct gtaskqueue { + STAILQ_HEAD(, gtask)tq_queue; + gtaskqueue_enqueue_fn tq_enqueue; + void*tq_context; + char*tq_name; + TAILQ_HEAD(, gtaskqueue_busy) tq_active; + struct mtx tq_mutex; + struct thread **tq_threads; + int tq_tcount; + int tq_spin; + int tq_flags; + int tq_callouts; + taskqueue_callback_fn tq_callbacks[TASKQUEUE_NUM_CALLBACKS]; + void*tq_cb_contexts[TASKQUEUE_NUM_CALLBACKS]; +}; + +#defineTQ_FLAGS_ACTIVE (1 << 0) +#defineTQ_FLAGS_BLOCKED(1 << 1) +#defineTQ_FLAGS_UNLOCKED_ENQUEUE (1 << 2)
Re: svn commit: r304321 - in head/sys: boot/efi/boot1 boot/efi/loader boot/i386/boot2 boot/i386/gptboot boot/i386/gptzfsboot boot/i386/zfsboot boot/userboot/ficl boot/userboot/userboot boot/userboot/z
On 18/08/2016 02:37, Toomas Soome wrote: > Author: tsoome > Date: Thu Aug 18 00:37:07 2016 > New Revision: 304321 > URL: https://svnweb.freebsd.org/changeset/base/304321 > > Log: > Add SHA512, skein, large blocks support for loader zfs. > Hi, this commit seems to break booting zroot bhyve VMs. Reverting userboot.so to 304320 on the host system makes it work again. I start bhyve like this /usr/share/examples/bhyve/vmrun.sh -d /dev/zvol/zroot/bhyve/poudriere -t tap8 -c 7 -m 20G poudriere Launching virtual machine "poudriere" ... Consoles: userboot FreeBSD/amd64 User boot, Revision 1.1 (r...@fry.smeets.xyz, Tue Aug 23 16:47:12 CEST 2016) - can't load 'kernel' Type '?' for a list of commands, 'help' for more detailed help. OK lsdev -v host devices: host0: Host filesystem disk devices: disk0: Guest drive image disk0p1: FreeBSD boot512KB disk0p2: FreeBSD swap2048MB disk0p3: FreeBSD ZFS 67GB zfs devices: OK show LINES=24 boot_serial=1 console=userboot currdev=disk0p3: interpret=OK loaddev=disk0p3: prompt=${interpret} smbios.bios.vendor=BHYVE twiddle_divisor=1 OK ls open '/' failed: no such file or directory OK Here the zroot setup in the VM root@poudriere:~ # zpool get -oname,property,value all NAME PROPERTY VALUE zroot size 67.5G zroot capacity 61% zroot altroot- zroot health ONLINE zroot guid 13278473142560840663 zroot version- zroot bootfs zroot/ROOT/default zroot delegation on zroot autoreplaceoff zroot cachefile - zroot failmode wait zroot listsnapshots off zroot autoexpand off zroot dedupditto 0 zroot dedupratio 1.00x zroot free 25.9G zroot allocated 41.6G zroot readonly off zroot comment- zroot expandsize - zroot freeing0 zroot fragmentation 67% zroot leaked 0 zroot feature@async_destroy enabled zroot feature@empty_bpobjactive zroot feature@lz4_compress active zroot feature@multi_vdev_crash_dump enabled zroot feature@spacemap_histogram active zroot feature@enabled_txgactive zroot feature@hole_birth active zroot feature@extensible_dataset enabled zroot feature@embedded_data active zroot feature@bookmarks enabled zroot feature@filesystem_limits enabled zroot feature@large_blocks disabled zroot feature@sha512 disabled zroot feature@skein disabled root@poudriere:~ # zfs get all zroot/ROOT/default NAMEPROPERTY VALUE SOURCE zroot/ROOT/default type filesystem - zroot/ROOT/default creation Sun Jul 27 16:32 2014 - zroot/ROOT/default used 7.12G - zroot/ROOT/default available 23.8G - zroot/ROOT/default referenced7.12G - zroot/ROOT/default compressratio 2.18x - zroot/ROOT/default mounted yes- zroot/ROOT/default quota none default zroot/ROOT/default reservation none default zroot/ROOT/default recordsize128K default zroot/ROOT/default mountpoint/ local zroot/ROOT/default sharenfs offdefault zroot/ROOT/default checksum on default zroot/ROOT/default compression lz4 inherited from zroot zroot/ROOT/default atime off inherited from zroot zroot/ROOT/default devices on default zroot/ROOT/default exec on default zroot/ROOT/default setuidon default zroot/ROOT/default readonly offdefault zroot/ROOT/default jailedoffdefault zroot/ROOT/default snapdir hidden default zroot/ROOT/default aclmode discarddefault zroot/ROOT/default aclinheritrestricted default zroot/ROOT/default canmount on default zroot/ROOT/default xattr offtemporary zroot/ROOT/default copies1 default zroot/ROOT/default version 5 -
Re: svn commit: r304567 - head/sys/dev/usb/input
> On Aug 23, 2016, at 13:57, Bryan Drewerywrote: ... > Well yours only supports stable/10+ and not 9- with the older merge style. *shrugs* The older method promoted broken mergeinfo… The method I wrote up works fine with ^/stable/9- — just with non-sparse checkouts (I don’t recommend sparse checkouts, again because it can screw up mergeinfo) :). Thanks, -Ngie signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r304567 - head/sys/dev/usb/input
On 8/23/2016 1:49 PM, Ngie Cooper (yaneurabeya) wrote: > >> On Aug 23, 2016, at 13:38, Bryan Drewerywrote: > > … > >> I've written a script to do MFCing with the proper svn merge style for >> each branch. It's not perfect but it seems good enough. >> >> https://people.freebsd.org/~bdrewery/mfc.sh >> >> It can take multiple revisions. >> cd svn/stable/7 >> mfc.sh r123 r124 r125 >> >> It will merge each one at a time, invoke EDITOR for conflicts (SVN does >> this), then opens EDITOR to edit the commit log and saves that to >> 'commit'. You can then review and modify the commit as you like and 'svn >> commit -F commit' when done to use the saved commit log. >> >> If you pass -r to it then it will also prepare an email in mutt to send >> to r...@freebsd.org for approval to commit. >> >> It defaults to merging from head, but in the case of wanting to commit >> to releng/ you need to pass -b to specify which branch to merge from, >> such as -b stable/11 for releng/11.0 commits. > > I have one that I noted a while back — it’s a bit less featureful, but it > works pretty well IMHO: > > https://github.com/yaneurabeya/scratch/blob/master/common/home/ngie/bin/mfc > https://github.com/yaneurabeya/scratch/blob/master/common/home/ngie/bin/mfc_log > > Example usage: > > ~/mfc ^/head > # Do whatever you need to make sure that the commit is ok. > svn ci -F commit > > The only thing it fubars is some of the spacing with some of the commit > messages (I don’t remember if it was with my commits being MFCed or other’s > commits being MFCed). I’m a bit pedantic about formatting -- that’s the only > reason why I haven’t posted it up earlier as an official solution for others > to use. > Well yours only supports stable/10+ and not 9- with the older merge style. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r304703 - head/include/xlocale
> On Aug 23, 2016, at 13:33, Andrey A. Chernovwrote: > > Author: ache > Date: Tue Aug 23 20:33:56 2016 > New Revision: 304703 > URL: https://svnweb.freebsd.org/changeset/base/304703 > > Log: > LC_*_MASK bit shifting order was partially broken from the initial commit > time at year 2012. Only LC_COLLATE_MASK and LC_CTYPE_MASK are in the > right order. > > The order here should match XLC_* from "xlocale_private.h" which, in turn, > match LC_* publicly visible order from which determines how > locale components are stored in the structure. > LC_*_MASK -> XLC_* translation done as "ffs(mask) - 1" in the querylocale() > and equivalent shift loop in the newlocale(), so mapped to some wrong > components (excluding two mentioned above). > > Formally the fix is ABI breakage, but old code using those masks > never works properly in any case. > Only newlocale() and querylocale() are affected. > > MFC after: 7 days > > Modified: > head/include/xlocale/_locale.h Should __FreeBSD_version be bumped? Thanks, -Ngie signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r304567 - head/sys/dev/usb/input
> On Aug 23, 2016, at 13:38, Bryan Drewerywrote: … > I've written a script to do MFCing with the proper svn merge style for > each branch. It's not perfect but it seems good enough. > > https://people.freebsd.org/~bdrewery/mfc.sh > > It can take multiple revisions. > cd svn/stable/7 > mfc.sh r123 r124 r125 > > It will merge each one at a time, invoke EDITOR for conflicts (SVN does > this), then opens EDITOR to edit the commit log and saves that to > 'commit'. You can then review and modify the commit as you like and 'svn > commit -F commit' when done to use the saved commit log. > > If you pass -r to it then it will also prepare an email in mutt to send > to r...@freebsd.org for approval to commit. > > It defaults to merging from head, but in the case of wanting to commit > to releng/ you need to pass -b to specify which branch to merge from, > such as -b stable/11 for releng/11.0 commits. I have one that I noted a while back — it’s a bit less featureful, but it works pretty well IMHO: https://github.com/yaneurabeya/scratch/blob/master/common/home/ngie/bin/mfc https://github.com/yaneurabeya/scratch/blob/master/common/home/ngie/bin/mfc_log Example usage: ~/mfc ^/head # Do whatever you need to make sure that the commit is ok. svn ci -F commit The only thing it fubars is some of the spacing with some of the commit messages (I don’t remember if it was with my commits being MFCed or other’s commits being MFCed). I’m a bit pedantic about formatting -- that’s the only reason why I haven’t posted it up earlier as an official solution for others to use. Cheers, -Ngie signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r304567 - head/sys/dev/usb/input
On 8/22/2016 1:59 AM, Bruce Evans wrote: > On Sun, 21 Aug 2016, Hans Petter Selasky wrote: > >> On 08/21/16 18:06, Bruce Evans wrote: >>> Author: bde >>> Date: Sun Aug 21 16:06:00 2016 >>> New Revision: 304567 >>> URL: https://svnweb.freebsd.org/changeset/base/304567 >> >> Don't forget to MFC. > > I had forgotten if for this commit. I might do it for combined > commits, but don't have enough svn fu for as many MFCs as I would > like. I want a few things back to FreeBSD-7. > > Bruce > I've written a script to do MFCing with the proper svn merge style for each branch. It's not perfect but it seems good enough. https://people.freebsd.org/~bdrewery/mfc.sh It can take multiple revisions. cd svn/stable/7 mfc.sh r123 r124 r125 It will merge each one at a time, invoke EDITOR for conflicts (SVN does this), then opens EDITOR to edit the commit log and saves that to 'commit'. You can then review and modify the commit as you like and 'svn commit -F commit' when done to use the saved commit log. If you pass -r to it then it will also prepare an email in mutt to send to r...@freebsd.org for approval to commit. It defaults to merging from head, but in the case of wanting to commit to releng/ you need to pass -b to specify which branch to merge from, such as -b stable/11 for releng/11.0 commits. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r304703 - head/include/xlocale
Author: ache Date: Tue Aug 23 20:33:56 2016 New Revision: 304703 URL: https://svnweb.freebsd.org/changeset/base/304703 Log: LC_*_MASK bit shifting order was partially broken from the initial commit time at year 2012. Only LC_COLLATE_MASK and LC_CTYPE_MASK are in the right order. The order here should match XLC_* from "xlocale_private.h" which, in turn, match LC_* publicly visible order from which determines how locale components are stored in the structure. LC_*_MASK -> XLC_* translation done as "ffs(mask) - 1" in the querylocale() and equivalent shift loop in the newlocale(), so mapped to some wrong components (excluding two mentioned above). Formally the fix is ABI breakage, but old code using those masks never works properly in any case. Only newlocale() and querylocale() are affected. MFC after: 7 days Modified: head/include/xlocale/_locale.h Modified: head/include/xlocale/_locale.h == --- head/include/xlocale/_locale.h Tue Aug 23 20:04:23 2016 (r304702) +++ head/include/xlocale/_locale.h Tue Aug 23 20:33:56 2016 (r304703) @@ -32,12 +32,13 @@ #ifndef _XLOCALE_LOCALE_H #define _XLOCALE_LOCALE_H +/* Bit shifting order of LC_*_MASK should match XLC_* and LC_* order. */ #define LC_COLLATE_MASK (1<<0) #define LC_CTYPE_MASK(1<<1) -#define LC_MESSAGES_MASK (1<<2) -#define LC_MONETARY_MASK (1<<3) -#define LC_NUMERIC_MASK (1<<4) -#define LC_TIME_MASK (1<<5) +#define LC_MONETARY_MASK (1<<2) +#define LC_NUMERIC_MASK (1<<3) +#define LC_TIME_MASK (1<<4) +#define LC_MESSAGES_MASK (1<<5) #define LC_ALL_MASK (LC_COLLATE_MASK | LC_CTYPE_MASK | LC_MESSAGES_MASK | \ LC_MONETARY_MASK | LC_NUMERIC_MASK | LC_TIME_MASK) #define LC_GLOBAL_LOCALE ((locale_t)-1) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r304699 - head/sys/dev/usb/input
On Tue, 23 Aug 2016, Oliver Pinter wrote: On 8/23/16, Bruce Evanswrote: ... Log: Fix key delay and repeat, part 1. ... Convert 0.0 to the documented 250.34. ... Do you plan to MFC these changes to 10-STABLE? It would be really nice to see all of these improvements. Maybe when I "finish". There is now also 11-NOTQUITESTABLE. Bruce ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304702 - head/tools/tools/nanobsd
Author: glebius Date: Tue Aug 23 20:04:23 2016 New Revision: 304702 URL: https://svnweb.freebsd.org/changeset/base/304702 Log: The -f check here is used to determine whether we have a single kernel config or a list of them. Put the variable into quotes, to avoid syntax error from [ in case of list. Without this change list is still working, but an error is reported in the build log file. Reviewed by: imp Modified: head/tools/tools/nanobsd/defaults.sh Modified: head/tools/tools/nanobsd/defaults.sh == --- head/tools/tools/nanobsd/defaults.shTue Aug 23 19:57:37 2016 (r304701) +++ head/tools/tools/nanobsd/defaults.shTue Aug 23 20:04:23 2016 (r304702) @@ -227,7 +227,7 @@ nano_make_install_env ( ) { # Extra environment variables for kernel builds nano_make_kernel_env ( ) { - if [ -f ${NANO_KERNEL} ] ; then + if [ -f "${NANO_KERNEL}" ] ; then KERNCONFDIR="$(realpath $(dirname ${NANO_KERNEL}))" KERNCONF="$(basename ${NANO_KERNEL})" make_export KERNCONFDIR ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r304699 - head/sys/dev/usb/input
On 8/23/16, Bruce Evanswrote: > Author: bde > Date: Tue Aug 23 19:50:16 2016 > New Revision: 304699 > URL: https://svnweb.freebsd.org/changeset/base/304699 > > Log: > Fix key delay and repeat, part 1. > > kbdcontrol -r fast is documented to give a non-emulated atkbd's fastest > rate of 250.34, but is misimplemented to request this as 0.0. ukbd > supports many nonstandard rates, although it is currently too inaccurate > by a factor of several hundred for non-huge nonstandard rates to be > useful. It mapped 0.0 to 200.0. A repeat delay of 0 means a rate of > infinity which is quite fast, but physical constraints limit this to > a few MHz and the inaccuracies made it almost usable. > > Convert 0.0 to the documented 250.34. > > Also convert negative args and small args to the 250.34 minimal ones, > like atkbd does. This is for KDSETREPEAT -- the 2 versions of the > deprecated KDSETRAD have bounds checking. Keep not doing any bounds > checking or conversions for upper limits since nonstandard large > delays are useful for testing. > > The inaccuracies are dependent on HZ and the timeout implementation. > With the old timeout implementation and HZ = 1000, 200.0 probably > worked better to emulate 250.34 than 250.34 itself. HZ = 100 gives > roundoff errors that accidentally reduce the inaaccuracies, and > event timers reduce the inaccuracies even more, so 200.0 was giving > more like itself (perhaps 215.15 on average but sometimes close to > 10 msec repeat which is noticebly too fast). This commit makes 0.0 > noticeably too slow, like 250.34 always was. > > Modified: > head/sys/dev/usb/input/ukbd.c > > Modified: head/sys/dev/usb/input/ukbd.c Hi Bruce! Do you plan to MFC these changes to 10-STABLE? It would be really nice to see all of these improvements. > == > --- head/sys/dev/usb/input/ukbd.c Tue Aug 23 19:41:49 2016 > (r304698) > +++ head/sys/dev/usb/input/ukbd.c Tue Aug 23 19:50:16 2016 > (r304699) > @@ -1887,17 +1887,14 @@ ukbd_ioctl_locked(keyboard_t *kbd, u_lon > if (!KBD_HAS_DEVICE(kbd)) { > return (0); > } > - if (((int *)arg)[1] < 0) { > - return (EINVAL); > - } > - if (((int *)arg)[0] < 0) { > - return (EINVAL); > - } > - if (((int *)arg)[0] < 200) /* fastest possible value */ > - kbd->kb_delay1 = 200; > - else > - kbd->kb_delay1 = ((int *)arg)[0]; > - kbd->kb_delay2 = ((int *)arg)[1]; > + /* > + * Convert negative, zero and tiny args to the same limits > + * as atkbd. We could support delays of 1 msec, but > + * anything much shorter than the shortest atkbd value > + * of 250.34 is almost unusable as well as incompatible. > + */ > + kbd->kb_delay1 = imax(((int *)arg)[0], 250); > + kbd->kb_delay2 = imax(((int *)arg)[1], 34); > return (0); > > #if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \ > ___ > svn-src-h...@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-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304699 - head/sys/dev/usb/input
Author: bde Date: Tue Aug 23 19:50:16 2016 New Revision: 304699 URL: https://svnweb.freebsd.org/changeset/base/304699 Log: Fix key delay and repeat, part 1. kbdcontrol -r fast is documented to give a non-emulated atkbd's fastest rate of 250.34, but is misimplemented to request this as 0.0. ukbd supports many nonstandard rates, although it is currently too inaccurate by a factor of several hundred for non-huge nonstandard rates to be useful. It mapped 0.0 to 200.0. A repeat delay of 0 means a rate of infinity which is quite fast, but physical constraints limit this to a few MHz and the inaccuracies made it almost usable. Convert 0.0 to the documented 250.34. Also convert negative args and small args to the 250.34 minimal ones, like atkbd does. This is for KDSETREPEAT -- the 2 versions of the deprecated KDSETRAD have bounds checking. Keep not doing any bounds checking or conversions for upper limits since nonstandard large delays are useful for testing. The inaccuracies are dependent on HZ and the timeout implementation. With the old timeout implementation and HZ = 1000, 200.0 probably worked better to emulate 250.34 than 250.34 itself. HZ = 100 gives roundoff errors that accidentally reduce the inaaccuracies, and event timers reduce the inaccuracies even more, so 200.0 was giving more like itself (perhaps 215.15 on average but sometimes close to 10 msec repeat which is noticebly too fast). This commit makes 0.0 noticeably too slow, like 250.34 always was. Modified: head/sys/dev/usb/input/ukbd.c Modified: head/sys/dev/usb/input/ukbd.c == --- head/sys/dev/usb/input/ukbd.c Tue Aug 23 19:41:49 2016 (r304698) +++ head/sys/dev/usb/input/ukbd.c Tue Aug 23 19:50:16 2016 (r304699) @@ -1887,17 +1887,14 @@ ukbd_ioctl_locked(keyboard_t *kbd, u_lon if (!KBD_HAS_DEVICE(kbd)) { return (0); } - if (((int *)arg)[1] < 0) { - return (EINVAL); - } - if (((int *)arg)[0] < 0) { - return (EINVAL); - } - if (((int *)arg)[0] < 200) /* fastest possible value */ - kbd->kb_delay1 = 200; - else - kbd->kb_delay1 = ((int *)arg)[0]; - kbd->kb_delay2 = ((int *)arg)[1]; + /* +* Convert negative, zero and tiny args to the same limits +* as atkbd. We could support delays of 1 msec, but +* anything much shorter than the shortest atkbd value +* of 250.34 is almost unusable as well as incompatible. +*/ + kbd->kb_delay1 = imax(((int *)arg)[0], 250); + kbd->kb_delay2 = imax(((int *)arg)[1], 34); return (0); #if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304698 - head/usr.bin/getconf
Author: ngie Date: Tue Aug 23 19:41:49 2016 New Revision: 304698 URL: https://svnweb.freebsd.org/changeset/base/304698 Log: Add support for _PC_ACL_NFS4 as TRUSTEDBSD_ACL_NFS4 The TRUSTEDBSD prefix was chosen for consistency with the other related `_PC_ACL*` prefixed variables. MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/usr.bin/getconf/pathconf.gperf Modified: head/usr.bin/getconf/pathconf.gperf == --- head/usr.bin/getconf/pathconf.gperf Tue Aug 23 19:37:18 2016 (r304697) +++ head/usr.bin/getconf/pathconf.gperf Tue Aug 23 19:41:49 2016 (r304698) @@ -35,6 +35,7 @@ POSIX_REC_MIN_XFER_SIZE, _PC_REC_MIN_XFE POSIX_REC_XFER_ALIGN, _PC_REC_XFER_ALIGN SYMLINK_MAX, _PC_SYMLINK_MAX TRUSTEDBSD_ACL_EXTENDED, _PC_ACL_EXTENDED +TRUSTEDBSD_ACL_NFS4, _PC_ACL_NFS4 TRUSTEDBSD_ACL_PATH_MAX, _PC_ACL_PATH_MAX TRUSTEDBSD_CAP_PRESENT, _PC_CAP_PRESENT TRUSTEDBSD_INF_PRESENT, _PC_INF_PRESENT ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304697 - in head: share/mk sys/conf
Author: bdrewery Date: Tue Aug 23 19:37:18 2016 New Revision: 304697 URL: https://svnweb.freebsd.org/changeset/base/304697 Log: FAST_DEPEND: Fix 'make all install' not properly rebuilding based on .depend.* files. An optimization is in place to skip reading the .depend.* files with 'make install'. This was too strong and broke 'make all install' and 'make foo.o foo install'. Now only skip reading the dependency files if all make targets ran are install targets. The problem comes about because headers are only added in as a guessed dependency if .depend.* files do not yet exist. If they do exist, even if being skipped from being read, then the header dependencies are not applied. This applies to all #included files, and not just headers. Reported by: kib MFC after:1 day Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.dep.mk head/sys/conf/kern.post.mk Modified: head/share/mk/bsd.dep.mk == --- head/share/mk/bsd.dep.mkTue Aug 23 19:31:43 2016(r304696) +++ head/share/mk/bsd.dep.mkTue Aug 23 19:37:18 2016(r304697) @@ -76,12 +76,13 @@ tags: ${SRCS} _meta_filemon= 1 .endif -# Skip reading .depend when not needed to speed up tree-walks -# and simple lookups. +# Skip reading .depend when not needed to speed up tree-walks and simple +# lookups. For install, only do this if no other targets are specified. # Also skip generating or including .depend.* files if in meta+filemon mode # since it will track dependencies itself. OBJS_DEPEND_GUESS is still used. .if !empty(.MAKEFLAGS:M-V${_V_READ_DEPEND}) || make(obj) || make(clean*) || \ -make(install*) || make(analyze) || defined(_meta_filemon) +${.TARGETS:M*install*} == ${.TARGETS} || \ +make(analyze) || defined(_meta_filemon) _SKIP_READ_DEPEND= 1 .if ${MK_DIRDEPS_BUILD} == "no" .MAKE.DEPENDFILE= /dev/null Modified: head/sys/conf/kern.post.mk == --- head/sys/conf/kern.post.mk Tue Aug 23 19:31:43 2016(r304696) +++ head/sys/conf/kern.post.mk Tue Aug 23 19:37:18 2016(r304697) @@ -196,12 +196,13 @@ ${SYSTEM_OBJS} genassym.o vers.o: opt_gl .if !empty(.MAKE.MODE:Unormal:Mmeta) && empty(.MAKE.MODE:Unormal:Mnofilemon) _meta_filemon= 1 .endif -# Skip reading .depend when not needed to speed up tree-walks -# and simple lookups. +# Skip reading .depend when not needed to speed up tree-walks and simple +# lookups. For install, only do this if no other targets are specified. # Also skip generating or including .depend.* files if in meta+filemon mode # since it will track dependencies itself. OBJS_DEPEND_GUESS is still used. .if !empty(.MAKEFLAGS:M-V${_V_READ_DEPEND}) || make(obj) || make(clean*) || \ -make(install*) || make(kernel-obj) || make(kernel-clean*) || \ +${.TARGETS:M*install*} == ${.TARGETS} || \ +make(kernel-obj) || make(kernel-clean*) || \ make(kernel-install*) || defined(_meta_filemon) _SKIP_READ_DEPEND= 1 .MAKE.DEPENDFILE= /dev/null ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304696 - head/share/mk
Author: dim Date: Tue Aug 23 19:31:43 2016 New Revision: 304696 URL: https://svnweb.freebsd.org/changeset/base/304696 Log: In addition to creating subdirectories under .OBJDIR for SRCS with relative paths, also create them for DPSRCS. This is needed for builds that generate files during the depend stage, which cannot be compiled by themselves, since those have to be put in DPSRCS. Modified: head/share/mk/bsd.obj.mk Modified: head/share/mk/bsd.obj.mk == --- head/share/mk/bsd.obj.mkTue Aug 23 19:29:37 2016(r304695) +++ head/share/mk/bsd.obj.mkTue Aug 23 19:31:43 2016(r304696) @@ -102,7 +102,7 @@ obj: .PHONY fi; \ ${ECHO} "${CANONICALOBJDIR} created for ${.CURDIR}"; \ fi -.for dir in ${SRCS:H:O:u} +.for dir in ${SRCS:H:O:u} ${DPSRCS:H:O:u} @if ! test -d ${CANONICALOBJDIR}/${dir}/; then \ mkdir -p ${CANONICALOBJDIR}/${dir}; \ if ! test -d ${CANONICALOBJDIR}/${dir}/; then \ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304695 - head
Author: bdrewery Date: Tue Aug 23 19:29:37 2016 New Revision: 304695 URL: https://svnweb.freebsd.org/changeset/base/304695 Log: Fix in-tree GCC builds after r304681. There were a few issues. - In-tree GCC won't have X_COMPILER_TYPE defined but will have WANT_COMPILER_TYPE==gcc set from the SYSTEM_COMPILER logic that can be used. Make the clang check specific to clang as well to ensure -target doesn't leak into a GCC build. - When using a cross-compiler GCC (with a default sysroot or arch) and also passing --sysroot, it basically forgets all internal paths for libraries. We've already worked around this quite a bit for the external toolchains. Now for the in-tree bootstrap cross-compiler GCC, also pass in the needed -B${WORLDTMP}/usr/lib to find the crt object files, but also -isystem and -L to fix the paths. This creates quite a spammy build log, but it is clear and still achieves the goals and stays consistent between internal and external build flags. Reducing the spam by using the '=' prefix feature will help and be done later. MFC after:3 days X-MFC-With: r304681 Reported by: bz Pointyhat to: bdrewery Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 head/Makefile.libcompat Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Tue Aug 23 19:28:01 2016(r304694) +++ head/Makefile.inc1 Tue Aug 23 19:29:37 2016(r304695) @@ -572,18 +572,23 @@ TARGET_ABI= gnueabihf TARGET_ABI=gnueabi .endif .endif -.if defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc +.if ${WANT_COMPILER_TYPE} == gcc || \ +(defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc) # GCC requires -isystem and -L when using a cross-compiler. --sysroot # won't set header path and -L is used to ensure the base library path # is added before the port PREFIX library path. XCFLAGS+= -isystem ${WORLDTMP}/usr/include -L${WORLDTMP}/usr/lib +# GCC requires -B to find /usr/lib/crti.o when using a cross-compiler +# combined with --sysroot. +XCFLAGS+= -B${WORLDTMP}/usr/lib # Force using libc++ for external GCC. # XXX: This should be checking MK_GNUCXX == no .if ${X_COMPILER_VERSION} >= 40800 XCXXFLAGS+=-isystem ${WORLDTMP}/usr/include/c++/v1 -std=c++11 \ -nostdinc++ -L${WORLDTMP}/../lib/libc++ .endif -.else +.elif ${WANT_COMPILER_TYPE} == clang || \ +(defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == clang) TARGET_ABI?= unknown TARGET_TRIPLE?=${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd12.0 XCFLAGS+= -target ${TARGET_TRIPLE} Modified: head/Makefile.libcompat == --- head/Makefile.libcompat Tue Aug 23 19:28:01 2016(r304694) +++ head/Makefile.libcompat Tue Aug 23 19:29:37 2016(r304695) @@ -73,7 +73,8 @@ LIBCOMPATCFLAGS+= ${LIBCOMPATCPUFLAGS} \ # Clang/GCC. LIBCOMPATCFLAGS+= -B${LIBCOMPATTMP}/usr/lib${libcompat} -.if defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc +.if ${WANT_COMPILER_TYPE} == gcc || \ +(defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc) # GCC requires -isystem when using a cross-compiler and --sysroot. Note that # Makefile.inc1 only applies this with an external compiler but libcompat # always does since even in-tree GCC 4.2 needs this to override the built-in ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304694 - head/usr.bin/getconf
Author: ngie Date: Tue Aug 23 19:28:01 2016 New Revision: 304694 URL: https://svnweb.freebsd.org/changeset/base/304694 Log: Add `MIN_HOLE_SIZE` pathconf(2) support to getconf This allows shell programs to programmatically determine whether or not a filesystem supports sparse files MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/usr.bin/getconf/pathconf.gperf Modified: head/usr.bin/getconf/pathconf.gperf == --- head/usr.bin/getconf/pathconf.gperf Tue Aug 23 19:15:01 2016 (r304693) +++ head/usr.bin/getconf/pathconf.gperf Tue Aug 23 19:28:01 2016 (r304694) @@ -24,6 +24,7 @@ FILESIZEBITS, _PC_FILESIZEBITS LINK_MAX, _PC_LINK_MAX MAX_CANON, _PC_MAX_CANON MAX_INPUT, _PC_MAX_INPUT +MIN_HOLE_SIZE, _PC_MIN_HOLE_SIZE NAME_MAX, _PC_NAME_MAX PATH_MAX, _PC_PATH_MAX PIPE_BUF, _PC_PIPE_BUF ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304693 - head/usr.bin/getconf
Author: ngie Date: Tue Aug 23 19:15:01 2016 New Revision: 304693 URL: https://svnweb.freebsd.org/changeset/base/304693 Log: Clean up trailing whitespace MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/usr.bin/getconf/getconf.c Modified: head/usr.bin/getconf/getconf.c == --- head/usr.bin/getconf/getconf.c Tue Aug 23 19:03:11 2016 (r304692) +++ head/usr.bin/getconf/getconf.c Tue Aug 23 19:15:01 2016 (r304693) @@ -109,13 +109,13 @@ main(int argc, char **argv) do_confstr(name, key); else printf("undefined\n"); - } else { + } else { valid = find_sysconf(name, ); if (valid > 0) { do_sysconf(name, key); } else if (valid < 0) { printf("undefined\n"); - } else + } else errx(EX_USAGE, "no such configuration parameter `%s'", name); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304692 - head/sys/dev/bhnd/bhndb
Author: landonf Date: Tue Aug 23 19:03:11 2016 New Revision: 304692 URL: https://svnweb.freebsd.org/changeset/base/304692 Log: bhndb(4): Fix unsigned integer underflow in dynamic register window handling. This resulted in the window target being left uninitialized when an underflow occured. Approved by: adrian (mentor) Differential Revision:https://reviews.freebsd.org/D7617 Modified: head/sys/dev/bhnd/bhndb/bhndb.c Modified: head/sys/dev/bhnd/bhndb/bhndb.c == --- head/sys/dev/bhnd/bhndb/bhndb.c Tue Aug 23 17:42:03 2016 (r304691) +++ head/sys/dev/bhnd/bhndb/bhndb.c Tue Aug 23 19:03:11 2016 (r304692) @@ -1728,8 +1728,9 @@ bhndb_io_resource(struct bhndb_softc *sc /* Adjust the window if the I/O request won't fit in the current * target range. */ - if (addr < dwa->target || - (dwa->target + dwa->win->win_size) - addr < size) + if (addr < dwa->target || + addr > dwa->target + dwa->win->win_size || + (dwa->target + dwa->win->win_size) - addr < size) { error = bhndb_dw_set_addr(sc->dev, sc->bus_res, dwa, addr, size); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304691 - head/usr.bin/bsdiff/bspatch
Author: emaste Date: Tue Aug 23 17:42:03 2016 New Revision: 304691 URL: https://svnweb.freebsd.org/changeset/base/304691 Log: bspatch: apply style(9) Make style changes (and trivial refactoring of open calls) now in order to reduce noise in diffs for future capsicum changes. Reviewed by: oshogbo No objection: cperciva Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D7610 Modified: head/usr.bin/bsdiff/bspatch/bspatch.c Modified: head/usr.bin/bsdiff/bspatch/bspatch.c == --- head/usr.bin/bsdiff/bspatch/bspatch.c Tue Aug 23 17:38:06 2016 (r304690) +++ head/usr.bin/bsdiff/bspatch/bspatch.c Tue Aug 23 17:42:03 2016 (r304691) @@ -28,12 +28,12 @@ __FBSDID("$FreeBSD$"); #include -#include +#include +#include #include +#include #include -#include #include -#include #ifndef O_BINARY #define O_BINARY 0 @@ -43,18 +43,19 @@ static off_t offtin(u_char *buf) { off_t y; - y=buf[7]&0x7F; - y=y*256;y+=buf[6]; - y=y*256;y+=buf[5]; - y=y*256;y+=buf[4]; - y=y*256;y+=buf[3]; - y=y*256;y+=buf[2]; - y=y*256;y+=buf[1]; - y=y*256;y+=buf[0]; + y = buf[7] & 0x7F; + y = y * 256; y += buf[6]; + y = y * 256; y += buf[5]; + y = y * 256; y += buf[4]; + y = y * 256; y += buf[3]; + y = y * 256; y += buf[2]; + y = y * 256; y += buf[1]; + y = y * 256; y += buf[0]; - if(buf[7]&0x80) y=-y; + if (buf[7] & 0x80) + y = -y; - return y; + return (y); } static void @@ -65,17 +66,17 @@ usage(void) exit(1); } -int main(int argc,char * argv[]) +int main(int argc, char *argv[]) { - FILE * f, * cpf, * dpf, * epf; - BZFILE * cpfbz2, * dpfbz2, * epfbz2; + FILE *f, *cpf, *dpf, *epf; + BZFILE *cpfbz2, *dpfbz2, *epfbz2; int cbz2err, dbz2err, ebz2err; - int fd; - ssize_t oldsize,newsize; - ssize_t bzctrllen,bzdatalen; - u_char header[32],buf[8]; + int newfd, oldfd; + ssize_t oldsize, newsize; + ssize_t bzctrllen, bzdatalen; + u_char header[32], buf[8]; u_char *old, *new; - off_t oldpos,newpos; + off_t oldpos, newpos; off_t ctrl[3]; off_t lenread; off_t i; @@ -113,11 +114,11 @@ int main(int argc,char * argv[]) errx(1, "Corrupt patch\n"); /* Read lengths from header */ - bzctrllen=offtin(header+8); - bzdatalen=offtin(header+16); - newsize=offtin(header+24); - if((bzctrllen<0) || (bzdatalen<0) || (newsize<0)) - errx(1,"Corrupt patch\n"); + bzctrllen = offtin(header + 8); + bzdatalen = offtin(header + 16); + newsize = offtin(header + 24); + if ((bzctrllen < 0) || (bzdatalen < 0) || (newsize < 0)) + errx(1, "Corrupt patch\n"); /* Close patch file and re-open it via libbzip2 at the right places */ if (fclose(f)) @@ -144,32 +145,37 @@ int main(int argc,char * argv[]) if ((epfbz2 = BZ2_bzReadOpen(, epf, 0, 0, NULL, 0)) == NULL) errx(1, "BZ2_bzReadOpen, bz2err = %d", ebz2err); - if(((fd=open(argv[1],O_RDONLY|O_BINARY,0))<0) || - ((oldsize=lseek(fd,0,SEEK_END))==-1) || - ((old=malloc(oldsize+1))==NULL) || - (lseek(fd,0,SEEK_SET)!=0) || - (read(fd,old,oldsize)!=oldsize) || - (close(fd)==-1)) err(1,"%s",argv[1]); - if((new=malloc(newsize+1))==NULL) err(1,NULL); - - oldpos=0;newpos=0; - while(newpos
svn commit: r304690 - in releng/11.0: contrib/llvm/lib/Target/ARM/MCTargetDesc lib/clang
Author: dim Date: Tue Aug 23 17:38:06 2016 New Revision: 304690 URL: https://svnweb.freebsd.org/changeset/base/304690 Log: MFC r304530: Pull in r265122 from upstream llvm trunk (by James Molloy): Fix for pr24346: arm asm label calculation error in sub Some ARM instructions encode 32-bit immediates as a 8-bit integer (0-255) and a 4-bit rotation (0-30, even) in its least significant 12 bits. The original fixup, FK_Data_4, patches the instruction by the value bit-to-bit, regardless of the encoding. For example, assuming the label L1 and L2 are 0x0 and 0x104 respectively, the following instruction: add r0, r0, #(L2 - L1) ; expects 0x104, i.e., 260 would be assembled to the following, which adds 1 to r0, instead of 260: e2800104 add r0, r0, #4, 2 ; equivalently 1 The new fixup kind fixup_arm_mod_imm takes care of the encoding: e2800f41 add r0, r0, #260 Patch by Ting-Yuan Huang! This fixes label calculation for ARM assembly, and is needed to enable ARM assembly sources for OpenSSL. Approved by: re (kib) Requested by: jkim Modified: releng/11.0/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp releng/11.0/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h releng/11.0/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp releng/11.0/lib/clang/freebsd_cc_version.h Directory Properties: releng/11.0/ (props changed) Modified: releng/11.0/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp == --- releng/11.0/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp Tue Aug 23 16:37:34 2016(r304689) +++ releng/11.0/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp Tue Aug 23 17:38:06 2016(r304690) @@ -90,6 +90,7 @@ const MCFixupKindInfo ::ge {"fixup_arm_movw_lo16", 0, 20, 0}, {"fixup_t2_movt_hi16", 0, 20, 0}, {"fixup_t2_movw_lo16", 0, 20, 0}, + {"fixup_arm_mod_imm", 0, 12, 0}, }; const static MCFixupKindInfo InfosBE[ARM::NumTargetFixupKinds] = { // This table *must* be in the order that the fixup_* kinds are defined in @@ -133,6 +134,7 @@ const MCFixupKindInfo ::ge {"fixup_arm_movw_lo16", 12, 20, 0}, {"fixup_t2_movt_hi16", 12, 20, 0}, {"fixup_t2_movw_lo16", 12, 20, 0}, + {"fixup_arm_mod_imm", 20, 12, 0}, }; if (Kind < FirstTargetFixupKind) @@ -624,6 +626,13 @@ unsigned ARMAsmBackend::adjustFixupValue return Value; } + case ARM::fixup_arm_mod_imm: +Value = ARM_AM::getSOImmVal(Value); +if (Ctx && Value >> 12) { + Ctx->reportError(Fixup.getLoc(), "out of range immediate fixup value"); + return 0; +} +return Value; } } @@ -690,6 +699,7 @@ static unsigned getFixupKindNumBytes(uns case FK_Data_2: case ARM::fixup_arm_thumb_br: case ARM::fixup_arm_thumb_cb: + case ARM::fixup_arm_mod_imm: return 2; case ARM::fixup_arm_pcrel_10_unscaled: @@ -766,6 +776,7 @@ static unsigned getFixupKindContainerSiz case ARM::fixup_arm_movw_lo16: case ARM::fixup_t2_movt_hi16: case ARM::fixup_t2_movw_lo16: + case ARM::fixup_arm_mod_imm: // Instruction size is 4 bytes. return 4; } Modified: releng/11.0/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h == --- releng/11.0/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h Tue Aug 23 16:37:34 2016(r304689) +++ releng/11.0/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h Tue Aug 23 17:38:06 2016(r304690) @@ -100,6 +100,9 @@ enum Fixups { fixup_t2_movt_hi16, // :upper16: fixup_t2_movw_lo16, // :lower16: + // fixup_arm_mod_imm - Fixup for mod_imm + fixup_arm_mod_imm, + // Marker LastTargetFixupKind, NumTargetFixupKinds = LastTargetFixupKind - FirstTargetFixupKind Modified: releng/11.0/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp == --- releng/11.0/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp Tue Aug 23 16:37:34 2016(r304689) +++ releng/11.0/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp Tue Aug 23 17:38:06 2016(r304690) @@ -312,12 +312,8 @@ public: // Support for fixups (MCFixup) if (MO.isExpr()) { const MCExpr *Expr = MO.getExpr(); - // In instruction code this value always encoded as lowest 12 bits, - // so we don't have to perform any specific adjustments. - // Due to requirements of relocatable records we have to use FK_Data_4. - // See ARMELFObjectWriter::ExplicitRelSym and - // ARMELFObjectWriter::GetRelocTypeInner for more details. - MCFixupKind Kind = MCFixupKind(FK_Data_4); + // Fixups resolve to plain values that need to be
svn commit: r304689 - head/sys/arm64/arm64
Author: andrew Date: Tue Aug 23 16:37:34 2016 New Revision: 304689 URL: https://svnweb.freebsd.org/changeset/base/304689 Log: Also adjust the virtual address passed to vm_page_pa_tryrelock. Reported by: alc Obtained from:ABT Systems Ltd MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c == --- head/sys/arm64/arm64/pmap.c Tue Aug 23 16:20:56 2016(r304688) +++ head/sys/arm64/arm64/pmap.c Tue Aug 23 16:37:34 2016(r304689) @@ -1028,7 +1028,8 @@ retry: default: off = 0; } - if (vm_page_pa_tryrelock(pmap, tpte & ~ATTR_MASK, )) + if (vm_page_pa_tryrelock(pmap, + (tpte & ~ATTR_MASK) | off, )) goto retry; m = PHYS_TO_VM_PAGE((tpte & ~ATTR_MASK) | off); vm_page_hold(m); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r304681 - head
On 8/23/2016 8:20 AM, Bryan Drewery wrote: > Author: bdrewery > Date: Tue Aug 23 15:20:32 2016 > New Revision: 304681 > URL: https://svnweb.freebsd.org/changeset/base/304681 > > Log: > Always pass in -target and --sysroot flags for the build. Sorry this breaks in-tree GCC builds. Testing a fix now. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r304688 - head/sys/arm64/arm64
Author: andrew Date: Tue Aug 23 16:20:56 2016 New Revision: 304688 URL: https://svnweb.freebsd.org/changeset/base/304688 Log: Map memory as read-only in pmap_enter_quick_locked as is done in other pmap implementations. Obtained from:ABT Systems Ltd MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c == --- head/sys/arm64/arm64/pmap.c Tue Aug 23 16:12:25 2016(r304687) +++ head/sys/arm64/arm64/pmap.c Tue Aug 23 16:20:56 2016(r304688) @@ -2794,7 +2794,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ pmap_resident_count_inc(pmap, 1); pa = VM_PAGE_TO_PHYS(m) | ATTR_DEFAULT | ATTR_IDX(m->md.pv_memattr) | - ATTR_AP(ATTR_AP_RW) | L3_PAGE; + ATTR_AP(ATTR_AP_RO) | L3_PAGE; /* * Now validate mapping with RO protection ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r304685 - head/sys/arm64/arm64
On 08/23/2016 10:48, Andrew Turner wrote: > Author: andrew > Date: Tue Aug 23 15:48:27 2016 > New Revision: 304685 > URL: https://svnweb.freebsd.org/changeset/base/304685 > > Log: > Include the offset the virtual address is within an L1 or L2 block when > finding the vm_page_t in pmap_extract_and_hold. Previously it would return > the vm_page_t of the first page in a block. This would cause issues when, > for example, fsck reads from a device into the middle of a superpage. In > this case the read call would write to the start of the block, and not to > the buffer passed in. > > Obtained from: ABT Systems Ltd > MFC after: 1 month > Sponsored by: The FreeBSD Foundation > > Modified: > head/sys/arm64/arm64/pmap.c > > Modified: head/sys/arm64/arm64/pmap.c > == > --- head/sys/arm64/arm64/pmap.c Tue Aug 23 15:46:20 2016 > (r304684) > +++ head/sys/arm64/arm64/pmap.c Tue Aug 23 15:48:27 2016 > (r304685) > @@ -995,6 +995,7 @@ vm_page_t > pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot) > { > pt_entry_t *pte, tpte; > + vm_offset_t off; > vm_paddr_t pa; > vm_page_t m; > int lvl; > @@ -1016,9 +1017,20 @@ retry: >tpte & ATTR_DESCR_MASK)); > if (((tpte & ATTR_AP_RW_BIT) == ATTR_AP(ATTR_AP_RW)) || > ((prot & VM_PROT_WRITE) == 0)) { > + switch(lvl) { > + case 1: > + off = va & L1_OFFSET; > + break; > + case 2: > + off = va & L2_OFFSET; > + break; > + case 3: > + default: > + off = 0; > + } I would strongly suggest that you also include the page offset in the value passed to vm_page_pa_tryrelock(). Otherwise, if we ever change the mapping from physical addresses to page locks, this code will be acquiring the wrong lock. Other pmap implementations, e.g., amd64, do include the offset. > if (vm_page_pa_tryrelock(pmap, tpte & ~ATTR_MASK, )) > goto retry; > - m = PHYS_TO_VM_PAGE(tpte & ~ATTR_MASK); > + m = PHYS_TO_VM_PAGE((tpte & ~ATTR_MASK) | off); > vm_page_hold(m); > } > } > > ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304687 - head/sys/arm64/arm64
Author: andrew Date: Tue Aug 23 16:12:25 2016 New Revision: 304687 URL: https://svnweb.freebsd.org/changeset/base/304687 Log: If we find we have a superpage in pmap_enter_quick_locked return without trying to add a new level 3 page. Obtained from:ABT Systems Ltd MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c == --- head/sys/arm64/arm64/pmap.c Tue Aug 23 15:49:31 2016(r304686) +++ head/sys/arm64/arm64/pmap.c Tue Aug 23 16:12:25 2016(r304687) @@ -2696,7 +2696,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ { struct spglist free; pd_entry_t *pde; - pt_entry_t *l3; + pt_entry_t *l2, *l3; vm_paddr_t pa; int lvl; @@ -2731,6 +2731,12 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ * attempt to allocate a page table page. If this * attempt fails, we don't retry. Instead, we give up. */ + if (lvl == 1) { + l2 = pmap_l1_to_l2(pde, va); + if ((pmap_load(l2) & ATTR_DESCR_MASK) == + L2_BLOCK) + return (NULL); + } if (lvl == 2 && pmap_load(pde) != 0) { mpte = PHYS_TO_VM_PAGE(pmap_load(pde) & ~ATTR_MASK); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304686 - head/usr.bin/indent
Author: pfg Date: Tue Aug 23 15:49:31 2016 New Revision: 304686 URL: https://svnweb.freebsd.org/changeset/base/304686 Log: indent(1): have the memset invocation somewhat more canonical. While correct, the previous invocation was somewhat more error prone. Pointed out by: delphij, bde Modified: head/usr.bin/indent/io.c Modified: head/usr.bin/indent/io.c == --- head/usr.bin/indent/io.cTue Aug 23 15:48:27 2016(r304685) +++ head/usr.bin/indent/io.cTue Aug 23 15:49:31 2016(r304686) @@ -630,7 +630,7 @@ parsefont(struct fstate *f, const char * const char *s = s0; int sizedelta = 0; -memset(f, 0, sizeof(struct fstate)); +memset(f, '\0', sizeof(*f)); while (*s) { if (isdigit(*s)) f->size = f->size * 10 + *s - '0'; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304685 - head/sys/arm64/arm64
Author: andrew Date: Tue Aug 23 15:48:27 2016 New Revision: 304685 URL: https://svnweb.freebsd.org/changeset/base/304685 Log: Include the offset the virtual address is within an L1 or L2 block when finding the vm_page_t in pmap_extract_and_hold. Previously it would return the vm_page_t of the first page in a block. This would cause issues when, for example, fsck reads from a device into the middle of a superpage. In this case the read call would write to the start of the block, and not to the buffer passed in. Obtained from:ABT Systems Ltd MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c == --- head/sys/arm64/arm64/pmap.c Tue Aug 23 15:46:20 2016(r304684) +++ head/sys/arm64/arm64/pmap.c Tue Aug 23 15:48:27 2016(r304685) @@ -995,6 +995,7 @@ vm_page_t pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot) { pt_entry_t *pte, tpte; + vm_offset_t off; vm_paddr_t pa; vm_page_t m; int lvl; @@ -1016,9 +1017,20 @@ retry: tpte & ATTR_DESCR_MASK)); if (((tpte & ATTR_AP_RW_BIT) == ATTR_AP(ATTR_AP_RW)) || ((prot & VM_PROT_WRITE) == 0)) { + switch(lvl) { + case 1: + off = va & L1_OFFSET; + break; + case 2: + off = va & L2_OFFSET; + break; + case 3: + default: + off = 0; + } if (vm_page_pa_tryrelock(pmap, tpte & ~ATTR_MASK, )) goto retry; - m = PHYS_TO_VM_PAGE(tpte & ~ATTR_MASK); + m = PHYS_TO_VM_PAGE((tpte & ~ATTR_MASK) | off); vm_page_hold(m); } } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304684 - head/usr.bin/indent
Author: pfg Date: Tue Aug 23 15:46:20 2016 New Revision: 304684 URL: https://svnweb.freebsd.org/changeset/base/304684 Log: indent(1): remove dead assignments. Taken from: Piotr Sephaniak Modified: head/usr.bin/indent/indent.c head/usr.bin/indent/io.c Modified: head/usr.bin/indent/indent.c == --- head/usr.bin/indent/indent.cTue Aug 23 15:31:53 2016 (r304683) +++ head/usr.bin/indent/indent.cTue Aug 23 15:46:20 2016 (r304684) @@ -1161,7 +1161,6 @@ check_type: case comment: /* we have gotten a / followed by * this is a biggie */ if (flushed_nl) { /* we should force a broken line here */ - flushed_nl = false; dump_line(); ps.want_blank = false; /* dont insert blank at line start */ force_nl = false; Modified: head/usr.bin/indent/io.c == --- head/usr.bin/indent/io.cTue Aug 23 15:31:53 2016(r304683) +++ head/usr.bin/indent/io.cTue Aug 23 15:46:20 2016(r304684) @@ -242,7 +242,7 @@ dump_line(void) } while (e_com > com_st && isspace(e_com[-1])) e_com--; - cur_col = pad_output(cur_col, target); + (void)pad_output(cur_col, target); fwrite(com_st, e_com - com_st, 1, output); ps.comment_delta = ps.n_comment_delta; ++ps.com_lines; /* count lines with comments */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304683 - head/share/man/man5
Author: bdrewery Date: Tue Aug 23 15:31:53 2016 New Revision: 304683 URL: https://svnweb.freebsd.org/changeset/base/304683 Log: Regenerate Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Tue Aug 23 15:22:17 2016 (r304682) +++ head/share/man/man5/src.conf.5 Tue Aug 23 15:31:53 2016 (r304683) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 292283 2015-12-15 18:42:30Z bdrewery .\" $FreeBSD$ -.Dd August 22, 2016 +.Dd August 23, 2016 .Dt SRC.CONF 5 .Os .Sh NAME @@ -542,10 +542,6 @@ When set, it also enforces the following When set, the following options are also in effect: .Pp .Bl -inset -compact -.It Va WITHOUT_SYSTEM_COMPILER -(unless -.Va WITH_SYSTEM_COMPILER -is set explicitly) .It Va WITH_AUTO_OBJ (unless .Va WITHOUT_AUTO_OBJ @@ -1147,14 +1143,6 @@ to .Pp Currently this also enforces .Va WITHOUT_SYSTEM_COMPILER . -When set, the following options are also in effect: -.Pp -.Bl -inset -compact -.It Va WITHOUT_SYSTEM_COMPILER -(unless -.Va WITH_SYSTEM_COMPILER -is set explicitly) -.El .Pp This must be set in the environment, make command line, or .Pa /etc/src-env.conf , ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304682 - head/share/mk
Author: bdrewery Date: Tue Aug 23 15:22:17 2016 New Revision: 304682 URL: https://svnweb.freebsd.org/changeset/base/304682 Log: Re-enable WITH_SYSTEM_COMPILER with WITH_META_MODE. This was disabled in r301468 due to -target/--sysroot sometimes being used in the build and other times not being used. Now that it is always used since r304681, it is safe to combine the features. MFC after:3 days Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk == --- head/share/mk/src.opts.mk Tue Aug 23 15:20:32 2016(r304681) +++ head/share/mk/src.opts.mk Tue Aug 23 15:22:17 2016(r304682) @@ -356,10 +356,6 @@ MK_ELFTOOLCHAIN_BOOTSTRAP:= no MK_GCC_BOOTSTRAP:= no .endif -.if ${MK_META_MODE} == "yes" -MK_SYSTEM_COMPILER:= no -.endif - .if ${MK_TOOLCHAIN} == "no" MK_BINUTILS:= no MK_CLANG:= no ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304681 - head
Author: bdrewery Date: Tue Aug 23 15:20:32 2016 New Revision: 304681 URL: https://svnweb.freebsd.org/changeset/base/304681 Log: Always pass in -target and --sysroot flags for the build. The internal bootstrap compiler has a default sysroot set by TOOLS_PREFIX and target set by TARGET/TARGET_ARCH. However, there are several needs to always pass an explicit --sysroot and -target. - External compiler needs sysroot and target flags. - External ld needs sysroot. - To be clear about the use of a sysroot when using the internal compiler. - Easier debugging. - Allowing WITH_SYSTEM_COMPILER+WITH_META_MODE to work together due to the flip-flopping build command when sometimes using external and sometimes using internal. - Allow using no lld which has support for default paths. The default sysroot in the bootstrap compiler is not changed. The buildenv compiler will still work with its default and will also include -target/--sysroot from CC in the environment. MFC after:3 days Discussed with: emaste, brooks (BSDCam) Reviewed by: emaste Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Tue Aug 23 13:53:38 2016(r304680) +++ head/Makefile.inc1 Tue Aug 23 15:20:32 2016(r304681) @@ -550,8 +550,18 @@ CROSSENV+= CC="${XCC} ${XCFLAGS}" CXX="$ BFLAGS+= -B${CROSS_BINUTILS_PREFIX} .endif -# External compiler needs sysroot and target flags. -.if ${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no" + +# The internal bootstrap compiler has a default sysroot set by TOOLS_PREFIX +# and target set by TARGET/TARGET_ARCH. However, there are several needs to +# always pass an explicit --sysroot and -target. +# - External compiler needs sysroot and target flags. +# - External ld needs sysroot. +# - To be clear about the use of a sysroot when using the internal compiler. +# - Easier debugging. +# - Allowing WITH_SYSTEM_COMPILER+WITH_META_MODE to work together due to +# the flip-flopping build command when sometimes using external and +# sometimes using internal. +# - Allow using lld which has no support for default paths. .if !defined(CROSS_BINUTILS_PREFIX) || !exists(${CROSS_BINUTILS_PREFIX}) BFLAGS+= -B${WORLDTMP}/usr/bin .endif @@ -579,7 +589,6 @@ TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x8 XCFLAGS+= -target ${TARGET_TRIPLE} .endif XCFLAGS+= --sysroot=${WORLDTMP} -.endif # ${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no" .if !empty(BFLAGS) XCFLAGS+= ${BFLAGS} ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304680 - in head/sys/boot/efi: libefi loader
Author: bapt Date: Tue Aug 23 13:53:38 2016 New Revision: 304680 URL: https://svnweb.freebsd.org/changeset/base/304680 Log: EFI loader: only open/close on the net device with tftpfs It prevents issuing a dhcp request before each file open As a consequence netbooting over tftpfs is significantly faster Sponsored by: Gandi.net Modified: head/sys/boot/efi/libefi/Makefile head/sys/boot/efi/loader/Makefile Modified: head/sys/boot/efi/libefi/Makefile == --- head/sys/boot/efi/libefi/Makefile Tue Aug 23 13:51:55 2016 (r304679) +++ head/sys/boot/efi/libefi/Makefile Tue Aug 23 13:53:38 2016 (r304680) @@ -14,7 +14,7 @@ SRCS+=time_event.c .endif .if defined(LOADER_TFTP_SUPPORT) -CFLAGS+= -DLOADER_TFTP_SUPPORT +CFLAGS+= -DLOADER_TFTP_SUPPORT -DNETIF_OPEN_CLOSE_ONCE .endif # We implement a slightly non-standard %S in that it always takes a Modified: head/sys/boot/efi/loader/Makefile == --- head/sys/boot/efi/loader/Makefile Tue Aug 23 13:51:55 2016 (r304679) +++ head/sys/boot/efi/loader/Makefile Tue Aug 23 13:53:38 2016 (r304680) @@ -22,7 +22,7 @@ SRCS= autoload.c \ vers.c .if defined(LOADER_TFTP_SUPPORT) -CFLAGS+= -DLOADER_TFTP_SUPPORT +CFLAGS+= -DLOADER_TFTP_SUPPORT -DNETIF_OPEN_CLOSE_ONCE .endif .if ${MK_ZFS} != "no" ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304679 - stable/10/sys/dev/sfxge
Author: arybchik Date: Tue Aug 23 13:51:55 2016 New Revision: 304679 URL: https://svnweb.freebsd.org/changeset/base/304679 Log: MFC r301724 sfxge(4): handle negative ticks difference correctly ticks are signed int and if statistics is not updated for a long time (more than INT_MAX ticks, but less than UINT_MAX) difference becomes negative and less than hz for a long time. Other option to repeat is simply load driver (which initializes timestamps to 0) when ticks are negative. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_ev.c stable/10/sys/dev/sfxge/sfxge_port.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_ev.c == --- stable/10/sys/dev/sfxge/sfxge_ev.c Tue Aug 23 13:43:43 2016 (r304678) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Tue Aug 23 13:51:55 2016 (r304679) @@ -448,7 +448,7 @@ sfxge_ev_stat_update(struct sfxge_softc goto out; now = ticks; - if (now - sc->ev_stats_update_time < hz) + if ((unsigned int)(now - sc->ev_stats_update_time) < (unsigned int)hz) goto out; sc->ev_stats_update_time = now; Modified: stable/10/sys/dev/sfxge/sfxge_port.c == --- stable/10/sys/dev/sfxge/sfxge_port.cTue Aug 23 13:43:43 2016 (r304678) +++ stable/10/sys/dev/sfxge/sfxge_port.cTue Aug 23 13:51:55 2016 (r304679) @@ -62,7 +62,7 @@ sfxge_mac_stat_update(struct sfxge_softc } now = ticks; - if (now - port->mac_stats.update_time < hz) { + if ((unsigned int)(now - port->mac_stats.update_time) < (unsigned int)hz) { rc = 0; goto out; } @@ -543,7 +543,7 @@ sfxge_phy_stat_update(struct sfxge_softc } now = ticks; - if (now - port->phy_stats.update_time < hz) { + if ((unsigned int)(now - port->phy_stats.update_time) < (unsigned int)hz) { rc = 0; goto out; } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r304321 - in head/sys: boot/efi/boot1 boot/efi/loader boot/i386/boot2 boot/i386/gptboot boot/i386/gptzfsboot boot/i386/zfsboot boot/userboot/ficl boot/userboot/userboot boot/userboot/z
> On 23. aug 2016, at 15:36, Slawa Olhovchenkovwrote: > > On Tue, Aug 23, 2016 at 03:26:04PM +0300, Toomas Soome wrote: > >>> Main trouble (by kib@) is 640KB real mode limit. >>> Separated heap don't soled this. >>> May be solution is early switch to protected mode, boot2? >> >> hm, but boot2 is already btx client and btx is setting up the >> protected mode. Only zfsboot/gpt[zfs]boot memory copy (boot2 >> relocator) is working in segmented real mode, so the gptldr.S and >> zfsldr.S has to deal with memory segments to set boot2 up. Or did >> got you wrong? > > Mat be I am wrong. > May be I am not very clean. > As I understund kib@ restriction caused by 640KB realmode limit. > In case of boot2 start in real mode and read enterly by boot1 -- we > also touch this trouble. > > How to resolve this: > > 1) start entirely; boot2 in protected mode and read all boot2 to > extended memory > > 2) read only part of boot2 (boot2 relocator) by boot1 and switch to > protected mode before reading rest of boot2 by boot2 code. Ah, well, the boot2 by itself is not an issue - it is much smaller and the only related problem was that real mode relocator was using segment size (64k) for copy, but this limit is removed (was pre-requisite for geli support in gptboot and I did port that change to zfsboot as well). The size issue with loader (stage3) is due to fact that loader memory image is located in low memory, base 0xa000 and the upper limit is EBDA and video memory area. Since boot2 is running in protected mode, it can load loader (or kernel) were needed, just that placing loader must be careful… in that sense the current location is almost perfect (with exception about the size limit;) and I would avoid moving it without the very good reason. rgds, toomas ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304678 - head/usr.sbin/kldxref
Author: araujo Date: Tue Aug 23 13:43:43 2016 New Revision: 304678 URL: https://svnweb.freebsd.org/changeset/base/304678 Log: Use roundup2() from sys/param.h. Modified: head/usr.sbin/kldxref/kldxref.c Modified: head/usr.sbin/kldxref/kldxref.c == --- head/usr.sbin/kldxref/kldxref.c Tue Aug 23 13:35:48 2016 (r304677) +++ head/usr.sbin/kldxref/kldxref.c Tue Aug 23 13:43:43 2016 (r304678) @@ -74,7 +74,7 @@ static int reccnt;/* total record writt static void intalign(void) { - recpos = (recpos + sizeof(int) - 1) & ~(sizeof(int) - 1); + recpos = roundup2(recpos, sizeof(int)); } static void ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304677 - in head/sys/boot: common efi/libefi efi/loader
Author: bapt Date: Tue Aug 23 13:35:48 2016 New Revision: 304677 URL: https://svnweb.freebsd.org/changeset/base/304677 Log: Add tftpfs support for the EFI loader Allow netbooting on efi without having to setup any NFS server by rebuilding the loader with LOADER_TFTP_SUPPORT like for the i386 pxeloader Sponsored by: Gandi.net Modified: head/sys/boot/common/dev_net.c head/sys/boot/efi/libefi/Makefile head/sys/boot/efi/loader/Makefile head/sys/boot/efi/loader/conf.c Modified: head/sys/boot/common/dev_net.c == --- head/sys/boot/common/dev_net.c Tue Aug 23 13:19:42 2016 (r304676) +++ head/sys/boot/common/dev_net.c Tue Aug 23 13:35:48 2016 (r304677) @@ -167,8 +167,13 @@ net_open(struct open_file *f, ...) setenv("boot.netif.ip", inet_ntoa(myip), 1); setenv("boot.netif.netmask", intoa(netmask), 1); setenv("boot.netif.gateway", inet_ntoa(gateip), 1); +#ifdef LOADER_TFTP_SUPPORT + setenv("boot.tftproot.server", inet_ntoa(rootip), 1); + setenv("boot.tftproot.path", rootpath, 1); +#else setenv("boot.nfsroot.server", inet_ntoa(rootip), 1); setenv("boot.nfsroot.path", rootpath, 1); +#endif if (intf_mtu != 0) { char mtu[16]; sprintf(mtu, "%u", intf_mtu); Modified: head/sys/boot/efi/libefi/Makefile == --- head/sys/boot/efi/libefi/Makefile Tue Aug 23 13:19:42 2016 (r304676) +++ head/sys/boot/efi/libefi/Makefile Tue Aug 23 13:35:48 2016 (r304677) @@ -13,6 +13,10 @@ SRCS+= time.c SRCS+= time_event.c .endif +.if defined(LOADER_TFTP_SUPPORT) +CFLAGS+= -DLOADER_TFTP_SUPPORT +.endif + # We implement a slightly non-standard %S in that it always takes a # CHAR16 that's common in UEFI-land instead of a wchar_t. This only # seems to matter on arm64 where wchar_t defaults to an int instead Modified: head/sys/boot/efi/loader/Makefile == --- head/sys/boot/efi/loader/Makefile Tue Aug 23 13:19:42 2016 (r304676) +++ head/sys/boot/efi/loader/Makefile Tue Aug 23 13:35:48 2016 (r304677) @@ -21,6 +21,10 @@ SRCS=autoload.c \ smbios.c \ vers.c +.if defined(LOADER_TFTP_SUPPORT) +CFLAGS+= -DLOADER_TFTP_SUPPORT +.endif + .if ${MK_ZFS} != "no" SRCS+= zfs.c .PATH: ${.CURDIR}/../../zfs Modified: head/sys/boot/efi/loader/conf.c == --- head/sys/boot/efi/loader/conf.c Tue Aug 23 13:19:42 2016 (r304676) +++ head/sys/boot/efi/loader/conf.c Tue Aug 23 13:35:48 2016 (r304677) @@ -51,7 +51,11 @@ struct fs_ops *file_system[] = { _fsops, _fsops, _fsops, +#ifdef LOADER_TFTP_SUPPORT + _fsops, +#else _fsops, +#endif _fsops, _fsops, NULL ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304676 - head/usr.sbin/fifolog/lib
Author: araujo Date: Tue Aug 23 13:19:42 2016 New Revision: 304676 URL: https://svnweb.freebsd.org/changeset/base/304676 Log: Fix calloc(3) argument order. MFC after:4 weeks. Modified: head/usr.sbin/fifolog/lib/fifolog_int.c head/usr.sbin/fifolog/lib/fifolog_reader.c Modified: head/usr.sbin/fifolog/lib/fifolog_int.c == --- head/usr.sbin/fifolog/lib/fifolog_int.c Tue Aug 23 12:22:35 2016 (r304675) +++ head/usr.sbin/fifolog/lib/fifolog_int.c Tue Aug 23 13:19:42 2016 (r304676) @@ -125,7 +125,7 @@ fifolog_int_open_i(struct fifolog_file * /* Initialize zlib handling */ - f->zs = calloc(sizeof *f->zs, 1); + f->zs = calloc(1, sizeof(*f->zs)); if (f->zs == NULL) return ("cannot malloc"); Modified: head/usr.sbin/fifolog/lib/fifolog_reader.c == --- head/usr.sbin/fifolog/lib/fifolog_reader.c Tue Aug 23 12:22:35 2016 (r304675) +++ head/usr.sbin/fifolog/lib/fifolog_reader.c Tue Aug 23 13:19:42 2016 (r304676) @@ -59,7 +59,7 @@ fifolog_reader_open(const char *fname) struct fifolog_reader *fr; int i; - fr = calloc(sizeof *fr, 1); + fr = calloc(1, sizeof(*fr)); if (fr == NULL) err(1, "Cannot malloc"); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r304321 - in head/sys: boot/efi/boot1 boot/efi/loader boot/i386/boot2 boot/i386/gptboot boot/i386/gptzfsboot boot/i386/zfsboot boot/userboot/ficl boot/userboot/userboot boot/userboot/z
On Tue, Aug 23, 2016 at 03:26:04PM +0300, Toomas Soome wrote: > > Main trouble (by kib@) is 640KB real mode limit. > > Separated heap don't soled this. > > May be solution is early switch to protected mode, boot2? > > hm, but boot2 is already btx client and btx is setting up the > protected mode. Only zfsboot/gpt[zfs]boot memory copy (boot2 > relocator) is working in segmented real mode, so the gptldr.S and > zfsldr.S has to deal with memory segments to set boot2 up. Or did > got you wrong? Mat be I am wrong. May be I am not very clean. As I understund kib@ restriction caused by 640KB realmode limit. In case of boot2 start in real mode and read enterly by boot1 -- we also touch this trouble. How to resolve this: 1) start entirely; boot2 in protected mode and read all boot2 to extended memory 2) read only part of boot2 (boot2 relocator) by boot1 and switch to protected mode before reading rest of boot2 by boot2 code. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304675 - releng/11.0/sys/ufs/ffs
Author: kib Date: Tue Aug 23 12:22:35 2016 New Revision: 304675 URL: https://svnweb.freebsd.org/changeset/base/304675 Log: MFC r304232: In UFS_BALLOC(), invalidate pages of indirect buffers on failed block allocation unwinding. Approved by: re (gjb) Modified: releng/11.0/sys/ufs/ffs/ffs_balloc.c Directory Properties: releng/11.0/ (props changed) Modified: releng/11.0/sys/ufs/ffs/ffs_balloc.c == --- releng/11.0/sys/ufs/ffs/ffs_balloc.cTue Aug 23 10:40:53 2016 (r304674) +++ releng/11.0/sys/ufs/ffs/ffs_balloc.cTue Aug 23 12:22:35 2016 (r304675) @@ -480,8 +480,8 @@ fail: */ bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0, GB_NOCREAT); if (bp != NULL) { - bp->b_flags |= (B_INVAL | B_RELBUF); - bp->b_flags &= ~B_ASYNC; + bp->b_flags |= B_INVAL | B_RELBUF | B_NOCACHE; + bp->b_flags &= ~(B_ASYNC | B_CACHE); brelse(bp); } deallocated += fs->fs_bsize; @@ -1051,8 +1051,8 @@ fail: */ bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0, GB_NOCREAT); if (bp != NULL) { - bp->b_flags |= (B_INVAL | B_RELBUF); - bp->b_flags &= ~B_ASYNC; + bp->b_flags |= B_INVAL | B_RELBUF | B_NOCACHE; + bp->b_flags &= ~(B_ASYNC | B_CACHE); brelse(bp); } deallocated += fs->fs_bsize; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r304321 - in head/sys: boot/efi/boot1 boot/efi/loader boot/i386/boot2 boot/i386/gptboot boot/i386/gptzfsboot boot/i386/zfsboot boot/userboot/ficl boot/userboot/userboot boot/userboot/z
> On 23. aug 2016, at 15:16, Slawa Olhovchenkovwrote: > > On Tue, Aug 23, 2016 at 03:00:32PM +0300, Toomas Soome wrote: > >> >>> On 23. aug 2016, at 14:29, Slawa Olhovchenkov wrote: >>> >>> On Tue, Aug 23, 2016 at 11:05:47AM +0300, Toomas Soome wrote: >>> > On 22. aug 2016, at 17:56, Toomas Soome wrote: > > >> On 22. aug 2016, at 17:19, Warner Losh wrote: >> >> On Mon, Aug 22, 2016 at 3:44 AM, Toomas Soome wrote: >>> I do suspect the size difference there is partially due to ficl, in >>> illumos (ficl 4): >>> >>> -rw-r--r-- 1 tsoome staff 132508 aug 22 09:18 libficl.a >>> >>> and freebsd (ficl 3): >>> >>> -rw-r--r-- 1 root wheel 213748 Aug 19 01:57 libficl.a >>> >>> so, there definitely is some space… >> >> Same compiler? Clang bloats the boot code rather substantially, even >> after >> all the flags to tell it to generate smaller code are used. gcc 4.2.x >> built stuff >> was substantially smaller. >> >> There's a 520kb limit enforced in the boot1 for similar reasons. Looks >> like >> the combination of options makes us use just enough extra memory to >> sink the battleship... >> >> Warner >> > > > Actually I only now realized I was comparing apples with oranges… I > forgot the fbsd builds 32bit version in ficl32, this one is 64bit. and > yes the 32bit version is not that big at all:D > > Also, after done some digging, I have found few instances of duplicated > code (we can share sha2 with geli and so if sha512 is already needed, it > will become another “free lunch”). Also, unless I’m mistaken, for some > reason the bzip *compression* is brought in - correct me if I’m wrong, > but afaik only decompression is needed… > > So before going after “useless features”, there are some “hidden” > resources to remove extra fat. > I did some more digging. while ld has —gc-sections to clean up unused bits, to make it effective, the code build does also need -Os -fdata-sections -ffunction-sections. So I did just very simple test by adding those flags to bsd.stand.mk and: first the “default” binaries from /boot: -r-xr-xr-x 1 root wheel 446464 Aug 19 08:46 /boot/zfsloader -rw-r--r-- 1 root wheel 438272 Aug 23 00:30 /boot/zfsloader.b -r-xr-xr-x 1 root wheel 446464 Aug 5 08:37 /boot/zfsloader.old -r--r--r-- 1 root wheel 406568 Aug 19 08:46 /boot/userboot.so (note, zfsloader.b here is built with https://reviews.freebsd.org/D7600) now after adding compile flags -Os -fdata-sections -ffunction-sections: -rw-r--r-- 1 root wheel 389120 Aug 23 10:12 zfsloader -rwxr-xr-x 1 root wheel 378156 Aug 23 10:12 zfsloader.bin -rwxr-xr-x 1 root wheel 437514 Aug 23 10:12 zfsloader.sym -rwxr-xr-x 1 root wheel 375912 Aug 23 10:03 userboot.so and finally test for Andriy with: LOADER_BZIP2_SUPPORT=yes LOADER_FIREWIRE_SUPPORT=yes -rw-r--r-- 1 root wheel 421888 Aug 23 10:22 zfsloader -rwxr-xr-x 1 root wheel 409932 Aug 23 10:22 zfsloader.bin -rwxr-xr-x 1 root wheel 472021 Aug 23 10:22 zfsloader.sym -rwxr-xr-x 1 root wheel 375912 Aug 23 10:22 userboot.so note the userboot.so did not change from those flags. This is just an result from compile, and by adding 3 options to bsd.stand.mk; however, not all Makefiles in loader tree seem to include it, and most importantly, haven’t tested real boot yet;) To conclude, some more work is needed to review the Makefiles, build options used etc, also I don’t know all the background why the compiler options are set as they currently are - were there any related compiler/linker bugs, or any other reasons, also how/if other platforms are affected - for example bsd.stand.mk does set -Os for pc98, but not for others… >>> >>> This is only size on disk, memory consuming still same, IMHO. >> >> Actually this reduction above is entirely due to -Os, the —gc-sections is >> not passed to linker (at least for zfsloader case). I think we will need >> linker script to preserve set_Xcommand_set linker set to use —gc-sections >> with ld. >> >> Loader heap is separate already and does not contribute to this issue. Also, >> I already did test the boot with thinned zfsloader, both with and without >> bzip2 are appearing to work, at least for this quick test anyhow. > > Main trouble (by kib@) is 640KB real mode limit. > Separated heap don't soled this. > May be solution is early switch to protected mode, boot2? hm, but boot2 is already btx client and btx is setting up the protected mode. Only zfsboot/gpt[zfs]boot memory copy (boot2 relocator) is
Re: svn commit: r304321 - in head/sys: boot/efi/boot1 boot/efi/loader boot/i386/boot2 boot/i386/gptboot boot/i386/gptzfsboot boot/i386/zfsboot boot/userboot/ficl boot/userboot/userboot boot/userboot/z
On Tue, Aug 23, 2016 at 03:00:32PM +0300, Toomas Soome wrote: > > > On 23. aug 2016, at 14:29, Slawa Olhovchenkovwrote: > > > > On Tue, Aug 23, 2016 at 11:05:47AM +0300, Toomas Soome wrote: > > > >> > >>> On 22. aug 2016, at 17:56, Toomas Soome wrote: > >>> > >>> > On 22. aug 2016, at 17:19, Warner Losh wrote: > > On Mon, Aug 22, 2016 at 3:44 AM, Toomas Soome wrote: > > I do suspect the size difference there is partially due to ficl, in > > illumos (ficl 4): > > > > -rw-r--r-- 1 tsoome staff 132508 aug 22 09:18 libficl.a > > > > and freebsd (ficl 3): > > > > -rw-r--r-- 1 root wheel 213748 Aug 19 01:57 libficl.a > > > > so, there definitely is some space… > > Same compiler? Clang bloats the boot code rather substantially, even > after > all the flags to tell it to generate smaller code are used. gcc 4.2.x > built stuff > was substantially smaller. > > There's a 520kb limit enforced in the boot1 for similar reasons. Looks > like > the combination of options makes us use just enough extra memory to > sink the battleship... > > Warner > > >>> > >>> > >>> Actually I only now realized I was comparing apples with oranges… I > >>> forgot the fbsd builds 32bit version in ficl32, this one is 64bit. and > >>> yes the 32bit version is not that big at all:D > >>> > >>> Also, after done some digging, I have found few instances of duplicated > >>> code (we can share sha2 with geli and so if sha512 is already needed, it > >>> will become another “free lunch”). Also, unless I’m mistaken, for some > >>> reason the bzip *compression* is brought in - correct me if I’m wrong, > >>> but afaik only decompression is needed… > >>> > >>> So before going after “useless features”, there are some “hidden” > >>> resources to remove extra fat. > >>> > >> > >> I did some more digging. while ld has —gc-sections to clean up unused > >> bits, to make it effective, the code build does also need -Os > >> -fdata-sections -ffunction-sections. > >> So I did just very simple test by adding those flags to bsd.stand.mk and: > >> > >> first the “default” binaries from /boot: > >> -r-xr-xr-x 1 root wheel 446464 Aug 19 08:46 /boot/zfsloader > >> -rw-r--r-- 1 root wheel 438272 Aug 23 00:30 /boot/zfsloader.b > >> -r-xr-xr-x 1 root wheel 446464 Aug 5 08:37 /boot/zfsloader.old > >> -r--r--r-- 1 root wheel 406568 Aug 19 08:46 /boot/userboot.so > >> > >> (note, zfsloader.b here is built with https://reviews.freebsd.org/D7600) > >> > >> now after adding compile flags -Os -fdata-sections -ffunction-sections: > >> > >> -rw-r--r-- 1 root wheel 389120 Aug 23 10:12 zfsloader > >> -rwxr-xr-x 1 root wheel 378156 Aug 23 10:12 zfsloader.bin > >> -rwxr-xr-x 1 root wheel 437514 Aug 23 10:12 zfsloader.sym > >> -rwxr-xr-x 1 root wheel 375912 Aug 23 10:03 userboot.so > >> > >> and finally test for Andriy with: > >> LOADER_BZIP2_SUPPORT=yes > >> LOADER_FIREWIRE_SUPPORT=yes > >> > >> -rw-r--r-- 1 root wheel 421888 Aug 23 10:22 zfsloader > >> -rwxr-xr-x 1 root wheel 409932 Aug 23 10:22 zfsloader.bin > >> -rwxr-xr-x 1 root wheel 472021 Aug 23 10:22 zfsloader.sym > >> -rwxr-xr-x 1 root wheel 375912 Aug 23 10:22 userboot.so > >> > >> note the userboot.so did not change from those flags. > >> > >> This is just an result from compile, and by adding 3 options to > >> bsd.stand.mk; however, not all Makefiles in loader tree seem to include > >> it, and most importantly, haven’t tested real boot yet;) > >> > >> To conclude, some more work is needed to review the Makefiles, build > >> options used etc, also I don’t know all the background why the compiler > >> options are set as they currently are - were there any related > >> compiler/linker bugs, or any other reasons, also how/if other platforms > >> are affected - for example bsd.stand.mk does set -Os for pc98, but not for > >> others… > > > > This is only size on disk, memory consuming still same, IMHO. > > Actually this reduction above is entirely due to -Os, the —gc-sections is not > passed to linker (at least for zfsloader case). I think we will need linker > script to preserve set_Xcommand_set linker set to use —gc-sections with ld. > > Loader heap is separate already and does not contribute to this issue. Also, > I already did test the boot with thinned zfsloader, both with and without > bzip2 are appearing to work, at least for this quick test anyhow. Main trouble (by kib@) is 640KB real mode limit. Separated heap don't soled this. May be solution is early switch to protected mode, boot2? ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r304321 - in head/sys: boot/efi/boot1 boot/efi/loader boot/i386/boot2 boot/i386/gptboot boot/i386/gptzfsboot boot/i386/zfsboot boot/userboot/ficl boot/userboot/userboot boot/userboot/z
> On 23. aug 2016, at 14:29, Slawa Olhovchenkovwrote: > > On Tue, Aug 23, 2016 at 11:05:47AM +0300, Toomas Soome wrote: > >> >>> On 22. aug 2016, at 17:56, Toomas Soome wrote: >>> >>> On 22. aug 2016, at 17:19, Warner Losh wrote: On Mon, Aug 22, 2016 at 3:44 AM, Toomas Soome wrote: > I do suspect the size difference there is partially due to ficl, in > illumos (ficl 4): > > -rw-r--r-- 1 tsoome staff 132508 aug 22 09:18 libficl.a > > and freebsd (ficl 3): > > -rw-r--r-- 1 root wheel 213748 Aug 19 01:57 libficl.a > > so, there definitely is some space… Same compiler? Clang bloats the boot code rather substantially, even after all the flags to tell it to generate smaller code are used. gcc 4.2.x built stuff was substantially smaller. There's a 520kb limit enforced in the boot1 for similar reasons. Looks like the combination of options makes us use just enough extra memory to sink the battleship... Warner >>> >>> >>> Actually I only now realized I was comparing apples with oranges… I forgot >>> the fbsd builds 32bit version in ficl32, this one is 64bit. and yes the >>> 32bit version is not that big at all:D >>> >>> Also, after done some digging, I have found few instances of duplicated >>> code (we can share sha2 with geli and so if sha512 is already needed, it >>> will become another “free lunch”). Also, unless I’m mistaken, for some >>> reason the bzip *compression* is brought in - correct me if I’m wrong, but >>> afaik only decompression is needed… >>> >>> So before going after “useless features”, there are some “hidden” resources >>> to remove extra fat. >>> >> >> I did some more digging. while ld has —gc-sections to clean up unused bits, >> to make it effective, the code build does also need -Os -fdata-sections >> -ffunction-sections. >> So I did just very simple test by adding those flags to bsd.stand.mk and: >> >> first the “default” binaries from /boot: >> -r-xr-xr-x 1 root wheel 446464 Aug 19 08:46 /boot/zfsloader >> -rw-r--r-- 1 root wheel 438272 Aug 23 00:30 /boot/zfsloader.b >> -r-xr-xr-x 1 root wheel 446464 Aug 5 08:37 /boot/zfsloader.old >> -r--r--r-- 1 root wheel 406568 Aug 19 08:46 /boot/userboot.so >> >> (note, zfsloader.b here is built with https://reviews.freebsd.org/D7600) >> >> now after adding compile flags -Os -fdata-sections -ffunction-sections: >> >> -rw-r--r-- 1 root wheel 389120 Aug 23 10:12 zfsloader >> -rwxr-xr-x 1 root wheel 378156 Aug 23 10:12 zfsloader.bin >> -rwxr-xr-x 1 root wheel 437514 Aug 23 10:12 zfsloader.sym >> -rwxr-xr-x 1 root wheel 375912 Aug 23 10:03 userboot.so >> >> and finally test for Andriy with: >> LOADER_BZIP2_SUPPORT=yes >> LOADER_FIREWIRE_SUPPORT=yes >> >> -rw-r--r-- 1 root wheel 421888 Aug 23 10:22 zfsloader >> -rwxr-xr-x 1 root wheel 409932 Aug 23 10:22 zfsloader.bin >> -rwxr-xr-x 1 root wheel 472021 Aug 23 10:22 zfsloader.sym >> -rwxr-xr-x 1 root wheel 375912 Aug 23 10:22 userboot.so >> >> note the userboot.so did not change from those flags. >> >> This is just an result from compile, and by adding 3 options to >> bsd.stand.mk; however, not all Makefiles in loader tree seem to include it, >> and most importantly, haven’t tested real boot yet;) >> >> To conclude, some more work is needed to review the Makefiles, build options >> used etc, also I don’t know all the background why the compiler options are >> set as they currently are - were there any related compiler/linker bugs, or >> any other reasons, also how/if other platforms are affected - for example >> bsd.stand.mk does set -Os for pc98, but not for others… > > This is only size on disk, memory consuming still same, IMHO. Actually this reduction above is entirely due to -Os, the —gc-sections is not passed to linker (at least for zfsloader case). I think we will need linker script to preserve set_Xcommand_set linker set to use —gc-sections with ld. Loader heap is separate already and does not contribute to this issue. Also, I already did test the boot with thinned zfsloader, both with and without bzip2 are appearing to work, at least for this quick test anyhow. rgds, toomas ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r304321 - in head/sys: boot/efi/boot1 boot/efi/loader boot/i386/boot2 boot/i386/gptboot boot/i386/gptzfsboot boot/i386/zfsboot boot/userboot/ficl boot/userboot/userboot boot/userboot/z
On Tue, Aug 23, 2016 at 11:05:47AM +0300, Toomas Soome wrote: > > > On 22. aug 2016, at 17:56, Toomas Soomewrote: > > > > > >> On 22. aug 2016, at 17:19, Warner Losh wrote: > >> > >> On Mon, Aug 22, 2016 at 3:44 AM, Toomas Soome wrote: > >>> I do suspect the size difference there is partially due to ficl, in > >>> illumos (ficl 4): > >>> > >>> -rw-r--r-- 1 tsoome staff 132508 aug 22 09:18 libficl.a > >>> > >>> and freebsd (ficl 3): > >>> > >>> -rw-r--r-- 1 root wheel 213748 Aug 19 01:57 libficl.a > >>> > >>> so, there definitely is some space… > >> > >> Same compiler? Clang bloats the boot code rather substantially, even after > >> all the flags to tell it to generate smaller code are used. gcc 4.2.x > >> built stuff > >> was substantially smaller. > >> > >> There's a 520kb limit enforced in the boot1 for similar reasons. Looks like > >> the combination of options makes us use just enough extra memory to > >> sink the battleship... > >> > >> Warner > >> > > > > > > Actually I only now realized I was comparing apples with oranges… I forgot > > the fbsd builds 32bit version in ficl32, this one is 64bit. and yes the > > 32bit version is not that big at all:D > > > > Also, after done some digging, I have found few instances of duplicated > > code (we can share sha2 with geli and so if sha512 is already needed, it > > will become another “free lunch”). Also, unless I’m mistaken, for some > > reason the bzip *compression* is brought in - correct me if I’m wrong, but > > afaik only decompression is needed… > > > > So before going after “useless features”, there are some “hidden” resources > > to remove extra fat. > > > > I did some more digging. while ld has —gc-sections to clean up unused bits, > to make it effective, the code build does also need -Os -fdata-sections > -ffunction-sections. > So I did just very simple test by adding those flags to bsd.stand.mk and: > > first the “default” binaries from /boot: > -r-xr-xr-x 1 root wheel 446464 Aug 19 08:46 /boot/zfsloader > -rw-r--r-- 1 root wheel 438272 Aug 23 00:30 /boot/zfsloader.b > -r-xr-xr-x 1 root wheel 446464 Aug 5 08:37 /boot/zfsloader.old > -r--r--r-- 1 root wheel 406568 Aug 19 08:46 /boot/userboot.so > > (note, zfsloader.b here is built with https://reviews.freebsd.org/D7600) > > now after adding compile flags -Os -fdata-sections -ffunction-sections: > > -rw-r--r-- 1 root wheel 389120 Aug 23 10:12 zfsloader > -rwxr-xr-x 1 root wheel 378156 Aug 23 10:12 zfsloader.bin > -rwxr-xr-x 1 root wheel 437514 Aug 23 10:12 zfsloader.sym > -rwxr-xr-x 1 root wheel 375912 Aug 23 10:03 userboot.so > > and finally test for Andriy with: > LOADER_BZIP2_SUPPORT=yes > LOADER_FIREWIRE_SUPPORT=yes > > -rw-r--r-- 1 root wheel 421888 Aug 23 10:22 zfsloader > -rwxr-xr-x 1 root wheel 409932 Aug 23 10:22 zfsloader.bin > -rwxr-xr-x 1 root wheel 472021 Aug 23 10:22 zfsloader.sym > -rwxr-xr-x 1 root wheel 375912 Aug 23 10:22 userboot.so > > note the userboot.so did not change from those flags. > > This is just an result from compile, and by adding 3 options to bsd.stand.mk; > however, not all Makefiles in loader tree seem to include it, and most > importantly, haven’t tested real boot yet;) > > To conclude, some more work is needed to review the Makefiles, build options > used etc, also I don’t know all the background why the compiler options are > set as they currently are - were there any related compiler/linker bugs, or > any other reasons, also how/if other platforms are affected - for example > bsd.stand.mk does set -Os for pc98, but not for others… This is only size on disk, memory consuming still same, IMHO. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304674 - head/sys/dev/intpm
Author: avg Date: Tue Aug 23 10:40:53 2016 New Revision: 304674 URL: https://svnweb.freebsd.org/changeset/base/304674 Log: intpm: add support for SB800 This code should be able to support later AMD chipsets as well, but that hasn't been tested. SB800 supports accessing several different SMBus buses using the same set of constrol registeirs plus special PMIO registers that control which bus is selected. This could be exposed to consumers as several smb devices each talking to its bus. This feature is not implemented yet. MFC after:2 weeks Modified: head/sys/dev/intpm/intpm.c Modified: head/sys/dev/intpm/intpm.c == --- head/sys/dev/intpm/intpm.c Tue Aug 23 08:13:08 2016(r304673) +++ head/sys/dev/intpm/intpm.c Tue Aug 23 10:40:53 2016(r304674) @@ -52,8 +52,10 @@ struct intsmb_softc { struct resource *irq_res; void*irq_hand; device_tsmbus; + int io_rid; int isbusy; int cfg_irq9; + int sb8xx; int poll; struct mtx lock; }; @@ -102,10 +104,8 @@ intsmb_probe(device_t dev) device_set_desc(dev, "ATI IXP400 SMBus Controller"); break; case 0x43851002: - /* SB800 and newer can not be configured in a compatible way. */ - if (pci_get_revid(dev) >= 0x40) - return (ENXIO); - device_set_desc(dev, "AMD SB600/700/710/750 SMBus Controller"); + case 0x780b1022:/* AMD Hudson */ + device_set_desc(dev, "AMD SB600/7xx/8xx SMBus Controller"); /* XXX Maybe force polling right here? */ break; default: @@ -115,6 +115,87 @@ intsmb_probe(device_t dev) return (BUS_PROBE_DEFAULT); } +static uint8_t +sb8xx_pmio_read(struct resource *res, uint8_t reg) +{ + bus_write_1(res, 0, reg); /* Index */ + return (bus_read_1(res, 1));/* Data */ +} + +static int +sb8xx_attach(device_t dev) +{ + static const intAMDSB_PMIO_INDEX = 0xcd6; + static const intAMDSB_PMIO_WIDTH = 2; + static const intAMDSB8_SMBUS_ADDR = 0x2c; + static const intAMDSB8_SMBUS_EN = 0x01; + static const intAMDSB8_SMBUS_ADDR_MASK = ~0x1fu; + static const intAMDSB_SMBIO_WIDTH = 0x14; + static const intAMDSB_SMBUS_CFG = 0x10; + static const intAMDSB_SMBUS_IRQ = 0x01; + static const intAMDSB_SMBUS_REV_MASK = ~0x0fu; + static const intAMDSB_SMBUS_REV_SHIFT = 4; + static const intAMDSB_IO_RID = 0; + + struct intsmb_softc *sc; + struct resource *res; + uint16_taddr; + uint8_t cfg; + int rid; + int rc; + + sc = device_get_softc(dev); + rid = AMDSB_IO_RID; + rc = bus_set_resource(dev, SYS_RES_IOPORT, rid, AMDSB_PMIO_INDEX, + AMDSB_PMIO_WIDTH); + if (rc != 0) { + device_printf(dev, "bus_set_resource for PM IO failed\n"); + return (ENXIO); + } + res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, , + RF_ACTIVE | RF_SHAREABLE); + if (res == NULL) { + device_printf(dev, "bus_alloc_resource for PM IO failed\n"); + return (ENXIO); + } + + addr = sb8xx_pmio_read(res, AMDSB8_SMBUS_ADDR + 1); + addr <<= 8; + addr |= sb8xx_pmio_read(res, AMDSB8_SMBUS_ADDR); + + bus_release_resource(dev, SYS_RES_IOPORT, rid, res); + bus_delete_resource(dev, SYS_RES_IOPORT, rid); + + if ((addr & AMDSB8_SMBUS_EN) == 0) { + device_printf(dev, "SB8xx SMBus not enabled\n"); + return (ENXIO); + } + + addr &= AMDSB8_SMBUS_ADDR_MASK; + sc->io_rid = AMDSB_IO_RID; + rc = bus_set_resource(dev, SYS_RES_IOPORT, sc->io_rid, addr, + AMDSB_SMBIO_WIDTH); + if (rc != 0) { + device_printf(dev, "bus_set_resource for SMBus IO failed\n"); + return (ENXIO); + } + if (res == NULL) { + device_printf(dev, "bus_alloc_resource for SMBus IO failed\n"); + return (ENXIO); + } + sc->io_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, >io_rid, + RF_ACTIVE | RF_SHAREABLE); + cfg = bus_read_1(sc->io_res, AMDSB_SMBUS_CFG); + + sc->poll = 1; + device_printf(dev, "intr %s disabled ", + (cfg & AMDSB_SMBUS_IRQ) != 0 ? "IRQ" : "SMI"); + printf("revision %d\n", + (cfg & AMDSB_SMBUS_REV_MASK) >> AMDSB_SMBUS_REV_SHIFT); + + return (0); +} +
Re: svn commit: r304321 - in head/sys: boot/efi/boot1 boot/efi/loader boot/i386/boot2 boot/i386/gptboot boot/i386/gptzfsboot boot/i386/zfsboot boot/userboot/ficl boot/userboot/userboot boot/userboot/z
> On 23. aug 2016, at 11:22, Andriy Gaponwrote: > > On 22/08/2016 17:56, Toomas Soome wrote: >> Actually I only now realized I was comparing apples with oranges… I forgot >> the fbsd builds 32bit version in ficl32, this one is 64bit. and yes the 32bit >> version is not that big at all:D >> >> Also, after done some digging, I have found few instances of duplicated code >> (we can share sha2 with geli and so if sha512 is already needed, it will >> become another “free lunch”). Also, unless I’m mistaken, for some reason the >> bzip *compression* is brought in - correct me if I’m wrong, but afaik only >> decompression is needed… >> >> So before going after “useless features”, there are some “hidden” resources >> to remove extra fat. > > I certainly agree with this and those things would be good to do. > But if we do not change the trend then sooner or later we will run out of > things > that we can optimize. But it's also possible that the current limitations > will > be a history by then. > > -- > Andriy Gapon Yes, also from my illumos work, even building framebuffer based GFX interface haven’t added too much extra code, but it is important to recognize the limits, and this issue did provide really good lesson about it;) Right now there are two tasks to finalize - complete the review/test/fix for proper compiler options, and to understand the actual limits regarding userboot module - for me it is absolutely unknown area. rgds, toomas ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r304321 - in head/sys: boot/efi/boot1 boot/efi/loader boot/i386/boot2 boot/i386/gptboot boot/i386/gptzfsboot boot/i386/zfsboot boot/userboot/ficl boot/userboot/userboot boot/userboot/z
On 22/08/2016 17:56, Toomas Soome wrote: > Actually I only now realized I was comparing apples with oranges… I forgot > the fbsd builds 32bit version in ficl32, this one is 64bit. and yes the 32bit > version is not that big at all:D > > Also, after done some digging, I have found few instances of duplicated code > (we can share sha2 with geli and so if sha512 is already needed, it will > become another “free lunch”). Also, unless I’m mistaken, for some reason the > bzip *compression* is brought in - correct me if I’m wrong, but afaik only > decompression is needed… > > So before going after “useless features”, there are some “hidden” resources > to remove extra fat. I certainly agree with this and those things would be good to do. But if we do not change the trend then sooner or later we will run out of things that we can optimize. But it's also possible that the current limitations will be a history by then. -- Andriy Gapon ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304673 - stable/9/sys/ufs/ffs
Author: kib Date: Tue Aug 23 08:13:08 2016 New Revision: 304673 URL: https://svnweb.freebsd.org/changeset/base/304673 Log: MFC r304232: In UFS_BALLOC(), invalidate pages of indirect buffers on failed block allocation unwinding. Modified: stable/9/sys/ufs/ffs/ffs_balloc.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/ufs/ffs/ffs_balloc.c == --- stable/9/sys/ufs/ffs/ffs_balloc.c Tue Aug 23 07:55:32 2016 (r304672) +++ stable/9/sys/ufs/ffs/ffs_balloc.c Tue Aug 23 08:13:08 2016 (r304673) @@ -478,8 +478,8 @@ fail: */ bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0, GB_NOCREAT); if (bp != NULL) { - bp->b_flags |= (B_INVAL | B_RELBUF); - bp->b_flags &= ~B_ASYNC; + bp->b_flags |= B_INVAL | B_RELBUF | B_NOCACHE; + bp->b_flags &= ~(B_ASYNC | B_CACHE); brelse(bp); } deallocated += fs->fs_bsize; @@ -1047,8 +1047,8 @@ fail: */ bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0, GB_NOCREAT); if (bp != NULL) { - bp->b_flags |= (B_INVAL | B_RELBUF); - bp->b_flags &= ~B_ASYNC; + bp->b_flags |= B_INVAL | B_RELBUF | B_NOCACHE; + bp->b_flags &= ~(B_ASYNC | B_CACHE); brelse(bp); } deallocated += fs->fs_bsize; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r304321 - in head/sys: boot/efi/boot1 boot/efi/loader boot/i386/boot2 boot/i386/gptboot boot/i386/gptzfsboot boot/i386/zfsboot boot/userboot/ficl boot/userboot/userboot boot/userboot/z
> On 22. aug 2016, at 17:56, Toomas Soomewrote: > > >> On 22. aug 2016, at 17:19, Warner Losh wrote: >> >> On Mon, Aug 22, 2016 at 3:44 AM, Toomas Soome wrote: >>> I do suspect the size difference there is partially due to ficl, in illumos >>> (ficl 4): >>> >>> -rw-r--r-- 1 tsoome staff 132508 aug 22 09:18 libficl.a >>> >>> and freebsd (ficl 3): >>> >>> -rw-r--r-- 1 root wheel 213748 Aug 19 01:57 libficl.a >>> >>> so, there definitely is some space… >> >> Same compiler? Clang bloats the boot code rather substantially, even after >> all the flags to tell it to generate smaller code are used. gcc 4.2.x >> built stuff >> was substantially smaller. >> >> There's a 520kb limit enforced in the boot1 for similar reasons. Looks like >> the combination of options makes us use just enough extra memory to >> sink the battleship... >> >> Warner >> > > > Actually I only now realized I was comparing apples with oranges… I forgot > the fbsd builds 32bit version in ficl32, this one is 64bit. and yes the 32bit > version is not that big at all:D > > Also, after done some digging, I have found few instances of duplicated code > (we can share sha2 with geli and so if sha512 is already needed, it will > become another “free lunch”). Also, unless I’m mistaken, for some reason the > bzip *compression* is brought in - correct me if I’m wrong, but afaik only > decompression is needed… > > So before going after “useless features”, there are some “hidden” resources > to remove extra fat. > I did some more digging. while ld has —gc-sections to clean up unused bits, to make it effective, the code build does also need -Os -fdata-sections -ffunction-sections. So I did just very simple test by adding those flags to bsd.stand.mk and: first the “default” binaries from /boot: -r-xr-xr-x 1 root wheel 446464 Aug 19 08:46 /boot/zfsloader -rw-r--r-- 1 root wheel 438272 Aug 23 00:30 /boot/zfsloader.b -r-xr-xr-x 1 root wheel 446464 Aug 5 08:37 /boot/zfsloader.old -r--r--r-- 1 root wheel 406568 Aug 19 08:46 /boot/userboot.so (note, zfsloader.b here is built with https://reviews.freebsd.org/D7600) now after adding compile flags -Os -fdata-sections -ffunction-sections: -rw-r--r-- 1 root wheel 389120 Aug 23 10:12 zfsloader -rwxr-xr-x 1 root wheel 378156 Aug 23 10:12 zfsloader.bin -rwxr-xr-x 1 root wheel 437514 Aug 23 10:12 zfsloader.sym -rwxr-xr-x 1 root wheel 375912 Aug 23 10:03 userboot.so and finally test for Andriy with: LOADER_BZIP2_SUPPORT=yes LOADER_FIREWIRE_SUPPORT=yes -rw-r--r-- 1 root wheel 421888 Aug 23 10:22 zfsloader -rwxr-xr-x 1 root wheel 409932 Aug 23 10:22 zfsloader.bin -rwxr-xr-x 1 root wheel 472021 Aug 23 10:22 zfsloader.sym -rwxr-xr-x 1 root wheel 375912 Aug 23 10:22 userboot.so note the userboot.so did not change from those flags. This is just an result from compile, and by adding 3 options to bsd.stand.mk; however, not all Makefiles in loader tree seem to include it, and most importantly, haven’t tested real boot yet;) To conclude, some more work is needed to review the Makefiles, build options used etc, also I don’t know all the background why the compiler options are set as they currently are - were there any related compiler/linker bugs, or any other reasons, also how/if other platforms are affected - for example bsd.stand.mk does set -Os for pc98, but not for others… rgds, toomas ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304672 - stable/10/sys/ufs/ffs
Author: kib Date: Tue Aug 23 07:55:32 2016 New Revision: 304672 URL: https://svnweb.freebsd.org/changeset/base/304672 Log: MFC r304232: In UFS_BALLOC(), invalidate pages of indirect buffers on failed block allocation unwinding. Modified: stable/10/sys/ufs/ffs/ffs_balloc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ffs/ffs_balloc.c == --- stable/10/sys/ufs/ffs/ffs_balloc.c Tue Aug 23 07:55:05 2016 (r304671) +++ stable/10/sys/ufs/ffs/ffs_balloc.c Tue Aug 23 07:55:32 2016 (r304672) @@ -492,8 +492,8 @@ fail: (intmax_t)bp->b_lblkno, (uintmax_t)*lbns_remfree, (uintmax_t)bp->b_blkno, (uintmax_t)fsbtodb(fs, *blkp))); - bp->b_flags |= (B_INVAL | B_RELBUF); - bp->b_flags &= ~B_ASYNC; + bp->b_flags |= B_INVAL | B_RELBUF | B_NOCACHE; + bp->b_flags &= ~(B_ASYNC | B_CACHE); brelse(bp); } deallocated += fs->fs_bsize; @@ -1087,8 +1087,8 @@ fail: (intmax_t)bp->b_lblkno, (uintmax_t)*lbns_remfree, (uintmax_t)bp->b_blkno, (uintmax_t)fsbtodb(fs, *blkp))); - bp->b_flags |= (B_INVAL | B_RELBUF); - bp->b_flags &= ~B_ASYNC; + bp->b_flags |= B_INVAL | B_RELBUF | B_NOCACHE; + bp->b_flags &= ~(B_ASYNC | B_CACHE); brelse(bp); } deallocated += fs->fs_bsize; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304671 - in stable/10/sys/cddl: compat/opensolaris/sys contrib/opensolaris/uts/common/fs/zfs contrib/opensolaris/uts/common/fs/zfs/sys
Author: avg Date: Tue Aug 23 07:55:05 2016 New Revision: 304671 URL: https://svnweb.freebsd.org/changeset/base/304671 Log: MFC r303763,303791,303869: zfs: honour and make use of vfs vnode locking protocol PR: 209158 Modified: stable/10/sys/cddl/compat/opensolaris/sys/vnode.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_dir.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_sa.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/compat/opensolaris/sys/vnode.h == --- stable/10/sys/cddl/compat/opensolaris/sys/vnode.h Tue Aug 23 07:54:14 2016(r304670) +++ stable/10/sys/cddl/compat/opensolaris/sys/vnode.h Tue Aug 23 07:55:05 2016(r304671) @@ -87,8 +87,6 @@ vn_is_readonly(vnode_t *vp) #defineVN_RELE(v) vrele(v) #defineVN_URELE(v) vput(v) -#defineVOP_REALVP(vp, vpp, ct) (*(vpp) = (vp), 0) - #definevnevent_create(vp, ct) do { } while (0) #definevnevent_link(vp, ct)do { } while (0) #definevnevent_remove(vp, dvp, name, ct) do { } while (0) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_dir.h == --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_dir.h Tue Aug 23 07:54:14 2016(r304670) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_dir.h Tue Aug 23 07:55:05 2016(r304671) @@ -48,18 +48,18 @@ extern "C" { #defineIS_ROOT_NODE0x01/* create a root node */ #defineIS_XATTR0x02/* create an extended attribute node */ -extern int zfs_dirent_lock(zfs_dirlock_t **, znode_t *, char *, znode_t **, -int, int *, pathname_t *); -extern void zfs_dirent_unlock(zfs_dirlock_t *); -extern int zfs_link_create(zfs_dirlock_t *, znode_t *, dmu_tx_t *, int); -extern int zfs_link_destroy(zfs_dirlock_t *, znode_t *, dmu_tx_t *, int, +extern int zfs_dirent_lookup(znode_t *, const char *, znode_t **, int); +extern int zfs_link_create(znode_t *, const char *, znode_t *, dmu_tx_t *, int); +extern int zfs_link_destroy(znode_t *, const char *, znode_t *, dmu_tx_t *, int, boolean_t *); -extern int zfs_dirlook(znode_t *, char *, vnode_t **, int, int *, -pathname_t *); +#if 0 +extern int zfs_dirlook(vnode_t *, const char *, vnode_t **, int); +#else +extern int zfs_dirlook(znode_t *, const char *name, znode_t **); +#endif extern void zfs_mknode(znode_t *, vattr_t *, dmu_tx_t *, cred_t *, uint_t, znode_t **, zfs_acl_ids_t *); extern void zfs_rmnode(znode_t *); -extern void zfs_dl_name_switch(zfs_dirlock_t *dl, char *new, char **old); extern boolean_t zfs_dirempty(znode_t *); extern void zfs_unlinked_add(znode_t *, dmu_tx_t *); extern void zfs_unlinked_drain(zfsvfs_t *zfsvfs); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h == --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h Tue Aug 23 07:54:14 2016(r304670) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h Tue Aug 23 07:55:05 2016(r304671) @@ -75,6 +75,7 @@ struct zfsvfs { boolean_t z_use_fuids;/* version allows fuids */ boolean_t z_replay; /* set during ZIL replay */ boolean_t z_use_sa; /* version allow system attributes */ + boolean_t z_use_namecache;/* make use of FreeBSD name cache */ uint64_tz_version; /* ZPL version */ uint64_tz_shares_dir; /* hidden shares dir */ kmutex_tz_lock; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h == --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h Tue Aug 23 07:54:14 2016(r304670) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h Tue Aug 23 07:55:05 2016(r304671) @@ -181,10 +181,12 @@ typedef struct znode { struct zfsvfs *z_zfsvfs; vnode_t *z_vnode; uint64_tz_id; /* object ID for this
svn commit: r304670 - stable/10/sys/ufs/ffs
Author: kib Date: Tue Aug 23 07:54:14 2016 New Revision: 304670 URL: https://svnweb.freebsd.org/changeset/base/304670 Log: MFC r304231: On unwind after failed block allocation in ffs_balloc_ufs{1,2}, assert that recorded allocated blocks numbers match the physical block numbers of dandling buffers which are released. When finally freeing the blocks during unwind, assert that dandling buffers where not re-allocated. Modified: stable/10/sys/ufs/ffs/ffs_balloc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ffs/ffs_balloc.c == --- stable/10/sys/ufs/ffs/ffs_balloc.c Tue Aug 23 07:53:09 2016 (r304669) +++ stable/10/sys/ufs/ffs/ffs_balloc.c Tue Aug 23 07:54:14 2016 (r304670) @@ -487,6 +487,11 @@ fail: bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0, GB_NOCREAT | GB_UNMAPPED); if (bp != NULL) { + KASSERT(bp->b_blkno == fsbtodb(fs, *blkp), + ("mismatch1 l %jd %jd b %ju %ju", + (intmax_t)bp->b_lblkno, (uintmax_t)*lbns_remfree, + (uintmax_t)bp->b_blkno, + (uintmax_t)fsbtodb(fs, *blkp))); bp->b_flags |= (B_INVAL | B_RELBUF); bp->b_flags &= ~B_ASYNC; brelse(bp); @@ -531,6 +536,18 @@ fail: * cleared, free the blocks. */ for (blkp = allociblk; blkp < allocblk; blkp++) { +#ifdef INVARIANTS + if (blkp == allociblk) + lbns_remfree = lbns; + bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0, + GB_NOCREAT | GB_UNMAPPED); + if (bp != NULL) { + panic("zombie1 %jd %ju %ju", + (intmax_t)bp->b_lblkno, (uintmax_t)bp->b_blkno, + (uintmax_t)fsbtodb(fs, *blkp)); + } + lbns_remfree++; +#endif ffs_blkfree(ump, fs, ip->i_devvp, *blkp, fs->fs_bsize, ip->i_number, vp->v_type, NULL); } @@ -1065,6 +1082,11 @@ fail: bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0, GB_NOCREAT | GB_UNMAPPED); if (bp != NULL) { + KASSERT(bp->b_blkno == fsbtodb(fs, *blkp), + ("mismatch2 l %jd %jd b %ju %ju", + (intmax_t)bp->b_lblkno, (uintmax_t)*lbns_remfree, + (uintmax_t)bp->b_blkno, + (uintmax_t)fsbtodb(fs, *blkp))); bp->b_flags |= (B_INVAL | B_RELBUF); bp->b_flags &= ~B_ASYNC; brelse(bp); @@ -1109,6 +1131,18 @@ fail: * cleared, free the blocks. */ for (blkp = allociblk; blkp < allocblk; blkp++) { +#ifdef INVARIANTS + if (blkp == allociblk) + lbns_remfree = lbns; + bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0, + GB_NOCREAT | GB_UNMAPPED); + if (bp != NULL) { + panic("zombie2 %jd %ju %ju", + (intmax_t)bp->b_lblkno, (uintmax_t)bp->b_blkno, + (uintmax_t)fsbtodb(fs, *blkp)); + } + lbns_remfree++; +#endif ffs_blkfree(ump, fs, ip->i_devvp, *blkp, fs->fs_bsize, ip->i_number, vp->v_type, NULL); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304669 - stable/10/sys/ufs/ffs
Author: kib Date: Tue Aug 23 07:53:09 2016 New Revision: 304669 URL: https://svnweb.freebsd.org/changeset/base/304669 Log: MFC r304229: When looking up dandling buffers for unwing after failing block allocation in UFS_BALLOC(), there is no need to map them. Modified: stable/10/sys/ufs/ffs/ffs_balloc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ffs/ffs_balloc.c == --- stable/10/sys/ufs/ffs/ffs_balloc.c Tue Aug 23 07:52:07 2016 (r304668) +++ stable/10/sys/ufs/ffs/ffs_balloc.c Tue Aug 23 07:53:09 2016 (r304669) @@ -484,7 +484,8 @@ fail: * We shall not leave the freed blocks on the vnode * buffer object lists. */ - bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0, GB_NOCREAT); + bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0, + GB_NOCREAT | GB_UNMAPPED); if (bp != NULL) { bp->b_flags |= (B_INVAL | B_RELBUF); bp->b_flags &= ~B_ASYNC; @@ -1061,7 +1062,8 @@ fail: * We shall not leave the freed blocks on the vnode * buffer object lists. */ - bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0, GB_NOCREAT); + bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0, + GB_NOCREAT | GB_UNMAPPED); if (bp != NULL) { bp->b_flags |= (B_INVAL | B_RELBUF); bp->b_flags &= ~B_ASYNC; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304668 - stable/10/sys/ufs/ffs
Author: kib Date: Tue Aug 23 07:52:07 2016 New Revision: 304668 URL: https://svnweb.freebsd.org/changeset/base/304668 Log: MFC r304228: When block allocation fails in UFS_BALLOC(), and the volume does not have SU enabled, there is no point in calling softdep_request_cleanup(). Modified: stable/10/sys/ufs/ffs/ffs_balloc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ffs/ffs_balloc.c == --- stable/10/sys/ufs/ffs/ffs_balloc.c Tue Aug 23 07:51:00 2016 (r304667) +++ stable/10/sys/ufs/ffs/ffs_balloc.c Tue Aug 23 07:52:07 2016 (r304668) @@ -311,7 +311,7 @@ retry: if ((error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, flags | IO_BUFLOCKED, cred, )) != 0) { brelse(bp); - if (++reclaimed == 1) { + if (DOINGSOFTDEP(vp) && ++reclaimed == 1) { UFS_LOCK(ump); softdep_request_cleanup(fs, vp, cred, FLUSH_BLOCKS_WAIT); @@ -390,7 +390,7 @@ retry: flags | IO_BUFLOCKED, cred, ); if (error) { brelse(bp); - if (++reclaimed == 1) { + if (DOINGSOFTDEP(vp) && ++reclaimed == 1) { UFS_LOCK(ump); softdep_request_cleanup(fs, vp, cred, FLUSH_BLOCKS_WAIT); @@ -881,7 +881,7 @@ retry: if ((error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, flags | IO_BUFLOCKED, cred, )) != 0) { brelse(bp); - if (++reclaimed == 1) { + if (DOINGSOFTDEP(vp) && ++reclaimed == 1) { UFS_LOCK(ump); softdep_request_cleanup(fs, vp, cred, FLUSH_BLOCKS_WAIT); @@ -961,7 +961,7 @@ retry: flags | IO_BUFLOCKED, cred, ); if (error) { brelse(bp); - if (++reclaimed == 1) { + if (DOINGSOFTDEP(vp) && ++reclaimed == 1) { UFS_LOCK(ump); softdep_request_cleanup(fs, vp, cred, FLUSH_BLOCKS_WAIT); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304667 - stable/10/sys/ufs/ffs
Author: kib Date: Tue Aug 23 07:51:00 2016 New Revision: 304667 URL: https://svnweb.freebsd.org/changeset/base/304667 Log: MFC r304227: In ffs_balloc_ufs{1,2} routines, assert that unwind records do not overflow local arrays. Modified: stable/10/sys/ufs/ffs/ffs_balloc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ffs/ffs_balloc.c == --- stable/10/sys/ufs/ffs/ffs_balloc.c Tue Aug 23 07:32:12 2016 (r304666) +++ stable/10/sys/ufs/ffs/ffs_balloc.c Tue Aug 23 07:51:00 2016 (r304667) @@ -255,6 +255,8 @@ ffs_balloc_ufs1(struct vnode *vp, off_t } pref = newb + fs->fs_frag; nb = newb; + MPASS(allocblk < allociblk + nitems(allociblk)); + MPASS(lbns_remfree < lbns + nitems(lbns)); *allocblk++ = nb; *lbns_remfree++ = indirs[1].in_lbn; bp = getblk(vp, indirs[1].in_lbn, fs->fs_bsize, 0, 0, gbflags); @@ -325,6 +327,8 @@ retry: } pref = newb + fs->fs_frag; nb = newb; + MPASS(allocblk < allociblk + nitems(allociblk)); + MPASS(lbns_remfree < lbns + nitems(lbns)); *allocblk++ = nb; *lbns_remfree++ = indirs[i].in_lbn; nbp = getblk(vp, indirs[i].in_lbn, fs->fs_bsize, 0, 0, 0); @@ -401,6 +405,8 @@ retry: goto fail; } nb = newb; + MPASS(allocblk < allociblk + nitems(allociblk)); + MPASS(lbns_remfree < lbns + nitems(lbns)); *allocblk++ = nb; *lbns_remfree++ = lbn; nbp = getblk(vp, lbn, fs->fs_bsize, 0, 0, gbflags); @@ -818,6 +824,8 @@ ffs_balloc_ufs2(struct vnode *vp, off_t } pref = newb + fs->fs_frag; nb = newb; + MPASS(allocblk < allociblk + nitems(allociblk)); + MPASS(lbns_remfree < lbns + nitems(lbns)); *allocblk++ = nb; *lbns_remfree++ = indirs[1].in_lbn; bp = getblk(vp, indirs[1].in_lbn, fs->fs_bsize, 0, 0, @@ -889,6 +897,8 @@ retry: } pref = newb + fs->fs_frag; nb = newb; + MPASS(allocblk < allociblk + nitems(allociblk)); + MPASS(lbns_remfree < lbns + nitems(lbns)); *allocblk++ = nb; *lbns_remfree++ = indirs[i].in_lbn; nbp = getblk(vp, indirs[i].in_lbn, fs->fs_bsize, 0, 0, @@ -966,6 +976,8 @@ retry: goto fail; } nb = newb; + MPASS(allocblk < allociblk + nitems(allociblk)); + MPASS(lbns_remfree < lbns + nitems(lbns)); *allocblk++ = nb; *lbns_remfree++ = lbn; nbp = getblk(vp, lbn, fs->fs_bsize, 0, 0, gbflags); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304666 - stable/11/sys/ufs/ffs
Author: kib Date: Tue Aug 23 07:32:12 2016 New Revision: 304666 URL: https://svnweb.freebsd.org/changeset/base/304666 Log: MFC r304232: In UFS_BALLOC(), invalidate pages of indirect buffers on failed block allocation unwinding. Modified: stable/11/sys/ufs/ffs/ffs_balloc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ffs/ffs_balloc.c == --- stable/11/sys/ufs/ffs/ffs_balloc.c Tue Aug 23 07:30:20 2016 (r304665) +++ stable/11/sys/ufs/ffs/ffs_balloc.c Tue Aug 23 07:32:12 2016 (r304666) @@ -492,8 +492,8 @@ fail: (intmax_t)bp->b_lblkno, (uintmax_t)*lbns_remfree, (uintmax_t)bp->b_blkno, (uintmax_t)fsbtodb(fs, *blkp))); - bp->b_flags |= (B_INVAL | B_RELBUF); - bp->b_flags &= ~B_ASYNC; + bp->b_flags |= B_INVAL | B_RELBUF | B_NOCACHE; + bp->b_flags &= ~(B_ASYNC | B_CACHE); brelse(bp); } deallocated += fs->fs_bsize; @@ -1087,8 +1087,8 @@ fail: (intmax_t)bp->b_lblkno, (uintmax_t)*lbns_remfree, (uintmax_t)bp->b_blkno, (uintmax_t)fsbtodb(fs, *blkp))); - bp->b_flags |= (B_INVAL | B_RELBUF); - bp->b_flags &= ~B_ASYNC; + bp->b_flags |= B_INVAL | B_RELBUF | B_NOCACHE; + bp->b_flags &= ~(B_ASYNC | B_CACHE); brelse(bp); } deallocated += fs->fs_bsize; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304665 - stable/11/sys/ufs/ffs
Author: kib Date: Tue Aug 23 07:30:20 2016 New Revision: 304665 URL: https://svnweb.freebsd.org/changeset/base/304665 Log: MFC r304231: On unwind after failed block allocation in ffs_balloc_ufs{1,2}, assert that recorded allocated blocks numbers match the physical block numbers of dandling buffers which are released. When finally freeing the blocks during unwind, assert that dandling buffers where not re-allocated. Modified: stable/11/sys/ufs/ffs/ffs_balloc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ffs/ffs_balloc.c == --- stable/11/sys/ufs/ffs/ffs_balloc.c Tue Aug 23 07:27:38 2016 (r304664) +++ stable/11/sys/ufs/ffs/ffs_balloc.c Tue Aug 23 07:30:20 2016 (r304665) @@ -487,6 +487,11 @@ fail: bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0, GB_NOCREAT | GB_UNMAPPED); if (bp != NULL) { + KASSERT(bp->b_blkno == fsbtodb(fs, *blkp), + ("mismatch1 l %jd %jd b %ju %ju", + (intmax_t)bp->b_lblkno, (uintmax_t)*lbns_remfree, + (uintmax_t)bp->b_blkno, + (uintmax_t)fsbtodb(fs, *blkp))); bp->b_flags |= (B_INVAL | B_RELBUF); bp->b_flags &= ~B_ASYNC; brelse(bp); @@ -531,6 +536,18 @@ fail: * cleared, free the blocks. */ for (blkp = allociblk; blkp < allocblk; blkp++) { +#ifdef INVARIANTS + if (blkp == allociblk) + lbns_remfree = lbns; + bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0, + GB_NOCREAT | GB_UNMAPPED); + if (bp != NULL) { + panic("zombie1 %jd %ju %ju", + (intmax_t)bp->b_lblkno, (uintmax_t)bp->b_blkno, + (uintmax_t)fsbtodb(fs, *blkp)); + } + lbns_remfree++; +#endif ffs_blkfree(ump, fs, ip->i_devvp, *blkp, fs->fs_bsize, ip->i_number, vp->v_type, NULL); } @@ -1065,6 +1082,11 @@ fail: bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0, GB_NOCREAT | GB_UNMAPPED); if (bp != NULL) { + KASSERT(bp->b_blkno == fsbtodb(fs, *blkp), + ("mismatch2 l %jd %jd b %ju %ju", + (intmax_t)bp->b_lblkno, (uintmax_t)*lbns_remfree, + (uintmax_t)bp->b_blkno, + (uintmax_t)fsbtodb(fs, *blkp))); bp->b_flags |= (B_INVAL | B_RELBUF); bp->b_flags &= ~B_ASYNC; brelse(bp); @@ -1109,6 +1131,18 @@ fail: * cleared, free the blocks. */ for (blkp = allociblk; blkp < allocblk; blkp++) { +#ifdef INVARIANTS + if (blkp == allociblk) + lbns_remfree = lbns; + bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0, + GB_NOCREAT | GB_UNMAPPED); + if (bp != NULL) { + panic("zombie2 %jd %ju %ju", + (intmax_t)bp->b_lblkno, (uintmax_t)bp->b_blkno, + (uintmax_t)fsbtodb(fs, *blkp)); + } + lbns_remfree++; +#endif ffs_blkfree(ump, fs, ip->i_devvp, *blkp, fs->fs_bsize, ip->i_number, vp->v_type, NULL); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304664 - stable/11/sys/ufs/ffs
Author: kib Date: Tue Aug 23 07:27:38 2016 New Revision: 304664 URL: https://svnweb.freebsd.org/changeset/base/304664 Log: MFC r304229: When looking up dandling buffers for unwing after failing block allocation in UFS_BALLOC(), there is no need to map them. Modified: stable/11/sys/ufs/ffs/ffs_balloc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ffs/ffs_balloc.c == --- stable/11/sys/ufs/ffs/ffs_balloc.c Tue Aug 23 07:25:39 2016 (r304663) +++ stable/11/sys/ufs/ffs/ffs_balloc.c Tue Aug 23 07:27:38 2016 (r304664) @@ -484,7 +484,8 @@ fail: * We shall not leave the freed blocks on the vnode * buffer object lists. */ - bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0, GB_NOCREAT); + bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0, + GB_NOCREAT | GB_UNMAPPED); if (bp != NULL) { bp->b_flags |= (B_INVAL | B_RELBUF); bp->b_flags &= ~B_ASYNC; @@ -1061,7 +1062,8 @@ fail: * We shall not leave the freed blocks on the vnode * buffer object lists. */ - bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0, GB_NOCREAT); + bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0, + GB_NOCREAT | GB_UNMAPPED); if (bp != NULL) { bp->b_flags |= (B_INVAL | B_RELBUF); bp->b_flags &= ~B_ASYNC; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304663 - stable/11/sys/ufs/ffs
Author: kib Date: Tue Aug 23 07:25:39 2016 New Revision: 304663 URL: https://svnweb.freebsd.org/changeset/base/304663 Log: MFC r304228: When block allocation fails in UFS_BALLOC(), and the volume does not have SU enabled, there is no point in calling softdep_request_cleanup(). Modified: stable/11/sys/ufs/ffs/ffs_balloc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ffs/ffs_balloc.c == --- stable/11/sys/ufs/ffs/ffs_balloc.c Tue Aug 23 07:23:50 2016 (r304662) +++ stable/11/sys/ufs/ffs/ffs_balloc.c Tue Aug 23 07:25:39 2016 (r304663) @@ -311,7 +311,7 @@ retry: if ((error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, flags | IO_BUFLOCKED, cred, )) != 0) { brelse(bp); - if (++reclaimed == 1) { + if (DOINGSOFTDEP(vp) && ++reclaimed == 1) { UFS_LOCK(ump); softdep_request_cleanup(fs, vp, cred, FLUSH_BLOCKS_WAIT); @@ -390,7 +390,7 @@ retry: flags | IO_BUFLOCKED, cred, ); if (error) { brelse(bp); - if (++reclaimed == 1) { + if (DOINGSOFTDEP(vp) && ++reclaimed == 1) { UFS_LOCK(ump); softdep_request_cleanup(fs, vp, cred, FLUSH_BLOCKS_WAIT); @@ -881,7 +881,7 @@ retry: if ((error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, flags | IO_BUFLOCKED, cred, )) != 0) { brelse(bp); - if (++reclaimed == 1) { + if (DOINGSOFTDEP(vp) && ++reclaimed == 1) { UFS_LOCK(ump); softdep_request_cleanup(fs, vp, cred, FLUSH_BLOCKS_WAIT); @@ -961,7 +961,7 @@ retry: flags | IO_BUFLOCKED, cred, ); if (error) { brelse(bp); - if (++reclaimed == 1) { + if (DOINGSOFTDEP(vp) && ++reclaimed == 1) { UFS_LOCK(ump); softdep_request_cleanup(fs, vp, cred, FLUSH_BLOCKS_WAIT); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304662 - stable/11/sys/ufs/ffs
Author: kib Date: Tue Aug 23 07:23:50 2016 New Revision: 304662 URL: https://svnweb.freebsd.org/changeset/base/304662 Log: MFC r304227: In ffs_balloc_ufs{1,2} routines, assert that unwind records do not overflow local arrays. Modified: stable/11/sys/ufs/ffs/ffs_balloc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ffs/ffs_balloc.c == --- stable/11/sys/ufs/ffs/ffs_balloc.c Tue Aug 23 07:07:47 2016 (r304661) +++ stable/11/sys/ufs/ffs/ffs_balloc.c Tue Aug 23 07:23:50 2016 (r304662) @@ -255,6 +255,8 @@ ffs_balloc_ufs1(struct vnode *vp, off_t } pref = newb + fs->fs_frag; nb = newb; + MPASS(allocblk < allociblk + nitems(allociblk)); + MPASS(lbns_remfree < lbns + nitems(lbns)); *allocblk++ = nb; *lbns_remfree++ = indirs[1].in_lbn; bp = getblk(vp, indirs[1].in_lbn, fs->fs_bsize, 0, 0, gbflags); @@ -325,6 +327,8 @@ retry: } pref = newb + fs->fs_frag; nb = newb; + MPASS(allocblk < allociblk + nitems(allociblk)); + MPASS(lbns_remfree < lbns + nitems(lbns)); *allocblk++ = nb; *lbns_remfree++ = indirs[i].in_lbn; nbp = getblk(vp, indirs[i].in_lbn, fs->fs_bsize, 0, 0, 0); @@ -401,6 +405,8 @@ retry: goto fail; } nb = newb; + MPASS(allocblk < allociblk + nitems(allociblk)); + MPASS(lbns_remfree < lbns + nitems(lbns)); *allocblk++ = nb; *lbns_remfree++ = lbn; nbp = getblk(vp, lbn, fs->fs_bsize, 0, 0, gbflags); @@ -818,6 +824,8 @@ ffs_balloc_ufs2(struct vnode *vp, off_t } pref = newb + fs->fs_frag; nb = newb; + MPASS(allocblk < allociblk + nitems(allociblk)); + MPASS(lbns_remfree < lbns + nitems(lbns)); *allocblk++ = nb; *lbns_remfree++ = indirs[1].in_lbn; bp = getblk(vp, indirs[1].in_lbn, fs->fs_bsize, 0, 0, @@ -889,6 +897,8 @@ retry: } pref = newb + fs->fs_frag; nb = newb; + MPASS(allocblk < allociblk + nitems(allociblk)); + MPASS(lbns_remfree < lbns + nitems(lbns)); *allocblk++ = nb; *lbns_remfree++ = indirs[i].in_lbn; nbp = getblk(vp, indirs[i].in_lbn, fs->fs_bsize, 0, 0, @@ -966,6 +976,8 @@ retry: goto fail; } nb = newb; + MPASS(allocblk < allociblk + nitems(allociblk)); + MPASS(lbns_remfree < lbns + nitems(lbns)); *allocblk++ = nb; *lbns_remfree++ = lbn; nbp = getblk(vp, lbn, fs->fs_bsize, 0, 0, gbflags); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304661 - stable/9/sys/dev
Author: avg Date: Tue Aug 23 07:07:47 2016 New Revision: 304661 URL: https://svnweb.freebsd.org/changeset/base/304661 Log: remove stray mergeinfo from sys/dev This is a direct commit. Modified: Directory Properties: stable/9/sys/dev/ (props changed) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304660 - stable/9/sys/dev/ahci
Author: avg Date: Tue Aug 23 07:06:46 2016 New Revision: 304660 URL: https://svnweb.freebsd.org/changeset/base/304660 Log: MFC r304521: JMicron JMB361 has only a single SATA port Modified: stable/9/sys/dev/ahci/ahci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ahci/ahci.c == --- stable/9/sys/dev/ahci/ahci.cTue Aug 23 07:03:17 2016 (r304659) +++ stable/9/sys/dev/ahci/ahci.cTue Aug 23 07:06:46 2016 (r304660) @@ -255,7 +255,7 @@ static const struct { {0x9c0f8086, 0x00, "Intel Lynx Point-LP (RAID)",0}, {0x23238086, 0x00, "Intel DH89xxCC",0}, {0x2360197b, 0x00, "JMicron JMB360",0}, - {0x2361197b, 0x00, "JMicron JMB361",AHCI_Q_NOFORCE}, + {0x2361197b, 0x00, "JMicron JMB361",AHCI_Q_NOFORCE | AHCI_Q_1CH}, {0x2362197b, 0x00, "JMicron JMB362",0}, {0x2363197b, 0x00, "JMicron JMB363",AHCI_Q_NOFORCE}, {0x2365197b, 0x00, "JMicron JMB365",AHCI_Q_NOFORCE}, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304659 - stable/10/sys/dev/ahci
Author: avg Date: Tue Aug 23 07:03:17 2016 New Revision: 304659 URL: https://svnweb.freebsd.org/changeset/base/304659 Log: MFC r304521: JMicron JMB361 has only a single SATA port Modified: stable/10/sys/dev/ahci/ahci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ahci/ahci_pci.c == --- stable/10/sys/dev/ahci/ahci_pci.c Tue Aug 23 07:02:50 2016 (r304658) +++ stable/10/sys/dev/ahci/ahci_pci.c Tue Aug 23 07:03:17 2016 (r304659) @@ -187,7 +187,7 @@ static const struct { {0xa10f8086, 0x00, "Intel Sunrise Point (RAID)",0}, {0x23238086, 0x00, "Intel DH89xxCC",0}, {0x2360197b, 0x00, "JMicron JMB360",0}, - {0x2361197b, 0x00, "JMicron JMB361",AHCI_Q_NOFORCE}, + {0x2361197b, 0x00, "JMicron JMB361",AHCI_Q_NOFORCE | AHCI_Q_1CH}, {0x2362197b, 0x00, "JMicron JMB362",0}, {0x2363197b, 0x00, "JMicron JMB363",AHCI_Q_NOFORCE}, {0x2365197b, 0x00, "JMicron JMB365",AHCI_Q_NOFORCE}, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r304658 - stable/11/sys/dev/ahci
Author: avg Date: Tue Aug 23 07:02:50 2016 New Revision: 304658 URL: https://svnweb.freebsd.org/changeset/base/304658 Log: MFC r304521: JMicron JMB361 has only a single SATA port Modified: stable/11/sys/dev/ahci/ahci_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ahci/ahci_pci.c == --- stable/11/sys/dev/ahci/ahci_pci.c Tue Aug 23 05:22:03 2016 (r304657) +++ stable/11/sys/dev/ahci/ahci_pci.c Tue Aug 23 07:02:50 2016 (r304658) @@ -187,7 +187,7 @@ static const struct { {0xa10f8086, 0x00, "Intel Sunrise Point (RAID)",0}, {0x23238086, 0x00, "Intel DH89xxCC",0}, {0x2360197b, 0x00, "JMicron JMB360",0}, - {0x2361197b, 0x00, "JMicron JMB361",AHCI_Q_NOFORCE}, + {0x2361197b, 0x00, "JMicron JMB361",AHCI_Q_NOFORCE | AHCI_Q_1CH}, {0x2362197b, 0x00, "JMicron JMB362",0}, {0x2363197b, 0x00, "JMicron JMB363",AHCI_Q_NOFORCE}, {0x2365197b, 0x00, "JMicron JMB365",AHCI_Q_NOFORCE}, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"