1. 28 12月, 2015 1 次提交
  2. 22 12月, 2015 6 次提交
    • R
      MIPS: Fix build error due to unused variables. · ec7b9720
      Ralf Baechle 提交于
      c861519f ("MIPS: Fix delay loops which may
      be removed by GCC.") which made it upstream was an outdated version of the
      patch and is lacking some the removal of two variables that became unused
      thus resulting in further warnings and build breakage.  The commit
      from ae878615d7cee5d7346946cf1ae1b60e427013c2 was correct however.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      ec7b9720
    • Q
      MIPS: VDSO: Fix build error · 2a037f31
      Qais Yousef 提交于
      Commit ebb5e78c ("MIPS: Initial implementation of a VDSO") introduced a
      build error.
      
      For MIPS VDSO to be compiled it requires binutils version 2.25 or above but
      the check in the Makefile had inverted logic causing it to be compiled in if
      binutils is below 2.25.
      
      This fixes the following compilation error:
      
      CC      arch/mips/vdso/gettimeofday.o
      /tmp/ccsExcUd.s: Assembler messages:
      /tmp/ccsExcUd.s:62: Error: can't resolve `_start' {*UND* section} - `L0' {.text section}
      /tmp/ccsExcUd.s:467: Error: can't resolve `_start' {*UND* section} - `L0' {.text section}
      make[2]: *** [arch/mips/vdso/gettimeofday.o] Error 1
      make[1]: *** [arch/mips/vdso] Error 2
      make: *** [arch/mips] Error 2
      
      [ralf@linux-mips: Fixed Sergei's complaint on the formatting of the
      cited commit and generally reformatted the log message.]
      Signed-off-by: NQais Yousef <qais.yousef@imgtec.com>
      Cc: alex@alex-smith.me.uk
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11745/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      2a037f31
    • P
      MIPS: CPS: drop .set mips64r2 directives · f3575e23
      Paul Burton 提交于
      Commit 977e043d ("MIPS: kernel: cps-vec: Replace mips32r2 ISA level
      with mips64r2") leads to .set mips64r2 directives being present in 32
      bit (ie. CONFIG_32BIT=y) kernels. This is incorrect & leads to MIPS64
      instructions being emitted by the assembler when expanding
      pseudo-instructions. For example the "move" instruction can legitimately
      be expanded to a "daddu". This causes problems when the kernel is run on
      a MIPS32 CPU, as CONFIG_32BIT kernels of course often are...
      
      Fix this by dropping the .set <ISA> directives entirely now that Kconfig
      should be ensuring that kernels including this code are built with a
      suitable -march= compiler flag.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: <stable@vger.kernel.org> # 3.16+
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/10869/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      f3575e23
    • J
      MIPS: uaccess: Take EVA into account in [__]clear_user · d6a428fb
      James Hogan 提交于
      __clear_user() (and clear_user() which uses it), always access the user
      mode address space, which results in EVA store instructions when EVA is
      enabled even if the current user address limit is KERNEL_DS.
      
      Fix this by adding a new symbol __bzero_kernel for the normal kernel
      address space bzero in EVA mode, and call that from __clear_user() if
      eva_kernel_access().
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Leonid Yegoshin <leonid.yegoshin@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/10844/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      d6a428fb
    • J
      MIPS: uaccess: Take EVA into account in __copy_from_user() · 6f06a2c4
      James Hogan 提交于
      When EVA is in use, __copy_from_user() was unconditionally using the EVA
      instructions to read the user address space, however this can also be
      used for kernel access. If the address isn't a valid user address it
      will cause an address error or TLB exception, and if it is then user
      memory may be read instead of kernel memory.
      
      For example in the following stack trace from Linux v3.10 (changes since
      then will prevent this particular one still happening) kernel_sendmsg()
      set the user address limit to KERNEL_DS, and tcp_sendmsg() goes on to
      use __copy_from_user() with a kernel address in KSeg0.
      
      [<8002d434>] __copy_fromuser_common+0x10c/0x254
      [<805710e0>] tcp_sendmsg+0x5f4/0xf00
      [<804e8e3c>] sock_sendmsg+0x78/0xa0
      [<804e8f28>] kernel_sendmsg+0x24/0x38
      [<804ee0f8>] sock_no_sendpage+0x70/0x7c
      [<8017c820>] pipe_to_sendpage+0x80/0x98
      [<8017c6b0>] splice_from_pipe_feed+0xa8/0x198
      [<8017cc54>] __splice_from_pipe+0x4c/0x8c
      [<8017e844>] splice_from_pipe+0x58/0x78
      [<8017e884>] generic_splice_sendpage+0x20/0x2c
      [<8017d690>] do_splice_from+0xb4/0x110
      [<8017d710>] direct_splice_actor+0x24/0x30
      [<8017d394>] splice_direct_to_actor+0xd8/0x208
      [<8017d51c>] do_splice_direct+0x58/0x7c
      [<8014eaf4>] do_sendfile+0x1dc/0x39c
      [<8014f82c>] SyS_sendfile+0x90/0xf8
      
      Add the eva_kernel_access() check in __copy_from_user() like the one in
      copy_from_user().
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Leonid Yegoshin <leonid.yegoshin@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/10843/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      6f06a2c4
    • J
      MIPS: uaccess: Fix strlen_user with EVA · 5dc62fdd
      James Hogan 提交于
      The strlen_user() function calls __strlen_kernel_asm in both branches of
      the eva_kernel_access() conditional. For EVA it should be calling
      __strlen_user_eva for user accesses, otherwise it will load from the
      kernel address space instead of the user address space, and the access
      checking will likely be ineffective at preventing it due to EVA's
      overlapping user and kernel address spaces.
      
      This was found after extending the test_user_copy module to cover user
      string access functions, which gave the following error with EVA:
      
      test_user_copy: illegal strlen_user passed
      
      Fortunately the use of strlen_user() has been all but eradicated from
      the mainline kernel, so only out of tree modules could be affected.
      
      Fixes: e3a9b07a ("MIPS: asm: uaccess: Add EVA support for str*_user operations")
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Leonid Yegoshin <leonid.yegoshin@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: <stable@vger.kernel.org> # 3.15.x-
      Patchwork: https://patchwork.linux-mips.org/patch/10842/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      5dc62fdd
  3. 21 12月, 2015 2 次提交
  4. 20 12月, 2015 11 次提交
    • S
      rtc: da9063: fix access ordering error during RTC interrupt at system power on · 77535ace
      Steve Twiss 提交于
      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: NSteve Twiss <stwiss.opensource@diasemi.com>
      Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
      77535ace
    • J
      rtc: rk808: Compensate for Rockchip calendar deviation on November 31st · f076ef44
      Julius Werner 提交于
      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: NJulius Werner <jwerner@chromium.org>
      Reviewed-by: NDouglas Anderson <dianders@chromium.org>
      Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
      f076ef44
    • L
      Merge tag 'tty-4.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 69c37a92
      Linus Torvalds 提交于
      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
    • L
      Merge tag 'usb-4.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 24b0d5e7
      Linus Torvalds 提交于
      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
    • L
      Merge tag 'md/4.4-rc5-fixes' of git://neil.brown.name/md · 3a87711e
      Linus Torvalds 提交于
      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
    • L
      Merge tag 'powerpc-4.4-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 35b3154e
      Linus Torvalds 提交于
      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
    • L
      Merge tag 'spi-fix-v4.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 3c73a2dd
      Linus Torvalds 提交于
      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
    • L
      Merge tag 'gpio-v4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · d525c13e
      Linus Torvalds 提交于
      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
    • L
      Merge tag 'pinctrl-v4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 38beb96e
      Linus Torvalds 提交于
      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
    • L
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · d7d3d841
      Linus Torvalds 提交于
      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
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 632f8577
      Linus Torvalds 提交于
      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
  5. 19 12月, 2015 20 次提交