Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2041709ybz; Thu, 30 Apr 2020 09:49:31 -0700 (PDT) X-Google-Smtp-Source: APiQypJMbB4CeRT0r8DwdYy2khia4C7Q6OJImZpnuorU3jtMx2l5ck5h/hpOmMoi09WebWwJq/rz X-Received: by 2002:a17:906:6b1b:: with SMTP id q27mr3488107ejr.158.1588265370924; Thu, 30 Apr 2020 09:49:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588265370; cv=none; d=google.com; s=arc-20160816; b=o8wm+wRL83tsorhIjZ5obk0VdkRYJiqH1UxnkUnmNcy1EF/jSW0e43muoC4AsfRk05 7/nI7fc9NYSrRgW1aLZS+Z9I8Q1JSwFmuIvpLxUa3se3q9Du0wo19I4dJc/ijRgkOG+7 zrJzi5I1rdBTm/LyqERTk3kWFRtUACzIxUrwo79XVz3NbbzdU9AZWRaj2QPI79w00rE2 X9IZ4UXWPDvvm7gOr+2nyjUA9nrd2+714cf6tjk49Dhp8ZiYCkh+XT2JH33ruF45tupW ymbT/CNP8hgjc5yq4SJuu6uI5mgFZNQ/NEgNnNtslo9RcHvqx9oI6ArbChXw6hZcbj31 XzxQ== 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=hBtVi/B4LPd4rRf9CEmZJjnlyoXbvXsuWtCUKyK+qR8=; b=THq/8O6uDaACiaDZReGeFtYRirqzwjsv6FmWtNqO9cGN0n0qV16nHAP5iE6ixHYw2i zi/xkTNZ3IgLV+c8SwScV/ocrvZ0uE/O75dgvw6+gU+IOeMF7kRwWTteo1JMDkiyv1/v /24JQVWwkZeWPBVQKAP56l1THb4owKCTqHsxhvY/brHvn4KhBcWXVKYvVL81MupOdhxK onRg2s5QWz0rF8Vf7dl3W8bISqkKonFR5CTJwjXu4DBG3kpWyWR+kPASY8GAfyrAfsxd /wFLd9XZnQCv6ovFCt0w+xtzQjmUIiHeRK9VVaUcdydcUhKBNt9PObgZo5H8sJTvrrxk bqEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=DR4GRE1T; 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 d5si89811edy.479.2020.04.30.09.49.07; Thu, 30 Apr 2020 09:49:30 -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=DR4GRE1T; 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 S1726530AbgD3Qrl (ORCPT + 99 others); Thu, 30 Apr 2020 12:47:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726396AbgD3Qrl (ORCPT ); Thu, 30 Apr 2020 12:47:41 -0400 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E848C035494 for ; Thu, 30 Apr 2020 09:47:41 -0700 (PDT) Received: by mail-io1-xd43.google.com with SMTP id 19so2171669ioz.10 for ; Thu, 30 Apr 2020 09:47:41 -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=hBtVi/B4LPd4rRf9CEmZJjnlyoXbvXsuWtCUKyK+qR8=; b=DR4GRE1TTJdVdqqNkzD9HvSJO3aKd8slDhb6oW+zf4W3fg6ciNocMNd0uAmOp9/LgQ cdAfiNZUtnc15ebRDnToxFcEed9hDv0mdi28ZFPnEVxiEfo+BQszuWQgZRn65MiJoAyJ jn97XH/UG5N4WBMhhQ3jQLMtEX4MQqOPntizs= 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=hBtVi/B4LPd4rRf9CEmZJjnlyoXbvXsuWtCUKyK+qR8=; b=I/ZI+gnh+XIj3Z40K/qefidUDDuiDlPjLC+eTY1YqOKIHehOqCQD3WXft91RSGmErw OFOrgQJK9xHLWnVN6Uhdixo4lJdROVwVLAdEt79f7H9K2uVfcImbuWFxy4kw09ffdVhC 32r8MVlHN/DdTwXMM4kCEuOrD8JfCQmoA8CU9fTiCmzSb2/gg7CSBuaneGgR2E6Fye1q q/V7ELbXko0JfPF3PurHCjpF8Jk0CRkMwnNFTQYPmcSkKmKjSNpGdbQDv0eaQPJZNH1h xJNzeCwj5XmEXsSif6Zs3z6dr17uZ+HMF7RyC17k4RkoOz/gLpn9woiG/BkQ2aKLgZUY SnEQ== X-Gm-Message-State: AGi0PuZAgeCvr7L3Vz5lLr/JqfU4ymx/Swsft2cvb34oDYkLkqRocMBg XkWOZzbznooEWmSaTQ0w5jPH90YSY+M= X-Received: by 2002:a02:a517:: with SMTP id e23mr2619012jam.56.1588265260557; Thu, 30 Apr 2020 09:47:40 -0700 (PDT) Received: from mail-io1-f43.google.com (mail-io1-f43.google.com. [209.85.166.43]) by smtp.gmail.com with ESMTPSA id g90sm127323ila.19.2020.04.30.09.47.40 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Apr 2020 09:47:40 -0700 (PDT) Received: by mail-io1-f43.google.com with SMTP id k23so2195369ios.5 for ; Thu, 30 Apr 2020 09:47:40 -0700 (PDT) X-Received: by 2002:a5d:87cd:: with SMTP id q13mr2758350ios.61.1588265259570; Thu, 30 Apr 2020 09:47:39 -0700 (PDT) MIME-Version: 1.0 References: <20200429170804.880720-1-daniel.thompson@linaro.org> <20200430161741.1832050-1-daniel.thompson@linaro.org> In-Reply-To: <20200430161741.1832050-1-daniel.thompson@linaro.org> From: Doug Anderson Date: Thu, 30 Apr 2020 09:47:27 -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: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