Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1299915

[PATCH] [BUG] clk: rockchip: don't mark clock names as initconst

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject [PATCH] [BUG] clk: rockchip: don't mark clock names as initconst
Date 2016-01-01 14:50 +0100
Message-ID <qM8fD-36h-9@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


The latest changes to the rockchip clk implementation cause
tons of warnings and/or errors (depending on the configuration):

WARNING: vmlinux.o(.data+0x125394): Section mismatch in reference from the variable __compound_literal.125 to the (unknown reference) .init.rodata:(unknown)

The reason is a compount literal in a macro that refers to an
object in the .init.rodata section:

 #define COMPOSITE_FRACMUX(_id, cname, pname, f, mo, df, go, gs, gf, ch) \
        {                                                       \
		...
                .child          = &(struct rockchip_clk_branch)ch, \
        }

'ch' here is placed in .data, and I could find no way to override that
using an attribute or pragma because there is no identifier associated
with it.

This patch avoids the warning by placing the names in .rodata rather than
.init.rodata. However, it is not an ideal solution because we really
want all those data structures to be discarded along with the initdata.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 8ca1ca8f6039 ("clk: rockchip: handle mux dependency of fractional dividers")

diff --git a/drivers/clk/rockchip/clk.h b/drivers/clk/rockchip/clk.h
index 3f71ee5d1bc9..5cadf5e3fb16 100644
--- a/drivers/clk/rockchip/clk.h
+++ b/drivers/clk/rockchip/clk.h
@@ -244,7 +244,7 @@ struct clk *rockchip_clk_register_inverter(const char *name,
 				void __iomem *reg, int shift, int flags,
 				spinlock_t *lock);
 
-#define PNAME(x) static const char *const x[] __initconst
+#define PNAME(x) static const char *const x[]
 
 enum rockchip_clk_branch_type {
 	branch_composite,

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] [BUG] clk: rockchip: don't mark clock names as initconst Arnd Bergmann <arnd@arndb.de> - 2016-01-01 14:50 +0100
  Re: [PATCH] [BUG] clk: rockchip: don't mark clock names as initconst Heiko Stübner <heiko@sntech.de> - 2016-01-01 18:10 +0100
    Re: [PATCH] [BUG] clk: rockchip: don't mark clock names as initconst Arnd Bergmann <arnd@arndb.de> - 2016-01-01 23:00 +0100
      Re: [PATCH] [BUG] clk: rockchip: don't mark clock names as initconst Heiko Stübner <heiko@sntech.de> - 2016-01-01 23:10 +0100
        Re: [PATCH] [BUG] clk: rockchip: don't mark clock names as initconst Michael Turquette <mturquette@baylibre.com> - 2016-01-02 22:50 +0100

csiph-web