From patchwork Sun Sep 30 23:27:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 188205 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id DB1EA2C064C for ; Mon, 1 Oct 2012 09:50:20 +1000 (EST) Received: from quartz.orcorp.ca (quartz.orcorp.ca [184.70.90.242]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D86A32C0164 for ; Mon, 1 Oct 2012 09:48:55 +1000 (EST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=obsidianresearch.com; s=rsa1; h=Content-Type:MIME-Version:Message-ID:Subject:To:From:Date; bh=IvWAEJqhj1he+jr5skVLemg1sFTxeN4qjqUakt5ma0w=; b=HLEqni3/qYT8pulVcOCRDzdv+3CTkEuUHeM3wIlGfmkqzL3NOQXEwPiRV2ufiaEaGMZr0d2sH0Rty2Yg1NokbbOxJWsK8Q0nqbkB8MSvxLLDnF2dyLtouNabqIvbkIck9KurJwztDywUdxDzmmLEV/FloTAy02+UeOrOGLHjlK4=; Received: from jgg by quartz.orcorp.ca with local (Exim 4.72) (envelope-from ) id 1TISux-00085o-Qg for linuxppc-dev@lists.ozlabs.org; Sun, 30 Sep 2012 17:27:23 -0600 Date: Sun, 30 Sep 2012 17:27:23 -0600 From: Jason Gunthorpe To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH] PPC: Enable the Watchdog vector for 405 Message-ID: <20120930232723.GF30637@obsidianresearch.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Move the body of the PIT exception out of line to make room. Signed-off-by: Jason Gunthorpe --- arch/powerpc/kernel/head_40x.S | 26 +++++++++++++------------- arch/powerpc/kernel/traps.c | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S index 4989661..7edd7b1 100644 --- a/arch/powerpc/kernel/head_40x.S +++ b/arch/powerpc/kernel/head_40x.S @@ -431,29 +431,19 @@ label: /* 0x1000 - Programmable Interval Timer (PIT) Exception */ START_EXCEPTION(0x1000, Decrementer) - NORMAL_EXCEPTION_PROLOG - lis r0,TSR_PIS@h - mtspr SPRN_TSR,r0 /* Clear the PIT exception */ - addi r3,r1,STACK_FRAME_OVERHEAD - EXC_XFER_LITE(0x1000, timer_interrupt) + b pit_longer -#if 0 /* NOTE: - * FIT and WDT handlers are not implemented yet. + * FIT handler is not implemented yet. */ /* 0x1010 - Fixed Interval Timer (FIT) Exception */ - STND_EXCEPTION(0x1010, FITException, unknown_exception) +// STND_EXCEPTION(0x1010, FITException, unknown_exception) /* 0x1020 - Watchdog Timer (WDT) Exception */ -#ifdef CONFIG_BOOKE_WDT CRITICAL_EXCEPTION(0x1020, WDTException, WatchdogException) -#else - CRITICAL_EXCEPTION(0x1020, WDTException, unknown_exception) -#endif -#endif /* 0x1100 - Data TLB Miss Exception * As the name implies, translation is not in the MMU, so search the @@ -738,6 +728,16 @@ label: (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \ NOCOPY, crit_transfer_to_handler, ret_from_crit_exc) + /* Programmable Interval Timer (PIT) Exception. The PIT runs into + the space reserved for other exceptions, so we branch down + to here. */ +pit_longer: + NORMAL_EXCEPTION_PROLOG + lis r0,TSR_PIS@h + mtspr SPRN_TSR,r0 /* Clear the PIT exception */ + addi r3,r1,STACK_FRAME_OVERHEAD + EXC_XFER_LITE(0x1000, timer_interrupt) + /* * The other Data TLB exceptions bail out to this point * if they can't resolve the lightweight TLB fault. diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index ae0843f..0701ec1 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -1514,7 +1514,7 @@ void unrecoverable_exception(struct pt_regs *regs) die("Unrecoverable exception", regs, SIGABRT); } -#ifdef CONFIG_BOOKE_WDT +#if defined(CONFIG_BOOKE_WDT) | defined(CONFIG_40x) /* * Default handler for a Watchdog exception, * spins until a reboot occurs