Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752068AbcCVFlS (ORCPT ); Tue, 22 Mar 2016 01:41:18 -0400 Received: from mail-lb0-f169.google.com ([209.85.217.169]:34461 "EHLO mail-lb0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751258AbcCVFlM convert rfc822-to-8bit (ORCPT ); Tue, 22 Mar 2016 01:41:12 -0400 Date: Tue, 22 Mar 2016 08:40:46 +0300 From: Antony Pavlov To: Matthias Schiffer Cc: Ralf Baechle , gregkh@linuxfoundation.org, jslaby@suse.com, linux-mips@linux-mips.org, linux-serial@vger.kernel.org, "linux-kernel@vger.kernel.org" , Peter Mamonov Subject: Re: Nonterministic hang during bootconsole/console handover on ath79 Message-Id: <20160322084046.7196890a7c157503cd0ea0d5@gmail.com> In-Reply-To: <56F07DA1.8080404@universe-factory.net> References: <56F07DA1.8080404@universe-factory.net> X-Mailer: Sylpheed 3.5.0beta3 (GTK+ 2.24.25; i586-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1249 Lines: 29 On Tue, 22 Mar 2016 00:02:57 +0100 Matthias Schiffer wrote: > Hi, > we're experiencing weird nondeterministic hangs during bootconsole/console > handover on some ath79 systems on OpenWrt. I've seen this issue myself on > kernel 3.18.23~3.18.27 on a AR7241-based system, but according to other > reports ([1], [2]) kernel 4.1.x is affected as well, and other SoCs like > QCA953x likewise. > > See the log below for the exact place it hangs; the log was taken in during > a good boot; a bad boot will just hang forever at the marked location. The > issue is extremely hard to debug, as changing the timing in any way (like > adding additional printk) will usually make it work without problems. (Even > recompiling the kernel with the same config, but different uname timestamp > will make the occurence more or less likely) > > My theory is the following: > > As soon as ttyS0 is detected and installed as the console, there are two > console drivers active on the serial port at the same time: early0 and > ttyS0. I suspect that the hang occurs when the primitive early0 > implementation prom_putchar_ar71xx waits indefinitely on THRE, Can you use EJTAG to prove your theory? --? Best regards, ? Antony Pavlov