1. 19 6月, 2012 1 次提交
  2. 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
  3. 15 6月, 2012 1 次提交
    • R
      vt: fix race in vt_waitactive() · 2fc46915
      Rabin Vincent 提交于
      pm_restore_console() is called from the suspend/resume path, and this
      calls vt_move_to_console(), which calls vt_waitactive().
      
      There's a race in this path which causes the process which requests the
      suspend to sleep indefinitely waiting for an event which already
      happened:
      
      P1                                      P2
       vt_move_to_console()
        set_console()
          schedule_console_callback()
        vt_waitactive()
          check n == fg_console +1
                                             console_callback()
                                               switch_screen()
                                               vt_event_post() // no waiters
      
          vt_event_wait() // forever
      
      Fix the race by ensuring we're registered for the event before we check
      if it's already completed.
      Signed-off-by: NRabin Vincent <rabin.vincent@stericsson.com>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2fc46915
  4. 14 6月, 2012 10 次提交
  5. 13 6月, 2012 24 次提交
  6. 12 6月, 2012 2 次提交
  7. 09 6月, 2012 1 次提交