public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@suse.cz>
To: Carl-Daniel Hailfinger <c-d.hailfinger.kernel.2003@gmx.net>
Cc: Arnd Bergmann <arnd@arndb.de>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [2.5] include/asm-generic/bitops.h {set,clear}_bit return void
Date: Wed, 23 Apr 2003 20:04:09 +0200	[thread overview]
Message-ID: <20030423180409.GC7131@zaurus.ucw.cz> (raw)
In-Reply-To: <3E9C7955.7070605@gmx.net>

Hi!

> > 
> > 
> >>+     mask = 1 << (nr & 0x1f);
> >>+     cli();
> >>+     *addr |= mask;
> >>+     sti();
> > 
> > 
> > cli() and sti() are no more. Moreover, the file you are trying to fix is

No. That file is still usefull.

> What is the preferred way to achieve atomicity in an operation now that
> cli() and sti() are gone?

spin_lock_irqsave(&bitops_lock).

> > not even used anywhere. Better submit a patch to remove it completely.
> 
> The point of asm-generic is not to use the files, but to give porters a
> hint about the functionality. Quoting asm-generic/bitops.h:
> 
> /* For the benefit of those who are trying to port Linux to another
>  * architecture, here are some C-language equivalents.  You should
>  * recode these in the native assembly language, if at all possible.
>  * To guarantee atomicity, these routines call cli() and sti() to
>  * disable interrupts while they operate.  (You have to provide inline
>  * routines to cli() and sti().) */
> 
> Or is this comment wrong, too?
-- 
				Pavel
Written on sharp zaurus, because my Velo1 broke. If you have Velo you don't need...


  parent reply	other threads:[~2003-04-27 22:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20030415174010$3e7e@gated-at.bofh.it>
2003-04-15 20:04 ` [PATCH] [2.5] include/asm-generic/bitops.h {set,clear}_bit return void Arnd Bergmann
2003-04-15 21:27   ` Carl-Daniel Hailfinger
2003-04-15 21:34     ` Robert Love
2003-04-15 22:46       ` Arnd Bergmann
2003-04-23 18:04     ` Pavel Machek [this message]
2003-04-15 17:36 Carl-Daniel Hailfinger

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=20030423180409.GC7131@zaurus.ucw.cz \
    --to=pavel@suse.cz \
    --cc=arnd@arndb.de \
    --cc=c-d.hailfinger.kernel.2003@gmx.net \
    --cc=linux-kernel@vger.kernel.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