<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/tty/serial/sh-sci.c, branch v3.12.10</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/tty/serial/sh-sci.c?h=v3.12.10</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/tty/serial/sh-sci.c?h=v3.12.10'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-08-02T03:54:13Z</updated>
<entry>
<title>serial: sh-sci: use dev_get_platdata()</title>
<updated>2013-08-02T03:54:13Z</updated>
<author>
<name>Jingoo Han</name>
<email>jg1.han@samsung.com</email>
</author>
<published>2013-08-01T09:17:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3ba35baa55fa4420f9ea7132d728ed68cfa37d28'/>
<id>urn:sha1:3ba35baa55fa4420f9ea7132d728ed68cfa37d28</id>
<content type='text'>
Use the wrapper function for retrieving the platform data instead of
accessing dev-&gt;platform_data directly

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: use dev_get_platdata()</title>
<updated>2013-08-01T00:56:15Z</updated>
<author>
<name>Jingoo Han</name>
<email>jg1.han@samsung.com</email>
</author>
<published>2013-07-30T08:06:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=574de559c1797618fd8ed03576837eb3113c5d26'/>
<id>urn:sha1:574de559c1797618fd8ed03576837eb3113c5d26</id>
<content type='text'>
Use the wrapper function for retrieving the platform data instead of
accessing dev-&gt;platform_data directly.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: Initialise variables before access in sci_set_termios()</title>
<updated>2013-06-26T08:41:16Z</updated>
<author>
<name>Simon Horman</name>
<email>horms+renesas@verge.net.au</email>
</author>
<published>2013-06-20T12:09:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d4759ded3bdf3eb004d583011707fdc21aeda94e'/>
<id>urn:sha1:d4759ded3bdf3eb004d583011707fdc21aeda94e</id>
<content type='text'>
This change addresses two warnings that are flagged by gcc relating to
potential access to the ssr and cks variables while they are uninitialised.

I have addressed this by initialising the values to
the defaults present in sci_baud_calc_hscif().

It is my analysis that cks is always initialised if used
but that without this change ssr may be accessed while uninitialised.

The code altered by this patch was introduced by commit
f303b364b41d3fc5bf879799128958400b7859aa ("serial: sh-sci: HSCIF support").

Reported-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Simon Horman &lt;horms+renesas@verge.net.au&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: HSCIF support</title>
<updated>2013-06-17T09:09:53Z</updated>
<author>
<name>Ulrich Hecht</name>
<email>ulrich.hecht@gmail.com</email>
</author>
<published>2013-05-31T15:57:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f303b364b41d3fc5bf879799128958400b7859aa'/>
<id>urn:sha1:f303b364b41d3fc5bf879799128958400b7859aa</id>
<content type='text'>
Adds support for "High Speed Serial Communications Interface with FIFO",
essentially a SCIF with 128-byte FIFOs and more accurate baud rate
generator.

Signed-off-by: Ulrich Hecht &lt;ulrich.hecht@gmail.com&gt;
Acked-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Simon Horman &lt;horms+renesas@verge.net.au&gt;
</content>
</entry>
<entry>
<title>TTY: switch tty_flip_buffer_push</title>
<updated>2013-01-16T06:30:15Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2013-01-03T14:53:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2e124b4a390ca85325fae75764bef92f0547fa25'/>
<id>urn:sha1:2e124b4a390ca85325fae75764bef92f0547fa25</id>
<content type='text'>
Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>TTY: switch tty_insert_flip_char</title>
<updated>2013-01-16T06:21:36Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2013-01-03T14:53:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=92a19f9cec9a80ad93c06e115822deb729e2c6ad'/>
<id>urn:sha1:92a19f9cec9a80ad93c06e115822deb729e2c6ad</id>
<content type='text'>
Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

tty_insert_flip_char is the next one to proceed. This one is used all
over the code, so the patch is huge.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>TTY: switch tty_buffer_request_room to tty_port</title>
<updated>2013-01-16T06:17:28Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2013-01-03T14:53:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=227434f8986c3827a1faedd1feb437acd6285315'/>
<id>urn:sha1:227434f8986c3827a1faedd1feb437acd6285315</id>
<content type='text'>
Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty pointer in
many call sites. Only tty_port will be needed and hence no more
tty_port_tty_get calls in those paths.

Here we start with tty_buffer_request_room.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: remove use of __devinit</title>
<updated>2012-11-21T23:22:52Z</updated>
<author>
<name>Bill Pemberton</name>
<email>wfp5p@virginia.edu</email>
</author>
<published>2012-11-19T18:21:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9671f09921d93e722a28ae9610d478e092ac5466'/>
<id>urn:sha1:9671f09921d93e722a28ae9610d478e092ac5466</id>
<content type='text'>
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.

Signed-off-by: Bill Pemberton &lt;wfp5p@virginia.edu&gt;
Cc: Jiri Slaby &lt;jirislaby@gmail.com&gt;
Cc: Alan Cox &lt;alan@linux.intel.com&gt;
Cc: Lucas Tavares &lt;lucaskt@linux.vnet.ibm.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Peter Korsgaard &lt;jacmet@sunsite.dk&gt;
Cc: Tony Prisk &lt;linux@prisktech.co.nz&gt;
Acked-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Acked-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: fix possible race cases on SCSCR register accesses</title>
<updated>2012-11-16T02:02:51Z</updated>
<author>
<name>Shinya Kuribayashi</name>
<email>shinya.kuribayashi.px@renesas.com</email>
</author>
<published>2012-11-16T01:54:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=33b48e1633f738c5ae78234c2dd5e3a9ba115437'/>
<id>urn:sha1:33b48e1633f738c5ae78234c2dd5e3a9ba115437</id>
<content type='text'>
In the previous commit, console write function (serial_console_write)
is changed to disable SCI interrupts while printing console strings.
This introduces possible race cases in the serial startup / shutdown
functions on SMP systems.

This patch fixes the sh-sci in the same way as commit 9ec1882df2
(tty: serial: imx: console write routing is unsafe on SMP, from
Xinyu Chen &lt;xinyu.chen@freescale.com&gt;, 2012-08-27) did.

There could be several consumers of the console,
* the kernel printk
* the init process using /dev/kmsg to call printk to show log
* shell, which opens /dev/console and writes with sys_write()

The shell goes into the normal UART open() and write() system calls,
while the other two go into the console operations.  The open() call
invokes serial startup function (sci_startup), which will write to
the SCSCR register (to enable or disable SCI interrupts) without any
locking.  This will conflict with the console serial function.

Add spinlock protections in sci_startup() and sci_shutdown() properly.

Signed-off-by: Shinya Kuribayashi &lt;shinya.kuribayashi.px@renesas.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: add locking to console write function to avoid SMP lockup</title>
<updated>2012-11-16T02:02:51Z</updated>
<author>
<name>Shinya Kuribayashi</name>
<email>shinya.kuribayashi.px@renesas.com</email>
</author>
<published>2012-11-16T01:54:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=40f70c03e33a1eed3f3fcd13418e76abad77d117'/>
<id>urn:sha1:40f70c03e33a1eed3f3fcd13418e76abad77d117</id>
<content type='text'>
Symptom:

When entering the suspend with Android logcat running, printk() call
gets stuck and never returns.  The issue can be observed at printk()s
on nonboot CPUs when going to offline with their interrupts disabled,
and never seen at boot CPU (core0 in our case).

Details:

serial_console_write() lacks of appropriate spinlock handling.

In SMP systems, as long as sci_transmit_chars() is being processed
at one CPU core, serial_console_write() can stuck at the other CPU
core(s), when it tries to access to the same serial port _without_
a proper locking.  serial_console_write() waits for the transmit FIFO
getting empty, while sci_transmit_chars() writes data to the FIFO.

In general, peripheral interrupts are routed to boot CPU (core0) by
Linux ARM standard affinity settings.  SCI(F) interrupts are handled
by core0, so sci_transmit_chars() is processed on core0 as well.

When logcat is running, it writes enormous log data to the kernel at
every moment, forever.  So core0 can repeatedly continue to process
sci_transmit_chars() in its interrupt handler, which eventually makes
the other CPU core(s) stuck at serial_console_write().

Looking at serial/8250.c, this is a known console write lockup issue
with SMP kernels.  Fix the sh-sci driver in the same way 8250.c does.

Signed-off-by: Shinya Kuribayashi &lt;shinya.kuribayashi.px@renesas.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
