Skip to content

Commit d107dc8

Browse files
committed
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
2 parents 1863b40 + 5cbcd6c commit d107dc8

3 files changed

Lines changed: 9 additions & 11 deletions

File tree

drivers/acpi/acpi_processor.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev)
113113
PCI_ANY_ID, PCI_ANY_ID, NULL);
114114
if (ide_dev) {
115115
errata.piix4.bmisx = pci_resource_start(ide_dev, 4);
116+
if (errata.piix4.bmisx)
117+
dev_dbg(&ide_dev->dev,
118+
"Bus master activity detection (BM-IDE) erratum enabled\n");
119+
116120
pci_dev_put(ide_dev);
117121
}
118122

@@ -131,20 +135,17 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev)
131135
if (isa_dev) {
132136
pci_read_config_byte(isa_dev, 0x76, &value1);
133137
pci_read_config_byte(isa_dev, 0x77, &value2);
134-
if ((value1 & 0x80) || (value2 & 0x80))
138+
if ((value1 & 0x80) || (value2 & 0x80)) {
135139
errata.piix4.fdma = 1;
140+
dev_dbg(&isa_dev->dev,
141+
"Type-F DMA livelock erratum (C3 disabled)\n");
142+
}
136143
pci_dev_put(isa_dev);
137144
}
138145

139146
break;
140147
}
141148

142-
if (ide_dev)
143-
dev_dbg(&ide_dev->dev, "Bus master activity detection (BM-IDE) erratum enabled\n");
144-
145-
if (isa_dev)
146-
dev_dbg(&isa_dev->dev, "Type-F DMA livelock erratum (C3 disabled)\n");
147-
148149
return 0;
149150
}
150151

drivers/acpi/acpica/acpredef.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = {
451451

452452
{{"_DSM",
453453
METHOD_4ARGS(ACPI_TYPE_BUFFER, ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER,
454-
ACPI_TYPE_ANY | ACPI_TYPE_PACKAGE) |
454+
ACPI_TYPE_PACKAGE | ACPI_TYPE_ANY) |
455455
ARG_COUNT_IS_MINIMUM,
456456
METHOD_RETURNS(ACPI_RTYPE_ALL)}}, /* Must return a value, but it can be of any type */
457457

drivers/acpi/bus.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -818,9 +818,6 @@ const struct acpi_device *acpi_companion_match(const struct device *dev)
818818
if (list_empty(&adev->pnp.ids))
819819
return NULL;
820820

821-
if (adev->pnp.type.backlight)
822-
return adev;
823-
824821
return acpi_primary_dev_companion(adev, dev);
825822
}
826823

0 commit comments

Comments
 (0)