1. 14 8月, 2012 3 次提交
  2. 11 8月, 2012 2 次提交
    • J
      TTY: 68328serial, fix compilation · 3dd332c5
      Jiri Slaby 提交于
      tty_struct->termios is no longer a pointer. This was changed recently
      by "tty: move the termios object into the tty". But 68328serial was
      not changed, so we now have a compilation error:
      68328serial.c: In function 'change_speed':
      68328serial.c:518:22: error: invalid type argument of '->' (have 'struct ktermios')
      68328serial.c: In function 'rs_set_ldisc':
      68328serial.c:620:31: error: invalid type argument of '->' (have 'struct ktermios')
      68328serial.c: In function 'rs_set_termios':
      68328serial.c:988:20: error: invalid type argument of '->' (have 'struct ktermios')
      
      Fix that now.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3dd332c5
    • A
      tty: localise the lock · 89c8d91e
      Alan Cox 提交于
      The termios and other changes mean the other protections needed on the driver
      tty arrays should be adequate. Turn it all back on.
      
      This contains pieces folded in from the fixes made to the original patches
      
      | From: Geert Uytterhoeven <geert@linux-m68k.org>	(fix m68k)
      | From: Paul Gortmaker <paul.gortmaker@windriver.com>	(fix cris)
      | From: Jiri Kosina <jkosina@suze.cz>			(lockdep)
      | From: Eric Dumazet <eric.dumazet@gmail.com>		(lockdep)
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      89c8d91e
  3. 01 8月, 2012 1 次提交
  4. 27 7月, 2012 8 次提交
  5. 19 7月, 2012 1 次提交
  6. 18 7月, 2012 5 次提交
  7. 17 7月, 2012 2 次提交
  8. 13 7月, 2012 4 次提交
  9. 07 7月, 2012 1 次提交
    • A
      tty: localise the lock · f5e3bcc5
      Alan Cox 提交于
      The termios and other changes mean the other protections needed on the driver
      tty arrays should be adequate. Turn it all back on.
      
      This contains pieces folded in from the fixes made to the original patches
      
      | From: Geert Uytterhoeven <geert@linux-m68k.org>	(fix m68k)
      | From: Paul Gortmaker <paul.gortmaker@windriver.com>	(fix cris)
      | From: Jiri Kosina <jkosina@suze.cz>			(lockdep)
      | From: Eric Dumazet <eric.dumazet@gmail.com>		(lockdep)
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f5e3bcc5
  10. 03 7月, 2012 1 次提交
  11. 01 7月, 2012 1 次提交
  12. 29 6月, 2012 1 次提交
  13. 21 6月, 2012 1 次提交
    • D
      pch_uart: Add eg20t_port lock field, avoid recursive spinlocks · fe89def7
      Darren Hart 提交于
      pch_uart_interrupt() takes priv->port.lock which leads to two recursive
      spinlock calls if low_latency==1 or CONFIG_PREEMPT_RT_FULL=y (one
      otherwise):
      
      pch_uart_interrupt
        spin_lock_irqsave(priv->port.lock, flags)
        case PCH_UART_IID_RDR_TO (data ready)
        handle_rx_to
          push_rx
            tty_port_tty_get
              spin_lock_irqsave(&port->lock, flags) <--- already hold this lock
              ...
            tty_flip_buffer_push
              ...
              flush_to_ldisc
                spin_lock_irqsave(&tty->buf.lock)
                  spin_lock_irqsave(&tty->buf.lock)
                  disc->ops->receive_buf(tty, char_buf)
                    n_tty_receive_buf
                      tty->ops->flush_chars()
                      uart_flush_chars
                        uart_start
                          spin_lock_irqsave(&port->lock) <--- already hold this lock
      
      Avoid this by using a dedicated lock to protect the eg20t_port structure
      and IO access to its membase. This is more consistent with the 8250
      driver.  Ensure priv->lock is always take prior to priv->port.lock when
      taken at the same time.
      
      V2: Remove inadvertent whitespace change.
      V3: Account for oops_in_progress for the private lock in
          pch_console_write().
      
      Note: Like the 8250 driver, if a printk is introduced anywhere inside
            the pch_console_write() critical section, the kernel will hang
            on a recursive spinlock on the private lock. The oops case is
            handled by using a trylock in the oops_in_progress case.
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      CC: Tomoya MORINAGA <tomoya.rohm@gmail.com>
      CC: Feng Tang <feng.tang@intel.com>
      CC: Alexander Stein <alexander.stein@systec-electronic.com>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fe89def7
  14. 19 6月, 2012 1 次提交
  15. 16 6月, 2012 1 次提交
    • C
      serial: pxa: add spin lock for console write · cfe275c2
      Chao Xie 提交于
      v3:
      Remove empty line
      
      v2:
      Move local_irq_save() after clk_prepare_enable()
      
      v1:
      At UP mode, when cpu want to print message in kernel, it will invoke
      peempt_disable and disable irq. So it is safe for UP mode.
      For SMP mode, it is not safe to protect the HW reigsters.
      one CPU will run a program which will invoke printf.
      another CPU will run a program in kernel that invoke printk.
      So when second CPU is trying to printk, it will do
      1. save ier register
      2. enable uue bit of ier register
      3. push buffer to uart fifo
      4 .restore ier register
      when first CPU want to printf, and it happens between 1 and 4, it will
      enable thre bit of ier, and waiting for transmit intterupt. while step 4
      will make the ier lost thre bit.
      add spin lock here to protect the ier register for console write.
      Signed-off-by: NChao Xie <chao.xie@marvell.com>
      Signed-off-by: NHaojian Zhuang <haojian.zhuang@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cfe275c2
  16. 13 6月, 2012 7 次提交