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: 10076697 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D5C40602BC for ; Mon, 27 Nov 2017 11:52:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D07A128E0C for ; Mon, 27 Nov 2017 11:52:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C473A28E17; Mon, 27 Nov 2017 11:52:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8891228E0D for ; Mon, 27 Nov 2017 11:52:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752037AbdK0Lv7 (ORCPT ); Mon, 27 Nov 2017 06:51:59 -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-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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; }