* [PATCH] LoongArch: Remove MIPS comment about cycle counter
@ 2022-06-04 6:35 Jason A. Donenfeld
2022-06-04 6:43 ` WANG Xuerui
0 siblings, 1 reply; 3+ messages in thread
From: Jason A. Donenfeld @ 2022-06-04 6:35 UTC (permalink / raw)
To: chenhuacai, kernel, linux-kernel, arnd; +Cc: Jason A. Donenfeld
This comment block was taken originally from the MIPS architecture code,
where indeed there are particular assumptions one can make regarding SMP
and !SMP and cycle counters. On LoongArch, however, the rdtime family of
functions is always available. As Xuerui wrote:
The rdtime family of instructions is in fact guaranteed to be
available on LoongArch; LoongArch's subsets all contain them, even
the 32-bit "Primary" subset intended for university teaching -- they
provide the rdtimeh.w and rdtimel.w pair of instructions that access
the same 64-bit counter.
So this commit simply removes the incorrect comment block.
Link: https://lore.kernel.org/lkml/e78940bc-9be2-2fe7-026f-9e64a1416c9f@xen0n.name/
Fixes: b738c106f735 ("LoongArch: Add other common headers")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
arch/loongarch/include/asm/timex.h | 7 -------
1 file changed, 7 deletions(-)
diff --git a/arch/loongarch/include/asm/timex.h b/arch/loongarch/include/asm/timex.h
index d3ed99a4fdbd..fb41e9e7a222 100644
--- a/arch/loongarch/include/asm/timex.h
+++ b/arch/loongarch/include/asm/timex.h
@@ -12,13 +12,6 @@
#include <asm/cpu.h>
#include <asm/cpu-features.h>
-/*
- * Standard way to access the cycle counter.
- * Currently only used on SMP for scheduling.
- *
- * We know that all SMP capable CPUs have cycle counters.
- */
-
typedef unsigned long cycles_t;
#define get_cycles get_cycles
--
2.35.1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] LoongArch: Remove MIPS comment about cycle counter
2022-06-04 6:35 [PATCH] LoongArch: Remove MIPS comment about cycle counter Jason A. Donenfeld
@ 2022-06-04 6:43 ` WANG Xuerui
2022-06-04 6:58 ` Huacai Chen
0 siblings, 1 reply; 3+ messages in thread
From: WANG Xuerui @ 2022-06-04 6:43 UTC (permalink / raw)
To: Jason A. Donenfeld, chenhuacai, kernel, linux-kernel, arnd
On 6/4/22 14:35, Jason A. Donenfeld wrote:
> This comment block was taken originally from the MIPS architecture code,
> where indeed there are particular assumptions one can make regarding SMP
> and !SMP and cycle counters. On LoongArch, however, the rdtime family of
> functions is always available. As Xuerui wrote:
>
> The rdtime family of instructions is in fact guaranteed to be
> available on LoongArch; LoongArch's subsets all contain them, even
> the 32-bit "Primary" subset intended for university teaching -- they
> provide the rdtimeh.w and rdtimel.w pair of instructions that access
> the same 64-bit counter.
>
> So this commit simply removes the incorrect comment block.
>
> Link: https://lore.kernel.org/lkml/e78940bc-9be2-2fe7-026f-9e64a1416c9f@xen0n.name/
> Fixes: b738c106f735 ("LoongArch: Add other common headers")
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
> ---
> arch/loongarch/include/asm/timex.h | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/arch/loongarch/include/asm/timex.h b/arch/loongarch/include/asm/timex.h
> index d3ed99a4fdbd..fb41e9e7a222 100644
> --- a/arch/loongarch/include/asm/timex.h
> +++ b/arch/loongarch/include/asm/timex.h
> @@ -12,13 +12,6 @@
> #include <asm/cpu.h>
> #include <asm/cpu-features.h>
>
> -/*
> - * Standard way to access the cycle counter.
> - * Currently only used on SMP for scheduling.
> - *
> - * We know that all SMP capable CPUs have cycle counters.
> - */
> -
> typedef unsigned long cycles_t;
>
> #define get_cycles get_cycles
Just as previously discussed. Thanks for the quick fixup!
Reviewed-by: WANG Xuerui <git@xen0n.name>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] LoongArch: Remove MIPS comment about cycle counter
2022-06-04 6:43 ` WANG Xuerui
@ 2022-06-04 6:58 ` Huacai Chen
0 siblings, 0 replies; 3+ messages in thread
From: Huacai Chen @ 2022-06-04 6:58 UTC (permalink / raw)
To: WANG Xuerui; +Cc: Jason A. Donenfeld, LKML, Arnd Bergmann
Hi, Xuerui and Jason,
Thank you very much, this will be applied later in the loongarch-fixes branch.
Huacai
On Sat, Jun 4, 2022 at 2:43 PM WANG Xuerui <kernel@xen0n.name> wrote:
>
> On 6/4/22 14:35, Jason A. Donenfeld wrote:
> > This comment block was taken originally from the MIPS architecture code,
> > where indeed there are particular assumptions one can make regarding SMP
> > and !SMP and cycle counters. On LoongArch, however, the rdtime family of
> > functions is always available. As Xuerui wrote:
> >
> > The rdtime family of instructions is in fact guaranteed to be
> > available on LoongArch; LoongArch's subsets all contain them, even
> > the 32-bit "Primary" subset intended for university teaching -- they
> > provide the rdtimeh.w and rdtimel.w pair of instructions that access
> > the same 64-bit counter.
> >
> > So this commit simply removes the incorrect comment block.
> >
> > Link: https://lore.kernel.org/lkml/e78940bc-9be2-2fe7-026f-9e64a1416c9f@xen0n.name/
> > Fixes: b738c106f735 ("LoongArch: Add other common headers")
> > Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
> > ---
> > arch/loongarch/include/asm/timex.h | 7 -------
> > 1 file changed, 7 deletions(-)
> >
> > diff --git a/arch/loongarch/include/asm/timex.h b/arch/loongarch/include/asm/timex.h
> > index d3ed99a4fdbd..fb41e9e7a222 100644
> > --- a/arch/loongarch/include/asm/timex.h
> > +++ b/arch/loongarch/include/asm/timex.h
> > @@ -12,13 +12,6 @@
> > #include <asm/cpu.h>
> > #include <asm/cpu-features.h>
> >
> > -/*
> > - * Standard way to access the cycle counter.
> > - * Currently only used on SMP for scheduling.
> > - *
> > - * We know that all SMP capable CPUs have cycle counters.
> > - */
> > -
> > typedef unsigned long cycles_t;
> >
> > #define get_cycles get_cycles
>
> Just as previously discussed. Thanks for the quick fixup!
>
> Reviewed-by: WANG Xuerui <git@xen0n.name>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-04 6:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-04 6:35 [PATCH] LoongArch: Remove MIPS comment about cycle counter Jason A. Donenfeld
2022-06-04 6:43 ` WANG Xuerui
2022-06-04 6:58 ` Huacai Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®