linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Piggin <nicholas.piggin@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Nicholas Piggin <npiggin@gmail.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Michael Ellerman <mpe@ellerman.id.au>
Subject: [PATCH 12/14] powerpc/pseries: remove unused exception code, small cleanups
Date: Thu, 21 Jul 2016 16:44:11 +1000	[thread overview]
Message-ID: <1469083453-9279-13-git-send-email-npiggin@gmail.com> (raw)
In-Reply-To: <1469083453-9279-1-git-send-email-npiggin@gmail.com>

This was not done before the big patches because I only noticed
them afterwards. It has become much easier to see which handlers
are branched to from which exception vectors now, and to see
exactly what vector space is being used for what.

Signed-off-by: Nick Piggin <npiggin@gmail.com>
---
 arch/powerpc/kernel/exceptions-64s.S | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index 9832765..b7a8a66 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -90,6 +90,9 @@ USE_FIXED_SECTION(real_vectors)
 	.globl __start_interrupts
 __start_interrupts:
 
+/* No virt vectors corresponding with 0x0..0x100 */
+VECTOR_HANDLER_VIRT_NONE(0x4000, 0x4100)
+
 VECTOR_HANDLER_REAL_BEGIN(system_reset, 0x100, 0x200)
 	SET_SCRATCH0(r13)
 #ifdef CONFIG_PPC_P7_NAP
@@ -891,9 +894,7 @@ TRAMP_KVM(PACA_EXGEN, 0xd00)
 COMMON_HANDLER(single_step_common, 0xd00, single_step_exception)
 
 VECTOR_HANDLER_REAL_OOL_HV(h_data_storage, 0xe00, 0xe20)
-VECTOR_HANDLER_VIRT_BEGIN(unused, 0x4e00, 0x4e20)
-	b       .       /* Can't happen, see v2.07 Book III-S section 6.5 */
-VECTOR_HANDLER_VIRT_END(unused, 0x4e00, 0x4e20)
+VECTOR_HANDLER_VIRT_NONE(0x4e00, 0x4e20)
 TRAMP_KVM_HV_SKIP(PACA_EXGEN, 0xe00)
 COMMON_HANDLER_BEGIN(h_data_storage_common)
 	mfspr   r10,SPRN_HDAR
@@ -907,13 +908,10 @@ COMMON_HANDLER_BEGIN(h_data_storage_common)
 	bl      unknown_exception
 	b       ret_from_except
 COMMON_HANDLER_END(h_data_storage_common)
-COMMON_HANDLER(trap_0e_common, 0xe00, unknown_exception)
 
 
 VECTOR_HANDLER_REAL_OOL_HV(h_instr_storage, 0xe20, 0xe40)
-VECTOR_HANDLER_VIRT_BEGIN(unused, 0x4e20, 0x4e40)
-	b       .       /* Can't happen, see v2.07 Book III-S section 6.5 */
-VECTOR_HANDLER_VIRT_END(unused, 0x4e20, 0x4e40)
+VECTOR_HANDLER_VIRT_NONE(0x4e20, 0x4e40)
 TRAMP_KVM_HV(PACA_EXGEN, 0xe20)
 COMMON_HANDLER(h_instr_storage_common, 0xe20, unknown_exception)
 
@@ -925,9 +923,7 @@ COMMON_HANDLER(emulation_assist_common, 0xe40, emulation_assist_interrupt)
 
 
 __VECTOR_HANDLER_REAL_OOL_HV_DIRECT(hmi_exception, 0xe60, 0xe80, hmi_exception_early)
-VECTOR_HANDLER_VIRT_BEGIN(unused, 0x4e60, 0x4e80)
-	b       .       /* Can't happen, see v2.07 Book III-S section 6.5 */
-VECTOR_HANDLER_VIRT_END(unused, 0x4e60, 0x4e80)
+VECTOR_HANDLER_VIRT_NONE(0x4e60, 0x4e80)
 TRAMP_KVM_HV(PACA_EXGEN, 0xe60)
 COMMON_HANDLER_BEGIN(hmi_exception_early)
 	EXCEPTION_PROLOG_1(PACA_EXGEN, NOTEST, 0xe60)
@@ -1100,6 +1096,7 @@ COMMON_HANDLER(cbe_system_error_common, 0x1200, cbe_system_error_exception)
 
 #else /* CONFIG_CBE_RAS */
 VECTOR_HANDLER_REAL_NONE(0x1200, 0x1300)
+VECTOR_HANDLER_VIRT_NONE(0x5200, 0x5300)
 #endif
 
 
@@ -1212,6 +1209,7 @@ COMMON_HANDLER(cbe_maintenance, 0x1600, cbe_maintenance_exception)
 
 #else /* CONFIG_CBE_RAS */
 VECTOR_HANDLER_REAL_NONE(0x1600, 0x1700)
+VECTOR_HANDLER_VIRT_NONE(0x5600, 0x5700)
 #endif
 
 
@@ -1233,8 +1231,11 @@ COMMON_HANDLER(cbe_thermal, 0x1800, cbe_thermal_exception)
 
 #else /* CONFIG_CBE_RAS */
 VECTOR_HANDLER_REAL_NONE(0x1800, 0x1900)
+VECTOR_HANDLER_VIRT_NONE(0x5800, 0x5900)
 #endif
 
+VECTOR_HANDLER_REAL_NONE(0x1900, 0x2000)
+VECTOR_HANDLER_VIRT_NONE(0x5900, 0x6000)
 
 /*
  * An interrupt came in while soft-disabled. We set paca->irq_happened, then:
-- 
2.8.1

  parent reply	other threads:[~2016-07-21  6:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-21  6:43 [RFC][PATCH 00/14] pseries exception cleanups Nicholas Piggin
2016-07-21  6:44 ` [PATCH 01/14] powerpc: add arch/powerpc/tools directory Nicholas Piggin
2016-07-21  6:44 ` [PATCH 02/14] powerpc/pseries: remove cross-fixup branches in exception code Nicholas Piggin
2016-07-21  6:44 ` [PATCH 03/14] powerpc: build-time fixup alternate feature relative addresses Nicholas Piggin
2016-07-21 13:39   ` Nicholas Piggin
2016-07-21  6:44 ` [PATCH 04/14] powerpc/pseries: move decrementer exception vector out of line Nicholas Piggin
2016-07-21  6:44 ` [PATCH 05/14] powerpc/pseries: 4GB exception handler offsets Nicholas Piggin
2016-07-21 14:34   ` David Laight
2016-07-22  7:52     ` Nicholas Piggin
2016-07-21  6:44 ` [PATCH 06/14] powerpc/pseries: h_facility_unavailable realmode exception location Nicholas Piggin
2016-07-21  6:44 ` [PATCH 07/14] powerpc/pseries: improved exception vector macros Nicholas Piggin
2016-07-21  6:44 ` [PATCH 08/14] powerpc/pseries: consolidate exception handler alignment Nicholas Piggin
2016-07-21  6:44 ` [PATCH 09/14] powerpc/64: use gas sections for arranging exception vectors Nicholas Piggin
2016-07-21  6:44 ` [PATCH 10/14] powerpc/pseries: move related exception code together Nicholas Piggin
2016-07-21  6:44 ` [PATCH 11/14] powerpc/pseries: use single macro for both parts of OOL exception Nicholas Piggin
2016-07-21  6:44 ` Nicholas Piggin [this message]
2016-07-21  6:44 ` [PATCH 13/14] powerpc/pseries: consolidate slb exceptions Nicholas Piggin
2016-07-21  6:44 ` [PATCH 14/14] powerpc/pseries: exceptions use short handler load again Nicholas Piggin

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=1469083453-9279-13-git-send-email-npiggin@gmail.com \
    --to=nicholas.piggin@gmail.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    /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).