1. Aug 15, 2017
    • Ruslan Bukin's avatar
      ddbb79bd
    • Ruslan Bukin's avatar
    • hselasky's avatar
      Add new USB quirk. · 92d87052
      hselasky authored
      Submitted by:		devel@stasyan.com
      PR:			221328
      MFC after:		1 week
      Sponsored by:		Mellanox Technologies
      92d87052
    • delphij's avatar
      Plug memory leak in arge_encap(). · a165ab45
      delphij authored
      Reported by:	Ilja Van Sprundel <ivansprundel ioactive.com>
      Submitted by:	Domagoj Stolfa <domagoj.stolfa gmail.com>
      Reviewed by:	adrian
      MFC after:	3 days
      a165ab45
    • cem's avatar
      Fix a couple of comment typos · 796e094c
      cem authored
      No functional change.
      
      Submitted by:	Anton Rang <anton.rang AT isilon.com>
      Sponsored by:	Dell EMC Isilon
      796e094c
    • imp's avatar
      146d299d
    • imp's avatar
      Convert all the arm big endian tests into a regexp rather than a list. · 2fd0ca5e
      imp authored
      Suggested by: emaste@
      2fd0ca5e
    • ngie's avatar
      Add supporting changes for `Add limited sandbox capability to "make check"` · 18951eee
      ngie authored
      Non-tests/... changes:
      - Add HAS_TESTS= to Makefiles with libraries and programs to enable iteration
        and propagate the appropriate environment down to *.test.mk.
      
      tests/... changes:
      - Add appropriate support Makefile.inc's to set HAS_TESTS in a minimal manner,
        since tests/... is a special subdirectory tree compared to the others.
      
      MFC after:	2 months
      MFC with:	r322511
      Reviewed by:	arch (silence), testing (silence)
      Differential Revision:	D12014
      18951eee
    • ngie's avatar
      Add an UPDATING entry for r322511. · d42d7dc7
      ngie authored
      MFC after:	2 months
      d42d7dc7
    • ngie's avatar
    • ngie's avatar
      Add limited sandbox capability to "make check" · 64c4eee3
      ngie authored
      == Rationale ==
      
      r295380 introduced "make check" and consolidated means for running
      test code in an attempt to simplify running tests. One could either
      install files/libraries/programs and run "make check", or run "make check"
      with an explicit CHECKDIR, e.g., `make check CHECKDIR=$(make -V.OBJDIR)``.
      
      One criticism that was received is that "make check" should be run with
      the intent of making dev->test->commit easier, which means that the target
      audience's workflow should be developers. One developer pattern available
      in other opensource projects is to run test code from a developer sandbox,
      instead of installing to a system.
      
      == Method ==
      
      This approach is slightly different from the standard approach, in the sense
      that it builds and installs into a deterministic directory under .OBJDIR (as I call it,
      the "sandbox"), then runs "make check" against that. In the event the test
      run is successful, the deterministic directory is removed to save space.
      
      == Approach ==
      
      bsd.lib.mk, bsd.prog.mk:
      
      To support this functionality, a new variable `HAS_TESTS` is being added.
      
      HAS_TESTS enables appropriate behavior with bsd.lib.mk and bsd.prog.mk, as
      follows:
      - Add "make check" as an available target from the directory.
      - Pass down appropriate variables via ${TESTS_ENV}, i.e.,
        ${TESTS_LD_LIBRARY_PATH} and ${TESTS_PATH}.
      
      One should add "HAS_TESTS" to directories containing tests in them, e.g. from
      bin/sh/Makefile,
      
        HAS_TESTS=
        SUBDIR.${MK_TESTS}+= tests
      
      HAS_TESTS doesn't automatically add the tests subdirectory for flexibility
      reasons.
      
      bsd.opts.mk, src.opts.mk:
      - The knob ${MK_MAKE_CHECK_USE_SANDBOX} has been added, both to explicitly
        direct (internally) when to set a deterministic ${DESTDIR} and to also allow
        users to disable this behavior globally, i.e., via src.conf.
      - MK_TESTS has been promoted from src.opts.mk to bsd.opts.mk to leverage
        syntactic sugar for having MK_TESTS be a dependency for
        MK_MAKE_CHECK_USE_SANDBOX, but to also ensure that src.opts.mk isn't required
        to use suite.test.mk (which is a dependency of bsd.test.mk).
      
      suite.test.mk:
      - beforecheck behavior (when MK_MAKE_CHECK_USE_SANDBOX is enabled) is modified
        from a no-op to:
      -- Build.
      -- Run "make hierarchy" on the sandbox dir.
      -- Install the tests/files to the sandbox dir.
      - aftercheck behavior (when MK_MAKE_CHECK_USE_SANDBOX is enabled) is modified
        from a no-op to:
      -- Remove the sandbox dir.
      
      Again, because the dependency order set in bsd.test.mk is
      beforecheck -> check -> aftercheck, "make check" will not be run unless
      "beforecheck" completes successfully, and "aftercheck" will not be run unless
      "beforecheck" and "check" complete successfully.
      
      == Caveats ==
      
      - This target must either be run with MK_INSTALL_AS_USER or as root. Otherwise
        it will fail when running "make install" as the default user/group for many
        makefiles when calling INSTALL is root/wheel.
      - This target must be run from a suitable top-level directory. For example,
        running tests from `tests/sys/fs/tmpfs` won't work, but `tests/sys/fs` will,
        because `tests/sys/fs/tmpfs` relies on files installed by `tests/sys/fs`.
      - Running MK_INSTALL_AS_USER may introduce determinism issues. However, using
        it could identify deficiences in tests in terms of needing to be run as
        root, which are not properly articulated in the test requirements.
      - The doesn't negate the need for running "make installworld" and
        "make checkworld", etc. Again, this just is intended to simplify the
        dev->test->commit workflow.
      
      == Cleanup done ==
      - CHECKDIR is removed; one can use "MK_MAKE_CHECK_USE_SANDBOX=no" to enable
        "legacy" (r295380) behavior.
      
      MFC after:	2 months
      Relnotes:	yes (CHECKDIR removed; "make check" behavior changed)
      Requested by:	jhb
      Reviewed by:	arch (silence), testing (silence)
      Differential Revision:	D11905
      64c4eee3
    • ngie's avatar
      e58fbbc9
  2. Aug 14, 2017
    • Ruslan Bukin's avatar
      cleanup · 83a47778
      Ruslan Bukin authored
      83a47778
    • Ruslan Bukin's avatar
    • br's avatar
      Rename RISC-V GCC config directory: riscv64 -> riscv · e8827baa
      br authored
      (to match official RISC-V target for GCC 7.1).
      
      This is only a minimal config required to build c start up (csu).
      
      This fixes build after r322429 ("Make _TO_CPUARCH macro for
      ARCH to CPUARCH conversions")
      
      Reported by:	lwhsu
      Sponsored by:	DARPA, AFRL
      e8827baa
    • kib's avatar
      Print whole machine state on double fault. · 50c6ae0c
      kib authored
      It is quite useful when double fault is not caused by a stack overflow.
      
      Tested by:	pho (as part of the larger patch)
      Sponsored by:	The FreeBSD Foundation
      MFC after:	1 week
      50c6ae0c
    • kib's avatar
      Add {rd,wr}{fs,gs}base C wrappers for instructions. · 8353aff0
      kib authored
      Tested by:	pho (as part of the larger patch)
      Sponsored by:	The FreeBSD Foundation
      MFC after:	1 week
      8353aff0
    • kib's avatar
      Style. · 7df8e8c0
      kib authored
      Tested by:	pho (as part of the larger patch)
      Sponsored by:	The FreeBSD Foundation
      MFC after:	3 days
      7df8e8c0
    • kib's avatar
      Remove confusion in the line explaining syntax of the msr read. · 09cc2c48
      kib authored
      Specify words order in the display.
      
      Sponsored by:	The FreeBSD Foundation
      MFC after:	3 days
      09cc2c48
    • sephe's avatar
      hyperv: Update copyright for the files changed in 2017 · 6a2d79f5
      sephe authored
      MFC after:	3 days
      Sponsored by:	Microsoft
      Differential Revision:	https://reviews.freebsd.org/D11982
      6a2d79f5
    • sephe's avatar
      hyperv/hn: Re-set datapath after synthetic parts reattached. · a4ceea12
      sephe authored
      Do this even for non-transparent mode VF. Better safe than sorry.
      
      MFC after:	3 days
      Sponsored by:	Microsoft
      Differential Revision:	https://reviews.freebsd.org/D11981
      a4ceea12
    • sephe's avatar
      hyperv/hn: Minor cleanup · 3142e359
      sephe authored
      MFC after:	3 days
      Sponsored by:	Microsoft
      Differential Revision:	https://reviews.freebsd.org/D11979
      3142e359
    • sephe's avatar
      hyperv/hn: Fix/enhance receiving path when VF is activated. · 744451be
      sephe authored
      - Update hn(4)'s stats properly for non-transparent mode VF.
      - Allow BPF tapping to hn(4) for non-transparent mode VF.
      - Don't setup mbuf hash, if 'options RSS' is set.
        In Azure, when VF is activated, TCP SYN and SYN|ACK go through hn(4)
        while the rest of segments and ACKs belonging to the same TCP 4-tuple
        go through the VF.  So don't setup mbuf hash, if a VF is activated
        and 'options RSS' is not enabled.  hn(4) and the VF may use neither
        the same RSS hash key nor the same RSS hash function, so the hash
        value for packets belonging to the same flow could be different!
      - Disable LRO.
        hn(4) will only receive broadcast packets, multicast packets, TCP
        SYN and SYN|ACK (in Azure), LRO is useless for these packet types.
        For non-transparent, we definitely _cannot_ enable LRO at all, since
        the LRO flush will use hn(4) as the receiving interface; i.e.
        hn_ifp->if_input(hn_ifp, m).
      
      While I'm here, remove unapplied comment and minor style change.
      
      MFC after:	3 days
      Sponsored by:	Microsoft
      Differential Revision:	https://reviews.freebsd.org/D11978
      744451be
    • bhughes's avatar
      Add myself · 5437c963
      bhughes authored
      Reported by:	mckusick
      5437c963
    • sephe's avatar
      hyperv/hn: Update VF's ibytes properly under transparent VF mode. · 19ec4cf7
      sephe authored
      While, I'm here add comment about why updating VF's imcast stat is
      not necessary.
      
      MFC after:	3 days
      Sponsored by:	Microsoft
      Differential Revision:	https://reviews.freebsd.org/D11948
      19ec4cf7
    • ian's avatar
      Add hinted attachment for non-FDT systems. Also, print a message if · 5be26fe0
      ian authored
      setting up the timer fails, because on some types of chips that's the
      first attempt to access the device.  If the chip is missing/non-responsive
      then you'd get a driver that attached and didn't register the rtc, with
      no clue about why.  On other chip types there are inits that come before
      timer setup, and they already print messages about errors.
      5be26fe0
    • ian's avatar
      Add back the drivers for Dallas/Maxim ds13xx and Seiko S35390x now that · 1b6d0a3b
      ian authored
      they've been rewritten/fixed to not cause panics by doing i2c transfers
      before interrupts are available.
      
      PR:		221227
      1b6d0a3b
    • ian's avatar
      Minor fixes and enhancements for the s35390a i2c RTC driver... · 3f09c1f9
      ian authored
      - Add FDT probe code.
      - Do i2c transfers with exclusive bus ownership.
      - Use config_intrhook_oneshot() to defer chip setup because some i2c
        busses can't do transfers without interrupts.
      - Add a detach() routine.
      - Add to module build.
      3f09c1f9
    • ian's avatar
      Remove the old ds1374 driver and use the ds13rtc driver instead. Adjust · f2163a35
      ian authored
      several mips config files accordingly.
      f2163a35
    • ian's avatar
      Change "chiptype" to "compatible". Making the hint name the same as the FDT · 52efca2b
      ian authored
      property name should make it easier to document the list of names accepted
      by both configuration mechanisms.
      52efca2b
    • emaste's avatar
      lld: Add `-z muldefs` option. · 20355d09
      emaste authored
      Obtained from:	LLVM r310757
      20355d09
    • ian's avatar
      Add a new driver, ds13rtc, that handles all DS13xx series i2c RTC chips. · 75b9060f
      ian authored
      This driver supports only basic timekeeping functionality.  It completely
      replaces the ds133x driver.  It can also replace the ds1374 driver, but that
      will take a few other changes in MIPS code and config, and will be committed
      separately.  It does NOT replace the existing ds1307 driver, which provides
      access to some of the extended features on the 1307 chip, such as controlling
      the square wave output signal.  If both ds1307 and ds13rtc drivers are
      present, the ds1307 driver will outbid and win control of the device.
      
      This driver can be configured with FDT data, or by using hints on non-FDT
      systems.  In addition to the standard hints for i2c devices, it requires
      a "chiptype" string of the form "dallas,ds13xx" where 'xx' is the chip id
      (i.e., the same format as FDT compat strings).
      75b9060f
    • ohauer's avatar
      - Add myswlf · 690dc669
      ohauer authored
      Reported by:	mckusick
      690dc669
    • andrew's avatar
      Add support for multiple GICv3 ITS devices. For this we add sc_irq_base · 1d4eae65
      andrew authored
      and sc_irq_length to the softc to handle the base number of IRQs available,
      make gicv3_get_nirqs return the number of available interrupt IDs, and
      limit which CPUs we send interrupts to based on the numa domain.
      
      The last point is only strictly needed on a dual socket ThunderX where we
      are unable to send MSI/MSI-X interrupts between sockets.
      
      Sponsored by:	DARPA, AFRL
      1d4eae65
    • ian's avatar
      Add config_intrhook_oneshot(): schedule an intrhook function and unregister · 3dabf0d7
      ian authored
      it automatically after it runs.
      
      The config_intrhook mechanism allows a driver to stall the boot process
      until device(s) required for booting are available, by not allowing system
      inits to proceed until all intrhook functions have been unregistered.
      Virtually all existing code simply unregisters from within the hook function
      when it gets called.
      
      This new function makes that common usage more convenient. Instead of
      allocating and filling in a struct, passing it to a function that might (in
      theory) fail, and checking the return code, now a driver can simply call
      this cannot-fail routine, passing just the intrhook function and its arg.
      
      Differential Revision:	https://reviews.freebsd.org/D11963
      3dabf0d7
    • mckusick's avatar
      When read requests are sent from a filesystem running above g_journal, · 12015c2c
      mckusick authored
      the g_journal level needs to check whether it is holding a newer
      copy of the block than that which exists on the disk. If so, it
      needs to return its copy. If not, it should pass the request down
      to the disk to fulfill. It currently considers six queues:
      
      0) delayed queue,
      1) unsent (current queue),
      2) in-flight to the journal (flush queue),
      3) active journal (active queue),
      4) inactive journal (inactive queue), and
      5) inflight to the disk (copy queue).
      
      Checking on two of these queues is unnecessary:
      
      0) The delayed requests should not be used for reads because they
         have not yet been entered into the journal, so their value should
         reflect the disk contents, not the future contents that are not
         yet committed.
      
      2) Because all the bio's in the flush queue are also found on the
         active queue, there is no need to inspect the flush queue for
         reads since they will be found when searching the active queue.
      
      Submitted by: Dr. Andreas Longwitz <longwitz@incore.de>
      Discussed with: kib
      MFC after: 1 week
      12015c2c
    • mckusick's avatar
      Eliminate a variable that is only ever set. · 97320286
      mckusick authored
      Submitted by: Dr. Andreas Longwitz <longwitz@incore.de>
      Discussed with: kib
      MFC after: 1 week
      97320286
    • alc's avatar
      The *_meta_* functions include a radix parameter, a blk parameter, and · 6b281b98
      alc authored
      another parameter that identifies a starting point in the memory address
      block.  Radix is a power of two, blk is a multiple of radix, and the
      starting point is in the range [blk, blk+radix), so that blk can always be
      computed from the other two.  This change drops the blk parameter from the
      meta functions and computes it instead.  (On amd64, for example, this
      change reduces subr_blist.o's text size by 7%.)
      
      It also makes the radix parameters unsigned to address concerns that the
      calculation of '-radix' might overflow without the -fwrapv option.  (See
      https://reviews.freebsd.org/D11819.)
      
      Submitted by:	Doug Moore <dougm@rice.edu>
      MFC after:	1 week
      Differential Revision:	https://reviews.freebsd.org/D11964
      6b281b98
  3. Aug 13, 2017