Module Name:    src
Committed By:   msaitoh
Date:           Mon Dec  2 03:06:52 UTC 2019

Modified Files:
        src/sys/arch/arm/cortex: gic_v2m.c gicv3_its.c
        src/sys/arch/x86/pci: msipic.c
        src/sys/dev/pci: if_ena.c nvme_pci.c xhci_pci.c
        src/sys/dev/pci/qat: qat.c

Log Message:
 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.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/cortex/gic_v2m.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/cortex/gicv3_its.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/x86/pci/msipic.c
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/pci/if_ena.c
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/pci/nvme_pci.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pci/xhci_pci.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/qat/qat.c

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/cortex/gic_v2m.c
diff -u src/sys/arch/arm/cortex/gic_v2m.c:1.7 src/sys/arch/arm/cortex/gic_v2m.c:1.8
--- src/sys/arch/arm/cortex/gic_v2m.c:1.7	Mon Oct 14 11:00:13 2019
+++ src/sys/arch/arm/cortex/gic_v2m.c	Mon Dec  2 03:06:51 2019
@@ -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 @@ gic_v2m_msix_alloc(struct arm_pci_msi *m
 		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)

Index: src/sys/arch/arm/cortex/gicv3_its.c
diff -u src/sys/arch/arm/cortex/gicv3_its.c:1.21 src/sys/arch/arm/cortex/gicv3_its.c:1.22
--- src/sys/arch/arm/cortex/gicv3_its.c:1.21	Sun Jun 30 17:33:59 2019
+++ src/sys/arch/arm/cortex/gicv3_its.c	Mon Dec  2 03:06:51 2019
@@ -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 @@ gicv3_its_msix_alloc(struct arm_pci_msi 
 		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)

Index: src/sys/arch/x86/pci/msipic.c
diff -u src/sys/arch/x86/pci/msipic.c:1.19 src/sys/arch/x86/pci/msipic.c:1.20
--- src/sys/arch/x86/pci/msipic.c:1.19	Wed Nov 13 02:54:59 2019
+++ src/sys/arch/x86/pci/msipic.c	Mon Dec  2 03:06:51 2019
@@ -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 @@ msipic_construct_msix_pic(const struct p
 
 	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;

Index: src/sys/dev/pci/if_ena.c
diff -u src/sys/dev/pci/if_ena.c:1.18 src/sys/dev/pci/if_ena.c:1.19
--- src/sys/dev/pci/if_ena.c:1.18	Sun Nov 10 21:16:36 2019
+++ src/sys/dev/pci/if_ena.c	Mon Dec  2 03:06:51 2019
@@ -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 @@ ena_allocate_pci_resources(struct pci_at
 		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;
 	}

Index: src/sys/dev/pci/nvme_pci.c
diff -u src/sys/dev/pci/nvme_pci.c:1.26 src/sys/dev/pci/nvme_pci.c:1.27
--- src/sys/dev/pci/nvme_pci.c:1.26	Wed Jan 23 06:56:19 2019
+++ src/sys/dev/pci/nvme_pci.c	Mon Dec  2 03:06:51 2019
@@ -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 @@ nvme_pci_attach(device_t parent, device_
 		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;
 		}

Index: src/sys/dev/pci/xhci_pci.c
diff -u src/sys/dev/pci/xhci_pci.c:1.23 src/sys/dev/pci/xhci_pci.c:1.24
--- src/sys/dev/pci/xhci_pci.c:1.23	Thu Nov 14 09:15:12 2019
+++ src/sys/dev/pci/xhci_pci.c	Mon Dec  2 03:06:51 2019
@@ -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 @@ xhci_pci_attach(device_t parent, device_
 		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;

Index: src/sys/dev/pci/qat/qat.c
diff -u src/sys/dev/pci/qat/qat.c:1.1 src/sys/dev/pci/qat/qat.c:1.2
--- src/sys/dev/pci/qat/qat.c:1.1	Wed Nov 20 09:37:46 2019
+++ src/sys/dev/pci/qat/qat.c	Mon Dec  2 03:06:51 2019
@@ -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 @@ qat_attach(struct device *parent, struct
 		    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;

Reply via email to