Received: by 10.213.65.68 with SMTP id h4csp292971imn; Fri, 23 Mar 2018 04:55:55 -0700 (PDT) X-Google-Smtp-Source: AG47ELtKPFhEwOjuOipfZCp3EMLLDa9udBigatpW31PJX1O4NCOTVhfHWz4eVj/1qNX7Iv9mUzs3 X-Received: by 10.101.70.203 with SMTP id n11mr21014138pgr.166.1521806154983; Fri, 23 Mar 2018 04:55:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521806154; cv=none; d=google.com; s=arc-20160816; b=JSkWXAJRHKMwqom8UFZEFZr3mzT0pvezBpf5XQmQ8p60Q083t+0rcD+ZftQ1faGIHM 1KzdzHzlf7OgsB9Drt/FUgnGuj8Pc8ALjcubY86k8MkX6z2O8hx7x9NnKBIdHj3jABwk OIuHaNJ+8sXyCV+3S7nLeer3kSLzYAWzCZwd7IzfaZDUObZC+Cah0YMwbxqN/Y8/OX5s 09dqTzhYvTFA8Zb4ypO985fCr3zUSG/XntBjVzfd/9rFDSCcEADRhco7x6rrZk9bq1pZ 4jsQDsUj43NPcIprfrOsXmavGwZDqtbGuDg7yyXzh5Rbkia6if765l1n4OiD0+rSu7oc D6/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=cDSeymhqn+SBJ0ZtB6v1gINjStgBXqz6oQockmn57VY=; b=nVlbvTZqvxNy3tbf0jcTVwHvfs6FHsdonM9QnSNfd8QN9Om/OAFWWlghiTXHmJBsSQ Jmfxx0Dl82grFDnumWoJU0OBtS3zkeKo/FOwTsu+xSrxWTO8/HNLezBuHmtuGBW6Xi98 wXS0xiOYuIUCWLJ3IY3YyTR55mKu0zFEqL3TJ69ZlwAmOs6P2I7eYK0peCqpxOQMoQAl m3k8NU2SXVBYKJ/pyeHwbI89RouSEpG9cfwKFV4sViso8O8AIk0dO7uBJrshPTVRk5+S ScXeTdAIDYZxrGe2hBR7D4o9Mj79u4akiyxkoc4FzxVFgLADYZcHOLBCY3Sl0AT/5AJF RYYA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g5si5913484pgq.325.2018.03.23.04.55.40; Fri, 23 Mar 2018 04:55:54 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753943AbeCWKBd (ORCPT + 99 others); Fri, 23 Mar 2018 06:01:33 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37878 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753908AbeCWKBb (ORCPT ); Fri, 23 Mar 2018 06:01:31 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id CEA211206; Fri, 23 Mar 2018 10:01:30 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sebastian Andrzej Siewior , Miodrag Dinic , Sasha Levin Subject: [PATCH 4.14 19/77] tty: goldfish: Enable earlycon only if built-in Date: Fri, 23 Mar 2018 10:53:53 +0100 Message-Id: <20180323094143.490235440@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323094142.260022880@linuxfoundation.org> References: <20180323094142.260022880@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ 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_earlycon' |Makefile:1005: recipe for target 'vmlinux' failed earlycon.c::parse_options() invokes uart_parse_earlycon() from serial_core.c which is compiled=m because GOLDFISH_TTY itself (and most others) are =m. To avoid that, I'm adding the _CONSOLE config option which is selected if the GOLDFISH module itself is =y since it doesn't need the early bits for the =m 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 Signed-off-by: Greg Kroah-Hartman --- drivers/tty/Kconfig | 6 +++++- drivers/tty/goldfish.c | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) --- 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. +config GOLDFISH_TTY_EARLY_CONSOLE + bool + default y if GOLDFISH_TTY=y + select SERIAL_EARLYCON + config DA_TTY bool "DA TTY" depends on METAG_DA --- a/drivers/tty/goldfish.c +++ b/drivers/tty/goldfish.c @@ -442,6 +442,7 @@ static int goldfish_tty_remove(struct pl return 0; } +#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(stru } OF_EARLYCON_DECLARE(early_gf_tty, "google,goldfish-tty", gf_earlycon_setup); +#endif static const struct of_device_id goldfish_tty_of_match[] = { { .compatible = "google,goldfish-tty", },