From: Thomas Zimmermann <tzimmermann@suse.de>
To: arnd@arndb.de, deller@gmx.de, daniel@ffwll.ch, airlied@gmail.com
Cc: linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org,
linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org,
linux-ia64@vger.kernel.org, loongarch@lists.linux.dev,
linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org,
sparclinux@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-hyperv@vger.kernel.org, linux-fbdev@vger.kernel.org,
linux-staging@lists.linux.dev, linux-arch@vger.kernel.org,
Thomas Zimmermann <tzimmermann@suse.de>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Kees Cook <keescook@chromium.org>,
"Paul E. McKenney" <paulmck@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
Frederic Weisbecker <frederic@kernel.org>,
Nicholas Piggin <npiggin@gmail.com>,
Ard Biesheuvel <ardb@kernel.org>,
Sami Tolvanen <samitolvanen@google.com>,
Juerg Haefliger <juerg.haefliger@canonical.com>
Subject: [PATCH 07/12] arch/x86: Declare edid_info in <asm/screen_info.h>
Date: Thu, 29 Jun 2023 13:45:46 +0200 [thread overview]
Message-ID: <20230629121952.10559-8-tzimmermann@suse.de> (raw)
In-Reply-To: <20230629121952.10559-1-tzimmermann@suse.de>
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(-)
diff --git a/arch/Kconfig b/arch/Kconfig
index 2f58293fd7bcb..ee9866e4df2b0 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -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
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index d7c2bf4ee403d..ee81855116be7 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -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
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index d4a72bea56be0..8b2b9ac37c3df 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -21,9 +21,6 @@ config STI_CORE
config VIDEO_CMDLINE
bool
-config ARCH_HAS_SCREEN_INFO
- bool
-
config VIDEO_NOMODESET
bool
default n
diff --git a/include/asm-generic/screen_info.h b/include/asm-generic/screen_info.h
index 6fd0e50fabfcd..5efc99c296b40 100644
--- a/include/asm-generic/screen_info.h
+++ b/include/asm-generic/screen_info.h
@@ -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
diff --git a/include/video/edid.h b/include/video/edid.h
index f614371e9116a..52aabb7060321 100644
--- a/include/video/edid.h
+++ b/include/video/edid.h
@@ -4,7 +4,4 @@
#include <uapi/video/edid.h>
-#ifdef CONFIG_X86
-extern struct edid_info edid_info;
-#endif
#endif /* __linux_video_edid_h__ */
--
2.41.0
next prev parent reply other threads:[~2023-06-29 12:20 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-29 11:45 [PATCH 00/12] arch,fbdev: Move screen_info into arch/ Thomas Zimmermann
2023-06-29 11:45 ` [PATCH 01/12] efi: Do not include <linux/screen_info.h> from EFI header Thomas Zimmermann
2023-07-04 16:23 ` Javier Martinez Canillas
2023-07-05 1:40 ` [01/12] " Sui Jingfeng
2023-07-05 8:00 ` Thomas Zimmermann
2023-06-29 11:45 ` [PATCH 02/12] fbdev/sm712fb: Do not include <linux/screen_info.h> Thomas Zimmermann
2023-07-04 16:25 ` Javier Martinez Canillas
2023-06-29 11:45 ` [PATCH 03/12] sysfb: Do not include <linux/screen_info.h> from sysfb header Thomas Zimmermann
2023-07-04 16:26 ` Javier Martinez Canillas
2023-07-05 1:41 ` [03/12] " Sui Jingfeng
2023-06-29 11:45 ` [PATCH 04/12] staging/sm750fb: Do not include <linux/screen_info.h> Thomas Zimmermann
2023-07-04 16:27 ` Javier Martinez Canillas
2023-06-29 11:45 ` [PATCH 05/12] arch: Remove trailing whitespaces Thomas Zimmermann
2023-07-04 16:27 ` Javier Martinez Canillas
2023-07-05 1:25 ` [05/12] " Sui Jingfeng
2023-06-29 11:45 ` [PATCH 06/12] arch: Declare screen_info in <asm/screen_info.h> Thomas Zimmermann
2023-06-29 12:55 ` WANG Xuerui
2023-06-29 13:03 ` Arnd Bergmann
2023-06-29 13:18 ` Thomas Zimmermann
2023-07-05 1:21 ` [06/12] " Sui Jingfeng
2023-07-05 8:02 ` Thomas Zimmermann
2023-08-18 14:04 ` suijingfeng
2023-08-18 14:18 ` suijingfeng
2023-06-29 11:45 ` Thomas Zimmermann [this message]
2023-06-29 12:35 ` [PATCH 07/12] arch/x86: Declare edid_info " Arnd Bergmann
2023-06-29 13:01 ` Thomas Zimmermann
2023-06-29 13:21 ` Arnd Bergmann
2023-06-30 7:46 ` Thomas Zimmermann
2023-06-30 11:53 ` Arnd Bergmann
2023-07-05 8:18 ` Thomas Zimmermann
2023-07-18 14:47 ` Arnd Bergmann
2023-06-29 11:45 ` [PATCH 08/12] drivers/firmware: Remove trailing whitespaces Thomas Zimmermann
2023-07-05 1:26 ` [08/12] " Sui Jingfeng
2023-07-05 7:46 ` [PATCH 08/12] " Javier Martinez Canillas
2023-06-29 11:45 ` [PATCH 09/12] drivers: Add dependencies on CONFIG_ARCH_HAS_SCREEN_INFO Thomas Zimmermann
2023-06-29 11:45 ` [PATCH 10/12] fbdev/core: Use fb_is_primary_device() in fb_firmware_edid() Thomas Zimmermann
2023-07-05 8:02 ` Javier Martinez Canillas
2023-06-29 11:45 ` [PATCH 11/12] fbdev/core: Protect edid_info with CONFIG_ARCH_HAS_EDID_INFO Thomas Zimmermann
2023-07-05 1:43 ` [11/12] " Sui Jingfeng
2023-06-29 11:45 ` [PATCH 12/12] fbdev/core: Define empty fb_firmware_edid() in <linux/fb.h> Thomas Zimmermann
2023-06-29 13:31 ` [PATCH 00/12] arch,fbdev: Move screen_info into arch/ Arnd Bergmann
2023-06-29 14:15 ` Thomas Zimmermann
2023-06-29 14:42 ` Arnd Bergmann
2023-06-29 14:29 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230629121952.10559-8-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=daniel@ffwll.ch \
--cc=dave.hansen@linux.intel.com \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=frederic@kernel.org \
--cc=hpa@zytor.com \
--cc=juerg.haefliger@canonical.com \
--cc=keescook@chromium.org \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-csky@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-hexagon@vger.kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=loongarch@lists.linux.dev \
--cc=mingo@redhat.com \
--cc=npiggin@gmail.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=samitolvanen@google.com \
--cc=sparclinux@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).