Re: [PATCH] ACPI: acpi_dev_irq_override(): Check DMI match last

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

 



On 12/28/2024 10:52, Hans de Goede wrote:
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>

---
  drivers/acpi/resource.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
index ab4c0e0b6b8e..7d6537ea176f 100644
--- a/drivers/acpi/resource.c
+++ b/drivers/acpi/resource.c
@@ -678,11 +678,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;
  	}





[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux