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: 10076695 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 3A1CE602BC for ; Mon, 27 Nov 2017 11:52:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33A9D28E0C for ; Mon, 27 Nov 2017 11:52:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 283FA28E18; Mon, 27 Nov 2017 11:52:14 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A7B3F28E0C for ; Mon, 27 Nov 2017 11:52:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=vJuyc5DqNsFpY+TIBf4GcuXv3X8B5LPr9SEBlbdQzMI=; b=EEG madf7gY7HercO18duGi8M/7Wqi6OQbNP7xPtjqN6XKJGtphO5eKkO10lve4opaTeDWyM4LgJR+Zm1 xdhDg9OtWKpIImzVwkriahF4D2c/nkbNUt02qRRXRACn4MkPC1Q8Ro98cvgMPsCTlnoDc2ZDU+VPH r46m7PhCNgPyOd6Mx5ezNn5iL5QO40JboCIV9BqesY4+f7v/g3VjrVxqff/qqY1JYYwvz/cw1Gwf9 7bs2CZM5CXdmIkqqFzZccgk88U43c0Ly1B0hprH0idQe6+AAf2ZAXI/TddBhV7LWk3ejlfhOo1Voi M5Ci9vjdXAah74JjskgBnW+TdQX7pFw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eJHx8-0002Og-8u; Mon, 27 Nov 2017 11:51:58 +0000 Received: from mout.kundenserver.de ([212.227.126.133]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eJHx0-0002H9-Aj for ath10k@lists.infradead.org; Mon, 27 Nov 2017 11:51:56 +0000 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 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== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171127_035150_801313_A104093F X-CRM114-Status: UNSURE ( 9.67 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , y2038@lists.linaro.org, Venkateswara Naralasetty , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, ath10k@lists.infradead.org, Mohammed Shafi Shajakhan , Erik Stromdahl , netdev@vger.kernel.org, Marcin Rokicki , Sarada Prasanna Garnayak , Waldemar Rymarkiewicz MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.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; }