From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Alan Modra <amodra@au1.ibm.com>, ppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: [PATCH 2/2] powerpc: collapse some equivalent asm macros
Date: Thu, 29 Nov 2012 10:57:50 +1100 [thread overview]
Message-ID: <20121129105750.ed10228886a7dcd62a71eaba@canb.auug.org.au> (raw)
In-Reply-To: <20121129105525.0e47b3b3e51aebe7ded3b7b6@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 3744 bytes --]
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@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),@function; \
GLUE(.,name):
-#define _INIT_GLOBAL(name) \
- .align 2 ; \
- .globl name; \
- .globl GLUE(.,name); \
- .section ".opd","aw"; \
-name: \
- .quad GLUE(.,name); \
- .quad .TOC.@tocbase; \
- .quad 0; \
- .previous; \
- .type GLUE(.,name),@function; \
-GLUE(.,name):
-
-#define _KPROBE(name) \
- .align 2 ; \
- .globl name; \
- .globl GLUE(.,name); \
- .section ".opd","aw"; \
-name: \
- .quad GLUE(.,name); \
- .quad .TOC.@tocbase; \
- .quad 0; \
- .previous; \
- .type GLUE(.,name),@function; \
-GLUE(.,name):
-
#define _STATIC(name) \
.align 2 ; \
.section ".opd","aw"; \
@@ -249,17 +223,6 @@ name: \
.type GLUE(.,name),@function; \
GLUE(.,name):
-#define _INIT_STATIC(name) \
- .align 2 ; \
- .section ".opd","aw"; \
-name: \
- .quad GLUE(.,name); \
- .quad .TOC.@tocbase; \
- .quad 0; \
- .previous; \
- .type GLUE(.,name),@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@canb.auug.org.au
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-11-28 23:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-28 23:55 [PATCH 1/2] powerpc: remove section changes from _GLOBAL() and friends Stephen Rothwell
2012-11-28 23:57 ` Stephen Rothwell [this message]
2013-04-15 12:00 ` Michael Ellerman
2013-04-15 13:30 ` Stephen Rothwell
2013-04-15 16:17 ` Stephen Rothwell
2013-04-16 8:33 ` Michael Ellerman
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=20121129105750.ed10228886a7dcd62a71eaba@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=amodra@au1.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.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).