From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Cox Subject: Re: [PATCH 01/16 v2] pmac_zilog: fix unexpected irq Date: Tue, 6 Dec 2011 15:39:26 +0000 Message-ID: <20111206153926.32d26bf8@lxorguk.ukuu.org.uk> References: <20111023141108.856998818@telegraphics.com.au> <20111023141115.208699274@telegraphics.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from earthlight.etchedpixels.co.uk ([81.2.110.250]:49986 "EHLO earthlight.etchedpixels.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751142Ab1LFPiQ (ORCPT ); Tue, 6 Dec 2011 10:38:16 -0500 In-Reply-To: Sender: linux-m68k-owner@vger.kernel.org List-Id: linux-m68k@vger.kernel.org To: Finn Thain Cc: Geert Uytterhoeven , Benjamin Herrenschmidt , linux-m68k@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-serial@vger.kernel.org On Wed, 7 Dec 2011 02:13:41 +1100 (EST) Finn Thain 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 interrupt enable bits only after the handler is > installed and before it is uninstalled. Also move this bit flipping into a > separate pmz_interrupt_control() routine. Replace all instances of these > operations with calls to this routine. > > Signed-off-by: Finn Thain Nice Acked-by: Alan Cox