public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Oliver Neukum <oliver@neukum.org>, Andrew Morton <akpm@osdl.org>,
	Ingo Molnar <mingo@elte.hu>, Linus Torvalds <torvalds@osdl.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] remove volatile from x86 cmos_lock
Date: Fri, 14 Jul 2006 17:50:07 -0400	[thread overview]
Message-ID: <20060714215007.GI24705@redhat.com> (raw)
In-Reply-To: <1152889765.27135.6.camel@localhost.localdomain>

On Fri, Jul 14, 2006 at 11:09:25AM -0400, Steven Rostedt wrote:
 > On Fri, 2006-07-14 at 16:53 +0200, Oliver Neukum wrote:
 > > Am Freitag, 14. Juli 2006 16:48 schrieb Steven Rostedt:
 > > > @@ -52,14 +54,16 @@ static inline void lock_cmos(unsigned ch
 > > >  
 > > >  static inline void unlock_cmos(void)
 > > >  {
 > > > -       cmos_lock = 0;
 > > > +       set_wmb(cmos_lock, 0);
 > > >  }
 > > >  static inline int do_i_have_lock_cmos(void)
 > > >  {
 > > > +       barrier();
 > > 
 > > Shouldn't these be rmb() ?
 > 
 > I was thinking that too, but I'm still not sure when to use rmb or
 > barrier.  wmb seems pretty straight forward though.  hmm, maybe this
 > really should be a smb_rmb since I believe a barrier would be ok for UP.

I'm more puzzled why it's inventing its own locking primitives instead of
using one of the many the kernel provides.  This stuff is prehistoric though.
Hangover from the really early days ?

		Dave

-- 
http://www.codemonkey.org.uk

  reply	other threads:[~2006-07-14 23:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-14 14:48 [PATCH] remove volatile from x86 cmos_lock Steven Rostedt
     [not found] ` <200607141653.35011.oliver@neukum.org>
2006-07-14 15:09   ` Steven Rostedt
2006-07-14 21:50     ` Dave Jones [this message]
2006-07-15  2:04       ` Steven Rostedt

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=20060714215007.GI24705@redhat.com \
    --to=davej@redhat.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=oliver@neukum.org \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@osdl.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