1. 04 Dec, 2018 1 commit
    • Ingo Molnar's avatar
      Merge branch 'for-mingo' of... · 4bbfd746
      Ingo Molnar authored
      Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu
      
      Pull RCU changes from Paul E. McKenney:
      
      - Convert RCU's BUG_ON() and similar calls to WARN_ON() and similar.
      
      - Replace calls of RCU-bh and RCU-sched update-side functions
        to their vanilla RCU counterparts.  This series is a step
        towards complete removal of the RCU-bh and RCU-sched update-side
        functions.
      
        ( Note that some of these conversions are going upstream via their
          respective maintainers. )
      
      - Documentation updates, including a number of flavor-consolidation
        updates from Joel Fernandes.
      
      - Miscellaneous fixes.
      
      - Automate generation of the initrd filesystem used for
        rcutorture testing.
      
      - Convert spin_is_locked() assertions to instead use lockdep.
      
        ( Note that some of these conversions are going upstream via their
          respective maintainers. )
      
      - SRCU updates, especially including a fix from Dennis Krein
        for a bag-on-head-class bug.
      
      - RCU torture-test updates.
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      4bbfd746
  2. 02 Dec, 2018 4 commits
    • Linus Torvalds's avatar
      Linux 4.20-rc5 · 25956467
      Linus Torvalds authored
      25956467
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 6a512726
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "Volume is a little higher than usual due to a set of gpio fixes for
        Davinci platforms that's been around a while, still seemed appropriate
        to not hold off until next merge window.
      
        Besides that it's the usual mix of minor fixes, mostly corrections of
        small stuff in device trees.
      
        Major stability-related one is the removal of a regulator from DT on
        Rock960, since DVFS caused undervoltage. I expect it'll be restored
        once they figure out the underlying issue"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (28 commits)
        MAINTAINERS: Remove unused Qualcomm SoC mailing list
        ARM: davinci: dm644x: set the GPIO base to 0
        ARM: davinci: da830: set the GPIO base to 0
        ARM: davinci: dm355: set the GPIO base to 0
        ARM: davinci: dm646x: set the GPIO base to 0
        ARM: davinci: dm365: set the GPIO base to 0
        ARM: davinci: da850: set the GPIO base to 0
        gpio: davinci: restore a way to manually specify the GPIO base
        ARM: davinci: dm644x: define gpio interrupts as separate resources
        ARM: davinci: dm355: define gpio interrupts as separate resources
        ARM: davinci: dm646x: define gpio interrupts as separate resources
        ARM: davinci: dm365: define gpio interrupts as separate resources
        ARM: davinci: da8xx: define gpio interrupts as separate resources
        ARM: dts: at91: sama5d2: use the divided clock for SMC
        ARM: dts: imx51-zii-rdu1: Remove EEPROM node
        ARM: dts: rockchip: Remove @0 from the veyron memory node
        arm64: dts: rockchip: Fix PCIe reset polarity for rk3399-puma-haikou.
        arm64: dts: qcom: msm8998: Reserve gpio ranges on MTP
        arm64: dts: sdm845-mtp: Reserve reserved gpios
        arm64: dts: ti: k3-am654: Fix wakeup_uart reg address
        ...
      6a512726
    • Linus Torvalds's avatar
      Merge tag 'for-linus-4.20a-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 292974c5
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
      
       - A revert of a previous commit as it is no longer necessary and has
         shown to cause problems in some memory hotplug cases.
      
       - Some small fixes and a minor cleanup.
      
       - A patch for adding better diagnostic data in a very rare failure
         case.
      
      * tag 'for-linus-4.20a-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        pvcalls-front: fixes incorrect error handling
        Revert "xen/balloon: Mark unallocated host memory as UNUSABLE"
        xen: xlate_mmu: add missing header to fix 'W=1' warning
        xen/x86: add diagnostic printout to xen_mc_flush() in case of error
        x86/xen: cleanup includes in arch/x86/xen/spinlock.c
      292974c5
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-fix-4.20-rc5' of git://git.infradead.org/users/vkoul/slave-dma · a234c737
      Linus Torvalds authored
      Pull dmaengine fixes from Vinod Koul:
       "This contains two fixes to at_hdmac which fixes long standing bus
        reported recently on serial transfers causing memory leak. These fixes
        were done by Richard Genoud"
      
      * tag 'dmaengine-fix-4.20-rc5' of git://git.infradead.org/users/vkoul/slave-dma:
        dmaengine: at_hdmac: fix module unloading
        dmaengine: at_hdmac: fix memory leak in at_dma_xlate()
      a234c737
  3. 01 Dec, 2018 35 commits
    • Paul E. McKenney's avatar
      rcutorture: Don't do busted forward-progress testing · 5ac7cdc2
      Paul E. McKenney authored
      The "busted" rcutorture type is an intentionally broken implementation
      of RCU.  Doing forward-progress testing on this implementation is not
      particularly meaningful on the one hand and can result in fatal abuse
      of the memory allocator on the other.  This commit therefore disables
      forward-progress testing of the "busted" rcutorture type.
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      5ac7cdc2
    • Paul E. McKenney's avatar
      rcutorture: Use 100ms buckets for forward-progress callback histograms · 2e57bf97
      Paul E. McKenney authored
      This commit narrows the scope of each bucket of the forward-progress
      callback-invocation histograms from one second to 100 milliseconds, which
      aids debugging of forward-progress problems by making shorter-duration
      callback-invocation stalls visible.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      2e57bf97
    • Paul E. McKenney's avatar
      rcutorture: Recover from OOM during forward-progress tests · 2667ccce
      Paul E. McKenney authored
      This commit causes the OOM handler to do rcu_barrier() calls and to
      free up forward-progress callbacks in order to recover from OOM events.
      The current test is terminated, but subsequent forward-progress tests can
      proceed.  This allows a long test to result in multiple forward-progress
      failures, greatly reducing the required testing time.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      2667ccce
    • Paul E. McKenney's avatar
      rcutorture: Print forward-progress test age upon failure · 73d665b1
      Paul E. McKenney authored
      This commit prints the age of the forward-progress test in jiffies,
      in order to allow better interpretation of the callback-invocation
      histograms.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      73d665b1
    • Paul E. McKenney's avatar
      rcutorture: Print time since GP end upon forward-progress failure · c51d7b5e
      Paul E. McKenney authored
      If rcutorture's forward-progress tests fail while a grace period is not
      in progress, it is useful to print the time since the last grace period
      ended as a way to detect failure to launch a new grace period.  This
      commit therefore makes this change.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      c51d7b5e
    • Paul E. McKenney's avatar
      rcutorture: Print histogram of CB invocation at OOM time · 1a682754
      Paul E. McKenney authored
      One reason why a forward-progress test might fail would be if something
      prevented or delayed callback invocation.  This commit therefore adds a
      callback-invocation histogram printout when OOM is reported to rcutorture.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      1a682754
    • Paul E. McKenney's avatar
    • Paul E. McKenney's avatar
      rcu: Print per-CPU callback counts for forward-progress failures · bfcfcffc
      Paul E. McKenney authored
      This commit prints out the non-zero per-CPU callback counts when a
      forware-progress error (OOM event) occurs.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      [ paulmck: Fix a pair of uninitialized locals spotted by kbuild test robot. ]
      bfcfcffc
    • Paul E. McKenney's avatar
      rcu: Account for nocb-CPU callback counts in RCU CPU stall warnings · 903ee83d
      Paul E. McKenney authored
      The RCU CPU stall warnings print an estimate of the total number of
      RCU callbacks queued in the system, but this estimate leaves out
      the callbacks queued for nocbs CPUs.  This commit therefore introduces
      rcu_get_n_cbs_cpu(), which gives an accurate callback estimate for
      both nocbs and normal CPUs, and uses this new function as needed.
      
      This commit also introduces a rcu_get_n_cbs_nocb_cpu() helper function
      that returns the number of callbacks for nocbs CPUs or zero otherwise,
      and also uses this function in place of direct access to ->nocb_q_count
      while in the area (fewer characters, you see).
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      903ee83d
    • Paul E. McKenney's avatar
      rcutorture: Dump grace-period diagnostics upon forward-progress OOM · e0aff973
      Paul E. McKenney authored
      This commit adds an OOM notifier during rcutorture forward-progress
      testing.  If this notifier is invoked, it dumps out some grace-period
      state to help debug the forward-progress problem.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      e0aff973
    • Paul E. McKenney's avatar
      rcutorture: Prepare for asynchronous access to rcu_fwd_startat · 61670adc
      Paul E. McKenney authored
      Because rcutorture's forward-progress checking will trigger from an
      OOM notifier, this notifier will introduce asynchronous concurrent
      access to the rcu_fwd_startat variable.  This commit therefore prepares
      for this by converting updates to WRITE_ONCE().
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      61670adc
    • Pierce Griffiths's avatar
      torture: Remove unnecessary "ret" variables · 2a7d9688
      Pierce Griffiths authored
      Remove return variables (declared as "ret") in cases where,
      depending on whether a condition evaluates as true, the result of a
      function call can be immediately returned instead of storing the result in
      the return variable. When the condition evaluates as false, the constant
      initially stored in the return variable at declaration is returned instead.
      Signed-off-by: default avatarPierce Griffiths <pierceagriffiths@gmail.com>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      2a7d9688
    • Paul E. McKenney's avatar
      rcutorture: Affinity forward-progress test to avoid housekeeping CPUs · 5ab7ab83
      Paul E. McKenney authored
      This commit affinities the forward-progress tests to avoid hogging a
      housekeeping CPU on the theory that the offloaded callbacks will be
      running on those housekeeping CPUs.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      [ paulmck: Fix NULL-pointer issue located by kbuild test robot. ]
      Tested-by: default avatarRong Chen <rong.a.chen@intel.com>
      5ab7ab83
    • Paul E. McKenney's avatar
      rcutorture: Break up too-long rcu_torture_fwd_prog() function · 6b3de7a1
      Paul E. McKenney authored
      This commit splits rcu_torture_fwd_prog_nr() and rcu_torture_fwd_prog_cr()
      functions out of rcu_torture_fwd_prog() in order to reduce indentation
      pain and because rcu_torture_fwd_prog() was getting a bit too long.
      In addition, this will enable easier conditional execution of the
      rcu_torture_fwd_prog_cr() function, which can give false-positive
      failures in some NO_HZ_FULL configurations due to overloading the
      housekeeping CPUs.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      6b3de7a1
    • Paul E. McKenney's avatar
      rcutorture: Remove cbflood facility · fc6f9c57
      Paul E. McKenney authored
      Now that the forward-progress code does a full-bore continuous callback
      flood lasting multiple seconds, there is little point in also posting a
      mere 60,000 callbacks every second or so.  This commit therefore removes
      the old cbflood testing.  Over time, it may be desirable to concurrently
      do full-bore continuous callback floods on all CPUs simultaneously, but
      one dragon at a time.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      fc6f9c57
    • Paul E. McKenney's avatar
      torture: Bring any extra CPUs online during kernel startup · 28cf5952
      Paul E. McKenney authored
      Currently, the torture scripts rely on the initrd/init script to bring
      any extra CPUs online, for example, in the case where the kernel and
      qemu have different ideas about how many CPUs are present.  This works,
      but is an unnecessary dependency on initrd, which needs to vary depending
      on the distro.  This commit therefore causes torture_onoff() to check
      for additional CPUs, attempting to bring any found online. Errors are
      ignored, just as they are by the initrd/init script.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      28cf5952
    • Paul E. McKenney's avatar
      rcutorture: Add call_rcu() flooding forward-progress tests · 48718485
      Paul E. McKenney authored
      This commit adds a call_rcu() flooding loop to the forward-progress test.
      This emulates tight userspace loops that force call_rcu() invocations,
      for example, the infamous loop containing close(open()) that instigated
      the addition of blimit.  If RCU does not make sufficient forward progress
      in invoking the resulting flood of callbacks, rcutorture emits a warning.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      48718485
    • Paul E. McKenney's avatar
      Merge branches 'bug.2018.11.12a', 'consolidate.2018.12.01a',... · eaaf055f
      Paul E. McKenney authored
      Merge branches 'bug.2018.11.12a', 'consolidate.2018.12.01a', 'doc.2018.11.12a', 'fixes.2018.11.12a', 'initrd.2018.11.08b', 'sil.2018.11.12a' and 'srcu.2018.11.27a' into HEAD
      
      bug.2018.11.12a:  Get rid of BUG_ON() and friends
      consolidate.2018.12.01a:  Continued RCU flavor-consolidation cleanup
      doc.2018.11.12a:  Documentation updates
      fixes.2018.11.12a:  Miscellaneous fixes
      initrd.2018.11.08b:  Automate creation of rcutorture initrd
      sil.2018.11.12a:  Remove more spin_unlock_wait() calls
      eaaf055f
    • Paul E. McKenney's avatar
      rcutorture/formal: Replace synchronize_sched() with synchronize_rcu() · df56e0f9
      Paul E. McKenney authored
      Now that synchronize_rcu() waits for preempt-disable regions of code
      as well as RCU read-side critical sections, synchronize_sched() can be
      replaced by synchronize_rcu().  This commit therefore makes this change,
      even though it is but a comment.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      df56e0f9
    • Paul E. McKenney's avatar
      tools/kernel.h: Replace synchronize_sched() with synchronize_rcu() · 4a67e3a7
      Paul E. McKenney authored
      Now that synchronize_rcu() waits for preempt-disable regions of code
      as well as RCU read-side critical sections, synchronize_sched() can be
      replaced by synchronize_rcu().  This commit therefore makes this change,
      even though it is but a comment.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: <linux-kernel@vger.kernel.org>
      4a67e3a7
    • Paul E. McKenney's avatar
      net/decnet: Replace rcu_barrier_bh() with rcu_barrier() · dd06d25d
      Paul E. McKenney authored
      Now that all RCU flavors have been consolidated, rcu_barrier_bh()
      is but a synonym for rcu_barrier().  This commit therefore replaces
      the former with the latter.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: <linux-decnet-user@lists.sourceforge.net>
      Cc: <netdev@vger.kernel.org>
      dd06d25d
    • Paul E. McKenney's avatar
      net/core/skmsg: Replace call_rcu_sched() with call_rcu() · 0245b80e
      Paul E. McKenney authored
      Now that call_rcu()'s callback is not invoked until after all
      preempt-disable regions of code have completed (in addition to explicitly
      marked RCU read-side critical sections), call_rcu() can be used in place
      of call_rcu_sched().  This commit therefore makes that change.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      Cc: John Fastabend <john.fastabend@gmail.com>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: <netdev@vger.kernel.org>
      0245b80e
    • Paul E. McKenney's avatar
      livepatch: Replace synchronize_sched() with synchronize_rcu() · 6932689e
      Paul E. McKenney authored
      Now that synchronize_rcu() waits for preempt-disable regions of code
      as well as RCU read-side critical sections, synchronize_sched() can be
      replaced by synchronize_rcu().  This commit therefore makes this change,
      even though it is but a comment.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      6932689e
    • Paul E. McKenney's avatar
      cgroups: Replace synchronize_sched() with synchronize_rcu() · 2af3024c
      Paul E. McKenney authored
      Now that synchronize_rcu() waits for preempt-disable regions of code
      as well as RCU read-side critical sections, synchronize_sched() can be
      replaced by synchronize_rcu().  This commit therefore makes this change,
      even though it is but a comment.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Dennis Zhou <dennis@kernel.org>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: "Dennis Zhou (Facebook)" <dennisszhou@gmail.com>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      2af3024c
    • Paul E. McKenney's avatar
      types: Remove call_rcu_bh() and call_rcu_sched() · d5cccfc7
      Paul E. McKenney authored
      Now that call_rcu()'s callback is not invoked until after bh-disable and
      preempt-disable regions of code have completed (in addition to explicitly
      marked RCU read-side critical sections), call_rcu() can be used in place
      of call_rcu_bh() and call_rcu_sched().  This commit therefore removes
      these two API members from the callback_head structure's header comment.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      d5cccfc7
    • Paul E. McKenney's avatar
      percpu-rwsem: Replace synchronize_sched() with synchronize_rcu() · e3e74054
      Paul E. McKenney authored
      Now that synchronize_rcu() waits for preempt-disable regions of code
      as well as RCU read-side critical sections, synchronize_sched() can be
      replaced by synchronize_rcu().  This commit therefore makes this change,
      even though it is but a comment.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      Cc: Dennis Zhou <dennis@kernel.org>
      Cc: Christoph Lameter <cl@linux.com>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      e3e74054
    • Paul E. McKenney's avatar
      net/bridge: Replace call_rcu_bh() and rcu_barrier_bh() · 1a56f7d5
      Paul E. McKenney authored
      Now that call_rcu()'s callback is not invoked until after all bh-disable
      regions of code have completed (in addition to explicitly marked
      RCU read-side critical sections), call_rcu() can be used in place
      of call_rcu_bh().  Similarly, rcu_barrier() can be used in place of
      rcu_barrier_bh().  This commit therefore makes these changes.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      Cc: Roopa Prabhu <roopa@cumulusnetworks.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: <bridge@lists.linux-foundation.org>
      Cc: <netdev@vger.kernel.org>
      Acked-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      1a56f7d5
    • Paul E. McKenney's avatar
      net/core: Replace call_rcu_bh() and synchronize_rcu_bh() · 5da54c18
      Paul E. McKenney authored
      Now that call_rcu()'s callback is not invoked until after all bh-disable
      regions of code have completed (in addition to explicitly marked
      RCU read-side critical sections), call_rcu() can be used in place of
      call_rcu_bh().  Similarly, synchronize_rcu() can be used in place of
      synchronize_rcu_bh().  This commit therefore makes these changes.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: <netdev@vger.kernel.org>
      5da54c18
    • Paul E. McKenney's avatar
      net/sched: Replace call_rcu_bh() and rcu_barrier_bh() · ae0e3349
      Paul E. McKenney authored
      Now that call_rcu()'s callback is not invoked until after bh-disable
      regions of code have completed (in addition to explicitly marked
      RCU read-side critical sections), call_rcu() can be used in place
      of call_rcu_bh().  Similarly, rcu_barrier() can be used in place o
      frcu_barrier_bh().  This commit therefore makes these changes.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Cc: Cong Wang <xiyou.wangcong@gmail.com>
      Cc: Jiri Pirko <jiri@resnulli.us>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: <netdev@vger.kernel.org>
      ae0e3349
    • Linus Torvalds's avatar
      Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4b783176
      Linus Torvalds authored
      Pull STIBP fallout fixes from Thomas Gleixner:
       "The performance destruction department finally got it's act together
        and came up with a cure for the STIPB regression:
      
         - Provide a command line option to control the spectre v2 user space
           mitigations. Default is either seccomp or prctl (if seccomp is
           disabled in Kconfig). prctl allows mitigation opt-in, seccomp
           enables the migitation for sandboxed processes.
      
         - Rework the code to handle the conditional STIBP/IBPB control and
           remove the now unused ptrace_may_access_sched() optimization
           attempt
      
         - Disable STIBP automatically when SMT is disabled
      
         - Optimize the switch_to() logic to avoid MSR writes and invocations
           of __switch_to_xtra().
      
         - Make the asynchronous speculation TIF updates synchronous to
           prevent stale mitigation state.
      
        As a general cleanup this also makes retpoline directly depend on
        compiler support and removes the 'minimal retpoline' option which just
        pretended to provide some form of security while providing none"
      
      * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (31 commits)
        x86/speculation: Provide IBPB always command line options
        x86/speculation: Add seccomp Spectre v2 user space protection mode
        x86/speculation: Enable prctl mode for spectre_v2_user
        x86/speculation: Add prctl() control for indirect branch speculation
        x86/speculation: Prepare arch_smt_update() for PRCTL mode
        x86/speculation: Prevent stale SPEC_CTRL msr content
        x86/speculation: Split out TIF update
        ptrace: Remove unused ptrace_may_access_sched() and MODE_IBRS
        x86/speculation: Prepare for conditional IBPB in switch_mm()
        x86/speculation: Avoid __switch_to_xtra() calls
        x86/process: Consolidate and simplify switch_to_xtra() code
        x86/speculation: Prepare for per task indirect branch speculation control
        x86/speculation: Add command line control for indirect branch speculation
        x86/speculation: Unify conditional spectre v2 print functions
        x86/speculataion: Mark command line parser data __initdata
        x86/speculation: Mark string arrays const correctly
        x86/speculation: Reorder the spec_v2 code
        x86/l1tf: Show actual SMT state
        x86/speculation: Rework SMT state change
        sched/smt: Expose sched_smt_present static key
        ...
      4b783176
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20181201' of git://git.kernel.dk/linux-block · 88058417
      Linus Torvalds authored
      Pull block layer fixes from Jens Axboe:
      
       - Single range elevator discard merge fix, that caused crashes (Ming)
      
       - Fix for a regression in O_DIRECT, where we could potentially lose the
         error value (Maximilian Heyne)
      
       - NVMe pull request from Christoph, with little fixes all over the map
         for NVMe.
      
      * tag 'for-linus-20181201' of git://git.kernel.dk/linux-block:
        block: fix single range discard merge
        nvme-rdma: fix double freeing of async event data
        nvme: flush namespace scanning work just before removing namespaces
        nvme: warn when finding multi-port subsystems without multipathing enabled
        fs: fix lost error code in dio_complete
        nvme-pci: fix surprise removal
        nvme-fc: initialize nvme_req(rq)->ctrl after calling __nvme_fc_init_request()
        nvme: Free ctrl device name on init failure
      88058417
    • Linus Torvalds's avatar
      Merge tag 'pci-v4.20-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · c734b425
      Linus Torvalds authored
      Pull PCI fixes from Bjorn Helgaas:
      
       - Fix a link speed checking interface that broke PCIe gen3 cards in
         gen1 slots (Mikulas Patocka)
      
       - Fix an imx6 link training error (Trent Piepho)
      
       - Fix a layerscape outbound window accessor calling error (Hou
         Zhiqiang)
      
       - Fix a DesignWare endpoint MSI-X address calculation error (Gustavo
         Pimentel)
      
      * tag 'pci-v4.20-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI: Fix incorrect value returned from pcie_get_speed_cap()
        PCI: dwc: Fix MSI-X EP framework address calculation bug
        PCI: layerscape: Fix wrong invocation of outbound window disable accessor
        PCI: imx6: Fix link training status detection in link up check
      c734b425
    • Bjorn Helgaas's avatar
      Merge remote-tracking branch 'lorenzo/pci/controller-fixes' into for-linus · c74eadf8
      Bjorn Helgaas authored
        - Fix DesignWare endpoint MSI-X address calculation bug (Gustavo
          Pimentel)
      
        - Fix Layerscape outbound window disable usage (Hou Zhiqiang)
      
        - Fix imx6 link up detection (Trent Piepho)
      
      * lorenzo/pci/controller-fixes:
        PCI: dwc: Fix MSI-X EP framework address calculation bug
        PCI: layerscape: Fix wrong invocation of outbound window disable accessor
        PCI: imx6: Fix link training status detection in link up check
      c74eadf8
    • Mikulas Patocka's avatar
      PCI: Fix incorrect value returned from pcie_get_speed_cap() · f1f90e25
      Mikulas Patocka authored
      The macros PCI_EXP_LNKCAP_SLS_*GB are values, not bit masks.  We must mask
      the register and compare it against them.
      
      This fixes errors like this:
      
        amdgpu: [powerplay] failed to send message 261 ret is 0
      
      when a PCIe-v3 card is plugged into a PCIe-v1 slot, because the slot is
      being incorrectly reported as PCIe-v3 capable.
      
      6cf57be0, which appeared in v4.17, added pcie_get_speed_cap() with the
      incorrect test of PCI_EXP_LNKCAP_SLS as a bitmask.  5d9a6330, which
      appeared in v4.19, changed amdgpu to use pcie_get_speed_cap(), so the
      amdgpu bug reports below are regressions in v4.19.
      
      Fixes: 6cf57be0 ("PCI: Add pcie_get_speed_cap() to find max supported link speed")
      Fixes: 5d9a6330 ("drm/amdgpu: use pcie functions for link width and speed")
      Link: https://bugs.freedesktop.org/show_bug.cgi?id=108704
      Link: https://bugs.freedesktop.org/show_bug.cgi?id=108778Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      [bhelgaas: update comment, remove use of PCI_EXP_LNKCAP_SLS_8_0GB and
      PCI_EXP_LNKCAP_SLS_16_0GB since those should be covered by PCI_EXP_LNKCAP2,
      remove test of PCI_EXP_LNKCAP for zero, since that register is required]
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org	# v4.17+
      f1f90e25
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · d8f190ee
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "31 fixes"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (31 commits)
        ocfs2: fix potential use after free
        mm/khugepaged: fix the xas_create_range() error path
        mm/khugepaged: collapse_shmem() do not crash on Compound
        mm/khugepaged: collapse_shmem() without freezing new_page
        mm/khugepaged: minor reorderings in collapse_shmem()
        mm/khugepaged: collapse_shmem() remember to clear holes
        mm/khugepaged: fix crashes due to misaccounted holes
        mm/khugepaged: collapse_shmem() stop if punched or truncated
        mm/huge_memory: fix lockdep complaint on 32-bit i_size_read()
        mm/huge_memory: splitting set mapping+index before unfreeze
        mm/huge_memory: rename freeze_page() to unmap_page()
        initramfs: clean old path before creating a hardlink
        kernel/kcov.c: mark funcs in __sanitizer_cov_trace_pc() as notrace
        psi: make disabling/enabling easier for vendor kernels
        proc: fixup map_files test on arm
        debugobjects: avoid recursive calls with kmemleak
        userfaultfd: shmem: UFFDIO_COPY: set the page dirty if VM_WRITE is not set
        userfaultfd: shmem: add i_size checks
        userfaultfd: shmem/hugetlbfs: only allow to register VM_MAYWRITE vmas
        userfaultfd: shmem: allocate anonymous memory for MAP_PRIVATE shmem
        ...
      d8f190ee