Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp369924ybr; Fri, 22 May 2020 08:32:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3BAfdg+7hHlTnHgfDW8oLI2FixdrFqeafLKUb8BI302Jou5lV3AcG1H/rpA+zZtIzmZtu X-Received: by 2002:a05:6402:22a6:: with SMTP id cx6mr3417766edb.76.1590161572607; Fri, 22 May 2020 08:32:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590161572; cv=none; d=google.com; s=arc-20160816; b=FmMvfGj5kmrnyfoRJVsBlbY4whCJxVtUE0fvD1r1OvlvasHLG6gpOstlVPVZPUCuNZ pXVJB1i4mRngTFCFSbd9fxNiwfE8lqM/CoLFTJM1KGMqI9AW0Nkj/HTlXlO/vrtGusvE jgZ1yOArPPClbtQL8/ePyOVvWBROn6rp/pRqREk+N3FV50fUHnIPKPT28Uu225w+f2C6 9kHrkhFMSTk+/QCbKrm69lOj1emWXqvXYrE3yTHT+5cVEnlb2dwIw/SJaqtt33YLOLdw dGr8ZBd+XI4tS9UxlfAZYi9Lo9JxuJyi9RDCg2X4zshE0Nw0l/7UDl0KqdMfn84pWeCX K8Pg== 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=pGeQM1dfUNV6yQ38TOhnl5g6+/IaVOCSaD7SXsj2Qr0=; b=UXXgUuwtSOs1JvFfNaiPdawx1QsL2H95TDDIerhoCoHSUxEne7oANZbIj43Vpyi32o Lmk61homMeyBcZp7udQi7clu2n0+I1fNKOD66QmuJs8nsgTqO8kRtZXhEzsKp2FOqh8R 93AqUzhNqJA4hYWL+L4cUhEh5JKgJPJ0ZcAXXQiVt1cpRj/SfR0k/spL/zphVAy7TPpc BWqCLGbjWpBDZ1yZGCEx+bzEpGROX1gp+tCnMhtAthNTY/nGoXv4CM84uekAmFwwVBUh e5etYtxeb7zCqMfgQLHXFEZqjDJWBa+R3zVhEdQkKZUOz0Ym2SbNUYbXFCmz7/HPouMG V5zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mg2kS9Pu; 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 ov7si5185487ejb.409.2020.05.22.08.32.27; Fri, 22 May 2020 08:32: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=@linaro.org header.s=google header.b=mg2kS9Pu; 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 S1730119AbgEVPag (ORCPT + 99 others); Fri, 22 May 2020 11:30:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729851AbgEVPaf (ORCPT ); Fri, 22 May 2020 11:30:35 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3D2EC061A0E for ; Fri, 22 May 2020 08:30:34 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id l17so10583535wrr.4 for ; Fri, 22 May 2020 08:30:34 -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=pGeQM1dfUNV6yQ38TOhnl5g6+/IaVOCSaD7SXsj2Qr0=; b=mg2kS9Pu1T9ifwA0mpe05G6x1t3Ppsu6Qa9bXzWW2e6DFx59fezJbsW2NF+OXfSVuC Blu/dzlOcOswC+7Iw8mDznR1oinY/l1z2OI2khb6hZvq4I4YmdUZP2CPUwqDsEaufnyR TMzgi4MvNkrvCwbWY/UagHowidZFgkx+JT8N2ubypvj/d/NlXd13PO3c1cDmOKeyYF2X VCsLocQmET+wvTcAc8fK1tjVUi9HlV+FVExJyheWj/mr1qZ4snmmJHrtj30zfcoHYnEL VA3V+lp2ZccpcgXMGRm9gcGo7HEEJkJIKsWnOz0OZYCegnBIdfRlOXwkScDCaclM3+To YvSw== 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=pGeQM1dfUNV6yQ38TOhnl5g6+/IaVOCSaD7SXsj2Qr0=; b=U1iYdx1pFRQkrD+mtXHj5gPuBSAfb8PzRNK6iJg2oXNOGk0mPX04i/cWIMyT5edFNi lR3bwqAH67v3UjMMD4/Q9cuOa719sNlqMlY81gRC4DjfbMteA0nVWrpo+hziDiUzOVoj 8Uhp0Lxo5N3szrD4baeN5sKrMM0Zp4SN4oaF4+SAqOdVGg7LXEAwkkI7botPCokBt1s8 74HpsataHhZniiBN/xIxfDvPdVxf2U5tDjz4UN8hMS5vNfORq5vGAT474HppRtE5yVJt Fx/BVz4i/u/9xu/GDrAFcfy90n9OaKdmM2ulJnw85EL4z6nNtr3Bdo0vhfBRV5NOQyxv /kJw== X-Gm-Message-State: AOAM533rfmxT1Idpk6Af0y0G8Kx4MD2IRxtBdxPZeCqls6Ttks8GfkKZ 1zVSPXozGGe2eKL6lEEB0RJvJA== X-Received: by 2002:adf:dc50:: with SMTP id m16mr3857267wrj.329.1590161433623; Fri, 22 May 2020 08:30:33 -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 z132sm10873040wmc.29.2020.05.22.08.30.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 08:30:32 -0700 (PDT) Date: Fri, 22 May 2020 16:30:31 +0100 From: Daniel Thompson To: Doug Anderson Cc: Jason Wessel , Sumit Garg , kgdb-bugreport@lists.sourceforge.net, linux-serial@vger.kernel.org, LKML , Patch Tracking Subject: Re: [PATCH v2] serial: kgdboc: Allow earlycon initialization to be deferred Message-ID: <20200522153031.2ydgx4k6jl7dsiqn@holly.lan> References: <20200429170804.880720-1-daniel.thompson@linaro.org> <20200430161741.1832050-1-daniel.thompson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 21, 2020 at 10:18:10AM -0700, Doug Anderson wrote: > 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! I've got it on it's way... Daniel.