1. 23 10月, 2012 19 次提交
  2. 17 10月, 2012 1 次提交
  3. 16 10月, 2012 1 次提交
  4. 15 10月, 2012 1 次提交
  5. 12 10月, 2012 2 次提交
    • J
      kdb,vt_console: Fix missed data due to pager overruns · 17b572e8
      Jason Wessel 提交于
      It is possible to miss data when using the kdb pager.  The kdb pager
      does not pay attention to the maximum column constraint of the screen
      or serial terminal.  This result is not incrementing the shown lines
      correctly and the pager will print more lines that fit on the screen.
      Obviously that is less than useful when using a VGA console where you
      cannot scroll back.
      
      The pager will now look at the kdb_buffer string to see how many
      characters are printed.  It might not be perfect considering you can
      output ASCII that might move the cursor position, but it is a
      substantially better approximation for viewing dmesg and trace logs.
      
      This also means that the vt screen needs to set the kdb COLUMNS
      variable.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      17b572e8
    • J
      kgdboc: Accept either kbd or kdb to activate the vga + keyboard kdb shell · 24b8592e
      Jason Wessel 提交于
      It is a common enough mistake for people to specify "kdb" when they
      meant to type "kbd" that the kgdboc can just accept both since they
      both mean the same thing anyway.  Specifically it is for the case
      where you want kdb to be active on your graphics console + keyboard
      (where kbd was the original abbreviation for keyboard).
      
      With this change kgdboc will now accept either to mean the same thing:
         kgdboc=kbd
         kgdboc=kdb
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      24b8592e
  6. 06 10月, 2012 2 次提交
  7. 04 10月, 2012 1 次提交
  8. 27 9月, 2012 13 次提交
    • A
      make get_file() return its argument · cb0942b8
      Al Viro 提交于
      simplifies a bunch of callers...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      cb0942b8
    • A
      new helper: iterate_fd() · c3c073f8
      Al Viro 提交于
      iterates through the opened files in given descriptor table,
      calling a supplied function; we stop once non-zero is returned.
      Callback gets struct file *, descriptor number and const void *
      argument passed to iterator.  It is called with files->file_lock
      held, so it is not allowed to block.
      
      tty_io, netprio_cgroup and selinux flush_unauthorized_files()
      converted to its use.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      c3c073f8
    • A
      tty/serial: Add kgdb_nmi driver · 0c57dfcc
      Anton Vorontsov 提交于
      This special driver makes it possible to temporary use NMI debugger port
      as a normal console by issuing 'nmi_console' command (assuming that the
      port is attached to KGDB).
      
      Unlike KDB's disable_nmi command, with this driver you are always able
      to go back to the debugger using KGDB escape sequence ($3#33).  This is
      because this console driver processes the input in NMI context, and thus
      is able to intercept the magic sequence.
      
      Note that since the console interprets input and uses polling
      communication methods, for things like PPP it is still better to fully
      detach debugger port from the KGDB NMI (i.e. disable_nmi), and use raw
      console.
      
      Usually, to enter the debugger one have to type the magic sequence, so
      initially the kernel will print the following prompt on the NMI debugger
      console:
      
      	Type $3#33 to enter the debugger>
      
      For convenience, there is a kgdb_fiq.knock kernel command line option,
      when set to 0, this turns the special command to just a return key
      press, so the kernel will be printing this:
      
      	Hit <return> to enter the debugger>
      
      This is more convenient for long debugging sessions, although it makes
      nmi_console feature somewhat useless.
      
      And for the cases when NMI connected to a dedicated button, the knocking
      can be disabled altogether by setting kgdb_fiq.knock to -1.
      Suggested-by: NColin Cross <ccross@android.com>
      Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Acked-by: NJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0c57dfcc
    • A
      tty/serial/amba-pl011: Quiesce interrupts in poll_get_char · 5c8124a0
      Anton Vorontsov 提交于
      We need to quiesce interrupts in the poll_get_char routine, otherwise,
      if used with KGDB NMI debugger, we'll keep reentering the NMI.
      
      Quiescing interrupts is pretty straightforward, except for TXIM
      interrupt. The interrupt has "ready to transmit" meaning, so it's
      almost always raised, and the only way to silence it is to mask it. But
      that's OK, ops->start_tx will unmask it.
      Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5c8124a0
    • A
      tty/serial/amba-pl011: Implement poll_init callback · b3564c2c
      Anton Vorontsov 提交于
      The callback is used to initialize the hardware, nothing else should be
      done, i.e. we should not request interrupts (but we can and do unmask
      some of them, as they might be useful for NMI entry).
      
      As a side-effect, the patch also fixes a division by zero[1] when booting
      with kgdboc options specified (e.g. kgdboc=ttyAMA0,115200n8). The issue
      happens because serial core calls set_termios callback, but the driver
      doesn't know clock frequency, and thus cannot calculate proper baud rate
      values.
      
      [1]
      WARNING: at drivers/tty/serial/serial_core.c:400 uart_get_baud_rate+0xe8/0x14c()
      Modules linked in:
      [<c0018e50>] (unwind_backtrace+0x0/0xf0) from [<c0020ae8>] (warn_slowpath_common+0x4c/0x64)
      [<c0020ae8>] (warn_slowpath_common+0x4c/0x64) from [<c0020b1c>] (warn_slowpath_null+0x1c/0x24)
      [<c0020b1c>] (warn_slowpath_null+0x1c/0x24) from [<c0185ed8>] (uart_get_baud_rate+0xe8/0x14c)
      [<c0185ed8>] (uart_get_baud_rate+0xe8/0x14c) from [<c0187078>] (pl011_set_termios+0x48/0x278)
      [<c0187078>] (pl011_set_termios+0x48/0x278) from [<c01850b0>] (uart_set_options+0xe8/0x114)
      [<c01850b0>] (uart_set_options+0xe8/0x114) from [<c0185de4>] (uart_poll_init+0xd4/0xe0)
      [<c0185de4>] (uart_poll_init+0xd4/0xe0) from [<c016da8c>] (tty_find_polling_driver+0x100/0x17c)
      [<c016da8c>] (tty_find_polling_driver+0x100/0x17c) from [<c0188538>] (configure_kgdboc+0xc8/0x1b8)
      [<c0188538>] (configure_kgdboc+0xc8/0x1b8) from [<c00088a4>] (do_one_initcall+0x30/0x168)
      [<c00088a4>] (do_one_initcall+0x30/0x168) from [<c033784c>] (do_basic_setup+0x94/0xc8)
      [<c033784c>] (do_basic_setup+0x94/0xc8) from [<c03378e0>] (kernel_init+0x60/0xf4)
      [<c03378e0>] (kernel_init+0x60/0xf4) from [<c00144a0>] (kernel_thread_exit+0x0/0x8)
      ---[ end trace 7d41c9186f342c40 ]---
      Division by zero in kernel.
      [<c0018e50>] (unwind_backtrace+0x0/0xf0) from [<c014546c>] (Ldiv0+0x8/0x10)
      [<c014546c>] (Ldiv0+0x8/0x10) from [<c0187098>] (pl011_set_termios+0x68/0x278)
      [<c0187098>] (pl011_set_termios+0x68/0x278) from [<c01850b0>] (uart_set_options+0xe8/0x114)
      [<c01850b0>] (uart_set_options+0xe8/0x114) from [<c0185de4>] (uart_poll_init+0xd4/0xe0)
      [<c0185de4>] (uart_poll_init+0xd4/0xe0) from [<c016da8c>] (tty_find_polling_driver+0x100/0x17c)
      [<c016da8c>] (tty_find_polling_driver+0x100/0x17c) from [<c0188538>] (configure_kgdboc+0xc8/0x1b8)
      [<c0188538>] (configure_kgdboc+0xc8/0x1b8) from [<c00088a4>] (do_one_initcall+0x30/0x168)
      [<c00088a4>] (do_one_initcall+0x30/0x168) from [<c033784c>] (do_basic_setup+0x94/0xc8)
      [<c033784c>] (do_basic_setup+0x94/0xc8) from [<c03378e0>] (kernel_init+0x60/0xf4)
      [<c03378e0>] (kernel_init+0x60/0xf4) from [<c00144a0>] (kernel_thread_exit+0x0/0x8)
      Division by zero in kernel.
      [<c0018e50>] (unwind_backtrace+0x0/0xf0) from [<c014546c>] (Ldiv0+0x8/0x10)
      [<c014546c>] (Ldiv0+0x8/0x10) from [<c0183a98>] (uart_update_timeout+0x4c/0x5c)
      [<c0183a98>] (uart_update_timeout+0x4c/0x5c) from [<c01870f8>] (pl011_set_termios+0xc8/0x278)
      [<c01870f8>] (pl011_set_termios+0xc8/0x278) from [<c01850b0>] (uart_set_options+0xe8/0x114)
      [<c01850b0>] (uart_set_options+0xe8/0x114) from [<c0185de4>] (uart_poll_init+0xd4/0xe0)
      [<c0185de4>] (uart_poll_init+0xd4/0xe0) from [<c016da8c>] (tty_find_polling_driver+0x100/0x17c)
      [<c016da8c>] (tty_find_polling_driver+0x100/0x17c) from [<c0188538>] (configure_kgdboc+0xc8/0x1b8)
      [<c0188538>] (configure_kgdboc+0xc8/0x1b8) from [<c00088a4>] (do_one_initcall+0x30/0x168)
      [<c00088a4>] (do_one_initcall+0x30/0x168) from [<c033784c>] (do_basic_setup+0x94/0xc8)
      [<c033784c>] (do_basic_setup+0x94/0xc8) from [<c03378e0>] (kernel_init+0x60/0xf4)
      [<c03378e0>] (kernel_init+0x60/0xf4) from [<c00144a0>] (kernel_thread_exit+0x0/0x8)
      Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b3564c2c
    • A
      tty/serial/core: Introduce poll_init callback · c7f3e708
      Anton Vorontsov 提交于
      It was noticed that polling drivers (like KGDB) are not able to use
      serial ports if the ports were not previously initialized via console.
      I.e.  when booting with console=ttyAMA0 kgdboc=ttyAMA0, everything works
      fine, but with console=ttyFOO kgdboc=ttyAMA0, the kgdboc doesn't work.
      
      This is because we don't initialize the hardware. Calling ->startup() is
      not an option, because drivers request interrupts there, and drivers
      fail to handle situations when tty isn't opened with interrupts enabled.
      
      So, we have to implement a new callback (actually, tty_ops already have
      a similar callback), which does everything needed to initialize just the
      hardware.
      Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c7f3e708
    • L
      serial: pl011: handle corruption at high clock speeds · c5dd553b
      Linus Walleij 提交于
      This works around a few glitches in the ST version of the PL011
      serial driver when using very high baud rates, as we do in the
      Ux500: 3, 3.25, 4 and 4.05 Mbps.
      
      Problem Observed/rootcause:
      
      When using high baud-rates, and the baudrate*8 is getting close to
      the provided clock frequency (so a division factor close to 1), when
      using bursts of characters (so they are abutted), then it seems as if
      there is not enough time to detect the beginning of the start-bit which
      is a timing reference for the entire character, and thus the sampling
      moment of character bits is moving towards the end of each bit, instead
      of the middle.
      
      Fix:
      Increase slightly the RX baud rate of the UART above the theoretical
      baudrate by 5%. This will definitely give more margin time to the
      UART_RX to correctly sample the data at the middle of the bit period.
      
      Also fix the ages old copy-paste error in the very stressed comment,
      it's referencing the registers used in the PL010 driver rather than
      the PL011 ones.
      Signed-off-by: NGuillaume Jaunet <guillaume.jaunet@stericsson.com>
      Signed-off-by: NChristophe Arnal <christophe.arnal@stericsson.com>
      Signed-off-by: NMatthias Locher <matthias.locher@stericsson.com>
      Signed-off-by: NRajanikanth HV <rajanikanth.hv@stericsson.com>
      Cc: stable <stable@vger.kernel.org>
      Cc: Bibek Basu <bibek.basu@stericsson.com>
      Cc: Par-Gunnar Hjalmdahl <par-gunnar.hjalmdahl@stericsson.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c5dd553b
    • A
    • A
      serial: sccnxp: Remove mask termios caps for SW flow control · 3195fd23
      Alexander Shiyan 提交于
      The kernel will handle IXON/IXOFF/IXANY in software if the hardware
      doesn't do it.
      Signed-off-by: NAlexander Shiyan <shc_work@mail.ru>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3195fd23
    • A
    • J
      serial: samsung: Add poll_get_char & poll_put_char · 93b5c032
      Julien Pichon 提交于
      The following patch allows users to use KGDB over serial console on
      board based on Samsung SOC. It has been tested on a board using
      exynos5.
      
      [dianders: changed poll to return NO_POLL_CHAR, which appears to
      fix 'help' in kgdb; also updated commit message]
      Signed-off-by: NJulien Pichon <pichon.jln@gmail.com>
      Signed-off-by: NDoug Anderson <dianders@chromium.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      93b5c032
    • C
      Powerpc 8xx CPM_UART setting MAXIDL register proportionaly to baud rate · 6e62bdc0
      Christophe Leroy 提交于
      MAXIDL is the timeout after which a receive buffer is closed when not full if
      no more characters are received. We calculate it from the baudrate so that the
      duration is always the same at standard rates: about 4ms. At 9600 bauds it gives
      a timeout of 4 characters, which is the timeout on the 8250 UART.
      Signed-off-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6e62bdc0
    • C
      Powerpc 8xx CPM_UART maxidl should not depend on fifo size · fbbb9d96
      Christophe Leroy 提交于
      maxidl register was set to fifo size. There is no reason to set this
      register to same value as fifo size. Setting it now to 0x10 by default
      as in the UCC UART driver.
      Signed-off-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fbbb9d96