1. 25 Jul, 2017 6 commits
    • Paul E. McKenney's avatar
      rcu: Make NOCB CPUs migrate CBs directly from outgoing CPU · b1a2d79f
      Paul E. McKenney authored
      RCU's CPU-hotplug callback-migration code first moves the outgoing
      CPU's callbacks to ->orphan_done and ->orphan_pend, and only then
      moves them to the NOCB callback list.  This commit avoids the
      extra step (and simplifies the code) by moving the callbacks directly
      from the outgoing CPU's callback list to the NOCB callback list.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      b1a2d79f
    • Paul E. McKenney's avatar
      rcu: Check for NOCB CPUs and empty lists earlier in CB migration · 95335c03
      Paul E. McKenney authored
      The current CPU-hotplug RCU-callback-migration code checks
      for the source (newly offlined) CPU being a NOCBs CPU down in
      rcu_send_cbs_to_orphanage().  This commit simplifies callback migration a
      bit by moving this check up to rcu_migrate_callbacks().  This commit also
      adds a check for the source CPU having no callbacks, which eases analysis
      of the rcu_send_cbs_to_orphanage() and rcu_adopt_orphan_cbs() functions.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      95335c03
    • Paul E. McKenney's avatar
      rcu: Remove orphan/adopt event-tracing fields · c47e067a
      Paul E. McKenney authored
      The rcu_node structure's ->n_cbs_orphaned and ->n_cbs_adopted fields
      are updated, but never read.  This commit therefore removes them.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      c47e067a
    • Paul E. McKenney's avatar
      torture: Fix typo suppressing CPU-hotplug statistics · a2b2df20
      Paul E. McKenney authored
      The torture status line contains a series of values preceded by "onoff:".
      The last value in that line, the one preceding the "HZ=" string, is
      always zero.  The reason that it is always zero is that torture_offline()
      was incrementing the sum_offl pointer instead of the value that this
      pointer referenced.  This commit therefore makes this increment operate
      on the statistic rather than the pointer to the statistic.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      a2b2df20
    • Paul E. McKenney's avatar
      rcu: Make expedited GPs correctly handle hardware CPU insertion · 313517fc
      Paul E. McKenney authored
      The update of the ->expmaskinitnext and of ->ncpus are unsynchronized,
      with the value of ->ncpus being incremented long before the corresponding
      ->expmaskinitnext mask is updated.  If an RCU expedited grace period
      sees ->ncpus change, it will update the ->expmaskinit masks from the new
      ->expmaskinitnext masks.  But it is possible that ->ncpus has already
      been updated, but the ->expmaskinitnext masks still have their old values.
      For the current expedited grace period, no harm done.  The CPU could not
      have been online before the grace period started, so there is no need to
      wait for its non-existent pre-existing readers.
      
      But the next RCU expedited grace period is in a world of hurt.  The value
      of ->ncpus has already been updated, so this grace period will assume
      that the ->expmaskinitnext masks have not changed.  But they have, and
      they won't be taken into account until the next never-been-online CPU
      comes online.  This means that RCU will be ignoring some CPUs that it
      should be paying attention to.
      
      The solution is to update ->ncpus and ->expmaskinitnext while holding
      the ->lock for the rcu_node structure containing the ->expmaskinitnext
      mask.  Because smp_store_release() is now used to update ->ncpus and
      smp_load_acquire() is now used to locklessly read it, if the expedited
      grace period sees ->ncpus change, then the updating CPU has to
      already be holding the corresponding ->lock.  Therefore, when the
      expedited grace period later acquires that ->lock, it is guaranteed
      to see the new value of ->expmaskinitnext.
      
      On the other hand, if the expedited grace period loads ->ncpus just
      before an update, earlier full memory barriers guarantee that
      the incoming CPU isn't far enough along to be running any RCU readers.
      
      This commit therefore makes the required change.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      313517fc
    • Paul E. McKenney's avatar
      rcu: Migrate callbacks earlier in the CPU-offline timeline · a58163d8
      Paul E. McKenney authored
      RCU callbacks must be migrated away from an outgoing CPU, and this is
      done near the end of the CPU-hotplug operation, after the outgoing CPU is
      long gone.  Unfortunately, this means that other CPU-hotplug callbacks
      can execute while the outgoing CPU's callbacks are still immobilized
      on the long-gone CPU's callback lists.  If any of these CPU-hotplug
      callbacks must wait, either directly or indirectly, for the invocation
      of any of the immobilized RCU callbacks, the system will hang.
      
      This commit avoids such hangs by migrating the callbacks away from the
      outgoing CPU immediately upon its departure, shortly after the return
      from __cpu_die() in takedown_cpu().  Thus, RCU is able to advance these
      callbacks and invoke them, which allows all the after-the-fact CPU-hotplug
      callbacks to wait on these RCU callbacks without risk of a hang.
      
      While in the neighborhood, this commit also moves rcu_send_cbs_to_orphanage()
      and rcu_adopt_orphan_cbs() under a pre-existing #ifdef to avoid including
      dead code on the one hand and to avoid define-without-use warnings on the
      other hand.
      Reported-by: default avatarJeffrey Hugo <jhugo@codeaurora.org>
      Link: http://lkml.kernel.org/r/db9c91f6-1b17-6136-84f0-03c3c2581ab4@codeaurora.orgSigned-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Anna-Maria Gleixner <anna-maria@linutronix.de>
      Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      Cc: Richard Weinberger <richard@nod.at>
      a58163d8
  2. 23 Jul, 2017 8 commits
  3. 22 Jul, 2017 6 commits
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-linus-v4.13-rc2' of... · 4b162c53
      Linus Torvalds authored
      Merge tag 'hwmon-for-linus-v4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull hwmon fix from Guenter Roeck:
       "Avoid buffer overruns in applesmc driver"
      
      * tag 'hwmon-for-linus-v4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (applesmc) Avoid buffer overruns
      4b162c53
    • Linus Torvalds's avatar
      Merge tag 'tty-4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · ae75d1ae
      Linus Torvalds authored
      Pull tty/serial fixes from Greg KH:
       "Here are some small tty and serial driver fixes for 4.13-rc2. Nothing
        huge at all, a revert of a patch that turned out to break things, a
        fix up for a new tty ioctl we added in 4.13-rc1 to get the uapi
        definition correct, and a few minor serial driver fixes for reported
        issues.
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'tty-4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        tty: Fix TIOCGPTPEER ioctl definition
        tty: hide unused pty_get_peer function
        tty: serial: lpuart: Fix the logic for detecting the 32-bit type UART
        serial: imx: Prevent TX buffer PIO write when a DMA has been started
        Revert "serial: imx-serial - move DMA buffer configuration to DT"
        serial: sh-sci: Uninitialized variables in sysfs files
        serial: st-asc: Potential error pointer dereference
      ae75d1ae
    • Linus Torvalds's avatar
      Merge tag 'char-misc-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · dedaff2f
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are some small char and misc driver fixes for 4.13-rc2. All fix
        reported problems with 4.13-rc1 or older kernels (like the binder
        fixes). Full details in the shortlog.
      
        All have been in linux-next with no reported issues"
      
      * tag 'char-misc-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        w1: omap-hdq: fix error return code in omap_hdq_probe()
        regmap: regmap-w1: Fix build troubles
        w1: Fix slave count on 1-Wire bus (resend)
        mux: mux-core: unregister mux_class in mux_exit()
        mux: remove the Kconfig question for the subsystem
        nvmem: rockchip-efuse: amend compatible rk322x-efuse to rk3228-efuse
        drivers/fsi: fix fsi_slave_mode prototype
        fsi: core: register with postcore_initcall
        thunderbolt: Correct access permissions for active NVM contents
        vmbus: re-enable channel tasklet
        spmi: pmic-arb: Always allocate ppid_to_apid table
        MAINTAINERS: Add entry for SPMI subsystem
        spmi: Include OF based modalias in device uevent
        binder: Use wake up hint for synchronous transactions.
        binder: use group leader instead of open thread
        Revert "android: binder: Sanity check at binder ioctl"
      dedaff2f
    • Linus Torvalds's avatar
      Merge tag 'usb-4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 55fd939e
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some small USB fixes for 4.13-rc2.
      
        The usual batch, gadget fixes for reported issues, as well as xhci
        fixes, and a small random collection of other fixes for reported
        issues.
      
        All have been in linux-next with no reported issues"
      
      * tag 'usb-4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (25 commits)
        xhci: fix memleak in xhci_run()
        usb: xhci: fix spinlock recursion for USB2 test mode
        xhci: fix 20000ms port resume timeout
        usb: xhci: Issue stop EP command only when the EP state is running
        xhci: Bad Ethernet performance plugged in ASM1042A host
        xhci: Fix NULL pointer dereference when cleaning up streams for removed host
        usb: renesas_usbhs: gadget: disable all eps when the driver stops
        usb: renesas_usbhs: fix usbhsc_resume() for !USBHSF_RUNTIME_PWCTRL
        usb: gadget: udc: renesas_usb3: protect usb3_ep->started in usb3_start_pipen()
        usb: gadget: udc: renesas_usb3: fix zlp transfer by the dmac
        usb: gadget: udc: renesas_usb3: fix free size in renesas_usb3_dma_free_prd()
        usb: gadget: f_uac2: endianness fixes.
        usb: gadget: f_uac1: endianness fixes.
        include: usb: audio: specify exact endiannes of descriptors
        usb: gadget: udc: start_udc() can be static
        usb: dwc2: gadget: On USB RESET reset device address to zero
        usb: storage: return on error to avoid a null pointer dereference
        usb: typec: include linux/device.h in ucsi.h
        USB: cdc-acm: add device-id for quirky printer
        usb: dwc3: gadget: only unmap requests from DMA if mapped
        ...
      55fd939e
    • Linus Torvalds's avatar
      Merge tag 'staging-4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · bcb53e57
      Linus Torvalds authored
      Pull staging driver fixes from Greg KH:
       "Here are some small staging driver fixes for reported issues for
        4.13-rc2.
      
        Also in here is a new driver, the virtualbox DRM driver. It's
        stand-alone and got acks from the DRM developers to go in through this
        tree. It's a new thing, but it should be fine for this point in the rc
        cycle due to it being independent.
      
        All of this has been in linux-next for a while with no reported
        issues"
      
      * tag 'staging-4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: rtl8188eu: add TL-WN722N v2 support
        staging: speakup: safely register and unregister ldisc
        staging: speakup: add functions to register and unregister ldisc
        staging: speakup: safely close tty
        staging: sm750fb: avoid conflicting vesafb
        staging: lustre: ko2iblnd: check copy_from_iter/copy_to_iter return code
        staging: vboxvideo: Add vboxvideo to drivers/staging
        staging: sm750fb: fixed a assignment typo
        staging: rtl8188eu: memory leak in rtw_free_cmd_obj()
        staging: vchiq_arm: fix error codes in probe
        staging: comedi: ni_mio_common: fix AO timer off-by-one regression
      bcb53e57
    • Randy Dunlap's avatar
      MAINTAINERS: fix alphabetical ordering · 82abbea7
      Randy Dunlap authored
      Fix major alphabetic errors.  No attempt to fix items that all begin
      with the same word (like ARM, BROADCOM, DRM, EDAC, FREESCALE, INTEL,
      OMAP, PCI, SAMSUNG, TI, USB, etc.).
      
      (diffstat +/- is different by one line because TI KEYSTONE MULTICORE
      had 2 blank lines after it.)
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Acked-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      82abbea7
  4. 21 Jul, 2017 20 commits