1. 18 Oct, 2018 6 commits
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-cpuidle' · 41fd838c
      Rafael J. Wysocki authored
      * pm-cpuidle:
        cpuidle: menu: Avoid computations when result will be discarded
        cpuidle: menu: Drop redundant comparison
        cpuidle: menu: Simplify checks related to the polling state
        cpuidle: poll_state: Revise loop termination condition
        cpuidle: menu: Move the latency_req == 0 special case check
        cpuidle: menu: Avoid computations for very close timers
        cpuidle: menu: Do not update last_state_idx in menu_select()
        cpuidle: menu: Get rid of first_idx from menu_select()
        cpuidle: menu: Compute first_idx when latency_req is known
        cpuidle: menu: Fix wakeup statistics updates for polling state
        cpuidle: menu: Replace data->predicted_us with local variable
        cpuidle: enter_state: Don't needlessly calculate diff time
        cpuidle: Remove unnecessary wrapper cpuidle_get_last_residency()
        intel_idle: Get rid of custom ICPU() macro
      41fd838c
    • Ulf Hansson's avatar
      PM / Domains: Document flags for genpd · e5089c2c
      Ulf Hansson authored
      The current documented description of the GENPD_FLAG_* flags, are too
      simplified, so let's extend them.
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e5089c2c
    • Ulf Hansson's avatar
      PM / Domains: Deal with multiple states but no governor in genpd · 2c9b7f87
      Ulf Hansson authored
      A caller of pm_genpd_init() that provides some states for the genpd via the
      ->states pointer in the struct generic_pm_domain, should also provide a
      governor. This because it's the job of the governor to pick a state that
      satisfies the constraints.
      
      Therefore, let's print a warning to inform the user about such bogus
      configuration and avoid to bail out, by instead picking the shallowest
      state before genpd invokes the ->power_off() callback.
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Reviewed-by: default avatarLina Iyer <ilina@codeaurora.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      2c9b7f87
    • Ulf Hansson's avatar
      PM / Domains: Don't treat zero found compatible idle states as an error · 2c361684
      Ulf Hansson authored
      Instead of returning -EINVAL from of_genpd_parse_idle_states() in case none
      compatible states was found, let's return 0 to indicate success. Assign
      also the out-parameter *states to NULL and *n to 0, to indicate to the
      caller that zero states have been found/allocated.
      
      This enables the caller of of_genpd_parse_idle_states() to easier act on
      the returned error code.
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Reviewed-by: default avatarLina Iyer <ilina@codeaurora.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      2c361684
    • Rafael J. Wysocki's avatar
      cpuidle: menu: Avoid computations when result will be discarded · f1c8e410
      Rafael J. Wysocki authored
      If the minimum interval taken into account in the average computation
      loop in get_typical_interval() is less than the expected idle
      duration determined so far, the resultant average cannot be greater
      than that value as well and the entire return result of the function
      is going to be discarded anyway going forward.
      
      In that case, it is a waste of time to carry out the remaining
      computations in get_typical_interval(), so avoid that by returning
      early if the minimum interval is not below the expected idle duration.
      
      No intentional changes of behavior.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      f1c8e410
    • Rafael J. Wysocki's avatar
      cpuidle: menu: Drop redundant comparison · 12b65ead
      Rafael J. Wysocki authored
      Since the correction factor cannot be greater than RESOLUTION * DECAY,
      the result of the predicted_us computation in menu_select() cannot be
      greater than data->next_timer_us, so it is not necessary to compare
      the "typical interval" value coming from get_typical_interval() with
      data->next_timer_us separately.
      
      It is sufficient to copmare predicted_us with the return value of
      get_typical_interval() directly, so do that and drop the now
      redundant expected_interval variable.
      
      No intentional changes of behavior.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      12b65ead
  2. 15 Oct, 2018 1 commit
  3. 14 Oct, 2018 2 commits
  4. 13 Oct, 2018 11 commits
  5. 12 Oct, 2018 19 commits
    • Greg Kroah-Hartman's avatar
      Merge tag 'armsoc-fixes-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · bab5c80b
      Greg Kroah-Hartman authored
      Arnd writes:
        "ARM: SoC fixes for 4.19
      
         Two last minute bugfixes, both for NXP platforms:
      
         * The Layerscape 'qbman' infrastructure suffers from probe ordering
           bugs in some configurations, a two-patch series adds a hotfix for
           this. 4.20 will have a longer set of patches to rework it.
      
         * The old imx53-qsb board regressed in 4.19 after the addition
           of cpufreq support, adding a set of explicit operating points
           fixes this."
      
      * tag 'armsoc-fixes-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        soc: fsl: qman_portals: defer probe after qman's probe
        soc: fsl: qbman: add APIs to retrieve the probing status
        ARM: dts: imx53-qsb: disable 1.2GHz OPP
      bab5c80b
    • David Howells's avatar
      afs: Fix afs_server struct leak · f014ffb0
      David Howells authored
      Fix a leak of afs_server structs.  The routine that installs them in the
      various lookup lists and trees gets a ref on leaving the function, whether
      it added the server or a server already exists.  It shouldn't increment
      the refcount if it added the server.
      
      The effect of this that "rmmod kafs" will hang waiting for the leaked
      server to become unused.
      
      Fixes: d2ddc776 ("afs: Overhaul volume and server record caching and fileserver rotation")
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f014ffb0
    • Peter Rosin's avatar
      MAINTAINERS: use the correct location for dt-bindings includes for mux · b40afc00
      Peter Rosin authored
      Just drop the "linux" part of the path, it was never correct.
      Reported-by: default avatarJoe Perches <joe@perches.com>
      Fixes: 256ac037 ("dt-bindings: document devicetree bindings for mux-controllers and gpio-mux")
      Signed-off-by: default avatarPeter Rosin <peda@axentia.se>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b40afc00
    • Peter Rosin's avatar
      mux: adgs1408: use the correct MODULE_LICENSE · 38a12607
      Peter Rosin authored
      The file is GPL v2 or later.
      Acked-by: default avatarMircea Caprioru <mircea.caprioru@analog.com>
      Signed-off-by: default avatarPeter Rosin <peda@axentia.se>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      38a12607
    • Andreas Gruenbacher's avatar
      gfs2: Fix iomap buffered write support for journaled files (2) · fee5150c
      Andreas Gruenbacher authored
      It turns out that the fix in commit 6636c3cc56 is bad; the assertion
      that the iomap code no longer creates buffer heads is incorrect for
      filesystems that set the IOMAP_F_BUFFER_HEAD flag.
      
      Instead, what's happening is that gfs2_iomap_begin_write treats all
      files that have the jdata flag set as journaled files, which is
      incorrect as long as those files are inline ("stuffed").  We're handling
      stuffed files directly via the page cache, which is why we ended up with
      pages without buffer heads in gfs2_page_add_databufs.
      
      Fix this by handling stuffed journaled files correctly in
      gfs2_iomap_begin_write.
      
      This reverts commit 6636c3cc5690c11631e6366cf9a28fb99c8b25bb.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      fee5150c
    • Will Deacon's avatar
      arm64: perf: Reject stand-alone CHAIN events for PMUv3 · ca2b4972
      Will Deacon authored
      It doesn't make sense for a perf event to be configured as a CHAIN event
      in isolation, so extend the arm_pmu structure with a ->filter_match()
      function to allow the backend PMU implementation to reject CHAIN events
      early.
      
      Cc: <stable@vger.kernel.org>
      Reviewed-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      ca2b4972
    • Will Deacon's avatar
      arm64: Fix /proc/iomem for reserved but not memory regions · d91680e6
      Will Deacon authored
      We describe ranges of 'reserved' memory to userspace via /proc/iomem.
      Commit 50d7ba36 ("arm64: export memblock_reserve()d regions via
      /proc/iomem") updated the logic to export regions that were reserved
      because their contents should be preserved. This allowed kexec-tools
      to tell the difference between 'reserved' memory that must be
      preserved and not overwritten, (e.g. the ACPI tables), and 'nomap'
      memory that must not be touched without knowing the memory-attributes
      (e.g. RAS CPER regions).
      
      The above commit wrongly assumed that memblock_reserve() would not
      be used to reserve regions that aren't memory. It turns out this is
      exactly what early_init_dt_reserve_memory_arch() will do if it finds
      a DT reserved-memory that was also carved out of the memory node, which
      results in a WARN_ON_ONCE() and the region being reserved instead of
      ignored. The ramoops description on hikey and dragonboard-410c both do
      this, so we can't simply write this configuration off as "buggy firmware".
      
      Avoid this issue by rewriting reserve_memblock_reserved_regions() so
      that only the portions of reserved regions which overlap with mapped
      memory are actually reserved.
      
      Fixes: 50d7ba36 ("arm64: export memblock_reserve()d regions via /proc/iomem")
      Reported-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Reported-by: default avatarPaolo Pisati <p.pisati@gmail.com>
      CC: Akashi Takahiro <takahiro.akashi@linaro.org>
      CC: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Reviewed-by: default avatarJames Morse <james.morse@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      d91680e6
    • David Howells's avatar
      afs: Fix cell proc list · 6b3944e4
      David Howells authored
      Access to the list of cells by /proc/net/afs/cells has a couple of
      problems:
      
       (1) It should be checking against SEQ_START_TOKEN for the keying the
           header line.
      
       (2) It's only holding the RCU read lock, so it can't just walk over the
           list without following the proper RCU methods.
      
      Fix these by using an hlist instead of an ordinary list and using the
      appropriate accessor functions to follow it with RCU.
      
      Since the code that adds a cell to the list must also necessarily change,
      sort the list on insertion whilst we're at it.
      
      Fixes: 989782dc ("afs: Overhaul cell database management")
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6b3944e4
    • Greg Kroah-Hartman's avatar
      Merge tag 'mmc-v4.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 4ea07abb
      Greg Kroah-Hartman authored
      Ulf writes:
         "MMC core:
          - Avoid fragile multiblock reads for the last sector in SPI mode
          WIFI/SDIO:
          - libertas: Fixup suspend sequence for the SDIO card"
      
      * tag 'mmc-v4.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        libertas: call into generic suspend code before turning off power
        mmc: block: avoid multiblock reads for the last sector in SPI mode
      4ea07abb
    • Greg Kroah-Hartman's avatar
      Merge tag 'gpio-v4.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · 60bd7be7
      Greg Kroah-Hartman authored
      Linus writes:
        "GPIO fix for the v4.19 series:
         - Fix up the interrupt parent for the irqdomains."
      
      * tag 'gpio-v4.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
        gpio: Assign gpio_irq_chip::parents to non-stack pointer
      60bd7be7
    • Greg Kroah-Hartman's avatar
      Merge tag 'pinctrl-v4.19-5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · ef0e75a4
      Greg Kroah-Hartman authored
      Linus writes:
        "pin control fix for v4.19:
      
         A single pin control fix for v4.19:
         - Interrupt setup in the MCP23S08 driver."
      
      * tag 'pinctrl-v4.19-5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: mcp23s08: fix irq and irqchip setup order
      ef0e75a4
    • Greg Kroah-Hartman's avatar
      Merge tag 'mtd/fixes-for-4.19-rc8' of git://git.infradead.org/linux-mtd · a291ab2d
      Greg Kroah-Hartman authored
      Boris writes:
        "mdt: fix for 4.19-rc8
      
         * Fix a stack overflow in lib/bch.c"
      
      * tag 'mtd/fixes-for-4.19-rc8' of git://git.infradead.org/linux-mtd:
        lib/bch: fix possible stack overrun
      a291ab2d
    • Greg Kroah-Hartman's avatar
      Merge tag 'drm-fixes-2018-10-12-1' of git://anongit.freedesktop.org/drm/drm · 62d2e531
      Greg Kroah-Hartman authored
      Dave writes:
        "drm fixes for 4.19-rc8
      
         single nouveau runtime reference and mst change"
      
      * tag 'drm-fixes-2018-10-12-1' of git://anongit.freedesktop.org/drm/drm:
        drm/nouveau/drm/nouveau: Grab runtime PM ref in nv50_mstc_detect()
      62d2e531
    • Greg Kroah-Hartman's avatar
      Merge tag 'for-gkh' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · c789174b
      Greg Kroah-Hartman authored
      Doug writes:
        "RDMA fixes:
      
         Final for-rc pull request for 4.19
      
         We only have one bug to submit this time around.  It fixes a DMA
         unmap issue where we unmapped the DMA address from the IOMMU before
         we did from the card, resulting in a DMAR error with IOMMU enabled,
         or possible crash without."
      
      * tag 'for-gkh' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        IB/mlx5: Unmap DMA addr from HCA before IOMMU
      c789174b
    • Greg Kroah-Hartman's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · eb81bfb2
      Greg Kroah-Hartman authored
      Dmitry writes:
        "Input updates for v4.19-rc7
      
         - we added a few scheduling points into various input interfaces to
           ensure that large writes will not cause RCU stalls
         - fixed configuring PS/2 keyboards as wakeup devices on newer
           platforms
         - added a new Xbox gamepad ID."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: uinput - add a schedule point in uinput_inject_events()
        Input: evdev - add a schedule point in evdev_write()
        Input: mousedev - add a schedule point in mousedev_write()
        Input: i8042 - enable keyboard wakeups by default when s2idle is used
        Input: xpad - add support for Xbox1 PDP Camo series gamepad
      eb81bfb2
    • Greg Kroah-Hartman's avatar
      Merge tag 'next-fixes-20181012' of git://git.kernel.org/pub/scm/linux/kernel/git/sfr/next-fixes · 0c53b6a5
      Greg Kroah-Hartman authored
      Stephen writes:
        "A couple of warning fixes:
      
        Two fixes from Peter Oberparleiter <oberpar@linux.ibm.com>:
          Commit 6b7dca40 ("tracing: Allow gcov profiling on only ftrace subsystem")
         uncovered linker problems when using gcov kernel profiling on some
         architectures. These problems were likely introduced earlier, and are
         possibly related to compiler changes."
      
      * tag 'next-fixes-20181012' of git://git.kernel.org/pub/scm/linux/kernel/git/sfr/next-fixes:
        vmlinux.lds.h: Fix linker warnings about orphan .LPBX sections
        vmlinux.lds.h: Fix incomplete .text.exit discards
      0c53b6a5
    • Rafael J. Wysocki's avatar
      cpuidle: menu: Simplify checks related to the polling state · bde091ec
      Rafael J. Wysocki authored
      After some recent menu governor changes, the promotion of the
      "polling" state to a physical one is mostly controlled by the
      latency limit (resulting from the "interactivity" factor) and
      not by the time to the closest timer event, so it should be
      sufficient to check the exit latency of that state for this
      purpose (of course, its target residency still needs to be
      within the next timer event range for energy-efficiency).
      
      Also, the physical state the "polling" one is promoted to need not
      be the next one in principle (in case the next state is disabled,
      for example).
      
      For these reasons, simplify the checks made to decide whether or
      not to promote the "polling" state to a physical one and update
      the target idle duration when it is promoted in case the residency
      of the new state turns out to be above the tick boundary (in which
      case there is no reason to stop the tick).
      Tested-by: default avatarDoug Smythies <dsmythies@telus.net>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      bde091ec
    • Arnd Bergmann's avatar
      lib/bch: fix possible stack overrun · f0fe77f6
      Arnd Bergmann authored
      The previous patch introduced very large kernel stack usage and a Makefile
      change to hide the warning about it.
      
      From what I can tell, a number of things went wrong here:
      
      - The BCH_MAX_T constant was set to the maximum value for 'n',
        not the maximum for 't', which is much smaller.
      
      - The stack usage is actually larger than the entire kernel stack
        on some architectures that can use 4KB stacks (m68k, sh, c6x), which
        leads to an immediate overrun.
      
      - The justification in the patch description claimed that nothing
        changed, however that is not the case even without the two points above:
        the configuration is machine specific, and most boards  never use the
        maximum BCH_ECC_WORDS() length but instead have something much smaller.
        That maximum would only apply to machines that use both the maximum
        block size and the maximum ECC strength.
      
      The largest value for 't' that I could find is '32', which in turn leads
      to a 60 byte array instead of 2048 bytes. Making it '64' for future
      extension seems also worthwhile, with 120 bytes for the array. Anything
      larger won't fit into the OOB area on NAND flash.
      
      With that changed, the warning can be enabled again.
      
      Only linux-4.19+ contains the breakage, so this is only needed
      as a stable backport if it does not make it into the release.
      
      Fixes: 02361bc7 ("lib/bch: Remove VLA usage")
      Reported-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
      f0fe77f6
    • Greg Kroah-Hartman's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 90ad1841
      Greg Kroah-Hartman authored
      David writes:
        "Networking
      
         1) RXRPC receive path fixes from David Howells.
      
         2) Re-export __skb_recv_udp(), from Jiri Kosina.
      
         3) Fix refcounting in u32 classificer, from Al Viro.
      
         4) Userspace netlink ABI fixes from Eugene Syromiatnikov.
      
         5) Don't double iounmap on rmmod in ena driver, from Arthur
            Kiyanovski.
      
         6) Fix devlink string attribute handling, we must pull a copy into a
            kernel buffer if the lifetime extends past the netlink request.
            From Moshe Shemesh.
      
         7) Fix hangs in RDS, from Ka-Cheong Poon.
      
         8) Fix recursive locking lockdep warnings in tipc, from Ying Xue.
      
         9) Clear RX irq correctly in socionext, from Ilias Apalodimas.
      
         10) bcm_sf2 fixes from Florian Fainelli."
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (38 commits)
        net: dsa: bcm_sf2: Call setup during switch resume
        net: dsa: bcm_sf2: Fix unbind ordering
        net: phy: sfp: remove sfp_mutex's definition
        r8169: set RX_MULTI_EN bit in RxConfig for 8168F-family chips
        net: socionext: clear rx irq correctly
        net/mlx4_core: Fix warnings during boot on driverinit param set failures
        tipc: eliminate possible recursive locking detected by LOCKDEP
        selftests: udpgso_bench.sh explicitly requires bash
        selftests: rtnetlink.sh explicitly requires bash.
        qmi_wwan: Added support for Gemalto's Cinterion ALASxx WWAN interface
        tipc: queue socket protocol error messages into socket receive buffer
        tipc: set link tolerance correctly in broadcast link
        net: ipv4: don't let PMTU updates increase route MTU
        net: ipv4: update fnhe_pmtu when first hop's MTU changes
        net/ipv6: stop leaking percpu memory in fib6 info
        rds: RDS (tcp) hangs on sendto() to unresponding address
        net: make skb_partial_csum_set() more robust against overflows
        devlink: Add helper function for safely copy string param
        devlink: Fix param cmode driverinit for string type
        devlink: Fix param set handling for string type
        ...
      90ad1841
  6. 11 Oct, 2018 1 commit