From patchwork Sat Nov 4 10:58:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "wuqiang.matt" X-Patchwork-Id: 161560 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp1579742vqu; Sat, 4 Nov 2023 03:58:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFyYE/AC5uMvA2sg3xf8q4E/qoPFgxIrvMHz13iXeu5fj5kJLJl/Hw4z6+02inE2rr4mdYZ X-Received: by 2002:a0d:ddcc:0:b0:5a7:b8de:390d with SMTP id g195-20020a0dddcc000000b005a7b8de390dmr5282750ywe.13.1699095530082; Sat, 04 Nov 2023 03:58:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699095530; cv=none; d=google.com; s=arc-20160816; b=XMItidYDy38Lp5YjQVM7XpCxm64tCQEA87SH+0RV4kyHlhclYGtU333Mk971US131g ok9FQF1OG+HVoRzmsPxWMsNbXB6i5uhIqv9XALwB2DCUIHLFimqSBV3sn66BH97rLeb9 uPaSDmb+sjX+MJwbECpWwOKkYg+kwcU5mWwJahp+xKTiVj+aaxb8gKpDBk0o04T2Awas gAdmFOmU9sUpULmjJWta2SeVepTc+e9H4VurSjXkB0ZgYT30GwbUwY80mOvtq1iSYtlk IPvvpDjiqjyVYLgr5jUYLZ38Y7JWL3lEl1znreYJZwPYbeld5qCtsJWmGoBn6UZ1Uo9A I8rQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QIpIp4e2K8Nc4AhNSaTNAZwdwE2Uw0hQHoQ7glzurrs=; fh=FYVXyQVd3GS9wfvSpCHOLk4S0iPtnYDd1t+8uNJ+Wk8=; b=YLtnts9HoO2IG7B0MLGQcwmbEdAaceORP4UlY8NPCo1CeRK9p5nQ9m2uNkjO/LdVwD +Rq9w3EEAdPZQkue20RzHGFLc+eGxk6Zn1fMlWpcQkJM67TnujAI8VYTtpDkQDnO4/qb nXNUfvjRopglNwLWNokGCxkL3E+1n5EIJsKcLTm/vJPiThGNr3gqDNXOUwgnMXjnpqyL +LT3bQo19NHN3MgRcvYoBtbCKKDEb/971GYHQhUPrRwAt3UQlEl3YqQI3CDw2LqWMs1/ WDFBtxiUAFXSMpQKIueHPGFLx0Q6F26tRHeVnlv/neX2mfyfxOycmqfTrFVRZG5tNxfM elpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=ftUo43wd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id bm23-20020a656e97000000b00564929df8besi3816314pgb.568.2023.11.04.03.58.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Nov 2023 03:58:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=ftUo43wd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 01992801B6E8; Sat, 4 Nov 2023 03:58:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231824AbjKDK6n (ORCPT + 35 others); Sat, 4 Nov 2023 06:58:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbjKDK6m (ORCPT ); Sat, 4 Nov 2023 06:58:42 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4B2B19D for ; Sat, 4 Nov 2023 03:58:17 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id 98e67ed59e1d1-2809b4d648bso2536997a91.2 for ; Sat, 04 Nov 2023 03:58:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1699095497; x=1699700297; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QIpIp4e2K8Nc4AhNSaTNAZwdwE2Uw0hQHoQ7glzurrs=; b=ftUo43wd0o8JgjtYwNYropXd5csC0GB+KaVJHh1NSXyhrBEmlNho+KJBqgeGiJk7W0 13FvbS5VHhi4+qe2aQfCrAKMlDaZzIqlQw1LjRjW21PjAdPB4TPsZ7iBgCujDTLeDldf 2yZu0R0BO8kTC5BRBULC1aKZZW+7g6arHgl+7DxCUZahApNnW8moJ3UV6RiaG2QZxeW2 6zByVlipGUbNTa3Z+iaObEIjTbcwHPPEbfJUM8ebHuUdt8EsxBygYxisky93omneMem8 XZwePe/Y6ziGuVEHauhpdmnY4oqt9+JekD9kFpiw15OdQdooGPE6SSJ46FkYLyh9zX+u /HrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699095497; x=1699700297; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QIpIp4e2K8Nc4AhNSaTNAZwdwE2Uw0hQHoQ7glzurrs=; b=pfKxok8YwqSJeqH/UwyGmOyEkcw8BO69WGcWsJb5oR44l4AwKX7RTRW3oH5CBReEOY 1uolyrlkDZloTddmTwDRsfASt+HlzcnFP4OIARwdRArrkz0CPA/tNbV3xCWJnutau2n+ 2lHUSH9y1aJwxCawZvzA0L0xYKKEKvOHWe6+EG1Zw0P/HWPM0/vwaH462JiU6ten4iO4 ZIijPfdjJduNd8nY9RkPesFKjJzN22yYn3bPbxzXvBYgmlwcVQQGVVNutwGQH9/ept4L 5PMVDxvjWwAsqW0vkSQsNVS7p849D+LLy85fRvwoFSX+xj8Iq0VLuDaN7ixzsa+wf8jE YPlw== X-Gm-Message-State: AOJu0YzRG+scmTMykWstE+ew2o0BQV//Y2mNjMnOTmBnfs3KZIU4SdJy fog1M9pgpZgcAoErhC/j7l/rRw== X-Received: by 2002:a17:90b:1bc5:b0:27d:a14c:eba6 with SMTP id oa5-20020a17090b1bc500b0027da14ceba6mr3619065pjb.21.1699095497147; Sat, 04 Nov 2023 03:58:17 -0700 (PDT) Received: from devz1.bytedance.net ([203.208.167.147]) by smtp.gmail.com with ESMTPSA id ge13-20020a17090b0e0d00b0026801e06ac1sm2675636pjb.30.2023.11.04.03.58.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Nov 2023 03:58:16 -0700 (PDT) From: "wuqiang.matt" To: jcmvbkbc@gmail.com Cc: andi.shyti@linux.intel.com, andrzej.hajda@intel.com, chris@zankel.net, geert@linux-m68k.org, linux-kernel@vger.kernel.org, mattwu@163.com, palmer@rivosinc.com, wuqiang.matt@bytedance.com Subject: [PATCH v2] locking/atomic: xtensa: define arch_cmpxchg_local as __cmpxchg_local Date: Sat, 4 Nov 2023 18:58:01 +0800 Message-Id: <20231104105801.12320-1-wuqiang.matt@bytedance.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Sat, 04 Nov 2023 03:58:48 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781623759723820097 X-GMAIL-MSGID: 1781630794801168320 The xtensa architecture already has __cmpxchg_local defined, which makes arch_cmpxchg_local's definition as __generic_cmpxchg_local unreasonable. Signed-off-by: wuqiang.matt --- arch/xtensa/include/asm/cmpxchg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/xtensa/include/asm/cmpxchg.h b/arch/xtensa/include/asm/cmpxchg.h index 675a11ea8de7..956c9925df1c 100644 --- a/arch/xtensa/include/asm/cmpxchg.h +++ b/arch/xtensa/include/asm/cmpxchg.h @@ -108,7 +108,7 @@ static inline unsigned long __cmpxchg_local(volatile void *ptr, * them available. */ #define arch_cmpxchg_local(ptr, o, n) \ - ((__typeof__(*(ptr)))__generic_cmpxchg_local((ptr), (unsigned long)(o),\ + ((__typeof__(*(ptr)))__cmpxchg_local((ptr), (unsigned long)(o), \ (unsigned long)(n), sizeof(*(ptr)))) #define arch_cmpxchg64_local(ptr, o, n) __generic_cmpxchg64_local((ptr), (o), (n)) #define arch_cmpxchg64(ptr, o, n) arch_cmpxchg64_local((ptr), (o), (n))