All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Julien Stephan <jstephan@baylibre.com>
Cc: u-boot@lists.u-boot-project.org,
	GSS_MTK_Uboot_upstream <GSS_MTK_Uboot_upstream@mediatek.com>,
	Simon Glass <sjg@chromium.org>,
	"Markus Schneider-Pargmann (TI)" <msp@baylibre.com>,
	dlechner@baylibre.com
Subject: Re: [PATCH v2 0/3] Improve logging on missing uclass
Date: Thu, 3 Sep 2026 16:56:22 -0600	[thread overview]
Message-ID: <20260903225622.GA2662603@bill-the-cat> (raw)
In-Reply-To: <20260824-improve-logging-on-missing-uclass-v2-0-4bee2cdff72b@baylibre.com>

[-- Attachment #1: Type: text/plain, Size: 2365 bytes --]

On Mon, Aug 24, 2026 at 10:44:15AM +0200, Julien Stephan wrote:

> While writing a MISC driver, I forgot to enable CONFIG_MISC. The only thing
> I got at boot was the following obscure error, with no hint about the root
> cause:
> 
>   initcall_run_r(): initcall initr_dm() failed
>   ### ERROR ### Please RESET the board ###
> 
> Commit 3346c87625b8 ("dm: Improve handling of a missing uclass") already
> tried to improve this case by returning a strange error code and adding a
> debug message. But since neither the debug message nor the return code are
> displayed by default, it was not very helpful in practice.
> 
> This series improves the situation in a few ways:
>  - a new dm_err() helper logs driver model errors at ERROR level, and the
>    boolean DM_WARN option becomes a per-stage log verbosity choice
>    (DM_NONE / DM_ERR / DM_WARN) with errors emitted by default. Note that
>    a disabled level is not removed entirely but degraded to DEBUG level,
>    which is compiled out by default, so even DM_NONE can still emit these
>    messages as debug output when debug logging is enabled;
>  - the missing-uclass message now uses dm_err(), so it shows up by default,
>    with a shorter string to limit the code-size overhead;
>  - the initcall failure now prints the actual error code (and its string
>    when ERRNO_STR is enabled), for both INITCALL() and INITCALL_EVT().
> 
> The existing DM_DEBUG option is left as-is for now: it works differently
> (it adds -DDEBUG to drivers/core/ via the Makefile and is not phase-aware).
> Unifying it into the new choice, along with converting the DM core debug()
> statements to log() as suggested in the "To Do" section of
> doc/develop/logging.rst, could be a follow-up series.

There are two issues here. One issue is that tests need to be adjusted,
as CI fails:
https://git.u-boot-project.org/u-boot/u-boot/-/jobs/83678
for example.
The second issue is that am335x_evm overflows in SPL due to size growth.
I am currently seeing if we can enable LTO on that family now, or if it
still has a run time problem. If the latter, then defaulting to
SPL_DM_ERR_NONE might be how that has to be handled.

For re-testing this in CI, please feel free to use a WIP branch or
something in the mediatek tree, or just a tree under your own username.
Thanks.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      parent reply	other threads:[~2026-09-03 22:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-24  8:44 [PATCH v2 0/3] Improve logging on missing uclass Julien Stephan
2026-08-24  8:44 ` [PATCH v2 1/3] dm: add dm_err() and a driver model log verbosity choice Julien Stephan
2026-08-24  8:44 ` [PATCH v2 2/3] dm: uclass: use dm_err() for a missing uclass Julien Stephan
2026-08-24  8:44 ` [PATCH v2 3/3] initcall: initcall_evt: display error code on error Julien Stephan
2026-09-03 22:56 ` Tom Rini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260903225622.GA2662603@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=GSS_MTK_Uboot_upstream@mediatek.com \
    --cc=dlechner@baylibre.com \
    --cc=jstephan@baylibre.com \
    --cc=msp@baylibre.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.u-boot-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.