Message ID | 168275268710.404.16959421973467678972.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1446479vqo; Sat, 29 Apr 2023 00:42:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ62GK+7SA92yFpKkkiI3C9AZL5qoPnF8OTLi4sWB10m1rXN3HIj2f6ld+7M2a2HE1XYTBw4 X-Received: by 2002:a05:6a20:4426:b0:f3:2d33:de79 with SMTP id ce38-20020a056a20442600b000f32d33de79mr9494826pzb.43.1682754169837; Sat, 29 Apr 2023 00:42:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682754169; cv=none; d=google.com; s=arc-20160816; b=uPbMRX7Zl2YPnuTb4XMjKbI6u5WXQCoByOFEHT08CKd+BLDUTkq9H3NUK9e94HQGAL cMXl2kc6ue78jw3936FHVmrgGxOKwYiqD3ZtdtlWehL1G2A6B0lfdyaPQQdnKclMG2S1 h5M5YehuVV38OOmiCYzMe657BAGcwbXvYhxR+vKOqlMm4YjwrZdv6KRyeOug7z+pyfhB ZO8GZeJImQi5lYH7IhXbFzDPObxFw/fOY2omNqImJOw/SqzJNj9ZGqAJKDLXKKZbfW8d i0BR322XbSAgIV8MimVIOAAnagfsxSu/19Y4//CNRUA6zh+eUyWkBh7OedrqP/PeoX1j Rwug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=DOzuSnTmxSim7dIvzyWlqGRd9comMl0rFJQ+W3TYF6c=; b=pDiPUBo4Q9pY0HVQpneEu5tLCuQrUony68u3IUeY7HvJiXZ+mvRNftESCE+VCin1Rb 7ZR5COJgzWDfR5hO6uaE2MijU0rqHjtPLFlDxU3JraiJsBA74PlsdRsNS+aaSpwOCfMn ehWddYNXXS54pEXg5eUeTvoG4Ats0srRhtfc2kpjFNc5Fdx4qQ4oi8OF1bQ8RzxswoGo e4TsN0rHQA6sl493qf04q2aChR07VevMlBo26nB1YZagBjyNCSmORP23O6HLmAgpysOj MskmoTvco0jyPWxl4/gM42K7uAR21MElXNfHuMG6MnbqnHfPvar6vA7x3PZlE8VlfpG7 oTfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=nA5wJmZe; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=sE3lkBWW; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bs9-20020a632809000000b00517f0c53076si22650034pgb.463.2023.04.29.00.42.35; Sat, 29 Apr 2023 00:42:49 -0700 (PDT) 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=@linutronix.de header.s=2020 header.b=nA5wJmZe; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=sE3lkBWW; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230394AbjD2HSM (ORCPT <rfc822;chrisjones.unixmen@gmail.com> + 99 others); Sat, 29 Apr 2023 03:18:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbjD2HSJ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 29 Apr 2023 03:18:09 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE4E01986; Sat, 29 Apr 2023 00:18:08 -0700 (PDT) Date: Sat, 29 Apr 2023 07:18:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1682752687; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DOzuSnTmxSim7dIvzyWlqGRd9comMl0rFJQ+W3TYF6c=; b=nA5wJmZe7BA+656vc7kwgAW3Lr83gzuK9BnN64sxJNUYUGruri5guG54il6r/nuL6vjw7I KsKXU7nhgLqfFj7Q5VgS/7pZqJFLHwbs48w8xI0PZ34xzZcechMSZrP/MUh+annWWc/iFo ak6YB6JANenVN6ndnRMUIItcjBWBaxc9qpUaz8kjbiSiCbI/OUgffuny4jRts56l1fm47b sutJwyj2UdJ0sLMHUuTy4NEbiZ81jbhi3lRIOxG8TLm691FA9sAR5ORubX+sWgmCecDCaQ Q90YhrSFvdYy7E3i+jCjWbgBbiqrhrywLZ1ubgxkMACGSpsIbKRpQd4QXxZB/w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1682752687; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DOzuSnTmxSim7dIvzyWlqGRd9comMl0rFJQ+W3TYF6c=; b=sE3lkBWWYmhnqEukVTnfLQ7ChsT5xCdomOdpGbUQft62fOIdnz9AGhJ4Qj1ZRWSuErDRZP YzLUzgf+HUAbLIAQ== From: "tip-bot2 for Uros Bizjak" <tip-bot2@linutronix.de> Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: locking/core] locking/x86: Define arch_try_cmpxchg_local() Cc: Uros Bizjak <ubizjak@gmail.com>, "Peter Zijlstra (Intel)" <peterz@infradead.org>, Ingo Molnar <mingo@kernel.org>, Linus Torvalds <torvalds@linux-foundation.org>, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230405141710.3551-5-ubizjak@gmail.com> References: <20230405141710.3551-5-ubizjak@gmail.com> MIME-Version: 1.0 Message-ID: <168275268710.404.16959421973467678972.tip-bot2@tip-bot2> Robot-ID: <tip-bot2@linutronix.de> Robot-Unsubscribe: Contact <mailto:tglx@linutronix.de> to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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?1764493328374407191?= X-GMAIL-MSGID: =?utf-8?q?1764495635913802732?= |
Series |
[tip:,locking/core] locking/x86: Define arch_try_cmpxchg_local()
|
|
Commit Message
tip-bot2 for Thomas Gleixner
April 29, 2023, 7:18 a.m. UTC
The following commit has been merged into the locking/core branch of tip: Commit-ID: 5cd4c268412f802e71b7722c3ec4638b0fe04acd Gitweb: https://git.kernel.org/tip/5cd4c268412f802e71b7722c3ec4638b0fe04acd Author: Uros Bizjak <ubizjak@gmail.com> AuthorDate: Wed, 05 Apr 2023 16:17:09 +02:00 Committer: Ingo Molnar <mingo@kernel.org> CommitterDate: Sat, 29 Apr 2023 09:09:23 +02:00 locking/x86: Define arch_try_cmpxchg_local() Define target specific arch_try_cmpxchg_local(). This definition overrides the generic arch_try_cmpxchg_local() fallback definition and enables target-specific implementation of try_cmpxchg_local(). Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20230405141710.3551-5-ubizjak@gmail.com Cc: Linus Torvalds <torvalds@linux-foundation.org> --- arch/x86/include/asm/cmpxchg.h | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/arch/x86/include/asm/cmpxchg.h b/arch/x86/include/asm/cmpxchg.h index 94fbe6a..540573f 100644 --- a/arch/x86/include/asm/cmpxchg.h +++ b/arch/x86/include/asm/cmpxchg.h @@ -221,9 +221,15 @@ extern void __add_wrong_size(void) #define __try_cmpxchg(ptr, pold, new, size) \ __raw_try_cmpxchg((ptr), (pold), (new), (size), LOCK_PREFIX) +#define __try_cmpxchg_local(ptr, pold, new, size) \ + __raw_try_cmpxchg((ptr), (pold), (new), (size), "") + #define arch_try_cmpxchg(ptr, pold, new) \ __try_cmpxchg((ptr), (pold), (new), sizeof(*(ptr))) +#define arch_try_cmpxchg_local(ptr, pold, new) \ + __try_cmpxchg_local((ptr), (pold), (new), sizeof(*(ptr))) + /* * xadd() adds "inc" to "*ptr" and atomically returns the previous * value of "*ptr".