From patchwork Mon May 21 17:16:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10415971 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 696DE6032C for ; Mon, 21 May 2018 17:16:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59A622898F for ; Mon, 21 May 2018 17:16:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4E50928991; Mon, 21 May 2018 17:16:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B20362898F for ; Mon, 21 May 2018 17:16:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752872AbeEURQz (ORCPT ); Mon, 21 May 2018 13:16:55 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:8470 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752928AbeEURQy (ORCPT ); Mon, 21 May 2018 13:16:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1526923016; x=1558459016; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=RZATvMx5n7S8L+6GBtBK9TsF7TnmgryVYZLYV6X0DlI=; b=RHYKD7NMoJ3c9XLsEHSa2crYGOpZbaOO6yvpLgRRjbWY3hV2QpBMeqX3 FX61hmvplDwqjoxAzqHYFMUGY81ZDpTawSHR7q8S10W5oYpIlgt1HQ5Ao ctatJgtwMrb1X2vCAgTuuwxV0mDoN25nJMwbzlNqi5LN8HmTY+Go1tJOT grjO7vU7WSvUfwkpenma2Ii7o2dGq1FdjK8XymThDoLR3gUz6GOSHI3/Q HKfUHkkfoQGpg/K/6FsXtEzxB1wSsUWsxqTke2FEf1+9Bizmrk/dmY2oN v614r4inv5fzU/h2pBCVc3arLaGlb6P8TZinw48EJsUmnuHZLyUxjhsSJ w==; X-IronPort-AV: E=Sophos;i="5.49,426,1520870400"; d="scan'208";a="78841220" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 22 May 2018 01:16:54 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP; 21 May 2018 10:07:50 -0700 Received: from thinkpad-bart.sdcorp.global.sandisk.com ([10.111.70.1]) by uls-op-cesaip01.wdc.com with ESMTP; 21 May 2018 10:16:53 -0700 From: Bart Van Assche To: Jens Axboe Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Catalin Marinas , Will Deacon , Russell King Subject: [PATCH v12 1/2] ARM: cmpxchg64: Only define cmpxchg64() if not using the Thumb instruction set Date: Mon, 21 May 2018 10:16:51 -0700 Message-Id: <20180521171652.3021-2-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180521171652.3021-1-bart.vanassche@wdc.com> References: <20180521171652.3021-1-bart.vanassche@wdc.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since the implementation of cmpxchg64() uses instructions that are not Thumb instructions, only define cmpxchg64() if not building in Thumb mode. This patch allows the next patch in this series to check for cmpxchg64() support using #if defined(cmpxchg64). Signed-off-by: Bart Van Assche Cc: Catalin Marinas Cc: Will Deacon Cc: Russell King --- arch/arm/include/asm/cmpxchg.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/include/asm/cmpxchg.h b/arch/arm/include/asm/cmpxchg.h index 8b701f8e175c..41ab99bc04ca 100644 --- a/arch/arm/include/asm/cmpxchg.h +++ b/arch/arm/include/asm/cmpxchg.h @@ -141,7 +141,9 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size sizeof(*(ptr))); \ }) +#ifndef CONFIG_THUMB2_KERNEL #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) +#endif /* CONFIG_THUMB2_KERNEL */ #include @@ -241,6 +243,7 @@ static inline unsigned long __cmpxchg_local(volatile void *ptr, sizeof(*(ptr))); \ }) +#ifndef CONFIG_THUMB2_KERNEL static inline unsigned long long __cmpxchg64(unsigned long long *ptr, unsigned long long old, unsigned long long new) @@ -273,6 +276,7 @@ static inline unsigned long long __cmpxchg64(unsigned long long *ptr, }) #define cmpxchg64_local(ptr, o, n) cmpxchg64_relaxed((ptr), (o), (n)) +#endif /* CONFIG_THUMB2_KERNEL */ #endif /* __LINUX_ARM_ARCH__ >= 6 */