ACPI: scan: Avoid registering platform devices with resource overlaps

Lenovo 80XH (rhbz#2514390): /dev/tpm0 gone on every 7.1.x, fine on 7.0.14. Through 7.0 tpm_crb was an ACPI driver and bound to the acpi_device directly; 48fe2cdd ("tpm_crb: Convert ACPI driver to a platform one", v7.1) made it depend on a platform device, and on this machine that registration fails on a resource conflict, so no driver ever probes:

platform MSFT0101:00: failed to claim resource 1: [mem 0xfed40000-0xfed40fff] acpi MSFT0101:00: platform device creation failed: -16

Same failure signature (down to the "Bad ACPI memory layout" note on the working kernel) as the Acer Aspire ES1-572 regression report upstream, which Rafael fixed in v7.3-rc1 with f234fdaa ("ACPI: scan: Avoid registering platform devices with resource overlaps", Cc: stable, Fixes: 48fe2cdd) plus the follow-up 7617cc05 ("ACPI: scan: Do not combine resources that overlap completely") that repairs the arm-cmn breakage the first one introduced. Both cherry-pick cleanly onto fedora-7.1 (drivers/acpi/acpi_platform.c only); compile-tested. They reach 7.1.y via stable once Greg queues the rc1 fixes (not queued as of today); taking them together here also avoids ever shipping the first without the second.

bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2514390 upstream report: https://lore.kernel.org/linux-integrity/CAJOGg3z6LJPDsdPNBxajgy8_wQxfhYBRxe4EiurZf3kPU5A5Bw@mail.gmail.com/

Signed-off-by: Junjie Cao junjie.cao@intel.com

Edited by Junjie Cao

Merge request reports

Loading
Loading