Patch "ACPI: resource: acpi_dev_irq_override(): Check DMI match last" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ACPI: resource: acpi_dev_irq_override(): Check DMI match last

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     acpi-resource-acpi_dev_irq_override-check-dmi-match-.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit d6e95dd36cac41eac4a238a2de853f210bac9a45
Author: Hans de Goede <hdegoede@xxxxxxxxxx>
Date:   Sat Dec 28 17:52:53 2024 +0100

    ACPI: resource: acpi_dev_irq_override(): Check DMI match last
    
    [ Upstream commit cd4a7b2e6a2437a5502910c08128ea3bad55a80b ]
    
    acpi_dev_irq_override() gets called approx. 30 times during boot (15 legacy
    IRQs * 2 override_table entries). Of these 30 calls at max 1 will match
    the non DMI checks done by acpi_dev_irq_override(). The dmi_check_system()
    check is by far the most expensive check done by acpi_dev_irq_override(),
    make this call the last check done by acpi_dev_irq_override() so that it
    will be called at max 1 time instead of 30 times.
    
    Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
    Reviewed-by: Mario Limonciello <mario.limonciello@xxxxxxx>
    Link: https://patch.msgid.link/20241228165253.42584-1-hdegoede@xxxxxxxxxx
    [ rjw: Subject edit ]
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
index a41dbd3799ab7..56bbdd2f9a40d 100644
--- a/drivers/acpi/resource.c
+++ b/drivers/acpi/resource.c
@@ -666,11 +666,11 @@ static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,
 	for (i = 0; i < ARRAY_SIZE(override_table); i++) {
 		const struct irq_override_cmp *entry = &override_table[i];
 
-		if (dmi_check_system(entry->system) &&
-		    entry->irq == gsi &&
+		if (entry->irq == gsi &&
 		    entry->triggering == triggering &&
 		    entry->polarity == polarity &&
-		    entry->shareable == shareable)
+		    entry->shareable == shareable &&
+		    dmi_check_system(entry->system))
 			return entry->override;
 	}
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux