<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/char, branch v2.6.29-rc2</title>
<subtitle>Clone of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/'/>
<entry>
<title>hvc_console: Remove tty-&gt;low_latency</title>
<updated>2009-01-16T05:15:16+00:00</updated>
<author>
<name>Hendrik Brueckner</name>
<email>brueckner@linux.vnet.ibm.com</email>
</author>
<published>2009-01-14T23:15:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=7f8030d166f84b7413a0393819cb8b800484d5a9'/>
<id>7f8030d166f84b7413a0393819cb8b800484d5a9</id>
<content type='text'>
This patch removes the tty-&gt;low_latency setting.

For irq based hvc_console backends the tty-&gt;low_latency must be set to 0,
because the tty_flip_buffer_push() function must not be called from IRQ context
(see drivers/char/tty_buffer.c).

For polled backends, the low_latency setting causes the bug trace below, because
tty_flip_buffer_push() is called within an atomic context and subsequent calls
might sleep due to mutex_lock.

BUG: sleeping function called from invalid context at /root/cvs/linux-2.6.git/kernel/mutex.c:207
in_atomic(): 1, irqs_disabled(): 0, pid: 748, name: khvcd
1 lock held by khvcd/748:
 #0:  (hvc_structs_lock){--..}, at: [&lt;00000000002ceb50&gt;] khvcd+0x58/0x12c
CPU: 0 Not tainted 2.6.29-rc1git #29
Process khvcd (pid: 748, task: 000000002fb9a480, ksp: 000000002f66bd78)
070000000000000a 000000002f66ba00 0000000000000002 (null)
       000000002f66baa0 000000002f66ba18 000000002f66ba18 0000000000104f08
       ffffffffffffc000 000000002f66bd78 (null) (null)
       000000002f66ba00 000000000000000c 000000002f66ba00 000000002f66ba70
       0000000000466af8 0000000000104f08 000000002f66ba00 000000002f66ba50
Call Trace:
([&lt;0000000000104e7c&gt;] show_trace+0x138/0x158)
 [&lt;0000000000104f62&gt;] show_stack+0xc6/0xf8
 [&lt;0000000000105740&gt;] dump_stack+0xb0/0xc0
 [&lt;000000000013144a&gt;] __might_sleep+0x14e/0x17c
 [&lt;000000000045e226&gt;] mutex_lock_nested+0x42/0x3b4
 [&lt;00000000002c443e&gt;] echo_char_raw+0x3a/0x9c
 [&lt;00000000002c688c&gt;] n_tty_receive_buf+0x1154/0x1208
 [&lt;00000000002ca0a2&gt;] flush_to_ldisc+0x152/0x220
 [&lt;00000000002ca1da&gt;] tty_flip_buffer_push+0x6a/0x90
 [&lt;00000000002cea74&gt;] hvc_poll+0x244/0x2c8
 [&lt;00000000002ceb68&gt;] khvcd+0x70/0x12c
 [&lt;000000000015bbd0&gt;] kthread+0x68/0xa0
 [&lt;0000000000109d5a&gt;] kernel_thread_starter+0x6/0xc
 [&lt;0000000000109d54&gt;] kernel_thread_starter+0x0/0xc
1 lock held by khvcd/748:
 #0:  (hvc_structs_lock){--..}, at: [&lt;00000000002ceb50&gt;] khvcd+0x58/0x12c

Signed-off-by: Hendrik Brueckner &lt;brueckner@linux.vnet.ibm.com&gt;
Acked-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch removes the tty-&gt;low_latency setting.

For irq based hvc_console backends the tty-&gt;low_latency must be set to 0,
because the tty_flip_buffer_push() function must not be called from IRQ context
(see drivers/char/tty_buffer.c).

For polled backends, the low_latency setting causes the bug trace below, because
tty_flip_buffer_push() is called within an atomic context and subsequent calls
might sleep due to mutex_lock.

BUG: sleeping function called from invalid context at /root/cvs/linux-2.6.git/kernel/mutex.c:207
in_atomic(): 1, irqs_disabled(): 0, pid: 748, name: khvcd
1 lock held by khvcd/748:
 #0:  (hvc_structs_lock){--..}, at: [&lt;00000000002ceb50&gt;] khvcd+0x58/0x12c
CPU: 0 Not tainted 2.6.29-rc1git #29
Process khvcd (pid: 748, task: 000000002fb9a480, ksp: 000000002f66bd78)
070000000000000a 000000002f66ba00 0000000000000002 (null)
       000000002f66baa0 000000002f66ba18 000000002f66ba18 0000000000104f08
       ffffffffffffc000 000000002f66bd78 (null) (null)
       000000002f66ba00 000000000000000c 000000002f66ba00 000000002f66ba70
       0000000000466af8 0000000000104f08 000000002f66ba00 000000002f66ba50
Call Trace:
([&lt;0000000000104e7c&gt;] show_trace+0x138/0x158)
 [&lt;0000000000104f62&gt;] show_stack+0xc6/0xf8
 [&lt;0000000000105740&gt;] dump_stack+0xb0/0xc0
 [&lt;000000000013144a&gt;] __might_sleep+0x14e/0x17c
 [&lt;000000000045e226&gt;] mutex_lock_nested+0x42/0x3b4
 [&lt;00000000002c443e&gt;] echo_char_raw+0x3a/0x9c
 [&lt;00000000002c688c&gt;] n_tty_receive_buf+0x1154/0x1208
 [&lt;00000000002ca0a2&gt;] flush_to_ldisc+0x152/0x220
 [&lt;00000000002ca1da&gt;] tty_flip_buffer_push+0x6a/0x90
 [&lt;00000000002cea74&gt;] hvc_poll+0x244/0x2c8
 [&lt;00000000002ceb68&gt;] khvcd+0x70/0x12c
 [&lt;000000000015bbd0&gt;] kthread+0x68/0xa0
 [&lt;0000000000109d5a&gt;] kernel_thread_starter+0x6/0xc
 [&lt;0000000000109d54&gt;] kernel_thread_starter+0x0/0xc
1 lock held by khvcd/748:
 #0:  (hvc_structs_lock){--..}, at: [&lt;00000000002ceb50&gt;] khvcd+0x58/0x12c

Signed-off-by: Hendrik Brueckner &lt;brueckner@linux.vnet.ibm.com&gt;
Acked-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/char</title>
<updated>2009-01-16T05:15:14+00:00</updated>
<author>
<name>Stephen Rothwell</name>
<email>sfr@canb.auug.org.au</email>
</author>
<published>2009-01-13T20:06:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=4c33d2dc34f50e5d5436e62cd99395859f157a19'/>
<id>4c33d2dc34f50e5d5436e62cd99395859f157a19</id>
<content type='text'>
Also a couple of min -&gt; min_t changes.

Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Acked-by: Geoff Levand &lt;geoffrey.levand@am.sony.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also a couple of min -&gt; min_t changes.

Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Acked-by: Geoff Levand &lt;geoffrey.levand@am.sony.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>synclink_gt: enable RI interrupt</title>
<updated>2009-01-16T00:39:37+00:00</updated>
<author>
<name>Paul Fulghum</name>
<email>paulkf@microgate.com</email>
</author>
<published>2009-01-15T21:50:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=a6b2f87be1aafedc585bad86b77c2e2bbd49b308'/>
<id>a6b2f87be1aafedc585bad86b77c2e2bbd49b308</id>
<content type='text'>
- Enable ring indicator interrupt.

- Remove vendor specific CVS version tags.

Signed-off-by: Paul Fulghum &lt;paulkf@microgate.com&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>
- Enable ring indicator interrupt.

- Remove vendor specific CVS version tags.

Signed-off-by: Paul Fulghum &lt;paulkf@microgate.com&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>
<entry>
<title>sysrq: add commentary on why we use the console loglevel over using KERN_EMERG</title>
<updated>2009-01-16T00:39:36+00:00</updated>
<author>
<name>Andy Whitcroft</name>
<email>apw@canonical.com</email>
</author>
<published>2009-01-15T21:50:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=fb144adc517d9ebe8fd8d98a5696fb68ec91e1f5'/>
<id>fb144adc517d9ebe8fd8d98a5696fb68ec91e1f5</id>
<content type='text'>
Add an explanitory comment as to why we modify the kernel console loglevel
rather than simply moving sysrq messages to KERN_EMERG level.

Signed-off-by: Andy Whitcroft &lt;apw@canonical.com&gt;
Cc: Randy Dunlap &lt;randy.dunlap@oracle.com&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>
Add an explanitory comment as to why we modify the kernel console loglevel
rather than simply moving sysrq messages to KERN_EMERG level.

Signed-off-by: Andy Whitcroft &lt;apw@canonical.com&gt;
Cc: Randy Dunlap &lt;randy.dunlap@oracle.com&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>
<entry>
<title>tty: Fix race in the flush for some ldiscs</title>
<updated>2009-01-15T20:48:35+00:00</updated>
<author>
<name>Alan Cox</name>
<email>alan@redhat.com</email>
</author>
<published>2009-01-15T13:30:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=c0253eec2a8e1140dd9672a1efe095cdcf5811d0'/>
<id>c0253eec2a8e1140dd9672a1efe095cdcf5811d0</id>
<content type='text'>
If you issue an ioctl to flush a tty as the line discipline is changing or
otherwise unplugged you can get a crash. The bug is very old but the rest
of the BKL lock dropping and some very "good" luck on Ingo's part caught
an example.

Use the correct ldisc_ref form so that we wait for the ldisc change to
complete and then flush

Signed-off-by: Alan Cox &lt;alan@redhat.com&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>
If you issue an ioctl to flush a tty as the line discipline is changing or
otherwise unplugged you can get a crash. The bug is very old but the rest
of the BKL lock dropping and some very "good" luck on Ingo's part caught
an example.

Use the correct ldisc_ref form so that we wait for the ldisc change to
complete and then flush

Signed-off-by: Alan Cox &lt;alan@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hvc_console: Use kzalloc() instead of kmalloc() + memset()</title>
<updated>2009-01-13T03:48:02+00:00</updated>
<author>
<name>Milton Miller</name>
<email>miltonm@bga.com</email>
</author>
<published>2009-01-08T02:14:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=2da7582f7cf5ef5e6adcf42537b6b8be06312152'/>
<id>2da7582f7cf5ef5e6adcf42537b6b8be06312152</id>
<content type='text'>
Replace kmalloc() + memset()  with kzalloc().

Signed-off-by: Milton Miller &lt;miltonm@bga.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace kmalloc() + memset()  with kzalloc().

Signed-off-by: Milton Miller &lt;miltonm@bga.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hvc_console: Do not set low_latency when using interrupts</title>
<updated>2009-01-13T03:48:01+00:00</updated>
<author>
<name>Milton Miller</name>
<email>miltonm@bga.com</email>
</author>
<published>2009-01-08T02:14:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=da9dc13289fa58dced12f2baff51dfb87c339ba3'/>
<id>da9dc13289fa58dced12f2baff51dfb87c339ba3</id>
<content type='text'>
hvc_console is setting low_latency unconditionally, but some clients are
interrupt driven and will call hvc_poll from irq context.  This will cause
tty_flip_buffer_push to be called from irq context, and it very clearly
states it must not be called from IRQ when low_latency is specified.

Looking back through history:
v2.6.16-rc1 via 33f0f88f1c51ae5c2d593d26960c760ea154c2e2
    [PATCH] TTY layer buffering revamp

added this new api.

v2.6.16-rc3 via 8977d929e49021d9a6e031310aab01fa72f849c2
    [PATCH] tty buffering stall fix

claims to fix a stall discovered with hvc_console

v2.6.16-rc5 via fb5c594c2acc441f0d2d8f457484a0e0e9285db3
   [PATCH] Fix race condition in hvc console.

said set this flag to avoid a stall problem, and was merged through
the powerpc arch tree.

Without searching for email discussions, it would appear to be an
overlapping "fix", but one that did not consider all users.

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
hvc_console is setting low_latency unconditionally, but some clients are
interrupt driven and will call hvc_poll from irq context.  This will cause
tty_flip_buffer_push to be called from irq context, and it very clearly
states it must not be called from IRQ when low_latency is specified.

Looking back through history:
v2.6.16-rc1 via 33f0f88f1c51ae5c2d593d26960c760ea154c2e2
    [PATCH] TTY layer buffering revamp

added this new api.

v2.6.16-rc3 via 8977d929e49021d9a6e031310aab01fa72f849c2
    [PATCH] tty buffering stall fix

claims to fix a stall discovered with hvc_console

v2.6.16-rc5 via fb5c594c2acc441f0d2d8f457484a0e0e9285db3
   [PATCH] Fix race condition in hvc console.

said set this flag to avoid a stall problem, and was merged through
the powerpc arch tree.

Without searching for email discussions, it would appear to be an
overlapping "fix", but one that did not consider all users.

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hvc_console: Call free_irq() only if request_irq() was successful</title>
<updated>2009-01-13T03:48:01+00:00</updated>
<author>
<name>Milton Miller</name>
<email>miltonm@bga.com</email>
</author>
<published>2009-01-08T02:14:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=c21f7a527f7757a0e246cea521a5dd3b8e1224d5'/>
<id>c21f7a527f7757a0e246cea521a5dd3b8e1224d5</id>
<content type='text'>
Only call free_irq if we marked the request_irq has having succeeded
instead of whenever the the sub-driver identified the interrupt to use.

Signed-off-by: Milton Miller &lt;miltonm@bga.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only call free_irq if we marked the request_irq has having succeeded
instead of whenever the the sub-driver identified the interrupt to use.

Signed-off-by: Milton Miller &lt;miltonm@bga.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hvc_console: Change an mb() to smp_mb() and add some comments</title>
<updated>2009-01-13T03:48:01+00:00</updated>
<author>
<name>Milton Miller</name>
<email>miltonm@bga.com</email>
</author>
<published>2009-01-08T02:14:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=9fef3d2d15ae8ca24e4a145f2e189eea145d18c2'/>
<id>9fef3d2d15ae8ca24e4a145f2e189eea145d18c2</id>
<content type='text'>
I remember some history on this barrier.  There was a race between
open via /dev/console and the tty being fully setup.  Its also why
there is a temporary variable and the global is assigned at the end
of the function.

Signed-off-by: Milton Miller &lt;miltonm@bga.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I remember some history on this barrier.  There was a race between
open via /dev/console and the tty being fully setup.  Its also why
there is a temporary variable and the global is assigned at the end
of the function.

Signed-off-by: Milton Miller &lt;miltonm@bga.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>powerpc: Cleanup from l64 to ll64 change: drivers/char</title>
<updated>2009-01-13T03:48:00+00:00</updated>
<author>
<name>Stephen Rothwell</name>
<email>sfr@canb.auug.org.au</email>
</author>
<published>2009-01-06T14:28:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=1901515c79f13d9a1913d246b6c0711318dadb4c'/>
<id>1901515c79f13d9a1913d246b6c0711318dadb4c</id>
<content type='text'>
This is a powerpc specific driver.

Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a powerpc specific driver.

Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
