Received: by 10.213.65.68 with SMTP id h4csp308356imn; Fri, 23 Mar 2018 05:14:26 -0700 (PDT) X-Google-Smtp-Source: AG47ELu0wYrJ/7UHIpQjlyk95E0Zn+Yk81AutufDb77d7it+kn/ZRsSa64aS6rqC2dVeLY5YMsHQ X-Received: by 10.101.98.149 with SMTP id f21mr20331571pgv.7.1521807266581; Fri, 23 Mar 2018 05:14:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521807266; cv=none; d=google.com; s=arc-20160816; b=oWMn+w+z3a9gWeyVoYyjjxVdzgHNKsOFLhyd8dFa66k4dyNDYiN+2pLxhsArDzNtkJ HUq35fR4QvpxmQJlzlXP5qAT9vWQhlAcjoG8++6IlK52ARWg5KiAnVrebSxE4O2J4HLH JyBwwB6JLVXZinSSrk82vMJDgRWAe9VcvMJZgLcBL8vdSdHBU0dig5vgVs0XlpK+eZQb XWZluXOXpN+YdVIvnfJmYtKRHBrPN3jKaJ1JxYEbf93CrC+NEGdlQ7mNCorZU9fSOOHl zhZR7Hvmz/Gl3+Y3XJ2smBYEuz91tygq1PgchYeNQkaobr43jhkrx1VK7ZKiTyZeMKBJ KtzA== 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=sHHWdI3BkATvVoUVD5u3A7WqiC6hkKg64NFOkGe4WUU=; b=DFOubERyjs6S4eJCzkb7cTCzU2k4JQ5vJHe2ihs8BfQebwE4DqIrtYcrUV+ms30tQZ 60MEkqQwJu7kU/orpRf48QvUM2zKfHTMdDyjUa7VfxMSNrYwoBIPmYuRxna/EKgs+gSJ D3tOeqhGAL0mdP1R/yPy302twLJQdbFTAIJs4nzHSPimTPAyFdprl1otqDEsInGjet3a i606ClMz3NSKwKqXiZmrD+Cu8qJLM3gJ97muELWmZTpHTf8BYAr0BOLHG0Kg0drcAQdK FGo49UIshRsAsT40yFzThYVJGXsexiRupN2GVSrgTecMBLJLEtT40c3ofvDWyO1uLsqR 3lag== 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 u3-v6si8673120plb.593.2018.03.23.05.14.11; Fri, 23 Mar 2018 05:14:26 -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 S1752976AbeCWMNW (ORCPT + 99 others); Fri, 23 Mar 2018 08:13:22 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34598 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752822AbeCWJ5S (ORCPT ); Fri, 23 Mar 2018 05:57:18 -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 0DF611139; Fri, 23 Mar 2018 09:57:17 +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.15 23/84] tty: goldfish: Enable earlycon only if built-in Date: Fri, 23 Mar 2018 10:53:37 +0100 Message-Id: <20180323095415.396641894@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323095411.913234798@linuxfoundation.org> References: <20180323095411.913234798@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.15-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 @@ -433,6 +433,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); @@ -456,6 +457,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", },