linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [question] Can the execution of the atomtic operation instruction pair lwarx/stwcx be interrrupted by local HW interruptions?
@ 2013-12-28  5:41 Gavin Hu
  2013-12-30  1:54 ` wyang
  0 siblings, 1 reply; 12+ messages in thread
From: Gavin Hu @ 2013-12-28  5:41 UTC (permalink / raw)
  To: Linuxppc-dev

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

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.

 Thanks a lot!

"1:    lwarx    %0,0,%2        # atomic_inc\n\
    addic    %0,%0,1\n"
"    stwcx.    %0,0,%2 \n\


BR
Gavin. Hu

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-01-07  8:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).