提交 9fef3d2d 编写于 作者: M Milton Miller 提交者: Benjamin Herrenschmidt

hvc_console: Change an mb() to smp_mb() and add some comments

I remember some history on this barrier.  There was a race between
open via /dev/console and the tty being fully setup.  Its also why
there is a temporary variable and the global is assigned at the end
of the function.
Signed-off-by: NMilton Miller <miltonm@bga.com>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 a1c5a893
......@@ -876,8 +876,11 @@ static int hvc_init(void)
goto stop_thread;
}
/* FIXME: This mb() seems completely random. Remove it. */
mb();
/*
* Make sure tty is fully registered before allowing it to be
* found by hvc_console_device.
*/
smp_mb();
hvc_driver = drv;
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册