Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4169065ybi; Mon, 3 Jun 2019 06:48:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqzdkiQCn11A6+C9jNI+UMjoh838HTZMipon3Wj2MO/FV+NUb8lXw1nFXTLqDELEoZeRcx8b X-Received: by 2002:a63:4d05:: with SMTP id a5mr20167849pgb.19.1559569715477; Mon, 03 Jun 2019 06:48:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559569715; cv=none; d=google.com; s=arc-20160816; b=dhZWU+ZJBlYjknvpT+ube+2ANxHiAYCQGEp0k5yHgAv9pHfPoVr4o5MPhlrDaVIr6c ynqDSYOZJsW8LlfXwj7zoyyK2US47Fs3HmbfrfXjzknVAPpkrTXU3MsULA+Jfb1R8+Xv f8l0ZXdV/ySiCY0gwAK5+pHmyY49iB/QKRfo0Hs2BDh448ypvLoz7qnNOPK9MlReKUiN 2HWxZYWR4kPA+zd4Zhxd0l87rqdS6mmnq7DXIwBTQJPsE7F4xFj9W2kMjwG73ee91Drn ed9T2mRTHb9VetCZQY1SO4s2vDw63FlTmT4fB1LGMoXB3KHN5PF4nSyZ1Ft+uO4UeIDd tZxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:dkim-signature:dkim-filter; bh=I6bucJmuOsEloEQTOfg2YM3pP8k+T5TGAAh3PxQmNPA=; b=NaCT31vR/y5vCMKoex5HiBDYwn8SdjbkMX22ggerruRM+jOv5i9FneZLM2ho1ccfKz DXRTT7kB9iIoX/DW24NNR7nRF9VaxUNmVzD2qLUbfi5qAss5FpQM2tEcsPC3HCqzH3lg /C8xp/hdaikC8GZaPNNuIodIOJ5O4dGXC9VkpqmnlvLEDfL+tfbLcw6ru+BFNQb6Nod/ SL1D3DX54XZTUqUSNkbquoEPzMyOZJUbckHRAS5Ll+bwEfrOvqveh5kS6gCeHrWcy0OQ K2y/3cMVuqKm4s9PLIxeGIub6RqYHuA/K23ANvydERHdq/sJL44OeUixcKcgOmxqH9np bN/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019051801 header.b=q+CTCZb5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p3si18417355plq.78.2019.06.03.06.48.19; Mon, 03 Jun 2019 06:48:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@zytor.com header.s=2019051801 header.b=q+CTCZb5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728488AbfFCNo6 (ORCPT + 99 others); Mon, 3 Jun 2019 09:44:58 -0400 Received: from terminus.zytor.com ([198.137.202.136]:48507 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727506AbfFCNo6 (ORCPT ); Mon, 3 Jun 2019 09:44:58 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x53DiiA2614049 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 3 Jun 2019 06:44:44 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x53DiiA2614049 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019051801; t=1559569485; bh=I6bucJmuOsEloEQTOfg2YM3pP8k+T5TGAAh3PxQmNPA=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=q+CTCZb5G2NVtfRk8+gfrdjuiahogZOdkQpStPNxuNpAb1dQIkIxP5EecV890/Jz2 zgH4FXVOvRGhy62WFsG325ZVVhLuNCnT9Jztzey3V6X6dkScjGM+zO4649Q9pY+I54 gTC5JY0wiv64OZc3QsaiLoUC1QXyrkpL8ursujLZinx235zB1bYCjqhQhXsQw2zDnT 68uEWx8jIdJBuvRT5nlI/Ux53lTAVTRxep6Yz+Eau/YXRdCG0Xop/fhVfpNyLTDKC1 0NW/ntCbUHPTwOJHrr0Gomw3dBpOqBMwmY8xiDO///GmlVnMLule62b/qdd3Z/jbTR Ml8yxV/U9K0Cg== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x53Dii3C614046; Mon, 3 Jun 2019 06:44:44 -0700 Date: Mon, 3 Jun 2019 06:44:44 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Mark Rutland Message-ID: Cc: tglx@linutronix.de, mark.rutland@arm.com, hpa@zytor.com, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@kernel.org, will.deacon@arm.com Reply-To: mark.rutland@arm.com, tglx@linutronix.de, torvalds@linux-foundation.org, hpa@zytor.com, mingo@kernel.org, linux-kernel@vger.kernel.org, peterz@infradead.org, will.deacon@arm.com In-Reply-To: <20190522132250.26499-17-mark.rutland@arm.com> References: <20190522132250.26499-17-mark.rutland@arm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:locking/core] locking/atomic: Use s64 for atomic64_t on 64-bit Git-Commit-ID: 3724921396dd1a07c93e3516b8d7c9ff570d17a9 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.4 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 3724921396dd1a07c93e3516b8d7c9ff570d17a9 Gitweb: https://git.kernel.org/tip/3724921396dd1a07c93e3516b8d7c9ff570d17a9 Author: Mark Rutland AuthorDate: Wed, 22 May 2019 14:22:48 +0100 Committer: Ingo Molnar CommitDate: Mon, 3 Jun 2019 12:32:57 +0200 locking/atomic: Use s64 for atomic64_t on 64-bit Now that all architectures use 64 consistently as the base type for the atomic64 API, let's have the CONFIG_64BIT definition of atomic64_t use s64 as the underlying type for atomic64_t, rather than long, matching the generated headers. On architectures where atomic64_read(v) is READ_ONCE(v->counter), this patch will cause the return type of atomic64_read() to be s64. As of this patch, the atomic64 API can be relied upon to consistently return s64 where a value rather than boolean condition is returned. This should make code more robust, and simpler, allowing for the removal of casts previously required to ensure consistent types. Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: aou@eecs.berkeley.edu Cc: arnd@arndb.de Cc: bp@alien8.de Cc: catalin.marinas@arm.com Cc: davem@davemloft.net Cc: fenghua.yu@intel.com Cc: heiko.carstens@de.ibm.com Cc: herbert@gondor.apana.org.au Cc: ink@jurassic.park.msu.ru Cc: jhogan@kernel.org Cc: linux@armlinux.org.uk Cc: mattst88@gmail.com Cc: mpe@ellerman.id.au Cc: palmer@sifive.com Cc: paul.burton@mips.com Cc: paulus@samba.org Cc: ralf@linux-mips.org Cc: rth@twiddle.net Cc: tony.luck@intel.com Cc: vgupta@synopsys.com Link: https://lkml.kernel.org/r/20190522132250.26499-17-mark.rutland@arm.com Signed-off-by: Ingo Molnar --- include/linux/types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/types.h b/include/linux/types.h index 231114ae38f4..05030f608be3 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -174,7 +174,7 @@ typedef struct { #ifdef CONFIG_64BIT typedef struct { - long counter; + s64 counter; } atomic64_t; #endif