linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: linuxppc-dev@ozlabs.org
Subject: [PATCH 06/13] powerpc/book3e: Hookup doorbells exceptions on 64-bit Book3E
Date: Fri,  9 Jul 2010 16:16:48 +1000	[thread overview]
Message-ID: <1278656215-24705-6-git-send-email-benh@kernel.crashing.org> (raw)
In-Reply-To: <1278656215-24705-5-git-send-email-benh@kernel.crashing.org>

Note that critical doorbells are an unimplemented stub just like
other critical or machine check handlers, since we haven't done
support for "levelled" exceptions yet.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/kernel/Makefile         |    1 +
 arch/powerpc/kernel/exceptions-64e.S |   21 +++++++++++++++++----
 arch/powerpc/kernel/irq.c            |    7 +++++++
 3 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 0100604..8a33318 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -68,6 +68,7 @@ obj64-$(CONFIG_HIBERNATION)	+= swsusp_asm64.o
 obj-$(CONFIG_MODULES)		+= module.o module_$(CONFIG_WORD_SIZE).o
 obj-$(CONFIG_44x)		+= cpu_setup_44x.o
 obj-$(CONFIG_FSL_BOOKE)		+= cpu_setup_fsl_booke.o dbell.o
+obj-$(CONFIG_PPC_BOOK3E_64)	+= dbell.o
 
 extra-y				:= head_$(CONFIG_WORD_SIZE).o
 extra-$(CONFIG_PPC_BOOK3E_32)	:= head_new_booke.o
diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
index 24dcc0e..a42637c 100644
--- a/arch/powerpc/kernel/exceptions-64e.S
+++ b/arch/powerpc/kernel/exceptions-64e.S
@@ -246,11 +246,9 @@ interrupt_base_book3e:					/* fake trap */
 	EXCEPTION_STUB(0x1a0, watchdog)			/* 0x09f0 */
 	EXCEPTION_STUB(0x1c0, data_tlb_miss)
 	EXCEPTION_STUB(0x1e0, instruction_tlb_miss)
+	EXCEPTION_STUB(0x280, doorbell)
+	EXCEPTION_STUB(0x2a0, doorbell_crit)
 
-#if 0
-	EXCEPTION_STUB(0x280, processor_doorbell)
-	EXCEPTION_STUB(0x220, processor_doorbell_crit)
-#endif
 	.globl interrupt_end_book3e
 interrupt_end_book3e:
 
@@ -428,6 +426,19 @@ interrupt_end_book3e:
 kernel_dbg_exc:
 	b	.	/* NYI */
 
+/* Doorbell interrupt */
+	MASKABLE_EXCEPTION(0x2070, doorbell, .doorbell_exception, ACK_NONE)
+
+/* Doorbell critical Interrupt */
+	START_EXCEPTION(doorbell_crit);
+	CRIT_EXCEPTION_PROLOG(0x2080, PROLOG_ADDITION_NONE)
+//	EXCEPTION_COMMON(0x2080, PACA_EXCRIT, INTS_DISABLE_ALL)
+//	bl	special_reg_save_crit
+//	addi	r3,r1,STACK_FRAME_OVERHEAD
+//	bl	.doorbell_critical_exception
+//	b	ret_from_crit_except
+	b	.
+
 
 /*
  * An interrupt came in while soft-disabled; clear EE in SRR1,
@@ -563,6 +574,8 @@ BAD_STACK_TRAMPOLINE(0xd00)
 BAD_STACK_TRAMPOLINE(0xe00)
 BAD_STACK_TRAMPOLINE(0xf00)
 BAD_STACK_TRAMPOLINE(0xf20)
+BAD_STACK_TRAMPOLINE(0x2070)
+BAD_STACK_TRAMPOLINE(0x2080)
 
 	.globl	bad_stack_book3e
 bad_stack_book3e:
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index fa6f385..2f6dc7f 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -64,6 +64,8 @@
 #include <asm/ptrace.h>
 #include <asm/machdep.h>
 #include <asm/udbg.h>
+#include <asm/dbell.h>
+
 #ifdef CONFIG_PPC64
 #include <asm/paca.h>
 #include <asm/firmware.h>
@@ -153,6 +155,11 @@ notrace void raw_local_irq_restore(unsigned long en)
 	if (get_hard_enabled())
 		return;
 
+#if defined(CONFIG_BOOKE) && defined(CONFIG_SMP)
+	/* Check for pending doorbell interrupts on SMP */
+	doorbell_exception(NULL);
+#endif
+
 	/*
 	 * Need to hard-enable interrupts here.  Since currently disabled,
 	 * no need to take further asm precautions against preemption; but
-- 
1.6.3.3

  reply	other threads:[~2010-07-09  6:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-09  6:16 [PATCH 01/13] powerpc/book3e: mtmsr should not be mtmsrd on book3e 64-bit Benjamin Herrenschmidt
2010-07-09  6:16 ` [PATCH 02/13] powerpc/book3e: Hack to get gdb moving along on Book3E 64-bit Benjamin Herrenschmidt
2010-07-09  6:16   ` [PATCH 03/13] powerpc/book3e: Move doorbell_exception from traps.c to dbell.c Benjamin Herrenschmidt
2010-07-09  6:16     ` [PATCH 04/13] powerpc/book3e: More doorbell cleanups. Sample the PIR register Benjamin Herrenschmidt
2010-07-09  6:16       ` [PATCH 05/13] powerpc/book3e: Don't re-trigger decrementer on lazy irq restore Benjamin Herrenschmidt
2010-07-09  6:16         ` Benjamin Herrenschmidt [this message]
2010-07-09  6:16           ` [PATCH 07/13] powerpc/book3e: Use set_irq_regs() in the msgsnd/msgrcv IPI path Benjamin Herrenschmidt
2010-07-09  6:16             ` [PATCH 08/13] powerpc/book3e: Resend doorbell exceptions to ourself Benjamin Herrenschmidt
2010-07-09  6:16               ` [PATCH 09/13] powerpc/book3e: Add generic 64-bit idle powersave support Benjamin Herrenschmidt
2010-07-09  6:16                 ` [PATCH 10/13] powerpc/book3e: Fix single step when using HW page tables Benjamin Herrenschmidt
2010-07-09  6:16                   ` [PATCH 11/13] powerpc/book3e: Add TLB dump in xmon for Book3E Benjamin Herrenschmidt
2010-07-09  6:16                     ` [PATCH 12/13] powerpc/book3e: Adjust the page sizes list based on MMU config Benjamin Herrenschmidt
2010-07-09  6:16                       ` [PATCH 13/13] powerpc/oprofile: Don't build server oprofile drivers on 64-bit BookE Benjamin Herrenschmidt
2010-07-14  4:09                 ` [PATCH 09/13] powerpc/book3e: Add generic 64-bit idle powersave support Benjamin Herrenschmidt
2010-07-09  8:52   ` [PATCH 02/13] powerpc/book3e: Hack to get gdb moving along on Book3E 64-bit K.Prasad

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1278656215-24705-6-git-send-email-benh@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).