git: 5884fab46153 - main - pci: cleanup __PCI_REROUTE_INTERRUPTS

From: Mitchell Horne <mhorne_at_FreeBSD.org>
Date: Thu, 23 Jan 2025 20:31:03 UTC
The branch main has been updated by mhorne:

URL: https://cgit.FreeBSD.org/src/commit/?id=5884fab46153dee52bda660bcabca95c3cc97f44

commit 5884fab46153dee52bda660bcabca95c3cc97f44
Author:     Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2025-01-20 15:51:27 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2025-01-23 20:30:31 +0000

    pci: cleanup __PCI_REROUTE_INTERRUPTS
    
    This flag was used as a transition for differing pcib implementations.
    Today it is defined for all supported architectures, and can be removed.
    
    Reviewed by:    imp, jhb
    Differential Revision:  https://reviews.freebsd.org/D48485
---
 sys/amd64/include/param.h   | 1 -
 sys/arm/include/param.h     | 2 --
 sys/arm64/include/param.h   | 2 --
 sys/dev/pci/pci.c           | 4 ----
 sys/i386/include/param.h    | 1 -
 sys/powerpc/include/param.h | 3 ---
 sys/riscv/include/param.h   | 2 --
 7 files changed, 15 deletions(-)

diff --git a/sys/amd64/include/param.h b/sys/amd64/include/param.h
index 371128c6fe20..86f96ef15832 100644
--- a/sys/amd64/include/param.h
+++ b/sys/amd64/include/param.h
@@ -48,7 +48,6 @@
  */
 
 #define __HAVE_ACPI
-#define __PCI_REROUTE_INTERRUPT
 
 #ifndef MACHINE
 #define	MACHINE		"amd64"
diff --git a/sys/arm/include/param.h b/sys/arm/include/param.h
index 03131ebcb436..14cd32631a5f 100644
--- a/sys/arm/include/param.h
+++ b/sys/arm/include/param.h
@@ -49,8 +49,6 @@
 #define STACKALIGNBYTES	(8 - 1)
 #define STACKALIGN(p)	((u_int)(p) & ~STACKALIGNBYTES)
 
-#define __PCI_REROUTE_INTERRUPT
-
 #ifndef MACHINE
 #define	MACHINE		"arm"
 #endif
diff --git a/sys/arm64/include/param.h b/sys/arm64/include/param.h
index c3f6990db79b..753035b7775e 100644
--- a/sys/arm64/include/param.h
+++ b/sys/arm64/include/param.h
@@ -43,8 +43,6 @@
 #define	STACKALIGNBYTES	(16 - 1)
 #define	STACKALIGN(p)	((uint64_t)(p) & ~STACKALIGNBYTES)
 
-#define	__PCI_REROUTE_INTERRUPT
-
 #ifndef MACHINE
 #define	MACHINE		"arm64"
 #endif
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 0b02d873c5a1..30a95298a114 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -4094,7 +4094,6 @@ pci_add_resources(device_t bus, device_t dev, int force, uint32_t prefetchmask)
 			pci_add_map(bus, dev, q->arg1, rl, force, 0);
 
 	if (cfg->intpin > 0 && PCI_INTERRUPT_VALID(cfg->intline)) {
-#ifdef __PCI_REROUTE_INTERRUPT
 		/*
 		 * Try to re-route interrupts. Sometimes the BIOS or
 		 * firmware may leave bogus values in these registers.
@@ -4102,9 +4101,6 @@ pci_add_resources(device_t bus, device_t dev, int force, uint32_t prefetchmask)
 		 * have.
 		 */
 		pci_assign_interrupt(bus, dev, 1);
-#else
-		pci_assign_interrupt(bus, dev, 0);
-#endif
 	}
 
 	if (pci_usb_takeover && pci_get_class(dev) == PCIC_SERIALBUS &&
diff --git a/sys/i386/include/param.h b/sys/i386/include/param.h
index 79b6eee9db69..177b4d9a168b 100644
--- a/sys/i386/include/param.h
+++ b/sys/i386/include/param.h
@@ -43,7 +43,6 @@
 
 #define __HAVE_ACPI
 #define	__HAVE_PIR
-#define __PCI_REROUTE_INTERRUPT
 
 #ifndef MACHINE
 #define MACHINE		"i386"
diff --git a/sys/powerpc/include/param.h b/sys/powerpc/include/param.h
index b40ada24ad11..e79e92f76ec2 100644
--- a/sys/powerpc/include/param.h
+++ b/sys/powerpc/include/param.h
@@ -46,9 +46,6 @@
 
 #include <machine/_align.h>
 
-/* Needed to display interrupts on OFW PCI */
-#define __PCI_REROUTE_INTERRUPT
-
 #ifndef MACHINE
 #define	MACHINE		"powerpc"
 #endif
diff --git a/sys/riscv/include/param.h b/sys/riscv/include/param.h
index ca9c91f3f981..32b0c7a1e34b 100644
--- a/sys/riscv/include/param.h
+++ b/sys/riscv/include/param.h
@@ -39,8 +39,6 @@
 #define	STACKALIGNBYTES	(16 - 1)
 #define	STACKALIGN(p)	((uint64_t)(p) & ~STACKALIGNBYTES)
 
-#define __PCI_REROUTE_INTERRUPT
-
 #ifndef MACHINE
 #define	MACHINE		"riscv"
 #endif