From patchwork Thu Oct 10 02:35:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Gang X-Patchwork-Id: 3013801 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 84EB5BF924 for ; Thu, 10 Oct 2013 02:36:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B5655201ED for ; Thu, 10 Oct 2013 02:36:53 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 80A9420123 for ; Thu, 10 Oct 2013 02:36:52 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VU67N-0000UW-Le; Thu, 10 Oct 2013 02:36:49 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VU67L-0007m3-3P; Thu, 10 Oct 2013 02:36:47 +0000 Received: from intranet.asianux.com ([58.214.24.6]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VU67H-0007kj-By for linux-arm-kernel@lists.infradead.org; Thu, 10 Oct 2013 02:36:45 +0000 Received: by intranet.asianux.com (Postfix, from userid 103) id 6064B1840242; Thu, 10 Oct 2013 10:36:21 +0800 (CST) X-Spam-Score: -100.7 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from [10.1.100.108] (unknown [61.148.203.198]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by intranet.asianux.com (Postfix) with ESMTP id 98D4E1840242; Thu, 10 Oct 2013 10:36:20 +0800 (CST) Message-ID: <52561269.60900@asianux.com> Date: Thu, 10 Oct 2013 10:35:21 +0800 From: Chen Gang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Martin Schwidefsky , Heiko Carstens , Russell King - ARM Linux , Catalin Marinas , Will Deacon Subject: [PATCH 3/3] arm64: include: asm: atomic.h: use 'unsigned int' and 'atomic_t' instead of 'unsigned long' for atomic_clear_mask() References: <52561137.3070608@asianux.com> <5256117A.4000009@asianux.com> <5256121A.9030504@asianux.com> In-Reply-To: <5256121A.9030504@asianux.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131009_223643_799025_2F92B322 X-CRM114-Status: GOOD ( 11.61 ) X-Spam-Score: -2.1 (--) Cc: linux390@de.ibm.com, "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , linux-s390@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP In current kernel wide source, for arm64, only s390 scsi drivers use atomic_clear_mask(), now, s390 itself need use 'unsigned int' and 'atomic_t', so need match s390's atomic_clear_mask(). Signed-off-by: Chen Gang --- arch/arm64/include/asm/atomic.h | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/arm64/include/asm/atomic.h b/arch/arm64/include/asm/atomic.h index 8363644..58808fc 100644 --- a/arch/arm64/include/asm/atomic.h +++ b/arch/arm64/include/asm/atomic.h @@ -126,16 +126,17 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new) return oldval; } -static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr) +static inline void atomic_clear_mask(unsigned int mask, atomic_t *ptr) { - unsigned long tmp, tmp2; + unsigned int tmp; + unsigned long tmp2; asm volatile("// atomic_clear_mask\n" -"1: ldxr %0, %2\n" -" bic %0, %0, %3\n" -" stxr %w1, %0, %2\n" +"1: ldxr %w0, %2\n" +" bic %w0, %w0, %w3\n" +" stxr %w1, %w0, %2\n" " cbnz %w1, 1b" - : "=&r" (tmp), "=&r" (tmp2), "+Q" (*addr) + : "=&r" (tmp), "=&r" (tmp2), "+Q" (ptr->counter) : "Ir" (mask) : "cc"); }