From patchwork Fri Jul 7 09:52:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 117054 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3146330vqx; Fri, 7 Jul 2023 02:56:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlFiNbbXigbgZB+z3rZcKMvKIowTyXAr5FUrHYSxKQGSipxe1rnhO0BKjeK4iyzh6ps4f7UT X-Received: by 2002:a25:3405:0:b0:c68:b728:c1c4 with SMTP id b5-20020a253405000000b00c68b728c1c4mr4170472yba.54.1688723797608; Fri, 07 Jul 2023 02:56:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688723797; cv=none; d=google.com; s=arc-20160816; b=GF2HMhZGzSRxRXWT/rHQWI71roUEwPRW8mYECv53dmlkSlk0t0w8EUX1uZV1NOYC7I yTUFHJeNggYDM4zOs9w1NI7uZOFXRhbj3ebnnTNdEBGoL5/qqaioIq82Lqpf15IVz7A4 AjTV/EyDmv/B+9kBfqtm95uY4z+4x5Vn/ZjINNRfIdnmDTg9lNqR/Sl+vfeKzBZN6zmA 64hMBtTR8RzthOp7KV2VEhO5FeaSUU4VS/uBon72e7crSVfGjnlfU/knwqK6+6/BacB8 MJWK8I4zpomFlkfj4LRY8wykDVzwt5hJOeKjdU22pcYcX2HBNdSokCSpyrEB2nnQwBl+ 8F6Q== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=s34+bmLd6Wtf6KH2fzKBVTzBnXsBmY5Z/EiapVOWkyA=; fh=2pP/HtmYrAZvjke+kAbCj7+qgdrE6Jbhnn7ZAl8A1C0=; b=lNDCmev3Qz2czhoOFMv8RC7RkjUB1WTIWkYHk8K3SGJDDzOQGGvgI2Y+TuQmEYEKdF YKnYd++J7j12Wi7c6mFH1gcryoTuM7EW6kFJh/Mxk1IMHMXXmI6+UBtDiicFyxj4WVt7 RoFa1DzVrcVSkFIspHUgMmaB2Y0IvoMjp3sjTqI5wTxQ/r7xp6ke9MAcS2L7MZWJ06ic PTW0JBtw19CijRhJCE+rjzagVkaHK60j97sRftY+DSYu8Km6j2mnnYib8OwvCR+HMZxx grUhso7ZdsBIlIIggpaq1hJsHjaKu1TpAXYPxTd/nhMnfu3Kntfv87vSK8LNhFuieo5z HAwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TUQoYVUL; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e10-20020a63690a000000b0055b635c3f6fsi3336446pgc.458.2023.07.07.02.56.22; Fri, 07 Jul 2023 02:56:37 -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=@kernel.org header.s=k20201202 header.b=TUQoYVUL; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232759AbjGGJyo (ORCPT + 99 others); Fri, 7 Jul 2023 05:54:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232747AbjGGJyh (ORCPT ); Fri, 7 Jul 2023 05:54:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13CFD170F; Fri, 7 Jul 2023 02:54:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9DDE1618E5; Fri, 7 Jul 2023 09:54:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 981EDC433C7; Fri, 7 Jul 2023 09:54:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688723673; bh=1hp9hq9V97MqQl6Xw7YC6xzz3b8dnvVS9EeMnxTUvnE=; h=From:To:Cc:Subject:Date:From; b=TUQoYVULMKXh34CP4GMBwL2aMTC68aEwFjb4ToiO/+Qzq2SxrW6gzRmUmVk2fcpFH Bioql9dPE6AooB8yzmlwm1/5GOklb1WnaixYCjsUszLm9k78NDsyPe21goIrea9oAQ IRmLCrCAXgy2PbfcBhFPNsyL4HA2H1gcSQPtL8A+FL6o0ufqkIYWkr2VxE1kAYKGED 9PQvCgVcvsSIeiKyxfGRGJx2GXPbPbnuZwSob2rNxkr+7erC5ONplrWMYZ2glqWZOW cNCDXz+ygEKZTdDDuhxYXbKgysoCSxYNoKk2t6egKT0K+70Ypy4PLpYxZQOGT+aiP7 tsQxY8Pa0rMwQ== From: Arnd Bergmann To: Thomas Zimmermann Cc: javierm@redhat.com, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Russell King , dri-devel@lists.freedesktop.org, Ard Biesheuvel , Helge Deller , Greg Kroah-Hartman , Arnd Bergmann , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , linux-riscv@lists.infradead.org, linux-csky@vger.kernel.org Subject: [PATCH 1/4] vgacon: rework Kconfig dependencies Date: Fri, 7 Jul 2023 11:52:23 +0200 Message-Id: <20230707095415.1449376-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770755244809110368?= X-GMAIL-MSGID: =?utf-8?q?1770755244809110368?= From: Arnd Bergmann The list of dependencies here is phrased as an opt-out, but this is missing a lot of architectures that don't actually support VGA consoles, and some of the entries are stale: - powerpc used to support VGA consoles in the old arch/ppc codebase, but the merged arch/powerpc never did - arm lists footbridge, integrator and netwinder, but netwinder is actually part of footbridge, and integrator does not appear to have an actual VGA hardware, or list it in its ATAG or DT. - mips has a few platforms (jazz, sibyte, and sni) that initialize screen_info, on everything else the console is selected but cannot actually work. - csky, hexgagon, loongarch, nios2, riscv and xtensa are not listed in the opt-out table and declare a screen_info to allow building vga_con, but this cannot work because the console is never selected. Replace this with an opt-in table that lists only the platforms that remain. This is effectively x86, plus a couple of historic workstation and server machines that reused parts of the x86 system architecture. Signed-off-by: Arnd Bergmann Reviewed-by: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann --- drivers/video/console/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig index a2a88d42edf0c..47c498defc211 100644 --- a/drivers/video/console/Kconfig +++ b/drivers/video/console/Kconfig @@ -7,9 +7,9 @@ menu "Console display driver support" config VGA_CONSOLE bool "VGA text console" if EXPERT || !X86 - depends on !4xx && !PPC_8xx && !SPARC && !M68K && !PARISC && !SUPERH && \ - (!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER) && \ - !ARM64 && !ARC && !MICROBLAZE && !OPENRISC && !S390 && !UML + depends on ALPHA || IA64 || X86 || \ + (ARM && ARCH_FOOTBRIDGE) || \ + (MIPS && (MIPS_MALTA || SIBYTE_BCM112X || SIBYTE_SB1250 || SIBYTE_BCM1x80 || SNI_RM)) select APERTURE_HELPERS if (DRM || FB || VFIO_PCI_CORE) default y help From patchwork Fri Jul 7 09:52:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 117058 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3153920vqx; Fri, 7 Jul 2023 03:10:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlFdWetLNsxhsC7/4EpyNc3tKgK85LUaeXmAMCfGZATp6Om/9VdDg7sEYmX46j6nFqrayMlm X-Received: by 2002:a05:6808:3c9:b0:3a3:d7de:5cfa with SMTP id o9-20020a05680803c900b003a3d7de5cfamr3853194oie.11.1688724602391; Fri, 07 Jul 2023 03:10:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688724602; cv=none; d=google.com; s=arc-20160816; b=SSugbTcIaaQoTARGRDhHYmUKUiPq9fH9X3ya2zFZUZu48P5PyDRMd+3GyKWi+Z0Eya w6V/WbUdAlzKGPV1854b8mF69cIFWb00/iWoFBXKpfLyUD4Qhi5F7DdIC/9Z5vVsfKMW E6E/ukj9couDK5CffigzWZ3xCju/luwy6VOVaHNvzNg0iVYdcx/cYMHRl7gFHuHDgAPr NDbiLohhVfnJmWCqCNLaVMz3iKpmPa+ZOLEMfLzy/NepThbgF1IEIqrTjwRPNfxClgNz nF1UTmsNyGofWP4KuXAR10VHExXkGhe3wJUCiDZ9BPOW+pbYzbztD0bjV8Y4eHsT0Rgk Inhg== 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; bh=RzbxTJfYKpG3PFdv+SvcQdA2npiCBqa79IcRtzwHjq4=; fh=zRcS6oAB8x5VJELtrhODidVDXhCNa06LCTS6Nlu1wLQ=; b=AMMq8xPTqMMxpszWSD4hFcrIgeCLKRx3COzpKSikU2HvUi2qI4VLYotKCOm68nrSYv oPe+HMwG7pSoyxkAKRU64K7O5MBa+Hi+N29jqs69fd2opvtQEqfSxDbpQxVjrsMAvr3i 2J8w/hzbEqKYENNYg1OZHErK2KKy7pLmbkGUQ76tb0dlTu84hp0TDN1ObrDBtec2qKwd AzRmxqBXtBe/6PzONMetHJ6KqGlHjUDUQJ9TBjFlm1vB2awo1iozti9GnisH7r4YmMs2 VSHMvojGiLblZo/U6rXNshr16tPM9RQjQzMCgAxTStDXiKh/jXEzNXnMJiSXD/VVaTJy Nrjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Bx40Rryc; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p22-20020a63c156000000b0055b5f13dd64si3680101pgi.92.2023.07.07.03.09.46; Fri, 07 Jul 2023 03:10:02 -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=@kernel.org header.s=k20201202 header.b=Bx40Rryc; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232854AbjGGJzp (ORCPT + 99 others); Fri, 7 Jul 2023 05:55:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232881AbjGGJz1 (ORCPT ); Fri, 7 Jul 2023 05:55:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F074213B; Fri, 7 Jul 2023 02:55:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AA732618E8; Fri, 7 Jul 2023 09:55:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8166EC433C8; Fri, 7 Jul 2023 09:55:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688723722; bh=yMWBZi7OWijpDNbPPVU11zT7Ofk6CC1w0krvsGmTO/Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bx40Rryc7emWROVA1OI+Fp/RxUN6o7E4nHT9VT58WXacXf2ozSjk5VBIyhlsgZAkr u2TwwPGKbwSH1Jn686GPOGDYyzRhNSXdfDbh0GX7fiSd/Q8SoLRWm81bbNGpy2LvUJ PhRsNMOwag/zbLeNtjsqSzeLonM1K0hAqZM1i3o1LWrschS5ccK6ArPWK+mDI+V+Cg r66yYBAJk5so9iN518mwMOg4/lTZpFgPvXcJ4Lf5e5MhMX/jyTnwECbxcWs7hobvgk c3viAIB8beT+3liXAVktBBRA7/rqn7zOv0uUvmp3KfvN6KOM6o747qiFkc1T1A7sWK NKZl3mjfiXXJw== From: Arnd Bergmann To: Thomas Zimmermann Cc: javierm@redhat.com, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Russell King , dri-devel@lists.freedesktop.org, Ard Biesheuvel , Helge Deller , Greg Kroah-Hartman , Arnd Bergmann , Richard Henderson , Ivan Kokshaysky , Matt Turner , Huacai Chen , WANG Xuerui , Thomas Bogendoerfer , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-alpha@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 Subject: [PATCH 2/4] vgacon: rework screen_info #ifdef checks Date: Fri, 7 Jul 2023 11:52:24 +0200 Message-Id: <20230707095415.1449376-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230707095415.1449376-1-arnd@kernel.org> References: <20230707095415.1449376-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770756088145347626?= X-GMAIL-MSGID: =?utf-8?q?1770756088145347626?= From: Arnd Bergmann On non-x86 architectures, the screen_info variable is generally only used for the VGA console where supported, and in some cases the EFI framebuffer or vga16fb. Now that we have a definite list of which architectures actually use it for what, use consistent #ifdef checks so the global variable is only defined when it is actually used on those architectures. On powerpc, there is no support for vgacon, but there is support for vga16fb. Loongarch and riscv have no support for vgacon or vga16fb, but they support EFI firmware, so only that needs to be checked, and the initialization can be removed because that is handled by EFI. IA64 has both vgacon and EFI. Signed-off-by: Arnd Bergmann Reviewed-by: Javier Martinez Canillas --- arch/alpha/kernel/setup.c | 2 ++ arch/alpha/kernel/sys_sio.c | 2 ++ arch/ia64/kernel/setup.c | 4 ++++ arch/loongarch/kernel/setup.c | 2 ++ arch/mips/jazz/setup.c | 2 +- arch/mips/kernel/setup.c | 2 +- arch/mips/sibyte/swarm/setup.c | 2 +- arch/mips/sni/setup.c | 2 +- arch/powerpc/kernel/setup-common.c | 2 +- arch/riscv/kernel/setup.c | 11 ++--------- 10 files changed, 17 insertions(+), 14 deletions(-) diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c index b650ff1cb022e..b4d2297765c02 100644 --- a/arch/alpha/kernel/setup.c +++ b/arch/alpha/kernel/setup.c @@ -131,6 +131,7 @@ static void determine_cpu_caches (unsigned int); static char __initdata command_line[COMMAND_LINE_SIZE]; +#ifdef CONFIG_VGA_CONSOLE /* * The format of "screen_info" is strange, and due to early * i386-setup code. This is just enough to make the console @@ -147,6 +148,7 @@ struct screen_info screen_info = { }; EXPORT_SYMBOL(screen_info); +#endif /* * The direct map I/O window, if any. This should be the same diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c index 7c420d8dac53d..7de8a5d2d2066 100644 --- a/arch/alpha/kernel/sys_sio.c +++ b/arch/alpha/kernel/sys_sio.c @@ -57,11 +57,13 @@ sio_init_irq(void) static inline void __init alphabook1_init_arch(void) { +#ifdef CONFIG_VGA_CONSOLE /* The AlphaBook1 has LCD video fixed at 800x600, 37 rows and 100 cols. */ screen_info.orig_y = 37; screen_info.orig_video_cols = 100; screen_info.orig_video_lines = 37; +#endif lca_init_arch(); } diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index 5a55ac82c13a4..0c09ff7fde46b 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c @@ -86,9 +86,11 @@ EXPORT_SYMBOL(local_per_cpu_offset); #endif unsigned long ia64_cycles_per_usec; struct ia64_boot_param *ia64_boot_param; +#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_EFI) struct screen_info screen_info; unsigned long vga_console_iobase; unsigned long vga_console_membase; +#endif static struct resource data_resource = { .name = "Kernel data", @@ -497,6 +499,7 @@ early_console_setup (char *cmdline) static void __init screen_info_setup(void) { +#ifdef CONFIG_VGA_CONSOLE unsigned int orig_x, orig_y, num_cols, num_rows, font_height; memset(&screen_info, 0, sizeof(screen_info)); @@ -525,6 +528,7 @@ screen_info_setup(void) screen_info.orig_video_mode = 3; /* XXX fake */ screen_info.orig_video_isVGA = 1; /* XXX fake */ screen_info.orig_video_ega_bx = 3; /* XXX fake */ +#endif } static inline void diff --git a/arch/loongarch/kernel/setup.c b/arch/loongarch/kernel/setup.c index 78a00359bde3c..6b3932677f5de 100644 --- a/arch/loongarch/kernel/setup.c +++ b/arch/loongarch/kernel/setup.c @@ -57,7 +57,9 @@ #define SMBIOS_CORE_PACKAGE_OFFSET 0x23 #define LOONGSON_EFI_ENABLE (1 << 3) +#ifdef CONFIG_EFI struct screen_info screen_info __section(".data"); +#endif unsigned long fw_arg0, fw_arg1, fw_arg2; DEFINE_PER_CPU(unsigned long, kernelsp); diff --git a/arch/mips/jazz/setup.c b/arch/mips/jazz/setup.c index ee044261eb223..3c14548353e47 100644 --- a/arch/mips/jazz/setup.c +++ b/arch/mips/jazz/setup.c @@ -76,7 +76,7 @@ void __init plat_mem_setup(void) _machine_restart = jazz_machine_restart; -#ifdef CONFIG_VT +#ifdef CONFIG_VGA_CONSOLE screen_info = (struct screen_info) { .orig_video_cols = 160, .orig_video_lines = 64, diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index cb871eb784a7c..1aba7dc95132c 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -54,7 +54,7 @@ struct cpuinfo_mips cpu_data[NR_CPUS] __read_mostly; EXPORT_SYMBOL(cpu_data); -#ifdef CONFIG_VT +#ifdef CONFIG_VGA_CONSOLE struct screen_info screen_info; #endif diff --git a/arch/mips/sibyte/swarm/setup.c b/arch/mips/sibyte/swarm/setup.c index 76683993cdd3a..37df504d3ecbb 100644 --- a/arch/mips/sibyte/swarm/setup.c +++ b/arch/mips/sibyte/swarm/setup.c @@ -129,7 +129,7 @@ void __init plat_mem_setup(void) if (m41t81_probe()) swarm_rtc_type = RTC_M41T81; -#ifdef CONFIG_VT +#ifdef CONFIG_VGA_CONSOLE screen_info = (struct screen_info) { .orig_video_page = 52, .orig_video_mode = 3, diff --git a/arch/mips/sni/setup.c b/arch/mips/sni/setup.c index efad85c8c823b..9984cf91be7d0 100644 --- a/arch/mips/sni/setup.c +++ b/arch/mips/sni/setup.c @@ -38,7 +38,7 @@ extern void sni_machine_power_off(void); static void __init sni_display_setup(void) { -#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE) && defined(CONFIG_FW_ARC) +#if defined(CONFIG_VGA_CONSOLE) && defined(CONFIG_FW_ARC) struct screen_info *si = &screen_info; DISPLAY_STATUS *di; diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index d2a446216444f..b717875a12a9a 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c @@ -98,6 +98,7 @@ int boot_cpu_hwid = -1; int dcache_bsize; int icache_bsize; +#if IS_ENABLED(CONFIG_FB_VGA16) /* * This still seems to be needed... -- paulus */ @@ -109,7 +110,6 @@ struct screen_info screen_info = { .orig_video_isVGA = 1, .orig_video_points = 16 }; -#if defined(CONFIG_FB_VGA16_MODULE) EXPORT_SYMBOL(screen_info); #endif diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c index 971fe776e2f8b..a3dbe13f45fb3 100644 --- a/arch/riscv/kernel/setup.c +++ b/arch/riscv/kernel/setup.c @@ -39,15 +39,8 @@ #include "head.h" -#if defined(CONFIG_DUMMY_CONSOLE) || defined(CONFIG_EFI) -struct screen_info screen_info __section(".data") = { - .orig_video_lines = 30, - .orig_video_cols = 80, - .orig_video_mode = 0, - .orig_video_ega_bx = 0, - .orig_video_isVGA = 1, - .orig_video_points = 8 -}; +#if defined(CONFIG_EFI) +struct screen_info screen_info __section(".data"); #endif /* From patchwork Fri Jul 7 09:52:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 117076 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3158332vqx; Fri, 7 Jul 2023 03:18:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlE+aAVxqUsN46n+NqZKq/QAE0CIApsbTnz8Iwdh9PgSU/GXtOOySdMKRWt8f3Fe5hKer+wb X-Received: by 2002:a9d:7a83:0:b0:6b7:1e57:aa96 with SMTP id l3-20020a9d7a83000000b006b71e57aa96mr4587457otn.6.1688725119400; Fri, 07 Jul 2023 03:18:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688725119; cv=none; d=google.com; s=arc-20160816; b=XcRGvP3XYcl5ULnvCSfN7jmu357E92+a/nvQtHQbFTk1n+Fwr+FOCfqH+x+CVRYFhH pJzhHRojNL8p7MeScP1gOWBQW6PQxfc7wZr3nth78GxrT+y/4aHn7+gteu8nRDJa1PtE v0nie1E5gjdm+iZ3MAQrCp5mYA6rIL1iajyd8SpW76CgItUK/A3p/cstNec4fDY3aRdT IYCYFveTy5LwUBrfIn/3i7YltNOquaIKuX3GQbeFnepwivAOKgKnyOQB1okkkQKAnlqO zP+PMMRMKr2z3pxzd7w/sjEV/JG2PVafEYYKGddI9k0ougknX15ZYKCJGtK/e0pCPHTD 62Ng== 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; bh=cFsufhx02R3N6gySg4BfuQl3r0MTOrfXVx7qg3p6fco=; fh=lfxYWWE5npP/X1+MXiRtUZPaJT/qimzGu0Y9uGV9uWc=; b=mGQyEnNfQ2LQ09Lkbf67KkIwamKKi4kesBWCFDrfASLvfYhvwGY5f3PkwKigoaianJ wxwXdGeSFRAHHjBoi8D+RGyYcpb14hVd7vhdpqTOgtfQja9t8jZrMJLrfDS+x86jRlx9 sJEtVpW7a42CiS7x3R3Ho+vxwrn7slH7KuC6aSJXMgOLoPSqMbPw3/qIBOhSm7hdugIx JQakctTL3pkJHRZl7OqSl6il5bsAt+3DOAOC2eIXeduROwfVvAq9U7Yd8+wUA1kT50z7 x2ghFMteDjmnWyoY07df6Lm8cvI39ViJe3NH2QysQfCMMjAekJaxrUTaneu9spKmybPU sVmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=m46OaoBs; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i4-20020a63e444000000b0055bc30ae086si3500743pgk.594.2023.07.07.03.18.24; Fri, 07 Jul 2023 03:18:39 -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=@kernel.org header.s=k20201202 header.b=m46OaoBs; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233016AbjGGJ5h (ORCPT + 99 others); Fri, 7 Jul 2023 05:57:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232882AbjGGJ41 (ORCPT ); Fri, 7 Jul 2023 05:56:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01B7926B6; Fri, 7 Jul 2023 02:56:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7D30561929; Fri, 7 Jul 2023 09:56:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 262D9C433C7; Fri, 7 Jul 2023 09:55:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688723759; bh=ZlrPUR4qDwFuSSAmVs8BdIFko0degkyaq4+ixUSpArQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m46OaoBs45HlaUEZMk7dtWry+k569Hsec688GU34tSmZ+dRaDfCZgbatKcMkoJb4W L+0sjRZOaq7fnXzEKqBRJ2P+kPiY3iobRJLvCN7cmCiV7bvnwyfCb9oLGJRV8u+INh nnkcI5UabsNZZTkO/zaZ+OeDPuMeskyUoUAeflYFXT70X/eLC7KMD+HtNQ0mnLxBxr 9nrfbs3wYnhn+evE0EBsrUQ0eGoYcbj65uoozC1VZHBXTFuYTc52YtRPNOlifWzWQl BkXonaqPwL/TgLz1wZZAGwrEB4yqcrZb4E2SD8mf6sEm0HkkcApeZku5KPb+vS/sz2 WGPb0b0Bu/Fyw== From: Arnd Bergmann To: Thomas Zimmermann Cc: javierm@redhat.com, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Russell King , dri-devel@lists.freedesktop.org, Ard Biesheuvel , Helge Deller , Greg Kroah-Hartman , Arnd Bergmann , Linus Walleij , "Russell King (Oracle)" , linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/4] dummycon: limit Arm console size hack to footbridge Date: Fri, 7 Jul 2023 11:52:25 +0200 Message-Id: <20230707095415.1449376-3-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230707095415.1449376-1-arnd@kernel.org> References: <20230707095415.1449376-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770756630562941390?= X-GMAIL-MSGID: =?utf-8?q?1770756630562941390?= From: Arnd Bergmann The dummycon default console size used to be determined by architecture, but now this is a Kconfig setting on everything except ARM. Tracing this back in the historic git trees, this was used to match the size of VGA console or VGA framebuffer on early machines, but nowadays that code is no longer used, except probably on the old footbridge/netwinder since that is the only one that supports vgacon. On machines with a framebuffer, booting with DT so far results in always using the hardcoded 80x30 size in dummycon, while on ATAGS the setting can come from a bootloader specific override. Both seem to be worse choices than the Kconfig setting, since the actual text size for fbcon also depends on the selected font. Make this work the same way as everywhere else and use the normal Kconfig setting, except for the footbridge with vgacon, which keeps using the traditional code. If vgacon is disabled, footbridge can also ignore the setting. This means the screen_info only has to be provided when either vgacon or EFI are enabled now. To limit the amount of surprises on Arm, change the Kconfig default to the previously used 80x30 setting instead of the usual 80x25. Signed-off-by: Arnd Bergmann Tested-by: Linus Walleij Reviewed-by: Javier Martinez Canillas --- arch/arm/kernel/atags_parse.c | 2 +- arch/arm/kernel/setup.c | 3 +-- drivers/video/console/Kconfig | 5 +++-- drivers/video/console/dummycon.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/kernel/atags_parse.c b/arch/arm/kernel/atags_parse.c index 33f6eb5213a5a..4c815da3b77b0 100644 --- a/arch/arm/kernel/atags_parse.c +++ b/arch/arm/kernel/atags_parse.c @@ -69,7 +69,7 @@ static int __init parse_tag_mem32(const struct tag *tag) __tagtable(ATAG_MEM, parse_tag_mem32); -#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) +#if defined(CONFIG_ARCH_FOOTBRIDGE) && defined(CONFIG_VGA_CONSOLE) static int __init parse_tag_videotext(const struct tag *tag) { screen_info.orig_x = tag->u.videotext.x; diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index c66b560562b30..40326a35a179b 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -928,8 +928,7 @@ static void __init request_standard_resources(const struct machine_desc *mdesc) request_resource(&ioport_resource, &lp2); } -#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) || \ - defined(CONFIG_EFI) +#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_EFI) struct screen_info screen_info = { .orig_video_lines = 30, .orig_video_cols = 80, diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig index 47c498defc211..a3e4e9a6bf79d 100644 --- a/drivers/video/console/Kconfig +++ b/drivers/video/console/Kconfig @@ -52,7 +52,7 @@ config DUMMY_CONSOLE config DUMMY_CONSOLE_COLUMNS int "Initial number of console screen columns" - depends on DUMMY_CONSOLE && !ARM + depends on DUMMY_CONSOLE && !ARCH_FOOTBRIDGE default 160 if PARISC default 80 help @@ -62,8 +62,9 @@ config DUMMY_CONSOLE_COLUMNS config DUMMY_CONSOLE_ROWS int "Initial number of console screen rows" - depends on DUMMY_CONSOLE && !ARM + depends on DUMMY_CONSOLE && !ARCH_FOOTBRIDGE default 64 if PARISC + default 30 if ARM default 25 help On PA-RISC, the default value is 64, which should fit a 1280x1024 diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c index f1711b2f9ff05..70549fecee12c 100644 --- a/drivers/video/console/dummycon.c +++ b/drivers/video/console/dummycon.c @@ -18,7 +18,7 @@ * Dummy console driver */ -#if defined(__arm__) +#if defined(CONFIG_ARCH_FOOTBRIDGE) && defined(CONFIG_VGA_CONSOLE) #define DUMMY_COLUMNS screen_info.orig_video_cols #define DUMMY_ROWS screen_info.orig_video_lines #else From patchwork Fri Jul 7 09:52:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 117061 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3154796vqx; Fri, 7 Jul 2023 03:11:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlEEI0hwuyczeaTmf9Tu7OgWUONgu1xY8xzIkLWVeIqbKhc3vWBesM2hPdDj7d9nwOqjsMCa X-Received: by 2002:a05:6a00:228a:b0:682:7d8a:f891 with SMTP id f10-20020a056a00228a00b006827d8af891mr5319266pfe.20.1688724700512; Fri, 07 Jul 2023 03:11:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688724700; cv=none; d=google.com; s=arc-20160816; b=pzAKsYQpSRCVD3TQjjsP7AWxdAWdKUCd0pKuEupLJfMkFsuZDuxv92AU3UvTxf6I5I 3JbKfbLqqsqXjry79QFEudWQtURIulb6oOC3AVOJSfNmDe5XnuWZVtqtnoH5ayhfdvzN 0XHvu2ycL6UEy5DccIQ4QsKaXEgeArE8IOrRnOGrnIFvSp8lJNMjJsleiFieicWfW/Jm nOF+ytdGbjcJPmqbUoyWlkJXDSyKpy9f4FlIzVmfrqFQkp1ef8V7f5XaSYsou4nRhMO5 tkcEFpBsR5NOy1NjOGkr2UQkZJ49TFeEykxXxJZxqEu/UhUdwGjqBjqLAfNyZtoFdvML CLAA== 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; bh=HjnMuRNYV+zJRK/4ztyyoYiPx7cnIdiuTAPjJedoIGk=; fh=iqX0GoXgONmhqxyAfwkSxch9gL17p2i1sPgyTNvC9d0=; b=mXa7HBzCwMRT5V0gbbToFsHqjHdiOGuYzy0jVESplnpqVlbcZbTTGcG7X7vZ6KEROh /ucgLXNjtlsBblPXDJxPbMktHg+tNgZmUstpawo5GNcBGSK9eErC717hhcsJOg7fY+r/ Is/O8uMBMkwfHNbvmRYcjK/8hcHzToS2s/62CTGPB/W5ZGXNA6dVhr4CUf3ifYRts4pJ sy93QEICCnpOK0DAWF5yvjRglgS/4gzH+eSgZBSx7kl4UVfL5l0dvy4at5seRRFoFu12 A5UxzZbnGxOjqF2qD1S6rtjxW5io7YoRD6xsZgPEEdA9N4E+xstPh6owr+uakyLKXHx/ CQ1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sXUcxJoU; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h19-20020a056a00219300b0068219eb27a9si3577451pfi.233.2023.07.07.03.11.25; Fri, 07 Jul 2023 03:11:40 -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=@kernel.org header.s=k20201202 header.b=sXUcxJoU; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233000AbjGGJ66 (ORCPT + 99 others); Fri, 7 Jul 2023 05:58:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232991AbjGGJ6Z (ORCPT ); Fri, 7 Jul 2023 05:58:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3908730F4; Fri, 7 Jul 2023 02:56:45 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 538DA618E8; Fri, 7 Jul 2023 09:56:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FE7EC433C8; Fri, 7 Jul 2023 09:56:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688723800; bh=ty2xk1caePgk351i1PlLcBtJnYI+nZOrooSEIVR42cM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sXUcxJoU9v7wbKk1WFUkHjCOtcDqVJah45HZ1R2N0qI2QoOYSuh76lxNgey1tt7fS GTMcUJDrTLZtSg/JCK6LZvXBI36q6F5TJ1l1kjOcry+LAcPI2CQdKpMCyfKc1MN743 X1HcoJ8OeCiZNrK+y/V4TUTmthbvNYzPNYJx5wihInzyVO4bfubyg3H6SAoenAvVyE Q7hOpElCC1E5UY+RxL2s8d5vHvMkpeuRZPuQi6aO3DXwZKlYgVsWTZvcAr/U25fFlF GDYyubh/Z6n7/OMf2yB8VDXroJlyEKt3gNqrPHapQAZVsQykO2MaOYmLVmY8qV8Goz VgZYg7kZS7t8w== From: Arnd Bergmann To: Thomas Zimmermann Cc: javierm@redhat.com, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Russell King , dri-devel@lists.freedesktop.org, Ard Biesheuvel , Helge Deller , Greg Kroah-Hartman , Arnd Bergmann , Guo Ren , Brian Cain , Dinh Nguyen , Rich Felker , John Paul Adrian Glaubitz , "David S. Miller" , Chris Zankel , Max Filippov , Masahiro Yamada , linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org Subject: [PATCH 4/4] vgacon, arch/*: remove unused screen_info definitions Date: Fri, 7 Jul 2023 11:52:26 +0200 Message-Id: <20230707095415.1449376-4-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230707095415.1449376-1-arnd@kernel.org> References: <20230707095415.1449376-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770756191487075682?= X-GMAIL-MSGID: =?utf-8?q?1770756191487075682?= From: Arnd Bergmann A number of architectures either kept the screen_info definition for historical purposes as it used to be required by the generic VT code, or they copied it from another architecture in order to build the VGA console driver in an allmodconfig build. Now that vgacon no longer builds on these architectures, remove the stale definitions. Signed-off-by: Arnd Bergmann Reviewed-by: Javier Martinez Canillas Acked-by: Dinh Nguyen Acked-by: Max Filippov Acked-by: Palmer Dabbelt Acked-by: Guo Ren --- arch/csky/kernel/setup.c | 12 ------------ arch/hexagon/kernel/Makefile | 2 -- arch/hexagon/kernel/screen_info.c | 3 --- arch/nios2/kernel/setup.c | 5 ----- arch/sh/kernel/setup.c | 5 ----- arch/sparc/kernel/setup_32.c | 13 ------------- arch/sparc/kernel/setup_64.c | 13 ------------- arch/xtensa/kernel/setup.c | 12 ------------ 8 files changed, 65 deletions(-) delete mode 100644 arch/hexagon/kernel/screen_info.c diff --git a/arch/csky/kernel/setup.c b/arch/csky/kernel/setup.c index 106fbf0b6f3b4..51012e90780d6 100644 --- a/arch/csky/kernel/setup.c +++ b/arch/csky/kernel/setup.c @@ -8,22 +8,10 @@ #include #include #include -#include #include #include #include -#ifdef CONFIG_DUMMY_CONSOLE -struct screen_info screen_info = { - .orig_video_lines = 30, - .orig_video_cols = 80, - .orig_video_mode = 0, - .orig_video_ega_bx = 0, - .orig_video_isVGA = 1, - .orig_video_points = 8 -}; -#endif - static void __init csky_memblock_init(void) { unsigned long lowmem_size = PFN_DOWN(LOWMEM_LIMIT - PHYS_OFFSET_OFFSET); diff --git a/arch/hexagon/kernel/Makefile b/arch/hexagon/kernel/Makefile index e73cb321630ec..3fdf937eb572e 100644 --- a/arch/hexagon/kernel/Makefile +++ b/arch/hexagon/kernel/Makefile @@ -17,5 +17,3 @@ obj-y += vm_vectors.o obj-$(CONFIG_HAS_DMA) += dma.o obj-$(CONFIG_STACKTRACE) += stacktrace.o - -obj-$(CONFIG_VGA_CONSOLE) += screen_info.o diff --git a/arch/hexagon/kernel/screen_info.c b/arch/hexagon/kernel/screen_info.c deleted file mode 100644 index 1e1ceb18bafe7..0000000000000 --- a/arch/hexagon/kernel/screen_info.c +++ /dev/null @@ -1,3 +0,0 @@ -#include - -struct screen_info screen_info; diff --git a/arch/nios2/kernel/setup.c b/arch/nios2/kernel/setup.c index 8582ed9658447..da122a5fa43b2 100644 --- a/arch/nios2/kernel/setup.c +++ b/arch/nios2/kernel/setup.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include @@ -36,10 +35,6 @@ static struct pt_regs fake_regs = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; -#ifdef CONFIG_VT -struct screen_info screen_info; -#endif - /* Copy a short hook instruction sequence to the exception address */ static inline void copy_exception_handler(unsigned int addr) { diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index b3da2757faaf3..3d80515298d26 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c @@ -7,7 +7,6 @@ * Copyright (C) 1999 Niibe Yutaka * Copyright (C) 2002 - 2010 Paul Mundt */ -#include #include #include #include @@ -69,10 +68,6 @@ EXPORT_SYMBOL(cpu_data); struct sh_machine_vector sh_mv = { .mv_name = "generic", }; EXPORT_SYMBOL(sh_mv); -#ifdef CONFIG_VT -struct screen_info screen_info; -#endif - extern int root_mountflags; #define RAMDISK_IMAGE_START_MASK 0x07FF diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c index 34ef7febf0d56..e3b72a7b46d37 100644 --- a/arch/sparc/kernel/setup_32.c +++ b/arch/sparc/kernel/setup_32.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -51,18 +50,6 @@ #include "kernel.h" -struct screen_info screen_info = { - 0, 0, /* orig-x, orig-y */ - 0, /* unused */ - 0, /* orig-video-page */ - 0, /* orig-video-mode */ - 128, /* orig-video-cols */ - 0,0,0, /* ega_ax, ega_bx, ega_cx */ - 54, /* orig-video-lines */ - 0, /* orig-video-isVGA */ - 16 /* orig-video-points */ -}; - /* Typing sync at the prom prompt calls the function pointed to by * romvec->pv_synchook which I set to the following function. * This should sync all filesystems and return, for now it just diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c index 6546ca9d4d3f1..6a4797dec34b4 100644 --- a/arch/sparc/kernel/setup_64.c +++ b/arch/sparc/kernel/setup_64.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -68,18 +67,6 @@ DEFINE_SPINLOCK(ns87303_lock); EXPORT_SYMBOL(ns87303_lock); -struct screen_info screen_info = { - 0, 0, /* orig-x, orig-y */ - 0, /* unused */ - 0, /* orig-video-page */ - 0, /* orig-video-mode */ - 128, /* orig-video-cols */ - 0, 0, 0, /* unused, ega_bx, unused */ - 54, /* orig-video-lines */ - 0, /* orig-video-isVGA */ - 16 /* orig-video-points */ -}; - static void prom_console_write(struct console *con, const char *s, unsigned int n) { diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index aba3ff4e60d85..3f22d0537818d 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -49,17 +48,6 @@ #include #include -#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) -struct screen_info screen_info = { - .orig_x = 0, - .orig_y = 24, - .orig_video_cols = 80, - .orig_video_lines = 24, - .orig_video_isVGA = 1, - .orig_video_points = 16, -}; -#endif - #ifdef CONFIG_BLK_DEV_INITRD extern unsigned long initrd_start; extern unsigned long initrd_end;