From patchwork Mon Nov 27 11:49:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 119691 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp141108qgn; Mon, 27 Nov 2017 03:52:02 -0800 (PST) X-Google-Smtp-Source: AGs4zMbFwqweZWcufy1CxI9R5hFTpRjxioX3TzWcEQrcVW1I40epMjsKycdVTLsGuOw5ycoZSemY X-Received: by 10.99.186.1 with SMTP id k1mr35066732pgf.296.1511783522082; Mon, 27 Nov 2017 03:52:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511783522; cv=none; d=google.com; s=arc-20160816; b=beY2LNOJtOf6jC8RVdgUz2+2I2p5vIvh4+d9XxboEKSJCf6P3bh+PIB27t7j4k8yOT BKMZah2VINP7NDdZS+F1Rj2P9KNdtcATuzsnWKATgeBJY9jfk3Mn5hinEgWxDzerFzgz ZGMV2ZHmU2vxOs92fnKLm+1qaAifUT/o22S7mJg++bAG/W7//DCOnIZ1m1Ju/R1X8SRE k9yKd5K4hpsl+5Z9eoormxyDK0l6cbL2tBGMrtOLtcq+DePCfdqZc3aHuG0VixSGzkri O9fTezIbCgKD5ZjRb53O18UrG6Er1fXwkoJuHlQg112k44b5PCiijj/4srtZDKp3CruH I3mQ== 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=09Qz6EfN/PmJwNOkujHiubqsPHkuMVO4C62imDeZDjY=; b=zZD0bBWoDaJhRIcdlDVSctBH7KpH81oeKfs7wx5JHII1MlJ2bwzSmgjV+YoR36hXOy YRGGSl4ZnsCupQV9KjeayKVb96qIZSHL5gkALIjbqHi2cE/mNfLP6HvOJ2zetmtRYbNJ CAjo6RWhYlIn+UJm6uoHrVFg3CyUUnI+wASR1zBW7j2bAbqiBSBE8Yz9I5mji/2SvpJr BThrm9oVRF+RmlgdPtkF0HUeT7q+CJrMSkEP5h152uNyg9lbBnmpkJdfOBzreI8pWQTw oLZKsHReQcyDrRzq0I0eUC07Tu8aCPwOAQSu0kTPBiRtoakc6jvYVlR4Ouw9bLHEWR6X vQAA== 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 b29si8607173pge.24.2017.11.27.03.52.01; Mon, 27 Nov 2017 03:52:02 -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 S1752187AbdK0LwA (ORCPT + 28 others); Mon, 27 Nov 2017 06:52:00 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:60857 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751689AbdK0Lv6 (ORCPT ); Mon, 27 Nov 2017 06:51:58 -0500 Received: from wuerfel.lan ([109.193.157.232]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0LxGqg-1fBTHZ1wXS-016ubC; Mon, 27 Nov 2017 12:51:19 +0100 From: Arnd Bergmann To: Kalle Valo Cc: y2038@lists.linaro.org, Arnd Bergmann , Waldemar Rymarkiewicz , Erik Stromdahl , Mohammed Shafi Shajakhan , Sarada Prasanna Garnayak , Venkateswara Naralasetty , Marcin Rokicki , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ath10k: use 64-bit crash dump timestamps Date: Mon, 27 Nov 2017 12:49:51 +0100 Message-Id: <20171127115113.2831506-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:x3m7KkDOU9AJtXntqVMsTYjRjBS0pVRtZlrdlkzyx4t8q5lI9ru v3OrCb0wIYFyE6seG1pj1lCeFcBqwY4M1nxSV4lghkoA1/5SzdBmO6YEayr8efJ/FrQel+h 4rk1qwro5++5u33CRuZeDocWaDkww/xgJoioaEO5wINMuUgwrRSdQtv6Hfwl/C6f45SP0V2 CuPxU6JvFe0bamerZb0Ow== X-UI-Out-Filterresults: notjunk:1; V01:K0:ABkr7R8AZ1s=:fLfp1/dUVSq1hM8T6SqPo4 IbsdtRyPWIGvg72iFdK1xB1DteDhxBiVChDMiAmG4a6hPK1JbO3/mkwAlIo4DQeweQyLGzhDZ b9ogDmlgaRBjW3Udw7ifTdld6hVK1wh3I1ZQthCsYnIxnuH6DpLMWrSBG7Tp8vbNeGnwOZMNF nKk3Mju9BqDgeurSn6eHAZUttdtJ/quYnDzKcyiwXvgBFYLicTwZ7L4CvEkWBIuDIeNrtn/Mx L3POXl6jnJTYbwjnTCQstc83oX5CtPBPVNsNYEH4kSVJL4I9dhvlvC7rhTeF4EWzfJMV8I8+Z LvXxXZe0I+ttL92TFIgy9+jM2xdBPhWeVEVjn3qOTkwU3nf/Jx9FWnvzewg8PF6Hcdr2M6jo5 FMdhegwoQhloZcwWZkqWhg2cmLpGobLMUJV0AExBpfTvdR5mtQnbZaZy2XZleS3mh2B02z+9q PpAuPMsUIXPUFtdXiRjp1xCtiH2zGG3SXYh+qz8xeGRLriSFxnFVku5F9ABTjeU17fMLGBwIx TqzhZqJhSpU3M5kLBLL4poKhgCdk9Od2ylW3SejOo7DAtfieIUUgecXSU/vYYLJn4EBfcc92K 7hF2uC6Ue4irBdTe5FfLBWDpKvigYLnmqxY7P3/teLX3C7pTQIHowZyCZ8GTXbQSDESucLQwa rA5ICy9fyV0Qd8GvtYzlS4G7yXz/T+rfnGu2Mx42xeKwcp6So50g6pf+hOoEZkH2S4tmkf2Ce CzBMcTYZsCWtAaVwUJgZVclGJ5AYpmMIpVVH7w== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The dump format uses 64-bit timestamps already, but calling getnstimeofday() only returns a 32-bit number on 32-bit architectures, so that will overflow in y2038. This changes it to use ktime_get_real_ts64() instead. Signed-off-by: Arnd Bergmann --- drivers/net/wireless/ath/ath10k/core.h | 2 +- drivers/net/wireless/ath/ath10k/debug.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.9.0 diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 643041ef3271..dd3c6c63aae1 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -463,7 +463,7 @@ struct ath10k_fw_crash_data { bool crashed_since_read; guid_t guid; - struct timespec timestamp; + struct timespec64 timestamp; __le32 registers[REG_DUMP_COUNT_QCA988X]; struct ath10k_ce_crash_data ce_crash_data[CE_COUNT_MAX]; }; diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c index df514507d3f1..66498e3c0f91 100644 --- a/drivers/net/wireless/ath/ath10k/debug.c +++ b/drivers/net/wireless/ath/ath10k/debug.c @@ -720,7 +720,7 @@ ath10k_debug_get_new_fw_crash_data(struct ath10k *ar) crash_data->crashed_since_read = true; guid_gen(&crash_data->guid); - getnstimeofday(&crash_data->timestamp); + ktime_get_real_ts64(&crash_data->timestamp); return crash_data; }