diff options
author | Xinyu Chen <[email protected]> | 2012-08-27 09:36:51 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2012-09-05 12:44:44 -0700 |
commit | 9ec1882df244c4ee1baa692676fef5e8b0f5487d (patch) | |
tree | c324ffa8ce389ed628f05ba3c5e9fde1eeb90537 /tools/perf/util/trace-event-scripting.c | |
parent | fea7a08acb13524b47711625eebea40a0ede69a0 (diff) |
tty: serial: imx: console write routing is unsafe on SMP
The console feature's write routing is unsafe on SMP with
the startup/shutdown call.
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 open /dev/console and write with sys_write()
The shell goes into the normal uart open/write routing,
but the other two go into the console operations.
The open routing calls imx serial startup, which will write USR1/2
register without any lock and critical with imx_console_write call.
Add a spin_lock for startup/shutdown/console_write routing.
This patch is a port from Freescale's Android kernel.
Signed-off-by: Xinyu Chen <[email protected]>
Tested-by: Dirk Behme <[email protected]>
CC: Sascha Hauer <[email protected]>
Acked-by: Shawn Guo <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions