From: Benjamin Herrenschmidt Date: Wed, 18 Apr 2012 22:16:48 +0000 (+0000) Subject: powerpc/pmac: Don't add_timer() twice X-Git-Tag: v3.4-rc5~43^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3027691e58bfb21f6ea2e9f1d225d11b4e2b20e2;p=pandora-kernel.git powerpc/pmac: Don't add_timer() twice If the interrupt and the timeout happen roughly at the same time, we can get into a situation where the timer function is run while the interrupt has already been processed. In this case, the timer function might end up doing an add_timer on an already pending timer, causing a BUG_ON() to trigger. Instead, just skip the whole timeout operation if we see that the timer is pending. The spinlock ensures that the only way that happens is if we already started a new operation and thus the timeout can be ignored. Signed-off-by: Benjamin Herrenschmidt --- Reading git-diff-tree failed