[PATCH 2/2] powerpc: collapse some equivalent asm macros

Stephen Rothwell sfr at canb.auug.org.au
Thu Nov 29 10:57:50 EST 2012


Since we removed the section changes from them, some of the entry point
macros are now the same, so just use the obvious ones.

Signed-off-by: Stephen Rothwell <sfr at canb.auug.org.au>
---
 arch/powerpc/include/asm/ppc_asm.h |   41 ------------------------------------
 arch/powerpc/kernel/head_64.S      |    6 +++---
 arch/powerpc/kernel/misc_32.S      |    2 +-
 arch/powerpc/kernel/misc_64.S      |    2 +-
 4 files changed, 5 insertions(+), 46 deletions(-)

diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h
index 5c9af12..896204c 100644
--- a/arch/powerpc/include/asm/ppc_asm.h
+++ b/arch/powerpc/include/asm/ppc_asm.h
@@ -212,32 +212,6 @@ name: \
 	.type GLUE(.,name), at function; \
 GLUE(.,name):
 
-#define _INIT_GLOBAL(name) \
-	.align 2 ; \
-	.globl name; \
-	.globl GLUE(.,name); \
-	.section ".opd","aw"; \
-name: \
-	.quad GLUE(.,name); \
-	.quad .TOC. at tocbase; \
-	.quad 0; \
-	.previous; \
-	.type GLUE(.,name), at function; \
-GLUE(.,name):
-
-#define _KPROBE(name) \
-	.align 2 ; \
-	.globl name; \
-	.globl GLUE(.,name); \
-	.section ".opd","aw"; \
-name: \
-	.quad GLUE(.,name); \
-	.quad .TOC. at tocbase; \
-	.quad 0; \
-	.previous; \
-	.type GLUE(.,name), at function; \
-GLUE(.,name):
-
 #define _STATIC(name) \
 	.align 2 ; \
 	.section ".opd","aw"; \
@@ -249,17 +223,6 @@ name: \
 	.type GLUE(.,name), at function; \
 GLUE(.,name):
 
-#define _INIT_STATIC(name) \
-	.align 2 ; \
-	.section ".opd","aw"; \
-name: \
-	.quad GLUE(.,name); \
-	.quad .TOC. at tocbase; \
-	.quad 0; \
-	.previous; \
-	.type GLUE(.,name), at function; \
-GLUE(.,name):
-
 #else /* 32-bit */
 
 #define _ENTRY(n)	\
@@ -271,10 +234,6 @@ n:
 	.globl n;	\
 n:
 
-#define _KPROBE(n)	\
-	.globl	n;	\
-n:
-
 #endif
 
 /* 
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index 8d3edb9..721d17b 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -355,7 +355,7 @@ _GLOBAL(__start_initialization_multiplatform)
 
 	__REF
 
-_INIT_STATIC(__boot_from_prom)
+_STATIC(__boot_from_prom)
 #ifdef CONFIG_PPC_OF_BOOT_TRAMPOLINE
 	/* Save parameters */
 	mr	r31,r3
@@ -687,7 +687,7 @@ p_toc:	.llong	__toc_start + 0x8000 - 0b
 /*
  * This is where the main kernel code starts.
  */
-_INIT_STATIC(start_here_multiplatform)
+_STATIC(start_here_multiplatform)
 	/* set up the TOC (real address) */
 	bl	.relative_toc
 
@@ -757,7 +757,7 @@ _INIT_STATIC(start_here_multiplatform)
 	b	.	/* prevent speculative execution */
 	
 	/* This is where all platforms converge execution */
-_INIT_GLOBAL(start_here_common)
+_GLOBAL(start_here_common)
 	/* relocation is on at this point */
 	std	r1,PACAKSAVE(r13)
 
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S
index 342c4d9..595af40 100644
--- a/arch/powerpc/kernel/misc_32.S
+++ b/arch/powerpc/kernel/misc_32.S
@@ -328,7 +328,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_UNIFIED_ID_CACHE)
  * flush_icache_range(unsigned long start, unsigned long stop)
  */
 	.section	".kprobes.text","a"
-_KPROBE(__flush_icache_range)
+_ENTRY(__flush_icache_range)
 BEGIN_FTR_SECTION
 	blr				/* for 601, do nothing */
 END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
index 0fbe125..bc29512 100644
--- a/arch/powerpc/kernel/misc_64.S
+++ b/arch/powerpc/kernel/misc_64.S
@@ -68,7 +68,7 @@ PPC64_CACHES:
  */
 
 	.section	".kprobes.text","a"
-_KPROBE(__flush_icache_range)
+_GLOBAL(__flush_icache_range)
 
 /*
  * Flush the data cache to memory 
-- 
1.7.10.280.gaa39

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20121129/fa1ad519/attachment.sig>


More information about the Linuxppc-dev mailing list