From patchwork Wed May 22 13:22:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 164831 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp861350ili; Wed, 22 May 2019 06:25:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqwX3AFqJWRGyVQkTPXVesObkiEFuTDkQE6x3E1Xn6EVJgcN0Vore4xBrjsLoRzj+h1DSIwT X-Received: by 2002:aa7:9ac4:: with SMTP id x4mr95225487pfp.43.1558531528279; Wed, 22 May 2019 06:25:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558531528; cv=none; d=google.com; s=arc-20160816; b=pM5nfIdPcwc+Xi1scGgPrpTE3PW7HI6admbcmbBB5X9MbTwkMJfUToZoWj4DK0yxBf hzwPIJv+IMvfbbkFzRRGoo2fIu3BefmiHmKBvEeSC2Zy8h1bD9uwRk/Y+CN7Bia+R8vt gH1edy0sXoD+T5HgAfyzOl9FDQtJkmjpeJu1B3gkFHkqCb9yMxrzE3GYrOdtuC5odl5D DC/uJRygJxHHQaWYGEtXRvOrxMMT4uI4Rwr/1SYgptF8xZGWHQp/8kjDO/t3Yyzf+Zx4 8VISKD44TEAHR6ymIzPhq+RwHKgfR9Cyl/NUamIjCugg9U11FZBLmcMoQFCWHw/iW110 EU4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=su2zgVXuoYXMWLGdcZAx4SNQVb9mcpP2Rf9IgrEKRDw=; b=KQH8g5SXfbX1eMU4u99CRbmry6IqDcLTHCTAptoantRuz2Fy2UcHGOCoCqa/sZK4HS tQydx5dfPLPQD0etG56yEtSTXqMcT574vntEkxbIsOQ+TEwtg4lr5UqTnv8qvlcfIalK 6ykTCTWxfvrdkKmtVpLeSW9KUMsHRgq33pxc/LWQbA9hXITlbCqsAPD3Zh3SR/kBzC1t h/G4y8ddNaT9IwEWTbg9SN9VzQa8NfSCz8frcrmpgIRFQMRNENZgrumRVfigAM5oCWL8 LE8ZkYSkWxSmZAcKx3rPfLkV3Q5OjABQyxHKrJUQbh383NGSWfW+8a0H3VkA7zgpzoFs xYPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f191si24087456pgc.570.2019.05.22.06.25.26; Wed, 22 May 2019 06:25:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729433AbfEVNZZ (ORCPT + 14 others); Wed, 22 May 2019 09:25:25 -0400 Received: from foss.arm.com ([217.140.101.70]:51180 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729172AbfEVNZY (ORCPT ); Wed, 22 May 2019 09:25:24 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4D0AF15BF; Wed, 22 May 2019 06:25:24 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id F345D3F575; Wed, 22 May 2019 06:25:19 -0700 (PDT) From: Mark Rutland To: linux-kernel@vger.kernel.org, peterz@infradead.org, will.deacon@arm.com Cc: aou@eecs.berkeley.edu, arnd@arndb.de, bp@alien8.de, catalin.marinas@arm.com, davem@davemloft.net, fenghua.yu@intel.com, heiko.carstens@de.ibm.com, herbert@gondor.apana.org.au, ink@jurassic.park.msu.ru, jhogan@kernel.org, linux@armlinux.org.uk, mark.rutland@arm.com, mattst88@gmail.com, mingo@kernel.org, mpe@ellerman.id.au, palmer@sifive.com, paul.burton@mips.com, paulus@samba.org, ralf@linux-mips.org, rth@twiddle.net, stable@vger.kernel.org, tglx@linutronix.de, tony.luck@intel.com, vgupta@synopsys.com Subject: [PATCH 14/18] locking/atomic: sparc: use s64 for atomic64 Date: Wed, 22 May 2019 14:22:46 +0100 Message-Id: <20190522132250.26499-15-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190522132250.26499-1-mark.rutland@arm.com> References: <20190522132250.26499-1-mark.rutland@arm.com> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org As a step towards making the atomic64 API use consistent types treewide, let's have the sparc atomic64 implementation use s64 as the underlying type for atomic64_t, rather than long, matching the generated headers. As atomic64_read() depends on the generic defintion of atomic64_t, this still returns long. This will be converted in a subsequent patch. Otherwise, there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: David S. Miller Cc: Peter Zijlstra Cc: Will Deacon --- arch/sparc/include/asm/atomic_64.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.11.0 diff --git a/arch/sparc/include/asm/atomic_64.h b/arch/sparc/include/asm/atomic_64.h index 6963482c81d8..b60448397d4f 100644 --- a/arch/sparc/include/asm/atomic_64.h +++ b/arch/sparc/include/asm/atomic_64.h @@ -23,15 +23,15 @@ #define ATOMIC_OP(op) \ void atomic_##op(int, atomic_t *); \ -void atomic64_##op(long, atomic64_t *); +void atomic64_##op(s64, atomic64_t *); #define ATOMIC_OP_RETURN(op) \ int atomic_##op##_return(int, atomic_t *); \ -long atomic64_##op##_return(long, atomic64_t *); +s64 atomic64_##op##_return(s64, atomic64_t *); #define ATOMIC_FETCH_OP(op) \ int atomic_fetch_##op(int, atomic_t *); \ -long atomic64_fetch_##op(long, atomic64_t *); +s64 atomic64_fetch_##op(s64, atomic64_t *); #define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_OP_RETURN(op) ATOMIC_FETCH_OP(op) @@ -61,7 +61,7 @@ static inline int atomic_xchg(atomic_t *v, int new) ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n))) #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) -long atomic64_dec_if_positive(atomic64_t *v); +s64 atomic64_dec_if_positive(atomic64_t *v); #define atomic64_dec_if_positive atomic64_dec_if_positive #endif /* !(__ARCH_SPARC64_ATOMIC__) */