public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ryan Arnold <rsa@us.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linuxppc64-dev <linuxppc64-dev@lists.linuxppc.org>,
	Paul Mackerras <paulus@samba.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: [PATCH] interrupt driven hvc_console as vio device
Date: Wed, 25 Aug 2004 00:12:53 -0500	[thread overview]
Message-ID: <1093410773.3402.111.camel@localhost> (raw)
In-Reply-To: <20040824214950.5d9043a3.akpm@osdl.org>

On Tue, 2004-08-24 at 23:49, Andrew Morton wrote:

> >  +	spin_lock_irqsave(&hp->lock, flags);
> >  +	retval = N_OUTBUF - hp->n_outbuf;
> >  +	spin_unlock_irqrestore(&hp->lock, flags);

> The new locking in these functions doesn't really do anything, apart from
> adding memory barriers.  If that's what you really want, I suggest you
> simply add (commented) memory barriers.

Since chars_in_buffer() can be called from the tty write task and the
n_outbuf value is changed from the hvc_console task I didn't want there
to be any confusion as to the real value of the variable when
chars_in_buffer() was reading it.  Is this the proper scenario for a
memory barrier?

Ryan S. Arnold
IBM Linux Technology Center


  reply	other threads:[~2004-08-25 17:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-25  0:48 [PATCH] interrupt driven hvc_console as vio device Ryan Arnold
2004-08-25  4:46 ` Andrew Morton
2004-08-25  5:09   ` Ryan Arnold
2004-08-25  4:49 ` Andrew Morton
2004-08-25  5:12   ` Ryan Arnold [this message]
2004-08-25  4:59 ` Paul Mackerras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1093410773.3402.111.camel@localhost \
    --to=rsa@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc64-dev@lists.linuxppc.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox