diff options
author | Hari Bathini <hbathini@linux.vnet.ibm.com> | 2015-02-06 01:07:17 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-03-23 14:06:11 +1100 |
commit | e4a9616c548f67537a8d020a45a327f6a4d583ee (patch) | |
tree | 18b7bc5f55294fb9145acb220a1c878392bad81c /arch/powerpc/platforms/pseries/nvram.c | |
parent | f7618299b4ab425956099508cba7b3a39a056d87 (diff) | |
download | op-kernel-dev-e4a9616c548f67537a8d020a45a327f6a4d583ee.zip op-kernel-dev-e4a9616c548f67537a8d020a45a327f6a4d583ee.tar.gz |
powerpc/rtas: Make timestamp related code y2038-safe
While we are here, let us make timestamp related code y2038-safe.
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms/pseries/nvram.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/nvram.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/platforms/pseries/nvram.c b/arch/powerpc/platforms/pseries/nvram.c index 533807e..9f818417 100644 --- a/arch/powerpc/platforms/pseries/nvram.c +++ b/arch/powerpc/platforms/pseries/nvram.c @@ -36,10 +36,10 @@ static DEFINE_SPINLOCK(nvram_lock); /* See clobbering_unread_rtas_event() */ #define NVRAM_RTAS_READ_TIMEOUT 5 /* seconds */ -static unsigned long last_unread_rtas_event; /* timestamp */ +static time64_t last_unread_rtas_event; /* timestamp */ #ifdef CONFIG_PSTORE -unsigned long last_rtas_event; +time64_t last_rtas_event; #endif static ssize_t pSeries_nvram_read(char *buf, size_t count, loff_t *index) @@ -144,9 +144,9 @@ int nvram_write_error_log(char * buff, int length, int rc = nvram_write_os_partition(&rtas_log_partition, buff, length, err_type, error_log_cnt); if (!rc) { - last_unread_rtas_event = get_seconds(); + last_unread_rtas_event = ktime_get_real_seconds(); #ifdef CONFIG_PSTORE - last_rtas_event = get_seconds(); + last_rtas_event = ktime_get_real_seconds(); #endif } @@ -200,7 +200,7 @@ int clobbering_unread_rtas_event(void) { return (oops_log_partition.index == rtas_log_partition.index && last_unread_rtas_event - && get_seconds() - last_unread_rtas_event <= + && ktime_get_real_seconds() - last_unread_rtas_event <= NVRAM_RTAS_READ_TIMEOUT); } |