<feed xmlns='http://www.w3.org/2005/Atom'>
<title>talos-op-linux/drivers/tty/vt, branch v4.4.4</title>
<subtitle>Talos™ II Linux sources for OpenPOWER</subtitle>
<id>https://git.raptorcs.com/git/talos-op-linux/atom?h=v4.4.4</id>
<link rel='self' href='https://git.raptorcs.com/git/talos-op-linux/atom?h=v4.4.4'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/'/>
<updated>2015-07-24T01:08:29+00:00</updated>
<entry>
<title>tty: vt: Fix !TASK_RUNNING diagnostic warning from paste_selection()</title>
<updated>2015-07-24T01:08:29+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2015-07-13T00:47:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=61e86cc90af49cecef9c54ccea1f572fbcb695ac'/>
<id>urn:sha1:61e86cc90af49cecef9c54ccea1f572fbcb695ac</id>
<content type='text'>
Pasting text with gpm on a VC produced warning [1]. Reset task state
to TASK_RUNNING in the paste_selection() loop, if the loop did not
sleep.

[1]
WARNING: CPU: 6 PID: 1960 at /home/peter/src/kernels/mainline/kernel/sched/core.c:7286 __might_sleep+0x7f/0x90()
do not call blocking ops when !TASK_RUNNING; state=1 set at [&lt;ffffffff8151805e&gt;] paste_selection+0x9e/0x1a0
Modules linked in: btrfs xor raid6_pq ufs qnx4 hfsplus hfs minix ntfs msdos jfs xfs libcrc32c .....
CPU: 6 PID: 1960 Comm: gpm Not tainted 4.1.0-rc7+tty-xeon+debug #rc7+tty
Hardware name: Dell Inc. Precision WorkStation T5400  /0RW203, BIOS A11 04/30/2012
 ffffffff81c9c0a0 ffff8802b0fd3ac8 ffffffff8185778a 0000000000000001
 ffff8802b0fd3b18 ffff8802b0fd3b08 ffffffff8108039a ffffffff82ae8510
 ffffffff81c9ce00 0000000000000015 0000000000000000 0000000000000000
Call Trace:
 [&lt;ffffffff8185778a&gt;] dump_stack+0x4f/0x7b
 [&lt;ffffffff8108039a&gt;] warn_slowpath_common+0x8a/0xc0
 [&lt;ffffffff81080416&gt;] warn_slowpath_fmt+0x46/0x50
 [&lt;ffffffff810ddced&gt;] ? __lock_acquire+0xe2d/0x13a0
 [&lt;ffffffff8151805e&gt;] ? paste_selection+0x9e/0x1a0
 [&lt;ffffffff8151805e&gt;] ? paste_selection+0x9e/0x1a0
 [&lt;ffffffff810ad4ff&gt;] __might_sleep+0x7f/0x90
 [&lt;ffffffff8185f76a&gt;] down_read+0x2a/0xa0
 [&lt;ffffffff810bb1d8&gt;] ? sched_clock_cpu+0xb8/0xe0
 [&lt;ffffffff8150d1dc&gt;] n_tty_receive_buf_common+0x4c/0xba0
 [&lt;ffffffff810dc875&gt;] ? mark_held_locks+0x75/0xa0
 [&lt;ffffffff81861c95&gt;] ? _raw_spin_unlock_irqrestore+0x65/0x80
 [&lt;ffffffff810b49a1&gt;] ? get_parent_ip+0x11/0x50
 [&lt;ffffffff8150dd44&gt;] n_tty_receive_buf2+0x14/0x20
 [&lt;ffffffff81518117&gt;] paste_selection+0x157/0x1a0
 [&lt;ffffffff810b77b0&gt;] ? wake_up_state+0x20/0x20
 [&lt;ffffffff815203f8&gt;] tioclinux+0xb8/0x2c0
 [&lt;ffffffff81515bfe&gt;] vt_ioctl+0xaee/0x11a0
 [&lt;ffffffff810baf75&gt;] ? sched_clock_local+0x25/0x90
 [&lt;ffffffff810bbe11&gt;] ? vtime_account_user+0x91/0xa0
 [&lt;ffffffff8150810c&gt;] tty_ioctl+0x20c/0xe20
 [&lt;ffffffff810bbe11&gt;] ? vtime_account_user+0x91/0xa0
 [&lt;ffffffff810b49a1&gt;] ? get_parent_ip+0x11/0x50
 [&lt;ffffffff810b4a69&gt;] ? preempt_count_sub+0x49/0x50
 [&lt;ffffffff811ab71c&gt;] ? context_tracking_exit+0x5c/0x290
 [&lt;ffffffff811ab71c&gt;] ? context_tracking_exit+0x5c/0x290
 [&lt;ffffffff81248b98&gt;] do_vfs_ioctl+0x318/0x570
 [&lt;ffffffff810dca8d&gt;] ? trace_hardirqs_on+0xd/0x10
 [&lt;ffffffff810dc9b5&gt;] ? trace_hardirqs_on_caller+0x115/0x1e0
 [&lt;ffffffff81254acc&gt;] ? __fget_light+0x6c/0xa0
 [&lt;ffffffff81248e71&gt;] SyS_ioctl+0x81/0xa0
 [&lt;ffffffff81862832&gt;] system_call_fastpath+0x16/0x7a

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty/vt: Fix the memory leak in visual_init</title>
<updated>2015-07-23T22:11:08+00:00</updated>
<author>
<name>Dongxing Zhang</name>
<email>dongxing.zhang@intel.com</email>
</author>
<published>2015-06-10T07:21:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=08b33249d89700ba555d4ab5cc88714192b8ee46'/>
<id>urn:sha1:08b33249d89700ba555d4ab5cc88714192b8ee46</id>
<content type='text'>
If vc-&gt;vc_uni_pagedir_loc is not NULL, its refcount needs to be
decreased before vc_uni_pagedir_loc is re-assigned.

unreferenced object 0xffff88002cdd13b0 (size 512):
  comm "setfont", pid 503, jiffies 4294896503 (age 722.828s)
  hex dump (first 32 bytes):
    40 92 61 2b 00 88 ff ff 00 00 00 00 00 00 00 00  @.a+............
    00 00 00 00 00 00 00 00 a0 ad 61 2b 00 88 ff ff  ..........a+....
  backtrace:
    [&lt;ffffffff817b755e&gt;] kmemleak_alloc+0x4e/0xb0
    [&lt;ffffffff811d4898&gt;] kmem_cache_alloc_trace+0x1c8/0x240
    [&lt;ffffffff814ae7d3&gt;] con_do_clear_unimap.isra.2+0x83/0xe0
    [&lt;ffffffff814ae9b2&gt;] con_clear_unimap+0x22/0x40
    [&lt;ffffffff814a8db8&gt;] vt_ioctl+0xeb8/0x1170
    [&lt;ffffffff8149b458&gt;] tty_ioctl+0x208/0xca0
    [&lt;ffffffff81207858&gt;] do_vfs_ioctl+0x2f8/0x510
    [&lt;ffffffff81207af1&gt;] SyS_ioctl+0x81/0xa0
    [&lt;ffffffff817ca2b2&gt;] system_call_fastpath+0x16/0x75
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff
unreferenced object 0xffff88002b619240 (size 256):
  comm "setfont", pid 503, jiffies 4294896503 (age 722.828s)
  hex dump (first 32 bytes):
    90 bc 84 d5 00 88 ff ff 58 85 84 d5 00 88 ff ff  ........X.......
    88 ac 84 d5 00 88 ff ff e0 b1 84 d5 00 88 ff ff  ................
  backtrace:
    [&lt;ffffffff817b755e&gt;] kmemleak_alloc+0x4e/0xb0
    [&lt;ffffffff811d4898&gt;] kmem_cache_alloc_trace+0x1c8/0x240
    [&lt;ffffffff814ae286&gt;] con_insert_unipair+0x86/0x170
    [&lt;ffffffff814af107&gt;] con_set_unimap+0x1b7/0x280
    [&lt;ffffffff814a8d65&gt;] vt_ioctl+0xe65/0x1170
    [&lt;ffffffff8149b458&gt;] tty_ioctl+0x208/0xca0
    [&lt;ffffffff81207858&gt;] do_vfs_ioctl+0x2f8/0x510
    [&lt;ffffffff81207af1&gt;] SyS_ioctl+0x81/0xa0
    [&lt;ffffffff817ca2b2&gt;] system_call_fastpath+0x16/0x75
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

Signed-off-by: Dongxing Zhang &lt;dongxing.zhang@intel.com&gt;
Signed-off-by: Xiaoming Wang &lt;xiaoming.wang@intel.com&gt;
Reviewed-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Tested-by: Konstantin Khlebnikov &lt;khlebnikov@yandex-team.ru&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'tty-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty</title>
<updated>2015-06-26T22:53:22+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-06-26T22:53:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=8c7febe83915332276cab49e89f6580bb963fb9a'/>
<id>urn:sha1:8c7febe83915332276cab49e89f6580bb963fb9a</id>
<content type='text'>
Pull tty/serial driver updates from Greg KH:
 "Here's the tty and serial driver patches for 4.2-rc1.

  A number of individual driver updates, some code cleanups, and other
  minor things, full details in the shortlog.

  All have been in linux-next for a while with no reported issues"

* tag 'tty-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (152 commits)
  Doc: serial-rs485.txt: update RS485 driver interface
  Doc: tty.txt: remove mention of the BKL
  MAINTAINERS: tty: add serial docs directory
  serial: sprd: check for NULL after calling devm_clk_get
  serial: 8250_pci: Correct uartclk for xr17v35x expansion chips
  serial: 8250_pci: Add support for 12 port Exar boards
  serial: 8250_uniphier: add bindings document for UniPhier UART
  serial: core: cleanup in uart_get_baud_rate()
  serial: stm32-usart: Add STM32 USART Driver
  tty/serial: kill off set_irq_flags usage
  tty: move linux/gsmmux.h to uapi
  doc: dt: add documentation for nxp,lpc1850-uart
  serial: 8250: add LPC18xx/43xx UART driver
  serial: 8250_uniphier: add UniPhier serial driver
  serial: 8250_dw: support ACPI platforms with integrated DMA engine
  serial: of_serial: check the return value of clk_prepare_enable()
  serial: of_serial: use devm_clk_get() instead of clk_get()
  serial: earlycon: Add support for big-endian MMIO accesses
  serial: sirf: use hrtimer for data rx
  serial: sirf: correct the fifo empty_bit
  ...
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input</title>
<updated>2015-06-25T02:56:58+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-06-25T02:56:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=14738e03312ff1137109d68bcbf103c738af0f4a'/>
<id>urn:sha1:14738e03312ff1137109d68bcbf103c738af0f4a</id>
<content type='text'>
Pull input subsystem updates from Dmitry Torokhov:
 "Thanks to Samuel Thibault input device (keyboard) LEDs are no longer
  hardwired within the input core but use LED subsystem and so allow use
  of different triggers; Hans de Goede did a large update for the ALPS
  touchpad driver; we have new TI drv2665 haptics driver and DA9063
  OnKey driver, and host of other drivers got various fixes"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (55 commits)
  Input: pixcir_i2c_ts - fix receive error
  MAINTAINERS: remove non existent input mt git tree
  Input: improve usage of gpiod API
  tty/vt/keyboard: define LED triggers for VT keyboard lock states
  tty/vt/keyboard: define LED triggers for VT LED states
  Input: export LEDs as class devices in sysfs
  Input: cyttsp4 - use swap() in cyttsp4_get_touch()
  Input: goodix - do not explicitly set evbits in input device
  Input: goodix - export id and version read from device
  Input: goodix - fix variable length array warning
  Input: goodix - fix alignment issues
  Input: add OnKey driver for DA9063 MFD part
  Input: elan_i2c - add product IDs FW names
  Input: elan_i2c - add support for multi IC type and iap format
  Input: focaltech - report finger width to userspace
  tty: remove platform_sysrq_reset_seq
  Input: synaptics_i2c - use proper boolean values
  Input: psmouse - use true instead of 1 for boolean values
  Input: cyapa - fix a few typos in comments
  Input: stmpe-ts - enforce device tree only mode
  ...
</content>
</entry>
<entry>
<title>tty/vt/keyboard: define LED triggers for VT keyboard lock states</title>
<updated>2015-06-16T21:59:46+00:00</updated>
<author>
<name>Samuel Thibault</name>
<email>samuel.thibault@ens-lyon.org</email>
</author>
<published>2015-06-06T18:44:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=eeb64c14275e52740d6410632e62e0ad9b88ca70'/>
<id>urn:sha1:eeb64c14275e52740d6410632e62e0ad9b88ca70</id>
<content type='text'>
In addition to defining triggers for VT LED states, let's define triggers
for VT keyboard lock states, such as "kbd-shiftlock", "kbd-altgrlock", etc.

This permits to fix #7063 from userland by using a modifier to implement
proper CapsLock behavior and have the keyboard caps lock led show that
modifier state.

Signed-off-by: Samuel Thibault &lt;samuel.thibault@ens-lyon.org&gt;
Tested-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>tty/vt/keyboard: define LED triggers for VT LED states</title>
<updated>2015-06-16T21:59:46+00:00</updated>
<author>
<name>Samuel Thibault</name>
<email>samuel.thibault@ens-lyon.org</email>
</author>
<published>2015-03-17T04:19:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=5235552273e6b68abbed3b3047af6344e2e60c2c'/>
<id>urn:sha1:5235552273e6b68abbed3b3047af6344e2e60c2c</id>
<content type='text'>
Now that input core allows controlling keyboards LEDs via standard LED
subsystem triggers let's switch VT keyboard code to make use of this
feature. We will define the following standard triggers: "kbd-scrollock",
"kbd-numlock", "kbd-capslock", and "kbd-kanalock" which are default
triggers for respective LEDs on keyboards.

Signed-off-by: Samuel Thibault &lt;samuel.thibault@ens-lyon.org&gt;
Tested-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>vt: Don't check KD_GRAPHICS when binding/unbinding</title>
<updated>2015-05-10T17:29:51+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2015-04-13T09:16:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=77232f791e0605521a978cbe7f79a93df24df374'/>
<id>urn:sha1:77232f791e0605521a978cbe7f79a93df24df374</id>
<content type='text'>
This was introduced in

commit 6db4063c5b72b46e9793b0f141a7a3984ac6facf
Author: Antonino A. Daplas &lt;adaplas@gmail.com&gt;
Date:   Mon Jun 26 00:27:12 2006 -0700

    [PATCH] VT binding: Add sysfs control to the VT layer

with the justification

    "In addition, if any of the consoles are in KD_GRAPHICS mode, binding and
    unbinding will not succeed.  KD_GRAPHICS mode usually indicates that the
    underlying console hardware is used for other purposes other than displaying
    text (ie X).  This feature should prevent binding/unbinding from interfering
    with a graphics application using the VT."

I think we should lift this artificial restriction though:
- KD_GRAPHICS doesn't get cleaned up automatically, which means it's
  easy to have terminals stuck in KD_GRAPHICS when hacking around on
  X.
- X doesn't really care, especially with drm where kms already blocks
  fbdev (and hence fbcon) when there's an active compositor.
- This is a root-only interface with a separate .config option and
  it's possible to hang your machine already anyway if you
  unload/reload drivers and don't know what you're doing.

With this patch i915.ko module reloading works again reliably,
something in the recent fedora upgrades broke things.

Cc: Antonino A. Daplas &lt;adaplas@gmail.com&gt;
Cc: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Cc: Imre Deak &lt;imre.deak@intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Acked-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>vt: fix console lock vs. kernfs s_active lock order</title>
<updated>2015-05-10T17:29:51+00:00</updated>
<author>
<name>Imre Deak</name>
<email>imre.deak@intel.com</email>
</author>
<published>2015-04-01T18:06:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=d364b5c3e446bbf9892edbb000bf4c358f86bd8b'/>
<id>urn:sha1:d364b5c3e446bbf9892edbb000bf4c358f86bd8b</id>
<content type='text'>
Currently there is a lock order problem between the console lock and the
kernfs s_active lock of the console driver's bind sysfs entry. When
writing to the sysfs entry the lock order is first s_active then console
lock, when unregistering the console driver via
do_unregister_con_driver() the order is the opposite. See the below
bugzilla reference for one instance of a lockdep backtrace.

Fix this by unregistering the console driver from a deferred work, where
we can safely drop the console lock while unregistering the device and
corresponding sysfs entries (which in turn acquire s_active). Note that
we have to keep the console driver slot in the registered_con_driver
array reserved for the driver that's being unregistered until it's fully
removed. Otherwise a concurrent call to do_register_con_driver could
try to reuse the same slot and fail when registering the corresponding
device with a minor index that's still in use.

Note that the referenced bug report contains two dmesg logs with two
distinct lockdep reports: [1] is about a locking scenario involving
s_active, console_lock and the fb_notifier list lock, while [2] is
about a locking scenario involving only s_active and console_lock.
In [1] locking fb_notifier triggers the lockdep warning only because
of its dependence on console_lock, otherwise case [1] is the same
s_active&lt;-&gt;console_lock dependency problem fixed by this patch.
Before this change we have the following locking scenarios involving
the 3 locks:

a) via do_unregister_framebuffer()-&gt;...-&gt;do_unregister_con_driver():
   1. console lock 2. fb_notifier lock 3. s_active lock
b) for example via give_up_console()-&gt;do_unregister_con_driver():
   1. console lock 2. s_active lock
c) via vt_bind()/vt_unbind():
   1. s_active lock 2. console lock

Since c) is the console bind sysfs entry's write code path we can't
change the locking order there. We can only fix this issue by removing
s_active's dependence on the other two locks in a) and b). We can do
this only in the vt code which owns the corresponding sysfs entry, so
that after the change we have:

a) 1. console lock 2. fb_notifier lock
b) 1. console lock
c) 1. s_active lock 2. console lock
d) in the new con_driver_unregister_callback():
   1. s_active lock

[1] https://bugs.freedesktop.org/attachment.cgi?id=87716
[2] https://bugs.freedesktop.org/attachment.cgi?id=107602

v2:
- get console_lock earlier in con_driver_unregister_callback(), so we
  protect the following console driver field assignments there
- add code coment explaining the reason for deferring the sysfs entry
  removal
- add a third paragraph to the commit message explaining why there are
  two distinct lockdep reports and that this issue is independent of
  fb/fbcon. (Peter Hurley)
v3:
- clarify further the third paragraph
v4:
- rebased on v4 of patch 1/3

Signed-off-by: Imre Deak &lt;imre.deak@intel.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>vt: add cursor blink interval escape sequence</title>
<updated>2015-05-10T17:15:52+00:00</updated>
<author>
<name>Scot Doyle</name>
<email>lkml14@scotdoyle.com</email>
</author>
<published>2015-03-26T13:54:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=bd63364caa8df38bad2b25b11b2a1b849475cce5'/>
<id>urn:sha1:bd63364caa8df38bad2b25b11b2a1b849475cce5</id>
<content type='text'>
Add an escape sequence to specify the current console's cursor blink
interval. The interval is specified as a number of milliseconds until
the next cursor display state toggle, from 50 to 65535. /proc/loadavg
did not show a difference with a one msec interval, but the lower
bound is set to 50 msecs since slower hardware wasn't tested.

Store the interval in the vc_data structure for later access by fbcon,
initializing the value to fbcon's current hardcoded value of 200 msecs.

Signed-off-by: Scot Doyle &lt;lkml14@scotdoyle.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: consolemap.c: move assignment out of if () block</title>
<updated>2015-05-10T17:04:16+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2015-04-30T09:22:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=6d4e751e108b3a2333412b603911f8243e60a86e'/>
<id>urn:sha1:6d4e751e108b3a2333412b603911f8243e60a86e</id>
<content type='text'>
We should not be doing assignments within an if () block
so fix up the code to not do this.

change was created using Coccinelle.

CC: Jiri Slaby &lt;jslaby@suse.cz&gt;
CC: Takashi Iwai &lt;tiwai@suse.de&gt;
CC: Imre Deak &lt;imre.deak@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
