From patchwork Thu Apr 13 11:38:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 82924 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp965408vqo; Thu, 13 Apr 2023 04:39:11 -0700 (PDT) X-Google-Smtp-Source: AKy350ZsoyT8j0UEsRgXZHAk4FeEwJUcqNz19dLGl976wMIwkHiKDl5pFSM1hXumuJ4xfS+lpNaS X-Received: by 2002:a05:6a00:1914:b0:63b:4313:f8ab with SMTP id y20-20020a056a00191400b0063b4313f8abmr2697934pfi.0.1681385951342; Thu, 13 Apr 2023 04:39:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681385951; cv=none; d=google.com; s=arc-20160816; b=AvLpGpnOA2yfu+qjt0AJ5uTHXlZmEkFDwejmkwKApl/t1xw2HgICQ240+geZfV7VDi YuVlANuEFEaonR7HWHa/1PxZxZx2Ra9Omh7TRJx+AP79aelnKNIepuRqiHU+R914wrQJ Kfihei4tPo9KJq2DVXubC12zsK7I9zRrtubu0LVJ2NXiRDcaDKsVk/RtdF9SmavBshTy YfSCDl1ymdhGxYlQl9QqpHwXRbrBhEET0nl4If1Qv8xc0EAZVl7WEmXghOKMGeqiVCzR jPOMTb2iHpt4XUOh+KVLkAOwB1Ww0gswuPUrB0r/AYFEV7+/ncqcjuw8qLfWaRP2jXqA n8pg== 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=Ar4P6FOes/2YqnqLR0lx/fCeGnBoUm/0XcPCZjCuPDI=; b=xYakAIqXQ/n8mCRWKLauYmeQVNEJP7czy3pG7J4+yzoYpJNo7uyWlEaBFsZqGQhmLK NAeCRZ6nfD2XxBGKI81DsZR6KNdzHlg2OSebl04XlvAGEF53vnRHeMVsePyZceHQYOnS X7pt7yeIrBh3m3ZXY/2nBQCpgGXhiw0jNVmxCYDMS4wkl81or17oSz7BjoIKbqM8vwlT 17njM68IK/W/d63+WiSjqQ2YC0hiR+vfZSgUj84mIkFcwArYq7MnqdArEnNfxSwBAbMk ttK3tcVLkyKY8XCq5HbIY5pQGKHv+r5Ncwxpp2uAaxjJx1LOC2jaMsYSYqRa2UMEbiVZ /Zog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=X2BwM+WY; dkim=neutral (no key) header.i=@linutronix.de; 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 b66-20020a62cf45000000b0062804ba6fb4si1609418pfg.58.2023.04.13.04.38.59; Thu, 13 Apr 2023 04:39:11 -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=X2BwM+WY; dkim=neutral (no key) header.i=@linutronix.de; 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 S229939AbjDMLig (ORCPT + 99 others); Thu, 13 Apr 2023 07:38:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229578AbjDMLie (ORCPT ); Thu, 13 Apr 2023 07:38:34 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50CEF26BA; Thu, 13 Apr 2023 04:38:33 -0700 (PDT) Date: Thu, 13 Apr 2023 11:38:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1681385910; 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=Ar4P6FOes/2YqnqLR0lx/fCeGnBoUm/0XcPCZjCuPDI=; b=X2BwM+WYYjCLXeQhRGcKuv25IH9qr8T2hmdJtA5KgXfFpgUAQghyxvFrNxZZeqmIiK5dl7 ji8RmGmNjmYytUpbbQTdlQgtRCFxafq91tSv+xYkXdG3qrelqIk3pKl7VCjfuQgJly5RJN /gL38NwXAheptmPtC6T+xDzJ2Q0o3dvHX83z9V7xeMP7AIWuOtYfbBTDBaEHnEGziOkvUA SW6AUPzCZoda5hFZCyA/NPIqWvlT5DNcQqueff23BJf++S1Od2UC4plNh6NKVoqq5vBY5C /46sL6NpPPQQi7NDN28wzEhpp1xp/LkGg1bj59cYOeaFoiRRzy3HgP/qVvNnWA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1681385910; 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=Ar4P6FOes/2YqnqLR0lx/fCeGnBoUm/0XcPCZjCuPDI=; b=tNFuxR8m1Gheh3StghczXrgNQnGDsUyt3qNGkkDWQe9b2CGMhLyp5Vzt96hGX5f8lR1icY ZyFcv5+rhn9VMnCQ== From: "tip-bot2 for Uros Bizjak" 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 , "Peter Zijlstra (Intel)" , 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: <168138590988.404.12145354091229728137.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails 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,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762346469287822276?= X-GMAIL-MSGID: =?utf-8?q?1763060955301918478?= The following commit has been merged into the locking/core branch of tip: Commit-ID: 561b081f19655a46a9690e868fa4aa516ff1b62c Gitweb: https://git.kernel.org/tip/561b081f19655a46a9690e868fa4aa516ff1b62c Author: Uros Bizjak AuthorDate: Wed, 05 Apr 2023 16:17:09 +02:00 Committer: Peter Zijlstra CommitterDate: Wed, 12 Apr 2023 16:46:35 +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 Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20230405141710.3551-5-ubizjak@gmail.com --- 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".