1. 09 Jan, 2017 21 commits
    • Krzysztof Kozlowski's avatar
      thermal: hwmon: Properly report critical temperature in sysfs · fab303ba
      Krzysztof Kozlowski authored
      commit f37fabb8 upstream.
      
      In the critical sysfs entry the thermal hwmon was returning wrong
      temperature to the user-space.  It was reporting the temperature of the
      first trip point instead of the temperature of critical trip point.
      
      For example:
      	/sys/class/hwmon/hwmon0/temp1_crit:50000
      	/sys/class/thermal/thermal_zone0/trip_point_0_temp:50000
      	/sys/class/thermal/thermal_zone0/trip_point_0_type:active
      	/sys/class/thermal/thermal_zone0/trip_point_3_temp:120000
      	/sys/class/thermal/thermal_zone0/trip_point_3_type:critical
      
      Since commit e68b16ab ("thermal: add hwmon sysfs I/F") the driver
      have been registering a sysfs entry if get_crit_temp() callback was
      provided.  However when accessed, it was calling get_trip_temp() instead
      of the get_crit_temp().
      
      Fixes: e68b16ab ("thermal: add hwmon sysfs I/F")
      Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fab303ba
    • Boris Brezillon's avatar
      clk: bcm2835: Avoid overwriting the div info when disabling a pll_div clk · 05bc2071
      Boris Brezillon authored
      commit 68af4fa8 upstream.
      
      bcm2835_pll_divider_off() is resetting the divider field in the A2W reg
      to zero when disabling the clock.
      
      Make sure we preserve this value by reading the previous a2w_reg value
      first and ORing the result with A2W_PLL_CHANNEL_DISABLE.
      Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
      Fixes: 41691b88 ("clk: bcm2835: Add support for programming the audio domain clocks")
      Reviewed-by: default avatarEric Anholt <eric@anholt.net>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      05bc2071
    • Alexandre Courbot's avatar
      arm64: tegra: Add VDD_GPU regulator to Jetson TX1 · b6d66631
      Alexandre Courbot authored
      commit 5e6b9a89 upstream.
      
      Add the VDD_GPU regulator (a GPIO-enabled PWM regulator) to the Jetson
      TX1 board. This addition allows the GPU to be used provided the
      bootloader properly enabled the GPU node.
      Signed-off-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
      Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
      [as pointed out by Thierry on IRC, nobody has reported a bug
       in the field, but using a new bootloader with a .dtb that
       has the incorrect data, it will crash on boot]
      Fixes: 336f79c7 ("arm64: tegra: Add NVIDIA Jetson TX1 Developer Kit support")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b6d66631
    • Lars-Peter Clausen's avatar
      gpio: chardev: Return error for seek operations · 5f654078
      Lars-Peter Clausen authored
      commit f4e81c52 upstream.
      
      The GPIO chardev is used for management tasks (allocating line and event
      handles) and does neither support read() nor write() operations. Hence it
      does not make much sense to allow seek operations.
      
      Currently the chardev uses noop_llseek() for its seek implementation. This
      function does not move the pointer and simply returns the current position
      (always 0 for the GPIO chardev). noop_llseek() is primarily meant for
      devices that can not support seek, but where there might be a user that
      depends on the seek() operation succeeding. For newly added devices that
      can not support seek operations it is recommended to use no_llseek(), which
      will return an error. For more information see commit 6038f373
      ("llseek: automatically add .llseek fop").
      
      Unfortunately this was overlooked when the GPIO chardev ABI was introduced.
      But it is highly unlikely that since then userspace applications have
      appeared that rely on being able to perform non-failing seek operations on
      a GPIO chardev file descriptor. So it should be safe to change from
      noop_llseel() to no_seek(). Also use nonseekable_open() in the chardev
      open() callback to clear the FMODE_SEEK, FMODE_PREAD and FMODE_PWRITE flags
      from the file. Neither of these should be set on a file that does not
      support seek operations.
      
      Fixes: 3c702e99 ("gpio: add a userspace chardev ABI for GPIOs")
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5f654078
    • Linus Walleij's avatar
      gpio: stmpe: fix interrupt handling bug · acd0993f
      Linus Walleij authored
      commit 1516c635 upstream.
      
      commit 43db289d ("gpio: stmpe: Rework registers access")
      reworked the STMPE register access so as to use
      [STMPE_IDX_*_LSB + i] to access the 8bit register for a
      certain bank, assuming the CSB and MSB will follow after
      the enumerator. For this to work the index needs to go from
      (size-1) to 0 not 0 to (size-1).
      
      However for the GPIO IRQ handler, the status registers we read
      register MSB + 3 bytes ahead for the 24 bit GPIOs and index
      registers from MSB upwards and run an index i over the
      registers UNLESS we are STMPE1600.
      
      This is not working when we get to clearing the interrupt
      EDGE status register STMPE_IDX_GPEDR_[LCM]SB: it is indexed
      like all other registers [STMPE_IDX_*_LSB + i] but in this
      loop we index from 0 to get the right bank index for the
      calculations, and we need to just add i to the MSB.
      
      Before this, interrupts on the STMPE2401 were broken, this
      patch fixes it so it works again.
      
      Cc: Patrice Chotard <patrice.chotard@st.com>
      Fixes: 43db289d ("gpio: stmpe: Rework registers access")
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      acd0993f
    • Thomas Gleixner's avatar
      timekeeping_Force_unsigned_clocksource_to_nanoseconds_conversion · ca22975a
      Thomas Gleixner authored
      commit 9c164572 upstream.
      
      The clocksource delta to nanoseconds conversion is using signed math, but
      the delta is unsigned. This makes the conversion space smaller than
      necessary and in case of a multiplication overflow the conversion can
      become negative. The conversion is done with scaled math:
      
          s64 nsec_delta = ((s64)clkdelta * clk->mult) >> clk->shift;
      
      Shifting a signed integer right obvioulsy preserves the sign, which has
      interesting consequences:
      
       - Time jumps backwards
      
       - __iter_div_u64_rem() which is used in one of the calling code pathes
         will take forever to piecewise calculate the seconds/nanoseconds part.
      
      This has been reported by several people with different scenarios:
      
      David observed that when stopping a VM with a debugger:
      
       "It was essentially the stopped by debugger case.  I forget exactly why,
        but the guest was being explicitly stopped from outside, it wasn't just
        scheduling lag.  I think it was something in the vicinity of 10 minutes
        stopped."
      
       When lifting the stop the machine went dead.
      
      The stopped by debugger case is not really interesting, but nevertheless it
      would be a good thing not to die completely.
      
      But this was also observed on a live system by Liav:
      
       "When the OS is too overloaded, delta will get a high enough value for the
        msb of the sum delta * tkr->mult + tkr->xtime_nsec to be set, and so
        after the shift the nsec variable will gain a value similar to
        0xffffffffff000000."
      
      Unfortunately this has been reintroduced recently with commit 6bd58f09
      ("time: Add cycles to nanoseconds translation"). It had been fixed a year
      ago already in commit 35a4933a ("time: Avoid signed overflow in
      timekeeping_get_ns()").
      
      Though it's not surprising that the issue has been reintroduced because the
      function itself and the whole call chain uses s64 for the result and the
      propagation of it. The change in this recent commit is subtle:
      
         s64 nsec;
      
      -  nsec = (d * m + n) >> s:
      +  nsec = d * m + n;
      +  nsec >>= s;
      
      d being type of cycle_t adds another level of obfuscation.
      
      This wouldn't have happened if the previous change to unsigned computation
      would have made the 'nsec' variable u64 right away and a follow up patch
      had cleaned up the whole call chain.
      
      There have been patches submitted which basically did a revert of the above
      patch leaving everything else unchanged as signed. Back to square one. This
      spawned a admittedly pointless discussion about potential users which rely
      on the unsigned behaviour until someone pointed out that it had been fixed
      before. The changelogs of said patches added further confusion as they made
      finally false claims about the consequences for eventual users which expect
      signed results.
      
      Despite delta being cycle_t, aka. u64, it's very well possible to hand in
      a signed negative value and the signed computation will happily return the
      correct result. But nobody actually sat down and analyzed the code which
      was added as user after the propably unintended signed conversion.
      
      Though in sensitive code like this it's better to analyze it proper and
      make sure that nothing relies on this than hunting the subtle wreckage half
      a year later. After analyzing all call chains it stands that no caller can
      hand in a negative value (which actually would work due to the s64 cast)
      and rely on the signed math to do the right thing.
      
      Change the conversion function to unsigned math. The conversion of all call
      chains is done in a follow up patch.
      
      This solves the starvation issue, which was caused by the negative result,
      but it does not solve the underlying problem. It merily procrastinates
      it. When the timekeeper update is deferred long enough that the unsigned
      multiplication overflows, then time going backwards is observable again.
      
      It does neither solve the issue of clocksources with a small counter width
      which will wrap around possibly several times and cause random time stamps
      to be generated. But those are usually not found on systems used for
      virtualization, so this is likely a non issue.
      
      I took the liberty to claim authorship for this simply because
      analyzing all callsites and writing the changelog took substantially
      more time than just making the simple s/s64/u64/ change and ignore the
      rest.
      
      Fixes: 6bd58f09 ("time: Add cycles to nanoseconds translation")
      Reported-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      Reported-by: default avatarLiav Rehana <liavr@mellanox.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Parit Bhargava <prarit@redhat.com>
      Cc: Laurent Vivier <lvivier@redhat.com>
      Cc: "Christopher S. Hall" <christopher.s.hall@intel.com>
      Cc: Chris Metcalf <cmetcalf@mellanox.com>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Link: http://lkml.kernel.org/r/20161208204228.688545601@linutronix.deSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ca22975a
    • Paul Burton's avatar
      mmc: sd: Meet alignment requirements for raw_ssr DMA · efd16f76
      Paul Burton authored
      commit e85baa88 upstream.
      
      The mmc_read_ssr() function results in DMA to the raw_ssr member of
      struct mmc_card, which is not guaranteed to be cache line aligned & thus
      might not meet the requirements set out in Documentation/DMA-API.txt:
      
        Warnings:  Memory coherency operates at a granularity called the cache
        line width.  In order for memory mapped by this API to operate
        correctly, the mapped region must begin exactly on a cache line
        boundary and end exactly on one (to prevent two separately mapped
        regions from sharing a single cache line).  Since the cache line size
        may not be known at compile time, the API will not enforce this
        requirement.  Therefore, it is recommended that driver writers who
        don't take special care to determine the cache line size at run time
        only map virtual regions that begin and end on page boundaries (which
        are guaranteed also to be cache line boundaries).
      
      On some systems where DMA is non-coherent this can lead to us losing
      data that shares cache lines with the raw_ssr array.
      
      Fix this by kmalloc'ing a temporary buffer to perform DMA into. kmalloc
      will ensure the buffer is suitably aligned, allowing the DMA to be
      performed without any loss of data.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Fixes: 5275a652 ("mmc: sd: Export SD Status via “ssr” device attribute")
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      efd16f76
    • Linus Walleij's avatar
      regulator: stw481x-vmmc: fix ages old enable error · dbcde92b
      Linus Walleij authored
      commit 295070e9 upstream.
      
      The regulator has never been properly enabled, it has been
      dormant all the time. It's strange that MMC was working
      at all, but it likely worked by the signals going through
      the levelshifter and reaching the card anyways.
      
      Fixes: 3615a34e ("regulator: add STw481x VMMC driver")
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      dbcde92b
    • Adrian Hunter's avatar
      mmc: sdhci: Fix recovery from tuning timeout · cee93584
      Adrian Hunter authored
      commit 61e53bd0 upstream.
      
      Clearing the tuning bits should reset the tuning circuit. However there is
      more to do. Reset the command and data lines for good measure, and then
      for eMMC ensure the card is not still trying to process a tuning command by
      sending a stop command.
      
      Note the JEDEC eMMC specification says the stop command (CMD12) can be used
      to stop a tuning command (CMD21) whereas the SD specification is silent on
      the subject with respect to the SD tuning command (CMD19). Considering that
      CMD12 is not a valid SDIO command, the stop command is sent only when the
      tuning command is CMD21 i.e. for eMMC. That addresses cases seen so far
      which have been on eMMC.
      
      Note that this replaces the commit fe5fb2e3 ("mmc: sdhci: Reset cmd and
      data circuits after tuning failure") which is being reverted for v4.9+.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Tested-by: default avatarDan O'Donovan <dan@emutex.com>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cee93584
    • Adrian Hunter's avatar
      Revert "mmc: sdhci: Reset cmd and data circuits after tuning failure" · 5bb42503
      Adrian Hunter authored
      commit 2ca71c27 upstream.
      
      This reverts commit fe5fb2e3 ("mmc: sdhci: Reset cmd and data circuits
      after tuning failure").
      
      A better fix is available, and it will be applied to older stable releases,
      so get this out of the way by reverting it.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5bb42503
    • Tobias Klausmann's avatar
      ath9k: do not return early to fix rcu unlocking · 71717a3e
      Tobias Klausmann authored
      commit d1f1c0e2 upstream.
      
      Starting with commit d94a461d ("ath9k: use ieee80211_tx_status_noskb
      where possible") the driver uses rcu_read_lock() && rcu_read_unlock(), yet on
      returning early in ath_tx_edma_tasklet() the unlock is missing leading to stalls
      and suspicious RCU usage:
      
       ===============================
       [ INFO: suspicious RCU usage. ]
       4.9.0-rc8 #11 Not tainted
       -------------------------------
       kernel/rcu/tree.c:705 Illegal idle entry in RCU read-side critical section.!
      
       other info that might help us debug this:
      
       RCU used illegally from idle CPU!
       rcu_scheduler_active = 1, debug_locks = 0
       RCU used illegally from extended quiescent state!
       1 lock held by swapper/7/0:
       #0:
        (
       rcu_read_lock
       ){......}
       , at:
       [<ffffffffa06ed110>] ath_tx_edma_tasklet+0x0/0x450 [ath9k]
      
       stack backtrace:
       CPU: 7 PID: 0 Comm: swapper/7 Not tainted 4.9.0-rc8 #11
       Hardware name: Acer Aspire V3-571G/VA50_HC_CR, BIOS V2.21 12/16/2013
        ffff88025efc3f38 ffffffff8132b1e5 ffff88017ede4540 0000000000000001
        ffff88025efc3f68 ffffffff810a25f7 ffff88025efcee60 ffff88017edebdd8
        ffff88025eeb5400 0000000000000091 ffff88025efc3f88 ffffffff810c3cd4
       Call Trace:
        <IRQ>
        [<ffffffff8132b1e5>] dump_stack+0x68/0x93
        [<ffffffff810a25f7>] lockdep_rcu_suspicious+0xd7/0x110
        [<ffffffff810c3cd4>] rcu_eqs_enter_common.constprop.85+0x154/0x200
        [<ffffffff810c5a54>] rcu_irq_exit+0x44/0xa0
        [<ffffffff81058631>] irq_exit+0x61/0xd0
        [<ffffffff81018d25>] do_IRQ+0x65/0x110
        [<ffffffff81672189>] common_interrupt+0x89/0x89
        <EOI>
        [<ffffffff814ffe11>] ? cpuidle_enter_state+0x151/0x200
        [<ffffffff814ffee2>] cpuidle_enter+0x12/0x20
        [<ffffffff8109a6ae>] call_cpuidle+0x1e/0x40
        [<ffffffff8109a8f6>] cpu_startup_entry+0x146/0x220
        [<ffffffff810336f8>] start_secondary+0x148/0x170
      Signed-off-by: default avatarTobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
      Fixes: d94a461d ("ath9k: use ieee80211_tx_status_noskb where possible")
      Acked-by: default avatarFelix Fietkau <nbd@nbd.name>
      Acked-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Tested-by: default avatarGabriel Craciunescu <nix.or.die@gmail.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      71717a3e
    • Vittorio Gambaletta (VittGam)'s avatar
      ath9k: Really fix LED polarity for some Mini PCI AR9220 MB92 cards. · de5d62f8
      Vittorio Gambaletta (VittGam) authored
      commit 79e57dd1 upstream.
      
      The active_high LED of my Wistron DNMA-92 is still being recognized as
      active_low on 4.7.6 mainline. When I was preparing my former commit
      0f9edcdd ("ath9k: Fix LED polarity for some Mini PCI AR9220 MB92
      cards.") to fix that I must have somehow messed up with testing, because
      I tested the final version of that patch before sending it, and it was
      apparently working; but now it is not working on 4.7.6 mainline.
      
      I initially added the PCI_DEVICE_SUB section for 0x0029/0x2096 above the
      PCI_VDEVICE section for 0x0029; but then I moved the former below the
      latter after seeing how 0x002A sections were sorted in the file.
      
      This turned out to be wrong: if a generic PCI_VDEVICE entry (that has
      both subvendor and subdevice IDs set to PCI_ANY_ID) is put before a more
      specific one (PCI_DEVICE_SUB), then the generic PCI_VDEVICE entry will
      match first and will be used.
      
      With this patch, 0x0029/0x2096 has finally got active_high LED on 4.7.6.
      
      While I'm at it, let's fix 0x002A too by also moving its generic definition
      below its specific ones.
      
      Fixes: 0f9edcdd ("ath9k: Fix LED polarity for some Mini PCI AR9220 MB92 cards.")
      Signed-off-by: default avatarVittorio Gambaletta <linuxbugs@vittgam.net>
      [kvalo@qca.qualcomm.com: improve the commit log based on email discussions]
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      de5d62f8
    • Matthias Schiffer's avatar
      ath9k: fix ath9k_hw_gpio_get() to return 0 or 1 on success · 072ebf89
      Matthias Schiffer authored
      commit 91851cc7 upstream.
      
      Commit b2d70d49 ("ath9k: make GPIO API to support both of WMAC and
      SOC") refactored ath9k_hw_gpio_get() to support both WMAC and SOC GPIOs,
      changing the return on success from 1 to BIT(gpio). This broke some callers
      like ath_is_rfkill_set(). This doesn't fix any known bug in mainline at the
      moment, but should be fixed anyway.
      
      Instead of fixing all callers, change ath9k_hw_gpio_get() back to only
      return 0 or 1.
      
      Fixes: b2d70d49 ("ath9k: make GPIO API to support both of WMAC and SOC")
      Signed-off-by: default avatarMatthias Schiffer <mschiffer@universe-factory.net>
      [kvalo@qca.qualcomm.com: mention that doesn't fix any known bug]
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      072ebf89
    • Johannes Berg's avatar
      cfg80211/mac80211: fix BSS leaks when abandoning assoc attempts · 1976c768
      Johannes Berg authored
      commit e6f462df upstream.
      
      When mac80211 abandons an association attempt, it may free
      all the data structures, but inform cfg80211 and userspace
      about it only by sending the deauth frame it received, in
      which case cfg80211 has no link to the BSS struct that was
      used and will not cfg80211_unhold_bss() it.
      
      Fix this by providing a way to inform cfg80211 of this with
      the BSS entry passed, so that it can clean up properly, and
      use this ability in the appropriate places in mac80211.
      
      This isn't ideal: some code is more or less duplicated and
      tracing is missing. However, it's a fairly small change and
      it's thus easier to backport - cleanups can come later.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1976c768
    • Jes Sorensen's avatar
      rtl8xxxu: Work around issue with 8192eu and 8723bu devices not reconnecting · 3f23f7f2
      Jes Sorensen authored
      commit c59f13bb upstream.
      
      The H2C MEDIA_STATUS_RPT command for some reason causes 8192eu and
      8723bu devices not being able to reconnect.
      Reported-by: default avatarBarry Day <briselec@gmail.com>
      Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3f23f7f2
    • Thomas Gleixner's avatar
      perf/x86/intel/cstate: Prevent hotplug callback leak · 19d55b9f
      Thomas Gleixner authored
      commit 834fcd29 upstream.
      
      If the pmu registration fails the registered hotplug callbacks are not
      removed. Wrong in any case, but fatal in case of a modular driver.
      
      Replace the nonsensical state names with proper ones while at it.
      
      Fixes: 77c34ef1 ("perf/x86/intel/cstate: Convert Intel CSTATE to hotplug state machine")
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Sebastian Siewior <bigeasy@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      19d55b9f
    • Ravi Bangoria's avatar
      perf annotate: Don't throw error for zero length symbols · ba12b35f
      Ravi Bangoria authored
      commit edee44be upstream.
      
      'perf report --tui' exits with error when it finds a sample of zero
      length symbol (i.e. addr == sym->start == sym->end). Actually these are
      valid samples. Don't exit TUI and show report with such symbols.
      Reported-and-Tested-by: default avatarAnton Blanchard <anton@samba.org>
      Link: https://lkml.org/lkml/2016/10/8/189Signed-off-by: default avatarRavi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Chris Riyder <chris.ryder@arm.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1479804050-5028-1-git-send-email-ravi.bangoria@linux.vnet.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ba12b35f
    • Andi Kleen's avatar
      perf/x86: Fix exclusion of BTS and LBR for Goldmont · 54fa190d
      Andi Kleen authored
      commit b0c1ef52 upstream.
      
      An earlier patch allowed enabling PT and LBR at the same
      time on Goldmont. However it also allowed enabling BTS and LBR
      at the same time, which is still not supported. Fix this by
      bypassing the check only for PT.
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: alexander.shishkin@intel.com
      Cc: kan.liang@intel.com
      Fixes: ccbebba4 ("perf/x86/intel/pt: Bypass PT vs. LBR exclusivity if the core supports it")
      Link: http://lkml.kernel.org/r/20161209001417.4713-1-andi@firstfloor.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      54fa190d
    • Larry Finger's avatar
      rtlwifi: Fix enter/exit power_save · 98068574
      Larry Finger authored
      commit ba9f93f8 upstream.
      
      In commit a5ffbe0a ("rtlwifi: Fix scheduling while atomic bug") and
      commit a269913c ("rtlwifi: Rework rtl_lps_leave() and rtl_lps_enter()
      to use work queue"), an error was introduced in the power-save routines
      due to the fact that leaving PS was delayed by the use of a work queue.
      
      This problem is fixed by detecting if the enter or leave routines are
      in interrupt mode. If so, the workqueue is used to place the request.
      If in normal mode, the enter or leave routines are called directly.
      
      Fixes: a269913c ("rtlwifi: Rework rtl_lps_leave() and rtl_lps_enter() to use work queue")
      Reported-by: default avatarPing-Ke Shih <pkshih@realtek.com>
      Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      98068574
    • Mohammed Shafi Shajakhan's avatar
      ath10k: fix soft lockup during firmware crash/hw-restart · ea23fca0
      Mohammed Shafi Shajakhan authored
      commit c2cac2f7 upstream.
      
      During firmware crash (or) user requested manual restart
      the system gets into a soft lock up state because of the
      below root cause.
      
      During user requested hardware restart / firmware crash
      the system goes into a soft lockup state as 'napi_synchronize'
      is called after 'napi_disable' (which sets 'NAPI_STATE_SCHED'
      bit) and it sleeps into infinite loop as it waits for
      'NAPI_STATE_SCHED' to be cleared. This condition is hit because
      'ath10k_hif_stop' is called twice as below (resulting in calling
      'napi_synchronize' after 'napi_disable')
      
      'ath10k_core_restart' -> 'ath10k_hif_stop' (ATH10K_STATE_ON) ->
      -> 'ieee80211_restart_hw' -> 'ath10k_start' -> 'ath10k_halt' ->
      'ath10k_core_stop' -> 'ath10k_hif_stop' (ATH10K_STATE_RESTARTING)
      
      Fix this by calling 'ath10k_halt' in ath10k_core_restart itself
      as it makes more sense before informing mac80211 to restart h/w
      Also remove 'ath10k_halt' in ath10k_start for the state of 'restarting'
      
      Fixes: 3c97f5de ("ath10k: implement NAPI support")
      Signed-off-by: default avatarMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ea23fca0
    • Larry Finger's avatar
      ssb: Fix error routine when fallback SPROM fails · b8425f41
      Larry Finger authored
      commit 8052d724 upstream.
      
      When there is a CRC error in the SPROM read from the device, the code
      attempts to handle a fallback SPROM. When this also fails, the driver
      returns zero rather than an error code.
      Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b8425f41
  2. 06 Jan, 2017 19 commits