<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/tty/hvc, branch v3.0.79</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/tty/hvc?h=v3.0.79</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/tty/hvc?h=v3.0.79'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-11-26T17:09:57Z</updated>
<entry>
<title>tty: hvc_dcc: Fix duplicate character inputs</title>
<updated>2011-11-26T17:09:57Z</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2011-10-26T02:19:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5e3092bd68b8ed5d17ece466ba98e02f4ad035ec'/>
<id>urn:sha1:5e3092bd68b8ed5d17ece466ba98e02f4ad035ec</id>
<content type='text'>
commit c2a3e84f950e7ddba1f3914b005861d46ae60359 upstream.

Reading from the DCC grabs a character from the buffer and
clears the status bit. Since this is a context-changing
operation, instructions following the character read that rely on
the status bit being accurate need to be synchronized with an
ISB.

In this case, the status bit check needs to execute after the
character read otherwise we run the risk of reading the character
and checking the status bit before the read can clear the status
bit in the first place. When this happens, the user will see the
same character they typed twice, instead of once.

Add an ISB after the read and the write, so that the status check
is synchronized with the read/write operations.

Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>hvc_console: Improve tty/console put_chars handling</title>
<updated>2011-08-05T04:58:41Z</updated>
<author>
<name>Hendrik Brueckner</name>
<email>brueckner@linux.vnet.ibm.com</email>
</author>
<published>2011-07-05T21:50:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9f78aa15dc4b47ca0bc6269c7c0e4f2345a66580'/>
<id>urn:sha1:9f78aa15dc4b47ca0bc6269c7c0e4f2345a66580</id>
<content type='text'>
commit 8c2381af0d3ef62a681dac5a141b6dabb27bf2e1 upstream.

Currently, the hvc_console_print() function drops console output if the
hvc backend's put_chars() returns 0.  This patch changes this behavior
to allow a retry through returning -EAGAIN.

This change also affects the hvc_push() function.  Both functions are
changed to handle -EAGAIN and to retry the put_chars() operation.

If a hvc backend returns -EAGAIN, the retry handling differs:

  - hvc_console_print() spins to write the complete console output.
  - hvc_push() behaves the same way as for returning 0.

Now hvc backends can indirectly control the way how console output is
handled through the hvc console layer.

Signed-off-by: Hendrik Brueckner &lt;brueckner@linux.vnet.ibm.com&gt;
Acked-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Fix common misspellings</title>
<updated>2011-03-31T14:26:23Z</updated>
<author>
<name>Lucas De Marchi</name>
<email>lucas.demarchi@profusion.mobi</email>
</author>
<published>2011-03-31T01:57:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=25985edcedea6396277003854657b5f3cb31a628'/>
<id>urn:sha1:25985edcedea6396277003854657b5f3cb31a628</id>
<content type='text'>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</content>
</entry>
<entry>
<title>drivers: Final irq namespace conversion</title>
<updated>2011-03-29T12:48:19Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2011-03-28T15:49:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dced35aeb0367dda2636ee9ee914bda14510dcc9'/>
<id>urn:sha1:dced35aeb0367dda2636ee9ee914bda14510dcc9</id>
<content type='text'>
Scripted with coccinelle.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial</title>
<updated>2011-03-18T17:37:40Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-03-18T17:37:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e16b396ce314b2bcdfe6c173fe075bf8e3432368'/>
<id>urn:sha1:e16b396ce314b2bcdfe6c173fe075bf8e3432368</id>
<content type='text'>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (47 commits)
  doc: CONFIG_UNEVICTABLE_LRU doesn't exist anymore
  Update cpuset info &amp; webiste for cgroups
  dcdbas: force SMI to happen when expected
  arch/arm/Kconfig: remove one to many l's in the word.
  asm-generic/user.h: Fix spelling in comment
  drm: fix printk typo 'sracth'
  Remove one to many n's in a word
  Documentation/filesystems/romfs.txt: fixing link to genromfs
  drivers:scsi Change printk typo initate -&gt; initiate
  serial, pch uart: Remove duplicate inclusion of linux/pci.h header
  fs/eventpoll.c: fix spelling
  mm: Fix out-of-date comments which refers non-existent functions
  drm: Fix printk typo 'failled'
  coh901318.c: Change initate to initiate.
  mbox-db5500.c Change initate to initiate.
  edac: correct i82975x error-info reported
  edac: correct i82975x mci initialisation
  edac: correct commented info
  fs: update comments to point correct document
  target: remove duplicate include of target/target_core_device.h from drivers/target/target_core_hba.c
  ...

Trivial conflict in fs/eventpoll.c (spelling vs addition)
</content>
</entry>
<entry>
<title>Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc</title>
<updated>2011-03-18T13:31:43Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-03-18T13:31:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0a95d92c0054e74fb79607ac2df958b7bf295706'/>
<id>urn:sha1:0a95d92c0054e74fb79607ac2df958b7bf295706</id>
<content type='text'>
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (62 commits)
  powerpc/85xx: Fix signedness bug in cache-sram
  powerpc/fsl: 85xx: document cache sram bindings
  powerpc/fsl: define binding for fsl mpic interrupt controllers
  powerpc/fsl_msi: Handle msi-available-ranges better
  drivers/serial/ucc_uart.c: Add of_node_put to avoid memory leak
  powerpc/85xx: Fix SPE float to integer conversion failure
  powerpc/85xx: Update sata controller compatible for p1022ds board
  ATA: Add FSL sata v2 controller support
  powerpc/mpc8xxx_gpio: simplify searching for 'fsl, qoriq-gpio' compatiable
  powerpc/8xx: remove obsolete mgsuvd board
  powerpc/82xx: rename and update mgcoge board support
  powerpc/83xx: rename and update kmeter1
  powerpc/85xx: Workaroudn e500 CPU erratum A005
  powerpc/fsl_pci: Add support for FSL PCIe controllers v2.x
  powerpc/85xx: Fix writing to spin table 'cpu-release-addr' on ppc64e
  powerpc/pseries: Disable MSI using new interface if possible
  powerpc: Enable GENERIC_HARDIRQS_NO_DEPRECATED.
  powerpc: core irq_data conversion.
  powerpc: sysdev/xilinx_intc irq_data conversion.
  powerpc: sysdev/uic irq_data conversion.
  ...

Fix up conflicts in arch/powerpc/sysdev/fsl_msi.c (due to getting rid of
of_platform_driver in arch/powerpc)
</content>
</entry>
<entry>
<title>Merge branches 'stable/hvc-console', 'stable/gntalloc.v6' and 'stable/balloon' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen</title>
<updated>2011-03-18T01:16:36Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-03-18T01:16:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=514af9f7904ab65a6763b4b0bf51f1c7081026cb'/>
<id>urn:sha1:514af9f7904ab65a6763b4b0bf51f1c7081026cb</id>
<content type='text'>
* 'stable/hvc-console' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen/hvc: Disable probe_irq_on/off from poking the hvc-console IRQ line.

* 'stable/gntalloc.v6' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen: gntdev: fix build warning
  xen/p2m/m2p/gnttab: do not add failed grant maps to m2p override
  xen-gntdev: Add cast to pointer
  xen-gntdev: Fix incorrect use of zero handle
  xen: change xen/[gntdev/gntalloc] to default m
  xen-gntdev: prevent using UNMAP_NOTIFY_CLEAR_BYTE on read-only mappings
  xen-gntdev: Avoid double-mapping memory
  xen-gntdev: Avoid unmapping ranges twice
  xen-gntdev: Use map-&gt;vma for checking map validity
  xen-gntdev: Fix unmap notify on PV domains
  xen-gntdev: Fix memory leak when mmap fails
  xen/gntalloc,gntdev: Add unmap notify ioctl
  xen-gntalloc: Userspace grant allocation driver
  xen-gntdev: Support mapping in HVM domains
  xen-gntdev: Add reference counting to maps
  xen-gntdev: Use find_vma rather than iterating our vma list manually
  xen-gntdev: Change page limit to be global instead of per-open

* 'stable/balloon' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: (24 commits)
  xen-gntdev: Use ballooned pages for grant mappings
  xen-balloon: Add interface to retrieve ballooned pages
  xen-balloon: Move core balloon functionality out of module
  xen/balloon: Remove pr_info's and don't alter retry_count
  xen/balloon: Protect against CPU exhaust by event/x process
  xen/balloon: Migration from mod_timer() to schedule_delayed_work()
  xen/balloon: Removal of driver_pages
</content>
</entry>
<entry>
<title>xen/hvc: Disable probe_irq_on/off from poking the hvc-console IRQ line.</title>
<updated>2011-03-10T05:57:59Z</updated>
<author>
<name>Konrad Rzeszutek Wilk</name>
<email>konrad.wilk@oracle.com</email>
</author>
<published>2011-03-07T20:03:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bbd5a762b4c56609ad4c501298556ab1f00710cc'/>
<id>urn:sha1:bbd5a762b4c56609ad4c501298556ab1f00710cc</id>
<content type='text'>
This fixes a particular nasty racing problem found when using
Xen hypervisor with the console (hvc) output being routed to the
serial port and the serial port receiving data when
probe_irq_off(probe_irq_on) is running.

Specifically the bug manifests itself with:

[    4.470693] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
[    4.470693] IP: [&lt;ffffffff810a8c65&gt;] handle_IRQ_event+0xe/0xc9
..snip..
[    4.470693] Call Trace:
[    4.470693]  &lt;IRQ&gt;
[    4.470693]  [&lt;ffffffff810aa645&gt;] handle_percpu_irq+0x3c/0x69
[    4.470693]  [&lt;ffffffff8123cda7&gt;] __xen_evtchn_do_upcall+0xfd/0x195
[    4.470693]  [&lt;ffffffff810308cf&gt;] ? xen_restore_fl_direct_end+0x0/0x1
[    4.470693]  [&lt;ffffffff8123d873&gt;] xen_evtchn_do_upcall+0x32/0x47
[    4.470693]  [&lt;ffffffff81034dfe&gt;] xen_do_hypervisor_callback+0x1e/0x30
[    4.470693]  &lt;EOI&gt;
[    4.470693]  [&lt;ffffffff8100922a&gt;] ? hypercall_page+0x22a/0x1000
[    4.470693]  [&lt;ffffffff8100922a&gt;] ? hypercall_page+0x22a/0x1000
[    4.470693]  [&lt;ffffffff810301c5&gt;] ? xen_force_evtchn_callback+0xd/0xf
[    4.470693]  [&lt;ffffffff810308e2&gt;] ? check_events+0x12/0x20
[    4.470693]  [&lt;ffffffff81030889&gt;] ? xen_irq_enable_direct_end+0x0/0x7
[    4.470693]  [&lt;ffffffff810ab0a0&gt;] ? probe_irq_on+0x8f/0x1d7
[    4.470693]  [&lt;ffffffff812b105e&gt;] ? serial8250_config_port+0x7b7/0x9e6
[    4.470693]  [&lt;ffffffff812ad66c&gt;] ? uart_add_one_port+0x11b/0x305

The bug is trigged by three actors working together:
 A). serial_8250_config_port calling
	probe_irq_off(probe_irq_on())
     wherein all of the IRQ handlers are being started and shut off.
     The functions utilize the sleep functions so the minimum time
     they are run is 120 msec.
 B). Xen hypervisor receiving on the serial line any character and
     setting the bits in the event channel - during this 120 msec timeframe.
 C). The hvc API makes a call to 'request_irq' (and hence setting desc-&gt;action
     to a valid value), much much later - when user space opens
     /dev/console (hvc_open). To make the console usable during bootup,
     the Xen HVC implementation sets the IRQ chip (and correspondingly
     the event channel) much earlier. The IRQ chip handler that is used
     is the handle_percpu_irq (aaca49642b92c8a57d3ca5029a5a94019c7af69f)

Back to the issue. When A) is being called it ends up calling the
xen_percpu_chip's chip-&gt;startup twice and chip-&gt;shutdown once. Those
are set to the default_startup and mask_irq (events.c) respectivly.
If (and this seems to depend on what serial concentrator you use), B)
gets data from the serial port it sets in the event channel a pending bit.
When A) calls chip-&gt;startup(), the masking of the pending bit, and
unmasking of the event channel mask, and also setting of the upcall_pending
flag is done (since there is data present on the event channel).
If before the 120 msec has elapsed, any IRQ handler (Xen IRQ has one
IRQ handler, which checks the event channels bitmap to figure which one
to call) is called we end up calling the handle_percpu_irq. The
handle_percpu_irq calls desc-&gt;action (which is NULL) and we blow up.

Caveats: I could only reproduce this on 2.6.32 pvops. I am not sure
why this is not showing up on 2.6.38 kernel.

The probe_irq_on/off has code to disable poking specific IRQ lines. This is
done by using the set_irq_noprobe() and then we do not have to
worry about the handle_percpu_irq being called before the IRQ action
handler has been installed.

Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>powerpc/pseries: Reduce HVCS driver insanity</title>
<updated>2011-03-02T05:50:25Z</updated>
<author>
<name>Benjamin Herrenschmidt</name>
<email>benh@kernel.crashing.org</email>
</author>
<published>2011-02-06T18:26:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c7704d352d45de47333f2d9f10aead820b49044c'/>
<id>urn:sha1:c7704d352d45de47333f2d9f10aead820b49044c</id>
<content type='text'>
The HVCS driver, for those who don't know, is a driver for the "server" side
of the IBM virtual terminal mechanism allowing Linux partitions to act as
terminal servers under IBM PowerVM hypervisor. It's almost never used on
the field at the moment.

However, it's part of our configs, and in its current incarnation, will
allocate the tty driver &amp; major (with 64 minors) and create a kernel thread
whether it's used or not, ie, whether the hypervisor did put a virtual
terminal server device node in the partition or not (or whether running on
a pseries machine or not even).

This in turns causes modern distro's udev's to start trying to open all
those 64 minors at boot, which, since they aren't linked to anything,
causes the driver to spew errors in the kernel log for each of them.

Not nice.

This moves all that initialization to a function which is now only called
the first time a terminal server virtual IO device is actually probed
(that is almost never).

There's still a _LOT_ of cleanup that can be done in this driver, some
simple (almost all printk's statements in there shall either just be
removed or in some case turned into better written &amp; more informative
messages, including using the dev_* variants etc...). This is left as
an exercise for whoever actually cares about that driver.

One could also try to be smart and dispose of all the tty related
resources when the last instance of the VIO server device
is removed (Hotplug anybody ?).

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>Merge 2.6.38-rc6 into tty-next</title>
<updated>2011-02-24T19:36:31Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2011-02-24T19:36:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f227e08b71b9c273eaa29a57370a3a5b833aa382'/>
<id>urn:sha1:f227e08b71b9c273eaa29a57370a3a5b833aa382</id>
<content type='text'>
This was to resolve a merge issue with drivers/char/Makefile and
drivers/tty/serial/68328serial.c

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
</feed>
