From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3842BC32771 for ; Wed, 21 Sep 2022 13:56:11 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3937A845CE; Wed, 21 Sep 2022 15:56:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="jeZMfX/a"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1A46C84976; Wed, 21 Sep 2022 15:56:08 +0200 (CEST) Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id F304A845C1 for ; Wed, 21 Sep 2022 15:56:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x734.google.com with SMTP id k12so3975019qkj.8 for ; Wed, 21 Sep 2022 06:56:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=/SeHWZGTYOACcA2bOv88XCyAvshSKaUJ+tPLIX8GDGM=; b=jeZMfX/a9NYAet5k0L9yTgGwhGco+ZTTFx/jAU12WLlm7wFbr3TbACp9QaBvyJVErg GzG1K/+IBN/2A6elt0sSnjbUChnjmvGQJGsD9cCPZBdWFfOTvr+jcKxbQM+jvUlPu9FE jJwH/ARJX+GvBORC5sPvthV5gf+Sb3rXMusaE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=/SeHWZGTYOACcA2bOv88XCyAvshSKaUJ+tPLIX8GDGM=; b=pOHHQg9GGvcjQUCOClqh/BCZsAjuxeVYFZnsxenLtk7Km8zGjkldKOFK+hry+/Kwep czb8mkWo78vjHd0t9enWqjj+2CovetQbXHpU69KeATZh4D0oEM7lGPBGt0EiBPtLp3lD XnzFjgTmgWj2/f+GNRTUuV7fQTri7eeCUz71MrWq/OLVEgB836rIsKrmOykAd8v0+9y1 iZuAc3ZdY9OvqeVdFV/RdG6ed7xW9HBR21O0UldYf4j9b+7JEDksuMZQf8xVQPyubuag CrFDPY72D0DjxHiRuV62KPYC5QR+w3d1BX5iONLPykUygAV7gcrDZCi5eQeIYrAKsS6p Rtmw== X-Gm-Message-State: ACrzQf18btfjvpk3KrvOGlpD4lOvdQ1f0be2cAHOO5n9KUa1aZJIutjI 8dbFinyppD6+yGFdYuXt22V6Og== X-Google-Smtp-Source: AMsMyM4V/9iI1bBzhw1pyi0OhCUAUw41rIjT7ZVdcwwfeyCHDe1Vq1xSmmeCZysKNf3unZBfUbysJQ== X-Received: by 2002:a05:620a:4f2:b0:6cf:2175:e7d2 with SMTP id b18-20020a05620a04f200b006cf2175e7d2mr8277886qkh.401.1663768563691; Wed, 21 Sep 2022 06:56:03 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-7442-0e7b-49ca-6995.res6.spectrum.com. [2603:6081:7b00:6400:7442:e7b:49ca:6995]) by smtp.gmail.com with ESMTPSA id e7-20020ac80647000000b0035bb0cd479csm1619203qth.40.2022.09.21.06.56.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Sep 2022 06:56:03 -0700 (PDT) Date: Wed, 21 Sep 2022 09:56:01 -0400 From: Tom Rini To: Pali =?iso-8859-1?Q?Roh=E1r?= , Heinrich Schuchardt Cc: Simon Glass , u-boot@lists.denx.de Subject: Re: [PATCH v3 0/6] console: Implement flush() function Message-ID: <20220921135601.GS3044094@bill-the-cat> References: <20220905093121.11630-1-pali@kernel.org> <20220921134924.GQ3044094@bill-the-cat> <20220921135413.lz6wzjrgabns5p7d@pali> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="A2x6GFCQWVc4i5ud" Content-Disposition: inline In-Reply-To: <20220921135413.lz6wzjrgabns5p7d@pali> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean --A2x6GFCQWVc4i5ud Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 21, 2022 at 03:54:13PM +0200, Pali Roh=E1r wrote: > On Wednesday 21 September 2022 09:49:24 Tom Rini wrote: > > On Mon, Sep 05, 2022 at 11:31:15AM +0200, Pali Roh=E1r wrote: > >=20 > > > On certain places it is required to flush output print buffers to ens= ure > > > that text strings were sent to console or serial devices. For example= when > > > printing message that U-Boot is going to boot kernel or when U-Boot is > > > going to change baudrate of terminal device. > > >=20 > > > Some console devices, like UART, have putc/puts functions which just = put > > > characters into HW transmit queue and do not wait until all data are > > > transmitted. Doing some sensitive operations (like changing baudrate = or > > > starting kernel which resets UART HW) cause that U-Boot messages are = lost. > > >=20 > > > Therefore introduce a new flush() function, implement it for all seri= al > > > devices via pending(false) callback and use this new flush() function= on > > > sensitive places after which output device may go into reset state. > > >=20 > > > This change fixes printing of U-Boot messages: > > > "## Starting application at ..." > > > "## Switch baudrate to ..." > > >=20 > > > Changes in v3: > > > * add macro STDIO_DEV_ASSIGN_FLUSH() > > > * fix commit messages > > > * remove changes from serial.c > > >=20 > > > Changes in v2: > > > * split one big patch into smaller 6 patches > > > * add config option to allow disabling this new function > > >=20 > > > Pali Roh=E1r (6): > > > sandbox: Add function os_flush() > > > console: Implement flush() function > > > serial: Implement flush callback > > > serial: Implement serial_flush() function for console flush() fallb= ack > > > serial: Call flush() before changing baudrate > > > boot: Call flush() before booting > >=20 > > Including the change you suggested to 4/6 to fix that build issue, > > there's at least one more large issue that prevents CI from getting too > > far: > > https://source.denx.de/u-boot/u-boot/-/pipelines/13534 > > and they all have a failure similar to: > > https://source.denx.de/u-boot/u-boot/-/jobs/500794#L51 >=20 > It looks like that some efi stuff overloads u-boot functions, in this > case newly added flush() function. >=20 > Any idea how to handle this issue? >=20 > The only option which I see how to address it is to revert those changes > in source files which always calls flush() function and replace them by > my first attempt which use guard #ifdef to ensure that flush() call is > completely eliminated at preprocessor stage when efi is enabled. Adding in Heinrich. --=20 Tom --A2x6GFCQWVc4i5ud Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmMrF/AACgkQFHw5/5Y0 tyydHQwAsXe0+k+G1GLzowiEFRfweqTWBFQb50OZZD5PwqNcEYq4jx4s2kxQWFsM oQ5ppcuKI9DsjyFVhVA9SoeSvrIFFNxns+vSw34DmZ7TsX5dEnjjymCttQ9bxhZb TydGka6BkSjT7xA2iC6QOyggt0yAd+59ZwUDQXVcHvOHmHzwG+AF0K0kcU9Jby5p eXIQ9ZouhuIKj9e+qinO12BSEiVU3VmuqkyK3qYsdnuR7aQ9Kt9LmMsW2qvtoRYI r2edQaSJnEOkdXJMvo5fwJmlbqPrHZlHPLfIBiFEO9kbMJQkqBX0Re6wAh1zye5d T/1b8XkJVekwKhXLoCScK7ud0uO5lkeVCXkmL2K6s1U/mqkrGIAcfVhvkOZcPgsE NVv+L4fE7+AVqN2APQL6NSlFBQOPC8QIrcm9eyPp+79rVRtLr3FQl/3ieM0rxtZ5 mzcjhb6RLqNCyLEGcAtN8bLvRnL6BocTRq67QChYajdCulKXuPTgJQ/geZvHu4uo DSPMZ4wa =pk47 -----END PGP SIGNATURE----- --A2x6GFCQWVc4i5ud--