]> git.baikalelectronics.ru Git - kernel.git/commit
serial: amba-pl011: use cpu_relax when polling registers
authorTimur Tabi <timur@codeaurora.org>
Fri, 15 Jan 2016 20:32:20 +0000 (14:32 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Feb 2016 06:51:04 +0000 (22:51 -0800)
commitbc0c2dfe7e19fec15840e32a99cf8eeea85813f4
tree3155722dc4b757a1cb13a34ef1e6c1d31261d2c8
parent476703dc992a5d3fb0463f6fd7ae086ef3e9e2eb
serial: amba-pl011: use cpu_relax when polling registers

Busy loops that poll on a register should call cpu_relax().  On some
architectures, it can lower CPU power consumption or yield to a
hyperthreaded twin processor.  It also serves as a compiler barrier,
so it can replace barrier() calls.

Signed-off-by: Timur Tabi <timur@codeaurora.org>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/amba-pl011.c