Mapping the dev/func correctly onto the parent bus enables the correct
GSI to be resolved for certain (eg. PCI express) devices.
---
debian/patches/acpi-init-files.diff | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/debian/patches/acpi-init-files.diff
b/debian/patches/acpi-init-files.diff
index 5ee59dd..f817cba 100644
--- a/debian/patches/acpi-init-files.diff
+++ b/debian/patches/acpi-init-files.diff
@@ -1,8 +1,8 @@
Index: libacpica/acpi_init.c
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ libacpica/acpi_init.c 2025-10-26 13:07:39.753578190 +0000
-@@ -0,0 +1,1041 @@
+--- /dev/null
++++ libacpica/acpi_init.c
+@@ -0,0 +1,1050 @@
+// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
+#include <acpi/acpi.h>
+
@@ -59,6 +59,9 @@ Index: libacpica/acpi_init.c
+ acpi_handle handle;
+ uint8_t up_bus;
+ uint8_t down_bus;
++ /* dev/func is the address of the bridge on its parent bus. */
++ uint16_t dev;
++ uint16_t func;
+ struct acpi_pci_bridge* next;
+} acpi_pci_bridge_t;
+
@@ -760,6 +763,8 @@ Index: libacpica/acpi_init.c
+ /* Translate the downstream INTx to the upstream one */
+ pci_pin = ((pci_pin + dev) % 4);
+ bus = bridge->up_bus;
++ dev = bridge->dev;
++ func = bridge->func;
+ bridge = acpi_find_pci_bridge(bus);
+ }
+
@@ -856,7 +861,9 @@ Index: libacpica/acpi_init.c
+}
+
+static acpi_status
-+acpi_pci_bridge_add(acpi_handle handle, uint8_t up_bus, uint8_t down_bus)
++acpi_pci_bridge_add(acpi_handle handle,
++ uint8_t up_bus, uint8_t down_bus,
++ uint16_t dev, uint16_t func)
+{
+ acpi_pci_bridge_t* bridge =
+ (acpi_pci_bridge_t*)malloc(sizeof(acpi_pci_bridge_t));
@@ -867,6 +874,8 @@ Index: libacpica/acpi_init.c
+ bridge->handle = handle;
+ bridge->up_bus = up_bus;
+ bridge->down_bus = down_bus;
++ bridge->dev = dev;
++ bridge->func = func;
+ bridge->next = acpi_pci_bridges;
+ acpi_pci_bridges = bridge;
+
@@ -948,7 +957,7 @@ Index: libacpica/acpi_init.c
+ device_context->down_bus = (uint8_t)val;
+ device_context->is_bridge = 1;
+
-+ rv = acpi_pci_bridge_add(handle, bus, device_context->down_bus);
++ rv = acpi_pci_bridge_add(handle, bus, device_context->down_bus, dev,
func);
+ }
+ }
+
@@ -1046,8 +1055,8 @@ Index: libacpica/acpi_init.c
+}
Index: libacpica/include/acpi/acpi_init.h
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ libacpica/include/acpi/acpi_init.h 2025-10-26 13:07:13.161934280 +0000
+--- /dev/null
++++ libacpica/include/acpi/acpi_init.h
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
+#ifndef ACPI_INIT_H_
--
2.47.3