diff mbox

[v4,3/3] ppc64/book3s: remove __end_handlers marker

Message ID 20160407215914.8404.10459.stgit@hbathini.in.ibm.com (mailing list archive)
State Accepted
Headers show

Commit Message

Hari Bathini April 7, 2016, 10 p.m. UTC
__end_handlers marker was intended to mark down upto code that gets
called from exception prologs. But that hasn't kept pace with code
changes. Case in point, slb_miss_realmode being called from exception
prolog code but isn't below __end_handlers marker. So, __end_handlers
marker is as good as a comment but could be misleading at times if
it isn't in sync with the code, as is the case now. So, let us avoid
this confusion by having a better comment and removing __end_handlers
marker altogether.

Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/exceptions-64s.S |   13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

Comments

Michael Ellerman April 21, 2016, 1:39 p.m. UTC | #1
On Thu, 2016-07-04 at 22:00:34 UTC, Hari Bathini wrote:
> __end_handlers marker was intended to mark down upto code that gets
> called from exception prologs. But that hasn't kept pace with code
> changes. Case in point, slb_miss_realmode being called from exception
> prolog code but isn't below __end_handlers marker. So, __end_handlers
> marker is as good as a comment but could be misleading at times if
> it isn't in sync with the code, as is the case now. So, let us avoid
> this confusion by having a better comment and removing __end_handlers
> marker altogether.
> 
> Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/057b6d7e62ea4e6b1809e29469

cheers
diff mbox

Patch

diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index c193ebd..80f9fc4 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -764,11 +764,10 @@  kvmppc_skip_Hinterrupt:
 #endif
 
 /*
- * Code from here down to __end_handlers is invoked from the
- * exception prologs above.  Because the prologs assemble the
- * addresses of these handlers using the LOAD_HANDLER macro,
- * which uses an ori instruction, these handlers must be in
- * the first 64k of the kernel image.
+ * Ensure that any handlers that get invoked from the exception prologs
+ * above are below the first 64KB (0x10000) of the kernel image because
+ * the prologs assemble the addresses of these handlers using the
+ * LOAD_HANDLER macro, which uses an ori instruction.
  */
 
 /*** Common interrupt handlers ***/
@@ -1243,10 +1242,6 @@  END_FTR_SECTION_IFSET(CPU_FTR_VSX)
 	bl	vsx_unavailable_exception
 	b	ret_from_except
 
-	.align	7
-	.globl	__end_handlers
-__end_handlers:
-
 #if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV)
 /*
  * Data area reserved for FWNMI option.