]> git.karo-electronics.de Git - mv-sheeva.git/commit
powerpc/pmac: Simplify old pmac PIC interrupt handling
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Sun, 11 Dec 2011 23:27:41 +0000 (10:27 +1100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 16 Dec 2011 00:10:11 +0000 (11:10 +1100)
commit8e609d5e7bc032ab220d47c841c992bd8544d0e1
tree24c90442699e1ed47605e58a019c43db52bde9fd
parenta79dd5ae5a8f49688d65b89a859f2b98a7ee5538
powerpc/pmac: Simplify old pmac PIC interrupt handling

In the old days, we treated all interrupts from the legacy Apple home made
interrupt controllers as level, with a trick reading the "level" register
along with the "event" register to work arounds bugs where it would
occasionally fail to latch some events.

Doing so appeared to work fine for both level and edge interrupts.

Later on, we discovered in Darwin source the magic masks that define which
interrupts are actually level and which are edge, and implemented a
different algorithm, more similar to what Apple does, that treats those
differently.

I recently discovered however that this caused problems (including loss
of interrupts) with an old Wallstreet PowerBook when trying to use the
internal modem (connected to a cascaded controller).

It looks like some interrupts are treated as edge while they are really
level and I'm starting to seriously doubt the correctness of the Darwin
code (which has other obvious bugs when you read it, so ...)

This patch reverts to our original behaviour of treating everything as
a level interrupt. It appears to solve the problems with the modem on
the Wallstreet and everything else seems to be working properly as well.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/powermac/pic.c