Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1455626ybk; Thu, 14 May 2020 09:23:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzf9bY7tmnCtneu63nlaiuZS1Qyy8ctwJScM6MZNW2jZt019AC9Ge6QMtD1PRpTUII65MZz X-Received: by 2002:a17:906:81ce:: with SMTP id e14mr4519688ejx.76.1589473407532; Thu, 14 May 2020 09:23:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589473407; cv=none; d=google.com; s=arc-20160816; b=Xb3C0nS627Dw67ayiFJKx4E0en9QGGvhjpH0rUeLR/Le6JmeHliTzs+k52rxSfgosp HSQKWrtpgJyWX6ecbtg/n6DU5M7+amyXnD5NSbMvsEgyagUjVrrKvMP6S20oOV63lST8 PJAnGEWOzJP1ZpkkZrbZ5jLMdHEhtR5sKKv4iMpLyDG5gVotp1y/MoSZX7oLAtDMyEMi 9fMBd10P4ooJZwudHaoVNOtEH+YaCO2kFuh+RZoR6F8WnWyEC6FCqZkghKybOv6EG3SN 0whbyXLQYPkTvylu/WYkP1lJYqDXINRuJrbLBa0vy5cMGSW+UXB63ZHsYYUKaZ5EnDVM wqfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=KV4BSoviEBOfIIyT+7Io9PqJ+AxGL6m4ncG0jX3R3Vg=; b=xGhcmkqfPJW2Rco7w1ltfz03f6VNeTIUpgx6oNZoARiRVNAAsGiCFVWgNI4zysZ0Lm yWLt8fSVmenpK0zGNv6HrWeHwXCtRlaYnBrREHzX1TZuk7J+TvtmyG4XQcBnr8hNWj45 q0yTCXUFW7MtgkYCQPYjnV08yhRyRwgfQWz4ja+eNj/XCeDh+EN602J/T3DtS/BSZhCK zHwE4dAuapjinbqNutWbLZ36HkWuYdf60I2hJ9E7uDhdHzifu69CR27HQ4xXVOUFH+R+ JM9zXdjwAfC/SAvyBktbTKtmBE1k0VRopGMETxmxWuHXYc3C0xfow25n+E3NYVW9fFiE AVag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iiHyiJ4q; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e9si1861166eds.63.2020.05.14.09.23.04; Thu, 14 May 2020 09:23:27 -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=@linaro.org header.s=google header.b=iiHyiJ4q; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726141AbgENQVO (ORCPT + 99 others); Thu, 14 May 2020 12:21:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726123AbgENQVN (ORCPT ); Thu, 14 May 2020 12:21:13 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A2F5C061A0F for ; Thu, 14 May 2020 09:21:13 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id h4so31223448wmb.4 for ; Thu, 14 May 2020 09:21:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=KV4BSoviEBOfIIyT+7Io9PqJ+AxGL6m4ncG0jX3R3Vg=; b=iiHyiJ4q0+KsNNeDxvvCz9wtZO9sC8IuSU69MkWg6ukuylaAreG2+ufhhS2q0LvI4a 9ZFBQEB3gresJbeadDdort7B7CJztVaOzd+imGLK9adisFs8l1EkEXwjPix6DMwXWpjX /bCdQB8gtMafG88ExRQb7sOFOT2TnNJlqCmCoaS8LyHnYhBzplYGqcazpRuc/Byl/kdH h8OE0uxsaWxjlIp/J8ewc/SWJUPpFj3CJfpjNNHOJYP6BbciN+6P7zMR4GQBICDm8oYj m2m8J1vRn9sCMPHm5LZbqiU0px2GbT9jNPn6q/3jziLa6B8kfu211fXDrBPg+K08gUdF P8BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=KV4BSoviEBOfIIyT+7Io9PqJ+AxGL6m4ncG0jX3R3Vg=; b=ojolFvycALaZ1NmdlB9oEwt4z978Kpk5/T+e3EN1RnO7Iqhy8NIkDu5y8TXi37176C BLdU+ujViqctVhQ3C/TyI7OAfCg4rPkLuKaMnduyECtKFOVk43A+rjd4UdEQtDpRtmWA POSKZNddlz7D9zcAdLEQqw8LGrbWIa07pJVTD80mXohLZS/7Dkz4PNF4PLU1c2jVrGIg bgxw9krC0WbmyAy5uRMCRX9LSJYL5cPAc9a16tKskQWrucBuhMF52P9v8rL3bDIbUACI bIH3AJHqmi8AZo/GGDGGr6flFYa3+j5i+Sx/tRgURJ4d+jxRBGQtQvc9Pp4c9FcaPXZB /0qw== X-Gm-Message-State: AGi0PuaTAfzOK8L+kZwFQmyevi6ivp/njREKUq48nMnDq+qyGLJ8lo2a WeFK6CN7WehxYnHKMkq3xr05oVF+jO6M4w== X-Received: by 2002:a1c:ed04:: with SMTP id l4mr49969579wmh.93.1589473272074; Thu, 14 May 2020 09:21:12 -0700 (PDT) Received: from holly.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id b14sm29577880wmb.18.2020.05.14.09.21.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 May 2020 09:21:11 -0700 (PDT) Date: Thu, 14 May 2020 17:21:09 +0100 From: Daniel Thompson To: Douglas Anderson Cc: jason.wessel@windriver.com, gregkh@linuxfoundation.org, corbet@lwn.net, frowand.list@gmail.com, bjorn.andersson@linaro.org, linux-serial@vger.kernel.org, mingo@redhat.com, hpa@zytor.com, jslaby@suse.com, kgdb-bugreport@lists.sourceforge.net, sumit.garg@linaro.org, will@kernel.org, tglx@linutronix.de, agross@kernel.org, catalin.marinas@arm.com, 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-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v4 00/12] kgdb: Support late serial drivers; enable early debug w/ boot consoles Message-ID: <20200514162109.6qt5drd27hpilijh@holly.lan> References: <20200507200850.60646-1-dianders@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200507200850.60646-1-dianders@chromium.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 and 8250/amba-pl011/qcom_geni_serial code could be applied independently of the kgdb changes (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. 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/ ). Daniel.