[PATCH 01/16] pmac_zilog: fix unexpected irq

Alan Cox alan at lxorguk.ukuu.org.uk
Fri Nov 25 01:56:24 EST 2011


On Fri, 25 Nov 2011 01:34:58 +1100 (EST)
Finn Thain <fthain at telegraphics.com.au> wrote:

> 
> On most 68k Macs the SCC IRQ is an autovector interrupt and cannot be 
> masked. This can be a problem when pmac_zilog starts up.
> 
> For example, the serial debugging code in arch/m68k/kernel/head.S may be 
> used beforehand. It disables the SCC interrupts at the chip but doesn't 
> ack them. Then when a pmac_zilog port is opened and SCC chip interrupts 
> become enabled, the machine locks up with "unexpected interrupt" because 
> request_irq() hasn't happened yet.
> 
> Fix this by setting the SCC master interrupt enable bit only after the 
> handler is installed. This is achieved by extracting that operation out of 
> __pmz_startup() and placing it into a seperate routine.
> 
> A similar problem arises when the irq is freed. Fix this by resetting the 
> chip first (on m68k mac).
> 
> Signed-off-by: Finn Thain <fthain at telegraphics.com.au>
> Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
> 
> ---
> 
> This patch has been tested on a variety of m68k Macs but no PowerMacs.
> 
> I am re-sending this patch Cc linux-serial. It still needs a suitable ack 
> so that Geert can push it through his tree.

Given the change should work for all hardware do we really need the
ifdefs. Far better I would have thought to just change it so we don't
have to maintain what is effectively two versions of the code between now
and 2038.

So no ack from me yet - I'd like to understand the ifdef decision first.
Otherwise it looks sensible.

Alan


More information about the Linuxppc-dev mailing list