All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mario Smarduch <mario.smarduch@huawei.com>
To: Ryan <ryanphilips19@googlemail.com>
Cc: linux-newbie@vger.kernel.org
Subject: Re: A spinlock_irqsave question
Date: Mon, 29 Apr 2013 11:12:33 +0200	[thread overview]
Message-ID: <517E3981.5060103@huawei.com> (raw)
In-Reply-To: <CANMsd03Ea55cV5aoDP0jfA9_+wgW81omLjzvQLN+-w-hgNyzXQ@mail.gmail.com>

On 4/29/2013 10:30 AM, Ryan wrote:

> 
> 
> 
> spinlock_irqsave()  <== Disables the IRQ?
> 
>                             <== No IRQs (that means no KB
> interrupt,Interrupts from touch screen... etc..)
> 
> 
> 
> spinlock_irqrestore()
spin_lock_irqsave(lock,flags)/ affects the running
CPU, it does not disable any device IRQ. Device
interrupts may be taken by other CPUs. There is a whole
other set of calls that deal with individual IRQs.

> 
> 
> Is my understanding correct?
> So the "time spend between spinlock_irqsave and spinlock_restore
> should be very short?
> 
> For example there should not be something like this? Am i correct?
> 
> 
> spinlock_irqsave()
> 
> mdelay(1000);
> 
> 
> spinlock_irqrestore()

Yes, but much shorter then mdelay(1000)
> 
> 
> 
> 
> Also, what is meant by "spinlock_irqsave" disabled irq locally?

spin_lock_irqsave()disables interrupts on the CPU it's issued.




--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

  reply	other threads:[~2013-04-29  9:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-29  8:30 A spinlock_irqsave question Ryan
2013-04-29  9:12 ` Mario Smarduch [this message]
2013-04-29  9:21   ` Ryan
2013-04-30  8:54     ` Mario Smarduch
2013-05-03  6:45       ` Ryan

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=517E3981.5060103@huawei.com \
    --to=mario.smarduch@huawei.com \
    --cc=linux-newbie@vger.kernel.org \
    --cc=ryanphilips19@googlemail.com \
    /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.