Thread (8 messages) 8 messages, 4 authors, 2020-11-30

Re: [PATCH] powerpc: fix the allyesconfig build

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2020-11-30 08:59:32
Also in: linux-clk, linux-renesas-soc, lkml, netdev

Hi Stephen,

On Sat, Nov 28, 2020 at 2:28 AM Stephen Rothwell [off-list ref] wrote:
There are 2 drivers that have arrays of packed structures that contain
pointers that end up at unaligned offsets.  These produce warnings in
the PowerPC allyesconfig build like this:

WARNING: 148 bad relocations
c00000000e56510b R_PPC64_UADDR64   .rodata+0x0000000001c72378
c00000000e565126 R_PPC64_UADDR64   .rodata+0x0000000001c723c0

They are not drivers that are used on PowerPC (I assume), so mark them
to not be built on PPC64 when CONFIG_RELOCATABLE is enabled.

Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Yisen Zhuang <redacted>
Cc: Salil Mehta <redacted>
Cc: David S. Miller <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Nicholas Piggin  <npiggin@gmail.com>
Cc: Daniel Axtens <redacted>
Cc: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stephen Rothwell <redacted>
Thanks for your patch!
quoted hunk ↗ jump to hunk
--- a/drivers/clk/renesas/Kconfig
+++ b/drivers/clk/renesas/Kconfig
@@ -151,6 +151,10 @@ config CLK_R8A779A0
        select CLK_RENESAS_CPG_MSSR

 config CLK_R9A06G032
+       # PPC64 RELOCATABLE kernels cannot handle relocations to
+       # unaligned locations that are produced by the array of
+       # packed structures in this driver.
+       depends on !(PPC64 && RELOCATABLE)
        bool "Renesas R9A06G032 clock driver"
        help
          This is a driver for R9A06G032 clocks
I prefer to fix this in the driver instead.  The space saving by packing the
structure is minimal.
I've sent a patch
https://lore.kernel.org/r/20201130085743.1656317-1-geert+renesas@glider.be (local)
(when lore is back)

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help