Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp105716yba; Mon, 20 May 2019 05:48:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqwv6lludYptmagGPrFpO4ZtobvqpDoeLFwLi5OS4ztQpj6072SzEnU7XOHJvMvOwOyPDnFL X-Received: by 2002:a17:902:b20f:: with SMTP id t15mr55025479plr.220.1558356537211; Mon, 20 May 2019 05:48:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558356537; cv=none; d=google.com; s=arc-20160816; b=Tm2JpqHBbM6ebLN8zZ6exdP04hBteiU9j/1/oOA6aSmiLpJ88bMTBa9jFBbl2LZwEC wE1h3g3YBXaKrJvDAfyEVB8o7Ed0ZEU/vcBYoNwlatPnl9gOYaPBz7KZjRygBLxPZUA4 ACVZkO3C9KjJXqHtEeyG1/6VaMm3q7LSmQmD8z4BtIylkLui75sRYT1SZIcTVfSUzDPU ykIw3BiftM/LIWyZMJr+da7cke5Xn1bERZCFtNwb9yOpFLdpqGZkj9EcAtRMGg8n/zFl B8F9u2/aAfWxXVMFy2mhcXApyQfll3JlBiSJGWhkxfU0ilUoQG/NvLh+5s+njFt8IYlh tW2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1iaRpWIu0X4sLqayvo4bIWS7cHygtL4JnIzYj6tRWe0=; b=UcSQ6FzSUoBBk2/Hbq98MZpFCrk9od96FkpKFdPe3S/PPnZHBs58iAJGXlZwUNSctD /JtXUeGgV5bTu6UwD8XCOiU+KFbIF+UIfpc/rrtUIcY8vQridXsSgMspfMMOSKou5Bsa SitvuNzBiLul88CoUDtmHwxaf6X2LUlr+aVjyxGHwyj9y5wpIC4RWGf7ma2DIoa83DQ+ SERwtNvgHdiYngBb5GywIoTfkJjvGCZs+ZzY9kZ2Z+6uDoR1TXLSR4m/xpOePMSoC+1E oNAdL/QebjVwwNwUBRSn9FNB4poRJB1GaTY9E28RIFD2wkN306PZIqNul9N1WBgsMYOo ht8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WrWP5j9Y; 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 q3si18819111pgg.407.2019.05.20.05.48.42; Mon, 20 May 2019 05:48:57 -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; dkim=pass header.i=@kernel.org header.s=default header.b=WrWP5j9Y; 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 S2388866AbfETMYf (ORCPT + 99 others); Mon, 20 May 2019 08:24:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:39382 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732672AbfETMYc (ORCPT ); Mon, 20 May 2019 08:24:32 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 DCD0D20645; Mon, 20 May 2019 12:24:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558355071; bh=rzy736CsgS0Y3zt/uwrEMZnuY8Zf2XnsR1lqWDYGqlg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WrWP5j9YWNorfr4d6WWMoWZxxs76BsLOpbQX9pXEF18Y6r737yHwaFigMgM6TqFDi E2MK0jdVvi/nb/y8E2VMlKzCeiDCTgACe6PUGw9SxIEgAVUr7MJZkrxsBm9PRkKsBP MndHECwM8ZPdtOYd1ll3sWtrWDpJ1biqRzco2GDg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Anup Patel , Atish Patra , Palmer Dabbelt Subject: [PATCH 4.19 084/105] tty: Dont force RISCV SBI console as preferred console Date: Mon, 20 May 2019 14:14:30 +0200 Message-Id: <20190520115253.075030191@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190520115247.060821231@linuxfoundation.org> References: <20190520115247.060821231@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Anup Patel commit f91253a3d005796404ae0e578b3394459b5f9b71 upstream. The Linux kernel will auto-disables all boot consoles whenever it gets a preferred real console. Currently on RISC-V systems, if we have a real console which is not RISCV SBI console then boot consoles (such as earlycon=sbi) are not auto-disabled when a real console (ttyS0 or ttySIF0) is available. This results in duplicate prints at boot-time after kernel starts using real console (i.e. ttyS0 or ttySIF0) if "earlycon=" kernel parameter was passed by bootloader. The reason for above issue is that RISCV SBI console always adds itself as preferred console which is causing other real consoles to be not used as preferred console. Ideally "console=" kernel parameter passed by bootloaders should be the one selecting a preferred real console. This patch fixes above issue by not forcing RISCV SBI console as preferred console. Fixes: afa6b1ccfad5 ("tty: New RISC-V SBI console driver") Cc: stable@vger.kernel.org Signed-off-by: Anup Patel Reviewed-by: Atish Patra Signed-off-by: Palmer Dabbelt Signed-off-by: Greg Kroah-Hartman --- drivers/tty/hvc/hvc_riscv_sbi.c | 1 - 1 file changed, 1 deletion(-) --- a/drivers/tty/hvc/hvc_riscv_sbi.c +++ b/drivers/tty/hvc/hvc_riscv_sbi.c @@ -53,7 +53,6 @@ device_initcall(hvc_sbi_init); static int __init hvc_sbi_console_init(void) { hvc_instantiate(0, 0, &hvc_sbi_ops); - add_preferred_console("hvc", 0, NULL); return 0; }