<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/vt_kern.h, branch v4.6-rc6</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Merge 3.10-rc3 into tty-next</title>
<updated>2013-05-27T01:57:53+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-05-27T01:57:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8095e4e81b4bc38eef7e0be99f9ecc744eaa1683'/>
<id>8095e4e81b4bc38eef7e0be99f9ecc744eaa1683</id>
<content type='text'>
We want these fixes.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We want these fixes.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vt: delete unneeded function unbind_con_driver</title>
<updated>2013-05-20T19:27:59+00:00</updated>
<author>
<name>Wang YanQing</name>
<email>udknight@gmail.com</email>
</author>
<published>2013-05-08T18:14:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c1f5e38a5d3583b877619f95a922b607966dfc2e'/>
<id>c1f5e38a5d3583b877619f95a922b607966dfc2e</id>
<content type='text'>
Now there is no place use unbind_con_driver,
and we can achieve unbind_con_driver's function
with do_unbind_con_driver easily, so just delete
it to reduce code size and duplication.

Signed-off-by: Wang YanQing &lt;udknight@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now there is no place use unbind_con_driver,
and we can achieve unbind_con_driver's function
with do_unbind_con_driver easily, so just delete
it to reduce code size and duplication.

Signed-off-by: Wang YanQing &lt;udknight@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tty/vt: Fix vc_deallocate() lock order</title>
<updated>2013-05-20T19:15:59+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2013-05-17T16:41:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=421b40a6286ee343d77d5e51f5ee6d04d7a2a90f'/>
<id>421b40a6286ee343d77d5e51f5ee6d04d7a2a90f</id>
<content type='text'>
Now that the tty port owns the flip buffers and i/o is allowed
from the driver even when no tty is attached, the destruction
of the tty port (and the flip buffers) must ensure that no
outstanding work is pending.

Unfortunately, this creates a lock order problem with the
console_lock (see attached lockdep report [1] below).

For single console deallocation, drop the console_lock prior
to port destruction. When multiple console deallocation,
defer port destruction until the consoles have been
deallocated.

tty_port_destroy() is not required if the port has not
been used; remove from vc_allocate() failure path.

[1] lockdep report from Dave Jones &lt;davej@redhat.com&gt;

 ======================================================
 [ INFO: possible circular locking dependency detected ]
 3.9.0+ #16 Not tainted
 -------------------------------------------------------
 (agetty)/26163 is trying to acquire lock:
 blocked:  ((&amp;buf-&gt;work)){+.+...}, instance: ffff88011c8b0020, at: [&lt;ffffffff81062065&gt;] flush_work+0x5/0x2e0

 but task is already holding lock:
 blocked:  (console_lock){+.+.+.}, instance: ffffffff81c2fde0, at: [&lt;ffffffff813bc201&gt;] vt_ioctl+0xb61/0x1230

 which lock already depends on the new lock.

 the existing dependency chain (in reverse order) is:

 -&gt; #1 (console_lock){+.+.+.}:
        [&lt;ffffffff810b3f74&gt;] lock_acquire+0xa4/0x210
        [&lt;ffffffff810416c7&gt;] console_lock+0x77/0x80
        [&lt;ffffffff813c3dcd&gt;] con_flush_chars+0x2d/0x50
        [&lt;ffffffff813b32b2&gt;] n_tty_receive_buf+0x122/0x14d0
        [&lt;ffffffff813b7709&gt;] flush_to_ldisc+0x119/0x170
        [&lt;ffffffff81064381&gt;] process_one_work+0x211/0x700
        [&lt;ffffffff8106498b&gt;] worker_thread+0x11b/0x3a0
        [&lt;ffffffff8106ce5d&gt;] kthread+0xed/0x100
        [&lt;ffffffff81601cac&gt;] ret_from_fork+0x7c/0xb0

 -&gt; #0 ((&amp;buf-&gt;work)){+.+...}:
        [&lt;ffffffff810b349a&gt;] __lock_acquire+0x193a/0x1c00
        [&lt;ffffffff810b3f74&gt;] lock_acquire+0xa4/0x210
        [&lt;ffffffff810620ae&gt;] flush_work+0x4e/0x2e0
        [&lt;ffffffff81065305&gt;] __cancel_work_timer+0x95/0x130
        [&lt;ffffffff810653b0&gt;] cancel_work_sync+0x10/0x20
        [&lt;ffffffff813b8212&gt;] tty_port_destroy+0x12/0x20
        [&lt;ffffffff813c65e8&gt;] vc_deallocate+0xf8/0x110
        [&lt;ffffffff813bc20c&gt;] vt_ioctl+0xb6c/0x1230
        [&lt;ffffffff813b01a5&gt;] tty_ioctl+0x285/0xd50
        [&lt;ffffffff811ba825&gt;] do_vfs_ioctl+0x305/0x530
        [&lt;ffffffff811baad1&gt;] sys_ioctl+0x81/0xa0
        [&lt;ffffffff81601d59&gt;] system_call_fastpath+0x16/0x1b

 other info that might help us debug this:

 [ 6760.076175]  Possible unsafe locking scenario:

        CPU0                    CPU1
        ----                    ----
   lock(console_lock);
                                lock((&amp;buf-&gt;work));
                                lock(console_lock);
   lock((&amp;buf-&gt;work));

  *** DEADLOCK ***

 1 lock on stack by (agetty)/26163:
  #0: blocked:  (console_lock){+.+.+.}, instance: ffffffff81c2fde0, at: [&lt;ffffffff813bc201&gt;] vt_ioctl+0xb61/0x1230
 stack backtrace:
 Pid: 26163, comm: (agetty) Not tainted 3.9.0+ #16
 Call Trace:
  [&lt;ffffffff815edb14&gt;] print_circular_bug+0x200/0x20e
  [&lt;ffffffff810b349a&gt;] __lock_acquire+0x193a/0x1c00
  [&lt;ffffffff8100a269&gt;] ? sched_clock+0x9/0x10
  [&lt;ffffffff8100a269&gt;] ? sched_clock+0x9/0x10
  [&lt;ffffffff8100a200&gt;] ? native_sched_clock+0x20/0x80
  [&lt;ffffffff810b3f74&gt;] lock_acquire+0xa4/0x210
  [&lt;ffffffff81062065&gt;] ? flush_work+0x5/0x2e0
  [&lt;ffffffff810620ae&gt;] flush_work+0x4e/0x2e0
  [&lt;ffffffff81062065&gt;] ? flush_work+0x5/0x2e0
  [&lt;ffffffff810b15db&gt;] ? mark_held_locks+0xbb/0x140
  [&lt;ffffffff8113c8a3&gt;] ? __free_pages_ok.part.57+0x93/0xc0
  [&lt;ffffffff810b15db&gt;] ? mark_held_locks+0xbb/0x140
  [&lt;ffffffff810652f2&gt;] ? __cancel_work_timer+0x82/0x130
  [&lt;ffffffff81065305&gt;] __cancel_work_timer+0x95/0x130
  [&lt;ffffffff810653b0&gt;] cancel_work_sync+0x10/0x20
  [&lt;ffffffff813b8212&gt;] tty_port_destroy+0x12/0x20
  [&lt;ffffffff813c65e8&gt;] vc_deallocate+0xf8/0x110
  [&lt;ffffffff813bc20c&gt;] vt_ioctl+0xb6c/0x1230
  [&lt;ffffffff810aec41&gt;] ? lock_release_holdtime.part.30+0xa1/0x170
  [&lt;ffffffff813b01a5&gt;] tty_ioctl+0x285/0xd50
  [&lt;ffffffff812b00f6&gt;] ? inode_has_perm.isra.46.constprop.61+0x56/0x80
  [&lt;ffffffff811ba825&gt;] do_vfs_ioctl+0x305/0x530
  [&lt;ffffffff812b04db&gt;] ? selinux_file_ioctl+0x5b/0x110
  [&lt;ffffffff811baad1&gt;] sys_ioctl+0x81/0xa0
  [&lt;ffffffff81601d59&gt;] system_call_fastpath+0x16/0x1b

Cc: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that the tty port owns the flip buffers and i/o is allowed
from the driver even when no tty is attached, the destruction
of the tty port (and the flip buffers) must ensure that no
outstanding work is pending.

Unfortunately, this creates a lock order problem with the
console_lock (see attached lockdep report [1] below).

For single console deallocation, drop the console_lock prior
to port destruction. When multiple console deallocation,
defer port destruction until the consoles have been
deallocated.

tty_port_destroy() is not required if the port has not
been used; remove from vc_allocate() failure path.

[1] lockdep report from Dave Jones &lt;davej@redhat.com&gt;

 ======================================================
 [ INFO: possible circular locking dependency detected ]
 3.9.0+ #16 Not tainted
 -------------------------------------------------------
 (agetty)/26163 is trying to acquire lock:
 blocked:  ((&amp;buf-&gt;work)){+.+...}, instance: ffff88011c8b0020, at: [&lt;ffffffff81062065&gt;] flush_work+0x5/0x2e0

 but task is already holding lock:
 blocked:  (console_lock){+.+.+.}, instance: ffffffff81c2fde0, at: [&lt;ffffffff813bc201&gt;] vt_ioctl+0xb61/0x1230

 which lock already depends on the new lock.

 the existing dependency chain (in reverse order) is:

 -&gt; #1 (console_lock){+.+.+.}:
        [&lt;ffffffff810b3f74&gt;] lock_acquire+0xa4/0x210
        [&lt;ffffffff810416c7&gt;] console_lock+0x77/0x80
        [&lt;ffffffff813c3dcd&gt;] con_flush_chars+0x2d/0x50
        [&lt;ffffffff813b32b2&gt;] n_tty_receive_buf+0x122/0x14d0
        [&lt;ffffffff813b7709&gt;] flush_to_ldisc+0x119/0x170
        [&lt;ffffffff81064381&gt;] process_one_work+0x211/0x700
        [&lt;ffffffff8106498b&gt;] worker_thread+0x11b/0x3a0
        [&lt;ffffffff8106ce5d&gt;] kthread+0xed/0x100
        [&lt;ffffffff81601cac&gt;] ret_from_fork+0x7c/0xb0

 -&gt; #0 ((&amp;buf-&gt;work)){+.+...}:
        [&lt;ffffffff810b349a&gt;] __lock_acquire+0x193a/0x1c00
        [&lt;ffffffff810b3f74&gt;] lock_acquire+0xa4/0x210
        [&lt;ffffffff810620ae&gt;] flush_work+0x4e/0x2e0
        [&lt;ffffffff81065305&gt;] __cancel_work_timer+0x95/0x130
        [&lt;ffffffff810653b0&gt;] cancel_work_sync+0x10/0x20
        [&lt;ffffffff813b8212&gt;] tty_port_destroy+0x12/0x20
        [&lt;ffffffff813c65e8&gt;] vc_deallocate+0xf8/0x110
        [&lt;ffffffff813bc20c&gt;] vt_ioctl+0xb6c/0x1230
        [&lt;ffffffff813b01a5&gt;] tty_ioctl+0x285/0xd50
        [&lt;ffffffff811ba825&gt;] do_vfs_ioctl+0x305/0x530
        [&lt;ffffffff811baad1&gt;] sys_ioctl+0x81/0xa0
        [&lt;ffffffff81601d59&gt;] system_call_fastpath+0x16/0x1b

 other info that might help us debug this:

 [ 6760.076175]  Possible unsafe locking scenario:

        CPU0                    CPU1
        ----                    ----
   lock(console_lock);
                                lock((&amp;buf-&gt;work));
                                lock(console_lock);
   lock((&amp;buf-&gt;work));

  *** DEADLOCK ***

 1 lock on stack by (agetty)/26163:
  #0: blocked:  (console_lock){+.+.+.}, instance: ffffffff81c2fde0, at: [&lt;ffffffff813bc201&gt;] vt_ioctl+0xb61/0x1230
 stack backtrace:
 Pid: 26163, comm: (agetty) Not tainted 3.9.0+ #16
 Call Trace:
  [&lt;ffffffff815edb14&gt;] print_circular_bug+0x200/0x20e
  [&lt;ffffffff810b349a&gt;] __lock_acquire+0x193a/0x1c00
  [&lt;ffffffff8100a269&gt;] ? sched_clock+0x9/0x10
  [&lt;ffffffff8100a269&gt;] ? sched_clock+0x9/0x10
  [&lt;ffffffff8100a200&gt;] ? native_sched_clock+0x20/0x80
  [&lt;ffffffff810b3f74&gt;] lock_acquire+0xa4/0x210
  [&lt;ffffffff81062065&gt;] ? flush_work+0x5/0x2e0
  [&lt;ffffffff810620ae&gt;] flush_work+0x4e/0x2e0
  [&lt;ffffffff81062065&gt;] ? flush_work+0x5/0x2e0
  [&lt;ffffffff810b15db&gt;] ? mark_held_locks+0xbb/0x140
  [&lt;ffffffff8113c8a3&gt;] ? __free_pages_ok.part.57+0x93/0xc0
  [&lt;ffffffff810b15db&gt;] ? mark_held_locks+0xbb/0x140
  [&lt;ffffffff810652f2&gt;] ? __cancel_work_timer+0x82/0x130
  [&lt;ffffffff81065305&gt;] __cancel_work_timer+0x95/0x130
  [&lt;ffffffff810653b0&gt;] cancel_work_sync+0x10/0x20
  [&lt;ffffffff813b8212&gt;] tty_port_destroy+0x12/0x20
  [&lt;ffffffff813c65e8&gt;] vc_deallocate+0xf8/0x110
  [&lt;ffffffff813bc20c&gt;] vt_ioctl+0xb6c/0x1230
  [&lt;ffffffff810aec41&gt;] ? lock_release_holdtime.part.30+0xa1/0x170
  [&lt;ffffffff813b01a5&gt;] tty_ioctl+0x285/0xd50
  [&lt;ffffffff812b00f6&gt;] ? inode_has_perm.isra.46.constprop.61+0x56/0x80
  [&lt;ffffffff811ba825&gt;] do_vfs_ioctl+0x305/0x530
  [&lt;ffffffff812b04db&gt;] ? selinux_file_ioctl+0x5b/0x110
  [&lt;ffffffff811baad1&gt;] sys_ioctl+0x81/0xa0
  [&lt;ffffffff81601d59&gt;] system_call_fastpath+0x16/0x1b

Cc: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'console-fixes' into drm-next</title>
<updated>2013-02-08T02:13:43+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2013-02-08T02:13:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=62cd2fa82a38cb3d653517822c62a39cdbb5f365'/>
<id>62cd2fa82a38cb3d653517822c62a39cdbb5f365</id>
<content type='text'>
(not the fbcon maintainer pull 2)

fix bug in vgacon on bootup and fbcon losing fonts on startup.

* console-fixes: (50 commits)
  fbcon: don't lose the console font across generic-&gt;chip driver switch
  vgacon/vt: clear buffer attributes when we load a 512 character font (v2)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(not the fbcon maintainer pull 2)

fix bug in vgacon on bootup and fbcon losing fonts on startup.

* console-fixes: (50 commits)
  fbcon: don't lose the console font across generic-&gt;chip driver switch
  vgacon/vt: clear buffer attributes when we load a 512 character font (v2)
</pre>
</div>
</content>
</entry>
<entry>
<title>fb: Yet another band-aid for fixing lockdep mess</title>
<updated>2013-02-08T02:02:41+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2013-01-25T00:28:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e93a9a868792ad71cdd09d75e5a02d8067473c4e'/>
<id>e93a9a868792ad71cdd09d75e5a02d8067473c4e</id>
<content type='text'>
I've still got lockdep warnings even after Alan's patch, and it seems that
yet more band aids are required to paper over similar paths for
unbind_con_driver() and unregister_con_driver().  After this hack, lockdep
warnings are finally gone.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Cc: Alan Cox &lt;alan@linux.intel.com&gt;
Cc: Florian Tobias Schandinat &lt;FlorianSchandinat@gmx.de&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Tested-by: Sedat Dilek &lt;sedat.dilek@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I've still got lockdep warnings even after Alan's patch, and it seems that
yet more band aids are required to paper over similar paths for
unbind_con_driver() and unregister_con_driver().  After this hack, lockdep
warnings are finally gone.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Cc: Alan Cox &lt;alan@linux.intel.com&gt;
Cc: Florian Tobias Schandinat &lt;FlorianSchandinat@gmx.de&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Tested-by: Sedat Dilek &lt;sedat.dilek@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vgacon/vt: clear buffer attributes when we load a 512 character font (v2)</title>
<updated>2013-02-07T02:37:03+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2013-01-24T04:14:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2a2483072393b27f4336ab068a1f48ca19ff1c1e'/>
<id>2a2483072393b27f4336ab068a1f48ca19ff1c1e</id>
<content type='text'>
When we switch from 256-&gt;512 byte font rendering mode, it means the
current contents of the screen is being reinterpreted. The bit that holds
the high bit of the 9-bit font, may have been previously set, and thus
the new font misrenders.

The problem case we see is grub2 writes spaces with the bit set, so it
ends up with data like 0x820, which gets reinterpreted into 0x120 char
which the font translates into G with a circumflex. This flashes up on
screen at boot and is quite ugly.

A current side effect of this patch though is that any rendering on the
screen changes color to a slightly darker color, but at least the screen
no longer corrupts.

v2: as suggested by hpa, always clear the attribute space, whether we
are are going to or from 512 chars.

Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we switch from 256-&gt;512 byte font rendering mode, it means the
current contents of the screen is being reinterpreted. The bit that holds
the high bit of the 9-bit font, may have been previously set, and thus
the new font misrenders.

The problem case we see is grub2 writes spaces with the bit set, so it
ends up with data like 0x820, which gets reinterpreted into 0x120 char
which the font translates into G with a circumflex. This flashes up on
screen at boot and is quite ugly.

A current side effect of this patch though is that any rendering on the
screen changes color to a slightly darker color, but at least the screen
no longer corrupts.

v2: as suggested by hpa, always clear the attribute space, whether we
are are going to or from 512 chars.

Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vt: push the tty_lock down into the map handling</title>
<updated>2012-04-24T23:14:14+00:00</updated>
<author>
<name>Alan Cox</name>
<email>alan@linux.intel.com</email>
</author>
<published>2012-04-24T10:06:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5d1a33fa5573702394a4d09a9872f3f930c06d58'/>
<id>5d1a33fa5573702394a4d09a9872f3f930c06d58</id>
<content type='text'>
When we do this it becomes clear the lock we should be holding is the vc
lock, and in fact many of our other helpers are properly invoked this way.

We don't at this point guarantee not to race the keyboard code but the results
of that appear harmless and that was true before we started as well.

We now have no users of tty_lock in the console driver...

Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we do this it becomes clear the lock we should be holding is the vc
lock, and in fact many of our other helpers are properly invoked this way.

We don't at this point guarantee not to race the keyboard code but the results
of that appear harmless and that was true before we started as well.

We now have no users of tty_lock in the console driver...

Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vt:tackle kbd_table</title>
<updated>2012-03-08T18:50:35+00:00</updated>
<author>
<name>Alan Cox</name>
<email>alan@linux.intel.com</email>
</author>
<published>2012-02-28T14:49:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=079c9534a96da9a85a2a2f9715851050fbfbf749'/>
<id>079c9534a96da9a85a2a2f9715851050fbfbf749</id>
<content type='text'>
Keyboard struct lifetime is easy, but the locking is not and is completely
ignored by the existing code. Tackle this one head on

- Make the kbd_table private so we can run down all direct users
- Hoick the relevant ioctl handlers into the keyboard layer
- Lock them with the keyboard lock so they don't change mid keypress
- Add helpers for things like console stop/start so we isolate the poking
  around properly
- Tweak the braille console so it still builds

There are a couple of FIXME locking cases left for ioctls that are so hideous
they should be addressed in a later patch. After this patch the kbd_table is
private and all the keyboard jiggery pokery is in one place.

This update fixes speakup and also a memory leak in the original.

Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Keyboard struct lifetime is easy, but the locking is not and is completely
ignored by the existing code. Tackle this one head on

- Make the kbd_table private so we can run down all direct users
- Hoick the relevant ioctl handlers into the keyboard layer
- Lock them with the keyboard lock so they don't change mid keypress
- Add helpers for things like console stop/start so we isolate the poking
  around properly
- Tweak the braille console so it still builds

There are a couple of FIXME locking cases left for ioctls that are so hideous
they should be addressed in a later patch. After this patch the kbd_table is
private and all the keyboard jiggery pokery is in one place.

This update fixes speakup and also a memory leak in the original.

Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vt: lock the accent table</title>
<updated>2012-02-24T21:59:34+00:00</updated>
<author>
<name>Alan Cox</name>
<email>alan@linux.intel.com</email>
</author>
<published>2012-02-24T12:47:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=247ff8e610cb63c015de19191db9666754c2ed79'/>
<id>247ff8e610cb63c015de19191db9666754c2ed79</id>
<content type='text'>
First step to debletcherising the vt console layer - pick a victim and fix
the locking

This is a nice simple object with its own rules so lets pick it out for
treatment. The user of the table already has a lock so we will also use the
same lock for updates.

Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
First step to debletcherising the vt console layer - pick a victim and fix
the locking

This is a nice simple object with its own rules so lets pick it out for
treatment. The user of the table already has a lock so we will also use the
same lock for updates.

Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>panic, vt: do not force oops output when panic_timeout &lt; 0</title>
<updated>2011-07-26T23:49:45+00:00</updated>
<author>
<name>Mandeep Singh Baines</name>
<email>msb@chromium.org</email>
</author>
<published>2011-07-26T23:08:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c958474b6d721ff09e4abf143efc07365d63aea5'/>
<id>c958474b6d721ff09e4abf143efc07365d63aea5</id>
<content type='text'>
Don't force output if you intend to reboot immediately.

In this patch, I'm disabling the functionality enabled by
vc-&gt;vc_panic_force_write if panic_timeout &lt; 0 (i.e.  no timeout).
vc_panic_force_write is only enabled for fb video consoles if the
FBINFO_CAN_FORCE_OUTPUT flag is set.

For our application, we're using ram_oops to preserved the panic in
memory.  We want to reliably, and as fast as possible, machine_restart.
The vc_panic_force_write flag results in a bunch of graphics driver code
to be invoked which slows down restart and decreases reliability.  Since
we're already storing the panic in RAM and are going to reboot
immediately, there is no benefit in mode switching back to the vc in
order to display the panic output.  The log buffer will get flushed by
the console_unblank() call so remote management consoles should see all
output.

Signed-off-by: Mandeep Singh Baines &lt;msb@chromium.org&gt;
Cc: Huang Ying &lt;ying.huang@intel.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Hugh Dickins &lt;hughd@google.com&gt;
Cc: Olaf Hering &lt;olaf@aepfle.de&gt;
Cc: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Cc: Dave Airlie &lt;airlied@gmail.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Acked-by: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't force output if you intend to reboot immediately.

In this patch, I'm disabling the functionality enabled by
vc-&gt;vc_panic_force_write if panic_timeout &lt; 0 (i.e.  no timeout).
vc_panic_force_write is only enabled for fb video consoles if the
FBINFO_CAN_FORCE_OUTPUT flag is set.

For our application, we're using ram_oops to preserved the panic in
memory.  We want to reliably, and as fast as possible, machine_restart.
The vc_panic_force_write flag results in a bunch of graphics driver code
to be invoked which slows down restart and decreases reliability.  Since
we're already storing the panic in RAM and are going to reboot
immediately, there is no benefit in mode switching back to the vc in
order to display the panic output.  The log buffer will get flushed by
the console_unblank() call so remote management consoles should see all
output.

Signed-off-by: Mandeep Singh Baines &lt;msb@chromium.org&gt;
Cc: Huang Ying &lt;ying.huang@intel.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Hugh Dickins &lt;hughd@google.com&gt;
Cc: Olaf Hering &lt;olaf@aepfle.de&gt;
Cc: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Cc: Dave Airlie &lt;airlied@gmail.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Acked-by: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
