LoongArch: Remove MIPS comment about cycle counter
PATCH 1/1 LoongArch: Remove MIPS comment about cycle counter
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.
--- arch/loongarch/include/asm/timex.h | 7 ------- 1 file changed, 7 deletions(-)
arch/loongarch/include/asm/timex.h +0 -7
@@ -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
Signature · 1 line
2.35.1
Quoted 28 lines · 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.
Fixes b738c106f735 ("LoongArch: Add other common headers")Signed-off-by Jason A. Donenfeld <[email protected]>--- arch/loongarch/include/asm/timex.h | 7 ------- 1 file changed, 7 deletions(-)arch/loongarch/include/asm/timex.h +0
-0@@ -12,13 +12,6 @@#include <asm/cpu.h> #include <asm/cpu-features.h>
arch/loongarch/include/asm/timex.h line 17
Quoted 10 lines
arch/loongarch/include/asm/timex.h +0
-7-/* -* 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!
Huacai Chen
maintainerHi, Xuerui and Jason,
Thank you very much, this will be applied later in the loongarch-fixes branch.
Huacai
Quoted 44 lines · WANG Xuerui
Quoted 28 lines · 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.
Fixes b738c106f735 ("LoongArch: Add other common headers")Signed-off-by Jason A. Donenfeld <[email protected]>--- arch/loongarch/include/asm/timex.h | 7 ------- 1 file changed, 7 deletions(-)arch/loongarch/include/asm/timex.h +0
-0@@ -12,13 +12,6 @@#include <asm/cpu.h> #include <asm/cpu-features.h> arch/loongarch/include/asm/timex.h line 17
Quoted 10 lines
arch/loongarch/include/asm/timex.h +0
-7-/* -* 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_cyclesJust as previously discussed. Thanks for the quick fixup!
Reviewed-by WANG Xuerui <[email protected]>