Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

vgacon, arch/*: remove unused screen_info definitions

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. The mips definition is used by some
platforms, but the initialization on jazz is not needed.

Now that vgacon no longer builds on these architectures, remove the
stale definitions and initializations.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Dinh Nguyen <dinguyen@kernel.org>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Acked-by: Guo Ren <guoren@kernel.org>
Acked-by: Helge Deller <deller@gmx.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20231009211845.3136536-5-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Arnd Bergmann and committed by
Greg Kroah-Hartman
fd90410e 4293b092

-74
-12
arch/csky/kernel/setup.c
··· 8 8 #include <linux/of_fdt.h> 9 9 #include <linux/start_kernel.h> 10 10 #include <linux/dma-map-ops.h> 11 - #include <linux/screen_info.h> 12 11 #include <asm/sections.h> 13 12 #include <asm/mmu_context.h> 14 13 #include <asm/pgalloc.h> 15 - 16 - #ifdef CONFIG_DUMMY_CONSOLE 17 - struct screen_info screen_info = { 18 - .orig_video_lines = 30, 19 - .orig_video_cols = 80, 20 - .orig_video_mode = 0, 21 - .orig_video_ega_bx = 0, 22 - .orig_video_isVGA = 1, 23 - .orig_video_points = 8 24 - }; 25 - #endif 26 14 27 15 static void __init csky_memblock_init(void) 28 16 {
-2
arch/hexagon/kernel/Makefile
··· 17 17 obj-$(CONFIG_HAS_DMA) += dma.o 18 18 19 19 obj-$(CONFIG_STACKTRACE) += stacktrace.o 20 - 21 - obj-$(CONFIG_VGA_CONSOLE) += screen_info.o
-3
arch/hexagon/kernel/screen_info.c
··· 1 - #include <linux/screen_info.h> 2 - 3 - struct screen_info screen_info;
-9
arch/mips/jazz/setup.c
··· 13 13 #include <linux/init.h> 14 14 #include <linux/ioport.h> 15 15 #include <linux/console.h> 16 - #include <linux/screen_info.h> 17 16 #include <linux/platform_device.h> 18 17 #include <linux/serial_8250.h> 19 18 #include <linux/dma-mapping.h> ··· 74 75 /* The RTC is outside the port address space */ 75 76 76 77 _machine_restart = jazz_machine_restart; 77 - 78 - #ifdef CONFIG_VT 79 - screen_info = (struct screen_info) { 80 - .orig_video_cols = 160, 81 - .orig_video_lines = 64, 82 - .orig_video_points = 16, 83 - }; 84 - #endif 85 78 86 79 add_preferred_console("ttyS", 0, "9600"); 87 80 }
-5
arch/nios2/kernel/setup.c
··· 19 19 #include <linux/memblock.h> 20 20 #include <linux/initrd.h> 21 21 #include <linux/of_fdt.h> 22 - #include <linux/screen_info.h> 23 22 24 23 #include <asm/mmu_context.h> 25 24 #include <asm/sections.h> ··· 34 35 static struct pt_regs fake_regs = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35 36 0, 0, 0, 0, 0, 0, 36 37 0}; 37 - 38 - #ifdef CONFIG_VT 39 - struct screen_info screen_info; 40 - #endif 41 38 42 39 /* Copy a short hook instruction sequence to the exception address */ 43 40 static inline void copy_exception_handler(unsigned int addr)
-5
arch/sh/kernel/setup.c
··· 7 7 * Copyright (C) 1999 Niibe Yutaka 8 8 * Copyright (C) 2002 - 2010 Paul Mundt 9 9 */ 10 - #include <linux/screen_info.h> 11 10 #include <linux/ioport.h> 12 11 #include <linux/init.h> 13 12 #include <linux/initrd.h> ··· 67 68 */ 68 69 struct sh_machine_vector sh_mv = { .mv_name = "generic", }; 69 70 EXPORT_SYMBOL(sh_mv); 70 - 71 - #ifdef CONFIG_VT 72 - struct screen_info screen_info; 73 - #endif 74 71 75 72 extern int root_mountflags; 76 73
-13
arch/sparc/kernel/setup_32.c
··· 17 17 #include <linux/initrd.h> 18 18 #include <asm/smp.h> 19 19 #include <linux/user.h> 20 - #include <linux/screen_info.h> 21 20 #include <linux/delay.h> 22 21 #include <linux/fs.h> 23 22 #include <linux/seq_file.h> ··· 49 50 #include <asm/sections.h> 50 51 51 52 #include "kernel.h" 52 - 53 - struct screen_info screen_info = { 54 - 0, 0, /* orig-x, orig-y */ 55 - 0, /* unused */ 56 - 0, /* orig-video-page */ 57 - 0, /* orig-video-mode */ 58 - 128, /* orig-video-cols */ 59 - 0,0,0, /* ega_ax, ega_bx, ega_cx */ 60 - 54, /* orig-video-lines */ 61 - 0, /* orig-video-isVGA */ 62 - 16 /* orig-video-points */ 63 - }; 64 53 65 54 /* Typing sync at the prom prompt calls the function pointed to by 66 55 * romvec->pv_synchook which I set to the following function.
-13
arch/sparc/kernel/setup_64.c
··· 15 15 #include <linux/ptrace.h> 16 16 #include <asm/smp.h> 17 17 #include <linux/user.h> 18 - #include <linux/screen_info.h> 19 18 #include <linux/delay.h> 20 19 #include <linux/fs.h> 21 20 #include <linux/seq_file.h> ··· 66 67 */ 67 68 DEFINE_SPINLOCK(ns87303_lock); 68 69 EXPORT_SYMBOL(ns87303_lock); 69 - 70 - struct screen_info screen_info = { 71 - 0, 0, /* orig-x, orig-y */ 72 - 0, /* unused */ 73 - 0, /* orig-video-page */ 74 - 0, /* orig-video-mode */ 75 - 128, /* orig-video-cols */ 76 - 0, 0, 0, /* unused, ega_bx, unused */ 77 - 54, /* orig-video-lines */ 78 - 0, /* orig-video-isVGA */ 79 - 16 /* orig-video-points */ 80 - }; 81 70 82 71 static void 83 72 prom_console_write(struct console *con, const char *s, unsigned int n)
-12
arch/xtensa/kernel/setup.c
··· 19 19 #include <linux/init.h> 20 20 #include <linux/mm.h> 21 21 #include <linux/proc_fs.h> 22 - #include <linux/screen_info.h> 23 22 #include <linux/kernel.h> 24 23 #include <linux/percpu.h> 25 24 #include <linux/reboot.h> ··· 47 48 #include <asm/sysmem.h> 48 49 #include <asm/timex.h> 49 50 #include <asm/traps.h> 50 - 51 - #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) 52 - struct screen_info screen_info = { 53 - .orig_x = 0, 54 - .orig_y = 24, 55 - .orig_video_cols = 80, 56 - .orig_video_lines = 24, 57 - .orig_video_isVGA = 1, 58 - .orig_video_points = 16, 59 - }; 60 - #endif 61 51 62 52 #ifdef CONFIG_BLK_DEV_INITRD 63 53 extern unsigned long initrd_start;