@@ -1466,6 +1466,12 @@ config ARCH_HAS_NONLEAF_PMD_YOUNG
address translations. Page table walkers that clear the accessed bit
may use this capability to reduce their search space.
+config ARCH_HAS_EDID_INFO
+ bool
+ help
+ Selected by architectures that provide a global instance of
+ edid_info.
+
config ARCH_HAS_SCREEN_INFO
bool
help
@@ -76,6 +76,7 @@ config X86
select ARCH_HAS_DEBUG_VM_PGTABLE if !X86_PAE
select ARCH_HAS_DEVMEM_IS_ALLOWED
select ARCH_HAS_EARLY_DEBUG if KGDB
+ select ARCH_HAS_EDID_INFO
select ARCH_HAS_ELF_RANDOMIZE
select ARCH_HAS_FAST_MULTIPLIER
select ARCH_HAS_FORTIFY_SOURCE
@@ -21,9 +21,6 @@ config STI_CORE
config VIDEO_CMDLINE
bool
-config ARCH_HAS_SCREEN_INFO
- bool
-
config VIDEO_NOMODESET
bool
default n
@@ -5,6 +5,12 @@
#include <uapi/linux/screen_info.h>
+#include <video/edid.h>
+
+#if defined(CONFIG_ARCH_HAS_EDID_INFO)
+extern struct edid_info edid_info;
+#endif
+
#if defined(CONFIG_ARCH_HAS_SCREEN_INFO)
extern struct screen_info screen_info;
#endif
@@ -4,7 +4,4 @@
#include <uapi/video/edid.h>
-#ifdef CONFIG_X86
-extern struct edid_info edid_info;
-#endif
#endif /* __linux_video_edid_h__ */
The global variable edid_info contains the firmware's EDID information as an extension to the regular screen_info on x86. Therefore move it to <asm/screen_info.h>. Add the Kconfig token ARCH_HAS_EDID_INFO to guard against access on architectures that don't provide edid_info. Select it on x86. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: x86@kernel.org Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Helge Deller <deller@gmx.de> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Kees Cook <keescook@chromium.org> Cc: "Paul E. McKenney" <paulmck@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Frederic Weisbecker <frederic@kernel.org> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: Sami Tolvanen <samitolvanen@google.com> Cc: Juerg Haefliger <juerg.haefliger@canonical.com> --- arch/Kconfig | 6 ++++++ arch/x86/Kconfig | 1 + drivers/video/Kconfig | 3 --- include/asm-generic/screen_info.h | 6 ++++++ include/video/edid.h | 3 --- 5 files changed, 13 insertions(+), 6 deletions(-)