Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp406124pxu; Tue, 1 Dec 2020 14:27:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxhqNnC8TY87Yg3aZzs9v3/TcR79QvbYHkvsxieVq8HcDYHu9tYxaL8iC5FYmyZaFoaqYng X-Received: by 2002:aa7:cad2:: with SMTP id l18mr5240624edt.183.1606861651389; Tue, 01 Dec 2020 14:27:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606861651; cv=none; d=google.com; s=arc-20160816; b=MKZXBMPIfwdmmbgF2uGBPbcC0pyiz1PivDw/KE05kzyzaVPv9X1EHJDUX7zBEUjUhk mxsTE8tfByZJl5PUvF7fxel/EfjxMtmPs/3+QccuVM+lhKS5FyYfxpyAgrwfh8X+urda K+MYS21zQSChBjKD1J2Qx5SWbadMDD7ETVN3CLfVBt9qXnzKiTaK40rNVQM52QTU+mdr zoRw+qoXaBauLd5pwy6gti5Nv90gGxRyImX4uX6Xr7WELrNj3qs1ppPh/1SyU+tIuySA 0i//zQkNM/c3ZglR25Lad1lCu5WDE9b93Gt/3whcplzwLlsnE7bvwl94bgSxDtowk9FS +Dew== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qc3rf74coNHcOVUxdaHb9PFOoUw9rwyyImVSHYD52oU=; b=c24MSrm9QOkXhoUmn131R6/D6H/6FH6UaQsD4cZ/8JXzXGTm3mvYSe9gsTYf5IuRaJ VaIPNNw74H/XLJNmJMRqrvOPlQ7H/CXtbpJc/jCFl1VSbX8h6oLHgtQxl/5M9m+DW840 y+4iGq6osBS4ksKl/We3ei/8yFwYGDRGhgPzM8GnToIMs2x8Ky9do1hL0P66bCq4Y4fs jwQTflPY0ks5vebTNaZzkeIW9fRvI3cDYNJfJGt8Ibj2nuooGLGZi1j0ZXbGy8m2i7Na yFMN2D9At5frsAoklm/wtMtcRt04+K2skFLtBkAOt1kyHmO3ceaoWxC/tMWjBKBrlu50 7K1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oJisSBvd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rn21si850627ejb.130.2020.12.01.14.27.08; Tue, 01 Dec 2020 14:27:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oJisSBvd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390063AbgLAJNN (ORCPT + 99 others); Tue, 1 Dec 2020 04:13:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:50912 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389187AbgLAJNL (ORCPT ); Tue, 1 Dec 2020 04:13:11 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 158BB20671; Tue, 1 Dec 2020 09:12:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606813969; bh=hDkUHLtEXHZepNlTq4zsfhMyjfZhkbFrAjuzNoxq4ms=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oJisSBvddcf16yzI0xsEOvMCm11kNRbiCWx30JXxjjgthp3sFdKtt/hfUCy89KtNz xBynK/ejcoujdw5mTxBM3kTBiRjv2OxucToRVfKv1Gg0uGayagTyu6bNrZ1csLZBP0 HRSfqe3bglQCyoh5zPvRj+XBtL0sRMPUmSrZkHR8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , Damien Le Moal , Ard Biesheuvel , Sasha Levin Subject: [PATCH 5.9 122/152] efi: EFI_EARLYCON should depend on EFI Date: Tue, 1 Dec 2020 09:53:57 +0100 Message-Id: <20201201084727.817363356@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201201084711.707195422@linuxfoundation.org> References: <20201201084711.707195422@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Geert Uytterhoeven [ Upstream commit 36a237526cd81ff4b6829e6ebd60921c6f976e3b ] CONFIG_EFI_EARLYCON defaults to yes, and thus is enabled on systems that do not support EFI, or do not have EFI support enabled, but do satisfy the symbol's other dependencies. While drivers/firmware/efi/ won't be entered during the build phase if CONFIG_EFI=n, and drivers/firmware/efi/earlycon.c itself thus won't be built, enabling EFI_EARLYCON does force-enable CONFIG_FONT_SUPPORT and CONFIG_ARCH_USE_MEMREMAP_PROT, and CONFIG_FONT_8x16, which is undesirable. Fix this by making CONFIG_EFI_EARLYCON depend on CONFIG_EFI. This reduces kernel size on headless systems by more than 4 KiB. Fixes: 69c1f396f25b805a ("efi/x86: Convert x86 EFI earlyprintk into generic earlycon implementation") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201124191646.3559757-1-geert@linux-m68k.org Reviewed-by: Damien Le Moal Signed-off-by: Ard Biesheuvel Signed-off-by: Sasha Levin --- drivers/firmware/efi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig index 3939699e62fe0..929d6f05b6bb1 100644 --- a/drivers/firmware/efi/Kconfig +++ b/drivers/firmware/efi/Kconfig @@ -275,7 +275,7 @@ config EFI_DEV_PATH_PARSER config EFI_EARLYCON def_bool y - depends on SERIAL_EARLYCON && !ARM && !IA64 + depends on EFI && SERIAL_EARLYCON && !ARM && !IA64 select FONT_SUPPORT select ARCH_USE_MEMREMAP_PROT -- 2.27.0