From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5C42C433DB for ; Fri, 8 Jan 2021 05:19:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 94A0E233EE for ; Fri, 8 Jan 2021 05:19:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726312AbhAHFTI (ORCPT ); Fri, 8 Jan 2021 00:19:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725308AbhAHFTG (ORCPT ); Fri, 8 Jan 2021 00:19:06 -0500 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE959C0612F4; Thu, 7 Jan 2021 21:18:25 -0800 (PST) Received: by mail-pj1-x102b.google.com with SMTP id v1so3035231pjr.2; Thu, 07 Jan 2021 21:18:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:newsgroups:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=aSxKMwdc2LOn2l0PdeifM0S0Y2l05A8yh5PMl2xYblo=; b=owhFsaRzICAUXtIRzOEsWNqrBsznL9RP5mZdv1HnNGFwini6cJS7XWXLP5SneT86JJ hYJrmSRbH3sbF4eLbZpZhVel0ev0N3uEk9qSYcsqKFnqaYjmV4y+a9+0J3Ljj7ISXW13 mSCWjc170dWhkGxIsUdzwOPPIQ+dMz1lxSpzjZ2s7KPJZK+qNOhoV/CIUxsIxY6xzoVM PN4Q1SZUxw04kkkVFmPBdbcyf0FxEacZfgXrBsXgAr3o0g4Zum7l5puasXgFKAvL6HgG HN59tlSQCgS/YRUzyH5TxAuwDfo0klGPIVLpsgilEmF7PQAUvEoPg/zufmo329Agvvfd 11wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:newsgroups:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=aSxKMwdc2LOn2l0PdeifM0S0Y2l05A8yh5PMl2xYblo=; b=hmfm6F36gfec7BsPHLQH7zqEVr0hczGLURot1ULcJtT9gW+ulIrQHuKP8TGnT6tadb A8DXe2b068XdJ8iop20t7D/ExhpyzFivrpF+Y7hqY1Qya8mIcp+h9oemGHIwmRiTpGlV +ZI6zMoU5NskwIJ58zVQuPD/UMB4bHPU56elbgldKdK8OP2WVeDI9wZa2cFPqp52smaI HGHtcO5mJMs2cWZED2a9KNmywpfG2rxtGItcGAX8SxFB8z/yURmrS+UmUA2idYlA2G9G 1kXudHJSjqhTJt6OCoj90aHBNPIlZDxc8UCmmVGWMyVeOeoiV628nHTXrTFXIT1B79of ygtQ== X-Gm-Message-State: AOAM532OKj4s/jmBdyDqjEbfGF+EuiH2YAzjWEKBIpBMPs3Ve7C57f7Y jFs2AsCTPcWpBSF8nbw4myJpYK7kQQ7CShl6 X-Google-Smtp-Source: ABdhPJxHs2I8fgn1/rnaSLlvFAMF8We5+bkxciPAber23woXbNgHmG0Awj6rCjaV0VLtd9ZBUKVh2Q== X-Received: by 2002:a17:90a:5d03:: with SMTP id s3mr1893827pji.150.1610083105147; Thu, 07 Jan 2021 21:18:25 -0800 (PST) Received: from [192.168.50.50] (c-24-4-73-83.hsd1.ca.comcast.net. [24.4.73.83]) by smtp.gmail.com with ESMTPSA id w2sm7351029pfj.110.2021.01.07.21.18.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 Jan 2021 21:18:24 -0800 (PST) Sender: Vineet Gupta Subject: Re: ARC no console output (was Re: [PATCH 1/2] init/console: Use ttynull as a fallback when there is no console) To: Sergey Senozhatsky Cc: Petr Mladek , John Ogness , Steven Rostedt , Linus Torvalds , Guenter Roeck , Shreyas Joshi , shreyasjoshi15@gmail.com, Greg Kroah-Hartman , Sergey Senozhatsky , linux-kernel@vger.kernel.org, buildroot@busybox.net, Thomas Petazzoni , linux-arch@vger.kernel.org, arcml Newsgroups: gmane.linux.kernel.cross-arch,gmane.linux.kernel,gmane.linux.kernel.arc References: <20201111135450.11214-1-pmladek@suse.com> <20201111135450.11214-2-pmladek@suse.com> <8735zdm86m.fsf@jogness.linutronix.de> <50ade852-c598-6476-1f4b-9a3f8d11d143@synopsys.com> <466644f5-bed7-caef-9fcd-e66208f65545@synopsys.com> From: Vineet Gupta Message-ID: Date: Thu, 7 Jan 2021 21:18:20 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/7/21 7:48 PM, Sergey Senozhatsky wrote: > On (21/01/07 09:58), Vineet Gupta wrote: >> On 1/7/21 9:04 AM, Petr Mladek wrote: >>> On Thu 2021-01-07 08:43:16, Vineet Gupta wrote: >>>> Hi John, >>>> >>>> On 1/7/21 1:02 AM, John Ogness wrote: >>>>> Hi Vineet, >>>>> >>>>> On 2021-01-06, Vineet Gupta wrote: >>>>>> This breaks ARC booting (no output on console). >>>>> >>>>> Could you provide the kernel boot arguments that you use? This series is >>>>> partly about addressing users that have used boot arguments that are >>>>> technically incorrect (even if had worked). Seeing the boot arguments of >>>>> users that are not experiencing problems may help to reveal some of the >>>>> unusual console usages until now. >>>> >>>> >>>> Kernel command line: earlycon=uart8250,mmio32,0xf0005000,115200n8 >>>> console=ttyS0,115200n8 debug print-fatal-signals=1 >>> >>> This is strange, the problematic patch should use ttynull >>> only as a fallback. It should not be used when a particular console >>> is defined on the command line. >> >> What happens in my case is console_on_rootfs() doesn't find /dev/console and >> switching to ttynull. /dev is not present because devtmpfs doesn't automount >> for initramfs. > > I wonder if we'll move the nulltty fallback logic into printk code [1] > will it fix the problem? > > [1] https://lore.kernel.org/lkml/X6x%2FAxD1qanC6evJ@jagdpanzerIV.localdomain/ Your reasoning in the post above makes total sense. I tired the patch: adding register_ttynull_console() call in console_device(), removing from console_on_rootfs() band that works too. | Warning: unable to open an initial console. Fallback to ttynull. | Warning: Failed to add ttynull console. No stdin, stdout, and stderr for the init process! | Freeing unused kernel memory: 3096K | This architecture does not have kernel memory protection. | Run /init as init process | with arguments: | /init | with environment: | HOME=/ | TERM=linux | Starting System logger (syslogd) | Bringing up loopback device | Starting inetd | Mounting Posix Mqueue filesys | CONFIG_INITRAMFS_SOURCE="~/arc/RAMFS/archs/ramfs_2011-GNU-2020-03-glibc-2.32-tiny" | ********************************************************************** | Welcome to ARCLinux | ********************************************************************** | [ARCLinux]# From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vineet Gupta Date: Thu, 7 Jan 2021 21:18:20 -0800 Subject: [Buildroot] ARC no console output (was Re: [PATCH 1/2] init/console: Use ttynull as a fallback when there is no console) In-Reply-To: References: <20201111135450.11214-1-pmladek@suse.com> <20201111135450.11214-2-pmladek@suse.com> <8735zdm86m.fsf@jogness.linutronix.de> <50ade852-c598-6476-1f4b-9a3f8d11d143@synopsys.com> <466644f5-bed7-caef-9fcd-e66208f65545@synopsys.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net On 1/7/21 7:48 PM, Sergey Senozhatsky wrote: > On (21/01/07 09:58), Vineet Gupta wrote: >> On 1/7/21 9:04 AM, Petr Mladek wrote: >>> On Thu 2021-01-07 08:43:16, Vineet Gupta wrote: >>>> Hi John, >>>> >>>> On 1/7/21 1:02 AM, John Ogness wrote: >>>>> Hi Vineet, >>>>> >>>>> On 2021-01-06, Vineet Gupta wrote: >>>>>> This breaks ARC booting (no output on console). >>>>> >>>>> Could you provide the kernel boot arguments that you use? This series is >>>>> partly about addressing users that have used boot arguments that are >>>>> technically incorrect (even if had worked). Seeing the boot arguments of >>>>> users that are not experiencing problems may help to reveal some of the >>>>> unusual console usages until now. >>>> >>>> >>>> Kernel command line: earlycon=uart8250,mmio32,0xf0005000,115200n8 >>>> console=ttyS0,115200n8 debug print-fatal-signals=1 >>> >>> This is strange, the problematic patch should use ttynull >>> only as a fallback. It should not be used when a particular console >>> is defined on the command line. >> >> What happens in my case is console_on_rootfs() doesn't find /dev/console and >> switching to ttynull. /dev is not present because devtmpfs doesn't automount >> for initramfs. > > I wonder if we'll move the nulltty fallback logic into printk code [1] > will it fix the problem? > > [1] https://lore.kernel.org/lkml/X6x%2FAxD1qanC6evJ at jagdpanzerIV.localdomain/ Your reasoning in the post above makes total sense. I tired the patch: adding register_ttynull_console() call in console_device(), removing from console_on_rootfs() band that works too. | Warning: unable to open an initial console. Fallback to ttynull. | Warning: Failed to add ttynull console. No stdin, stdout, and stderr for the init process! | Freeing unused kernel memory: 3096K | This architecture does not have kernel memory protection. | Run /init as init process | with arguments: | /init | with environment: | HOME=/ | TERM=linux | Starting System logger (syslogd) | Bringing up loopback device | Starting inetd | Mounting Posix Mqueue filesys | CONFIG_INITRAMFS_SOURCE="~/arc/RAMFS/archs/ramfs_2011-GNU-2020-03-glibc-2.32-tiny" | ********************************************************************** | Welcome to ARCLinux | ********************************************************************** | [ARCLinux]# From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B9CAC433E0 for ; Fri, 8 Jan 2021 05:18:34 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F39B223383 for ; Fri, 8 Jan 2021 05:18:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F39B223383 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=synopsys.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=h9ueHezZl33ThQ7wDbKfyAn22Iby1t+2l8GQyR3x9iA=; b=1YFlSAXGUDugVxQTd0JmgUWDp a1iCUVuaei6s+v6bIQ8OknoDEGp1Nxk5y7p3U6+z++rWsrIYYY0bMVyeP/6Ltkw78HdjDSH0Nn76f M+zXj2ZaN2KYx///0ZzdtejCg3kZobJiPSydfQnPsL9q32fW5OX1NVm8pkX199DndAtS5wOG6QuZA th6pmYyETcf7+eJetPZiHAmI4+qHNfua+tXOrNVkedFYPjxhpQGDGWKfi7XAcBoqKHYKdGLjtzlW8 TrizTfLVDjOi5hrVxNA/DFZzUqyshIeq2bDx/bjzbW7NJKkkjO4M6pwbId7KIrbrsljmFdCa+W/x6 T/y4RVskQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxkAS-0003zr-9s; Fri, 08 Jan 2021 05:18:32 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxkAQ-0003yq-A9 for linux-snps-arc@lists.infradead.org; Fri, 08 Jan 2021 05:18:31 +0000 Received: by mail-pj1-x1029.google.com with SMTP id m5so5512341pjv.5 for ; Thu, 07 Jan 2021 21:18:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:newsgroups:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=aSxKMwdc2LOn2l0PdeifM0S0Y2l05A8yh5PMl2xYblo=; b=owhFsaRzICAUXtIRzOEsWNqrBsznL9RP5mZdv1HnNGFwini6cJS7XWXLP5SneT86JJ hYJrmSRbH3sbF4eLbZpZhVel0ev0N3uEk9qSYcsqKFnqaYjmV4y+a9+0J3Ljj7ISXW13 mSCWjc170dWhkGxIsUdzwOPPIQ+dMz1lxSpzjZ2s7KPJZK+qNOhoV/CIUxsIxY6xzoVM PN4Q1SZUxw04kkkVFmPBdbcyf0FxEacZfgXrBsXgAr3o0g4Zum7l5puasXgFKAvL6HgG HN59tlSQCgS/YRUzyH5TxAuwDfo0klGPIVLpsgilEmF7PQAUvEoPg/zufmo329Agvvfd 11wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:newsgroups:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=aSxKMwdc2LOn2l0PdeifM0S0Y2l05A8yh5PMl2xYblo=; b=HESPNSvO+Rz4rfdM4ApChpKXATYOu4TSslG5Prrh7U5teWvcvWvfoM3s2Dl0iNQYh3 3gEO07SP0eoXFuUqDiX7CaQeiPwPCaqLz+tuIumo2rWIdDhjmAmDIF+knjDHX+xuaLmF fIbVs++JWALRpEA66wRTEF59lmCed8Vupqh+Id9OyTvq4g9maONqjxWRPsNupo+XEcGI W7MGAO5JhiMM2cuQmQnrTA7s/jOrj7bMmmhVRt/+GrvdirL0OTd8m63tRLepywhe4XFx JOL4cRwNB7/Em5VcMSDdAaZ/kRkCP9NeV1iAcD6HOJuD7RdlJQEgE/UMQN8Og+48L7jv 2Agg== X-Gm-Message-State: AOAM5315RoGg8mcPXI0LKLA14d4kudiyRUqguJ8mx11z1uLKK34wPauN ECaVaX03caKeqE5dPF06sTt3OXrN7jbeXoDx X-Google-Smtp-Source: ABdhPJxHs2I8fgn1/rnaSLlvFAMF8We5+bkxciPAber23woXbNgHmG0Awj6rCjaV0VLtd9ZBUKVh2Q== X-Received: by 2002:a17:90a:5d03:: with SMTP id s3mr1893827pji.150.1610083105147; Thu, 07 Jan 2021 21:18:25 -0800 (PST) Received: from [192.168.50.50] (c-24-4-73-83.hsd1.ca.comcast.net. [24.4.73.83]) by smtp.gmail.com with ESMTPSA id w2sm7351029pfj.110.2021.01.07.21.18.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 Jan 2021 21:18:24 -0800 (PST) Subject: Re: ARC no console output (was Re: [PATCH 1/2] init/console: Use ttynull as a fallback when there is no console) To: Sergey Senozhatsky Newsgroups: gmane.linux.kernel.cross-arch, gmane.linux.kernel, gmane.linux.kernel.arc References: <20201111135450.11214-1-pmladek@suse.com> <20201111135450.11214-2-pmladek@suse.com> <8735zdm86m.fsf@jogness.linutronix.de> <50ade852-c598-6476-1f4b-9a3f8d11d143@synopsys.com> <466644f5-bed7-caef-9fcd-e66208f65545@synopsys.com> From: Vineet Gupta Message-ID: Date: Thu, 7 Jan 2021 21:18:20 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210108_001830_436499_869A0F74 X-CRM114-Status: GOOD ( 18.72 ) X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Petr Mladek , Sergey Senozhatsky , John Ogness , Shreyas Joshi , linux-kernel@vger.kernel.org, Steven Rostedt , Thomas Petazzoni , Greg Kroah-Hartman , buildroot@busybox.net, arcml , Linus Torvalds , shreyasjoshi15@gmail.com, Guenter Roeck Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org On 1/7/21 7:48 PM, Sergey Senozhatsky wrote: > On (21/01/07 09:58), Vineet Gupta wrote: >> On 1/7/21 9:04 AM, Petr Mladek wrote: >>> On Thu 2021-01-07 08:43:16, Vineet Gupta wrote: >>>> Hi John, >>>> >>>> On 1/7/21 1:02 AM, John Ogness wrote: >>>>> Hi Vineet, >>>>> >>>>> On 2021-01-06, Vineet Gupta wrote: >>>>>> This breaks ARC booting (no output on console). >>>>> >>>>> Could you provide the kernel boot arguments that you use? This series is >>>>> partly about addressing users that have used boot arguments that are >>>>> technically incorrect (even if had worked). Seeing the boot arguments of >>>>> users that are not experiencing problems may help to reveal some of the >>>>> unusual console usages until now. >>>> >>>> >>>> Kernel command line: earlycon=uart8250,mmio32,0xf0005000,115200n8 >>>> console=ttyS0,115200n8 debug print-fatal-signals=1 >>> >>> This is strange, the problematic patch should use ttynull >>> only as a fallback. It should not be used when a particular console >>> is defined on the command line. >> >> What happens in my case is console_on_rootfs() doesn't find /dev/console and >> switching to ttynull. /dev is not present because devtmpfs doesn't automount >> for initramfs. > > I wonder if we'll move the nulltty fallback logic into printk code [1] > will it fix the problem? > > [1] https://lore.kernel.org/lkml/X6x%2FAxD1qanC6evJ@jagdpanzerIV.localdomain/ Your reasoning in the post above makes total sense. I tired the patch: adding register_ttynull_console() call in console_device(), removing from console_on_rootfs() band that works too. | Warning: unable to open an initial console. Fallback to ttynull. | Warning: Failed to add ttynull console. No stdin, stdout, and stderr for the init process! | Freeing unused kernel memory: 3096K | This architecture does not have kernel memory protection. | Run /init as init process | with arguments: | /init | with environment: | HOME=/ | TERM=linux | Starting System logger (syslogd) | Bringing up loopback device | Starting inetd | Mounting Posix Mqueue filesys | CONFIG_INITRAMFS_SOURCE="~/arc/RAMFS/archs/ramfs_2011-GNU-2020-03-glibc-2.32-tiny" | ********************************************************************** | Welcome to ARCLinux | ********************************************************************** | [ARCLinux]# _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc