<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/serial_core.h, branch v4.11-rc3</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>serial: do not accept sysrq characters via serial port</title>
<updated>2017-01-12T10:51:24+00:00</updated>
<author>
<name>Felix Fietkau</name>
<email>nbd@nbd.name</email>
</author>
<published>2016-12-22T07:31:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=732dbf3a6104a3abfcfcd066dcaf89e5054ce009'/>
<id>732dbf3a6104a3abfcfcd066dcaf89e5054ce009</id>
<content type='text'>
many embedded boards have a disconnected TTL level serial which can
generate some garbage that can lead to spurious false sysrq detects.

Signed-off-by: John Crispin &lt;john@phrozen.org&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&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>
many embedded boards have a disconnected TTL level serial which can
generate some garbage that can lead to spurious false sysrq detects.

Signed-off-by: John Crispin &lt;john@phrozen.org&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>linux: drop __bitwise__ everywhere</title>
<updated>2016-12-15T22:13:41+00:00</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2016-12-11T04:34:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9efeccacd3a486128d3add611dd4cefb5b60a58c'/>
<id>9efeccacd3a486128d3add611dd4cefb5b60a58c</id>
<content type='text'>
__bitwise__ used to mean "yes, please enable sparse checks
unconditionally", but now that we dropped __CHECK_ENDIAN__
__bitwise is exactly the same.
There aren't many users, replace it by __bitwise everywhere.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Stefan Schmidt &lt;stefan@osg.samsung.com&gt;
Acked-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Akced-by: Lee Duncan &lt;lduncan@suse.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
__bitwise__ used to mean "yes, please enable sparse checks
unconditionally", but now that we dropped __CHECK_ENDIAN__
__bitwise is exactly the same.
There aren't many users, replace it by __bitwise everywhere.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Stefan Schmidt &lt;stefan@osg.samsung.com&gt;
Acked-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Akced-by: Lee Duncan &lt;lduncan@suse.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: 8250: Expose set_ldisc function</title>
<updated>2016-11-16T09:59:38+00:00</updated>
<author>
<name>Ed Blake</name>
<email>ed.blake@imgtec.com</email>
</author>
<published>2016-11-10T18:07:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=db405a8f8bf70daf57ed88808a2bf9c5fe308c70'/>
<id>db405a8f8bf70daf57ed88808a2bf9c5fe308c70</id>
<content type='text'>
Expose set_ldisc() function so that it can be overridden with a
platform specific implementation.

Signed-off-by: Ed Blake &lt;ed.blake@imgtec.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>
Expose set_ldisc() function so that it can be overridden with a
platform specific implementation.

Signed-off-by: Ed Blake &lt;ed.blake@imgtec.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI: parse SPCR and enable matching console</title>
<updated>2016-09-28T15:46:46+00:00</updated>
<author>
<name>Aleksey Makarov</name>
<email>aleksey.makarov@linaro.org</email>
</author>
<published>2016-09-27T20:54:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ad1696f6f09daacfdf2bf04bc83cd8f48d80e34a'/>
<id>ad1696f6f09daacfdf2bf04bc83cd8f48d80e34a</id>
<content type='text'>
'ARM Server Base Boot Requiremets' [1] mentions SPCR (Serial Port
Console Redirection Table) [2] as a mandatory ACPI table that
specifies the configuration of serial console.

Defer initialization of DT earlycon until ACPI/DT decision is made.

Parse the ACPI SPCR table, setup earlycon if required,
enable specified console.

Thanks to Peter Hurley for explaining how this should work.

[1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0044a/index.html
[2] https://msdn.microsoft.com/en-us/library/windows/hardware/dn639132(v=vs.85).aspx

Signed-off-by: Aleksey Makarov &lt;aleksey.makarov@linaro.org&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Reviewed-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Tested-by: Kefeng Wang &lt;wangkefeng.wang@huawei.com&gt;
Tested-by: Christopher Covington &lt;cov@codeaurora.org&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>
'ARM Server Base Boot Requiremets' [1] mentions SPCR (Serial Port
Console Redirection Table) [2] as a mandatory ACPI table that
specifies the configuration of serial console.

Defer initialization of DT earlycon until ACPI/DT decision is made.

Parse the ACPI SPCR table, setup earlycon if required,
enable specified console.

Thanks to Peter Hurley for explaining how this should work.

[1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0044a/index.html
[2] https://msdn.microsoft.com/en-us/library/windows/hardware/dn639132(v=vs.85).aspx

Signed-off-by: Aleksey Makarov &lt;aleksey.makarov@linaro.org&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Reviewed-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Tested-by: Kefeng Wang &lt;wangkefeng.wang@huawei.com&gt;
Tested-by: Christopher Covington &lt;cov@codeaurora.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tty: serial_core: add tty NULL check to uart_tx_stopped</title>
<updated>2016-09-15T10:37:09+00:00</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2016-09-09T22:37:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a727b025f43d7952c0697562f5cecda9f42758aa'/>
<id>a727b025f43d7952c0697562f5cecda9f42758aa</id>
<content type='text'>
Commit 761ed4a94582 ("tty: serial_core: convert uart_close to use
tty_port_close") created a case where a port used for a console does not
get shutdown on tty closing. Then a call to uart_tx_stopped() segfaults
because the tty is NULL. This could be fixed to restore old behavior,
but we also want to allow tty_ports to work without a tty attached. So
this change to allow a NULL tty_struct is needed either way.

Fixes: 761ed4a94582 ("tty: serial_core: convert uart_close to use tty_port_close")
Reported-by: kernel test robot &lt;xiaolong.ye@intel.com&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&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>
Commit 761ed4a94582 ("tty: serial_core: convert uart_close to use
tty_port_close") created a case where a port used for a console does not
get shutdown on tty closing. Then a call to uart_tx_stopped() segfaults
because the tty is NULL. This could be fixed to restore old behavior,
but we also want to allow tty_ports to work without a tty attached. So
this change to allow a NULL tty_struct is needed either way.

Fixes: 761ed4a94582 ("tty: serial_core: convert uart_close to use tty_port_close")
Reported-by: kernel test robot &lt;xiaolong.ye@intel.com&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: earlycon: Extend earlycon command line option to support 64-bit addresses</title>
<updated>2016-09-02T13:03:35+00:00</updated>
<author>
<name>Alexander Sverdlin</name>
<email>alexander.sverdlin@nokia.com</email>
</author>
<published>2016-09-02T11:20:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=46e36683f433528bfb7e5754ca5c5c86c204c40a'/>
<id>46e36683f433528bfb7e5754ca5c5c86c204c40a</id>
<content type='text'>
earlycon implementation used "unsigned long" internally, but there are systems
(ARM with LPAE) where sizeof(unsigned long) == 4 and uart is mapped beyond 4GiB
address range.

Switch to resource_size_t internally and replace obsoleted simple_strtoul() with
kstrtoull().

Signed-off-by: Alexander Sverdlin &lt;alexander.sverdlin@nokia.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>
earlycon implementation used "unsigned long" internally, but there are systems
(ARM with LPAE) where sizeof(unsigned long) == 4 and uart is mapped beyond 4GiB
address range.

Switch to resource_size_t internally and replace obsoleted simple_strtoul() with
kstrtoull().

Signed-off-by: Alexander Sverdlin &lt;alexander.sverdlin@nokia.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>earlycon: mark earlycon code as __used iif the caller is built-in</title>
<updated>2016-06-25T21:31:04+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2016-06-06T09:41:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f8ba3647f30ab22daeb5110453e2dad8a2c1d841'/>
<id>f8ba3647f30ab22daeb5110453e2dad8a2c1d841</id>
<content type='text'>
Keep earlycon related symbols only when CONFIG_SERIAL_EARLYCON is
enabled and the driver is built-in.  This will be helpful to clean
up ifdefs surrounding earlycon code in serial drivers.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&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>
Keep earlycon related symbols only when CONFIG_SERIAL_EARLYCON is
enabled and the driver is built-in.  This will be helpful to clean
up ifdefs surrounding earlycon code in serial drivers.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: 8250: export get_mctrl function</title>
<updated>2016-04-30T16:26:55+00:00</updated>
<author>
<name>Wan Ahmad Zainie</name>
<email>wan.ahmad.zainie.wan.mohamad@intel.com</email>
</author>
<published>2016-04-06T04:06:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=144ef5c2df9b473dad7eab375adcf5b11d0b1e47'/>
<id>144ef5c2df9b473dad7eab375adcf5b11d0b1e47</id>
<content type='text'>
Exposes get_mctrl() function so that it can be overriden with platform
specific implementation.

Signed-off-by: Wan Ahmad Zainie &lt;wan.ahmad.zainie.wan.mohamad@intel.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Heikki Krogerus &lt;heikki.krogerus@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>
Exposes get_mctrl() function so that it can be overriden with platform
specific implementation.

Signed-off-by: Wan Ahmad Zainie &lt;wan.ahmad.zainie.wan.mohamad@intel.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: core: Prevent unsafe uart port access, part 2</title>
<updated>2016-04-30T16:26:55+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2016-04-10T01:56:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9ed19428a51d53477e2b79be3303fa08f8575749'/>
<id>9ed19428a51d53477e2b79be3303fa08f8575749</id>
<content type='text'>
For serial core operations not already excluded by holding port-&gt;mutex,
use reference counting to protect deferencing the state-&gt;uart_port.

Introduce helper functions, uart_port_ref() and uart_port_deref(), to
wrap uart_port access, and helper macros, uart_port_lock() and
uart_port_unlock(), to wrap combination uart_port access with uart
port lock sections.

Port removal in uart_remove_one_port() waits for reference count to
drop to zero before detaching the uart port from struct uart_state.

For functions only reading the tx circular buffer indexes (where the
uart port lock is claimed to prevent concurrent users), a NULL uart
port is simply ignored and the operation completes normally.

For functions change the tx circular buffer indexes (where the uart
port lock is claimed to prevent concurrent users), the operation is
aborted if the uart port is NULL (ie., has been detached).

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>
For serial core operations not already excluded by holding port-&gt;mutex,
use reference counting to protect deferencing the state-&gt;uart_port.

Introduce helper functions, uart_port_ref() and uart_port_deref(), to
wrap uart_port access, and helper macros, uart_port_lock() and
uart_port_unlock(), to wrap combination uart_port access with uart
port lock sections.

Port removal in uart_remove_one_port() waits for reference count to
drop to zero before detaching the uart port from struct uart_state.

For functions only reading the tx circular buffer indexes (where the
uart port lock is claimed to prevent concurrent users), a NULL uart
port is simply ignored and the operation completes normally.

For functions change the tx circular buffer indexes (where the uart
port lock is claimed to prevent concurrent users), the operation is
aborted if the uart port is NULL (ie., has been detached).

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>of: earlycon: Move address translation to of_setup_earlycon()</title>
<updated>2016-02-07T06:07:37+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2016-01-16T23:23:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c90fe9c0394b068ceca16f66e9f35bcd8d948295'/>
<id>c90fe9c0394b068ceca16f66e9f35bcd8d948295</id>
<content type='text'>
Cleanup the early DT/earlycon separation; remove the 'addr' parameter
from of_setup_earlycon() and get the uart phys addr directly with a
new wrapper function, of_flat_dt_translate_addr(). Limit
fdt_translate_address() to file scope.

Acked-by: Rob Herring &lt;robh@kernel.org&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>
Cleanup the early DT/earlycon separation; remove the 'addr' parameter
from of_setup_earlycon() and get the uart phys addr directly with a
new wrapper function, of_flat_dt_translate_addr(). Limit
fdt_translate_address() to file scope.

Acked-by: Rob Herring &lt;robh@kernel.org&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>
</feed>
