linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: wyang <w90p710@gmail.com>
To: Gavin Hu <gavin.hu.2010@gmail.com>, Linuxppc-dev@lists.ozlabs.org
Subject: Re: [question] Can the execution of the atomtic operation instruction pair lwarx/stwcx be interrrupted by local HW interruptions?
Date: Mon, 30 Dec 2013 09:54:25 +0800	[thread overview]
Message-ID: <52C0D251.2000400@gmail.com> (raw)
In-Reply-To: <CABiPGEfmEFovARBy0rwjbDpBnVeRrmvQrxgnH+32z0RLUX3Nkw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1150 bytes --]

On 12/28/2013 01:41 PM, Gavin Hu wrote:
> Hi
>
> I notice that there is a pair ppc instructions lwarx and stwcx used to 
> atomtic operation for instance, atomic_inc/atomic_dec.
>
> In some ppc manuals, they more emphasize its mechanism is that lwarx 
> can reseve the target memory address preventing other CORE from 
> modifying it.
>
> I assume that there is atomtic operation executing on the CORE0 in a 
> multicore system. In this situation, does the CORE0 disable the local 
> HW interrupt?
> Can the executing process from the beginning of lwarx and end of stwcx 
> be interrupted by HW interruptions/exceptions? Anyway, they are two 
> assembly instructions.

It should just like other arch, the processor should response any 
interrupt after the execution of a instruction, so the local HW 
interrupt is not disabled.

Thanks
Wei
>
>  Thanks a lot!
>
> "1:    lwarx    %0,0,%2        # atomic_inc\n\
>     addic    %0,%0,1\n"
> "    stwcx.    %0,0,%2 \n\
>
>
> BR
> Gavin. Hu
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev


[-- Attachment #2: Type: text/html, Size: 2655 bytes --]

  reply	other threads:[~2013-12-30  1:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-28  5:41 [question] Can the execution of the atomtic operation instruction pair lwarx/stwcx be interrrupted by local HW interruptions? Gavin Hu
2013-12-30  1:54 ` wyang [this message]
2014-01-06  3:41   ` Gavin Hu
2014-01-06  5:27     ` wyang
2014-01-06  5:51       ` Gavin Hu
2014-01-06  6:24       ` Gavin Hu
2014-01-06  6:42         ` wyang
2014-01-06 22:05       ` Scott Wood
2014-01-07  1:00         ` wyang
2014-01-07  6:35           ` Scott Wood
2014-01-07  7:22             ` wyang
2014-01-07  8:01               ` Scott Wood

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=52C0D251.2000400@gmail.com \
    --to=w90p710@gmail.com \
    --cc=Linuxppc-dev@lists.ozlabs.org \
    --cc=gavin.hu.2010@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).