]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "powerpc/64: irq_work avoid interrupt when called with hardware irqs enabled"
authorNicholas Piggin <npiggin@gmail.com>
Thu, 2 Apr 2020 12:04:01 +0000 (22:04 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Apr 2020 14:33:01 +0000 (16:33 +0200)
commit9fd563fb2af136ab46dd882e053e08f5f0649cbe
tree65e1f0237fbf10fc7baf8d306155c30470190830
parente67262f83e43cb07d9457c7bc376679d3f4417d6
Revert "powerpc/64: irq_work avoid interrupt when called with hardware irqs enabled"

[ Upstream commit 27ec5eccaf4dd99186badf4de9648f44bfc93fb3 ]

This reverts commit 3b07c5ecfcc648fe48d0201a4bd33b9cd4bf892e.

That commit does not play well with soft-masked irq state
manipulations in idle, interrupt replay, and possibly others due to
tracing code sometimes using irq_work_queue (e.g., in
trace_hardirqs_on()). That can cause PACA_IRQ_DEC to become set when
it is not expected, and be ignored or cleared or cause warnings.

The net result seems to be missing an irq_work until the next timer
interrupt in the worst case which is usually not going to be noticed,
however it could be a long time if the tick is disabled, which is
against the spirit of irq_work and might cause real problems.

The idea is still solid, but it would need more work. It's not really
clear if it would be worth added complexity, so revert this for
now (not a straight revert, but replace with a comment explaining why
we might see interrupts happening, and gives git blame something to
find).

Fixes: 3b07c5ecfcc6 ("powerpc/64: irq_work avoid interrupt when called with hardware irqs enabled")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200402120401.1115883-1-npiggin@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/kernel/time.c