From patchwork Mon Aug 15 21:08:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 110093 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D244BB6F18 for ; Tue, 16 Aug 2011 07:10:00 +1000 (EST) Received: from localhost ([::1]:49017 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qt4Pt-0004qX-Tw for incoming@patchwork.ozlabs.org; Mon, 15 Aug 2011 17:09:49 -0400 Received: from eggs.gnu.org ([140.186.70.92]:49308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qt4Ph-0004h8-HD for qemu-devel@nongnu.org; Mon, 15 Aug 2011 17:09:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qt4Pg-0000GG-KY for qemu-devel@nongnu.org; Mon, 15 Aug 2011 17:09:37 -0400 Received: from mail-pz0-f42.google.com ([209.85.210.42]:56686) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qt4Pg-0000G7-Bt for qemu-devel@nongnu.org; Mon, 15 Aug 2011 17:09:36 -0400 Received: by pzk37 with SMTP id 37so9398728pzk.29 for ; Mon, 15 Aug 2011 14:09:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; bh=SQ6YlTVUZpdlzUqhI/bDr0kH2NpBPtLbf1JlqbSDFUM=; b=UVDdUeGeDaXEq/w1mkKYW1QOyHxDqsUdufdAG4HyFzGHz4IvnCNKljby9E/p4Hmsd3 I32qxKxWOcXDwky2y1wXis6B61ZVY6LGGUO+rrkUbSWNn4pihAauKzVyspNjWCh2VO7G G2/UFSkpNDXKerAWrdcLeOeBQpU+HV/RepHpE= Received: by 10.142.164.2 with SMTP id m2mr2248889wfe.376.1313442575129; Mon, 15 Aug 2011 14:09:35 -0700 (PDT) Received: from localhost.localdomain ([216.123.155.199]) by mx.google.com with ESMTPS id i8sm1064587pbi.92.2011.08.15.14.09.33 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 15 Aug 2011 14:09:34 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 15 Aug 2011 14:08:28 -0700 Message-Id: <1313442520-12062-2-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1313442520-12062-1-git-send-email-pbonzini@redhat.com> References: <1313442520-12062-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.42 Subject: [Qemu-devel] [RFC PATCH 01/13] add smp_mb() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org We'll need a full memory barrier, and __sync_synchronize() is just too ugly to type. Signed-off-by: Paolo Bonzini --- qemu-barrier.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/qemu-barrier.h b/qemu-barrier.h index b77fce2..7bd5268 100644 --- a/qemu-barrier.h +++ b/qemu-barrier.h @@ -4,6 +4,8 @@ /* FIXME: arch dependant, x86 version */ #define smp_wmb() asm volatile("" ::: "memory") +#define smp_mb() __sync_synchronize() + /* Compiler barrier */ #define barrier() asm volatile("" ::: "memory")