All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] save_flags()/cli() replace with spin_lock_irq{save,
Date: Mon, 09 Oct 2006 18:00:24 +0000	[thread overview]
Message-ID: <20061009180024.GA28254@parisc-linux.org> (raw)
In-Reply-To: <1160400366.19143.251.camel@amol.verismonetworks.com>

On Mon, Oct 09, 2006 at 06:56:06PM +0530, Amol Lad wrote:
> In ARM, does spin_lock_irqsave() disables both IRQs and FIQs (fast
> interrupts) ?
> 
> If yes, then it is dangerous to replace save_flags()/cli() with
> spin_lock_irqsave() in drivers that are required in ARM based systems
> also. In ARM cli() diables IRQs and clf() disables FIQs. With this
> change we may unintentionally disable FIQs also when it's only required
> to disable IRQs

cli does:

static inline void __deprecated cli(void)
{
        local_irq_disable();
}

spin_lock_irq does:

#define _spin_lock_irq(lock)                    __LOCK_IRQ(lock)

#define __LOCK_IRQ(lock) \
  do { local_irq_disable(); __LOCK(lock); } while (0)

see?  exactly the same code.
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

      reply	other threads:[~2006-10-09 18:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-09 13:38 [KJ] save_flags()/cli() replace with spin_lock_irq{save,restore} Amol Lad
2006-10-09 18:00 ` Matthew Wilcox [this message]

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=20061009180024.GA28254@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=kernel-janitors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.