Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm2 Namespace our private fields in Linux ...



details:   https://anonhg.NetBSD.org/src/rev/4f0669df324c
branches:  trunk
changeset: 834948:4f0669df324c
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 07:03:02 2018 +0000

description:
Namespace our private fields in Linux struct pci_device.

diffstat:

 sys/external/bsd/drm2/include/linux/pci.h |  14 ++++++++------
 sys/external/bsd/drm2/pci/drm_pci.c       |  10 +++++-----
 2 files changed, 13 insertions(+), 11 deletions(-)

diffs (87 lines):

diff -r e4798d2027d2 -r 4f0669df324c sys/external/bsd/drm2/include/linux/pci.h
--- a/sys/external/bsd/drm2/include/linux/pci.h Mon Aug 27 07:02:51 2018 +0000
+++ b/sys/external/bsd/drm2/include/linux/pci.h Mon Aug 27 07:03:02 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci.h,v 1.26 2018/08/27 06:40:43 riastradh Exp $       */
+/*     $NetBSD: pci.h,v 1.27 2018/08/27 07:03:02 riastradh Exp $       */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -148,6 +148,9 @@
        }                       pd_resources[PCI_NUM_RESOURCES];
        struct pci_conf_state   *pd_saved_state;
        struct acpi_devnode     *pd_ad;
+       pci_intr_handle_t       *pd_intr_handles;
+
+       /* Linx API only below */
        struct pci_bus          *bus;
        uint32_t                devfn;
        uint16_t                vendor;
@@ -157,7 +160,6 @@
        uint8_t                 revision;
        uint32_t                class;
        bool                    msi_enabled;
-       pci_intr_handle_t       *intr_handles;
 };
 
 static inline device_t
@@ -298,7 +300,7 @@
 #ifdef notyet
        const struct pci_attach_args *const pa = &pdev->pd_pa;
 
-       if (pci_msi_alloc_exact(pa, &pdev->intr_handles, 1))
+       if (pci_msi_alloc_exact(pa, &pdev->pd_intr_handles, 1))
                return -EINVAL;
 
        pdev->msi_enabled = 1;
@@ -313,9 +315,9 @@
 {
        const struct pci_attach_args *const pa = &pdev->pd_pa;
 
-       if (pdev->intr_handles != NULL) {
-               pci_intr_release(pa->pa_pc, pdev->intr_handles, 1);
-               pdev->intr_handles = NULL;
+       if (pdev->pd_intr_handles != NULL) {
+               pci_intr_release(pa->pa_pc, pdev->pd_intr_handles, 1);
+               pdev->pd_intr_handles = NULL;
        }
        pdev->msi_enabled = 0;
 }
diff -r e4798d2027d2 -r 4f0669df324c sys/external/bsd/drm2/pci/drm_pci.c
--- a/sys/external/bsd/drm2/pci/drm_pci.c       Mon Aug 27 07:02:51 2018 +0000
+++ b/sys/external/bsd/drm2/pci/drm_pci.c       Mon Aug 27 07:03:02 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_pci.c,v 1.20 2018/08/27 06:44:15 riastradh Exp $   */
+/*     $NetBSD: drm_pci.c,v 1.21 2018/08/27 07:03:02 riastradh Exp $   */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.20 2018/08/27 06:44:15 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.21 2018/08/27 07:03:02 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/errno.h>
@@ -242,7 +242,7 @@
        irq_cookie = kmem_alloc(sizeof(*irq_cookie), KM_SLEEP);
 
        if (dev->pdev->msi_enabled) {
-               if (dev->pdev->intr_handles == NULL) {
+               if (dev->pdev->pd_intr_handles == NULL) {
                        if (pci_msi_alloc_exact(pa, &irq_cookie->intr_handles,
                            1)) {
                                aprint_error_dev(dev->dev,
@@ -250,8 +250,8 @@
                                goto error;
                        }
                } else {
-                       irq_cookie->intr_handles = dev->pdev->intr_handles;
-                       dev->pdev->intr_handles = NULL;
+                       irq_cookie->intr_handles = dev->pdev->pd_intr_handles;
+                       dev->pdev->pd_intr_handles = NULL;
                }
        } else {
                if (pci_intx_alloc(pa, &irq_cookie->intr_handles)) {



Home | Main Index | Thread Index | Old Index