1. 28 1月, 2016 2 次提交
  2. 27 1月, 2016 4 次提交
  3. 09 1月, 2016 1 次提交
  4. 08 1月, 2016 2 次提交
    • G
      serial: sh-sci: Remove cpufreq notifier to fix crash/deadlock · ff1cab37
      Geert Uytterhoeven 提交于
      The BSP team noticed that there is spin/mutex lock issue on sh-sci when
      CPUFREQ is used.  The issue is that the notifier function may call
      mutex_lock() while the spinlock is held, which can lead to a BUG().
      This may happen if CPUFREQ is changed while another CPU calls
      clk_get_rate().
      
      Taking the spinlock was added to the notifier function in commit
      e552de24 ("sh-sci: add platform device private data"), to
      protect the list of serial ports against modification during traversal.
      At that time the Common Clock Framework didn't exist yet, and
      clk_get_rate() just returned clk->rate without taking a mutex.
      Note that since commit d535a230 ("serial: sh-sci: Require a
      device per port mapping."), there's no longer a list of serial ports to
      traverse, and taking the spinlock became superfluous.
      
      To fix the issue, just remove the cpufreq notifier:
        1. The notifier doesn't work correctly: all it does is update stored
           clock rates; it does not update the divider in the hardware.
           The divider will only be updated when calling sci_set_termios().
           I believe this was broken back in 2004, when the old
           drivers/char/sh-sci.c driver (where the notifier did update the
           divider) was replaced by drivers/serial/sh-sci.c (where the
           notifier just updated port->uartclk).
           Cfr. full-history-linux commits 6f8deaef2e9675d9 ("[PATCH] sh: port
           sh-sci driver to the new API") and 3f73fe878dc9210a ("[PATCH]
           Remove old sh-sci driver").
        2. On modern SoCs, the sh-sci parent clock rate is no longer related
           to the CPU clock rate anyway, so using a cpufreq notifier is
           futile.
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ff1cab37
    • P
      serial: 8250: of: Fix the driver and actually compile the 8250_of · c93a5993
      Peter Ujfalusi 提交于
      The 8250_of never compiled since in the Kconfig we have SERIAL_OF_PLATFORM
      but in the makefile we expect to have SERIAL_8250_OF...
      
      When the 8250_of.c is actually compiled we will have two errors:
      missing linux/nwpserial.h and 8250/8250.h.
      Fix those as well at the same time when enable the compilation of the
      driver.
      Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
      Fixes: afd7f88f ("serial: 8250: move of_serial code to 8250 directory")
      Reported-by: NGuenter Roeck <linux@roeck-us.net>
      CC: Arnd Bergmann <arnd@arndb.de>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NJon Hunter <jonathanh@nvidia.com>
      Tested-by: NJon Hunter <jonathanh@nvidia.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c93a5993
  5. 07 1月, 2016 2 次提交
  6. 30 12月, 2015 1 次提交
    • A
      sysrq: Fix warning in sysrq generated crash. · 984cf355
      Ani Sinha 提交于
      Commit 984d74a7 ("sysrq: rcu-ify __handle_sysrq") replaced
      spin_lock_irqsave() calls with rcu_read_lock() calls in sysrq. Since
      rcu_read_lock() does not disable preemption, faulthandler_disabled() in
      __do_page_fault() in x86/fault.c returns false. When the code later calls
      might_sleep() in the pagefault handler, we get the following warning:
      
      BUG: sleeping function called from invalid context at ../arch/x86/mm/fault.c:1187
      in_atomic(): 0, irqs_disabled(): 0, pid: 4706, name: bash
      Preemption disabled at:[<ffffffff81484339>] printk+0x48/0x4a
      
      To fix this, we release the RCU read lock before we crash.
      
      Tested this patch on linux 3.18 by booting off one of our boards.
      
      Fixes: 984d74a7 ("sysrq: rcu-ify __handle_sysrq")
      Signed-off-by: NAni Sinha <ani@arista.com>
      Reviewed-by: NRik van Riel <riel@redhat.com>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      984cf355
  7. 25 12月, 2015 2 次提交
  8. 23 12月, 2015 1 次提交
  9. 17 12月, 2015 21 次提交
  10. 14 12月, 2015 4 次提交