From patchwork Wed Oct 25 15:10:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Masami Hiramatsu (Google)" X-Patchwork-Id: 158157 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6359:6b8b:b0:164:83eb:24d7 with SMTP id ta11csp2725809rwb; Wed, 25 Oct 2023 08:10:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFXnTdTqAMnXo2OfIOrv5wgIvO+n0TS/mSAlQVqH20jzUajWL0SqNJPZ8A8IyJG0VwfGNUm X-Received: by 2002:a81:a051:0:b0:5a7:b96e:9693 with SMTP id x78-20020a81a051000000b005a7b96e9693mr14927768ywg.31.1698246631382; Wed, 25 Oct 2023 08:10:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698246631; cv=none; d=google.com; s=arc-20160816; b=rHT6eEia5ChVl3wUMwfzX7W7mzEU6Z1Iz29L4HewezOEMoeCV2dukIieIS7EJKkFPJ EaH/C+TgISTsoE/d69mQ7SFXC3hXSm/ct+f1UiGPfKixP4r4NEdMmzBdROoRtuXhqTFk vJS4W8Pajz5GaF7PUDwARYgCh58ubJMeQ2ii7VysyK1scu7oeAHdiPrQD6zWL32UEXAt 9VLZbHk20/xWuiotWbt3d2gYqr8UiDpXsd7azKJTy3qe8n1G8nTumOBka7NmhKwFByMQ ZlUpwn9uXtvq7KEdnj2WXnEF6ZUtfZS8GqWIRi0mAL+kNYwBqyyjNtsEo9O/mNTk03Oc Vf/Q== 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 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id j128-20020a0dc786000000b0058c5fee875esi10559783ywd.379.2023.10.25.08.10.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 08:10:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; 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 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 7B7BB812E02E; Wed, 25 Oct 2023 08:10:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232657AbjJYPKO (ORCPT + 26 others); Wed, 25 Oct 2023 11:10:14 -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 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 pete.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 (pete.vger.email [0.0.0.0]); Wed, 25 Oct 2023 08:10:27 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780648967370921238 X-GMAIL-MSGID: 1780740659750819464 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) Reviewed-by: Geert Uytterhoeven Reviewed-by: John Paul Adrian Glaubitz --- 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 */