Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp219132iob; Mon, 2 May 2022 17:34:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZaoHDSIqNvDTZkCqm+dFpk8iEcw3TrJGUkD3dhoGMrYLbuqvaum7r4j52lhk0vYRqA0Wy X-Received: by 2002:aa7:8891:0:b0:50d:8ac9:c406 with SMTP id z17-20020aa78891000000b0050d8ac9c406mr13587349pfe.48.1651538051437; Mon, 02 May 2022 17:34:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651538051; cv=none; d=google.com; s=arc-20160816; b=T8ziZ9JhuijuJbnoqBr1NGRRXJzagnWi+OZbzMxSH8vJNwwWXzxnx4KVYncmR4ZuaW 5w2aA+lpn59HU109puDImPQVSyiSsN7UdK8SZNUUf182CaLEcOiWWIKCvK8etSsBw/3I z7oIMWSzqg0mnKAOWwRQ1/qDtNLkofIchvOrj+D2PeFJg6jIHX9StBNcprLVIyzcBLih y69CCnOLBbK+IBHn4LnxRMBlboxW5oLSeF5AtIl8X482UFXMu/pOfoooSNXSU50LWoTL sDqbNkiur8q+xbiPrTlAfYVcCEg1FDWSMaAQQEbd9vGrXL15d8LsXn9foH4/S4GMn25p WWTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=ggFgY/zK0y72ZUtp6KigXGll6Hp+UovEpSfnz2w+970=; b=wEOqJZT7nHgMFEhmy6P6NN40dYHm0nHtD8WbAHVR/p/EYUBuEgthY6npuPighzlVvZ 7S1fonvWkE78u/g5D8F5ybiNMaUih250hr3A55pUr6o4u2h2l4trxMU9nbiAibyxva9k 8yG66einuZwdR+f7kDLX/ftv6qP1EEDjdw2KMFTWRP8RyKhAEtZp14385xg6zppBLENt WT5pNiX48Aq8czKOmze6hchl088QZ7s4StkHLs0b4QkrJAnO5DWuiYXea77jRZ5wpUUX MtlshyFkri6yG+SidfRpf1OSHq8iXqTGi/3Iw8HuhsLbhT0m7SMqD6pb2z4AeU2soQyU te0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=vTF3+lOy; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id i8-20020a1709026ac800b00158dcf67f8esi14399747plt.168.2022.05.02.17.34.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 17:34:11 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=vTF3+lOy; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E900C3DDC8; Mon, 2 May 2022 17:27:01 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1385187AbiEBNPG (ORCPT + 99 others); Mon, 2 May 2022 09:15:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351348AbiEBNPD (ORCPT ); Mon, 2 May 2022 09:15:03 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55075D69 for ; Mon, 2 May 2022 06:11:33 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1651497090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ggFgY/zK0y72ZUtp6KigXGll6Hp+UovEpSfnz2w+970=; b=vTF3+lOygvZywEc8UOCDeFCHievf/zlP6DE4bG/HypfnZQOxRZeWw0g2pq1ihKyBjafuS2 5oVT4DtRYCHZargZ6EV/gP3DlCe9gjfV927uV+GZdruxjLImz+bPFQj6dfogkUBSeN8Q8c HIBRSY7rtXFYGUXRMN90xPvCw9L2m/wUyBbDvSUiWgL2NnhDIgNzbXaYV07+2vExx+SYTg wNyHvxHeSXjc4tpCEghafuSQlIAJkk7Z8scRZrIC6/nuf98VRHkRTD/SjFB57F3rkAunJ1 pEER6DYEYZrU5hxZbR0qW+HcS3f3SKamkAz+6hnK88QpWLp+KanTIMtxnQivRg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1651497090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ggFgY/zK0y72ZUtp6KigXGll6Hp+UovEpSfnz2w+970=; b=3T6JKye25mxbWo8WRxifuqeA96PeYYZMI/3rW+b2iio0VVDVwarm0EcC24fy0Vn6+xcGXD esJc+78qanVrKEBQ== To: Marek Szyprowski , Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , linux-amlogic@lists.infradead.org Subject: Re: [PATCH printk v5 1/1] printk: extend console_lock for per-console locking In-Reply-To: <32bba8f8-dec7-78aa-f2e5-f62928412eda@samsung.com> References: <20220421212250.565456-1-john.ogness@linutronix.de> <20220421212250.565456-15-john.ogness@linutronix.de> <878rrs6ft7.fsf@jogness.linutronix.de> <2a82eae7-a256-f70c-fd82-4e510750906e@samsung.com> <87fslyv6y3.fsf@jogness.linutronix.de> <51dfc4a0-f6cf-092f-109f-a04eeb240655@samsung.com> <87k0b6blz2.fsf@jogness.linutronix.de> <32bba8f8-dec7-78aa-f2e5-f62928412eda@samsung.com> Date: Mon, 02 May 2022 15:17:29 +0206 Message-ID: <87y1zkkrjy.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INVALID_DATE_TZ_ABSURD,MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-05-02, Marek Szyprowski wrote: > Data written to /dev/kmsg and all kernel logs were always displayed > correctly. Also data written directly to /dev/ttyAML0 is displayed > properly on the console. The latter doesn't however trigger the input > related activity. > > It looks that the data read from the uart is delivered only if other > activity happens on the kernel console. If I type 'reboot' and press > enter, nothing happens immediately. If I type 'date >/dev/ttyAML0' via > ssh then, I only see the date printed on the console. However if I > type 'date >/dev/kmsg', the the date is printed and reboot happens. I suppose if you login via ssh and check /proc/interrupts, then type some things over serial, then check /proc/interrupts again, you will see there have been no interrupts for the uart. But interrupts for other devices are happening. Is this correct? > For comparison, here is a 't' sysrq result from the 'working' serial > console (next-20220429), which happens usually 1 of 4 boots: > > https://pastebin.com/mp8zGFbW This still looks odd to me. We should be seeing a trace originating from ret_from_fork+0x10/0x20 and kthread+0x118/0x11c. I wonder if the early creation of the thread is somehow causing problems. Could you try the following patch to see if it makes a difference? I would also like to see the sysrq-t output with this patch applied: ---------------- BEGIN PATCH --------------- diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 2311a0ad584a..c4362d25de22 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -3837,7 +3837,7 @@ static int __init printk_activate_kthreads(void) return 0; } -early_initcall(printk_activate_kthreads); +late_initcall(printk_activate_kthreads); #if defined CONFIG_PRINTK /* If @con is specified, only wait for that console. Otherwise wait for all. */ ---------------- END PATCH --------------- Thanks for your help with this! John