Thread (3 messages) 3 messages, 3 authors, 2010-02-24

Re: virtio: console: Barrier needed before dropping early_put_chars?

flat view

From: Rusty Russell <hidden>
Date: 2010-02-24 01:07:08

On Wed, 24 Feb 2010 03:40:22 am Amit Shah wrote:
Hey Rusty, Christian,

Christoph Hellwig asked why we don't need a barrier before this code in
virtcons_probe():
quoted
+     /* Start using the new console output. */
+     early_put_chars = NULL;
      return 0;
Since only s390 uses early_put_chars so far, you'd know why it's not
needed / why we're safe.
He's right, it's sloppy.

In practice the compiler checks for NULL and reuses the pointer, and we
have no problem if this is used a couple of times after the real console is
live.

The Right Way to do this is a lock in put_chars() and around this assignment.
But do we really want to bother?

Cheers,
Rusty.
-- 
Away travelling 25Feb-26Mar (6 .de + 1 .pl + 17 .lt + 2 .sg)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help