Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm Add MSI-X support
details: https://anonhg.NetBSD.org/src/rev/bccbf147bc81
branches: trunk
changeset: 994319:bccbf147bc81
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Wed Oct 31 15:42:36 2018 +0000
description:
Add MSI-X support
diffstat:
sys/arch/arm/acpi/acpi_pci_machdep.c | 13 ++++++++-----
sys/arch/arm/fdt/acpi_fdt.c | 6 +++---
2 files changed, 11 insertions(+), 8 deletions(-)
diffs (69 lines):
diff -r 1bec1ffeb5d5 -r bccbf147bc81 sys/arch/arm/acpi/acpi_pci_machdep.c
--- a/sys/arch/arm/acpi/acpi_pci_machdep.c Wed Oct 31 15:42:17 2018 +0000
+++ b/sys/arch/arm/acpi/acpi_pci_machdep.c Wed Oct 31 15:42:36 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_pci_machdep.c,v 1.4 2018/10/21 11:56:26 jmcneill Exp $ */
+/* $NetBSD: acpi_pci_machdep.c,v 1.5 2018/10/31 15:42:36 jmcneill Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_pci_machdep.c,v 1.4 2018/10/21 11:56:26 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_pci_machdep.c,v 1.5 2018/10/31 15:42:36 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -331,9 +331,12 @@
acpi_pci_md_intr_string(void *v, pci_intr_handle_t ih, char *buf, size_t len)
{
const int irq = __SHIFTOUT(ih, ARM_PCI_INTR_IRQ);
+ const int vec = __SHIFTOUT(ih, ARM_PCI_INTR_MSI_VEC);
- if (ih & ARM_PCI_INTR_MSI)
- snprintf(buf, len, "irq %d (MSI)", irq);
+ if (ih & ARM_PCI_INTR_MSIX)
+ snprintf(buf, len, "irq %d (MSI-X vec %d)", irq, vec);
+ else if (ih & ARM_PCI_INTR_MSI)
+ snprintf(buf, len, "irq %d (MSI vec %d)", irq, vec);
else
snprintf(buf, len, "irq %d", irq);
@@ -367,7 +370,7 @@
{
struct acpi_pci_context * const ap = v;
- if (ih & ARM_PCI_INTR_MSI)
+ if ((ih & (ARM_PCI_INTR_MSI | ARM_PCI_INTR_MSIX)) != 0)
return arm_pci_msi_intr_establish(&ap->ap_pc, ih, ipl, callback, arg);
const int irq = (int)__SHIFTOUT(ih, ARM_PCI_INTR_IRQ);
diff -r 1bec1ffeb5d5 -r bccbf147bc81 sys/arch/arm/fdt/acpi_fdt.c
--- a/sys/arch/arm/fdt/acpi_fdt.c Wed Oct 31 15:42:17 2018 +0000
+++ b/sys/arch/arm/fdt/acpi_fdt.c Wed Oct 31 15:42:36 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_fdt.c,v 1.7 2018/10/28 10:21:42 jmcneill Exp $ */
+/* $NetBSD: acpi_fdt.c,v 1.8 2018/10/31 15:42:54 jmcneill Exp $ */
/*-
* Copyright (c) 2015-2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
#include "opt_efi.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_fdt.c,v 1.7 2018/10/28 10:21:42 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_fdt.c,v 1.8 2018/10/31 15:42:54 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -127,7 +127,7 @@
PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY |
PCI_FLAGS_MWI_OKAY;
#ifdef __HAVE_PCI_MSI_MSIX
- aa.aa_pciflags |= PCI_FLAGS_MSI_OKAY;
+ aa.aa_pciflags |= PCI_FLAGS_MSI_OKAY | PCI_FLAGS_MSIX_OKAY;
#endif
aa.aa_ic = 0;
aa.aa_dmat = faa->faa_dmat;
Home |
Main Index |
Thread Index |
Old Index