From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] clk: of: fix clk_of_table generation
Date: Wed, 10 Jun 2015 06:58:02 +0200 [thread overview]
Message-ID: <1433912282-10774-1-git-send-email-s.hauer@pengutronix.de> (raw)
We used to collect all sections beginning with __clk_of_table_ in a single
section in the linker using KEEP(*(.__clk_of_table_*)). That the sentinel
entry ended up as the last entry was pure luck, but not always the case.
Instead of putting all entries in different sections we now put all entries
in the same section. Only the sentinel entry gets its own section and is
collected by the linker separately.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reported-by: Andreas Willig <andreas.willig@rafi.de>
---
include/asm-generic/barebox.lds.h | 3 ++-
include/linux/clk.h | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/asm-generic/barebox.lds.h b/include/asm-generic/barebox.lds.h
index 254397e..00d6eca 100644
--- a/include/asm-generic/barebox.lds.h
+++ b/include/asm-generic/barebox.lds.h
@@ -47,7 +47,8 @@
#define BAREBOX_CLK_TABLE() \
. = ALIGN(8); \
__clk_of_table_start = .; \
- KEEP(*(.__clk_of_table_*)); \
+ KEEP(*(.__clk_of_table)); \
+ KEEP(*(.__clk_of_table_end)); \
__clk_of_table_end = .;
#define BAREBOX_DTB() \
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 4aeec63..7a0ee11 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -321,7 +321,7 @@ struct of_phandle_args;
#define CLK_OF_DECLARE(name, compat, fn) \
const struct of_device_id __clk_of_table_##name \
-__attribute__ ((unused,section (".__clk_of_table_" __stringify(name)))) \
+__attribute__ ((unused,section (".__clk_of_table"))) \
= { .compatible = compat, .data = fn }
#if defined(CONFIG_OFTREE) && defined(CONFIG_COMMON_CLK_OF_PROVIDER)
--
2.1.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
reply other threads:[~2015-06-10 4:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1433912282-10774-1-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.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