diff options
| author | Huacai Chen <chenhuacai@loongson.cn> | 2025-12-08 18:09:17 +0800 |
|---|---|---|
| committer | Huacai Chen <chenhuacai@loongson.cn> | 2025-12-08 18:09:17 +0800 |
| commit | ced7814d3a5c2275d59cb3f4bd9fa2aec8d8529a (patch) | |
| tree | 3dad87e9aaf8c8bf4c12721d3b59c74ff435cb86 /arch/loongarch/kernel/syscall.c | |
| parent | 4ad04e7c7eed8583bd49509f4aad4d28bc4b399d (diff) | |
| download | lwn-ced7814d3a5c2275d59cb3f4bd9fa2aec8d8529a.tar.gz lwn-ced7814d3a5c2275d59cb3f4bd9fa2aec8d8529a.zip | |
LoongArch: Adjust time routines for 32BIT/64BIT
Adjust time routines for both 32BIT and 64BIT, including: rdtime_h() /
rdtime_l() definitions for 32BIT and rdtime_d() definition for 64BIT,
get_cycles() and get_cycles64() definitions for 32BIT/64BIT, show time
frequency info ("CPU MHz" and "BogoMIPS") in /proc/cpuinfo, etc.
Use do_div() for division which works on both 32BIT and 64BIT platforms.
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/kernel/syscall.c')
| -rw-r--r-- | arch/loongarch/kernel/syscall.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/loongarch/kernel/syscall.c b/arch/loongarch/kernel/syscall.c index 168bd97540f8..ab94eb5ce039 100644 --- a/arch/loongarch/kernel/syscall.c +++ b/arch/loongarch/kernel/syscall.c @@ -75,7 +75,7 @@ void noinstr __no_stack_protector do_syscall(struct pt_regs *regs) * * The resulting 6 bits of entropy is seen in SP[9:4]. */ - choose_random_kstack_offset(drdtime()); + choose_random_kstack_offset(get_cycles()); syscall_exit_to_user_mode(regs); } |
