Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3050123ybt; Sat, 4 Jul 2020 05:02:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEANLqBbjHiFVqP5f9GqcDRcUoRIlFUypHbUQW3cX1nN4MUQr1muWY+5q3gyHlZvIoElrM X-Received: by 2002:a17:906:2786:: with SMTP id j6mr35582735ejc.216.1593864163983; Sat, 04 Jul 2020 05:02:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593864163; cv=none; d=google.com; s=arc-20160816; b=L8CyVia1sn+yGOInsvTiCtESzffIpQV6wbvwVCUlZBSg1O3iPLYOFT1hLwbHSJzvnC eSt83WH5xDukUqR4RJaGnZArRD4Cq5THX46baKpHOaxBCJtBeWR/ayne7DgI3wwTojlY WEV6rDAYXoCZrrGT5tyoQICQitcSQOJqwpZ8mjHrbvxEHcuOcvNtXxFwyjt8t056G5XY hGQtmH3DNqFmScp7yKNHxF3OM5RpFNtP8fMzQHUjTqUZtnteyosAWw0Fb3QCPUqRwtpO P94+cZ0uKbcPgmlsTHIatw0n0rWnYAi7xyr2XEmgbgwQQT/7pp+KHSJDFjYSp2w0JR3b uZrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=NmZgHpDawrashNJSJ9rjrUkXbUnj7vLSVvKk6L9n6mw=; b=boJ61ofX5WMYmbEbiRZrbrHLi08j8GjEnYvUVvQJRSbenXXZc2mguAZ3Z6m09ustVx cIWOeU+KbQeInSgaSTNdZpxKZsQkG5WNXmh98uUoQ4/hI4qsnRPK7EMOfsreCwb+EmSN yWhlrCcX6DJJR2dNpUjsfMvTfkV83dSd5xHIfRqmAPwEfDz8bhtm0SbzmIgnIyLBROS0 146Ae4ED/0m0+qi0ujk8JeFBMTUisUxS5HNgHLuJ1gHswVyXSxkk/ejW4jAXVgd7T3cQ eVcNS8OEdfkk6RD9wGr7Lr/uEUNlHoMEIjs2jreBXSOQFDXbb4b8e1qlKFW2WCgYtr0y Of4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lv19si9170123ejb.241.2020.07.04.05.02.20; Sat, 04 Jul 2020 05:02:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727846AbgGDL7N (ORCPT + 99 others); Sat, 4 Jul 2020 07:59:13 -0400 Received: from mga04.intel.com ([192.55.52.120]:63531 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727798AbgGDL7M (ORCPT ); Sat, 4 Jul 2020 07:59:12 -0400 IronPort-SDR: O1b3NB7SBkFbW2qpIn2jpZZGJVSE7kyMzE7unIxxN6WnsStPngWO6VZ/fcVA4+KkvPJLYPKMVi v8zeeuumwJnA== X-IronPort-AV: E=McAfee;i="6000,8403,9671"; a="144762000" X-IronPort-AV: E=Sophos;i="5.75,311,1589266800"; d="scan'208";a="144762000" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jul 2020 04:59:12 -0700 IronPort-SDR: miEnGm4b7euory5PpdTK2HOjhO4L4K8LtZ1pd60TUjOByRS/jTl6H9qMP+PsP0gvPbJ+Sy5ONB IMeQ2+y53aoQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,311,1589266800"; d="scan'208";a="313513868" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga008.jf.intel.com with ESMTP; 04 Jul 2020 04:59:09 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1jrgp4-00HYEf-6O; Sat, 04 Jul 2020 14:59:10 +0300 Date: Sat, 4 Jul 2020 14:59:10 +0300 From: Andy Shevchenko To: Sergey Senozhatsky Cc: Tony Lindgren , Petr Mladek , Raul Rangel , Sergey Senozhatsky , linux-kernel , Greg Kroah-Hartman , kurt@linutronix.de, "S, Shirish" , Peter Zijlstra , John Ogness , Steven Rostedt Subject: Re: UART/TTY console deadlock Message-ID: <20200704115910.GY3703480@smile.fi.intel.com> References: <20200630035816.GA21591@jagdpanzerIV.localdomain> <20200630102141.GA11587@alley> <20200630105512.GA530@jagdpanzerIV.localdomain> <20200630122239.GD6173@alley> <20200630130534.GB145027@jagdpanzerIV.localdomain> <20200630180255.GD37466@atomide.com> <20200702051213.GB3450@jagdpanzerIV.localdomain> <20200702160514.GK37466@atomide.com> <20200703103241.GB182102@jagdpanzerIV.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 04, 2020 at 02:35:46PM +0300, Andy Shevchenko wrote: > On Fri, Jul 3, 2020 at 1:32 PM Sergey Senozhatsky > wrote: > > On (20/07/02 09:05), Tony Lindgren wrote: > > > * Sergey Senozhatsky [200702 05:13]: > > > > On (20/06/30 11:02), Tony Lindgren wrote: ... > > This is, basically, an equivalent of > > > > --- > > drivers/tty/serial/8250/8250_port.c | 5 +---- > > 1 file changed, 1 insertion(+), 4 deletions(-) > > > > diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c > > index d64ca77d9cfa..dba7747d2ddd 100644 > > --- a/drivers/tty/serial/8250/8250_port.c > > +++ b/drivers/tty/serial/8250/8250_port.c > > @@ -2275,6 +2275,7 @@ int serial8250_do_startup(struct uart_port *port) > > > > if (port->irq && !(up->port.flags & UPF_NO_THRE_TEST)) { > > unsigned char iir1; > > + > > /* > > * Test for UARTs that do not reassert THRE when the > > * transmitter is idle and the interrupt has already > > @@ -2284,8 +2285,6 @@ int serial8250_do_startup(struct uart_port *port) > > * allow register changes to become visible. > > */ > > spin_lock_irqsave(&port->lock, flags); > > - if (up->port.irqflags & IRQF_SHARED) > > - disable_irq_nosync(port->irq); > > > > wait_for_xmitr(up, UART_LSR_THRE); > > serial_port_out_sync(port, UART_IER, UART_IER_THRI); > > @@ -2297,8 +2296,6 @@ int serial8250_do_startup(struct uart_port *port) > > iir = serial_port_in(port, UART_IIR); > > serial_port_out(port, UART_IER, 0); > > > > - if (port->irqflags & IRQF_SHARED) > > - enable_irq(port->irq); > > spin_unlock_irqrestore(&port->lock, flags); > > > > /* > > ...which effectively is a revert of > > 768aec0b5bcc ("serial: 8250: fix shared interrupts issues with SMP and > RT kernels") (without c389d27b5e64 ("8250.c: port.lock is irq-safe") applied) -- With Best Regards, Andy Shevchenko