From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="M/kuTVt8" Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28329D51 for ; Tue, 21 Nov 2023 06:24:38 -0800 (PST) Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-6c4d06b6ddaso4702017b3a.3 for ; Tue, 21 Nov 2023 06:24:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1700576677; x=1701181477; 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=rO5gvBC9Yj9Gj9iwFUnYV9+FlJPZ82+bI2tRklE6bkQ=; b=M/kuTVt87qu0ZVJhQdMlOZPBlWefKfiRPkds/vddzN4iL6j32QUXBT68wPQRj6qWuy 41gGIlSFf9+s0p8J+B+ZSNX+C+bBq66hdA9w71LyXK3/KFSMdXSI6FNZc35F3Vh9DvA7 J8JOOS2+GQE6CQkS92puHF/BaXzAcqCIfZD8aRimjqnw6Zy/SUHykh4b6t1KtVYvnAw5 3a6D3C7nh8z9qXxaWySLKMqqtFs+gQ1hVzdNnbDUL7odkMKyh65O03idtJrhAuW0uMHb +s+ndXS4XblI6bQ6g6e7XNxgSBKBa0gB4I+Tq2hd/TbVl2iaoDm0u0QM1EyQG/JW5lgC J5SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700576677; x=1701181477; 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=rO5gvBC9Yj9Gj9iwFUnYV9+FlJPZ82+bI2tRklE6bkQ=; b=l3BXuegF7+5Q+/MFhRxnQViqFigqLk3PTgSNEMr96ChsEbqvrFzrGbud1Jhk4485Tn W8LH6c4Z8CYvGcOwiidCkHtM5mNKgvjHNCBZqsAezIrnFTiMOgndRbpTvRlvcDhR71yN SOvFtWQzqWCctSd7t0FumB+BL2Y9LP3pT7Tii9ByfD5qIn/DgIfuZGVUSzuEV113vahL LMgk56SDWDdb47w/FszJf/5JVgiWOAAWuQxutIrf/RFX8FLAtq9a7uNYT6hAD+L49ABw 8loF6Xj5XqDFcLUuGnuu3t4TVwVb56IO9Db7lm+qBPdrfpqy7vEYMCFA/VFuRywGUAg1 RGEw== X-Gm-Message-State: AOJu0YxL33en7Y4almb800c1sUnRSKWerTqZkeXnE5tyMBcCkMKR6k5o EOn3yPAN0U53ivZArvWfoLRMrA== X-Google-Smtp-Source: AGHT+IGZ0cj3qTxHGElldELTLLVk70f7H8QJHy0DgUxvrRtGVlmmImJxGtalz8fEj5aiHrvaElF8fg== X-Received: by 2002:a05:6a20:1591:b0:18a:716d:4ac with SMTP id h17-20020a056a20159100b0018a716d04acmr6231274pzj.47.1700576677576; Tue, 21 Nov 2023 06:24:37 -0800 (PST) Received: from devz1.bytedance.net ([203.208.167.146]) by smtp.gmail.com with ESMTPSA id d13-20020a056a00244d00b0068842ebfd10sm7923193pfj.160.2023.11.21.06.24.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 06:24:36 -0800 (PST) From: "wuqiang.matt" To: ubizjak@gmail.com, mark.rutland@arm.com, vgupta@kernel.org, bcain@quicinc.com, jonas@southpole.se, stefan.kristiansson@saunalahti.fi, shorne@gmail.com, chris@zankel.net, jcmvbkbc@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.org, mhiramat@kernel.org Cc: linux-arch@vger.kernel.org, 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.net, "wuqiang.matt" Subject: [PATCH v3 0/5] arch,locking/atomic: add arch_cmpxchg[64]_local Date: Tue, 21 Nov 2023 22:23:42 +0800 Message-Id: <20231121142347.241356-1-wuqiang.matt@bytedance.com> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-arch@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Archtectures arc, openrisc and hexagon haven't arch_cmpxchg_local() defined, so the usecase of try_cmpxchg_local() in lib/objpool.c can not pass kernel building by the kernel test robot. Patch 1 improves the data size checking logic for arc; Patches 2/3/4 implement arch_cmpxchg[64]_local for arc/openrisc/hexagon. Patch 5 defines arch_cmpxchg_local as existing __cmpxchg_local rather the generic variant. wuqiang.matt (5): arch,locking/atomic: arc: arch_cmpxchg should check data size arch,locking/atomic: arc: add arch_cmpxchg[64]_local arch,locking/atomic: openrisc: add arch_cmpxchg[64]_local arch,locking/atomic: hexagon: add arch_cmpxchg[64]_local arch,locking/atomic: xtensa: define arch_cmpxchg_local as __cmpxchg_local arch/arc/include/asm/cmpxchg.h | 40 ++++++++++++++++++---- arch/hexagon/include/asm/cmpxchg.h | 51 ++++++++++++++++++++++++++++- arch/openrisc/include/asm/cmpxchg.h | 6 ++++ arch/xtensa/include/asm/cmpxchg.h | 2 +- 4 files changed, 91 insertions(+), 8 deletions(-) -- 2.40.1