1. 24 2月, 2016 9 次提交
    • B
      irq: Privatize irq_common_data::state_use_accessors · b354286e
      Boqun Feng 提交于
      irq_common_data::state_use_accessors is not designed for public use.
      Therefore make it private so that people who write code accessing it
      directly will get blamed by sparse. Also #undef the macro
      __irqd_to_state after used in header files, so that the macro can't be
      misused.
      Signed-off-by: NBoqun Feng <boqun.feng@gmail.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      b354286e
    • B
      RCU: Privatize rcu_node::lock · 67c583a7
      Boqun Feng 提交于
      In patch:
      
      "rcu: Add transitivity to remaining rcu_node ->lock acquisitions"
      
      All locking operations on rcu_node::lock are replaced with the wrappers
      because of the need of transitivity, which indicates we should never
      write code using LOCK primitives alone(i.e. without a proper barrier
      following) on rcu_node::lock outside those wrappers. We could detect
      this kind of misuses on rcu_node::lock in the future by adding __private
      modifier on rcu_node::lock.
      
      To privatize rcu_node::lock, unlock wrappers are also needed. Replacing
      spinlock unlocks with these wrappers not only privatizes rcu_node::lock
      but also makes it easier to figure out critical sections of rcu_node.
      
      This patch adds __private modifier to rcu_node::lock and makes every
      access to it wrapped by ACCESS_PRIVATE(). Besides, unlock wrappers are
      added and raw_spin_unlock(&rnp->lock) and its friends are replaced with
      those wrappers.
      Signed-off-by: NBoqun Feng <boqun.feng@gmail.com>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      67c583a7
    • B
      sparse: Add __private to privatize members of structs · ad315455
      Boqun Feng 提交于
      In C programming language, we don't have a easy way to privatize a
      member of a structure. However in kernel, sometimes there is a need to
      privatize a member in case of potential bugs or misuses.
      
      Fortunately, the noderef attribute of sparse is a way to privatize a
      member, as by defining a member as noderef, the address-of operator on
      the member will produce a noderef pointer to that member, and if anyone
      wants to dereference that kind of pointers to read or modify the member,
      sparse will yell.
      
      Based on this, __private modifier and related operation ACCESS_PRIVATE()
      are introduced, which could help detect undesigned public uses of
      private members of structs. Here is an example of sparse's output if it
      detect an undersigned public use:
      
      | kernel/rcu/tree.c:4453:25: warning: incorrect type in argument 1 (different modifiers)
      | kernel/rcu/tree.c:4453:25:    expected struct raw_spinlock [usertype] *lock
      | kernel/rcu/tree.c:4453:25:    got struct raw_spinlock [noderef] *<noident>
      
      Also, this patch improves compiler.h a little bit by adding comments for
      "#else" and "#endif".
      Signed-off-by: NBoqun Feng <boqun.feng@gmail.com>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      ad315455
    • C
      rcu: Remove useless rcu_data_p when !PREEMPT_RCU · 1914aab5
      Chen Gang 提交于
      The related warning from gcc 6.0:
      
        In file included from kernel/rcu/tree.c:4630:0:
        kernel/rcu/tree_plugin.h:810:40: warning: ‘rcu_data_p’ defined but not used [-Wunused-const-variable]
         static struct rcu_data __percpu *const rcu_data_p = &rcu_sched_data;
                                                ^~~~~~~~~~
      
      Also remove always redundant rcu_data_p in tree.c.
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      1914aab5
    • P
      rcutorture: Correct no-expedite console messages · aa5a8988
      Paul E. McKenney 提交于
      The "Disabled dynamic grace-period expediting" console message is
      currently printed unconditionally.  This commit causes it to be
      output only when it is impossible to switch between normal and
      expedited grace periods, which was the original intent.
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      aa5a8988
    • P
      rcu: Set rdp->gpwrap when CPU is idle · 23a9bacd
      Paul E. McKenney 提交于
      Commit #e3663b10 ("rcu: Handle gpnum/completed wrap while dyntick
      idle") sets rdp->gpwrap on the wrong side of the "if" statement in
      dyntick_save_progress_counter(), that is, it sets it when the CPU is
      not idle instead of when it is idle.  Of course, if the CPU is not idle,
      its rdp->gpnum won't be lagging beind the global rsp->gpnum, which means
      that rdp->gpwrap will never be set.
      
      This commit therefore moves this code to the proper leg of that "if"
      statement.  This change means that the "else" cause is just "return 0"
      and the "then" clause ends with "return 1", so also move the "return 0"
      to follow the "if", dropping the "else" clause.
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      23a9bacd
    • P
      rcu: Stop treating in-kernel CPU-bound workloads as errors · 4914950a
      Paul E. McKenney 提交于
      Commit 4a81e832 ("Reduce overhead of cond_resched() checks for RCU")
      handles the error case where a nohz_full loops indefinitely in the kernel
      with the scheduling-clock interrupt disabled.  However, this handling
      includes IPIing the CPU running the offending loop, which is not what
      we want for real-time workloads.  And there are starting to be real-time
      CPU-bound in-kernel workloads, and these must be handled without IPIing
      the CPU, at least not in the common case.  Therefore, this situation can
      no longer be dismissed as an error case.
      
      This commit therefore splits the handling out, so that the setting of
      bits in the per-CPU rcu_sched_qs_mask variable is done relatively early,
      but if the problem persists, resched_cpu() is eventually used to IPI the
      CPU containing the offending loop.  Assuming that in-kernel CPU-bound
      loops used by real-time tasks contain frequent calls cond_resched_rcu_qs()
      (as in more than once per few tens of milliseconds), the real-time tasks
      will never be IPIed.
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      4914950a
    • P
      rcu: Update rcu_report_qs_rsp() comment · 8994515c
      Paul E. McKenney 提交于
      The header comment for rcu_report_qs_rsp() was obsolete, dating well
      before the advent of RCU grace-period kthreads.  This commit therefore
      brings this comment back into alignment with current reality.
      Reported-by: NLihao Liang <lihao.liang@cs.ox.ac.uk>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      8994515c
    • P
      rcu: Assign false instead of 0 for ->core_needs_qs · bb53e416
      Paul E. McKenney 提交于
      A zero seems to have escaped earlier true/false substitution efforts,
      so this commit changes 0 to false for the ->core_needs_qs boolean field.
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      bb53e416
  2. 25 1月, 2016 11 次提交
    • L
      Linux 4.5-rc1 · 92e963f5
      Linus Torvalds 提交于
      92e963f5
    • L
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · e2464688
      Linus Torvalds 提交于
      Pull MIPS updates from Ralf Baechle:
       "This is the main pull request for MIPS for 4.5 plus some 4.4 fixes.
      
        The executive summary:
      
         - ATH79 platform improvments, use DT bindings for the ATH79 USB PHY.
         - Avoid useless rebuilds for zboot.
         - jz4780: Add NEMC, BCH and NAND device tree nodes
         - Initial support for the MicroChip's DT platform.  As all the device
           drivers are missing this is still of limited use.
         - Some Loongson3 cleanups.
         - The unavoidable whitespace polishing.
         - Reduce clock skew when synchronizing the CPU cycle counters on CPU
           startup.
         - Add MIPS R6 fixes.
         - Lots of cleanups across arch/mips as fallout from KVM.
         - Lots of minor fixes and changes for IEEE 754-2008 support to the
           FPU emulator / fp-assist software.
         - Minor Ralink, BCM47xx and bcm963xx platform support improvments.
         - Support SMP on BCM63168"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (84 commits)
        MIPS: zboot: Add support for serial debug using the PROM
        MIPS: zboot: Avoid useless rebuilds
        MIPS: BMIPS: Enable ARCH_WANT_OPTIONAL_GPIOLIB
        MIPS: bcm63xx: nvram: Remove unused bcm63xx_nvram_get_psi_size() function
        MIPS: bcm963xx: Update bcm_tag field image_sequence
        MIPS: bcm963xx: Move extended flash address to bcm_tag header file
        MIPS: bcm963xx: Move Broadcom BCM963xx image tag data structure
        MIPS: bcm63xx: nvram: Use nvram structure definition from header file
        MIPS: bcm963xx: Add Broadcom BCM963xx board nvram data structure
        MAINTAINERS: Add KVM for MIPS entry
        MIPS: KVM: Add missing newline to kvm_err()
        MIPS: Move KVM specific opcodes into asm/inst.h
        MIPS: KVM: Use cacheops.h definitions
        MIPS: Break down cacheops.h definitions
        MIPS: Use EXCCODE_ constants with set_except_vector()
        MIPS: Update trap codes
        MIPS: Move Cause.ExcCode trap codes to mipsregs.h
        MIPS: KVM: Make kvm_mips_{init,exit}() static
        MIPS: KVM: Refactor added offsetof()s
        MIPS: KVM: Convert EXPORT_SYMBOL to _GPL
        ...
      e2464688
    • L
      Merge tag 'platform-drivers-x86-v4.5-2' of... · e1c10879
      Linus Torvalds 提交于
      Merge tag 'platform-drivers-x86-v4.5-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86
      
      Pull x86 platform driver updates from Darren Hart:
       "Emergency travel prevented me from completing my final testing on this
        until today.  Nothing here that couldn't wait until RC1 fixes, but I
        thought it best to get it out sooner rather than later as it does
        contain a build warning fix.
      
        Summary:
      
        A build warning fix, MAINTAINERS cleanup, and a new DMI quirk:
      
        ideapad-laptop:
         - Add Lenovo Yoga 700 to no_hw_rfkill dmi list
      
        MAINTAINERS:
         - Combine multiple telemetry entries
      
        intel_telemetry_debugfs:
         - Fix unused warnings in telemetry debugfs"
      
      * tag 'platform-drivers-x86-v4.5-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86:
        ideapad-laptop: Add Lenovo Yoga 700 to no_hw_rfkill dmi list
        MAINTAINERS: Combine multiple telemetry entries
        intel_telemetry_debugfs: Fix unused warnings in telemetry debugfs
      e1c10879
    • L
      Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux · 81f05fee
      Linus Torvalds 提交于
      Pull thermal management updates from Zhang Rui:
       "The top merge commit was re-generated yesterday because two topic
        branches were dropped from this pull request in the last minute due to
        some unaddressed comments.  All the other material has been in
        linux-next for quite a while.
      
        Specifics:
      
         - Enhance thermal core to handle unexpected device cooling states
           after fresh boot and system resume.  From Zhang Rui and Chen Yu.
      
         - Several fixes and cleanups on Rockchip and RCAR thermal drivers.
           From Caesar Wang and Kuninori Morimoto.
      
         - Add Broxton support for Intel processor thermal reporting device
           driver.  From Amy Wiles"
      
      * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
        thermal: trip_point_temp_store() calls thermal_zone_device_update()
        thermal: rcar: rcar_thermal_get_temp() return error if strange temp
        thermal: rcar: check irq possibility in rcar_thermal_irq_xxx()
        thermal: rcar: check every rcar_thermal_update_temp() return value
        thermal: rcar: move rcar_thermal_dt_ids to upside
        thermal: rockchip: Support the RK3399 SoCs in thermal driver
        thermal: rockchip: Support the RK3228 SoCs in thermal driver
        dt-bindings: rockchip-thermal: Support the RK3228/RK3399 SoCs compatible
        thermal: rockchip: fix a trivial typo
        Thermal: Enable Broxton SoC thermal reporting device
        thermal: constify pch_dev_ops structure
        Thermal: do thermal zone update after a cooling device registered
        Thermal: handle thermal zone device properly during system sleep
        Thermal: initialize thermal zone device correctly
      81f05fee
    • L
      Merge tag 'for-linus-4.5-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs · c52cb431
      Linus Torvalds 提交于
      Pull 9p updates from Eric Van Hensbergen:
       "Sorry for the last minute pull request, there's was a change that
        didn't get pulled into for-next until two weeks ago and I wanted to
        give it some bake time.
      
        Summary:
      
        Rework and error handling fixes, primarily in the fscatch and fd
        transports"
      
      * tag 'for-linus-4.5-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
        fs/9p: use fscache mutex rather than spinlock
        9p: trans_fd, bail out if recv fcall if missing
        9p: trans_fd, read rework to use p9_parse_header
        net/9p: Add device name details on error
      c52cb431
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client · 00e3f5cc
      Linus Torvalds 提交于
      Pull Ceph updates from Sage Weil:
       "The two main changes are aio support in CephFS, and a series that
        fixes several issues in the authentication key timeout/renewal code.
      
        On top of that are a variety of cleanups and minor bug fixes"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
        libceph: remove outdated comment
        libceph: kill off ceph_x_ticket_handler::validity
        libceph: invalidate AUTH in addition to a service ticket
        libceph: fix authorizer invalidation, take 2
        libceph: clear messenger auth_retry flag if we fault
        libceph: fix ceph_msg_revoke()
        libceph: use list_for_each_entry_safe
        ceph: use i_size_{read,write} to get/set i_size
        ceph: re-send AIO write request when getting -EOLDSNAP error
        ceph: Asynchronous IO support
        ceph: Avoid to propagate the invalid page point
        ceph: fix double page_unlock() in page_mkwrite()
        rbd: delete an unnecessary check before rbd_dev_destroy()
        libceph: use list_next_entry instead of list_entry_next
        ceph: ceph_frag_contains_value can be boolean
        ceph: remove unused functions in ceph_frag.h
      00e3f5cc
    • L
      Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 · 772950ed
      Linus Torvalds 提交于
      Pull SMB3 fixes from Steve French:
       "A collection of CIFS/SMB3 fixes.
      
        It includes a couple bug fixes, a few for improved debugging of
        cifs.ko and some improvements to the way cifs does key generation.
      
        I do have some additional bug fixes I expect in the next week or two
        (to address a problem found by xfstest, and some fixes for SMB3.11
        dialect, and a couple patches that just came in yesterday that I am
        reviewing)"
      
      * 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
        cifs_dbg() outputs an uninitialized buffer in cifs_readdir()
        cifs: fix race between call_async() and reconnect()
        Prepare for encryption support (first part). Add decryption and encryption key generation. Thanks to Metze for helping with this.
        cifs: Allow using O_DIRECT with cache=loose
        cifs: Make echo interval tunable
        cifs: Check uniqueid for SMB2+ and return -ESTALE if necessary
        Print IP address of unresponsive server
        cifs: Ratelimit kernel log messages
      772950ed
    • J
      ideapad-laptop: Add Lenovo Yoga 700 to no_hw_rfkill dmi list · 6b31de3e
      Josh Boyer 提交于
      Like the Yoga 900 models the Lenovo Yoga 700 does not have a
      hw rfkill switch, and trying to read the hw rfkill switch through the
      ideapad module causes it to always reported blocking breaking wifi.
      
      This commit adds the Lenovo Yoga 700 to the no_hw_rfkill dmi list, fixing
      the wifi breakage.
      
      BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1295272
      Tested-by: <dinyar.rabady+spam@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJosh Boyer <jwboyer@fedoraproject.org>
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      6b31de3e
    • S
      MAINTAINERS: Combine multiple telemetry entries · f1fc3cd8
      Souvik Kumar Chakravarty 提交于
      This patch combines all the telemetry file entries in MAINTAINERS via
      wildcard.
      Signed-off-by: NSouvik Kumar Chakravarty <souvik.k.chakravarty@intel.com>
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      f1fc3cd8
    • S
      intel_telemetry_debugfs: Fix unused warnings in telemetry debugfs · 7885f2f9
      Souvik Kumar Chakravarty 提交于
      This patch fixes compile time warnings when CONFIG_PM_SLEEP
      is undefined. In this case sleep related counters are unused.
      Signed-off-by: NSouvik Kumar Chakravarty <souvik.k.chakravarty@intel.com>
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      7885f2f9
    • C
      vmstat: Remove BUG_ON from vmstat_update · 587198ba
      Christoph Lameter 提交于
      If we detect that there is nothing to do just set the flag and do not
      check if it was already set before.  Races really do not matter.  If the
      flag is set by any code then the shepherd will start dealing with the
      situation and reenable the vmstat workers when necessary again.
      
      Since commit 0eb77e98 ("vmstat: make vmstat_updater deferrable again
      and shut down on idle") quiet_vmstat might update cpu_stat_off and mark
      a particular cpu to be handled by vmstat_shepherd.  This might trigger a
      VM_BUG_ON in vmstat_update because the work item might have been
      sleeping during the idle period and see the cpu_stat_off updated after
      the wake up.  The VM_BUG_ON is therefore misleading and no more
      appropriate.  Moreover it doesn't really suite any protection from real
      bugs because vmstat_shepherd will simply reschedule the vmstat_work
      anytime it sees a particular cpu set or vmstat_update would do the same
      from the worker context directly.  Even when the two would race the
      result wouldn't be incorrect as the counters update is fully idempotent.
      Reported-by: NSasha Levin <sasha.levin@oracle.com>
      Signed-off-by: NChristoph Lameter <cl@linux.com>
      Acked-by: NMichal Hocko <mhocko@suse.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      587198ba
  3. 24 1月, 2016 20 次提交