Module Name: src
Committed By: jmcneill
Date: Wed Apr 19 12:58:59 UTC 2017
Modified Files:
src/sys/arch/arm/include: pci_machdep.h
Log Message:
Provide a pci_intr_setattr implementation. For chipset tags that don't
implement pc_intr_setattr, simply return ENODEV.
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/include/pci_machdep.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/include/pci_machdep.h
diff -u src/sys/arch/arm/include/pci_machdep.h:1.11 src/sys/arch/arm/include/pci_machdep.h:1.12
--- src/sys/arch/arm/include/pci_machdep.h:1.11 Sun Apr 16 18:02:50 2017
+++ src/sys/arch/arm/include/pci_machdep.h Wed Apr 19 12:58:59 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.h,v 1.11 2017/04/16 18:02:50 jmcneill Exp $ */
+/* $NetBSD: pci_machdep.h,v 1.12 2017/04/19 12:58:59 jmcneill Exp $ */
/*
* Modified for arm32 by Mark Brinicombe
@@ -37,6 +37,8 @@
* Machine-specific definitions for PCI autoconfiguration.
*/
+#include <sys/errno.h>
+
/*
* Types provided to machine-independent PCI code
*/
@@ -116,4 +118,13 @@ struct arm32_pci_chipset {
#define pci_conf_interrupt(c, b, d, i, s, p) \
(*(c)->pc_conf_interrupt)((c)->pc_conf_v, (b), (d), (i), (s), (p))
+static inline int
+pci_intr_setattr(pci_chipset_tag_t pc, pci_intr_handle_t *ihp,
+ int attr, uint64_t data)
+{
+ if (!pc->pc_intr_setattr)
+ return ENODEV;
+ return pc->pc_intr_setattr(pc, ihp, attr, data);
+}
+
#endif /* _ARM_PCI_MACHDEP_H_ */