Thread (35 messages) 35 messages, 5 authors, 2018-10-19

[PATCH 09/12] platform/early: add an init section for early driver data

From: Bartosz Golaszewski <hidden>
Date: 2018-05-15 08:41:45
Also in: linux-arch, linux-devicetree, lkml

2018-05-14 23:29 GMT+02:00 Geert Uytterhoeven [off-list ref]:
Hi Bartosz,

On Fri, May 11, 2018 at 6:20 PM, Bartosz Golaszewski [off-list ref] wrote:
quoted
From: Bartosz Golaszewski <redacted>

Provide a separate section in which pointers to early platform driver
structs will be stored.

Signed-off-by: Bartosz Golaszewski <redacted>
Thanks for your patch!
quoted
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -214,6 +214,16 @@
 #define CPU_METHOD_OF_TABLES() OF_TABLE(CONFIG_SMP, cpu_method)
 #define CPUIDLE_METHOD_OF_TABLES() OF_TABLE(CONFIG_CPU_IDLE, cpuidle_method)

+#ifdef CONFIG_EARLY_PLATFORM
+#define EARLY_PLATFORM_DRIVERS_TABLE()                                 \
+       . = ALIGN(8);                                                   \
Should this use STRUCT_ALIGN() instead?
No, we're only using it to store pointers to structs, not the actual
struct early_platform_driver objects.
quoted
+       VMLINUX_SYMBOL(__early_platform_drivers_table) = .;             \
+       KEEP(*(__early_platform_drivers_table))                         \
+       VMLINUX_SYMBOL(__early_platform_drivers_table_end) = .;
+#else
+#define EARLY_PLATFORM_DRIVERS_TABLE()
+#endif
Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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
Thanks,
Bartosz
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help