OpenCloudOS-Kernel/arch/nios2/kernel
Peter Zijlstra 89b3098703 arch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled
Current arch_cpu_idle() is called with IRQs disabled, but will return
with IRQs enabled.

However, the very first thing the generic code does after calling
arch_cpu_idle() is raw_local_irq_disable(). This means that
architectures that can idle with IRQs disabled end up doing a
pointless 'enable-disable' dance.

Therefore, push this IRQ disabling into the idle function, meaning
that those architectures can avoid the pointless IRQ state flipping.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Tony Lindgren <tony@atomide.com>
Tested-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Acked-by: Mark Rutland <mark.rutland@arm.com> [arm64]
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Guo Ren <guoren@kernel.org>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
Link: https://lore.kernel.org/r/20230112195540.618076436@infradead.org
2023-01-13 11:48:15 +01:00
..
.gitignore
Makefile kbuild: use obj-y instead extra-y for objects placed at the head 2022-10-02 18:04:05 +09:00
asm-offsets.c
cpuinfo.c
entry.S nios2: add force_successful_syscall_return() 2022-08-15 11:25:32 -05:00
head.S
insnemu.S
irq.c nios2: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:41 +01:00
kgdb.c
misaligned.c
module.c
nios2_ksyms.c
process.c arch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled 2023-01-13 11:48:15 +01:00
prom.c
ptrace.c nios2: ptrace: user_regset_copyin_ignore() always returns 0 2022-11-15 14:30:40 -08:00
setup.c NIOS2: setup.c: drop unused variable 'dram_start' 2021-09-27 08:34:54 -05:00
signal.c nios2: restarts apply only to the first sigframe we build... 2022-08-15 11:25:32 -05:00
sys_nios2.c Take mmap lock in cacheflush syscall 2021-02-19 15:01:59 +08:00
syscall_table.c nios2: don't leave NULLs in sys_call_table[] 2022-08-15 11:25:32 -05:00
time.c
traps.c exit: Add and use make_task_dead. 2021-12-13 12:04:45 -06:00
vmlinux.lds.S objtool/idle: Validate __cpuidle code as noinstr 2023-01-13 11:48:15 +01:00