1. 27 9月, 2016 1 次提交
  2. 22 9月, 2016 1 次提交
    • J
      tty/serial/8250: Touch NMI watchdog in wait_for_xmitr · 54f19b4a
      Jiri Olsa 提交于
      First loop in wait_for_xmitr could also trigger NMI
      watchdog in case reading from the port is slow:
      
        PID: 0      TASK: ffffffff819c1460  CPU: 0   COMMAND: "swapper/0"
         #0 [ffff88019f405e58] crash_nmi_callback at ffffffff8104d382
         #1 [ffff88019f405e68] nmi_handle at ffffffff8168ead9
         #2 [ffff88019f405eb0] do_nmi at ffffffff8168ec53
         #3 [ffff88019f405ef0] end_repeat_nmi at ffffffff8168df13
            [exception RIP: delay_tsc+50]
            RIP: ffffffff81325642  RSP: ffff88019f403bb0  RFLAGS: 00000083
            RAX: 00000000000005c8  RBX: ffffffff81f83000  RCX: 0000024e4fb88a8b
            RDX: 0000024e4fb89053  RSI: 0000000000000000  RDI: 00000000000007d1
            RBP: ffff88019f403bb0   R8: 000000000000000a   R9: 0000000000000000
            R10: 0000000000000000  R11: ffff88019f403ad6  R12: 000000000000250f
            R13: 0000000000000020  R14: ffffffff81d360c7  R15: 0000000000000047
            ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
        --- <NMI exception stack> ---
         #4 [ffff88019f403bb0] delay_tsc at ffffffff81325642
         #5 [ffff88019f403bb8] __const_udelay at ffffffff813255a8
         #6 [ffff88019f403bc8] wait_for_xmitr at ffffffff81404390
         #7 [ffff88019f403bf0] serial8250_console_putchar at ffffffff8140455c
         #8 [ffff88019f403c10] uart_console_write at ffffffff813ff00a
         #9 [ffff88019f403c40] serial8250_console_write at ffffffff814044ae
        #10 [ffff88019f403c88] call_console_drivers.constprop.15 at ffffffff81086b01
        #11 [ffff88019f403cb0] console_unlock at ffffffff8108842f
        #12 [ffff88019f403ce8] vprintk_emit at ffffffff81088834
        #13 [ffff88019f403d58] vprintk_default at ffffffff81088ba9
        #14 [ffff88019f403d68] printk at ffffffff8167f034
      
      Adding touch_nmi_watchdog call to the first loop as well.
      Reported-by: NChunyu Hu <chuhu@redhat.com>
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      54f19b4a
  3. 02 9月, 2016 2 次提交
  4. 31 8月, 2016 3 次提交
  5. 26 6月, 2016 3 次提交
  6. 25 6月, 2016 1 次提交
  7. 01 5月, 2016 5 次提交
  8. 19 4月, 2016 1 次提交
  9. 08 3月, 2016 2 次提交
  10. 07 2月, 2016 8 次提交
  11. 29 1月, 2016 5 次提交
  12. 14 12月, 2015 1 次提交
  13. 05 10月, 2015 6 次提交
    • M
      serial: 8250: add uart_config entry for PORT_RT2880 · 3c5a0357
      Mans Rullgard 提交于
      This adds an entry to the uart_config table for PORT_RT2880
      enabling rx/tx FIFOs.  The UART is actually a Palmchip BK-3103
      which is found in several devices from Alchemy/RMI, Ralink, and
      Sigma Designs.
      Signed-off-by: NMans Rullgard <mans@mansr.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3c5a0357
    • P
      serial: 8250: Refactor serial console restore-from-suspend · 10791233
      Peter Hurley 提交于
      Move h/w reinit of serial console restore-from-suspend into
      standalone helper function.
      
      No functional change.
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      10791233
    • J
      serial: 8250: Tolerate clock variance for max baud rate · 4f56f3fd
      James Hogan 提交于
      When the UART clock is set slightly under 1.8432MHz, the 8250 driver
      core doesn't permit the 115200 baud rate since it calculates the maximum
      frequency to pass to uart_get_baud_rate by simply dividing the uart
      clock by 16 which yields a value slightly under 115200, even though the
      frequency is close enough for the UART to operate reliably.
      
      Therefore add some tolerance in the calculation of the maximum baud
      rate. 1% tolerance allows for marginally slower uart clk than nominal
      without introducing transmission errors.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      [pjh: Forward-port & refactor original patch; change tolerance to 1%]
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4f56f3fd
    • M
      serial: 8250: simplify ralink/alchemy register remap selection · 9b2256c8
      Mans Rullgard 提交于
      Some SoCs, including Ralink/Mediatek and Alchemy Au1xxx, have a
      16550-like UART with a non-standard register layout.  These are
      supported by a simple mapping table in 8250_port.c  Rather than
      list every SoC type using this access mode in the ifdefs there,
      allow selecting the SERIAL_8250_RT288X Kconfig option with any
      system and default it to y for the known cases needing it.  The
      help text is reworded accordingly.
      
      This change simplifies adding support for other SoCs also using
      the same UART.
      
      The name of the option is a little misleading, but not knowing
      the true origin of this UART, it is as good a choice as any.
      Signed-off-by: NMans Rullgard <mans@mansr.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9b2256c8
    • T
      serial: 8250: Fix autoconfig_irq() to avoid race conditions · 9a23a1d1
      Taichi Kageyama 提交于
      The following race conditions can happen when a serial port is used
      as console.
      
      Case1: CPU_B is used to detect an interrupt from a serial port,
             but it can have interrupts disabled during the waiting time.
      Case2: CPU_B clears UART_IER just after CPU_A sets UART_IER and then
             a serial port may not make an interrupt.
      Case3: CPU_A sets UART_IER just after CPU_B clears UART_IER.
             This is an unexpected behavior for serial8250_console_write().
      
      CPU_A [autoconfig_irq]      |  CPU_B [serial8250_console_write]
      ----------------------------|---------------------------------------
                                  |
      probe_irq_on()              |  spin_lock_irqsave(&port->lock,)
      serial_outp(,UART_IER,0x0f) |  serial_out(,UART_IER,0)
      udelay(20);                 |  uart_console_write()
      probe_irq_off()             |
                                  |  spin_unlock_irqrestore(&port->lock,)
      
      Case1 and 2 can make autoconfig_irq() failed.
      In these cases, the console doesn't work in interrupt mode and
      "input overrun" (which can make operation mistakes) can happen
      on some systems. Especially in the Case1, It is known that the
      problem happens with high rate every boot once it occurs
      because the boot sequence is always almost same.
      
      port mutex makes sure that the autoconfig operation is exclusive of
      any other concurrent HW access except by the console operation.
      console lock is required in autoconfig_irq().
      Signed-off-by: NTaichi Kageyama <t-kageyama@cp.jp.nec.com>
      Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Reviewed-by: NPeter Hurley <peter@hurleysoftware.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9a23a1d1
    • M
      serial: don't register CIR serial ports · e4fda3a0
      Maciej S. Szmigiero 提交于
      CIR type serial ports aren't real serial ports.
      
      This is just a way to prevent legacy 8250 serial
      driver from probing and eventually binding some
      resources.
      
      Since in current state such ports aren't providing
      any real functionality and it is not possible
      to change their type via setserial/ioctl(TIOCSSERIAL)
      (due to UPF_FIXED_PORT flag set on them)
      it is simpler and cleaner to not register them at all
      with serial core.
      
      Print a short message in this case so it is known
      to user what has happened.
      
      This way checks for PORT_8250_CIR in serial port
      callbacks can be removed too, since they won't
      ever be called.
      Signed-off-by: NMaciej Szmigiero <mail@maciej.szmigiero.name>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e4fda3a0
  14. 23 9月, 2015 1 次提交