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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80DDDC43334 for ; Mon, 20 Jun 2022 10:29:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239908AbiFTK3i (ORCPT ); Mon, 20 Jun 2022 06:29:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240321AbiFTK30 (ORCPT ); Mon, 20 Jun 2022 06:29:26 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC4F714037 for ; Mon, 20 Jun 2022 03:29:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5E30EB81015 for ; Mon, 20 Jun 2022 10:29:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46F9DC3411C; Mon, 20 Jun 2022 10:29:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655720958; bh=k/cfrxW1y5fQVkYFe7aqp8xYU2NtiTYd7uNodGG4c3Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mcmlT9NjEjG2YgqIp2JdN/d+SHL1kw4w6Rxr4hf6KsWRqUKlKZzXuFBSL46dIeRK4 srcoEAFWEeamz/chlHQDNOh52ocyiBLPiHIByAK3DbDjSxZP6qasJG/7I4b5wNYJgn 4zwfbYuzJ2lWoLj+6S8LHXjkfk3DdkbH/o7N8BPWOOkAL9YAF8bmnX62xmU7x+l/ex pJUo2+bEUNEXrAIIZ0WmOLkkmFQUfAC+ii/CC7pf82KDNHY2xY7XXbs9px+joCwRlp 0js5dEkiJuUmewpIvIFcgYUKl9hWB0z7EiYLJRz8jI0gYzZfjdv3i8/ODH18WnGWTp titt2W96mpX+g== Date: Mon, 20 Jun 2022 12:29:04 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Sergey Senozhatsky Cc: John Ogness , Petr Mladek , Linus Torvalds , linux-kernel@vger.kernel.org Subject: Re: Boot stall regression from "printk for 5.19" merge Message-ID: <20220620122904.30c06c4e@thinkpad> In-Reply-To: References: <20220619204949.50d9154d@thinkpad> <20220620120234.5a65ac97@thinkpad> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 20 Jun 2022 19:13:37 +0900 Sergey Senozhatsky wrote: > On (22/06/20 12:02), Marek Beh=C3=BAn wrote: > > > On (22/06/19 20:49), Marek Beh=C3=BAn wrote: > > > [..] =20 > > > > causes a regression on arm64 (Marvell CN9130-CRB board) where the > > > > system boot freezes in most cases (and is unusable until restarted = by > > > > watchdog), or, in some cases boots, but the console output gets man= gled > > > > for a while (the serial console spits garbage characters). =20 > > >=20 > > > Can you please try disabling console kthreads and see how the boot > > > process goes? Just `return 0` from printk_activate_kthreads() (I think > > > this should do the trick). =20 > >=20 > > This indeed makes the problem go away... =20 >=20 > Oh... OK. Didn't expect that :) >=20 > > > > The garbage example: > > > >=20 > > > > ... > > > > [ 0.920951] raid6: using neon recovery algorithm > > > > [ 0.921228] iommu: Default domain type: Translated > > > > % > > > >=20 > > > > gb@k+cFL/[ 4.954974] DSA: tree 0 setup > > > > [ 4.955286] cfg80211: Loading compiled-in X.509 certificates f= or regulatory database =20 > > >=20 > > > This is pretty suspicious. I don't see how console kthreads would > > > corrupt the output. I suspect that something else is going on, some > > > memory corruption, etc. =20 > >=20 > > Maybe multiple threads are writing to serial registers, or something...= =20 >=20 > That's possible. Console drivers usually should grab port->lock for > write(), but maybe something is missing in the driver you use. What > console driver are you using? compatible =3D "snps,dw-apb-uart", so drivers/tty/serial/8250/8250_dw.c seems that the function dw8250_serial_out() does not use the spinlock... Marek