1. 29 Jan, 2016 2 commits
    • Rafael J. Wysocki's avatar
      Merge branches 'pm-cpuidle', 'pm-cpufreq', 'pm-domains' and 'pm-sleep' · ad1ac947
      Rafael J. Wysocki authored
      * pm-cpuidle:
        cpuidle: coupled: remove unused define cpuidle_coupled_lock
        cpuidle: fix fallback mechanism for suspend to idle in absence of enter_freeze
      
      * pm-cpufreq:
        cpufreq: cpufreq-dt: avoid uninitialized variable warnings:
        cpufreq: pxa2xx: fix pxa_cpufreq_change_voltage prototype
        cpufreq: Use list_is_last() to check last entry of the policy list
        cpufreq: Fix NULL reference crash while accessing policy->governor_data
      
      * pm-domains:
        PM / Domains: Fix typo in comment
        PM / Domains: Fix potential deadlock while adding/removing subdomains
        PM / domains: fix lockdep issue for all subdomains
      
      * pm-sleep:
        PM: APM_EMULATION does not depend on PM
      ad1ac947
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-video' and 'acpi-hotplug' · 0bce39cc
      Rafael J. Wysocki authored
      * acpi-video:
        ACPI: Revert "ACPI / video: Add Dell Inspiron 5737 to the blacklist"
      
      * acpi-hotplug:
        ACPI / PCI / hotplug: unlock in error path in acpiphp_enable_slot()
      0bce39cc
  2. 27 Jan, 2016 8 commits
    • Arnd Bergmann's avatar
      cpufreq: cpufreq-dt: avoid uninitialized variable warnings: · b331bc20
      Arnd Bergmann authored
      gcc warns quite a bit about values returned from allocate_resources()
      in cpufreq-dt.c:
      
      cpufreq-dt.c: In function 'cpufreq_init':
      cpufreq-dt.c:327:6: error: 'cpu_dev' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      cpufreq-dt.c:197:17: note: 'cpu_dev' was declared here
      cpufreq-dt.c:376:2: error: 'cpu_clk' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      cpufreq-dt.c:199:14: note: 'cpu_clk' was declared here
      cpufreq-dt.c: In function 'dt_cpufreq_probe':
      cpufreq-dt.c:461:2: error: 'cpu_clk' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      cpufreq-dt.c:447:14: note: 'cpu_clk' was declared here
      
      The problem is that it's slightly hard for gcc to follow return
      codes across PTR_ERR() calls.
      
      This patch uses explicit assignments to the "ret" variable to make
      it easier for gcc to verify that the code is actually correct,
      without the need to add a bogus initialization.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      b331bc20
    • Arnd Bergmann's avatar
      cpufreq: pxa2xx: fix pxa_cpufreq_change_voltage prototype · fb2a24a1
      Arnd Bergmann authored
      There are two definitions of pxa_cpufreq_change_voltage, with slightly
      different prototypes after one of them had its argument marked 'const'.
      Now the other one (for !CONFIG_REGULATOR) produces a harmless warning:
      
      drivers/cpufreq/pxa2xx-cpufreq.c: In function 'pxa_set_target':
      drivers/cpufreq/pxa2xx-cpufreq.c:291:36: warning: passing argument 1 of 'pxa_cpufreq_change_voltage' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
         ret = pxa_cpufreq_change_voltage(&pxa_freq_settings[idx]);
                                          ^
      drivers/cpufreq/pxa2xx-cpufreq.c:205:12: note: expected 'struct pxa_freqs *' but argument is of type 'const struct pxa_freqs *'
       static int pxa_cpufreq_change_voltage(struct pxa_freqs *pxa_freq)
                  ^
      
      This changes the prototype in the same way as the other, which
      avoids the warning.
      
      Fixes: 03c22990 (cpufreq: pxa: make pxa_freqs arrays const)
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Cc: 4.2+ <stable@vger.kernel.org> # 4.2+
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      fb2a24a1
    • Arnd Bergmann's avatar
      PM: APM_EMULATION does not depend on PM · 993e9fe1
      Arnd Bergmann authored
      The APM emulation code does multiple things, and some of them depend on
      PM_SLEEP, while the battery management does not. However, selecting
      the symbol like SHARPSL_PM does causes a Kconfig warning:
      
      warning: (SHARPSL_PM && PMAC_APM_EMU) selects APM_EMULATION which has unmet direct dependencies (PM && SYS_SUPPORTS_APM_EMULATION)
      
      From all I can tell, this is completely harmless, and we can simply allow
      APM_EMULATION to be enabled here, even if PM is not.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      993e9fe1
    • Gautham R Shenoy's avatar
      cpufreq: Use list_is_last() to check last entry of the policy list · 2dadfd75
      Gautham R Shenoy authored
      Currently next_policy() explicitly checks if a policy is the last
      policy in the cpufreq_policy_list. Use the standard list_is_last
      primitive instead.
      Signed-off-by: default avatarGautham R. Shenoy <ego@linux.vnet.ibm.com>
      Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      2dadfd75
    • Viresh Kumar's avatar
      cpufreq: Fix NULL reference crash while accessing policy->governor_data · e4b133cc
      Viresh Kumar authored
      There is a race discovered by Juri, where we are able to:
      - create and read a sysfs file before policy->governor_data is being set
        to a non NULL value.
        OR
      - set policy->governor_data to NULL, and reading a file before being
        destroyed.
      
      And so such a crash is reported:
      
      Unable to handle kernel NULL pointer dereference at virtual address 0000000c
      pgd = edfc8000
      [0000000c] *pgd=bfc8c835
      Internal error: Oops: 17 [#1] SMP ARM
      Modules linked in:
      CPU: 4 PID: 1730 Comm: cat Not tainted 4.5.0-rc1+ #463
      Hardware name: ARM-Versatile Express
      task: ee8e8480 ti: ee930000 task.ti: ee930000
      PC is at show_ignore_nice_load_gov_pol+0x24/0x34
      LR is at show+0x4c/0x60
      pc : [<c058f1bc>]    lr : [<c058ae88>]    psr: a0070013
      sp : ee931dd0  ip : ee931de0  fp : ee931ddc
      r10: ee4bc290  r9 : 00001000  r8 : ef2cb000
      r7 : ee4bc200  r6 : ef2cb000  r5 : c0af57b0  r4 : ee4bc2e0
      r3 : 00000000  r2 : 00000000  r1 : c0928df4  r0 : ef2cb000
      Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
      Control: 10c5387d  Table: adfc806a  DAC: 00000051
      Process cat (pid: 1730, stack limit = 0xee930210)
      Stack: (0xee931dd0 to 0xee932000)
      1dc0:                                     ee931dfc ee931de0 c058ae88 c058f1a4
      1de0: edce3bc0 c07bfca4 edce3ac0 00001000 ee931e24 ee931e00 c01fcb90 c058ae48
      1e00: 00000001 edce3bc0 00000000 00000001 ee931e50 ee8ff480 ee931e34 ee931e28
      1e20: c01fb33c c01fcb0c ee931e8c ee931e38 c01a5210 c01fb314 ee931e9c ee931e48
      1e40: 00000000 edce3bf0 befe4a00 ee931f78 00000000 00000000 000001e4 00000000
      1e60: c00545a8 edce3ac0 00001000 00001000 befe4a00 ee931f78 00000000 00001000
      1e80: ee931ed4 ee931e90 c01fbed8 c01a5038 ed085a58 00020000 00000000 00000000
      1ea0: c0ad72e4 ee931f78 ee8ff488 ee8ff480 c077f3fc 00001000 befe4a00 ee931f78
      1ec0: 00000000 00001000 ee931f44 ee931ed8 c017c328 c01fbdc4 00001000 00000000
      1ee0: ee8ff480 00001000 ee931f44 ee931ef8 c017c65c c03deb10 ee931fac ee931f08
      1f00: c0009270 c001f290 c0a8d968 ef2cb000 ef2cb000 ee8ff480 00000020 ee8ff480
      1f20: ee8ff480 befe4a00 00001000 ee931f78 00000000 00000000 ee931f74 ee931f48
      1f40: c017d1ec c017c2f8 c019c724 c019c684 ee8ff480 ee8ff480 00001000 befe4a00
      1f60: 00000000 00000000 ee931fa4 ee931f78 c017d2a8 c017d160 00000000 00000000
      1f80: 000a9f20 00001000 befe4a00 00000003 c000ffe4 ee930000 00000000 ee931fa8
      1fa0: c000fe40 c017d264 000a9f20 00001000 00000003 befe4a00 00001000 00000000
      Unable to handle kernel NULL pointer dereference at virtual address 0000000c
      1fc0: 000a9f20 00001000 befe4a00 00000003 00000000 00000000 00000003 00000001
      pgd = edfc4000
      [0000000c] *pgd=bfcac835
      1fe0: 00000000 befe49dc 000197f8 b6e35dfc 60070010 00000003 3065b49d 134ac2c9
      
      [<c058f1bc>] (show_ignore_nice_load_gov_pol) from [<c058ae88>] (show+0x4c/0x60)
      [<c058ae88>] (show) from [<c01fcb90>] (sysfs_kf_seq_show+0x90/0xfc)
      [<c01fcb90>] (sysfs_kf_seq_show) from [<c01fb33c>] (kernfs_seq_show+0x34/0x38)
      [<c01fb33c>] (kernfs_seq_show) from [<c01a5210>] (seq_read+0x1e4/0x4e4)
      [<c01a5210>] (seq_read) from [<c01fbed8>] (kernfs_fop_read+0x120/0x1a0)
      [<c01fbed8>] (kernfs_fop_read) from [<c017c328>] (__vfs_read+0x3c/0xe0)
      [<c017c328>] (__vfs_read) from [<c017d1ec>] (vfs_read+0x98/0x104)
      [<c017d1ec>] (vfs_read) from [<c017d2a8>] (SyS_read+0x50/0x90)
      [<c017d2a8>] (SyS_read) from [<c000fe40>] (ret_fast_syscall+0x0/0x1c)
      Code: e5903044 e1a00001 e3081df4 e34c1092 (e593300c)
      ---[ end trace 5994b9a5111f35ee ]---
      
      Fix that by making sure, policy->governor_data is updated at the right
      places only.
      
      Cc: 4.2+ <stable@vger.kernel.org> # 4.2+
      Reported-and-tested-by: default avatarJuri Lelli <juri.lelli@arm.com>
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e4b133cc
    • Anders Roxell's avatar
      cpuidle: coupled: remove unused define cpuidle_coupled_lock · 75274b33
      Anders Roxell authored
      This was found with the -RT patch enabled, but the fix should apply to
      non-RT also.
      
      Used multi_v7_defconfig+PREEMPT_RT_FULL=y and this caused a compilation
      warning without this fix:
      ../drivers/cpuidle/coupled.c:122:21: warning: 'cpuidle_coupled_lock'
      defined but not used [-Wunused-variable]
      Signed-off-by: default avatarAnders Roxell <anders.roxell@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      75274b33
    • Moritz Fischer's avatar
    • Ulf Hansson's avatar
      PM / Domains: Fix potential deadlock while adding/removing subdomains · cdb300a0
      Ulf Hansson authored
      We must preserve the same order of how we acquire and release the lock for
      genpd, as otherwise we may encounter deadlocks.
      
      The power on phase of a genpd starts by acquiring its lock. Then it walks
      the hierarchy of its parent domains to be able to power on these first, as
      per design of genpd.
      
      From a locking perspective this means the locks of the parents becomes
      acquired after the lock of the subdomain.
      
      Let's fix pm_genpd_add|remove_subdomain() to maintain the same order of
      acquiring/releasing the genpd lock as being applied in the power on/off
      sequence.
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      cdb300a0
  3. 24 Jan, 2016 30 commits
    • Linus Torvalds's avatar
      Linux 4.5-rc1 · 92e963f5
      Linus Torvalds authored
      92e963f5
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · e2464688
      Linus Torvalds authored
      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
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v4.5-2' of... · e1c10879
      Linus Torvalds authored
      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
    • Linus Torvalds's avatar
      Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux · 81f05fee
      Linus Torvalds authored
      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
    • Linus Torvalds's avatar
      Merge tag 'for-linus-4.5-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs · c52cb431
      Linus Torvalds authored
      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
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client · 00e3f5cc
      Linus Torvalds authored
      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
    • Linus Torvalds's avatar
      Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 · 772950ed
      Linus Torvalds authored
      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
    • Josh Boyer's avatar
      ideapad-laptop: Add Lenovo Yoga 700 to no_hw_rfkill dmi list · 6b31de3e
      Josh Boyer authored
      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: default avatarJosh Boyer <jwboyer@fedoraproject.org>
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      6b31de3e
    • Souvik Kumar Chakravarty's avatar
      MAINTAINERS: Combine multiple telemetry entries · f1fc3cd8
      Souvik Kumar Chakravarty authored
      This patch combines all the telemetry file entries in MAINTAINERS via
      wildcard.
      Signed-off-by: default avatarSouvik Kumar Chakravarty <souvik.k.chakravarty@intel.com>
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      f1fc3cd8
    • Souvik Kumar Chakravarty's avatar
      intel_telemetry_debugfs: Fix unused warnings in telemetry debugfs · 7885f2f9
      Souvik Kumar Chakravarty authored
      This patch fixes compile time warnings when CONFIG_PM_SLEEP
      is undefined. In this case sleep related counters are unused.
      Signed-off-by: default avatarSouvik Kumar Chakravarty <souvik.k.chakravarty@intel.com>
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      7885f2f9
    • Christoph Lameter's avatar
      vmstat: Remove BUG_ON from vmstat_update · 587198ba
      Christoph Lameter authored
      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: default avatarSasha Levin <sasha.levin@oracle.com>
      Signed-off-by: default avatarChristoph Lameter <cl@linux.com>
      Acked-by: default avatarMichal 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: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      587198ba
    • Ralf Baechle's avatar
      07d17f09
    • Alban Bedel's avatar
      MIPS: zboot: Add support for serial debug using the PROM · dbb98314
      Alban Bedel authored
      As most platforms implement the PROM serial interface prom_putchar()
      add a simple bridge to allow re-using this code for zboot.
      Signed-off-by: default avatarAlban Bedel <albeu@free.fr>
      Cc: Alex Smith <alex.smith@imgtec.com>
      Cc: Andrew Bresticker <abrestic@chromium.org>
      Cc: Wu Zhangjin <wuzhangjin@gmail.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11811/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      dbb98314
    • Alban Bedel's avatar
      MIPS: zboot: Avoid useless rebuilds · 25f66096
      Alban Bedel authored
      Add dummy.o to the targets list, and fill targets automatically from
      $(vmlinuzobjs) to avoid having to maintain two lists.
      
      When building with XZ compression copy ashldi3.c to the build
      directory to use a different object file for the kernel and zboot.
      Without this the same object file need to be build with different
      flags which cause a rebuild at every run.
      Signed-off-by: default avatarAlban Bedel <albeu@free.fr>
      Cc: linux-mips@linux-mips.org
      Cc: Alex Smith <alex.smith@imgtec.com>
      Cc: Wu Zhangjin <wuzhangjin@gmail.com>
      Cc: Andrew Bresticker <abrestic@chromium.org>
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11810/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      25f66096
    • Florian Fainelli's avatar
      MIPS: BMIPS: Enable ARCH_WANT_OPTIONAL_GPIOLIB · a7b43812
      Florian Fainelli authored
      Allow BMIPS_GENERIC supported platforms to build GPIO controller
      drivers.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Reviewed-by: default avatarDragan Stancevic <dragan.stancevic@gmail.com>
      Cc: cernekee@gmail.com
      Cc: jaedon.shin@gmail.com
      Cc: gregory.0xf0@gmail.com
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/12019/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      a7b43812
    • Simon Arlott's avatar
      MIPS: bcm63xx: nvram: Remove unused bcm63xx_nvram_get_psi_size() function · 5bdb102b
      Simon Arlott authored
      Remove bcm63xx_nvram_get_psi_size() as it now has no users.
      Signed-off-by: default avatarSimon Arlott <simon@fire.lp0.eu>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Brian Norris <computersforpeace@gmail.com>
      Cc: Kevin Cernekee <cernekee@gmail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Jonas Gorski <jogo@openwrt.org>
      Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
      Cc: MIPS Mailing List <linux-mips@linux-mips.org>
      Cc: MTD Maling List <linux-mtd@lists.infradead.org>
      Patchwork: https://patchwork.linux-mips.org/patch/11836/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      5bdb102b
    • Simon Arlott's avatar
      MIPS: bcm963xx: Update bcm_tag field image_sequence · 696569f7
      Simon Arlott authored
      The "dual_image" and "inactive_flag" fields should be merged into a single
      "image_sequence" field.
      Signed-off-by: default avatarSimon Arlott <simon@fire.lp0.eu>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Brian Norris <computersforpeace@gmail.com>
      Cc: Kevin Cernekee <cernekee@gmail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Jonas Gorski <jogo@openwrt.org>
      Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
      Cc: MIPS Mailing List <linux-mips@linux-mips.org>
      Cc: MTD Maling List <linux-mtd@lists.infradead.org>
      Patchwork: https://patchwork.linux-mips.org/patch/11834/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      696569f7
    • Simon Arlott's avatar
      MIPS: bcm963xx: Move extended flash address to bcm_tag header file · 1f29cb19
      Simon Arlott authored
      The extended flash address needs to be subtracted from bcm_tag flash
      image offsets. Move this value to the bcm_tag header file.
      
      Renamed define name to consistently use bcm963xx for flash layout
      which should be considered a property of the board and not the SoC
      (i.e. bcm63xx could theoretically be used on a board without CFE
      or any flash).
      Signed-off-by: default avatarSimon Arlott <simon@fire.lp0.eu>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Brian Norris <computersforpeace@gmail.com>
      Cc: Kevin Cernekee <cernekee@gmail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Jonas Gorski <jogo@openwrt.org>
      Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
      Cc: MIPS Mailing List <linux-mips@linux-mips.org>
      Cc: MTD Maling List <linux-mtd@lists.infradead.org>
      Patchwork: https://patchwork.linux-mips.org/patch/11833/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      1f29cb19
    • Simon Arlott's avatar
      MIPS: bcm963xx: Move Broadcom BCM963xx image tag data structure · 8fce60b8
      Simon Arlott authored
      Move Broadcom BCM963xx image tag data structure to include/linux/
      so that drivers outside of mach-bcm63xx can use it.
      Signed-off-by: default avatarSimon Arlott <simon@fire.lp0.eu>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Brian Norris <computersforpeace@gmail.com>
      Cc: Kevin Cernekee <cernekee@gmail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Jonas Gorski <jogo@openwrt.org>
      Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
      Cc: MIPS Mailing List <linux-mips@linux-mips.org>
      Cc: MTD Maling List <linux-mtd@lists.infradead.org>
      Patchwork: https://patchwork.linux-mips.org/patch/11832/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      8fce60b8
    • Simon Arlott's avatar
      MIPS: bcm63xx: nvram: Use nvram structure definition from header file · 5a8b0b13
      Simon Arlott authored
      Use the common definition of the nvram structure from the header file
      include/linux/bcm963xx_nvram.h instead of maintaining a separate copy.
      
      Read the version 5 size of nvram data from memory and then call the
      new checksum verification function from the header file.
      Signed-off-by: default avatarSimon Arlott <simon@fire.lp0.eu>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Brian Norris <computersforpeace@gmail.com>
      Cc: Kevin Cernekee <cernekee@gmail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Jonas Gorski <jogo@openwrt.org>
      Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
      Cc: MIPS Mailing List <linux-mips@linux-mips.org>
      Cc: MTD Maling List <linux-mtd@lists.infradead.org>
      Patchwork: https://patchwork.linux-mips.org/patch/11831/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      5a8b0b13
    • Simon Arlott's avatar
      MIPS: bcm963xx: Add Broadcom BCM963xx board nvram data structure · 3271e610
      Simon Arlott authored
      Broadcom BCM963xx boards have multiple nvram variants across different
      SoCs with additional checksum fields added whenever the size of the
      nvram was extended.
      
      Add this structure as a header file so that multiple drivers can use it.
      Signed-off-by: default avatarSimon Arlott <simon@fire.lp0.eu>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Brian Norris <computersforpeace@gmail.com>
      Cc: Kevin Cernekee <cernekee@gmail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Jonas Gorski <jogo@openwrt.org>
      Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
      Cc: MIPS Mailing List <linux-mips@linux-mips.org>
      Cc: MTD Maling List <linux-mtd@lists.infradead.org>
      Patchwork: https://patchwork.linux-mips.org/patch/11830/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      3271e610
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma · 048ccca8
      Linus Torvalds authored
      Pull rdma updates from Doug Ledford:
       "Initial roundup of 4.5 merge window patches
      
         - Remove usage of ib_query_device and instead store attributes in
           ib_device struct
      
         - Move iopoll out of block and into lib, rename to irqpoll, and use
           in several places in the rdma stack as our new completion queue
           polling library mechanism.  Update the other block drivers that
           already used iopoll to use the new mechanism too.
      
         - Replace the per-entry GID table locks with a single GID table lock
      
         - IPoIB multicast cleanup
      
         - Cleanups to the IB MR facility
      
         - Add support for 64bit extended IB counters
      
         - Fix for netlink oops while parsing RDMA nl messages
      
         - RoCEv2 support for the core IB code
      
         - mlx4 RoCEv2 support
      
         - mlx5 RoCEv2 support
      
         - Cross Channel support for mlx5
      
         - Timestamp support for mlx5
      
         - Atomic support for mlx5
      
         - Raw QP support for mlx5
      
         - MAINTAINERS update for mlx4/mlx5
      
         - Misc ocrdma, qib, nes, usNIC, cxgb3, cxgb4, mlx4, mlx5 updates
      
         - Add support for remote invalidate to the iSER driver (pushed
           through the RDMA tree due to dependencies, acknowledged by nab)
      
         - Update to NFSoRDMA (pushed through the RDMA tree due to
           dependencies, acknowledged by Bruce)"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (169 commits)
        IB/mlx5: Unify CQ create flags check
        IB/mlx5: Expose Raw Packet QP to user space consumers
        {IB, net}/mlx5: Move the modify QP operation table to mlx5_ib
        IB/mlx5: Support setting Ethernet priority for Raw Packet QPs
        IB/mlx5: Add Raw Packet QP query functionality
        IB/mlx5: Add create and destroy functionality for Raw Packet QP
        IB/mlx5: Refactor mlx5_ib_qp to accommodate other QP types
        IB/mlx5: Allocate a Transport Domain for each ucontext
        net/mlx5_core: Warn on unsupported events of QP/RQ/SQ
        net/mlx5_core: Add RQ and SQ event handling
        net/mlx5_core: Export transport objects
        IB/mlx5: Expose CQE version to user-space
        IB/mlx5: Add CQE version 1 support to user QPs and SRQs
        IB/mlx5: Fix data validation in mlx5_ib_alloc_ucontext
        IB/sa: Fix netlink local service GFP crash
        IB/srpt: Remove redundant wc array
        IB/qib: Improve ipoib UD performance
        IB/mlx4: Advertise RoCE v2 support
        IB/mlx4: Create and use another QP1 for RoCEv2
        IB/mlx4: Enable send of RoCE QP1 packets with IP/UDP headers
        ...
      048ccca8
    • James Hogan's avatar
      MAINTAINERS: Add KVM for MIPS entry · bfd3d532
      James Hogan authored
      I've pretty much been maintaining KVM for MIPS for a while now. Lets
      make it more official (and make sure I get Cc'd on relevant patches).
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Gleb Natapov <gleb@kernel.org>
      Cc: linux-mips@linux-mips.org
      Cc: kvm@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11898/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      bfd3d532
    • James Hogan's avatar
      MIPS: KVM: Add missing newline to kvm_err() · f7fdcb60
      James Hogan authored
      Add missing newline to end of kvm_err string when guest PMAP couldn't be
      allocated.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: Gleb Natapov <gleb@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: kvm@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/11896/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      f7fdcb60
    • James Hogan's avatar
      MIPS: Move KVM specific opcodes into asm/inst.h · b2c59635
      James Hogan authored
      The header arch/mips/kvm/opcode.h defines a few extra opcodes which
      aren't in arch/mips/include/uapi/asm/inst.h. There's nothing KVM
      specific about them, so lets move them into inst.h where they belong and
      delete the header.
      
      Note that mfmcz_op is renamed to mfmc0_op to match the instruction set
      manual, and wait_op was already added to inst.h in commit b0a3eae2
      ("MIPS: inst.h: define COP0 wait op"), merged in v3.16-rc1.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Gleb Natapov <gleb@kernel.org>
      Cc: linux-mips@linux-mips.org
      Cc: kvm@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11895/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      b2c59635
    • James Hogan's avatar
      MIPS: KVM: Use cacheops.h definitions · f4956f62
      James Hogan authored
      Drop the custom cache operation code definitions used by KVM for
      emulating guest CACHE instructions, and switch to use the existing
      definitions in <asm/cacheops.h>.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Gleb Natapov <gleb@kernel.org>
      Cc: kvm@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/11893/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      f4956f62
    • James Hogan's avatar
      MIPS: Break down cacheops.h definitions · 5fa393c8
      James Hogan authored
      Most of the cache op codes defined in cacheops.h are split into a 2-bit
      cache identifier, and a 3-bit cache op code which does largely the same
      thing semantically regardless of the cache identifier.
      
      To allow the use of these definitions by KVM for decoding cache ops,
      break the definitions down into parts where it makes sense to do so, and
      add masks for the Cache and Op field within the cache op.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Gleb Natapov <gleb@kernel.org>
      Cc: kvm@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11892/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      5fa393c8
    • James Hogan's avatar
      MIPS: Use EXCCODE_ constants with set_except_vector() · 1b505def
      James Hogan authored
      The first argument to set_except_vector is the ExcCode, which we now
      have definitions for. Lets make use of them.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Gleb Natapov <gleb@kernel.org>
      Cc: linux-mips@linux-mips.org
      Cc: kvm@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11894/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      1b505def
    • James Hogan's avatar
      MIPS: Update trap codes · 044c9bb8
      James Hogan authored
      Add a few missing trap codes.
      
      [ralf@linux-mips.org: Drop removal of exception codes.  I don't care what
      the incomplete architecture spec says; it can't change existing hardware
      and VCEI is supported indeed.]
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Gleb Natapov <gleb@kernel.org>
      Cc: kvm@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11890/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      044c9bb8
    • James Hogan's avatar
      MIPS: Move Cause.ExcCode trap codes to mipsregs.h · 16d100db
      James Hogan authored
      Move the Cause.ExcCode trap code definitions from kvm_host.h to
      mipsregs.h, since they describe architectural bits rather than KVM
      specific constants, and change the prefix from T_ to EXCCODE_.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Gleb Natapov <gleb@kernel.org>
      Cc: linux-mips@linux-mips.org
      Cc: kvm@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11891/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      16d100db