From: Milton Miller <miltonm@bga.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: [1/3] powerpc: add _HEAD_GLOBAL to place functions in .text.head
Date: Thu, 10 Jul 2008 16:14:53 -0500 (CDT) [thread overview]
Message-ID: <for-27-patch2-1@bga.com> (raw)
In-Reply-To: <for-27-patch1-0@bga.com>
This is the first step to moving the interrupt vectors to .text.head.
Rather than creating more repetition, factor out creating a function
descriptor, from declaring it to be global in a section.
The order of .globl and the symbol definitions is changed but is
a don't care.
Signed-off-by: Milton Miller <miltonm@bga.com>
---
I left the section in the macros, and added a new macro. I didn't
want to hunt down other uses of _GLOBAL to audit the section, and _KPROBE
needs to set the section.
diff --git a/include/asm-powerpc/ppc_asm.h b/include/asm-powerpc/ppc_asm.h
index 0966899..cb5a4b0 100644
--- a/include/asm-powerpc/ppc_asm.h
+++ b/include/asm-powerpc/ppc_asm.h
@@ -178,11 +178,8 @@ END_FTR_SECTION_IFCLR(CPU_FTR_PURR); \
#define XGLUE(a,b) a##b
#define GLUE(a,b) XGLUE(a,b)
-#define _GLOBAL(name) \
- .section ".text"; \
+#define _FUNCTION(name) \
.align 2 ; \
- .globl name; \
- .globl GLUE(.,name); \
.section ".opd","aw"; \
name: \
.quad GLUE(.,name); \
@@ -192,57 +189,41 @@ name: \
.type GLUE(.,name),@function; \
GLUE(.,name):
+#define _GLOBAL(name) \
+ .section ".text"; \
+ .globl name; \
+ .globl GLUE(.,name); \
+ _FUNCTION(name)
+
#define _INIT_GLOBAL(name) \
.section ".text.init.refok"; \
- .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):
+ _FUNCTION(name)
+
+#define _HEAD_GLOBAL(name) \
+ .section ".text.head"; \
+ .globl name; \
+ .globl GLUE(.,name); \
+ _FUNCTION(name)
#define _KPROBE(name) \
.section ".kprobes.text","a"; \
- .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):
+ _FUNCTION(name)
#define _STATIC(name) \
.section ".text"; \
- .align 2 ; \
- .section ".opd","aw"; \
-name: \
- .quad GLUE(.,name); \
- .quad .TOC.@tocbase; \
- .quad 0; \
- .previous; \
- .type GLUE(.,name),@function; \
-GLUE(.,name):
+ _FUNCTION(name)
#define _INIT_STATIC(name) \
.section ".text.init.refok"; \
- .align 2 ; \
- .section ".opd","aw"; \
-name: \
- .quad GLUE(.,name); \
- .quad .TOC.@tocbase; \
- .quad 0; \
- .previous; \
- .type GLUE(.,name),@function; \
-GLUE(.,name):
+ _FUNCTION(name)
+
+#define _HEAD_STATIC(name) \
+ .section ".text.head"; \
+ _FUNCTION(name)
#else /* 32-bit */
next prev parent reply other threads:[~2008-07-10 21:16 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-10 21:12 [RFC] (almost) booting allyesconfig -- please don't poke super-io without request_region Milton Miller
2008-07-10 21:14 ` mtd: remove __PPC__ hardcoded address from nand/diskonchip and devices/docprobe Milton Miller
2008-07-10 21:14 ` Milton Miller [this message]
2008-07-10 21:16 ` [2/3] powerpc: head_64.S: put irq vectors in .text.head Milton Miller
2008-07-10 21:19 ` powerpc: numa.c: always trim to lmb_end_of_DRAM Milton Miller
2008-07-10 21:20 ` powerpc: pseries, cell: use cpu_thread_in_core in smp_init for of_spin_map Milton Miller
2008-07-10 21:22 ` powerpc: find and destroy possible stale kernel added properties Milton Miller
2008-07-10 21:23 ` powerpc: add static and ifdef prom_strtoul and prom_memparse Milton Miller
2008-07-10 21:29 ` [PATCH] spufs: correct kcalloc usage Milton Miller
2008-07-10 23:04 ` Jeremy Kerr
2008-07-10 21:33 ` [lm-sensors] [RFC] (almost) booting allyesconfig -- please don't poke super-io without request_region Hans de Goede
2008-07-10 21:51 ` Milton Miller
2008-07-11 6:52 ` Jean Delvare
2008-07-11 7:27 ` Hans de Goede
2008-07-11 7:36 ` Jean Delvare
2008-07-13 6:31 ` Hans de Goede
2008-07-13 21:11 ` [lm-sensors] " David Hubbard
2008-07-13 21:22 ` Hans de Goede
2008-07-13 21:26 ` David Hubbard
2008-07-14 7:59 ` Jean Delvare
2008-07-14 17:09 ` Milton Miller
2008-07-14 17:30 ` [lm-sensors] " Hans de Goede
2008-07-14 17:55 ` David Hubbard
2008-07-15 8:36 ` Jean Delvare
2008-07-15 15:31 ` David Hubbard
2008-07-16 7:46 ` Jean Delvare
2008-07-16 8:09 ` Rene Herman
2008-07-15 8:28 ` Jean Delvare
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=for-27-patch2-1@bga.com \
--to=miltonm@bga.com \
--cc=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).