Re: [PATCH v2] reset: Remove ARCH_HAS_RESET_CONTROLLER Kconfig symbol

From: Andrew Davis

Date: Tue Dec 01 2026 - 13:01:30 EST


On 12/1/26 9:22 AM, Philipp Zabel wrote:
On Fr, 2026-11-20 at 11:47 -0600, Andrew Davis wrote:
Many ARCH_HAS_* symbols change some behavior based on what an ARCH
supports, but ARCH_HAS_RESET_CONTROLLER is used only to set a default
for RESET_CONTROLLER. Those ARCH symbols that select this can skip the
middleman and directly select RESET_CONTROLLER, and many already do.

Replace all selection of this symbol with a direct selection of
RESET_CONTROLLER when it is not already in the selection list.

This part is what makes the "minimal builds without reset support"
(mentioned further below) impossible on those ARCHes. I'm not sure if
that is an issue for anyone or not.

When
RESET_CONTROLLER is also already selected we can simply remove the
ARCH_HAS_RESET_CONTROLLER without changing existing behavior.

Ack.

Some ARCHs "select" this symbol when they actually "depend on" the
RESET_CONTROLLER framework to build, in those cases the indirect select
could lead to broken randconfig builds.

How so?

RESET_CONTROLLER is boolean and has no dependencies, so selecting it
instead of depending on it should not make any difference.


Correct, "depending on" or "selecting" RESET_CONTROLLER makes no
difference in this case, but that isn't what these platforms did before
this patch. They selected ARCH_HAS_RESET_CONTROLLER (which is what DT
should tell us, not kconfig), which only made RESET_CONTROLLER "default y",
allowing it to still be deselected by randconfig. In the case where the
platform code actually did depend on RESET_CONTROLLER this "default y" was
not strong enough to prevent bad configs. "Select" is.

We still now need to go back and find which platforms really depended on
it, and which only "wanted" it (which should not be described in kconfig
IMHO, users want features, not platforms). This patch only takes the safe
first step and makes platforms select it directly.

In cases when it is not needed
for building the ARCH code, these selections can be removed to allow for
minimal builds without reset support.

"... again."


Fair, as you pointed out above, this does lock some of these platforms
into including the RESET_CONTROLLER framework, when before it could have
been disabled manually if one desired. I'll go and individually relax this
for platforms that don't strictly need it next. If we wanted exact behavior
as before, then we could have switched to "imply RESET_CONTROLLER", but
Arnd pushed back at even the suggestion of using "imply" in v1.

Andrew


regards
Philipp