Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3038756ybt; Sat, 4 Jul 2020 04:40:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYqQH8w3MmDtFal6an60YvVbRNV70tbdga1ovt+hpeBMWPWtr1xgcfcWNChz5DmfBgzn1N X-Received: by 2002:a17:906:ccd3:: with SMTP id ot19mr38944088ejb.468.1593862820897; Sat, 04 Jul 2020 04:40:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593862820; cv=none; d=google.com; s=arc-20160816; b=pxyV4jEtHeC5vaX+qeXsubBfl0aH/Y0gD7rJBiaJKlwKs5eV2OcmEutjPPIdBA04xY QkWyz3RR1vCdYiO6e0kxeWInqnhKgQ5AsUOqg+53FowTv7sz3cbplyQHJtHD5LPkiVTg n7OtMtWjg/MHX39DhXAA6zDZ4Fl1j82GAim1hlv+lAVztsRSsQODhn/AgRY1lxwlMpLa CPyOJ+A5+FQaJL5/7Ea6wqDLF6lZCkoagLi21BhxE+BXQP0I63PFz5t+Qa8ELmNb8uLx XUohP2MpXx5qQqpep1BFD6O6O9TEeHg4QfdNhQrd5yg0zsi6o1+IIdpElKz+4nOyZXN6 02UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=4plqkhvVW/dHuIMMbhq1LQlta+pdw76VHrKkcf+m5iQ=; b=kCgtr+/dq8dFBvq4mJZ8w2Esax/wj/wISTs1cpUqSElXHyoMQQ47nGuKGRK+bVRkPR KkmsRa6CECudQseKUuEDyvTC6ikwslDRrgIF+uXhxHz2BHksj7eBfrnshBRk5yzSGVYI CyO4ULIf/f4469udOyn+dZ3DTWmPIuQiwe4zrnzkWfur97RR6eWK+Kky9Wv2gXwYF6EG 8GCgWiCKnDX6BPvNJLlwfIHnQEX9QGk8unElYxPS6BmJy4f3s824wIfqZS0KKc5ps/SR haWmkL9HHqBioCXZoP0n88hXCRprBEWSmEUoON14EBbVk+Gcqv2l+9yUrI6RgNSd+RU0 UF+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=o7q7SjXm; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r24si414002edx.94.2020.07.04.04.39.58; Sat, 04 Jul 2020 04:40:20 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=o7q7SjXm; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727841AbgGDLhb (ORCPT + 99 others); Sat, 4 Jul 2020 07:37:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726621AbgGDLhb (ORCPT ); Sat, 4 Jul 2020 07:37:31 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48AE7C061794 for ; Sat, 4 Jul 2020 04:37:31 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id cm21so5530266pjb.3 for ; Sat, 04 Jul 2020 04:37:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4plqkhvVW/dHuIMMbhq1LQlta+pdw76VHrKkcf+m5iQ=; b=o7q7SjXmYnY30eDj0Sa+Ilrh7Nbozwd343h6x09nNYV6HKAPXg5MLJ0YSzSKtG4laz lSOAZJ62klEIMeDTY1m80EXHJp2NBqyvadia3ut9igvApRfwDgN10JOCBEKQYGY7GnjO 6tvFsI+YUxPCZGjS0/rmAJohvDoyuQQAT+RXEvh9Fdj6zFlMOeQGojpMMRYYQCBcwkPa 055NYk2wCcA3BwJRjCWg1sW/wRNIrW6a31NPaS1Obpwx5TNLZTOJMNsfni9IrBrUbdAw mIYVztcCi+e53ph9SnZGE3nDCEdbCJQ46El82W48EQasgmKVxbwMD7Avmzio68xvtF+j KTqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4plqkhvVW/dHuIMMbhq1LQlta+pdw76VHrKkcf+m5iQ=; b=tktK/DPr46mWz8M2eJSS9AAFbtZKq4ZdqAgtDCsWahYxDN5T5urxzMxcxLZkLO3MEf lA6jeLotim8lITpEkrDST4cK5++18LfoGiTMWnhIUa3J00fdi967yYjqdbw4Zu+NwNxD 7YQeIL7TuAyLOWTOadxtveFzO/wB+GFmuqXBdb0TBBG92QABRRRdBzq1RCbaoC6qxpMT G+Ff7eeH59BkRx8R0LIKBTjxkpnHkNRriqVXxoOR/xVcqpPqtYmyUYEaB72Y38zSY7+f tbZm7VITU8ohrnAqkxsZ9nIk616DtR0XbSVusj4T2yy0OJ/RttuJlCJ6JXdkYPJ31TBe KRzg== X-Gm-Message-State: AOAM533lc0tUEO6sNwpkLVabqGmWE0KRuwxDE/N9iXfWjSzRQCO7cTsD d8V6dcbOd5rt9U3+Tbj9OWNmGmteAwAmHa7YF+Q= X-Received: by 2002:a17:90b:3547:: with SMTP id lt7mr16736902pjb.181.1593862650846; Sat, 04 Jul 2020 04:37:30 -0700 (PDT) MIME-Version: 1.0 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> <20200702054033.GC3450@jagdpanzerIV.localdomain> <20200702082008.GE3703480@smile.fi.intel.com> <20200703105302.GC182102@jagdpanzerIV.localdomain> In-Reply-To: <20200703105302.GC182102@jagdpanzerIV.localdomain> From: Andy Shevchenko Date: Sat, 4 Jul 2020 14:37:14 +0300 Message-ID: Subject: Re: UART/TTY console deadlock To: Sergey Senozhatsky , Andy Shevchenko 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 3, 2020 at 1:53 PM Sergey Senozhatsky wrote: > > On (20/07/02 11:20), Andy Shevchenko wrote: > > > > I didn't look into this deeply, but my understanding that this is something for > > special case when you have several UART ports sharing the IRQ (multi-port card) > > and IRQ even maybe undesirable b/c it will confuse real IRQ handler. I don't > > remember details, but AFAIR IRQ handler does a busyloop to service as much as > > possible and in between it may release the lock (again, multi-port UART cards), > > that's why we better avoid IRQ event in the first place. > > But it's my pure speculation. > > Hmm. Would different IRQ handlers use different UART port structures? ->irq > might be the only thing they share. Even if they use the same port, we > keep IRQs disabled on local CPU, and UART port locked. To unlock the UART > port during IRQ, the handler (on another CPU) first needs to acquire the > port->lock, which is locked by serial8250_do_startup(). It appears to be a RT kernel related. Don't know the state of affairs in RT nowadays, but maybe still relevant. See the commit 768aec0b5bcc ("serial: 8250: fix shared interrupts issues with SMP and RT kernels"). -- With Best Regards, Andy Shevchenko