diff options
| author | Marco Crivellari <[email protected]> | 2025-02-13 04:02:35 +0000 |
|---|---|---|
| committer | Huacai Chen <[email protected]> | 2025-02-13 04:02:35 +0000 |
| commit | edb1942542bc538707cea221e9c7923a6270465f (patch) | |
| tree | d46d29299dd3c23d38e5278aec19cb481e45c164 /drivers/net/ethernet/intel/igc/igc_main.c | |
| parent | Linux 6.14-rc2 (diff) | |
| download | kernel-edb1942542bc538707cea221e9c7923a6270465f.tar.gz kernel-edb1942542bc538707cea221e9c7923a6270465f.zip | |
LoongArch: Fix idle VS timer enqueue
LoongArch re-enables interrupts on its idle routine and performs a
TIF_NEED_RESCHED check afterwards before putting the CPU to sleep.
The IRQs firing between the check and the idle instruction may set the
TIF_NEED_RESCHED flag. In order to deal with such a race, IRQs
interrupting __arch_cpu_idle() rollback their return address to the
beginning of __arch_cpu_idle() so that TIF_NEED_RESCHED is checked
again before going back to sleep.
However idle IRQs can also queue timers that may require a tick
reprogramming through a new generic idle loop iteration but those timers
would go unnoticed here because __arch_cpu_idle() only checks
TIF_NEED_RESCHED. It doesn't check for pending timers.
Fix this with fast-forwarding idle IRQs return address to the end of the
idle routine instead of the beginning, so that the generic idle loop can
handle both TIF_NEED_RESCHED and pending timers.
Fixes: 0603839b18f4 ("LoongArch: Add exception/interrupt handling")
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Signed-off-by: Frederic Weisbecker <[email protected]>
Signed-off-by: Marco Crivellari <[email protected]>
Signed-off-by: Huacai Chen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/igc/igc_main.c')
0 files changed, 0 insertions, 0 deletions
