Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp4657070imd; Tue, 30 Oct 2018 05:37:33 -0700 (PDT) X-Google-Smtp-Source: AJdET5cgKPstjUtKMuwz/Gp7dd+e4EqSR6m3/OG6OH5HJnTHLvFY8VqX5mbylKbXFOvErgTavzcY X-Received: by 2002:a17:902:3e3:: with SMTP id d90-v6mr12374748pld.118.1540903053130; Tue, 30 Oct 2018 05:37:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540903053; cv=none; d=google.com; s=arc-20160816; b=eBU++ApVTLIfypKGrh3aZuQmIlYu0WP2FmccBL2GTN6mobPgWAIS8kktxyd5UrjjuJ qENj4QZ61TtOjDyK1erw3l82L9RnWX0Zfob+Gdr2slvvqdBFGU++mqrf0cdXsu71PmH0 +fRg+UIb/NHSSSDfAonjW6SrJLHK77Rty9rAuc+cPYJ7cV8iNZNnsQAFFhcAXkb2X9iH WG4TzW+B6dlS2OwmfV492KaIBDhyJtFpae6e3hJBRkjC4DAEPAloM8aW+lXumDxsljgJ uHjb1GujTwVdPZMYqvtSQyU2MpxYDwrQ7AbWsDGr688FPeeSvyw9nl/z8d0bl+azUoIk oZ3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=UUoFe1ct6cxPdQew0bgh6vRGqTG6SNlhfHdMl7AkXLI=; b=qhLNXtS8JSApe1iriFYIxWwJdl02zRS6yZV5qm2l8+K2gJaH6sRkSlfjxW1qXnpYax zeG+8cm3mLjKmxwVL761U20Dj+hc8T5xA14jLaJnp/F9hr85iG+TX303Hqg0ImChIT5q /K6DpqDiiilCRDoG5+Yk0Um7pVYGShd+JOBR/fkqsQVflVqolexi6x0okXmAE7Eq86T5 /EUt7pZJEy/Px7hV6LQN7vqYQQvgGo/T3oXtr/Wo3P5J/xeYFEijWNaiR+XuiRaypCkh F1EqDcDrs2rrMWk3QRX9CqEuxsrPlyJ8SI1ovb43ZCQjiFoLPtr3HkrwAVHlo3Bdq259 uSoA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id g27-v6si28370137pfj.37.2018.10.30.05.37.17; Tue, 30 Oct 2018 05:37:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727710AbeJ3VaG (ORCPT + 99 others); Tue, 30 Oct 2018 17:30:06 -0400 Received: from mga02.intel.com ([134.134.136.20]:7456 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727636AbeJ3VaG (ORCPT ); Tue, 30 Oct 2018 17:30:06 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Oct 2018 05:36:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,444,1534834800"; d="scan'208";a="92375856" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by FMSMGA003.fm.intel.com with ESMTP; 30 Oct 2018 05:36:31 -0700 Received: from andy by smile with local (Exim 4.91) (envelope-from ) id 1gHTFz-00049a-Ck; Tue, 30 Oct 2018 14:36:27 +0200 Date: Tue, 30 Oct 2018 14:36:27 +0200 From: Andy Shevchenko To: Douglas Anderson Cc: Jason Wessel , Daniel Thompson , tglx@linutronix.de, mingo@kernel.org, gregkh@linuxfoundation.org, linux-arm-msm@vger.kernel.org, kgdb-bugreport@lists.sourceforge.net, nm@ti.com, linux-mips@linux-mips.org, dalias@libc.org, catalin.marinas@arm.com, vigneshr@ti.com, linux-aspeed@lists.ozlabs.org, linux-sh@vger.kernel.org, peterz@infradead.org, will.deacon@arm.com, mhocko@suse.com, paulus@samba.org, hpa@zytor.com, sparclinux@vger.kernel.org, marex@denx.de, sfr@canb.auug.org.au, ysato@users.sourceforge.jp, linux-hexagon@vger.kernel.org, x86@kernel.org, linux@armlinux.org.uk, pombredanne@nexb.com, tony@atomide.com, mingo@redhat.com, joel@jms.id.au, linux-serial@vger.kernel.org, rolf.evers.fischer@aptiv.com, jhogan@kernel.org, asierra@xes-inc.com, linux-snps-arc@lists.infradead.org, dan.carpenter@oracle.com, ying.huang@intel.com, riel@surriel.com, frederic@kernel.org, jslaby@suse.com, paul.burton@mips.com, rppt@linux.vnet.ibm.com, bp@alien8.de, luto@kernel.org, linux-arm-kernel@lists.infradead.org, christophe.leroy@c-s.fr, andrew@aj.id.au, linux-kernel@vger.kernel.org, ralf@linux-mips.org, rkuo@codeaurora.org, Jisheng.Zhang@synaptics.com, vgupta@synopsys.com, benh@kernel.crashing.org, jk@ozlabs.org, mpe@ellerman.id.au, akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org, davem@davemloft.net, kstewart@linuxfoundation.org Subject: Re: [PATCH 0/7] serial: Finish kgdb on qcom_geni; fix many lockdep splats w/ kgdb Message-ID: <20181030123627.GS10650@smile.fi.intel.com> References: <20181029180707.207546-1-dianders@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181029180707.207546-1-dianders@chromium.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 29, 2018 at 11:07:00AM -0700, Douglas Anderson wrote: > I started out this series trying to make sysrq work over the serial > console on qcom_geni_serial, then fell into a rat's nest. > > To solve the deadlock I faced when enabling sysrq I tried to borrow > code from '8250_port.c' which avoided grabbing the port lock in > console_write(). ...but since these days I try to run with lockdep on > all the time, I found it caused an annoying lockdep splat (which I > also reproduced on my rk3399 board). ...so I instead changed my > qcom_geni_serial solution to borrow code from 'msm_serial.c' > > I wasn't super happy with the solution in 'msm_serial.c' though. I > don't like releasing the spinlock there. Not only is it ugly but it > means we are unlocking / re-locking _all the time_ even though sysrq > characters are rare. ...so I came up with what I think is a better > solution and then implemented it for qcom_geni_serial. > > Since I had a good way to test 8250-based UARTs, I also fixed that > driver to use my new method. When doing so, I ran into a missing > msm_serial.c at all, so I didn't switch that (or all other serial > drivers for that matter) to the new method. > > After fixing all the above issues, I found the next lockdep splat in > kgdb and I think I've worked around it in a good-enough way, but I'm > much less confident about this. Hopefully folks can take a look at > it. > > In general, patches earlier in this series should be "less > controversial" and hopefully can land even if people don't like > patches later in the series. ;-) > > Looking back, this is pretty much two series squashed that could be > treated indepdently. The first is a serial series and the second is a > kgdb series. > > For all serial patches I'd expect them to go through the tty tree once > they've been reviewed. > > If folks are OK w/ the 'smp' patch it probably should go in some core > kernel tree. The kgdb patch won't work without it, though, so to land > that we'd need coordination between the folks landing that and the > folks landing the 'smp' patch. I have got only 0/7 and 5/7, everything okay with your mail client and other tools? > > > Douglas Anderson (7): > serial: qcom_geni_serial: Finish supporting sysrq > serial: core: Allow processing sysrq at port unlock time > serial: qcom_geni_serial: Process sysrq at port unlock time > serial: core: Include console.h from serial_core.h > serial: 8250: Process sysrq at port unlock time > smp: Don't yell about IRQs disabled in kgdb_roundup_cpus() > kgdb: Remove irq flags and local_irq_enable/disable from roundup > > arch/arc/kernel/kgdb.c | 4 +-- > arch/arm/kernel/kgdb.c | 4 +-- > arch/arm64/kernel/kgdb.c | 4 +-- > arch/hexagon/kernel/kgdb.c | 11 ++---- > arch/mips/kernel/kgdb.c | 4 +-- > arch/powerpc/kernel/kgdb.c | 2 +- > arch/sh/kernel/kgdb.c | 4 +-- > arch/sparc/kernel/smp_64.c | 2 +- > arch/x86/kernel/kgdb.c | 9 ++--- > drivers/tty/serial/8250/8250_aspeed_vuart.c | 6 +++- > drivers/tty/serial/8250/8250_fsl.c | 6 +++- > drivers/tty/serial/8250/8250_omap.c | 6 +++- > drivers/tty/serial/8250/8250_port.c | 8 ++--- > drivers/tty/serial/qcom_geni_serial.c | 10 ++++-- > include/linux/kgdb.h | 9 ++--- > include/linux/serial_core.h | 38 ++++++++++++++++++++- > kernel/debug/debug_core.c | 2 +- > kernel/smp.c | 4 ++- > 18 files changed, 80 insertions(+), 53 deletions(-) > > -- > 2.19.1.568.g152ad8e336-goog > -- With Best Regards, Andy Shevchenko