Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2632708rda; Wed, 25 Oct 2023 08:10:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGY3jaQ9R+UjdoLNqCZdUz4Cd+H9Hb8mpeVYLQcG3Si30dejg/Biu11Pt/RWKKAs/hPy0h4 X-Received: by 2002:a25:8209:0:b0:da0:46e5:a7e3 with SMTP id q9-20020a258209000000b00da046e5a7e3mr4725031ybk.20.1698246624022; Wed, 25 Oct 2023 08:10:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698246624; cv=none; d=google.com; s=arc-20160816; b=LX4WAKFYn0tK4kJ2uHNg3YTawMVgulr+I8AxYYbN1TM/ScC/2x4OK9bNAp/JHMt4uJ rr1nmGzQw1DvpzbsgWS+q+OO0ISgftrs5b2Gizq+F9zyXLMvtFoAKayOVGexd+DNP51X xAG1GRB54gDUuaaWJireBv3mwjVLZIEh19l/ANT2l1fYydGGb3pfHaS8+Vg0A+jpO6sg 3x7KssG6y9Rj06kzBd26oBkzWB2Z0DU1Ud0JvKjpZi2LnqxrLvTKLT/LYLsrkQmKOwA8 /l6OMLmUeni/Pf/Awtr293U4xD480zz0UqzekemWwdzYooty+rmZxEFkTqQJgkJ9jlqP CRig== 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 :user-agent:message-id:date:subject:cc:to:from:dkim-signature; bh=QTVdMcYT42OYROXs+SBDkBwrvvUyvDAX18aGeg/xfYU=; fh=d9VLrDBVjhptmGl/2/cpxYjZOqgMoeP9EMgkQkDPu8s=; b=bB0wx0Q/qbLF1d5eyyqr//DDm4zIHgTE7zfDHny7jeYjTcCzDpcqcroW4IIi0eXNXP IwSlPxu+HXw5ZMh83jPxq+PBVtPOZxFYBSbJqGykQsHQviKfsnS749GWWXyXe6n/Pvrp hbfklslXcxyC/N+2qsMyiBkXys+dl/0VUjf4MMvMdQWfIWi+ZASDdHp8JW9/oJS7ocNB pWcEn/L358KqhH15At5/yYAxhMqh94e7KBvePf5z+ixODcvjwqaMoTKpxOcidyzujs8o dS2uWmFEwU22US+4+qwyencWvhnpTaR9jJe5E1cIgz3+g1myVzQciaRdXPQY9l35R35f Xoew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gjGWXXpJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id k204-20020a2524d5000000b00d80de4202d8si10542300ybk.36.2023.10.25.08.10.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 08:10:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gjGWXXpJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 158DD81C178D; Wed, 25 Oct 2023 08:10:21 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344178AbjJYPKN (ORCPT + 99 others); Wed, 25 Oct 2023 11:10:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234948AbjJYPKM (ORCPT ); Wed, 25 Oct 2023 11:10:12 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D3E9137; Wed, 25 Oct 2023 08:10:11 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF730C433C8; Wed, 25 Oct 2023 15:10:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698246610; bh=5IYSi5+bv6T/9zvQT8Sr8Kgq7nbfEkg9R5LoZUk+XAU=; h=From:To:Cc:Subject:Date:From; b=gjGWXXpJ4opxVzp6XpAqBXTeF7mKMiSEJlrJqIFXaX5gcglzWSaH80LqX4kMqgSRx hCnsQOzvR0GeAEvadoWLZhEZXerhE1neV1XnVYBt5Hm0tP1vt057m9a52vfjKol2o8 vqfksNkgWpb4IJX5T59ovh0XfEdiw55MCRR2Fu5tU7YIH63seMYFD6RK/7NDW/oVaF 5bD7InamCessTl1Kv4Q9T15zoJhDEk5l5b5AFxKSK0Te71cBo4+3MrInyimoNOkL3K Mz2pl2MkddNq4nFowS+OpLNK5Ls6AXJHf8MwqZHCoim6YxobkZCVgBLpoBeTt57MTX 2fbK5niGJgO7A== From: "Masami Hiramatsu (Google)" To: Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , Geert Uytterhoeven Cc: "wuqiang . matt" , Mark Rutland , Peter Zijlstra , mhiramat@kernel.org, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Subject: [PATCH v2] locking/atomic: sh: Use generic_cmpxchg_local for arch_cmpxchg_local() Date: Thu, 26 Oct 2023 00:10:05 +0900 Message-Id: <169824660459.24340.14614817132696360531.stgit@devnote2> X-Mailer: git-send-email 2.34.1 User-Agent: StGit/0.19 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email 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 (fry.vger.email [0.0.0.0]); Wed, 25 Oct 2023 08:10:21 -0700 (PDT) From: Masami Hiramatsu (Google) Use __generic_cmpxchg_local() for arch_cmpxchg_local() implementation in SH architecture because it does not implement arch_cmpxchg_local(). Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202310241310.Ir5uukOG-lkp@intel.com/ Signed-off-by: Masami Hiramatsu (Google) --- arch/sh/include/asm/cmpxchg.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/sh/include/asm/cmpxchg.h b/arch/sh/include/asm/cmpxchg.h index 288f6f38d98f..5d617b3ef78f 100644 --- a/arch/sh/include/asm/cmpxchg.h +++ b/arch/sh/include/asm/cmpxchg.h @@ -71,4 +71,13 @@ static inline unsigned long __cmpxchg(volatile void * ptr, unsigned long old, (unsigned long)_n_, sizeof(*(ptr))); \ }) +#include + +#define arch_cmpxchg_local(ptr, o, n) ({ \ + (__typeof__(*ptr))__generic_cmpxchg_local((ptr), \ + (unsigned long)(o), \ + (unsigned long)(n), \ + sizeof(*(ptr))); \ +}) + #endif /* __ASM_SH_CMPXCHG_H */