linux-stable/arch/arc/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 .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
arc_hostlink.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
arcksyms.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
asm-offsets.c ARC: add support for DSP-enabled userspace applications 2020-03-16 10:30:49 -07:00
ctx_sw.c ARC: [plat-eznps]: Drop support for EZChip NPS platform 2020-10-05 21:02:29 -07:00
ctx_sw_asm.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
devtree.c ARC: [plat-eznps]: Drop support for EZChip NPS platform 2020-10-05 21:02:29 -07:00
disasm.c ARC: disasm: handle ARCv2 case in kprobe get/set functions 2022-04-26 09:34:42 -07:00
entry-arcv2.S ARC: mm: move MMU specific bits out of entry code ... 2021-08-24 14:25:48 -07:00
entry-compact.S ARC: entry: EV_Trap expects r10 (vs. r9) to have exception cause 2019-07-08 09:24:44 +01:00
entry.S ARC: implement syscall tracepoints 2022-04-25 13:09:47 -07:00
fpu.c ARC: fp: set FPU_STATUS.FWE to enable FPU_STATUS update on context switch 2021-08-03 18:58:33 -07:00
head.S ARC: [plat-hsdk] Remap CCMs super early in asm boot trampoline 2020-11-02 11:45:09 -08:00
intc-arcv2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
intc-compact.c arch/arc/kernel/: fix misspellings using codespell tool 2021-08-24 14:25:46 -07:00
irq.c irq: arc: avoid CONFIG_HANDLE_DOMAIN_IRQ 2021-10-25 10:05:28 +01:00
jump_label.c jump_label: make initial NOP patching the special case 2022-06-24 09:48:55 +02:00
kgdb.c ARC: kgdb: add 'fallthrough' to prevent a warning 2021-05-10 12:38:59 -07:00
kprobes.c kprobes: treewide: Make it harder to refer kretprobe_trampoline directly 2021-09-30 21:24:06 -04:00
Makefile kbuild: use obj-y instead extra-y for objects placed at the head 2022-10-02 18:04:05 +09:00
mcip.c arc: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:39 +01:00
module.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
perf_event.c arc: perf: Move static structs to where they're really used 2021-12-28 19:48:49 -08:00
process.c arch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled 2023-01-13 11:48:15 +01:00
ptrace.c arc: ptrace: user_regset_copyin_ignore() always returns 0 2022-11-15 14:30:39 -08:00
reset.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
setup.c ARCv2: boot log: detect newer/upconing HS3x/HS4x releases 2020-06-16 12:56:37 -07:00
signal.c ARC: fix typos in comments 2022-04-18 12:20:23 -07:00
smp.c ARC: Fix comment typo 2022-10-17 16:32:11 -07:00
stacktrace.c sched: Add wrapper for get_wchan() to keep task blocked 2021-10-15 11:25:14 +02:00
sys.c ARC: wireup clone3 syscall 2020-01-15 16:08:12 -08:00
traps.c trap: cleanup trap_init() 2021-09-08 11:50:27 -07:00
troubleshoot.c arch/arc/kernel/troubleshoot: use vma_lookup() instead of find_vma() 2021-06-29 10:53:51 -07:00
unaligned.c ARC: fix typos in comments 2022-04-18 12:20:23 -07:00
unwind.c arc: use swap() to make code cleaner 2021-12-28 19:49:44 -08:00
vmlinux.lds.S objtool/idle: Validate __cpuidle code as noinstr 2023-01-13 11:48:15 +01:00