1. 13 8月, 2013 5 次提交
    • S
      serial: i.MX: evaluate linux,stdout-path property · f7d2c0bb
      Sascha Hauer 提交于
      devicetrees may have the linux,stdout-path property to specify the
      console. This patch adds support to the i.MX serial driver for this.
      Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f7d2c0bb
    • G
      tty: ar933x_uart: convert to use devm_* functions · a324e4de
      Gabor Juhos 提交于
      Use devm_* functions in order to simplify cleanup
      paths.
      Signed-off-by: NGabor Juhos <juhosg@openwrt.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a324e4de
    • P
      n_tty: Fix termios_rwsem lockdep false positive · aefceaf4
      Peter Hurley 提交于
      Lockdep reports a circular lock dependency between
      atomic_read_lock and termios_rwsem [1]. However, a lock
      order deadlock is not possible since CPU1 only holds a
      read lock which cannot prevent CPU0 from also acquiring
      a read lock on the same r/w semaphore.
      
      Unfortunately, lockdep cannot currently distinguish whether
      the locks are read or write for any particular lock graph,
      merely that the locks _were_ previously read and/or write.
      
      Until lockdep is fixed, re-order atomic_read_lock so
      termios_rwsem can be dropped and reacquired without
      triggering lockdep.
      
      Patch based on original posted here https://lkml.org/lkml/2013/8/1/510
      by Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
      
      [1] Initial lockdep report from Artem Savkov <artem.savkov@gmail.com>
      
       ======================================================
       [ INFO: possible circular locking dependency detected ]
       3.11.0-rc3-next-20130730+ #140 Tainted: G        W
       -------------------------------------------------------
       bash/1198 is trying to acquire lock:
        (&tty->termios_rwsem){++++..}, at: [<ffffffff816aa3bb>] n_tty_read+0x49b/0x660
      
       but task is already holding lock:
        (&ldata->atomic_read_lock){+.+...}, at: [<ffffffff816aa0f0>] n_tty_read+0x1d0/0x660
      
       which lock already depends on the new lock.
      
       the existing dependency chain (in reverse order) is:
      
       -> #1 (&ldata->atomic_read_lock){+.+...}:
              [<ffffffff811111cc>] validate_chain+0x73c/0x850
              [<ffffffff811117e0>] __lock_acquire+0x500/0x5d0
              [<ffffffff81111a29>] lock_acquire+0x179/0x1d0
              [<ffffffff81d34b9c>] mutex_lock_interruptible_nested+0x7c/0x540
              [<ffffffff816aa0f0>] n_tty_read+0x1d0/0x660
              [<ffffffff816a3bb6>] tty_read+0x86/0xf0
              [<ffffffff811f21d3>] vfs_read+0xc3/0x130
              [<ffffffff811f2702>] SyS_read+0x62/0xa0
              [<ffffffff81d45259>] system_call_fastpath+0x16/0x1b
      
       -> #0 (&tty->termios_rwsem){++++..}:
              [<ffffffff8111064f>] check_prev_add+0x14f/0x590
              [<ffffffff811111cc>] validate_chain+0x73c/0x850
              [<ffffffff811117e0>] __lock_acquire+0x500/0x5d0
              [<ffffffff81111a29>] lock_acquire+0x179/0x1d0
              [<ffffffff81d372c1>] down_read+0x51/0xa0
              [<ffffffff816aa3bb>] n_tty_read+0x49b/0x660
              [<ffffffff816a3bb6>] tty_read+0x86/0xf0
              [<ffffffff811f21d3>] vfs_read+0xc3/0x130
              [<ffffffff811f2702>] SyS_read+0x62/0xa0
              [<ffffffff81d45259>] system_call_fastpath+0x16/0x1b
      
       other info that might help us debug this:
      
        Possible unsafe locking scenario:
      
              CPU0                    CPU1
              ----                    ----
         lock(&ldata->atomic_read_lock);
                                      lock(&tty->termios_rwsem);
                                      lock(&ldata->atomic_read_lock);
         lock(&tty->termios_rwsem);
      
        *** DEADLOCK ***
      
       2 locks held by bash/1198:
        #0:  (&tty->ldisc_sem){.+.+.+}, at: [<ffffffff816ade04>] tty_ldisc_ref_wait+0x24/0x60
        #1:  (&ldata->atomic_read_lock){+.+...}, at: [<ffffffff816aa0f0>] n_tty_read+0x1d0/0x660
      
       stack backtrace:
       CPU: 1 PID: 1198 Comm: bash Tainted: G        W    3.11.0-rc3-next-20130730+ #140
       Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007
        0000000000000000 ffff880019acdb28 ffffffff81d34074 0000000000000002
        0000000000000000 ffff880019acdb78 ffffffff8110ed75 ffff880019acdb98
        ffff880019fd0000 ffff880019acdb78 ffff880019fd0638 ffff880019fd0670
       Call Trace:
        [<ffffffff81d34074>] dump_stack+0x59/0x7d
        [<ffffffff8110ed75>] print_circular_bug+0x105/0x120
        [<ffffffff8111064f>] check_prev_add+0x14f/0x590
        [<ffffffff81d3ab5f>] ? _raw_spin_unlock_irq+0x4f/0x70
        [<ffffffff811111cc>] validate_chain+0x73c/0x850
        [<ffffffff8110ae0f>] ? trace_hardirqs_off_caller+0x1f/0x190
        [<ffffffff811117e0>] __lock_acquire+0x500/0x5d0
        [<ffffffff81111a29>] lock_acquire+0x179/0x1d0
        [<ffffffff816aa3bb>] ? n_tty_read+0x49b/0x660
        [<ffffffff81d372c1>] down_read+0x51/0xa0
        [<ffffffff816aa3bb>] ? n_tty_read+0x49b/0x660
        [<ffffffff816aa3bb>] n_tty_read+0x49b/0x660
        [<ffffffff810e4130>] ? try_to_wake_up+0x210/0x210
        [<ffffffff816a3bb6>] tty_read+0x86/0xf0
        [<ffffffff811f21d3>] vfs_read+0xc3/0x130
        [<ffffffff811f2702>] SyS_read+0x62/0xa0
        [<ffffffff815e24ee>] ? trace_hardirqs_on_thunk+0x3a/0x3f
        [<ffffffff81d45259>] system_call_fastpath+0x16/0x1b
      Reported-by: NArtem Savkov <artem.savkov@gmail.com>
      Reported-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      aefceaf4
    • J
      serial: pxa: Staticize local symbols · 6c62cc0d
      Jingoo Han 提交于
      These local symbols are used only in this file.
      Fix the following sparse warnings:
      
      drivers/tty/serial/pxa.c:793:17: warning: symbol 'serial_pxa_pops' was not declared. Should it be static?
      drivers/tty/serial/pxa.c:971:12: warning: symbol 'serial_pxa_init' was not declared. Should it be static?
      drivers/tty/serial/pxa.c:986:13: warning: symbol 'serial_pxa_exit' was not declared. Should it be static?
      Signed-off-by: NJingoo Han <jg1.han@samsung.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6c62cc0d
    • D
      tty: serial: pxa: remove old cruft · 331b3734
      Daniel Mack 提交于
      This #if-0'd block wouldn't compile, so let's dispose it.
      Signed-off-by: NDaniel Mack <zonque@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      331b3734
  2. 05 8月, 2013 3 次提交
  3. 03 8月, 2013 1 次提交
  4. 02 8月, 2013 5 次提交
    • G
      Revert "serial: sccnxp: Add DT support" · 461a8ecb
      Greg Kroah-Hartman 提交于
      This reverts commit 85c99690.
      
      Alexander wishes to remove this patch as it is incorrect.
      Reported-by: NAlexander Shiyan <shc_work@mail.ru>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      461a8ecb
    • J
      serial: sh-sci: use dev_get_platdata() · 3ba35baa
      Jingoo Han 提交于
      Use the wrapper function for retrieving the platform data instead of
      accessing dev->platform_data directly
      Signed-off-by: NJingoo Han <jg1.han@samsung.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3ba35baa
    • V
      serial/arc-uart: Remove the goto/label · 00a135b3
      Vineet Gupta 提交于
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      Cc: Mischa Jonker <mjonker@synopsys.com>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      00a135b3
    • V
      serial/arc-uart: Handle Rx Error Interrupts w/o any data · 5284eba7
      Vineet Gupta 提交于
      Currently, Rx error handling only triggers if there is some Rx data.
      Fix that by checking for error - before the data handling.
      Reported-by: NMischa Jonker <mjonker@synopsys.com>
      Tested-by: NMischa Jonker <mjonker@synopsys.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5284eba7
    • P
      tty: Only hangup once · cb50e523
      Peter Hurley 提交于
      Instrumented testing shows a tty can be hungup multiple times [1].
      Although concurrent hangups are properly serialized, multiple
      hangups for the same tty should be prevented.
      
      If tty has already been HUPPED, abort hangup. Note it is not
      necessary to cleanup file *redirect on subsequent hangups,
      as only TIOCCONS can set that value and ioctls are disabled
      after hangup.
      
      [1]
      Test performed by simulating a concurrent async hangup via
      tty_hangup() with a sync hangup via tty_vhangup(), while
      __tty_hangup() was instrumented with:
      
      	diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
      	index 26bb78c..fe8b061 100644
      	--- a/drivers/tty/tty_io.c
      	+++ b/drivers/tty/tty_io.c
      	@@ -629,6 +629,8 @@ static void __tty_hangup(struct tty_struct *tty, int exit_session)
      
      		tty_lock(tty);
      
      	+	WARN_ON(test_bit(TTY_HUPPED, &tty->flags));
      	+
      		/* some functions below drop BTM, so we need this bit */
      		set_bit(TTY_HUPPING, &tty->flags);
      
      Test result:
      
      WARNING: at /home/peter/src/kernels/mainline/drivers/tty/tty_io.c:632 __tty_hangup+0x459/0x460()
      Modules linked in: ip6table_filter ip6_tables ebtable_nat <...snip...>
      CPU: 6 PID: 1197 Comm: kworker/6:2 Not tainted 3.10.0-0+rfcomm-xeon #0+rfcomm
      Hardware name: Dell Inc. Precision WorkStation T5400  /0RW203, BIOS A11 04/30/2012
      Workqueue: events do_tty_hangup
       0000000000000009 ffff8802b16d7d18 ffffffff816b553e ffff8802b16d7d58
       ffffffff810407e0 ffff880254f95c00 ffff880254f95c00 ffff8802bfd92b00
       ffff8802bfd96b00 ffff880254f95e40 0000000000000180 ffff8802b16d7d68
      Call Trace:
       [<ffffffff816b553e>] dump_stack+0x19/0x1b
       [<ffffffff810407e0>] warn_slowpath_common+0x70/0xa0
       [<ffffffff8104082a>] warn_slowpath_null+0x1a/0x20
       [<ffffffff813fb279>] __tty_hangup+0x459/0x460
       [<ffffffff8107409c>] ? finish_task_switch+0xbc/0xe0
       [<ffffffff813fb297>] do_tty_hangup+0x17/0x20
       [<ffffffff8105fd6f>] process_one_work+0x16f/0x450
       [<ffffffff8106007c>] process_scheduled_works+0x2c/0x40
       [<ffffffff8106060a>] worker_thread+0x26a/0x380
       [<ffffffff810603a0>] ? rescuer_thread+0x310/0x310
       [<ffffffff810698a0>] kthread+0xc0/0xd0
       [<ffffffff816b0000>] ? destroy_compound_page+0x65/0x92
       [<ffffffff810697e0>] ? kthread_create_on_node+0x130/0x130
       [<ffffffff816c495c>] ret_from_fork+0x7c/0xb0
       [<ffffffff810697e0>] ? kthread_create_on_node+0x130/0x130
      ---[ end trace 98d9f01536cf411e ]---
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cb50e523
  5. 01 8月, 2013 8 次提交
  6. 30 7月, 2013 11 次提交
  7. 27 7月, 2013 7 次提交