<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/tty/serial/xilinx_uartps.c, branch linux-4.4.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.4.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.4.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2019-04-27T07:33:58+00:00</updated>
<entry>
<title>serial: uartps: console_setup() can't be placed to init section</title>
<updated>2019-04-27T07:33:58+00:00</updated>
<author>
<name>Michal Simek</name>
<email>michal.simek@xilinx.com</email>
</author>
<published>2018-09-03T13:10:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3e56f3036b4d347c0b65e82b93d67e69d362429c'/>
<id>urn:sha1:3e56f3036b4d347c0b65e82b93d67e69d362429c</id>
<content type='text'>
[ Upstream commit 4bb1ce2350a598502b23088b169e16b43d4bc639 ]

When console device is rebinded, console_setup() is called again.
But marking it as __init means that function will be clear after boot is
complete. If console device is binded again console_setup() is not found
and error "Unable to handle kernel paging request at virtual address"
is reported.

Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>serial: xuartps: Fix out-of-bounds access through DT alias</title>
<updated>2018-05-30T05:49:14+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2018-02-23T13:38:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6ba58eaf6d9b8b752db5b54f72527d8d08801b7c'/>
<id>urn:sha1:6ba58eaf6d9b8b752db5b54f72527d8d08801b7c</id>
<content type='text'>
[ Upstream commit e7d75e18d0fc3f7193b65282b651f980c778d935 ]

The cdns_uart_port[] array is indexed using a value derived from the
"serialN" alias in DT, which may lead to an out-of-bounds access.

Fix this by adding a range check.

Fixes: 928e9263492069ee ("tty: xuartps: Initialize ports according to aliases")
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Reviewed-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: xuartps: add __init to earlycon write method</title>
<updated>2015-05-10T17:10:08+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2015-05-07T09:55:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=54585ba0362a121f4e3b2fcddf62f28dbd1cf1f5'/>
<id>urn:sha1:54585ba0362a121f4e3b2fcddf62f28dbd1cf1f5</id>
<content type='text'>
Early console functions are only used during the early boot stage.
This change just saves a small amount of memory footprint.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: xilinx: Use platform_get_irq to get irq description structure</title>
<updated>2015-04-28T12:26:21+00:00</updated>
<author>
<name>Michal Simek</name>
<email>michal.simek@xilinx.com</email>
</author>
<published>2015-04-13T14:34:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5c90c07b98c02198d9777a7c4f3047b0a94bf7ed'/>
<id>urn:sha1:5c90c07b98c02198d9777a7c4f3047b0a94bf7ed</id>
<content type='text'>
For systems with CONFIG_SERIAL_OF_PLATFORM=y and device_type =
"serial"; property in DT of_serial.c driver maps and unmaps IRQ (because
driver probe fails). Then a driver is called but irq mapping is not
created that's why driver is failing again in again on request_irq().
Based on this use platform_get_irq() instead of platform_get_resource()
which is doing irq_desc allocation and driver itself can request IRQ.

Fix both xilinx serial drivers in the tree.

Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
CC: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: xuartps: Fix check in console_setup().</title>
<updated>2015-03-26T21:55:18+00:00</updated>
<author>
<name>Thomas Betker</name>
<email>thomas.betker@rohde-schwarz.com</email>
</author>
<published>2015-03-11T21:39:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=136debf707d2b3cd8e74d0fff8e29d11a78bf5c2'/>
<id>urn:sha1:136debf707d2b3cd8e74d0fff8e29d11a78bf5c2</id>
<content type='text'>
cdns_uart_console_setup() checks port-&gt;mapbase != 0, but the port may
not be initialized yet even if this condition is met [e.g., ioremap()
may have failed]. Check port-&gt;membase != NULL instead, similar to
cdns_early_console_setup().

Signed-off-by: Thomas Betker &lt;thomas.betker@rohde-schwarz.com&gt;
Reviewed-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: xuartps: Get rid of register access macros.</title>
<updated>2015-03-26T21:54:07+00:00</updated>
<author>
<name>Thomas Betker</name>
<email>thomas.betker@rohde-schwarz.com</email>
</author>
<published>2015-03-12T21:11:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=19f22efdb653642814e6c8710fca974c1dbe7cfa'/>
<id>urn:sha1:19f22efdb653642814e6c8710fca974c1dbe7cfa</id>
<content type='text'>
Get rid of cdns_uart_readl() and cdns_uart_writel() and just call
readl() and writel() directly.

Most of the patch was created by search-and-replace (I had to convert a
few lines manually, and break some lines longer than 80 columns):
* s/cdns_uart_readl(/readl(port-&gt;membase + /g
* s/cdns_uart_writel(\([^,]*\),/writel(\1, port-&gt;membase +/g

Signed-off-by: Thomas Betker &lt;thomas.betker@rohde-schwarz.com&gt;
Acked-by: Sören Brinkmann &lt;soren.brinkmann@xilinx.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: xuartps: Fix iobase use.</title>
<updated>2015-03-26T21:52:30+00:00</updated>
<author>
<name>Thomas Betker</name>
<email>thomas.betker@rohde-schwarz.com</email>
</author>
<published>2015-03-11T21:39:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0c39a467e7ba68a0d94439c1ebe260dc5b26302b'/>
<id>urn:sha1:0c39a467e7ba68a0d94439c1ebe260dc5b26302b</id>
<content type='text'>
cdns_uart_get_port() sets port-&gt;iobase = 1 to "mark port in use", but
this "in use" condition is not checked anywhere else in the code. So
remove the line, keeping port-&gt;iobase = 0 (which also makes more sense).

Signed-off-by: Thomas Betker &lt;thomas.betker@rohde-schwarz.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: xuartps: Fix cdns_uart_port[] definition.</title>
<updated>2015-03-26T21:52:29+00:00</updated>
<author>
<name>Thomas Betker</name>
<email>thomas.betker@rohde-schwarz.com</email>
</author>
<published>2015-03-11T21:39:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6db6df0e4a1b913810fc9063bbb332476ce316b7'/>
<id>urn:sha1:6db6df0e4a1b913810fc9063bbb332476ce316b7</id>
<content type='text'>
The code assumes that the array cdns_uart_port[] has dimension
CDNS_UART_NR_PORTS, so let us define it this way.

Signed-off-by: Thomas Betker &lt;thomas.betker@rohde-schwarz.com&gt;
Reviewed-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: xuartps: Fix register space size.</title>
<updated>2015-03-26T21:52:29+00:00</updated>
<author>
<name>Thomas Betker</name>
<email>thomas.betker@rohde-schwarz.com</email>
</author>
<published>2015-03-11T21:39:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9646e4fee42d080ad484eef005691a17ed9cb8e7'/>
<id>urn:sha1:9646e4fee42d080ad484eef005691a17ed9cb8e7</id>
<content type='text'>
The register space size is 0x1000, and this value [not 0xfff] should be
provided to request_mem_region(), ioremap(), etc.

Signed-off-by: Thomas Betker &lt;thomas.betker@rohde-schwarz.com&gt;
Reviewed-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: constify of_device_id array</title>
<updated>2015-03-26T21:49:10+00:00</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2015-03-16T19:17:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ed0bb2323c9321b91dfa0ea8317fdc4d9592dce4'/>
<id>urn:sha1:ed0bb2323c9321b91dfa0ea8317fdc4d9592dce4</id>
<content type='text'>
of_device_id is always used as const.
(See driver.of_match_table and open firmware functions)

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Acked-by: Peter Korsgaard &lt;peter@korsgaard.com&gt;
Acked-by: Timur Tabi &lt;timur@tabi.org&gt;
Acked-by: Patrice Chotard &lt;patrice.chotard@st.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
