From patchwork Fri Jul 15 10:42:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corneliu ZUZU X-Patchwork-Id: 9231651 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9F47260865 for ; Fri, 15 Jul 2016 10:45:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 90B2C1FF15 for ; Fri, 15 Jul 2016 10:45:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8585628324; Fri, 15 Jul 2016 10:45:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0EB041FF15 for ; Fri, 15 Jul 2016 10:45:22 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bO0aL-0003Ae-Gb; Fri, 15 Jul 2016 10:43:09 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bO0aK-0003AI-2e for xen-devel@lists.xen.org; Fri, 15 Jul 2016 10:43:08 +0000 Received: from [85.158.137.68] by server-3.bemta-3.messagelabs.com id A9/77-31810-B3EB8875; Fri, 15 Jul 2016 10:43:07 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFIsWRWlGSWpSXmKPExsUSfTxjoa7Vvo5 wg++d+hZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8bfrYfYCibzVvy594q1gXEOdxcjJ4eQgIdE 55pOti5GLiB7LaNEY0sHK4RzklHiW/9TJpiqybNb2SESqxkl9u5bywiSYBPQljh36B5YkYiAt MS1z5fB4swCoRJT/z5gAbGFBbwkOqdMZQexWQRUJRo+rGUGsXkFXCVObfoOVM/BISEgJ7HgQj qIySngJvGsVwtiravE4uezwaZICORI3F25lB2iWkrif6sSyDUSAt0sEqc6HjJC1MhIPJp4k20 Co9ACRoZVjBrFqUVlqUW6hsZ6SUWZ6RkluYmZObqGBsZ6uanFxYnpqTmJScV6yfm5mxiBYcgA BDsYt233PMQoycGkJMq7MaUjXIgvKT+lMiOxOCO+qDQntfgQowwHh5IEr+VeoJxgUWp6akVaZ g4wImDSEhw8SiK8q0HSvMUFibnFmekQqVOMilLivK4gCQGQREZpHlwbLAovMcpKCfMyAh0ixF OQWpSbWYIq/4pRnINRSZjXFGQKT2ZeCdz0V0CLmYAWW5u3gywuSURISTUwuq0PjD1i/u/5M5l 35lLzI5Ucf32fz3I3keVCvduXvkW7XBe/FZfPEpxTou7z6JnDtV9tc0VYAq6Hrv/42e7UDfvf E0XX8j10+36kPvPFXAV3xp09Jf5ZW26EHJlYP1noxKvrXe9e9G2MWBf57KOUkMbym/frLy7OE tGQMpJ89v/srQcsZzQ/GSixFGckGmoxFxUnAgCpeGMyvQIAAA== X-Env-Sender: czuzu@bitdefender.com X-Msg-Ref: server-5.tower-31.messagelabs.com!1468579386!47629773!1 X-Originating-IP: [91.199.104.161] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.77; banners=-,-,- X-VirusChecked: Checked Received: (qmail 19869 invoked from network); 15 Jul 2016 10:43:06 -0000 Received: from mx01.bbu.dsd.mx.bitdefender.com (HELO mx01.bbu.dsd.mx.bitdefender.com) (91.199.104.161) by server-5.tower-31.messagelabs.com with DHE-RSA-AES128-GCM-SHA256 encrypted SMTP; 15 Jul 2016 10:43:06 -0000 Received: (qmail 23366 invoked from network); 15 Jul 2016 13:43:06 +0300 Received: from unknown (HELO mx-sr.buh.bitdefender.com) (10.17.80.103) by mx01.bbu.dsd.mx.bitdefender.com with AES256-GCM-SHA384 encrypted SMTP; 15 Jul 2016 13:43:06 +0300 Received: from smtp02.buh.bitdefender.net (unknown [10.17.80.76]) by mx-sr.buh.bitdefender.com (Postfix) with ESMTP id BAB8F7FC05 for ; Fri, 15 Jul 2016 13:43:01 +0300 (EEST) Received: (qmail 21258 invoked from network); 15 Jul 2016 13:43:01 +0300 Received: from unknown (HELO czuzu-dev-vm.clj.bitdefender.biz) (czuzu@bitdefender.com@91.199.104.243) by smtp02.buh.bitdefender.net with SMTP; 15 Jul 2016 13:43:01 +0300 From: Corneliu ZUZU To: xen-devel@lists.xen.org Date: Fri, 15 Jul 2016 13:42:48 +0300 Message-Id: <1468579368-19821-1-git-send-email-czuzu@bitdefender.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1468579290-19685-1-git-send-email-czuzu@bitdefender.com> References: <1468579290-19685-1-git-send-email-czuzu@bitdefender.com> X-BitDefender-Scanner: Clean, Agent: BitDefender qmail 3.1.6 on smtp02.buh.bitdefender.net, sigver: 7.66331 X-BitDefender-Spam: No (0) X-BitDefender-SpamStamp: Build: [Engines: 2.15.6.911, Dats: 426567, Stamp: 3], Multi: [Enabled, t: (0.000008, 0.002019)], BW: [Enabled, t: (0.000007,0.000001)], RBL DNSBL: [Disabled], APM: [Enabled, Score: 500, t: (0.002287), Flags: 85D2ED72; NN_NO_CONTENT_TYPE; NN_NO_LINK_NMD; NN_LEGIT_BITDEFENDER; NN_LEGIT_S_SQARE_BRACKETS; NN_LEGIT_MAILING_LIST_TO], SGN: [Enabled, t: (0.009524)], URL: [Enabled, t: (0.000005)], RTDA: [Enabled, t: (0.284741), Hit: No, Details: v2.3.10; Id: 2m1ghhc.1an6q9ac3.qfag], total: 0(775) X-BitDefender-CF-Stamp: none Cc: Julien Grall , Stefano Stabellini Subject: [Xen-devel] [PATCH v5 3/7] asm-arm/atomic.h: reorder macros to match x86-side X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Reorder macro definitions to match x86-side. Signed-off-by: Corneliu ZUZU Reviewed-by: Stefano Stabellini Acked-by: Julien Grall --- Changed since v4: --- xen/include/asm-arm/atomic.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/xen/include/asm-arm/atomic.h b/xen/include/asm-arm/atomic.h index 18cb2e1..a6e1b37 100644 --- a/xen/include/asm-arm/atomic.h +++ b/xen/include/asm-arm/atomic.h @@ -138,16 +138,15 @@ static inline void _atomic_set(atomic_t *v, int i) # error "unknown ARM variant" #endif -#define atomic_inc(v) atomic_add(1, v) -#define atomic_dec(v) atomic_sub(1, v) - -#define atomic_inc_and_test(v) (atomic_add_return(1, v) == 0) -#define atomic_dec_and_test(v) (atomic_sub_return(1, v) == 0) -#define atomic_inc_return(v) (atomic_add_return(1, v)) -#define atomic_dec_return(v) (atomic_sub_return(1, v)) -#define atomic_sub_and_test(i, v) (atomic_sub_return(i, v) == 0) - -#define atomic_add_negative(i,v) (atomic_add_return(i, v) < 0) +#define atomic_inc_return(v) (atomic_add_return(1, v)) +#define atomic_dec_return(v) (atomic_sub_return(1, v)) + +#define atomic_sub_and_test(i, v) (atomic_sub_return(i, v) == 0) +#define atomic_inc(v) atomic_add(1, v) +#define atomic_inc_and_test(v) (atomic_add_return(1, v) == 0) +#define atomic_dec(v) atomic_sub(1, v) +#define atomic_dec_and_test(v) (atomic_sub_return(1, v) == 0) +#define atomic_add_negative(i,v) (atomic_add_return(i, v) < 0) #define atomic_xchg(v, new) (xchg(&((v)->counter), new))