From patchwork Tue Oct 17 09:39:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13424925 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 52643CDB474 for ; Tue, 17 Oct 2023 09:40:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SOfnGiSahBAu2sDPFUOfp89QY/6ETShngwXd5MMXQMQ=; b=VWMCVjmLv1usK7 X2//r9WnR/DMcvQmc/vXlcVfCcZIz46mPzXsKi1lDg3j/KWyv5J8Gt0q7SQ8iSkfdzg+VEovK17lU /osA1tbR/S5d74Ed7pKDcalwoptSe3YTmu39Dltrsan5aqldBfCumrVImxfj1OYXhVzisUmkkODGj U+fLRqeSWIUlNn7DpqB2hmdJfTweHiHZ1becrykv60MPcYxLpCrPy35msOS7vIURBJMxTuKkwZ12+ KnxlYcWYAFz7N4RRjS/u9K4ONpG26apUNa0rh4fauDwR256XVuyV4V7tlFYFojaOsrTwvVoBIbIeS 5HaVo4VfqE68FYPsW/cg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qsgYc-00Bqoq-0j; Tue, 17 Oct 2023 09:40:10 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qsgYX-00Bqlr-2L for linux-arm-kernel@lists.infradead.org; Tue, 17 Oct 2023 09:40:07 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id A668ACE1D6F; Tue, 17 Oct 2023 09:40:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A97CAC433CB; Tue, 17 Oct 2023 09:39:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697535600; bh=K50Y7pAstCn0vIlPs9oEq/dIQQ7sSFid9QIZDsnEC58=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E7pNPOWwMNsnxJiNu+/ulgNnBPDAK35fhQY/w7ONBieXm4cxYawjWgp+kN+LC7hSs 9GJ9Tcb6m25A1HX7BzUn4rev268Rkgkrbkob8CL0e393Bikj1yJFTFiqAcGV7/vxMB YNvql7JqXrq6bvENwo+N7rGrSMwXCMgsoPUBzktAVO29HeHYQR6CXNEsPEXMU8AEw+ Z/nNofFXDLIJNcfRYEqfhQMUKuf3vP/Ywv31+csIT9PN4yDoiI/cXtRwng0kDUwiwD wB9rHCuJNUzxssMimXgA+/Jldhu15olqxUYcne59UwMrXksyGLTyAHL6x9ZURDDCbH vS8plkDZ4H3/w== From: Arnd Bergmann To: Greg Kroah-Hartman , linux-fbdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, loongarch@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Javier Martinez Canillas , Ard Biesheuvel , Helge Deller , Thomas Zimmermann , Arnd Bergmann Subject: [PATCH 2/2] console: fix up ARM screen_info reference Date: Tue, 17 Oct 2023 11:39:47 +0200 Message-Id: <20231017093947.3627976-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231017093947.3627976-1-arnd@kernel.org> References: <20231017093947.3627976-1-arnd@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231017_024006_106511_B8F0CA87 X-CRM114-Status: GOOD ( 17.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann Separating the VGA console screen_info from the EFI one unfortunately caused a build failure for footbridge that I had never caught with randconfig builds: arch/arm/kernel/setup.c:932:27: error: static declaration of 'vgacon_screen_info' follows non-static declaration 932 | static struct screen_info vgacon_screen_info = { | ^~~~~~~~~~~~~~~~~~ In file included from arch/arm/kernel/setup.c:44: arch/arm/include/asm/setup.h:40:27: note: previous declaration of 'vgacon_screen_info' with type 'struct screen_info' 40 | extern struct screen_info vgacon_screen_info; | ^~~~~~~~~~~~~~~~~~ arm-linux-gnueabi-ld: drivers/video/console/dummycon.o: in function `dummycon_init': dummycon.c:(.text+0xe4): undefined reference to `screen_info' Make sure the variable is global to avoid the conflict with the extern declaration, and make it work in dummycon.c Signed-off-by: Arnd Bergmann --- Greg, this was caused by patch "vgacon: clean up global screen_info instances" in tty-testing. You can either apply this patch on top or fold it into that, or I can just resend the fixed series if you prefer. --- arch/arm/include/asm/vga.h | 1 + arch/arm/kernel/setup.c | 2 +- drivers/video/console/dummycon.c | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/arm/include/asm/vga.h b/arch/arm/include/asm/vga.h index 7c0bee57855ab..6c430ec371df2 100644 --- a/arch/arm/include/asm/vga.h +++ b/arch/arm/include/asm/vga.h @@ -5,6 +5,7 @@ #include extern unsigned long vga_base; +extern struct screen_info vgacon_screen_info; #define VGA_MAP_MEM(x,s) (vga_base + (x)) diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index b808712e85981..ff2299ce1ad7a 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -929,7 +929,7 @@ static void __init request_standard_resources(const struct machine_desc *mdesc) } #if defined(CONFIG_VGA_CONSOLE) -static struct screen_info vgacon_screen_info = { +struct screen_info vgacon_screen_info = { .orig_video_lines = 30, .orig_video_cols = 80, .orig_video_mode = 0, diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c index 70549fecee12c..14af5d9e13b00 100644 --- a/drivers/video/console/dummycon.c +++ b/drivers/video/console/dummycon.c @@ -19,8 +19,9 @@ */ #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 +#include +#define DUMMY_COLUMNS vgacon_screen_info.orig_video_cols +#define DUMMY_ROWS vgacon_screen_info.orig_video_lines #else /* set by Kconfig. Use 80x25 for 640x480 and 160x64 for 1280x1024 */ #define DUMMY_COLUMNS CONFIG_DUMMY_CONSOLE_COLUMNS