diff options
author | Milton Miller <miltonm@bga.com> | 2009-01-07 21:14:18 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-01-12 22:48:01 -0500 |
commit | 9fef3d2d15ae8ca24e4a145f2e189eea145d18c2 (patch) | |
tree | deb3764686dcbeb5ab013ecf6183d55c514f216f /drivers/char | |
parent | a1c5a8932bbb75b550deb156d890027827fc9d6e (diff) |
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: Milton Miller <miltonm@bga.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/hvc_console.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index 5a8a4c28c867..f2685b747fb9 100644 --- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c | |||
@@ -876,8 +876,11 @@ static int hvc_init(void) | |||
876 | goto stop_thread; | 876 | goto stop_thread; |
877 | } | 877 | } |
878 | 878 | ||
879 | /* FIXME: This mb() seems completely random. Remove it. */ | 879 | /* |
880 | mb(); | 880 | * Make sure tty is fully registered before allowing it to be |
881 | * found by hvc_console_device. | ||
882 | */ | ||
883 | smp_mb(); | ||
881 | hvc_driver = drv; | 884 | hvc_driver = drv; |
882 | return 0; | 885 | return 0; |
883 | 886 | ||