Message ID | 20221222114635.1251934-3-andrzej.hajda@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp277839wrn; Thu, 22 Dec 2022 03:50:00 -0800 (PST) X-Google-Smtp-Source: AMrXdXvUsGhIh1hPI+vq+g4oYbEQUBKJDhp8teLMAinqVqn+Iy2bbUFaJV7oWHfHnKE2Wjon5OmF X-Received: by 2002:a17:907:d302:b0:7c1:3472:5e75 with SMTP id vg2-20020a170907d30200b007c134725e75mr4717162ejc.29.1671709800485; Thu, 22 Dec 2022 03:50:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671709800; cv=none; d=google.com; s=arc-20160816; b=hUGEIQ0mBfMWvA+/7J9RnlUS6QK/YIfFj3XD2Sa1lTZK3/7DLv3qLeP1BwrTh6Cjf5 2k1kvgTso1bRkCdGMB6nnChrx4jOAorAYSBIgcY7KQiQ0EHL6DZc5cHl4+OF+pnARLAc X85PSMO8lFWuAIWmpFh8tkfoN46J++4HO1xfi66W3wjYmHBpkiYmccLzMVbfxwQl2p8L kcs8xOnr2OTa0m/vGEAWYzbnCehjLucEXIqBTz0xzeiTxbGAhXTmtsDQgaDgjor/k24f sVwetQ07ezu1JYgsAbC7JRVAamC13cU1m3s9R1Bj0OYDeIO2CdGq7ALbXQun4ww3VGA9 zy8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:organization :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hUYZDqT99OT/8tk20jUCX305kHPDTFmUh+WGphGRTOY=; b=METu09brnz12/0vvxcgOATNzgkQGF7K0ql3wZ3AhHdWVUZ9Wg/oLlkKLVeGJGfDkGK J9itlbsupZw3kLl8ELfj7zTgFdv/nA/iZW3r+wj5hVMytzXUOlFmdR1hIbB4GcwpAQPJ qBLh3UktWvIWW6txwdWtNB+dc6CURIX51VgfXUypSxtLk+WG9iZThpVjs5svxviVY8Fw E4XlgvIhzYRD5eGBe/+PihgdugvATTKT8q64iI7Z9NU483IHJOdR+KC3geVTycW1m6Gn lE9yYg0MBbHvVlbjPv/QOrfNLLfj5ViOVHMPMXYGLUPTWliStdJATpN6O+2UoVG1tCco CirA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="L/UNgQOY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ht10-20020a170907608a00b007c10a0c6f44si322784ejc.623.2022.12.22.03.49.37; Thu, 22 Dec 2022 03:50:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="L/UNgQOY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235635AbiLVLse (ORCPT <rfc822;pacteraone@gmail.com> + 99 others); Thu, 22 Dec 2022 06:48:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235557AbiLVLr6 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 22 Dec 2022 06:47:58 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6A182936D; Thu, 22 Dec 2022 03:47:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671709672; x=1703245672; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/UDTi8Vls0g/+nnPnB+HCzMyNgpTxrVUoGQF5kbhC34=; b=L/UNgQOY1hkOhED9qCOJYCMyjFWmp8LXn3SHYDDiDxAyy/mGRWM9hf3l 2ct3OUk8mIovo1OslQRnV7+8dK9u8A/jcHV2tqkDYrj0fg5FAeq4XTGwF +6cUDasfDV8mWxEmfvcMS0856EVHTMK3ePSNLin7/2aiLlbxVbapF17Tm QFjrNyxaTp3CYWX5Di+cCcR3LIWd4yJtW8NSKcqRd1dvRbDzAvwR3OgcU Zp+uemdcAnoghHGBrXqvDBgW47+E8DhrRi9PfIpgG1ls4NuWrgyyiyBv2 mk9Zjk8tBFmKIF3/xSTg2RPnRbQ8sZGf65nFU7HsTNx3zpNhVyVmM9jFG w==; X-IronPort-AV: E=McAfee;i="6500,9779,10568"; a="318804473" X-IronPort-AV: E=Sophos;i="5.96,265,1665471600"; d="scan'208";a="318804473" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2022 03:47:36 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10568"; a="629504368" X-IronPort-AV: E=Sophos;i="5.96,265,1665471600"; d="scan'208";a="629504368" Received: from lab-ah.igk.intel.com ([10.91.215.196]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2022 03:47:30 -0800 From: Andrzej Hajda <andrzej.hajda@intel.com> To: linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, openrisc@lists.librecores.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-xtensa@linux-xtensa.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: Andrzej Hajda <andrzej.hajda@intel.com>, Arnd Bergmann <arnd@arndb.de>, Rodrigo Vivi <rodrigo.vivi@intel.com>, Andrew Morton <akpm@linux-foundation.org>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Peter Zijlstra <peterz@infradead.org>, Boqun Feng <boqun.feng@gmail.com>, Mark Rutland <mark.rutland@arm.com> Subject: [PATCH 02/19] arch/arc: rename internal name __xchg to __arch_xchg Date: Thu, 22 Dec 2022 12:46:18 +0100 Message-Id: <20221222114635.1251934-3-andrzej.hajda@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221222114635.1251934-1-andrzej.hajda@intel.com> References: <20221222114635.1251934-1-andrzej.hajda@intel.com> MIME-Version: 1.0 Organization: Intel Technology Poland sp. z o.o. - ul. Slowackiego 173, 80-298 Gdansk - KRS 101882 - NIP 957-07-52-316 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752914776027715639?= X-GMAIL-MSGID: =?utf-8?q?1752914776027715639?= |
Series |
Introduce __xchg, non-atomic xchg
|
|
Commit Message
Andrzej Hajda
Dec. 22, 2022, 11:46 a.m. UTC
__xchg will be used for non-atomic xchg macro.
Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com>
---
arch/arc/include/asm/cmpxchg.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Thu, Dec 22, 2022, at 12:46, Andrzej Hajda wrote: > __xchg will be used for non-atomic xchg macro. > > Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com> > --- > arch/arc/include/asm/cmpxchg.h | 4 ++-- Reviewed-by: Arnd Bergmann <arnd@arndb.de> for all the arch/*/include/asm/cmpxchg.h changes. Since these patches are all the same, and they have identical subject and description texts, I would suggest combining them into a single patch to keep the series more compact. Having them separate would allow merging the patches through the individual architecture maintainer trees, but that in turn would mean waiting longer to get it all merged, but in this case it seems way easier to go through the asm-generic tree. Arnd
diff --git a/arch/arc/include/asm/cmpxchg.h b/arch/arc/include/asm/cmpxchg.h index c5b544a5fe8106..e138fde067dea5 100644 --- a/arch/arc/include/asm/cmpxchg.h +++ b/arch/arc/include/asm/cmpxchg.h @@ -85,7 +85,7 @@ */ #ifdef CONFIG_ARC_HAS_LLSC -#define __xchg(ptr, val) \ +#define __arch_xchg(ptr, val) \ ({ \ __asm__ __volatile__( \ " ex %0, [%1] \n" /* set new value */ \ @@ -102,7 +102,7 @@ \ switch(sizeof(*(_p_))) { \ case 4: \ - _val_ = __xchg(_p_, _val_); \ + _val_ = __arch_xchg(_p_, _val_); \ break; \ default: \ BUILD_BUG(); \