Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp101009yba; Mon, 20 May 2019 05:43:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqysdgLIuBAK95a/sFhtFOX7q9g3xvBpgj0nrFt/g7NE+fqH1IOG7kTtyOzM0dKnvlpHJyrg X-Received: by 2002:a63:e451:: with SMTP id i17mr75598260pgk.312.1558356212477; Mon, 20 May 2019 05:43:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558356212; cv=none; d=google.com; s=arc-20160816; b=c4c1pMNG5xhQ80pMkkMFf2/dcATYwj4wQZtjYbSYkELuoHIVf17r7eHwyXl5tC/swC xOurXlV4pMaiOWYx10ap0HrcNuGfuC/fHjBK0Li9CcgaYqOeOuQvHFznTFxluseFvMqi pfet5aXhTXPmiUQifSNEM2vTnMi0kvHM8vY8UnAhYblztlvYDoagDoOVQ/QCG1yER16q 5CSE6PVn8msUuoTZKHaKKBDzDf2oc1uYaK804WX6MRTaaHd/nqBYEl69F/ruHhqLGwDt bv0q+y7qPllsXYTvrnPjNNQwQgRUfcUkP0edNZL7JeKOHWzpsv1dKFGoWsA6ipJtmRcF m5NQ== 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=Wo8Nqa+3k6ZSMnFZrm4DZwHJ7wLYI0bji3cRUx3qp0dYEOL9VigzR3UErnq413NvM+ lYc80K+1rRvXEA9KxFT0uFeq2OsWMq/5Ay0CuLwaxT6+1CfTplSWqnKDbnJSVjdxJClk qV2K5iySfI+T2zn6gEGeJ1iYjzqm0p7pZd/gVBAodfYUD3zCjawVpL+Gi9T3aMtqMHKt 8vG41onPt+5P15jnEjo0z3tNPeu8voIdH0y86yCuGBuzx7DHUvJLaBPWtZwQ/XE8iQhi 9FmgBFX9sUKBxqolLddhBO9pepj1ayoT4NK9zstQo3TGMGlmpiEq91XACqLNTHbRkld/ PYxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="l/VW0c5d"; 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 b13si17514711pgk.500.2019.05.20.05.43.17; Mon, 20 May 2019 05:43:32 -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="l/VW0c5d"; 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 S2390786AbfETMli (ORCPT + 99 others); Mon, 20 May 2019 08:41:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:47684 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390277AbfETMbM (ORCPT ); Mon, 20 May 2019 08:31:12 -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 290EA21721; Mon, 20 May 2019 12:31:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558355471; bh=rzy736CsgS0Y3zt/uwrEMZnuY8Zf2XnsR1lqWDYGqlg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l/VW0c5dvt9RSuvvaOe8dCOGZCcuVsH40e4vz8FqzIjWYH6+UJinioVT4VhkVfZ0r yVqXd4BD6sbH98sq3WNvmxG08iIXM5NdzA2IyKG9im92py1Q8sE5+kUZOikshMMxGC hKSVmfEDoOdcvYdYKU594Ze/TW6BmXW9lq9q8fas= 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 5.0 101/123] tty: Dont force RISCV SBI console as preferred console Date: Mon, 20 May 2019 14:14:41 +0200 Message-Id: <20190520115251.749150249@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190520115245.439864225@linuxfoundation.org> References: <20190520115245.439864225@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; }