From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Linux ACPI <linux-acpi@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Julien <julien82453@gmail.com>,
jarkko@kernel.org, linux-integrity@vger.kernel.org
Subject: Re: [PATCH v3] ACPI: scan: Avoid registering platform devices with resource overlaps
Date: Wed, 19 Aug 2026 15:55:43 +0200 [thread overview]
Message-ID: <12952304.O9o76ZdvQC@rafael.j.wysocki> (raw)
In-Reply-To: <CAJZ5v0i59XtzNTepjb_hh=93E5Cy6pVZmkssKVOoLZL7nvpW0Q@mail.gmail.com>
On Wednesday, August 19, 2026 1:06:50 PM CEST Rafael J. Wysocki (Intel) wrote:
> On Wed, Aug 19, 2026 at 12:18 PM Rafael J. Wysocki (Intel)
> <rafael@kernel.org> wrote:
> >
> > Hi Nathan,
> >
> > On Wed, Aug 19, 2026 at 2:37 AM Nathan Chancellor <nathan@kernel.org> wrote:
> > >
> > > Hi Rafael,
> > >
> > > On Fri, Aug 07, 2026 at 12:22:37PM +0200, Rafael J. Wysocki wrote:
> > > > From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
> > > >
> > > > If acpi_dev_get_resources() returns overlapping I/O or memory resources,
> > > > the subsequent registration of a platform device will fail with -EBUSY
> > > > due to a resource conflict. This is reported to happen on Acer Aspire
> > > > ES1-572 [1].
> > > >
> > > > Avoid that by adjusting resources returned by acpi_dev_get_resources()
> > > > to eliminate partial overlaps between them.
> > > >
> > > > This has not been regarded as necessary before because putting
> > > > overlapping resources into the _CRS of one device is really pointless,
> > > > but now that the issue has been reported to actually happen in the
> > > > field, it needs to be done.
> > > >
> > > > Fixes: ab06eb920401 ("ACPI: scan: Register platform devices for fixed event buttons")
> > > > Reported-by: Julien <julien82453@gmail.com>
> > > > Closes: https://lore.kernel.org/linux-integrity/CAJOGg3z6LJPDsdPNBxajgy8_wQxfhYBRxe4EiurZf3kPU5A5Bw@mail.gmail.com/ [1]
> > > > Cc: All applicable <stable@vger.kernel.org>
> > > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > >
> > > I bisected the following kernel message that I see on one of my aarch64
> > > test machines to this change in -next as commit f234fdaae1ca ("ACPI:
> > > scan: Avoid registering platform devices with resource overlaps"):
> > >
> > > arm-cmn ARMHC600:00: probe with driver arm-cmn failed with error -22
> > >
> > > Is this expected? If not, what information would be helpful for debugging this?
> >
> > No, it is not.
> >
> > First, please send a boot log from the failing machine.
> >
> > Second, I think we may need the acpidump output from it.
>
> So looking at the driver code, it expects to get two resources and it
> is confused when it gets just one, so most likely arm_cmn_get_root()
> fails.
>
> I guess what happens is that originally one of the resources is within
> the other one completely (or the creation of the platform device would
> fail), which is kind of valid, so resource_overlaps() returns true for
> them, and they get merged. This means that
> acpi_platform_adjust_resources() needs to look for partial overlaps
> only.
>
> I'll send a patch to adjust it later today.
And below is one to try.
---
drivers/acpi/acpi_platform.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- a/drivers/acpi/acpi_platform.c
+++ b/drivers/acpi/acpi_platform.c
@@ -85,7 +85,12 @@ static unsigned int acpi_platform_adjust
for (i = 0; i < count; ) {
struct resource *res = &resources[i];
- if (resource_type(new_res) != resource_type(res) ||
+ /*
+ * Look for overlaps of resources of the same type that
+ * would cause resource insertion to fail.
+ */
+ if (__resource_contains_unbound(new_res, res) ||
+ resource_type(new_res) != resource_type(res) ||
!resource_union(new_res, res, new_res)) {
i++;
continue;
next prev parent reply other threads:[~2026-08-19 13:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 10:22 [PATCH v3] ACPI: scan: Avoid registering platform devices with resource overlaps Rafael J. Wysocki
2026-08-07 12:57 ` Paul Menzel
2026-08-07 13:31 ` Rafael J. Wysocki (Intel)
2026-08-08 20:04 ` Andy Shevchenko
2026-08-10 10:41 ` Rafael J. Wysocki (Intel)
2026-08-10 15:35 ` Jarkko Sakkinen
2026-08-12 11:58 ` Rafael J. Wysocki (Intel)
2026-08-19 0:37 ` Nathan Chancellor
2026-08-19 7:46 ` Andy Shevchenko
2026-08-19 10:35 ` Rafael J. Wysocki (Intel)
2026-08-19 13:36 ` Andy Shevchenko
2026-08-19 10:18 ` Rafael J. Wysocki (Intel)
2026-08-19 11:06 ` Rafael J. Wysocki (Intel)
2026-08-19 13:55 ` Rafael J. Wysocki [this message]
2026-08-19 17:31 ` Nathan Chancellor
2026-08-19 19:00 ` Rafael J. Wysocki (Intel)
2026-08-19 19:40 ` Nathan Chancellor
2026-08-19 19:53 ` Rafael J. Wysocki (Intel)
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=12952304.O9o76ZdvQC@rafael.j.wysocki \
--to=rafael@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=jarkko@kernel.org \
--cc=julien82453@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=nathan@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox