From patchwork Mon Nov 27 11:31:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 119675 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp118752qgn; Mon, 27 Nov 2017 03:32:54 -0800 (PST) X-Google-Smtp-Source: AGs4zMalmJLl6gW6ep/iwEAoTa/9TRguWSitii810ohNG1BeROtNOVOSrSZZAoZT32HW9lchqHcz X-Received: by 10.101.77.210 with SMTP id q18mr36616014pgt.145.1511782373924; Mon, 27 Nov 2017 03:32:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511782373; cv=none; d=google.com; s=arc-20160816; b=IERmbdyejS6O7FpD8bRr61kQtaxLSh4wuACWUvn0/IAEq/ammHEla+O4xkS+Wkz+u1 YJmMXcjBQKbwXIle6ZLgu7enKycNNGqGr0g+wjWdnLQDKSpNIwpb5U2RTk8iRNKTm3+R bRbQQOni1JKSgoj1PbhfbrL7gSt8toaM29gXHPi+nGm80cs1lDaGiydkY0FTmIhUGYqs DtJIkmu2SkCUp9XXx1stZaY+oPlk1Jr37AkKIUR6sBWYOemnjOXLAaiI7j+F11mV+EHn PGn0gDioDVaFqh7Zu2911r2yXGqz1Lfqp02EaI/ri8vnX0nQrulfz6Cumwuj4wI7xueO Aw3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=uyQwIYqq2yjLDyd+p791oY1lq+mACc7cERT1OtQfUFI=; b=PhetCkUkYuF5esz9cFttX5U7ves/2wD4zgJAUL2wiKPlJiJ0XnNXP5rYXiMsEvI/7+ ZVU15J7Zd+klPHVR+JcG5WBmwLr/nM5yoIeUYdFPTvaBnR33EdIdUHlXgM5f8DUQXa+O gfBWqWue9H2Ar6vCTrcF9j8K7Umc2aCE1pTtQEDzYAhFrBPxBM2yZnXk8Y2XO/vLUths pxfzIJZ4o+d0UtpI20nX7umyoLFqRD5bjwv+MU88l0TldaBH/+I/VnmHcEvHWZOY+6yc 7wfRkUQ55UO9ZjFYlTNSYyae34Qr93KRHkMTSXBv+QxkgowNirpCIJ52maqOhf5i2ZYD tnGg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n65si12206288pfa.85.2017.11.27.03.32.53; Mon, 27 Nov 2017 03:32:53 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751936AbdK0Lcv (ORCPT + 28 others); Mon, 27 Nov 2017 06:32:51 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:56291 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751350AbdK0Lcu (ORCPT ); Mon, 27 Nov 2017 06:32:50 -0500 Received: from wuerfel.lan ([109.193.157.232]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.129]) with ESMTPA (Nemesis) id 0MLnvv-1eISIz3WVP-000rQ5; Mon, 27 Nov 2017 12:32:43 +0100 From: Arnd Bergmann To: Jeremy Kerr , Arnd Bergmann , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: y2038@lists.linaro.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] spufs: use timespec64 for timestamps Date: Mon, 27 Nov 2017 12:31:55 +0100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3NQWK+nOCwH17FPPHmt S2Tgdp1ei/+9h2PWli3qgbSma7T9zq8F0B8aOA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The switch log prints the tv_sec portion of timespec as a 32-bit number, while overflows in 2106. It also uses the timespec type, which is safe on 64-bit architectures, but deprecated because it causes overflows in 2038 elsewhere. This changes it to timespec64 and printing a 64-bit number for consistency. Signed-off-by: Arnd Bergmann --- arch/powerpc/platforms/cell/spufs/file.c | 6 +++--- arch/powerpc/platforms/cell/spufs/spufs.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) -- 2.9.0 diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index 5ffcdeb1eb17..94139135be9c 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c @@ -2375,8 +2375,8 @@ static int switch_log_sprint(struct spu_context *ctx, char *tbuf, int n) p = ctx->switch_log->log + ctx->switch_log->tail % SWITCH_LOG_BUFSIZE; - return snprintf(tbuf, n, "%u.%09u %d %u %u %llu\n", - (unsigned int) p->tstamp.tv_sec, + return snprintf(tbuf, n, "%llu.%09u %d %u %u %llu\n", + (unsigned long long) p->tstamp.tv_sec, (unsigned int) p->tstamp.tv_nsec, p->spu_id, (unsigned int) p->type, @@ -2499,7 +2499,7 @@ void spu_switch_log_notify(struct spu *spu, struct spu_context *ctx, struct switch_log_entry *p; p = ctx->switch_log->log + ctx->switch_log->head; - ktime_get_ts(&p->tstamp); + ktime_get_ts64(&p->tstamp); p->timebase = get_tb(); p->spu_id = spu ? spu->number : -1; p->type = type; diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h index 5e59f80e95db..5d85c689c2e9 100644 --- a/arch/powerpc/platforms/cell/spufs/spufs.h +++ b/arch/powerpc/platforms/cell/spufs/spufs.h @@ -69,7 +69,7 @@ struct switch_log { unsigned long head; unsigned long tail; struct switch_log_entry { - struct timespec tstamp; + struct timespec64 tstamp; s32 spu_id; u32 type; u32 val;