Skip to content

Commit 5459ae1

Browse files
shangwozbenh
authored andcommitted
powerpc/eeh: Use interruptible sleep in keehd
To replace down() with down_interrutible() to avoid following warning: [c00000007ba7b710] [c000000000014410] .__switch_to+0x1b0/0x380 [c00000007ba7b7c0] [c0000000007b408c] .__schedule+0x3ec/0x970 [c00000007ba7ba50] [c0000000007b1f24] .schedule_timeout+0x1a4/0x2b0 [c00000007ba7bb30] [c0000000007b34a4] .__down+0xa4/0x104 [c00000007ba7bbf0] [c0000000000b9230] .down+0x60/0x70 [c00000007ba7bc80] [c0000000000336d0] .eeh_event_handler+0x70/0x190 [c00000007ba7bd30] [c0000000000b1a58] .kthread+0xe8/0xf0 [c00000007ba7be30] [c00000000000a05c] .ret_from_kernel_thread+0x5c/0x8 This also avoids keeping the load average up while doing nothing. Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
1 parent ef6a285 commit 5459ae1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/powerpc/kernel/eeh_event.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ static int eeh_event_handler(void * dummy)
5555
struct eeh_pe *pe;
5656

5757
while (!kthread_should_stop()) {
58-
down(&eeh_eventlist_sem);
58+
if (down_interruptible(&eeh_eventlist_sem))
59+
break;
5960

6061
/* Fetch EEH event from the queue */
6162
spin_lock_irqsave(&eeh_eventlist_lock, flags);

0 commit comments

Comments
 (0)