Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1590177ybk; Thu, 21 May 2020 10:22:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyT5sctJNGBE2MkKOx2JF3S3LE0WqTak4XsS5IsVYytlVvDx7oDTOCr0IVRNvol+TmwVGsg X-Received: by 2002:a17:906:4d88:: with SMTP id s8mr4824397eju.193.1590081768799; Thu, 21 May 2020 10:22:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590081768; cv=none; d=google.com; s=arc-20160816; b=wsDccor1AvYyFxaR+KNpeizpzSvkO9oiw4ZPUi2X6fK64OmRCQUrEPfa8sloobhirH FqkO9FY8TIbu1sIApEkDW9wdrN1/RBmnXGmiWspagbboGF/pdLCqrOhoWvZyKdNcCcOi gZW9uqyO/tABKNi+sZJ6PK+Vp03fgiyXmhbWU6A8vnyd2Dck2U0h4D0irUiCQlpB4vOM Zz+4xwwC+Ap+c0eoA9Ij+r5Y/87i28/PIcgp8WTxBLWyVHtzYJYTTXCIvzPYcjdDRygO +hwn54Ke7u97vRRri6n/uOu1Jhjdj27UJzjwpF8irx3nggSmrQ27fbmg4qv91Ggn3OpF pCQg== 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=mpkOZJGzlOyjMi6E4aGEVw8elxqv6cvMyDakUdm0E6w=; b=bSxhEE7Hg9HRqfBH7gUzsHizhNbwjQuGU58ct5SYbetnKMY6rpZFhzeP0XKAxi8JrB 8hRggLwH7Y3PN5C2Lh4vOFbmVyBxp9gZQaDIUNl8FxQB1AgqI6v57yxBBEwfCTByuqI0 92SSqK3rCPSQtuCfyCFS/7GN9XFO2RHnjn1YQGvfz8tyzs3bNZNiy5IIWYcWZqo2ENQ5 AezzVM1YC4PcdQ9jRdmejC4UNhnmQ4t74bcSkNph6O8ykOT8yp843W1O5SsHjYyawmMw VIqJhKXjxuSofpa7Fs8Fk6xhVSKBasADuSM42aI8/0DFjhuz0kqaAfidOzZJTn8Hw80e 1wYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=bFVtLzwv; 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 se24si3666450ejb.652.2020.05.21.10.22.25; Thu, 21 May 2020 10:22:48 -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=bFVtLzwv; 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 S1728857AbgEURS1 (ORCPT + 99 others); Thu, 21 May 2020 13:18:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728456AbgEURS1 (ORCPT ); Thu, 21 May 2020 13:18:27 -0400 Received: from mail-vk1-xa42.google.com (mail-vk1-xa42.google.com [IPv6:2607:f8b0:4864:20::a42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A18E5C061A0E for ; Thu, 21 May 2020 10:18:25 -0700 (PDT) Received: by mail-vk1-xa42.google.com with SMTP id o8so1884463vkd.12 for ; Thu, 21 May 2020 10:18:25 -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=mpkOZJGzlOyjMi6E4aGEVw8elxqv6cvMyDakUdm0E6w=; b=bFVtLzwvUKDWNkBK6dWkJEda5wjM89UHYfYNcjTYN4P+nB39oDCq/kKc6ofSZmqeHb tYGLDZacFX5B7LUfcjyoApF8wnLcDU72LTunks9leoZ7KG9aU5PYcikSU0WRj1soGSZ0 o9xx2KoC3JM4VZSOcSG9U3hJuNoLmnM21QhfQ= 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=mpkOZJGzlOyjMi6E4aGEVw8elxqv6cvMyDakUdm0E6w=; b=Adk4L7WffUeqH9CXUfpO8ZEkRydrcdPUOyynxCt5/zEtIwW/fBcQy60PCKXB59o7Iu 3OZK+Ru2T1bZOSxHz2v0nLzpi1ym8mr2rUxJQokIiPQ+FSIf/oX31zyX3VFh/bU3otWl Uce41eNsBVxNEJUxJ2pQWsvSwuf4LTDkXJxvy++2jxh03OICyN7ROgpp0KHlWKy9WbdY WVALKQ2AWh0J7wWZXycHHxO8X/rQQNjyUEO/ny3xJRBc0iyRx00fPKGoSQs3Uu/5f0Ae NQFJKfADycRFE+ErgA0hyDejfa4cIhb7xtByc68f09hdaFBehhDGrYGHBSqNjZ/653Hw BnQg== X-Gm-Message-State: AOAM5308Re1va9U2gx3eJBnPDTrUDalbOWXcgmqOgBYvMyBXahv9nyi1 +S9WvwkTPOPcyCEZsuhCicaq9fAxX9A= X-Received: by 2002:a1f:ad86:: with SMTP id w128mr8670068vke.30.1590081504474; Thu, 21 May 2020 10:18:24 -0700 (PDT) Received: from mail-ua1-f52.google.com (mail-ua1-f52.google.com. [209.85.222.52]) by smtp.gmail.com with ESMTPSA id y12sm898093vko.40.2020.05.21.10.18.23 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 May 2020 10:18:23 -0700 (PDT) Received: by mail-ua1-f52.google.com with SMTP id f9so2843039uaq.2 for ; Thu, 21 May 2020 10:18:23 -0700 (PDT) X-Received: by 2002:ab0:69cc:: with SMTP id u12mr7668622uaq.22.1590081503114; Thu, 21 May 2020 10:18:23 -0700 (PDT) MIME-Version: 1.0 References: <20200429170804.880720-1-daniel.thompson@linaro.org> <20200430161741.1832050-1-daniel.thompson@linaro.org> In-Reply-To: From: Doug Anderson Date: Thu, 21 May 2020 10:18:10 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] serial: kgdboc: Allow earlycon initialization to be deferred To: Daniel Thompson Cc: Jason Wessel , Sumit Garg , kgdb-bugreport@lists.sourceforge.net, linux-serial@vger.kernel.org, LKML , Patch Tracking 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, Apr 30, 2020 at 9:47 AM Doug Anderson wrote: > > Hi, > > On Thu, Apr 30, 2020 at 9:18 AM Daniel Thompson > wrote: > > > > Currently there is no guarantee that an earlycon will be initialized > > before kgdboc tries to adopt it. Almost the opposite: on systems > > with ACPI then if earlycon has no arguments then it is guaranteed that > > earlycon will not be initialized. > > > > This patch mitigates the problem by giving kgdboc_earlycon a second > > chance during console_init(). This isn't quite as good as stopping during > > early parameter parsing but it is still early in the kernel boot. > > > > Signed-off-by: Daniel Thompson > > --- > > > > Notes: > > v2: Simplified, more robust, runs earlier, still has Doug's > > recent patchset as a prerequisite. What's not to like? > > > > More specifically, based on feedback from Doug Anderson, I > > have replaced the initial hacky implementation with a console > > initcall. > > > > I also made it defer more aggressively after realizing that both > > earlycon and kgdboc_earlycon are handled as early parameters > > (meaning I think the current approach relies on the ordering > > of drivers/tty/serial/Makefile to ensure the earlycon is enabled > > before kgdboc tries to adopt it). > > > > Finally, my apologies to Jason and kgdb ML folks, who are seeing > > this patch for the first time. I copied the original circulation > > list from a patch that wasn't kgdb related and forgot to update. > > > > drivers/tty/serial/kgdboc.c | 41 +++++++++++++++++++++++++++++++++++-- > > 1 file changed, 39 insertions(+), 2 deletions(-) > > Thanks, this looks great! > > Reviewed-by: Douglas Anderson Are you planning to rebase this patch atop what landed? It seems like a useful feature. If you want me to give a shot a rebasing, let me know! -Doug