Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp20653568rwd; Thu, 29 Jun 2023 05:27:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4QjswzbdAOusgrP32b2T+0WXI7R/gmmZ7snJFqHcV1Kmqsue3g2cSV5eRFuunHjmmeaZF9 X-Received: by 2002:a05:6a00:1a42:b0:662:f0d0:a77d with SMTP id h2-20020a056a001a4200b00662f0d0a77dmr29411291pfv.30.1688041655220; Thu, 29 Jun 2023 05:27:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688041655; cv=none; d=google.com; s=arc-20160816; b=L3pMKmpDCMjiZjcPqmG7egdGeYqtT04cOe6tuNEY4GM34mG3cae2JCZlb4t7Ll719g A1F8KAmS0scFi0qRW6r2IkPdfUouXBKV5GcIsFh+IccDcThjEnHjnDEPr+4hGhYcDxjK 4zonve8wShhAou7UKg2xLnTGnuszz7jmVTu+KjYPzQxJqHFlmQSjr/Krm+D9XbFiPts/ usjg49BTIQPavL8g3wbE/sdbntu5+8CfdkzSfwVVUXW3DCA591k///f/T3l+Nj76h136 RjYInp3O/+B5ibVvg0qZ8TStNtFUEuI/r+2/KCVm7oJveBKBkubagZP+sY3z8K0KA8Pq rTmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=cQ3EDeCSnwNHCvqI9o+8mLXg+vNxeu9dqjNgbn6vW64=; fh=QPiqliwnRA2MKgqFWQvZMiCC1n9E3Iht+6o2rdrCqhk=; b=07lafIrf1iYzHlxteh5Zf8StEcLVPrzBsjnmMyM7HVwewarciyErCW9X0yI6Do16h3 sFx3cHb8NVfbAGhq3Mw5CLEvzdv02HQiQJ4x0RppaZv01o+NNOl3DoAPZG4kf7lY7Zta vWGe5FwUPWWuhxSoaTvLmwyN6IyCBhqI8CDeWxh8m7xkp69d4sGTa8IZGFEyaTCrpK0X X5Jni+D3o62isMbiiRH9pcBY6BENR3xBeVNVbOLItugFaY9XoLkZONvcpP+mEuiDfhFU FV04KHbyVfJYvpkuMzvSrSb9tr2Rcbc1MkUqfaZbZJF404Rnl6It5Iad+8TLv6PXhQCH pcSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="d/ONtzMH"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=f3OsHAg+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f3-20020a056a00228300b0066d45f035a5si9913980pfe.320.2023.06.29.05.27.22; Thu, 29 Jun 2023 05:27:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="d/ONtzMH"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=f3OsHAg+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232769AbjF2MVO (ORCPT + 99 others); Thu, 29 Jun 2023 08:21:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232236AbjF2MUD (ORCPT ); Thu, 29 Jun 2023 08:20:03 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7BD5358A; Thu, 29 Jun 2023 05:20:01 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 1C0E72186B; Thu, 29 Jun 2023 12:20:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1688041200; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cQ3EDeCSnwNHCvqI9o+8mLXg+vNxeu9dqjNgbn6vW64=; b=d/ONtzMHBHfhPFGJZXFbwxLHKekEj3Ck140ZBA9jozx6NZ9IQncD0ogM4FlYnbVbwD45G1 SJ8ei5BmHWMBBnBkm9jXuvlD6yHYAuy3e3PYj4Jw61gdgEKEw5UzbK+mo0r3LVmeUysWir EVI14bZZuCFygATwSv7zxT0YU4yItG4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1688041200; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cQ3EDeCSnwNHCvqI9o+8mLXg+vNxeu9dqjNgbn6vW64=; b=f3OsHAg+MvgJYkBzRW/rb3tMUgPoqd73LlNMm0j7gkGvTcrmNDsm3dmRC0NYT1egdnRYUJ PNHfPSmv46ciy1AA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 61E3213A43; Thu, 29 Jun 2023 12:19:59 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id wFf0Fu92nWRlVAAAMHmgww (envelope-from ); Thu, 29 Jun 2023 12:19:59 +0000 From: Thomas Zimmermann 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 , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Kees Cook , "Paul E. McKenney" , Peter Zijlstra , Andrew Morton , Frederic Weisbecker , Nicholas Piggin , Ard Biesheuvel , Sami Tolvanen , Juerg Haefliger Subject: [PATCH 07/12] arch/x86: Declare edid_info in Date: Thu, 29 Jun 2023 13:45:46 +0200 Message-ID: <20230629121952.10559-8-tzimmermann@suse.de> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230629121952.10559-1-tzimmermann@suse.de> References: <20230629121952.10559-1-tzimmermann@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 . 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 Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: x86@kernel.org Cc: "H. Peter Anvin" Cc: Helge Deller Cc: Arnd Bergmann Cc: Kees Cook Cc: "Paul E. McKenney" Cc: Peter Zijlstra Cc: Andrew Morton Cc: Frederic Weisbecker Cc: Nicholas Piggin Cc: Ard Biesheuvel Cc: Sami Tolvanen Cc: Juerg Haefliger --- 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 +#include