diff options
author | Huacai Chen <chenhuacai@loongson.cn> | 2022-05-31 18:04:11 +0800 |
---|---|---|
committer | Huacai Chen <chenhuacai@loongson.cn> | 2022-06-03 20:09:28 +0800 |
commit | 803b0fc5c3f2baa6e54978cd576407896f789b08 (patch) | |
tree | 835ad7b550e9ed19c55f84d331e24147a04c3d0c /arch/loongarch/kernel/idle.c | |
parent | 0603839b18f4fb3bffa82515efcf5b02084505ef (diff) | |
download | linux-stable-803b0fc5c3f2baa6e54978cd576407896f789b08.tar.gz linux-stable-803b0fc5c3f2baa6e54978cd576407896f789b08.tar.bz2 linux-stable-803b0fc5c3f2baa6e54978cd576407896f789b08.zip |
LoongArch: Add process management
Add process management support for LoongArch, including: thread info
definition, context switch and process tracing.
Reviewed-by: WANG Xuerui <git@xen0n.name>
Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/kernel/idle.c')
-rw-r--r-- | arch/loongarch/kernel/idle.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/loongarch/kernel/idle.c b/arch/loongarch/kernel/idle.c new file mode 100644 index 000000000000..1a65d0527d25 --- /dev/null +++ b/arch/loongarch/kernel/idle.c @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * LoongArch idle loop support. + * + * Copyright (C) 2020-2022 Loongson Technology Corporation Limited + */ +#include <linux/cpu.h> +#include <linux/irqflags.h> +#include <asm/cpu.h> +#include <asm/idle.h> + +void __cpuidle arch_cpu_idle(void) +{ + raw_local_irq_enable(); + __arch_cpu_idle(); /* idle instruction needs irq enabled */ +} |