Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp217179yba; Thu, 25 Apr 2019 21:46:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqx3pNllNAQH5LCaQ1AAG22NHRsshXP7cr2w4d+/G/5/9oR0nw7Rr27/QiQrnPwYv2przWlj X-Received: by 2002:a17:902:aa85:: with SMTP id d5mr42139542plr.251.1556253979791; Thu, 25 Apr 2019 21:46:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556253979; cv=none; d=google.com; s=arc-20160816; b=dkTbdEmPC+eyP8Uhe/Ys0MB78jdJ32/S8B4jfwEfuWv22kqCQuW0qplfyhLWYPe/EJ 51GwG9eLxOuCG3kuXQxMyB80Sf/o5vnt8xMOdR1EOWjGdEnn8o9bDg6Jc21oMzgdyR1s kJNihC8iymdOG1Hnl8Nf3KZLnUse++AiBAOMGeKhkDJCZEPkWv32uRMwDyhv9ktnA2Mf P+Q76/C8TkzlzPZPkQbJ8Glp6qzcjn8suuP3wi42zwfGgz8TGUSquFvcfZvVQEYSFP9j MzEU1qVOKjaLLzUwKGgvCNAjlH0//zK7cMUgOktibVf/jg85hwO1oq6oNOe7lT7IMQ8c 6Ipw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:ironport-sdr:ironport-sdr :dkim-signature; bh=I2Fz3QNJywZc34w/l6xRuPX6GZ7HkIadt1RtFAyBFTI=; b=T/IjK5wqjTNJ+UelREVf7EMKSwlfWtHYbZxNcJhhP2ZTBJF2iOEQR4mnE8Jh7bmscX 9bE1uOvkZiPHvlFeGXn7LKZg6J1heMQcZzc80utyzZIZN8/WWjDFwD/Hq+tssVv2aSXN q+9prcZ49MZdAlwAPndUH4U4mbDIQMFng+HpoMTNolZtSnXV+S2DiJtILlzuw9moK8rV OLF8SnZEKEaWhZ63l5wVKcH01KU+R9r8cbnzeXU+pFfayf20gatWP1RF9kPauVq1nHZi zuRlZ90cwtOElVisTSGYpEuzxTMraSmcrJUsNejhKUHkrIA9WJaV+lWwOdW4243lIU6M FTSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=NiRelQBK; 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=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o9si9836626pgp.35.2019.04.25.21.46.04; Thu, 25 Apr 2019 21:46:19 -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=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=NiRelQBK; 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=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726933AbfDZElX (ORCPT + 99 others); Fri, 26 Apr 2019 00:41:23 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:17040 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726199AbfDZElX (ORCPT ); Fri, 26 Apr 2019 00:41:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1556253716; x=1587789716; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=MpWvheFOejWRs2zd9Qglh5YkbiX057ZAvN5hIeqKvGg=; b=NiRelQBKakauQauElgyk8KQXFxtssVTsVlfTsxVB1MuTjX7WCuJtPxSJ KTpLm1lP+5qmx1h+A0z7laMzBqrKOzQAg7x7JOxXZQJnBgCkwi31gvYbV Hb1GyOcSy6qWY/CFEavecjqnwDSDKDEjmcI977M7DwVrveQ3qKLJeI+iI t1WeLOhl6paNZAfoWS2qzKtuyopx0wojNXYgxJ2ejxcatiOl/uiEc/sV7 YxhAvOYeCag9URpX6gh7Wh+RMDaBlOlDYxBoc4CK7sbGgXBdwddL/ozu/ TJue/T044qYcQr2Z1VwvwTUJfSR8XXfmMWIccHA6T6fi6uYxdtVjHe1zE Q==; X-IronPort-AV: E=Sophos;i="5.60,396,1549900800"; d="scan'208";a="206023511" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 26 Apr 2019 12:41:55 +0800 IronPort-SDR: z2K6iaIJlDslcti6kPdWyzkN4pri40PJhawW9UmjwZtOdL/pXPnOsjUi9GAoVOQvE4Ls8VZyDB zzOj19D86aveVnxGnShc9RTzEz3G+GO7ulEe+3/7E0IIJ+jhcVciqkYEVBM++hpz0la9q3/AVV +5vdtTI89QUPJ+1SSwaGGtJG0cNCymmNAaMmSwh4PURtTv9qh/Ty0PMyMnB6YYAWL5v7O7m1G4 RiQp0qmfUGHOM5UrSkt7p3ez5RWUdnD3XKcV8DOZKsm9Q4L6WEyumQYKq36kRYb7YnkhACOZNl /Db1pg9qo8bfUmR9ochNUcEh Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP; 25 Apr 2019 21:20:00 -0700 IronPort-SDR: U3aV7ee0cykZHXpN0/znPIqgRaqQfDMLXGGa8LArrP7M+zdfNNiDSefYqC50qQqSyAnAfA2mtE T7qBObKPgcOlc/RzeNNWd4By+0xOsWJUVMH9+b9oq7x+523e7mezX+XfZMd1B02bYtz4G39DxP 8te9T7QaBXt3D90DnF8wTlOwvXXwzzz5W3lJiy0ULk1RJXiHwgytRcjAxJ7aZF3/RT2DiO+lr+ yFDWbVTblOwKmQ1BC90SdBhwCwECPdYRp6zZzcAkQJOD5lS/l6Iiaf9TrQdMfgv2jZ0hZTZgPB w2E= Received: from usa001205.ad.shared (HELO [10.86.53.92]) ([10.86.53.92]) by uls-op-cesaip01.wdc.com with ESMTP; 25 Apr 2019 21:41:23 -0700 Subject: Re: [PATCH] tty: Don't force RISCV SBI console as preferred console To: Anup Patel , Greg Kroah-Hartman , Jiri Slaby , Palmer Dabbelt , Albert Ou Cc: Christoph Hellwig , "linux-riscv@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" References: <20190425133435.56065-1-anup.patel@wdc.com> From: Atish Patra Message-ID: <9a8be7ef-e62e-2a93-9170-e3dc70dfb25f@wdc.com> Date: Thu, 25 Apr 2019 21:41:21 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190425133435.56065-1-anup.patel@wdc.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/25/19 6:35 AM, Anup Patel wrote: > 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. > Do we even need HVC_SBI console to be enabled by default? Disabling CONFIG_HVC_RISCV_SBI seems to be fine while running in QEMU. If we don't need it, I suggest we should remove the config option from defconfig in addition to this patch. Regards, Atish > 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 > --- > drivers/tty/hvc/hvc_riscv_sbi.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/tty/hvc/hvc_riscv_sbi.c b/drivers/tty/hvc/hvc_riscv_sbi.c > index 75155bde2b88..31f53fa77e4a 100644 > --- 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; > } >