Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1466271ybk; Thu, 14 May 2020 09:38:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfYQBg3SniBtCP0pgpdB6FX3IBwWvdlYDYoZ8Qdhapx+M5QfqXJN+mjLDw7pp78Nd+vFYP X-Received: by 2002:a17:906:37d9:: with SMTP id o25mr4854503ejc.15.1589474332549; Thu, 14 May 2020 09:38:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589474332; cv=none; d=google.com; s=arc-20160816; b=tnDw+Tf0p8p6DwPtrG1sx55ZQPghVTeC1L537wol4moxnY6mF2vKhuHvKunxFP2Kla a51FJkfhz8GnVPamKD9IlWU0Nn0MTSUd/V1eXEo8RGrnhZR7Dp63dgwTKR51lyQNWmA/ ebuxV50gV3liBeVFMSCFeLg7UqwHI3l0Fv9GIfR0AguyKieyIQP0ncIeJ4L9rrB5dq9K H54043Bjahwy82hznajRsdBvxg7xuEh/avXhP9ZvEquUzEtTnoCs9rNKr552RUTbKNh6 O92e15bljNQnfcDTkuHsQ34DdMKJXriJ/jFwW472+pzkXQztew6K2vURkH7PTrlVoeSt NWig== 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=HWFeoUCCAGrwFNZxgc3//5BRvEIhNROwr+Wf1EbQfmY=; b=e6+PucV57Slu1zpu1od7e7TYrGGkgZlXsuC2aRHx5wCUOuuyj/7A2/pvYLwSwMyc4/ fNWYrdjrpmq1uyOATur9Z0i8S3w61kc7HRimneqP3vUVF9JjAB7meij/XsGlIHtiFWsG 4UChiOKJe/IjpdEDbp+k6psCQEsJGwmxfOu4hADBe7EfJVF0olQh3EM3Tp7unePlVRu9 1QTKQxK/6mj4Jl6Ve8Kg5TEyevkmNtlIJ7upgLJ1g2bV8MJLdqet2w4cHFMH985G/IKP 0ty8Qlz9KyTFJ3/HdTB2E3xVRzYErMFBy+X9UBk5YXLpWv2dSW3GrwdWol7R9OHAB5bS RhBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=UvPlZl0i; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o15si2074183eju.289.2020.05.14.09.38.27; Thu, 14 May 2020 09:38:52 -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=@chromium.org header.s=google header.b=UvPlZl0i; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726059AbgENQen (ORCPT + 99 others); Thu, 14 May 2020 12:34:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725977AbgENQem (ORCPT ); Thu, 14 May 2020 12:34:42 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB0C0C061A0C for ; Thu, 14 May 2020 09:34:42 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id z15so3114898pjb.0 for ; Thu, 14 May 2020 09:34:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HWFeoUCCAGrwFNZxgc3//5BRvEIhNROwr+Wf1EbQfmY=; b=UvPlZl0iOaSxRCrz4fSlO6xyQ4m5RIN2qw1rZtiYNuvBFSSNHUv+z6jsScDG2JkoLZ 9KPzqq9Yz+Xek9thEBwb1hxG4RE2BMXein7EOEaNp8aruvGk13N+6glTTIgL7iBjci/B OvS5nH3CBDh2XG23YTlRN04vrysWYTmp0OAqk= 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=HWFeoUCCAGrwFNZxgc3//5BRvEIhNROwr+Wf1EbQfmY=; b=ujOvM6Smb4vS8H7sgTgaZM4PxtIXoPlomtLp0CYqDChVLO+Ffm9BT+3GGyVDouRb8K /K01kxVsYFjDZEx5UlwTdjOY6SJma0JH0zkH9DUjztQYPOyqsZt7eqrguKJ04TwUgG4y /QIT1jdGyJS8t4ux1dk8GkLvz25TKeayHUTfzA6Z4LN2Qr7O6yMATswIClA6Rxd/AsHy Ha2WKOF6J8doizL+pxO0skTLFl5hA/zpv7kGHls7o1dHCu0Fbc4dNJJHH8cIrPldat4y efs4QNMQ2pW3yiN5CaodYZq9nDWUwgj5XKADVMwRIKM4bBGxrUHQEvKx5VsZBwo9ECTt s8mQ== X-Gm-Message-State: AOAM530+ocrbQBAdKBMi3H95QV7xt9KPblTnnGk6TxBVH3F23Rm+kZxx 9Axf6TZktc+8zR0cG4QLlVifQMbVKoQ= X-Received: by 2002:a17:902:9042:: with SMTP id w2mr4895277plz.127.1589474081698; Thu, 14 May 2020 09:34:41 -0700 (PDT) Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com. [209.85.215.175]) by smtp.gmail.com with ESMTPSA id v7sm2548049pfm.146.2020.05.14.09.34.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 May 2020 09:34:41 -0700 (PDT) Received: by mail-pg1-f175.google.com with SMTP id b8so1445049pgi.11 for ; Thu, 14 May 2020 09:34:39 -0700 (PDT) X-Received: by 2002:a67:bd07:: with SMTP id y7mr4374233vsq.109.1589474077707; Thu, 14 May 2020 09:34:37 -0700 (PDT) MIME-Version: 1.0 References: <20200507200850.60646-1-dianders@chromium.org> <20200514162109.6qt5drd27hpilijh@holly.lan> In-Reply-To: <20200514162109.6qt5drd27hpilijh@holly.lan> From: Doug Anderson Date: Thu, 14 May 2020 09:34:26 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 00/12] kgdb: Support late serial drivers; enable early debug w/ boot consoles To: Daniel Thompson , Greg Kroah-Hartman , Will Deacon , Catalin Marinas Cc: Jason Wessel , Jonathan Corbet , Frank Rowand , Bjorn Andersson , linux-serial@vger.kernel.org, Ingo Molnar , "H. Peter Anvin" , Jiri Slaby , kgdb-bugreport@lists.sourceforge.net, Sumit Garg , Thomas Gleixner , Andy Gross , bp@alien8.de, Alexios Zavras , Allison Randal , Andrew Morton , Dave Martin , Enrico Weigelt , "Eric W. Biederman" , James Morse , Juergen Gross , Krzysztof Kozlowski , Mark Rutland , Masami Hiramatsu , Mauro Carvalho Chehab , Pawan Gupta , Russell King , jinho lim , Linux ARM , linux-arm-msm , linux-doc@vger.kernel.org, LKML , x86@kernel.org 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 Hi, On Thu, May 14, 2020 at 9:21 AM Daniel Thompson wrote: > > On Thu, May 07, 2020 at 01:08:38PM -0700, Douglas Anderson wrote: > > > > > > My first attempt was to try to get the existing "ekgdboc" to work > > earlier. I tried that for a bit until I realized that it needed to > > work at the tty layer and I couldn't find any serial drivers that > > managed to register themselves to the tty layer super early at boot. > > The only documented use of "ekgdboc" is "ekgdboc=kbd" and that's a bit > > of a special snowflake. Trying to get my serial driver and all its > > dependencies to probe normally and register the tty driver super early > > at boot seemed like a bad way to go. In fact, all the complexity > > needed to do something like this is why the system already has a > > special concept of a "boot console" that lives only long enough to > > transition to the normal console. > > > > > > > > The devices I had for testing were: > > - arm32: rk3288-veyron-jerry > > - arm64: rk3399-gru-kevin > > - arm64: qcom-sc7180-trogdor (not mainline yet) > > > > These are the devices I tested this series on. I tried to test > > various combinations of enabling/disabling various options and I > > hopefully caught the corner cases, but I'd appreciate any extra > > testing people can do. Notably I didn't test on x86, but (I think) I > > didn't touch much there so I shouldn't have broken anything. > > I have tested a slightly earlier version using qemu and will test this > set before it moves forwards. > > > > .../admin-guide/kernel-parameters.txt | 20 ++ > > Documentation/dev-tools/kgdb.rst | 24 ++ > > arch/arm64/Kconfig | 1 + > > arch/arm64/include/asm/debug-monitors.h | 2 + > > arch/arm64/kernel/debug-monitors.c | 2 +- > > arch/arm64/kernel/traps.c | 3 + > > arch/x86/Kconfig | 1 + > > drivers/tty/serial/8250/8250_early.c | 23 ++ > > drivers/tty/serial/amba-pl011.c | 32 +++ > > drivers/tty/serial/kgdboc.c | 268 ++++++++++++++++-- > > drivers/tty/serial/qcom_geni_serial.c | 32 +++ > > include/linux/kgdb.h | 4 + > > kernel/debug/debug_core.c | 52 +++- > > lib/Kconfig.kgdb | 18 ++ > > 14 files changed, 436 insertions(+), 46 deletions(-) > > Any thoughts on how best to land these changes? > > AFAICT the arm64 I was hoping to get an Ack from Will or Catalin for my most recent arm64 patch [1] and then it could land in your tree. However, it wouldn't be the end of the world if that landed later. "kgdbwait" would be broken if you used it together with "kgdb_earlycon" but overall we'd still be in a better place than we were. > and 8250/amba-pl011/qcom_geni_serial code > could be applied independently of the kgdb changes Right, that would be OK. Nobody would actually be able to use "kgdb_earlycon" until those landed but there would be no problem with those two landing separately. > (though we must keep > changes to drivers/tty/serial/kgdboc alongside the kgdb changes). > > I can hoover them up but I'd need a solid set of acks and > I don't think we've got that yet. It would be nice for it to be explicit, but "get_maintainer" says that Greg KH is the maintainer of serial drivers. Git log confirms that he also has been the one landing changes to these files. Early-on he provided his Reviewed-by for the series as a whole, so he's aware of it and maybe would be fine w/ the serial changes landing through the kgdb tree? Greg: is that correct? > I'd also be happy to ack where needed and let someone else pick it up > (the other changes queued for kgdb this cycle are pretty small so we > shouldn't see much conflict in kernel/debug/ ). It feels to me that the kgdb tree is the best destination for all these patches if possible. [1] https://lore.kernel.org/r/20200513160501.1.I0b5edf030cc6ebef6ab4829f8867cdaea42485d8@changeid -Doug