s390: remove the last remnants of cputime_t
PATCH 1/1 s390: remove the last remnants of cputime_t
cputime_t was a core kernel type, removed by commits ed5c8c854f2b..b672592f0221. As explained in commit b672592f0221 ("sched/cputime: Remove generic asm headers"), the final cleanup is for the arch to provide cputime_to_nsec[s](). Commit e53051e757d6 ("s390/cputime: provide archicture specific cputime_to_nsecs") did that, but just didn't remove the then-unused cputime_to_usecs() and associated remnants.
---
Sorry this isn't build or compile tested, I'm doing the same for powerpc then we can remove the cputime_to_nsecs fallback from core code too.
Thanks,
Nick
arch/s390/include/asm/cputime.h | 15 --------------- 1 file changed, 15 deletions(-)
arch/s390/include/asm/cputime.h +0 -15
@@ -11,21 +11,6 @@#include <linux/types.h> #include <asm/timex.h> -#define CPUTIME_PER_USEC 4096ULL -#define CPUTIME_PER_SEC (CPUTIME_PER_USEC * USEC_PER_SEC) - -/* We want to use full resolution of the CPU timer: 2**-12 micro-seconds. */ - -#define cmpxchg_cputime (ptr, old, new) cmpxchg64(ptr, old, new) - -/* -* Convert cputime to microseconds. -*/ -static inline u64 cputime_to_usecs (const u64 cputime) -{ -return cputime >>12 ; -} -/* * Convert cputime to nanoseconds. */
Signature · 1 line
2.37.2
Quoted 8 lines · Nicholas Piggin
cputime_twas a core kernel type, removed by commitsed5c8c854f2b..b672592f0221. As explained in commitb672592f0221("sched/cputime: Remove generic asm headers"), the final cleanup is for the arch to provide cputime_to_nsec[s](). Commite53051e757d6("s390/cputime: provide archicture specificcputime_to_nsecs") did that, but just didn't remove the then-unusedcputime_to_usecs()and associated remnants.
Quoted 4 lines
Signed-off-by Nicholas Piggin <[email protected]>---
Sorry this isn't build or compile tested, I'm doing the same for powerpc then we can remove thecputime_to_nsecsfallback from core code too.
I just tested this, looks good. Thanks!
Quoted 30 lines
arch/s390/include/asm/cputime.h | 15 --------------- 1 file changed, 15 deletions(-)arch/s390/include/asm/cputime.h +0
-15@@ -11,21 +11,6 @@#include <linux/types.h> #include <asm/timex.h> -#define CPUTIME_PER_USEC 4096ULL -#define CPUTIME_PER_SEC (CPUTIME_PER_USEC * USEC_PER_SEC) - -/* We want to use full resolution of the CPU timer: 2**-12 micro-seconds. */ - -#define cmpxchg_cputime (ptr, old, new) cmpxchg64(ptr, old, new) - -/* -* Convert cputime to microseconds. -*/ -static inline u64 cputime_to_usecs (const u64 cputime) -{ -return cputime >>12 ; -} -/* * Convert cputime to nanoseconds. */
Quoted 10 lines · Sven Schnelle
Quoted 8 lines · Nicholas Piggin
cputime_twas a core kernel type, removed by commitsed5c8c854f2b..b672592f0221. As explained in commitb672592f0221("sched/cputime: Remove generic asm headers"), the final cleanup is for the arch to provide cputime_to_nsec[s](). Commite53051e757d6("s390/cputime: provide archicture specificcputime_to_nsecs") did that, but just didn't remove the then-unusedcputime_to_usecs()and associated remnants.
Quoted 8 lines
Quoted 4 lines
Signed-off-by Nicholas Piggin <[email protected]>---
Sorry this isn't build or compile tested, I'm doing the same for powerpc then we can remove thecputime_to_nsecsfallback from core code too.I just tested this, looks good. Thanks!
Reviewed-by Sven Schnelle <[email protected]>
Thanks Sven. I think the core code fallback can be removed independently of this s390 change, so it can go via s390 tree in your own good time.
Thanks,
Nick
Quoted 31 lines
Quoted 31 lines
arch/s390/include/asm/cputime.h | 15 --------------- 1 file changed, 15 deletions(-)arch/s390/include/asm/cputime.h +0
-15@@ -11,21 +11,6 @@#include <linux/types.h> #include <asm/timex.h> -#define CPUTIME_PER_USEC 4096ULL -#define CPUTIME_PER_SEC (CPUTIME_PER_USEC * USEC_PER_SEC) - -/* We want to use full resolution of the CPU timer: 2**-12 micro-seconds. */ - -#define cmpxchg_cputime (ptr, old, new) cmpxchg64(ptr, old, new) - -/* -* Convert cputime to microseconds. -*/ -static inline u64 cputime_to_usecs (const u64 cputime) -{ -return cputime >>12 ; -} -/* * Convert cputime to nanoseconds. */
Quoted 9 lines · Nicholas Piggin
Quoted 6 lines
Quoted 2 lines
Sorry this isn't build or compile tested, I'm doing the same for powerpc then we can remove the
cputime_to_nsecsfallback from core code too.I just tested this, looks good. Thanks!
Reviewed-by Sven Schnelle <[email protected]>Thanks Sven. I think the core code fallback can be removed independently of this s390 change, so it can go via s390 tree in your own good time.
Applied, thanks!
Quoted 2 lines
Thanks,
Nick