ACPI support fixes for for 7.0-rc5

- Update the format of the last argument of _DSM to avoid printing
    confusing error messages in some cases (Saket Dumbre)
 
  - Fix MFD child automatic modprobe issue by removing a stale check
    from acpi_companion_match() (Pratap Nirujogi)
 
  - Prevent possible use-after-free in acpi_processor_errata_piix4()
    from occurring by rearranging the code to print debug messages
    while holding references to relevant device objects (Rafael Wysocki)
 -----BEGIN PGP SIGNATURE-----
 
 iQFGBAABCAAwFiEEcM8Aw/RY0dgsiRUR7l+9nS/U47UFAmm8A5MSHHJqd0Byand5
 c29ja2kubmV0AAoJEO5fvZ0v1OO1QB0H/0aPqLjjyAUvVKjko7mODZvqbodXSFBo
 fTPxqPov5e/m3Tkg2U4t1w1kyQU1Tw9uNaSTQZY0wGNgay31AfGAuiIQaAHQG3BM
 LGuSnfptYPAqtKvf6Pl/XOL67n0dAM2zTmibkXrvKQui+hyQKCu5O4gKgmGm3cD7
 ecJXLYES/01YPZyj90ywImTU3Dt4APZ1VD2wPbMFAarcjKiwytAdYDL+5eluKji/
 /pDhcRb53Zo0ToKLdyIwq6Djeyt2wyaf1Xspujmw+gcWVTMpL4o2T1sCIerR79gz
 0SEqs9Hi0yRIVDCN1bmcd6RJPyhEykjB5dGQyq9Nzra8DLPBuKsN2Rg=
 =y/dR
 -----END PGP SIGNATURE-----

Merge tag 'acpi-7.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI support fixes from Rafael Wysocki:
 "These fix an MFD child automatic modprobe issue introduced recently,
  an ACPI processor driver issue introduced by a previous fix and an
  ACPICA issue causing confusing messages regarding _DSM arguments to be
  printed:

   - Update the format of the last argument of _DSM to avoid printing
     confusing error messages in some cases (Saket Dumbre)

   - Fix MFD child automatic modprobe issue by removing a stale check
     from acpi_companion_match() (Pratap Nirujogi)

   - Prevent possible use-after-free in acpi_processor_errata_piix4()
     from occurring by rearranging the code to print debug messages
     while holding references to relevant device objects (Rafael
     Wysocki)"

* tag 'acpi-7.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: bus: Fix MFD child automatic modprobe issue
  ACPI: processor: Fix previous acpi_processor_errata_piix4() fix
  ACPICA: Update the format of Arg3 of _DSM
This commit is contained in:
Linus Torvalds 2026-03-19 08:42:59 -07:00
commit d107dc8c9c
3 changed files with 9 additions and 11 deletions

View File

@ -113,6 +113,10 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev)
PCI_ANY_ID, PCI_ANY_ID, NULL);
if (ide_dev) {
errata.piix4.bmisx = pci_resource_start(ide_dev, 4);
if (errata.piix4.bmisx)
dev_dbg(&ide_dev->dev,
"Bus master activity detection (BM-IDE) erratum enabled\n");
pci_dev_put(ide_dev);
}
@ -131,20 +135,17 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev)
if (isa_dev) {
pci_read_config_byte(isa_dev, 0x76, &value1);
pci_read_config_byte(isa_dev, 0x77, &value2);
if ((value1 & 0x80) || (value2 & 0x80))
if ((value1 & 0x80) || (value2 & 0x80)) {
errata.piix4.fdma = 1;
dev_dbg(&isa_dev->dev,
"Type-F DMA livelock erratum (C3 disabled)\n");
}
pci_dev_put(isa_dev);
}
break;
}
if (ide_dev)
dev_dbg(&ide_dev->dev, "Bus master activity detection (BM-IDE) erratum enabled\n");
if (isa_dev)
dev_dbg(&isa_dev->dev, "Type-F DMA livelock erratum (C3 disabled)\n");
return 0;
}

View File

@ -451,7 +451,7 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = {
{{"_DSM",
METHOD_4ARGS(ACPI_TYPE_BUFFER, ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER,
ACPI_TYPE_ANY | ACPI_TYPE_PACKAGE) |
ACPI_TYPE_PACKAGE | ACPI_TYPE_ANY) |
ARG_COUNT_IS_MINIMUM,
METHOD_RETURNS(ACPI_RTYPE_ALL)}}, /* Must return a value, but it can be of any type */

View File

@ -818,9 +818,6 @@ const struct acpi_device *acpi_companion_match(const struct device *dev)
if (list_empty(&adev->pnp.ids))
return NULL;
if (adev->pnp.type.backlight)
return adev;
return acpi_primary_dev_companion(adev, dev);
}