Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4386950ybi; Mon, 3 Jun 2019 10:01:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqxnt0Qigex5vM4vpNRKClOSX1xFGEFsT34oIWqNJ+3SNAYGLHhyKv+WN2ZtGEu6iLxoDIVd X-Received: by 2002:a17:902:56a:: with SMTP id 97mr31229668plf.20.1559581281572; Mon, 03 Jun 2019 10:01:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559581281; cv=none; d=google.com; s=arc-20160816; b=CYiCF0C6XssAqGn2tZUdeCOjqAXOopfbW0CsKdyOg9LwYER44ormA+DE43z/YebnYv 40SuYoMW8l6NEG4X9rcjMsOoub8XV5mlyuHGuIR62J99gw0NyB5W6wcB8jql4xFI4GBN Bo4H61xitNsi13UYUogt1/1eZ9Ds7vpJEmh7S5Hfb7LIg32gPSbKpiZhY/sJAc3lruWU b5B5yn8skspRbemy6iNvGJVCM6HOX83XpDOaz6l7VTrwB+DsL5jMmspQBv//oJlccW7e /aFB55Zays3J5/DDZAhv48ZsaC3rMP7ZJErswP0cC9A4d0yJhfNyo85yKqtTKTnE4ewf PXlQ== 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=oDp92secCUoa43S8dFljpvXFHoubG8yt7jgslaGl6aU=; b=OagAHdIfQycH1WDHbesViz8LpN7RbBb9J75uZQGH/DAsHvr2T/7bhkplGUxNuIsvWD VHCFG7ftTa/1hk7amuMG1adOzSevumX14BliAtNxhxyzThLpgnmZ1kBXvH2/GjLxMv5x yvDBbeU6P+w5miwuhaEGY2T9PpNLcb8Xd+JGM46E4WpH+yEJCF/qlw+JCeOVJxfg+S77 gDVpGXsEsa8pw/a5D6+CeC9ESAXc0jvk8mtFbEXLzB6aAPWFsl0yYA98yqGKnldDTnjB bVheDg8dBY3rPfKoSR8lNP5t25zMzq5WFTHPW1yWswqIkjBMgtjd0KiYC/fuFGf4QzWM H34g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019051801 header.b=XEdiNBhv; 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 bc10si12347826plb.43.2019.06.03.10.01.05; Mon, 03 Jun 2019 10:01:21 -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=XEdiNBhv; 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 S1728696AbfFCNe0 (ORCPT + 99 others); Mon, 3 Jun 2019 09:34:26 -0400 Received: from terminus.zytor.com ([198.137.202.136]:33955 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727387AbfFCNeZ (ORCPT ); Mon, 3 Jun 2019 09:34:25 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x53DY7OZ610618 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 3 Jun 2019 06:34:07 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x53DY7OZ610618 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019051801; t=1559568847; bh=oDp92secCUoa43S8dFljpvXFHoubG8yt7jgslaGl6aU=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=XEdiNBhvT1SCV2H3R9A0rCt/bVlU9NPF4nq1VfR+EbEaCO9B8QNIPiwlejbDiqudi f95YE2/qeLfo+lmYmRBqBoIjQ8Xj7t3Vlw+No6mXK1ggxgka/WnNlP4gFtMGLHuWMU MdaljGf7JFd6GgOJu0WHS6ZfoYMzNF4X6ae0WGybFQldVvGgoD2WjRqg+2vepziS9m BwGiJkl0+YLKbulhTLsOIn1C4rRHI8xGDGMQOdF+xb2PuumvpYChqRB3qnu5YqyCxx te3DzZzFypA7kKx7OHFz6TllAdY5o4W9v8b5KNH3/qq9r+//M9ad9/JNbiESlIqJnJ fTsBt4G6T9WRg== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x53DY6xM610615; Mon, 3 Jun 2019 06:34:06 -0700 Date: Mon, 3 Jun 2019 06:34:06 -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: linux-kernel@vger.kernel.org, mark.rutland@arm.com, peterz@infradead.org, will.deacon@arm.com, hpa@zytor.com, torvalds@linux-foundation.org, tglx@linutronix.de, herbert@gondor.apana.org.au, mingo@kernel.org Reply-To: linux-kernel@vger.kernel.org, mark.rutland@arm.com, peterz@infradead.org, will.deacon@arm.com, torvalds@linux-foundation.org, hpa@zytor.com, tglx@linutronix.de, herbert@gondor.apana.org.au, mingo@kernel.org In-Reply-To: <20190522132250.26499-2-mark.rutland@arm.com> References: <20190522132250.26499-2-mark.rutland@arm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:locking/core] locking/atomic, crypto/nx: Prepare for atomic64_read() conversion Git-Commit-ID: 90fde663aed0a1c27e50dd1bf3f121141b2fe9f2 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: 90fde663aed0a1c27e50dd1bf3f121141b2fe9f2 Gitweb: https://git.kernel.org/tip/90fde663aed0a1c27e50dd1bf3f121141b2fe9f2 Author: Mark Rutland AuthorDate: Wed, 22 May 2019 14:22:33 +0100 Committer: Ingo Molnar CommitDate: Mon, 3 Jun 2019 12:32:56 +0200 locking/atomic, crypto/nx: Prepare for atomic64_read() conversion The return type of atomic64_read() varies by architecture. It may return long (e.g. powerpc), long long (e.g. arm), or s64 (e.g. x86_64). This is somewhat painful, and mandates the use of explicit casts in some cases (e.g. when printing the return value). To ameliorate matters, subsequent patches will make the atomic64 API consistently use s64. As a preparatory step, this patch updates the nx-842 code to treat the return value of atomic64_read() as s64, using explicit casts. These casts will be removed once the s64 conversion is complete. Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Cc: Herbert Xu 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: 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-2-mark.rutland@arm.com Signed-off-by: Ingo Molnar --- drivers/crypto/nx/nx-842-pseries.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/nx/nx-842-pseries.c b/drivers/crypto/nx/nx-842-pseries.c index 5c4aa606208c..938332ce3b60 100644 --- a/drivers/crypto/nx/nx-842-pseries.c +++ b/drivers/crypto/nx/nx-842-pseries.c @@ -856,8 +856,8 @@ static ssize_t nx842_##_name##_show(struct device *dev, \ rcu_read_lock(); \ local_devdata = rcu_dereference(devdata); \ if (local_devdata) \ - p = snprintf(buf, PAGE_SIZE, "%ld\n", \ - atomic64_read(&local_devdata->counters->_name)); \ + p = snprintf(buf, PAGE_SIZE, "%lld\n", \ + (s64)atomic64_read(&local_devdata->counters->_name)); \ rcu_read_unlock(); \ return p; \ } @@ -909,17 +909,17 @@ static ssize_t nx842_timehist_show(struct device *dev, } for (i = 0; i < (NX842_HIST_SLOTS - 2); i++) { - bytes = snprintf(p, bytes_remain, "%u-%uus:\t%ld\n", + bytes = snprintf(p, bytes_remain, "%u-%uus:\t%lld\n", i ? (2<<(i-1)) : 0, (2<