Received: by 10.223.185.116 with SMTP id b49csp5966029wrg; Wed, 7 Mar 2018 22:50:03 -0800 (PST) X-Google-Smtp-Source: AG47ELv6zIuWSNmDkYZ29grCUtVdsqgMzFnmAhHiMYuP+54R0C8l1V3c8OspgHpzUSYXA6qxp9pR X-Received: by 10.101.76.13 with SMTP id u13mr19810414pgq.287.1520491803570; Wed, 07 Mar 2018 22:50:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520491803; cv=none; d=google.com; s=arc-20160816; b=tWjTC4tHr/v0ezaQZs7maPEXfSlTU2O7ByAyEhyUHvcAAopb1OzzcksoeCXe2SlUF+ hw79YbIDKK/8HTn2vMV/dHVBYM2IrwjTz79x8/YMld+yy8sa50rMd1rcuhHUWi1ROAYm pkpM/LamRp1z9VxIE7dI9k9h6vOE/e27hfytfPnBbZdUzxDciaA0KkaQSZAa/YOA7AX6 5LOoGwqWqirVMqdPFxgcatkfBoBvCCG7sACJsnSV//Zj5xx/k+GRsAnf8yRLXlbVJU5H 2Yq9e2oP3btJUfUwcJX49Cr4GDgHG2j3UmVlCPd/jsQGDa7syrUzkJxNnOmzx+mrYPlv jHIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=K5VHiNKQJ7+Wn0oEJXFrh/V6HQcKz/dLWsf3nwJanX0=; b=rzUK+8YOnKFz4ahdaoWNj3QvsfvssyyJuNFEOFJFQFXAO7UA11pm55+q1J/3MIbVr4 MI52fGbBheJDiLIuMbnbT+UsgjQV2DBXQWcewIyndb1T0W+SWpf3dzSAhwgTjcYmskCP f+e9uJRGo79XrRi0KevsRw7ugqnjoaZSCnwslXntBhUbZ/l7BBNWvva3gnsQ4SpwtYxJ ZiahFLCK+z4XEDTb90TICYC3UO571qJbTITcnAoHQ842AJ1RSEGEELV2DXkCBEyE+7ui YED6oKTNbK5QtFPm8+MWvRtw3WK7vgRl2xvYBo/yvvytmdfcjmGZucNTj+yO8ti/4sQw ZMog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=UV1DZkmP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b6si12584029pgr.640.2018.03.07.22.49.49; Wed, 07 Mar 2018 22:50:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=UV1DZkmP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965147AbeCHGs3 (ORCPT + 99 others); Thu, 8 Mar 2018 01:48:29 -0500 Received: from mail-by2nam03on0101.outbound.protection.outlook.com ([104.47.42.101]:17968 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935224AbeCHE6R (ORCPT ); Wed, 7 Mar 2018 23:58:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=K5VHiNKQJ7+Wn0oEJXFrh/V6HQcKz/dLWsf3nwJanX0=; b=UV1DZkmPf2CaafobfM/YeR1gM4sgFc8Ydmqk5kCDwfiuQXuRU6N7JHDjKssIv9FgJ5CDmW36TWRSgIYR4QowWsBBaFrHIr4QLDVT+Huf7JiDRimjGBmWmMxz4AjGovfSLEuIfRxBqX0QMu9tgXqwWuU+1ZINV334pkMoFua0lM0= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0808.namprd21.prod.outlook.com (10.167.110.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.1; Thu, 8 Mar 2018 04:58:13 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446%2]) with mapi id 15.20.0588.008; Thu, 8 Mar 2018 04:58:13 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Sebastian Andrzej Siewior , Greg Kroah-Hartman , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 20/67] tty: goldfish: Enable 'earlycon' only if built-in Thread-Topic: [PATCH AUTOSEL for 4.14 20/67] tty: goldfish: Enable 'earlycon' only if built-in Thread-Index: AQHTtpn87EH5/F61rUGBq3+zobOEpg== Date: Thu, 8 Mar 2018 04:57:40 +0000 Message-ID: <20180308045641.7814-20-alexander.levin@microsoft.com> References: <20180308045641.7814-1-alexander.levin@microsoft.com> In-Reply-To: <20180308045641.7814-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0808;20:YuDndRRbRqI0Nnv6Bn5rdVM+H9S6Z4k0FbO5LfyAuEi+KEbifXa8XeOAKIOgHaI3aulnXJbrYarhMCVlWtAOxcFqOuBIa364hvNfvmAMpeQapiCXo2qtyqgVIQwUtWnxZc13DLT3ieho1EjGaMxuM4dF8PD0c9hUTDLlqhvlidE= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: aa6cdb31-d0ae-4d70-6e03-08d584b1328f x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0808; x-ms-traffictypediagnostic: DM5PR2101MB0808: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231220)(944501244)(52105095)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR2101MB0808;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0808; x-forefront-prvs: 060503E79B x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39380400002)(396003)(39860400002)(366004)(376002)(346002)(199004)(189003)(22452003)(99286004)(76176011)(2906002)(105586002)(3846002)(86612001)(478600001)(72206003)(14454004)(2900100001)(8676002)(102836004)(68736007)(5660300001)(316002)(6116002)(54906003)(26005)(6506007)(575784001)(59450400001)(1076002)(86362001)(36756003)(186003)(10090500001)(110136005)(106356001)(4326008)(6512007)(6486002)(7736002)(5250100002)(3280700002)(3660700001)(2501003)(6666003)(81166006)(2950100002)(305945005)(53936002)(107886003)(8936002)(6436002)(81156014)(66066001)(25786009)(10290500003)(97736004)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0808;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 1X4Cxnq9Qpeok8H+CpnG8HrvfZgr/dvGokkjZRy30mDTViYSoOgO4s9lPhcw8qSkSejX+I1mbt/iqX1NM7eJAC+NGAhh+60b+U1JgAzvjpmdCywGuj7iRwYQgmm2HKls5+iacnvG6wUeWXntXIQd4J/gf0pM7MlTUoix9pmQfIJb2jBiUnc3kcN0WEHAHO86XPcS3jrzBh4VznYCzDwxTucmbDH1T0c1tZbnEHLpUBH8D5w3wzS91xYMLJhd8xiasYlJLYz7AdJexncdAhykRQSlgE1Nkafr/+Zr/SLyIUFJ/sLX0hS+VTTj2huFyOQf+2mrwfjD+dZA0yIOfuWb6g== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: aa6cdb31-d0ae-4d70-6e03-08d584b1328f X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2018 04:57:40.2469 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0808 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sebastian Andrzej Siewior [ Upstream commit 6a28fd2bbc94bfca105632e5ef8a9dbe63ba0b39 ] Commit 3840ed9548f7 ("tty: goldfish: Implement support for kernel 'earlycon' parameter") breaks an allmodconfig config on x86: | LD vmlinux.o | MODPOST vmlinux.o |drivers/tty/serial/earlycon.o: In function `parse_options': |drivers/tty/serial/earlycon.c:97: undefined reference to `uart_parse_early= con' |Makefile:1005: recipe for target 'vmlinux' failed earlycon.c::parse_options() invokes uart_parse_earlycon() from serial_core.= c which is compiled=3Dm because GOLDFISH_TTY itself (and most others) are =3D= m. To avoid that, I'm adding the _CONSOLE config option which is selected if t= he GOLDFISH module itself is =3Dy since it doesn't need the early bits for the= =3Dm case (other drivers do the same dance). The alternative would be to move uart_parse_earlycon() from serial_core.c to earlycon.c (we don't have that many users of that function). Fixes: 3840ed9548f7 ("tty: goldfish: Implement support for kernel 'earlycon' parameter") Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Miodrag Dinic Acked-by: Miodrag Dinic Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/tty/Kconfig | 6 +++++- drivers/tty/goldfish.c | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig index cc2b4d9433ed..b811442c5ce6 100644 --- a/drivers/tty/Kconfig +++ b/drivers/tty/Kconfig @@ -394,10 +394,14 @@ config GOLDFISH_TTY depends on GOLDFISH select SERIAL_CORE select SERIAL_CORE_CONSOLE - select SERIAL_EARLYCON help Console and system TTY driver for the Goldfish virtual platform. =20 +config GOLDFISH_TTY_EARLY_CONSOLE + bool + default y if GOLDFISH_TTY=3Dy + select SERIAL_EARLYCON + config DA_TTY bool "DA TTY" depends on METAG_DA diff --git a/drivers/tty/goldfish.c b/drivers/tty/goldfish.c index 381e981dee06..85a500ddbcaa 100644 --- a/drivers/tty/goldfish.c +++ b/drivers/tty/goldfish.c @@ -442,6 +442,7 @@ static int goldfish_tty_remove(struct platform_device *= pdev) return 0; } =20 +#ifdef CONFIG_GOLDFISH_TTY_EARLY_CONSOLE static void gf_early_console_putchar(struct uart_port *port, int ch) { __raw_writel(ch, port->membase); @@ -465,6 +466,7 @@ static int __init gf_earlycon_setup(struct earlycon_dev= ice *device, } =20 OF_EARLYCON_DECLARE(early_gf_tty, "google,goldfish-tty", gf_earlycon_setup= ); +#endif =20 static const struct of_device_id goldfish_tty_of_match[] =3D { { .compatible =3D "google,goldfish-tty", }, --=20 2.14.1