From: Arnd Bergmann <arnd@arndb.de>
To: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: y2038@lists.linaro.org, Arnd Bergmann <arnd@arndb.de>,
Waldemar Rymarkiewicz <ext.waldemar.rymarkiewicz@tieto.com>,
Erik Stromdahl <erik.stromdahl@gmail.com>,
Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>,
Sarada Prasanna Garnayak <c_sgarna@qti.qualcomm.com>,
Venkateswara Naralasetty <vnaralas@qti.qualcomm.com>,
Marcin Rokicki <marcin.rokicki@tieto.com>,
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 [thread overview]
Message-ID: <20171127115113.2831506-1-arnd@arndb.de> (raw)
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 <arnd@arndb.de>
---
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;
}
--
2.9.0
next reply other threads:[~2017-11-27 11:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-27 11:49 Arnd Bergmann [this message]
2017-12-07 14:23 ` ath10k: use 64-bit crash dump timestamps Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171127115113.2831506-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=ath10k@lists.infradead.org \
--cc=c_sgarna@qti.qualcomm.com \
--cc=erik.stromdahl@gmail.com \
--cc=ext.waldemar.rymarkiewicz@tieto.com \
--cc=kvalo@qca.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=marcin.rokicki@tieto.com \
--cc=mohammed@qti.qualcomm.com \
--cc=netdev@vger.kernel.org \
--cc=vnaralas@qti.qualcomm.com \
--cc=y2038@lists.linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).