lkml.org 
[lkml]   [2021]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 09/14] vmlinux.lds.h: wrap built-in firmware support under its kconfig symbol
Date
From: Luis Chamberlain <mcgrof@kernel.org>

The firmware loader built-in firmware support now has a kconfig
symbol representing support for it. Use that to tuck away the
sections for built-in firmware.

This ensures no oddball user tries to uses these sections without
first enabling FW_LOADER_BUILTIN.

Reviewed-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
include/asm-generic/vmlinux.lds.h | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index f2984af2b85b..322af3d552ae 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -470,13 +470,7 @@
__end_pci_fixups_suspend_late = .; \
} \
\
- /* Built-in firmware blobs */ \
- .builtin_fw : AT(ADDR(.builtin_fw) - LOAD_OFFSET) ALIGN(8) { \
- __start_builtin_fw = .; \
- KEEP(*(.builtin_fw)) \
- __end_builtin_fw = .; \
- } \
- \
+ FW_LOADER_BUILT_IN_DATA \
TRACEDATA \
\
PRINTK_INDEX \
@@ -880,6 +874,18 @@
#define ORC_UNWIND_TABLE
#endif

+/* Built-in firmware blobs */
+#ifdef CONFIG_FW_LOADER_BUILTIN
+#define FW_LOADER_BUILT_IN_DATA \
+ .builtin_fw : AT(ADDR(.builtin_fw) - LOAD_OFFSET) ALIGN(8) { \
+ __start_builtin_fw = .; \
+ KEEP(*(.builtin_fw)) \
+ __end_builtin_fw = .; \
+ }
+#else
+#define FW_LOADER_BUILT_IN_DATA
+#endif
+
#ifdef CONFIG_PM_TRACE
#define TRACEDATA \
. = ALIGN(4); \
--
2.30.2
\
 
 \ /
  Last update: 2021-09-17 20:24    [W:0.103 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site