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 02/12] powerpc: Use the same interrupt prolog for perfmon as other interrupts
Date: Fri,  2 Mar 2012 20:35:12 +1100	[thread overview]
Message-ID: <1330680922-6894-3-git-send-email-benh@kernel.crashing.org> (raw)
In-Reply-To: <1330680922-6894-1-git-send-email-benh@kernel.crashing.org>

The perfmon interrupt is the sole user of a special variant of the
interrupt prolog which differs from the one used by external and timer
interrupts in that it saves the non-volatile GPRs and doesn't turn the
runlatch on.

The former is unnecessary and the later is arguably incorrect, so
let's clean that up by using the same prolog. While at it we rename
that prolog to use the _ASYNC prefix.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/include/asm/exception-64s.h |   17 +++--------------
 arch/powerpc/kernel/exceptions-64s.S     |    6 +++---
 2 files changed, 6 insertions(+), 17 deletions(-)

diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/include/asm/exception-64s.h
index cc2bcf4..041b222 100644
--- a/arch/powerpc/include/asm/exception-64s.h
+++ b/arch/powerpc/include/asm/exception-64s.h
@@ -297,21 +297,10 @@ label##_common:						\
 
 /*
  * Like STD_EXCEPTION_COMMON, but for exceptions that can occur
- * in the idle task and therefore need the special idle handling.
+ * in the idle task and therefore need the special idle handling
+ * (finish nap and runlatch)
  */
-#define STD_EXCEPTION_COMMON_IDLE(trap, label, hdlr)	\
-	.align	7;					\
-	.globl label##_common;				\
-label##_common:						\
-	EXCEPTION_PROLOG_COMMON(trap, PACA_EXGEN);	\
-	FINISH_NAP;					\
-	DISABLE_INTS;					\
-	bl	.save_nvgprs;				\
-	addi	r3,r1,STACK_FRAME_OVERHEAD;		\
-	bl	hdlr;					\
-	b	.ret_from_except
-
-#define STD_EXCEPTION_COMMON_LITE(trap, label, hdlr)	\
+#define STD_EXCEPTION_COMMON_ASYNC(trap, label, hdlr)	\
 	.align	7;					\
 	.globl label##_common;				\
 label##_common:						\
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index fea8a69..2240d4e 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -458,15 +458,15 @@ machine_check_common:
 	bl	.machine_check_exception
 	b	.ret_from_except
 
-	STD_EXCEPTION_COMMON_LITE(0x500, hardware_interrupt, do_IRQ)
-	STD_EXCEPTION_COMMON_LITE(0x900, decrementer, .timer_interrupt)
+	STD_EXCEPTION_COMMON_ASYNC(0x500, hardware_interrupt, do_IRQ)
+	STD_EXCEPTION_COMMON_ASYNC(0x900, decrementer, .timer_interrupt)
 	STD_EXCEPTION_COMMON(0xa00, trap_0a, .unknown_exception)
 	STD_EXCEPTION_COMMON(0xb00, trap_0b, .unknown_exception)
 	STD_EXCEPTION_COMMON(0xd00, single_step, .single_step_exception)
 	STD_EXCEPTION_COMMON(0xe00, trap_0e, .unknown_exception)
         STD_EXCEPTION_COMMON(0xe40, emulation_assist, .program_check_exception)
         STD_EXCEPTION_COMMON(0xe60, hmi_exception, .unknown_exception)
-	STD_EXCEPTION_COMMON_IDLE(0xf00, performance_monitor, .performance_monitor_exception)
+	STD_EXCEPTION_COMMON_ASYNC(0xf00, performance_monitor, .performance_monitor_exception)
 	STD_EXCEPTION_COMMON(0x1300, instruction_breakpoint, .instruction_breakpoint_exception)
 #ifdef CONFIG_ALTIVEC
 	STD_EXCEPTION_COMMON(0x1700, altivec_assist, .altivec_assist_exception)
-- 
1.7.9

  parent reply	other threads:[~2012-03-02  9:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-02  9:35 [PATCH 00/12] powerpc: Low level spring cleaning Benjamin Herrenschmidt
2012-03-02  9:35 ` [PATCH 01/12] powerpc: Remove legacy iSeries bits from assembly files Benjamin Herrenschmidt
2012-03-02  9:35 ` Benjamin Herrenschmidt [this message]
2012-03-02  9:35 ` [PATCH 03/12] powerpc: Rework runlatch code Benjamin Herrenschmidt
2012-03-02  9:35 ` [PATCH 04/12] powerpc: Improve 64-bit syscall entry/exit Benjamin Herrenschmidt
2012-03-02  9:35 ` [PATCH 05/12] powerpc: Improve behaviour of irq tracing on 64-bit exception entry Benjamin Herrenschmidt
2012-03-02  9:35 ` [PATCH 06/12] powerpc: Disable interrupts in 64-bit kernel FP and vector faults Benjamin Herrenschmidt
2012-03-02  9:35 ` [PATCH 07/12] powerpc: Call do_page_fault() with interrupts off Benjamin Herrenschmidt
2012-03-02  9:35 ` [PATCH 08/12] powerpc: Add support for page fault retry and fatal signals Benjamin Herrenschmidt
2012-03-02  9:35 ` [PATCH 09/12] powerpc/xmon: Add display of soft & hard irq states Benjamin Herrenschmidt
2012-03-02  9:35 ` [PATCH 10/12] powerpc: Fix register clobbering when accumulating stolen time Benjamin Herrenschmidt
2012-03-02  9:35 ` [PATCH 11/12] powerpc: Replace mfmsr instructions with load from PACA kernel_msr field Benjamin Herrenschmidt
2012-03-02  9:35 ` [PATCH 12/12] powerpc: Rework lazy-interrupt handling Benjamin Herrenschmidt
2012-03-04 23:11   ` Benjamin Herrenschmidt
     [not found] ` <1330680922-6894-4-git-send-email-benh__48089.0872575857$1330681158$gmane$org@kernel.crashing.org>
2012-04-05 21:38   ` [PATCH 03/12] powerpc: Rework runlatch code Andreas Schwab
2012-04-05 22:12     ` Benjamin Herrenschmidt
2012-04-05 23:05       ` Andreas Schwab
2012-04-11  0:46     ` Benjamin Herrenschmidt
2012-04-11  9:09       ` Andreas Schwab

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=1330680922-6894-3-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).