Source-Changes-HG archive

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

[src/trunk]: src/sys Use PCI_MSIX_"TBL"BIR_MASK instead of PCI_MSIX_"PBA"BIR_...



details:   https://anonhg.NetBSD.org/src/rev/b22b50d6d291
branches:  trunk
changeset: 846817:b22b50d6d291
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon Dec 02 03:06:51 2019 +0000

description:
Use PCI_MSIX_"TBL"BIR_MASK instead of PCI_MSIX_"PBA"BIR_MASK for MSI-X table.
This is not a real bug because both macros have the same value.

diffstat:

 sys/arch/arm/cortex/gic_v2m.c   |  6 +++---
 sys/arch/arm/cortex/gicv3_its.c |  6 +++---
 sys/arch/x86/pci/msipic.c       |  6 +++---
 sys/dev/pci/if_ena.c            |  4 ++--
 sys/dev/pci/nvme_pci.c          |  6 +++---
 sys/dev/pci/qat/qat.c           |  6 +++---
 sys/dev/pci/xhci_pci.c          |  6 +++---
 7 files changed, 20 insertions(+), 20 deletions(-)

diffs (183 lines):

diff -r bfb88872518d -r b22b50d6d291 sys/arch/arm/cortex/gic_v2m.c
--- a/sys/arch/arm/cortex/gic_v2m.c     Mon Dec 02 01:38:54 2019 +0000
+++ b/sys/arch/arm/cortex/gic_v2m.c     Mon Dec 02 03:06:51 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gic_v2m.c,v 1.7 2019/10/14 11:00:13 jmcneill Exp $ */
+/* $NetBSD: gic_v2m.c,v 1.8 2019/12/02 03:06:51 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #define _INTR_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gic_v2m.c,v 1.7 2019/10/14 11:00:13 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gic_v2m.c,v 1.8 2019/12/02 03:06:51 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/kmem.h>
@@ -280,7 +280,7 @@
                return NULL;
 
        tbl = pci_conf_read(pa->pa_pc, pa->pa_tag, off + PCI_MSIX_TBLOFFSET);
-       bar = PCI_BAR0 + (4 * (tbl & PCI_MSIX_PBABIR_MASK));
+       bar = PCI_BAR0 + (4 * (tbl & PCI_MSIX_TBLBIR_MASK));
        table_offset = tbl & PCI_MSIX_TBLOFFSET_MASK;
        table_size = pci_msix_count(pa->pa_pc, pa->pa_tag) * PCI_MSIX_TABLE_ENTRY_SIZE;
        if (table_size == 0)
diff -r bfb88872518d -r b22b50d6d291 sys/arch/arm/cortex/gicv3_its.c
--- a/sys/arch/arm/cortex/gicv3_its.c   Mon Dec 02 01:38:54 2019 +0000
+++ b/sys/arch/arm/cortex/gicv3_its.c   Mon Dec 02 03:06:51 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gicv3_its.c,v 1.21 2019/06/30 17:33:59 jmcneill Exp $ */
+/* $NetBSD: gicv3_its.c,v 1.22 2019/12/02 03:06:51 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #define _INTR_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gicv3_its.c,v 1.21 2019/06/30 17:33:59 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gicv3_its.c,v 1.22 2019/12/02 03:06:51 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/kmem.h>
@@ -525,7 +525,7 @@
                return NULL;
 
        tbl = pci_conf_read(pa->pa_pc, pa->pa_tag, off + PCI_MSIX_TBLOFFSET);
-       bar = PCI_BAR0 + (4 * (tbl & PCI_MSIX_PBABIR_MASK));
+       bar = PCI_BAR0 + (4 * (tbl & PCI_MSIX_TBLBIR_MASK));
        table_offset = tbl & PCI_MSIX_TBLOFFSET_MASK;
        table_size = pci_msix_count(pa->pa_pc, pa->pa_tag) * PCI_MSIX_TABLE_ENTRY_SIZE;
        if (table_size == 0)
diff -r bfb88872518d -r b22b50d6d291 sys/arch/x86/pci/msipic.c
--- a/sys/arch/x86/pci/msipic.c Mon Dec 02 01:38:54 2019 +0000
+++ b/sys/arch/x86/pci/msipic.c Mon Dec 02 03:06:51 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msipic.c,v 1.19 2019/11/13 02:54:59 hikaru Exp $       */
+/*     $NetBSD: msipic.c,v 1.20 2019/12/02 03:06:51 msaitoh Exp $      */
 
 /*
  * Copyright (c) 2015 Internet Initiative Japan Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msipic.c,v 1.19 2019/11/13 02:54:59 hikaru Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msipic.c,v 1.20 2019/12/02 03:06:51 msaitoh Exp $");
 
 #include "opt_intrdebug.h"
 
@@ -659,7 +659,7 @@
 
        tbl = pci_conf_read(pc, tag, off + PCI_MSIX_TBLOFFSET);
        table_offset = tbl & PCI_MSIX_TBLOFFSET_MASK;
-       bir = tbl & PCI_MSIX_PBABIR_MASK;
+       bir = tbl & PCI_MSIX_TBLBIR_MASK;
        switch (bir) {
        case 0:
                bar = PCI_BAR0;
diff -r bfb88872518d -r b22b50d6d291 sys/dev/pci/if_ena.c
--- a/sys/dev/pci/if_ena.c      Mon Dec 02 01:38:54 2019 +0000
+++ b/sys/dev/pci/if_ena.c      Mon Dec 02 03:06:51 2019 +0000
@@ -31,7 +31,7 @@
 #if 0
 __FBSDID("$FreeBSD: head/sys/dev/ena/ena.c 333456 2018-05-10 09:37:54Z mw $");
 #endif
-__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.18 2019/11/10 21:16:36 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.19 2019/12/02 03:06:51 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -314,7 +314,7 @@
                msixtbl = pci_conf_read(pa->pa_pc, pa->pa_tag,
                    msixoff + PCI_MSIX_TBLOFFSET);
                table_offset = msixtbl & PCI_MSIX_TBLOFFSET_MASK;
-               bir = msixtbl & PCI_MSIX_PBABIR_MASK;
+               bir = msixtbl & PCI_MSIX_TBLBIR_MASK;
                if (bir == PCI_MAPREG_NUM(ENA_REG_BAR))
                        mapsize = table_offset;
        }
diff -r bfb88872518d -r b22b50d6d291 sys/dev/pci/nvme_pci.c
--- a/sys/dev/pci/nvme_pci.c    Mon Dec 02 01:38:54 2019 +0000
+++ b/sys/dev/pci/nvme_pci.c    Mon Dec 02 03:06:51 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nvme_pci.c,v 1.26 2019/01/23 06:56:19 msaitoh Exp $    */
+/*     $NetBSD: nvme_pci.c,v 1.27 2019/12/02 03:06:51 msaitoh Exp $    */
 /*     $OpenBSD: nvme_pci.c,v 1.3 2016/04/14 11:18:32 dlg Exp $ */
 
 /*
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvme_pci.c,v 1.26 2019/01/23 06:56:19 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme_pci.c,v 1.27 2019/12/02 03:06:51 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -195,7 +195,7 @@
                msixtbl = pci_conf_read(pa->pa_pc, pa->pa_tag,
                    msixoff + PCI_MSIX_TBLOFFSET);
                table_offset = msixtbl & PCI_MSIX_TBLOFFSET_MASK;
-               bir = msixtbl & PCI_MSIX_PBABIR_MASK;
+               bir = msixtbl & PCI_MSIX_TBLBIR_MASK;
                if (bir == PCI_MAPREG_NUM(NVME_PCI_BAR)) {
                        sc->sc_ios = table_offset;
                }
diff -r bfb88872518d -r b22b50d6d291 sys/dev/pci/qat/qat.c
--- a/sys/dev/pci/qat/qat.c     Mon Dec 02 01:38:54 2019 +0000
+++ b/sys/dev/pci/qat/qat.c     Mon Dec 02 03:06:51 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: qat.c,v 1.1 2019/11/20 09:37:46 hikaru Exp $   */
+/*     $NetBSD: qat.c,v 1.2 2019/12/02 03:06:51 msaitoh Exp $  */
 
 /*
  * Copyright (c) 2019 Internet Initiative Japan, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: qat.c,v 1.1 2019/11/20 09:37:46 hikaru Exp $");
+__KERNEL_RCSID(0, "$NetBSD: qat.c,v 1.2 2019/12/02 03:06:51 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -468,7 +468,7 @@
                    msixoff + PCI_MSIX_TBLOFFSET);
                msixtbl_offset = msixtbl & PCI_MSIX_TBLOFFSET_MASK;
                msixtbl_bar = PCI_MAPREG_START +
-                   ((msixtbl & PCI_MSIX_PBABIR_MASK) << 2);
+                   ((msixtbl & PCI_MSIX_TBLBIR_MASK) << 2);
        }
 
        i = 0;
diff -r bfb88872518d -r b22b50d6d291 sys/dev/pci/xhci_pci.c
--- a/sys/dev/pci/xhci_pci.c    Mon Dec 02 01:38:54 2019 +0000
+++ b/sys/dev/pci/xhci_pci.c    Mon Dec 02 03:06:51 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xhci_pci.c,v 1.23 2019/11/14 09:15:12 msaitoh Exp $    */
+/*     $NetBSD: xhci_pci.c,v 1.24 2019/12/02 03:06:51 msaitoh Exp $    */
 /*     OpenBSD: xhci_pci.c,v 1.4 2014/07/12 17:38:51 yuo Exp   */
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.23 2019/11/14 09:15:12 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.24 2019/12/02 03:06:51 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_xhci_pci.h"
@@ -176,7 +176,7 @@
                msixtbl = pci_conf_read(pa->pa_pc, pa->pa_tag,
                    msixoff + PCI_MSIX_TBLOFFSET);
                table_offset = msixtbl & PCI_MSIX_TBLOFFSET_MASK;
-               bir = msixtbl & PCI_MSIX_PBABIR_MASK;
+               bir = msixtbl & PCI_MSIX_TBLBIR_MASK;
                /* Shrink map area for MSI-X table */
                if (bir == PCI_MAPREG_NUM(PCI_CBMEM))
                        sc->sc_ios = table_offset;



Home | Main Index | Thread Index | Old Index