All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Leonard <talex5@gmail.com>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>,
	Thomas Leonard <talex5@gmail.com>,
	xen-devel@lists.xenproject.org,
	David Scott <Dave.Scott@eu.citrix.com>,
	Anil Madhavapeddy <anil@recoil.org>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Karim Allah Ahmed <karim.allah.ahmed@gmail.com>
Subject: Re: [PATCH ARM v3 7/7] mini-os: initial ARM support
Date: Wed, 18 Jun 2014 08:55:45 +0100	[thread overview]
Message-ID: <CAG4opy_K8h-N4nxwtwm5eFGsA_vFuhjq1ShpSrc0XhPDrcfpEQ@mail.gmail.com> (raw)
In-Reply-To: <20140617225321.GV5775@type.youpi.perso.aquilenet.fr>

On 17 June 2014 23:53, Samuel Thibault <samuel.thibault@ens-lyon.org> wrote:
> Thomas Leonard, le Tue 17 Jun 2014 14:47:16 +0100, a écrit :
>> I'm not sure what the difference between the synch and non-synch
>> versions is supposed to be. Currently, I'm just doing:
>
> The synch version provides memory barriers (and can thus be used for
> synchronization of other things). The non-synch version only provides
> atomicity.

OK, so does that mean that e.g. this comment in x86/os.h is wrong?

/**
 * test_and_clear_bit - Clear a bit and return its old value
 * @nr: Bit to clear
 * @addr: Address to count from
 *
 * This operation is atomic and cannot be reordered.
 * It also implies a memory barrier.
 */

>> I used __ATOMIC_SEQ_CST as the memory model as that was the safest
>> option, but maybe it's overkill.
>
> The synch_ versions provide a full memory barrier, so seq consistency is
> fine. The non-synch versions can use a completely relaxed memory model.
>
>> The main user of these operations was gic.c, but it turns out that the
>> atomic versions don't work here as the GIC registers aren't regular
>> memory. So I replaced those with non-atomic versions.
>>
>> Does this seem reasonable?
>
> I guess there are other ways to make sure no two threads are accessing
> GIC registers, so it is fine, yes.
>
> Samuel



-- 
Dr Thomas Leonard        http://0install.net/
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2014-06-18  7:55 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-11 10:30 [PATCH ARM v3 0/7] mini-os: initial ARM support Thomas Leonard
2014-06-11 10:30 ` [PATCH ARM v3 1/7] mini-os: build fixes Thomas Leonard
2014-06-11 19:02   ` Samuel Thibault
2014-06-11 10:30 ` [PATCH ARM v3 2/7] mini-os: fixed shutdown thread Thomas Leonard
2014-06-12  9:52   ` Ian Campbell
2014-06-12  9:54     ` Samuel Thibault
2014-06-16 12:48       ` Thomas Leonard
2014-06-16 12:55         ` Ian Campbell
2014-06-11 10:30 ` [PATCH ARM v3 3/7] mini-os: tidied up code Thomas Leonard
2014-06-11 10:30 ` [PATCH ARM v3 4/7] mini-os: moved events code under arch Thomas Leonard
2014-06-11 19:04   ` Samuel Thibault
2014-06-11 10:30 ` [PATCH ARM v3 5/7] mini-os: switched initial C entry point to arch_init Thomas Leonard
2014-06-11 19:09   ` Samuel Thibault
2014-06-11 10:30 ` [PATCH ARM v3 6/7] mini-os: don't include queue.h if there's no libc Thomas Leonard
2014-06-11 19:10   ` Samuel Thibault
2014-06-11 10:30 ` [PATCH ARM v3 7/7] mini-os: initial ARM support Thomas Leonard
2014-06-11 19:24   ` Samuel Thibault
2014-06-12  7:41     ` Ian Campbell
2014-06-12  7:44       ` Samuel Thibault
2014-06-12  7:53         ` Ian Campbell
2014-06-17 13:47     ` Thomas Leonard
2014-06-17 22:53       ` Samuel Thibault
2014-06-18  7:55         ` Thomas Leonard [this message]
2014-06-18  8:21           ` Samuel Thibault
2014-06-12 10:31 ` [PATCH ARM v3 0/7] " Ian Campbell

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=CAG4opy_K8h-N4nxwtwm5eFGsA_vFuhjq1ShpSrc0XhPDrcfpEQ@mail.gmail.com \
    --to=talex5@gmail.com \
    --cc=Dave.Scott@eu.citrix.com \
    --cc=anil@recoil.org \
    --cc=karim.allah.ahmed@gmail.com \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.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.