Skip to contentSkip to conversation

x86 apic: Ack all pending irqs when crashed/on kexec

PATCH Jiri Bohac 1 participant 1 message Feb 17, 2010 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Jiri Bohac

author
#1 lore raw
Quoted 3 lines · Thomas Renninger

with MAX_LOOPS something like 1E9 this would leave plenty of time for the pending IRQs to be cleared and would and still cause at most a second of delay if the loop were to lock-up for whatever reason.

...

Review

Quoted 1 line
(quoted diff) +1 -0
+	int i, j, acked = 0, max_loops = 0x1E9;

I meant 1E9 == 1000000, not 0x1E9, just to give the kernel a chance to boot (with a delay) if something is completely wrong. 0x1E9 might be too small.

I also think a warning should be printed in case max_loops decreases to zero:

Review

Quoted 2 lines
(quoted diff) +2 -0
+	    max_loops--;
+        } while (queued && max_loops > 0);

+ WARN_ON(!max_loops)

Thanks,

Signature · 2 lines
Jiri Bohac <[email protected]>
SUSE Labs, SUSE CZ