From patchwork Sat Nov 4 09:16:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "wuqiang.matt" X-Patchwork-Id: 16250 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp1546793vqu; Sat, 4 Nov 2023 02:18:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEy0iV91YnoOSMgVcqtZ361G7HwPbehDSnqVQzKS8dgaA0U6jb/4LZYYAhziuFxEi4vf/SK X-Received: by 2002:a17:903:2450:b0:1cc:5425:bb4 with SMTP id l16-20020a170903245000b001cc54250bb4mr19764714pls.52.1699089487416; Sat, 04 Nov 2023 02:18:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699089487; cv=none; d=google.com; s=arc-20160816; b=LByHJSz44y1/Vd7DPfzXmO27pZRzIoeoqefq0w3Xi/oeJI1GxatuzYHsKOZGTA+60E QaJS1r2j3PYTaACpM/V+EMwDzOwmyGHYDbOuAtx/VV+3zL6mwYmoNYForteOvjhvzS96 SwkydJozLJE2kEzrbyC03FRH3OXjpFAC9JRpugaqGr5/0Xy/FenU1UIdcoYkBEQySzhx 2R+DtrVeBIzof4Zgh/A6S3JQ8CrBzC0FoxCWkLpuct5SMMFEmQCVtko2osy+dL0F35yF kY4ylfOgcmWkvjRzg/LjrZTYmk2Lsi4sAlm4ABUcKJzE0FDaJXKJ8CH7sdAtgU3I2X+H bNpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=SLNQXwvsmuV3fVIiwVg4eaHyhonWOyCC10q8MYVA8E8=; fh=5cdAk/4eKFcH/8WtTZO0ubPFYqkVoBxeWOjASEhKlHQ=; b=zEDNrb0V2FfEYze59DxonjElYuwPb08caE7kkkeAnvQGAGLYPZgRXS9F/K7aFp2+dK VEhlS/Z3wa1LJwY/YEKBASO8kv4WzB+bUUiBMFYOVsZD/GiTAmTrF61XLYsjILCdlQ9M 2ye9MlaAIF48t4+tup9JuJXfns+fu3r1MU4sHzq5v+4/GyfsSUy197HElYhZv/V+J7hC jaP6HfT70Gxj1+gmTqE/0nraIRo/UwcfnzU515zxSXHv8iYbW0haULsf+Lu38+VewlOn H0A+BapX8PUSxzTYgtucXww4zD49oMRNm8eGJ/GZKBW4d/rHzKuB853FRISoq1hW53fw jm8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=MtMgam8o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id i10-20020a170902c94a00b001b81a112f9bsi3580890pla.586.2023.11.04.02.18.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Nov 2023 02:18:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=MtMgam8o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A947E807799F; Sat, 4 Nov 2023 02:17:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231564AbjKDJQ7 (ORCPT + 35 others); Sat, 4 Nov 2023 05:16:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229612AbjKDJQw (ORCPT ); Sat, 4 Nov 2023 05:16:52 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 152AF1BF for ; Sat, 4 Nov 2023 02:16:28 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1cc5b705769so25607095ad.0 for ; Sat, 04 Nov 2023 02:16:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1699089387; x=1699694187; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=SLNQXwvsmuV3fVIiwVg4eaHyhonWOyCC10q8MYVA8E8=; b=MtMgam8o+3y23wLubmu2Met3dmmSp5k1T27AY9yRvH6jq1d3c8n4pwEixLB5n8dvUb 8RIvBiEopV8pdyatqcjHSDOzDEY4LleRDBBs3j4aG3rz3/PJNlIJ3QX9twdwSEs6tjpL 9JAC7UeVje7kw+KwhWC+E0aeg+I+uLajEH3XZgvOHRJMZVQm69oUdDkuxj07qNRDgcdU Gda7zCT9dbtxOQNj5suysj4Cr6n17vAY3uR7SpFTotFjFgLWD9UEM+aWIwm7wP94M/0j tRhbVQw7bmzy1GtL76RMW8tcAFvMJ9InMVbRX9C7TgF+TIqPjM2HNRx1m0yzo9h+3yET JUGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699089387; x=1699694187; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SLNQXwvsmuV3fVIiwVg4eaHyhonWOyCC10q8MYVA8E8=; b=g6t2dBXJXYKHNjXAidqslFjieiBPkEyL2wAxmwMyLyv/4vrA18uTKRU0FVlBt8MRBV uPeEq2ycwjDijwV3lqP3T4wdddUV0s7fTc561v4w51Gf3EH3P2B6z10fgjhtucaiRMZ/ nzr9Jwy3d7VabqgtFDU3EcSEIrS3cF3ghOAsKJqXbjy0qC20ee+5Oah6QFA8hVUU8+SF 892R/Mhdqasn6OOCIpIHZ6L3eryxQXbN0MxPSdhjwzszFZSujjxCunndQjjn+ufGFq3w tOivr144wDf4oSOArpdY6HZuHQFUs+FRiR5QFNPYzoOzIF8PstQE/CtbVQBSRRPPPhic QWfA== X-Gm-Message-State: AOJu0Yw8HZKdSM4amRwmOfEm0H1N7bcaEG+o1+/N49VYskgAdi/6gc3E XWy717GzoI1Wt1xDsGyZsaNRwA== X-Received: by 2002:a17:902:f213:b0:1bc:6c8:cded with SMTP id m19-20020a170902f21300b001bc06c8cdedmr22211228plc.67.1699089387534; Sat, 04 Nov 2023 02:16:27 -0700 (PDT) Received: from devz1.bytedance.net ([203.208.167.147]) by smtp.gmail.com with ESMTPSA id d4-20020a170903230400b001cc54202429sm2585127plh.288.2023.11.04.02.16.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Nov 2023 02:16:27 -0700 (PDT) From: "wuqiang.matt" To: vgupta@kernel.org, bcain@quicinc.com, jonas@southpole.se, stefan.kristiansson@saunalahti.fi, shorne@gmail.com, geert@linux-m68k.org, andi.shyti@linux.intel.com, mingo@kernel.org, palmer@rivosinc.com, andrzej.hajda@intel.com, arnd@arndb.de, peterz@infradead.orgm, mhiramat@kernel.org Cc: linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-openrisc@vger.kernel.org, linux-trace-kernel@vger.kernel.org, mattwu@163.com, linux@roeck-us.ne, "wuqiang.matt" Subject: [PATCH v2 0/4] locking/atomic: arch_cmpxchg[64]_local undefined Date: Sat, 4 Nov 2023 17:16:11 +0800 Message-Id: <20231104091615.4884-1-wuqiang.matt@bytedance.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,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: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 04 Nov 2023 02:17:07 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781624458599754774 X-GMAIL-MSGID: 1781624458599754774 This patch series implement arch_cmpxchg[64]_local for arc, openrisc and hexagon. For architectures that support native cmpxchg, we'd like to implement arch_cmpxchg[64]_local with the native variants of supported data size. If not, the generci_cmpxchg[64]_local will be used. wuqiang.matt (4): locking/atomic: arc: data size checking in arch_cmpxchg locking/atomic: arc: arch_cmpxchg[64]_local undefined locking/atomic: openrisc: arch_cmpxchg[64]_local undefined locking/atomic: hexagon: arch_cmpxchg[64]_local undefined arch/arc/include/asm/cmpxchg.h | 40 ++++++++++++++++++---- arch/hexagon/include/asm/cmpxchg.h | 51 ++++++++++++++++++++++++++++- arch/openrisc/include/asm/cmpxchg.h | 6 ++++ 3 files changed, 90 insertions(+), 7 deletions(-)