1. 27 Jan, 2016 3 commits
    • 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
    • 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
  2. 05 Jan, 2016 3 commits
  3. 01 Jan, 2016 6 commits
  4. 28 Dec, 2015 4 commits
  5. 24 Dec, 2015 1 commit
  6. 21 Dec, 2015 2 commits
  7. 20 Dec, 2015 7 commits
    • Linus Torvalds's avatar
      Merge tag 'rtc-4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux · 9f7e4327
      Linus Torvalds authored
      Pull RTC fixes from Alexandre Belloni:
       "Late fixes for the RTC subsystem for 4.4:
      
        A fix for a nasty hardware bug in rk808 and an initialization
        reordering in da9063 to fix a possible crash"
      
      * tag 'rtc-4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux:
        rtc: da9063: fix access ordering error during RTC interrupt at system power on
        rtc: rk808: Compensate for Rockchip calendar deviation on November 31st
      9f7e4327
    • Steve Twiss's avatar
      rtc: da9063: fix access ordering error during RTC interrupt at system power on · 77535ace
      Steve Twiss authored
      This fix alters the ordering of the IRQ and device registrations in the RTC
      driver probe function. This change will apply to the RTC driver that supports
      both DA9063 and DA9062 PMICs.
      
      A problem could occur with the existing RTC driver if:
      
      A system is started from a cold boot using the PMIC RTC IRQ to initiate a
      power on operation. For instance, if an RTC alarm is used to start a
      platform from power off.
      The existing driver IRQ is requested before the device has been properly
      registered.
      i.e.
          ret = devm_request_threaded_irq()
      comes before
          rtc->rtc_dev = devm_rtc_device_register();
      
      In this case, the interrupt can be called before the device has been
      registered and the handler can be called immediately. The IRQ handler
      da9063_alarm_event() contains the function call
      
          rtc_update_irq(rtc->rtc_dev, 1, RTC_IRQF | RTC_AF);
      
      which in turn tries to access the unavailable rtc->rtc_dev.
      
      The fix is to reorder the functions inside the RTC probe. The IRQ is
      requested after the RTC device resource has been registered so that
      get_irq_byname is the last thing to happen.
      Signed-off-by: default avatarSteve Twiss <stwiss.opensource@diasemi.com>
      Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
      77535ace
    • Julius Werner's avatar
      rtc: rk808: Compensate for Rockchip calendar deviation on November 31st · f076ef44
      Julius Werner authored
      In A.D. 1582 Pope Gregory XIII found that the existing Julian calendar
      insufficiently represented reality, and changed the rules about
      calculating leap years to account for this. Similarly, in A.D. 2013
      Rockchip hardware engineers found that the new Gregorian calendar still
      contained flaws, and that the month of November should be counted up to
      31 days instead. Unfortunately it takes a long time for calendar changes
      to gain widespread adoption, and just like more than 300 years went by
      before the last Protestant nation implemented Greg's proposal, we will
      have to wait a while until all religions and operating system kernels
      acknowledge the inherent advantages of the Rockchip system. Until then
      we need to translate dates read from (and written to) Rockchip hardware
      back to the Gregorian format.
      
      This patch works by defining Jan 1st, 2016 as the arbitrary anchor date
      on which Rockchip and Gregorian calendars are in sync. From that we can
      translate arbitrary later dates back and forth by counting the number
      of November/December transitons since the anchor date to determine the
      offset between the calendars. We choose this method (rather than trying
      to regularly "correct" the date stored in hardware) since it's the only
      way to ensure perfect time-keeping even if the system may be shut down
      for an unknown number of years. The drawback is that other software
      reading the same hardware (e.g. mainboard firmware) must use the same
      translation convention (including the same anchor date) to be able to
      read and write correct timestamps from/to the RTC.
      Signed-off-by: default avatarJulius Werner <jwerner@chromium.org>
      Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
      Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
      f076ef44
    • Linus Torvalds's avatar
      Merge tag 'tty-4.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 69c37a92
      Linus Torvalds authored
      Pull tty/serial fixes from Greg KH:
       "Here are some tty/serial driver fixes for 4.4-rc6 that resolve some
        reported problems.  All of these have been in linux-next.  The details
        are in the shortlog"
      
      * tag 'tty-4.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        tty: Fix GPF in flush_to_ldisc()
        serial: earlycon: Add missing spinlock initialization
        serial: sh-sci: Fix length of scatterlist
        n_tty: Fix poll() after buffer-limited eof push read
        serial: 8250_uniphier: fix dl_read and dl_write functions
      69c37a92
    • Linus Torvalds's avatar
      Merge tag 'usb-4.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 24b0d5e7
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some USB and PHY fixes for 4.4-rc6.  All of them resolve some
        reported problems.  Full details in the shortlog"
      
      * tag 'usb-4.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        USB: fix invalid memory access in hub_activate()
        USB: ipaq.c: fix a timeout loop
        phy: core: Get a refcount to phy in devm_of_phy_get_by_index()
        phy: cygnus: pcie: add missing of_node_put
        phy: miphy365x: add missing of_node_put
        phy: miphy28lp: add missing of_node_put
        phy: rockchip-usb: add missing of_node_put
        phy: berlin-sata: add missing of_node_put
        phy: mt65xx-usb3: add missing of_node_put
        phy: brcmstb-sata: add missing of_node_put
        phy: sun9i-usb: add USB dependency
      24b0d5e7
    • Linus Torvalds's avatar
      Merge tag 'md/4.4-rc5-fixes' of git://neil.brown.name/md · 3a87711e
      Linus Torvalds authored
      Pull md fixes from Neil Brown:
       "Four fixes for md:
      
         - two recently introduced regressions fixed.
         - one older bug in RAID10 - tagged for -stable since 4.2
         - one minor sysfs api improvement"
      
      * tag 'md/4.4-rc5-fixes' of git://neil.brown.name/md:
        Fix remove_and_add_spares removes drive added as spare in slot_store
        md: fix bug due to nested suspend
        MD: change journal disk role to disk 0
        md/raid10: fix data corruption and crash during resync
      3a87711e
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.4-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 35b3154e
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       - Partial revert of "powerpc: Individual System V IPC system calls"
       - pr_warn_once on unsupported OPAL_MSG type from Stewart
       - Fix deadlock in opal-irqchip introduced by "Fix double endian
         conversion" from Alistair
      
      * tag 'powerpc-4.4-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/opal-irqchip: Fix deadlock introduced by "Fix double endian conversion"
        powerpc/powernv: pr_warn_once on unsupported OPAL_MSG type
        Partial revert of "powerpc: Individual System V IPC system calls"
      35b3154e
  8. 19 Dec, 2015 9 commits
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v4.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 3c73a2dd
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
       "A couple of reference counting bugs here, one in spidev and one with
        holding an extra reference in the core that we never freed if we
        removed a device, plus a driver specific fix.  Both of the refcounting
        bugs are very old but they've only been found by observation so
        hopefully their impact has been low"
      
      * tag 'spi-fix-v4.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: fix parent-device reference leak
        spi: spidev: Hold spi_lock over all defererences of spi in release()
        spi-fsl-dspi: Fix CTAR Register access
      3c73a2dd
    • Linus Torvalds's avatar
      Merge tag 'gpio-v4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · d525c13e
      Linus Torvalds authored
      Pull GPIO fixes from Linus Walleij:
       "Some GPIO fixes for the v4.4 series.  Most prominent: I revert the
        error propagation from the .get() function until we can fix up all the
        drivers properly for v4.5.
      
         - Revert the error number propagation from the .get() vtable entry
           temporarily, until we make the proper fixes to all drivers.
         - Fix the clamping behaviour in the generic GPIO driver.
         - Driver fix for the ath79 driver"
      
      * tag 'gpio-v4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
        gpio: revert get() to non-errorprogating behaviour
        gpio: generic: clamp values from bgpio_get_set()
        gpio: ath79: Fix the logic to clear offset bit of AR71XX_GPIO_REG_OE register
      d525c13e
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 38beb96e
      Linus Torvalds authored
      Pull pin control fixes from Linus Walleij:
       - Driver fixes for Freescale i.MX7D, Intel, Broadcom 2835
       - One MAINTAINERS entry
      
      * tag 'pinctrl-v4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        MAINTAINERS: pinctrl: Add maintainers for pinctrl-single
        pinctrl: bcm2835: Fix initial value for direction_output
        pinctrl: intel: fix offset calculation issue of register PAD_OWN
        pinctrl: intel: fix bug of register offset calculation
        pinctrl: freescale: add ZERO_OFFSET_VALID flag for vf610 pinctrl
      38beb96e
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · d7d3d841
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "A set of 'usual' driver bugfixes for the I2C subsystem"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: rcar: disable runtime PM correctly in slave mode
        i2c: designware: Keep pm_runtime_enable/_disable calls in sync
        i2c: designware: fix IO timeout issue for AMD controller
        i2c: imx: init bus recovery info before adding i2c adapter
        i2c: do not use 0x in front of %pa
        i2c: davinci: Increase module clock frequency
        i2c: mv64xxx: The n clockdiv factor is 0 based on sunxi SoCs
        i2c: rk3x: populate correct variable for sda_falling_time
      d7d3d841
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 632f8577
      Linus Torvalds authored
      Pull input fixes from Dmitry Torokhov:
       "Just a few assorted driver fixes"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: elants_i2c - fix wake-on-touch
        Input: elan_i2c - set input device's vendor and product IDs
        Input: sun4i-lradc-keys - fix typo in binding documentation
        Input: atmel_mxt_ts - add maxtouch to I2C table for module autoload
        Input: arizona-haptic - fix disabling of haptics device
        Input: aiptek - fix crash on detecting device without endpoints
        Input: atmel_mxt_ts - add generic platform data for Chromebooks
        Input: parkbd - clear unused function pointers
        Input: walkera0701 - clear unused function pointers
        Input: turbografx - clear unused function pointers
        Input: gamecon - clear unused function pointers
        Input: db9 - clear unused function pointers
      632f8577
    • Wolfram Sang's avatar
      i2c: rcar: disable runtime PM correctly in slave mode · b4cd08aa
      Wolfram Sang authored
      When we also are I2C slave, we need to disable runtime PM because the
      address detection mechanism needs to be active all the time. However, we
      can reenable runtime PM once the slave instance was unregistered. So,
      use pm_runtime_get_sync/put to achieve this, since it has proper
      refcounting. pm_runtime_allow/forbid is like a global knob controllable
      from userspace which is unsuitable here.
      Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      Cc: stable@kernel.org
      b4cd08aa
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-4.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 1eab0e42
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "These fix a potential regression introduced during the 4.3 cycle
        (generic power domains framework), a nasty bug that has been present
        forever (power capping RAPL driver), a build issue (Tegra cpufreq
        driver) and a minor ugliness introduced recently (intel_pstate).
      
        Specifics:
      
         - Fix a potential regression in the generic power domains framework
           introduced during the 4.3 development cycle that may lead to
           spurious failures of system suspend in certain situations (Ulf
           Hansson).
      
         - Fix a problem in the power capping RAPL (Running Average Power
           Limits) driver that causes it to initialize successfully on some
           systems where it is not supposed to do that which is due to an
           incorrect check in an initialization routine (Prarit Bhargava).
      
         - Fix a build problem in the cpufreq Tegra driver that depends on the
           regulator framework, but that dependency is not reflected in
           Kconfig (Arnd Bergmann).
      
         - Fix a recent mistake in the intel_pstate driver where a numeric
           constant is used directly instead of a symbol defined specifically
           for the case in question (Prarit Bhargava)"
      
      * tag 'pm+acpi-4.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        powercap / RAPL: fix BIOS lock check
        cpufreq: intel_pstate: Minor cleanup for FRAC_BITS
        cpufreq: tegra: add regulator dependency for T124
        PM / Domains: Allow runtime PM callbacks to be re-used during system PM
      1eab0e42
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 4fee35a3
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Three fixes this time, two in SES picked up by KASAN for various types
        of buffer overrun.  The first is a USB array which returns page 8
        whatever is asked for and causes us to overrun with incorrect data
        format assumptions and the second is an invalid iteration of page 10
        (the additional information page).
      
        The final fix is a reversion of a NULL deref fix which caused
        suspend/resume not to be called in pairs leading to incorrect device
        operation (Jens has queued a more proper fix for the problem in
        block)"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        ses: fix additional element traversal bug
        Revert "SCSI: Fix NULL pointer dereference in runtime PM"
        ses: Fix problems with simple enclosures
      4fee35a3
    • James Chen's avatar
      Input: elants_i2c - fix wake-on-touch · 478e5ed1
      James Chen authored
      When sending "SLEEP" command to the controller it ceases scanning
      completely and is unable to wake the system up from sleep, so if it is
      configured as a wakeup source we should simply configure interrupt for
      wakeup and rely on idle logic within the controller to reduce power
      consumption while it is not used.
      Signed-off-by: default avatarJames Chen <james.chen@emc.com.tw>
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      478e5ed1
  9. 18 Dec, 2015 5 commits