All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] s390: remove the last remnants of cputime_t
@ 2022-10-06 10:56 Nicholas Piggin
  2022-10-06 12:18 ` Sven Schnelle
  0 siblings, 1 reply; 4+ messages in thread
From: Nicholas Piggin @ 2022-10-06 10:56 UTC (permalink / raw)
  To: linux-s390; +Cc: Nicholas Piggin

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.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
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(-)

diff --git a/arch/s390/include/asm/cputime.h b/arch/s390/include/asm/cputime.h
index 1d389847b588..7f9284e2a7db 100644
--- a/arch/s390/include/asm/cputime.h
+++ b/arch/s390/include/asm/cputime.h
@@ -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.
  */
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] s390: remove the last remnants of cputime_t
  2022-10-06 10:56 [PATCH] s390: remove the last remnants of cputime_t Nicholas Piggin
@ 2022-10-06 12:18 ` Sven Schnelle
  2022-12-20  6:29   ` Nicholas Piggin
  0 siblings, 1 reply; 4+ messages in thread
From: Sven Schnelle @ 2022-10-06 12:18 UTC (permalink / raw)
  To: Nicholas Piggin; +Cc: linux-s390

Nicholas Piggin <npiggin@gmail.com> writes:

> 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.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
> 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.

I just tested this, looks good. Thanks!

Reviewed-by: Sven Schnelle <svens@linux.ibm.com>

>
>  arch/s390/include/asm/cputime.h | 15 ---------------
>  1 file changed, 15 deletions(-)
>
> diff --git a/arch/s390/include/asm/cputime.h b/arch/s390/include/asm/cputime.h
> index 1d389847b588..7f9284e2a7db 100644
> --- a/arch/s390/include/asm/cputime.h
> +++ b/arch/s390/include/asm/cputime.h
> @@ -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.
>   */

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] s390: remove the last remnants of cputime_t
  2022-10-06 12:18 ` Sven Schnelle
@ 2022-12-20  6:29   ` Nicholas Piggin
  2022-12-20 15:44     ` Alexander Gordeev
  0 siblings, 1 reply; 4+ messages in thread
From: Nicholas Piggin @ 2022-12-20  6:29 UTC (permalink / raw)
  To: Sven Schnelle; +Cc: linux-s390

On Thu Oct 6, 2022 at 10:18 PM AEST, Sven Schnelle wrote:
> Nicholas Piggin <npiggin@gmail.com> writes:
>
> > 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.
> >
> > Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> > ---
> > 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.
>
> I just tested this, looks good. Thanks!
>
> Reviewed-by: Sven Schnelle <svens@linux.ibm.com>

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

>
> >
> >  arch/s390/include/asm/cputime.h | 15 ---------------
> >  1 file changed, 15 deletions(-)
> >
> > diff --git a/arch/s390/include/asm/cputime.h b/arch/s390/include/asm/cputime.h
> > index 1d389847b588..7f9284e2a7db 100644
> > --- a/arch/s390/include/asm/cputime.h
> > +++ b/arch/s390/include/asm/cputime.h
> > @@ -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.
> >   */


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] s390: remove the last remnants of cputime_t
  2022-12-20  6:29   ` Nicholas Piggin
@ 2022-12-20 15:44     ` Alexander Gordeev
  0 siblings, 0 replies; 4+ messages in thread
From: Alexander Gordeev @ 2022-12-20 15:44 UTC (permalink / raw)
  To: Nicholas Piggin; +Cc: Sven Schnelle, linux-s390

On Tue, Dec 20, 2022 at 04:29:31PM +1000, Nicholas Piggin wrote:
> > > 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.
> >
> > I just tested this, looks good. Thanks!
> >
> > Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
> 
> 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!

> Thanks,
> Nick

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-12-20 15:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-06 10:56 [PATCH] s390: remove the last remnants of cputime_t Nicholas Piggin
2022-10-06 12:18 ` Sven Schnelle
2022-12-20  6:29   ` Nicholas Piggin
2022-12-20 15:44     ` Alexander Gordeev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.