* [PATCH] ath10k: use 64-bit crash dump timestamps
@ 2017-11-27 11:49 Arnd Bergmann
2017-12-07 14:23 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-11-27 11:49 UTC (permalink / raw)
To: Kalle Valo
Cc: y2038, Arnd Bergmann, Waldemar Rymarkiewicz, Erik Stromdahl,
Mohammed Shafi Shajakhan, Sarada Prasanna Garnayak,
Venkateswara Naralasetty, Marcin Rokicki, ath10k, linux-wireless,
netdev, linux-kernel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: ath10k: use 64-bit crash dump timestamps
2017-11-27 11:49 [PATCH] ath10k: use 64-bit crash dump timestamps Arnd Bergmann
@ 2017-12-07 14:23 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2017-12-07 14:23 UTC (permalink / raw)
To: Arnd Bergmann
Cc: y2038, Arnd Bergmann, Waldemar Rymarkiewicz, Erik Stromdahl,
Mohammed Shafi Shajakhan, Sarada Prasanna Garnayak,
Venkateswara Naralasetty, Marcin Rokicki, ath10k, linux-wireless,
netdev, linux-kernel
Arnd Bergmann <arnd@arndb.de> wrote:
> 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>
> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Patch applied to ath-next branch of ath.git, thanks.
dafa42036012 ath10k: use 64-bit crash dump timestamps
--
https://patchwork.kernel.org/patch/10076697/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-07 14:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-27 11:49 [PATCH] ath10k: use 64-bit crash dump timestamps Arnd Bergmann
2017-12-07 14:23 ` Kalle Valo
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).