Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3038114rdg; Tue, 17 Oct 2023 02:40:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE9KmyiJAflSNvsBFfvgczu4xYdvmQVRdLBZH+stM+N99jjKQW5O+5RkP6lxR67XqH/8m2Y X-Received: by 2002:a17:903:104a:b0:1ca:6abe:cb37 with SMTP id f10-20020a170903104a00b001ca6abecb37mr1438795plc.9.1697535645033; Tue, 17 Oct 2023 02:40:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697535645; cv=none; d=google.com; s=arc-20160816; b=C4tLXgcLFcknRinO9JkSo27ToOzc5FLfmzrHiExPRsjJ5JzDE71EasfV2bQClglBAe QxVllh0kRHQCkE1YwVaK58j5vPa4yt4TuBSpktjqY8Yn7EIAuh5S+mIkwZXGaUBCRKwj zrTE97ZaO2vac/o+R4A5pUsyeFg2PdbtSQ9rGB/H7zKs75AmmHUYpVewi/hKE44fbz2h UoJze41xkNaNrlweC9QeKf+ltKEpxH2pM/yr1JC7lBdlvtDC9RbsXD/TLD8hxZ6Is5Mk m/SzTVVLucTg/z9hrkGWuTQZeS4F2UVAItuVhfZU+8LSe1AuGhjzWSpFYDCHBIwAZf4B oYOA== 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=WtmD+lHJBbdlT0YqFfPAJcyBih9NpulqgCwO19HTjFs=; fh=QnIV+qcCka/dMq35HpNkoG+V67hfy+FAKY9Om+p73Hc=; b=Ru60KSoNrs8ECpd/57BEY2lIXbKWRu/qq1IFYoTVRUf6rUuU2EWYzjv8zfnnZ3GLgP FHOeA15iwelPrHEwx+VZ9kqblvEEKLm8iD5tmx6HuoE0ETLMzs9ZAe1ioUb+2RvKl9y2 d8Pty2HSaS/8aotptGCdj0xwS0Prgp4+Fm+FuMcwnOD5J26K1vaCbTgA+GoLZjTxmnMi sK8KLFNgvrzexND0/HVTZdvQ19/wCMxGGg/kh/4apxlJsIwLl09oXp3zrso4aDJePwUc arhnkE0LQ9FIu++symXAO3r19kpSSYEIkKG15ezH+B1LvztBEiX8rilY9dOp0T8MvOMJ 177w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=E7pNPOWw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id b11-20020a170902b60b00b001c9af77fc54si627939pls.649.2023.10.17.02.40.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 02:40:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=E7pNPOWw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id EB195808A400; Tue, 17 Oct 2023 02:40:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234921AbjJQJkH (ORCPT + 99 others); Tue, 17 Oct 2023 05:40:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234929AbjJQJkC (ORCPT ); Tue, 17 Oct 2023 05:40:02 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 419E0E8; Tue, 17 Oct 2023 02:40:01 -0700 (PDT) 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 17 Oct 2023 02:40:20 -0700 (PDT) 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 -- 2.39.2