]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
MIPS: cevt-r4k: Don't call get_c0_compare_int if timer irq is installed
authorJiaxun Yang <jiaxun.yang@flygoat.com>
Tue, 13 Aug 2024 09:59:08 +0000 (10:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Sep 2024 09:11:39 +0000 (11:11 +0200)
commit32ee0520159f1e8c2d6597c19690df452c528f30
tree93583f0d36008982465751701ca71554e607db17
parentd942e855324a60107025c116245095632476613e
MIPS: cevt-r4k: Don't call get_c0_compare_int if timer irq is installed

[ Upstream commit 50f2b98dc83de7809a5c5bf0ccf9af2e75c37c13 ]

This avoids warning:

[    0.118053] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:283

Caused by get_c0_compare_int on secondary CPU.

We also skipped saving IRQ number to struct clock_event_device *cd as
it's never used by clockevent core, as per comments it's only meant
for "non CPU local devices".

Reported-by: Serge Semin <fancer.lancer@gmail.com>
Closes: https://lore.kernel.org/linux-mips/6szkkqxpsw26zajwysdrwplpjvhl5abpnmxgu2xuj3dkzjnvsf@4daqrz4mf44k/
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
Tested-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/mips/kernel/cevt-r4k.c