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 Pass the parent explicitly to linux_pc...



details:   https://anonhg.NetBSD.org/src/rev/835c57220473
branches:  trunk
changeset: 366240:835c57220473
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 14:11:46 2018 +0000

description:
Pass the parent explicitly to linux_pci_dev_init.

This will allow us to use it in match routines.

diffstat:

 sys/external/bsd/drm2/amdgpu/amdgpu_pci.c   |   6 +++---
 sys/external/bsd/drm2/i915drm/i915_pci.c    |   6 +++---
 sys/external/bsd/drm2/include/linux/pci.h   |  10 +++++-----
 sys/external/bsd/drm2/nouveau/nouveau_pci.c |   6 +++---
 sys/external/bsd/drm2/radeon/radeon_pci.c   |   6 +++---
 5 files changed, 17 insertions(+), 17 deletions(-)

diffs (153 lines):

diff -r 2aba818844ec -r 835c57220473 sys/external/bsd/drm2/amdgpu/amdgpu_pci.c
--- a/sys/external/bsd/drm2/amdgpu/amdgpu_pci.c Mon Aug 27 14:11:21 2018 +0000
+++ b/sys/external/bsd/drm2/amdgpu/amdgpu_pci.c Mon Aug 27 14:11:46 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amdgpu_pci.c,v 1.2 2018/08/27 14:11:21 riastradh Exp $ */
+/*     $NetBSD: amdgpu_pci.c,v 1.3 2018/08/27 14:11:46 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_pci.c,v 1.2 2018/08/27 14:11:21 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_pci.c,v 1.3 2018/08/27 14:11:46 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/queue.h>
@@ -157,7 +157,7 @@
        SIMPLEQ_INIT(&sc->sc_task_u.attach);
 
        /* Initialize the Linux PCI device descriptor.  */
-       linux_pci_dev_init(&sc->sc_pci_dev, self, pa, 0);
+       linux_pci_dev_init(&sc->sc_pci_dev, self, device_parent(self), pa, 0);
 
        /* XXX errno Linux->NetBSD */
        error = -drm_pci_attach(self, pa, &sc->sc_pci_dev, amdgpu_drm_driver,
diff -r 2aba818844ec -r 835c57220473 sys/external/bsd/drm2/i915drm/i915_pci.c
--- a/sys/external/bsd/drm2/i915drm/i915_pci.c  Mon Aug 27 14:11:21 2018 +0000
+++ b/sys/external/bsd/drm2/i915drm/i915_pci.c  Mon Aug 27 14:11:46 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_pci.c,v 1.18 2018/08/27 14:11:21 riastradh Exp $  */
+/*     $NetBSD: i915_pci.c,v 1.19 2018/08/27 14:11:46 riastradh Exp $  */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_pci.c,v 1.18 2018/08/27 14:11:21 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_pci.c,v 1.19 2018/08/27 14:11:46 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/queue.h>
@@ -175,7 +175,7 @@
        SIMPLEQ_INIT(&sc->sc_task_u.attach);
 
        /* Initialize the Linux PCI device descriptor.  */
-       linux_pci_dev_init(&sc->sc_pci_dev, self, pa, 0);
+       linux_pci_dev_init(&sc->sc_pci_dev, self, device_parent(self), pa, 0);
 
        /* XXX errno Linux->NetBSD */
        error = -drm_pci_attach(self, pa, &sc->sc_pci_dev, i915_drm_driver,
diff -r 2aba818844ec -r 835c57220473 sys/external/bsd/drm2/include/linux/pci.h
--- a/sys/external/bsd/drm2/include/linux/pci.h Mon Aug 27 14:11:21 2018 +0000
+++ b/sys/external/bsd/drm2/include/linux/pci.h Mon Aug 27 14:11:46 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci.h,v 1.32 2018/08/27 13:39:33 riastradh Exp $       */
+/*     $NetBSD: pci.h,v 1.33 2018/08/27 14:11:46 riastradh Exp $       */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -185,7 +185,7 @@
 }
 
 static inline void
-linux_pci_dev_init(struct pci_dev *pdev, device_t dev,
+linux_pci_dev_init(struct pci_dev *pdev, device_t dev, device_t parent,
     const struct pci_attach_args *pa, int kludges)
 {
        const uint32_t subsystem_id = pci_conf_read(pa->pa_pc, pa->pa_tag,
@@ -204,7 +204,7 @@
 #endif
        pdev->bus = kmem_zalloc(sizeof(struct pci_bus), KM_NOSLEEP);
        pdev->bus->pb_pc = pa->pa_pc;
-       pdev->bus->pb_dev = dev == NULL ? NULL : device_parent(dev);
+       pdev->bus->pb_dev = parent;
        pdev->bus->number = pa->pa_bus;
        pdev->devfn = PCI_DEVFN(pa->pa_device, pa->pa_function);
        pdev->vendor = PCI_VENDOR(pa->pa_id);
@@ -500,7 +500,7 @@
                return NULL;
 
        struct pci_dev *const pdev = kmem_zalloc(sizeof(*pdev), KM_SLEEP);
-       linux_pci_dev_init(pdev, NULL, &pa, NBPCI_KLUDGE_GET_MUMBLE);
+       linux_pci_dev_init(pdev, NULL, NULL, &pa, NBPCI_KLUDGE_GET_MUMBLE);
 
        return pdev;
 }
@@ -545,7 +545,7 @@
                return NULL;
 
        struct pci_dev *const pdev = kmem_zalloc(sizeof(*pdev), KM_SLEEP);
-       linux_pci_dev_init(pdev, NULL, &pa, NBPCI_KLUDGE_GET_MUMBLE);
+       linux_pci_dev_init(pdev, NULL, NULL, &pa, NBPCI_KLUDGE_GET_MUMBLE);
 
        return pdev;
 }
diff -r 2aba818844ec -r 835c57220473 sys/external/bsd/drm2/nouveau/nouveau_pci.c
--- a/sys/external/bsd/drm2/nouveau/nouveau_pci.c       Mon Aug 27 14:11:21 2018 +0000
+++ b/sys/external/bsd/drm2/nouveau/nouveau_pci.c       Mon Aug 27 14:11:46 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nouveau_pci.c,v 1.16 2018/08/27 14:11:21 riastradh Exp $       */
+/*     $NetBSD: nouveau_pci.c,v 1.17 2018/08/27 14:11:46 riastradh Exp $       */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.16 2018/08/27 14:11:21 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.17 2018/08/27 14:11:46 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/device.h>
@@ -140,7 +140,7 @@
        sc->sc_dev = self;
 
        /* Initialize the Linux PCI device descriptor.  */
-       linux_pci_dev_init(&sc->sc_pci_dev, self, pa, 0);
+       linux_pci_dev_init(&sc->sc_pci_dev, self, device_parent(self), pa, 0);
 
        if (!pmf_device_register(self, &nouveau_pci_suspend,
                &nouveau_pci_resume))
diff -r 2aba818844ec -r 835c57220473 sys/external/bsd/drm2/radeon/radeon_pci.c
--- a/sys/external/bsd/drm2/radeon/radeon_pci.c Mon Aug 27 14:11:21 2018 +0000
+++ b/sys/external/bsd/drm2/radeon/radeon_pci.c Mon Aug 27 14:11:46 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeon_pci.c,v 1.11 2018/08/27 14:11:22 riastradh Exp $        */
+/*     $NetBSD: radeon_pci.c,v 1.12 2018/08/27 14:11:46 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.11 2018/08/27 14:11:22 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.12 2018/08/27 14:11:46 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "vga.h"
@@ -229,7 +229,7 @@
        SIMPLEQ_INIT(&sc->sc_task_u.attach);
 
        /* Initialize the Linux PCI device descriptor.  */
-       linux_pci_dev_init(&sc->sc_pci_dev, self, pa, 0);
+       linux_pci_dev_init(&sc->sc_pci_dev, self, device_parent(self), pa, 0);
 
        /* XXX errno Linux->NetBSD */
        error = -drm_pci_attach(self, pa, &sc->sc_pci_dev, radeon_drm_driver,



Home | Main Index | Thread Index | Old Index