From: Mike Frysinger <vapier@gentoo.org>
To: linux-kernel@vger.kernel.org, Tejun Heo <tj@kernel.org>
Cc: uclinux-dist-devel@blackfin.uclinux.org
Subject: [PATCH 1/2 v2] percpu: unify input section names
Date: Fri, 1 Apr 2011 18:15:34 -0400 [thread overview]
Message-ID: <1301696134-31249-1-git-send-email-vapier@gentoo.org> (raw)
In-Reply-To: <1301601122-25431-1-git-send-email-vapier@gentoo.org>
The two percpu helper macros have the section names duplicated. So create
a new define to merge the two. This also allows arches who need to link
things more directly themselves to avoid duplicating the input sections in
their linker script.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
v2
- rebased onto latest mainline
include/asm-generic/vmlinux.lds.h | 44 ++++++++++++++++++++----------------
1 files changed, 24 insertions(+), 20 deletions(-)
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 32c45e5..bf90fbc 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -688,6 +688,28 @@
}
/**
+ * PERCPU_INPUT - the percpu input sections
+ * @cacheline: cacheline size
+ *
+ * The core percpu section names and core symbols which do not rely
+ * directly upon load addresses.
+ *
+ * @cacheline is used to align subsections to avoid false cacheline
+ * sharing between subsections for different purposes.
+ */
+#define PERCPU_INPUT(cacheline) \
+ VMLINUX_SYMBOL(__per_cpu_start) = .; \
+ *(.data..percpu..first) \
+ . = ALIGN(PAGE_SIZE); \
+ *(.data..percpu..page_aligned) \
+ . = ALIGN(cacheline); \
+ *(.data..percpu..readmostly) \
+ . = ALIGN(cacheline); \
+ *(.data..percpu) \
+ *(.data..percpu..shared_aligned) \
+ VMLINUX_SYMBOL(__per_cpu_end) = .;
+
+/**
* PERCPU_VADDR - define output section for percpu area
* @cacheline: cacheline size
* @vaddr: explicit base address (optional)
@@ -715,16 +737,7 @@
VMLINUX_SYMBOL(__per_cpu_load) = .; \
.data..percpu vaddr : AT(VMLINUX_SYMBOL(__per_cpu_load) \
- LOAD_OFFSET) { \
- VMLINUX_SYMBOL(__per_cpu_start) = .; \
- *(.data..percpu..first) \
- . = ALIGN(PAGE_SIZE); \
- *(.data..percpu..page_aligned) \
- . = ALIGN(cacheline); \
- *(.data..percpu..readmostly) \
- . = ALIGN(cacheline); \
- *(.data..percpu) \
- *(.data..percpu..shared_aligned) \
- VMLINUX_SYMBOL(__per_cpu_end) = .; \
+ PERCPU_INPUT(cacheline) \
} phdr \
. = VMLINUX_SYMBOL(__per_cpu_load) + SIZEOF(.data..percpu);
@@ -745,16 +758,7 @@
. = ALIGN(align); \
.data..percpu : AT(ADDR(.data..percpu) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__per_cpu_load) = .; \
- VMLINUX_SYMBOL(__per_cpu_start) = .; \
- *(.data..percpu..first) \
- . = ALIGN(PAGE_SIZE); \
- *(.data..percpu..page_aligned) \
- . = ALIGN(cacheline); \
- *(.data..percpu..readmostly) \
- . = ALIGN(cacheline); \
- *(.data..percpu) \
- *(.data..percpu..shared_aligned) \
- VMLINUX_SYMBOL(__per_cpu_end) = .; \
+ PERCPU_INPUT(cacheline) \
}
--
1.7.4.1
next prev parent reply other threads:[~2011-04-01 22:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-31 19:52 [PATCH 1/2] " Mike Frysinger
2011-03-31 19:52 ` [PATCH 2/2] Blackfin: use new common PERCPU_INPUT define Mike Frysinger
2011-03-31 19:55 ` [uclinux-dist-devel] " Mike Frysinger
2011-04-01 7:29 ` [PATCH 1/2] percpu: unify input section names Tejun Heo
2011-04-01 22:15 ` Mike Frysinger [this message]
2011-04-03 23:44 ` [PATCH 1/2 v2] " Tejun Heo
2011-05-24 1:46 ` [uclinux-dist-devel] " Mike Frysinger
2011-05-24 9:37 ` Tejun Heo
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=1301696134-31249-1-git-send-email-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
--cc=uclinux-dist-devel@blackfin.uclinux.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
all inboxes | Powered by JetHome®