xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	Xen-devel <xen-devel@lists.xen.org>
Cc: Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH 4/4] xen/x86: Correct mandatory and SMP barrier definitions
Date: Mon, 5 Dec 2016 11:11:48 +0100	[thread overview]
Message-ID: <502dc6b9-aa57-4273-455f-4f567a5d90d6@suse.com> (raw)
In-Reply-To: <1480932317-22962-5-git-send-email-andrew.cooper3@citrix.com>

On 05/12/16 11:05, Andrew Cooper wrote:
> Barriers are a complicated topic, a common source of confusion in submitted
> code, and their incorrect use is a common cause of bugs.  It *really* doesn't
> help when Xen's API is the same as Linux, but its ABI different.
> 
> Bring the two back in line, so programmers stand a chance of actually getting
> their use correct.
> 
> As Xen has no current need for mandatory barriers, leave them commented out to
> avoid accidential misue.
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> CC: Jan Beulich <JBeulich@suse.com>
> ---
>  xen/include/asm-x86/system.h        | 31 +++++++++++++++++++++++--------
>  xen/include/asm-x86/x86_64/system.h |  3 ---
>  2 files changed, 23 insertions(+), 11 deletions(-)
> 
> diff --git a/xen/include/asm-x86/system.h b/xen/include/asm-x86/system.h
> index 9cb6fd7..9cd401a 100644
> --- a/xen/include/asm-x86/system.h
> +++ b/xen/include/asm-x86/system.h
> @@ -164,23 +164,38 @@ static always_inline unsigned long __xadd(
>      ((typeof(*(ptr)))__xadd(ptr, (typeof(*(ptr)))(v), sizeof(*(ptr))))
>  
>  /*
> + * Mandatory barriers, for the ordering of reads and writes with MMIO devices
> + * mapped with reduced cacheability.
> + *
> + * Xen has no such device drivers, and therefore no need for mandatory
> + * barriers.  These these are hidden to avoid their misuse; If a future need

Duplicate "these".


Juergen

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

  reply	other threads:[~2016-12-05 10:11 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-05 10:05 [PATCH 0/4] Fixes to common and x86 barriers Andrew Cooper
2016-12-05 10:05 ` [PATCH 1/4] xen/common: Replace incorrect mandatory barriers with SMP barriers Andrew Cooper
2016-12-05 10:55   ` Jan Beulich
2016-12-05 19:07   ` Stefano Stabellini
2016-12-05 10:05 ` [PATCH 2/4] xen/x86: Drop erronious barriers Andrew Cooper
2016-12-05 11:18   ` Jan Beulich
2016-12-05 11:25     ` Andrew Cooper
2016-12-05 12:28       ` Jan Beulich
2016-12-05 13:43         ` Andrew Cooper
2016-12-05 13:50           ` Jan Beulich
2016-12-05 13:59             ` Andrew Cooper
2016-12-05 14:07               ` Jan Beulich
2016-12-05 19:14                 ` Stefano Stabellini
2016-12-05 19:17   ` Stefano Stabellini
2016-12-06  0:10     ` Andrew Cooper
2016-12-06 20:27       ` Stefano Stabellini
2016-12-06 20:32         ` Stefano Stabellini
2016-12-07  1:03           ` Andrew Cooper
2016-12-07  1:20             ` Stefano Stabellini
2016-12-07  1:46               ` Andrew Cooper
2016-12-07 18:31           ` Julien Grall
2016-12-07 18:44             ` Stefano Stabellini
2016-12-07 18:55               ` Julien Grall
2016-12-05 10:05 ` [PATCH 3/4] xen/x86: Replace incorrect mandatory barriers with SMP barriers Andrew Cooper
2016-12-05 11:47   ` Jan Beulich
2016-12-05 13:29     ` Andrew Cooper
2016-12-05 14:03       ` Jan Beulich
2016-12-05 14:24         ` Andrew Cooper
2016-12-05 14:33           ` Jan Beulich
2016-12-05 10:05 ` [PATCH 4/4] xen/x86: Correct mandatory and SMP barrier definitions Andrew Cooper
2016-12-05 10:11   ` Juergen Gross [this message]
2016-12-05 13:45     ` Andrew Cooper
2016-12-05 11:51   ` Jan Beulich
2016-12-05 14:08     ` Andrew Cooper
2016-12-05 12:01   ` David Vrabel
2016-12-05 13:46     ` Andrew Cooper

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=502dc6b9-aa57-4273-455f-4f567a5d90d6@suse.com \
    --to=jgross@suse.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=xen-devel@lists.xen.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 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).