Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/marvell replace EX_NOWAIT with EX_WAITOK in device a...



details:   https://anonhg.NetBSD.org/src/rev/4b1773b91c99
branches:  trunk
changeset: 972941:4b1773b91c99
user:      chs <chs%NetBSD.org@localhost>
date:      Sun Jun 14 01:40:02 2020 +0000

description:
replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.

diffstat:

 sys/arch/algor/dev/mainbus.c           |  16 ++++++++--------
 sys/arch/amiga/pci/em4k.c              |   6 +++---
 sys/arch/amiga/pci/empb.c              |   6 +++---
 sys/arch/amiga/pci/mppb.c              |   6 +++---
 sys/arch/amiga/pci/p5pb.c              |   9 +++------
 sys/arch/arc/pci/necpb.c               |   8 ++++----
 sys/arch/arm/broadcom/bcm53xx_pax.c    |   4 ++--
 sys/arch/arm/fdt/pcihost_fdt.c         |  10 +++++-----
 sys/arch/arm/gemini/gemini_pci.c       |   8 ++++----
 sys/arch/arm/imx/fdt/imx6_pcie.c       |   8 ++++----
 sys/arch/arm/imx/imx6_pcie.c           |   8 ++++----
 sys/arch/arm/ixp12x0/ixp12x0_pci.c     |   8 ++++----
 sys/arch/arm/nvidia/tegra_pcie.c       |  10 +++++-----
 sys/arch/arm/s3c2xx0/s3c2800_pci.c     |   8 ++++----
 sys/arch/arm/xscale/becc_pci.c         |   8 ++++----
 sys/arch/arm/xscale/i80312_pci.c       |   8 ++++----
 sys/arch/arm/xscale/i80321_pci.c       |  10 +++++-----
 sys/arch/arm/xscale/ixp425_pci.c       |   8 ++++----
 sys/arch/bebox/bebox/mainbus.c         |   8 ++++----
 sys/arch/cobalt/dev/gt.c               |   8 ++++----
 sys/arch/evbarm/ifpga/ifpga.c          |  10 +++++-----
 sys/arch/evbmips/gdium/mainbus.c       |   8 ++++----
 sys/arch/evbmips/loongson/mainbus.c    |   8 ++++----
 sys/arch/evbmips/malta/dev/mainbus.c   |   8 ++++----
 sys/arch/evbppc/walnut/pci/pchb.c      |   8 ++++----
 sys/arch/hppa/dev/astro.c              |   4 ++--
 sys/arch/hppa/dev/dino.c               |  12 ++++--------
 sys/arch/hppa/dev/uturn.c              |   4 ++--
 sys/arch/ibmnws/ibmnws/mainbus.c       |   6 +++---
 sys/arch/mvmeppc/mvmeppc/mainbus.c     |   8 ++++----
 sys/arch/ofppc/pci/ofwpci.c            |   8 ++++----
 sys/arch/powerpc/ibm4xx/pci/pchb.c     |   8 ++++----
 sys/arch/prep/prep/mainbus.c           |   8 ++++----
 sys/arch/sandpoint/sandpoint/mainbus.c |   8 ++++----
 sys/arch/sgimips/gio/pci_gio.c         |   6 +++---
 sys/arch/sgimips/mace/pci_mace.c       |  12 ++++++------
 sys/arch/sh3/dev/shpcic.c              |   8 ++++----
 sys/arch/sparc/dev/vme_machdep.c       |   8 +++-----
 sys/arch/sparc/sparc/iommu.c           |   8 +++-----
 sys/arch/sparc64/dev/sbus.c            |   6 +++---
 sys/arch/vax/uba/qv.c                  |   6 +++---
 sys/arch/x68k/dev/intio.c              |   6 +++---
 sys/dev/ic/cpc700.c                    |   8 ++++----
 sys/dev/marvell/gtpci.c                |  26 ++++++++++----------------
 sys/dev/marvell/mvpex.c                |  26 ++++++++++----------------
 45 files changed, 185 insertions(+), 208 deletions(-)

diffs (truncated from 1392 to 300 lines):

diff -r fc74b696e98f -r 4b1773b91c99 sys/arch/algor/dev/mainbus.c
--- a/sys/arch/algor/dev/mainbus.c      Sun Jun 14 01:26:46 2020 +0000
+++ b/sys/arch/algor/dev/mainbus.c      Sun Jun 14 01:40:02 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mainbus.c,v 1.26 2012/01/27 18:52:47 para Exp $        */
+/*     $NetBSD: mainbus.c,v 1.27 2020/06/14 01:40:02 chs Exp $ */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.26 2012/01/27 18:52:47 para Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.27 2020/06/14 01:40:02 chs Exp $");
 
 #include "opt_algor_p4032.h"
 #include "opt_algor_p5064.h"
@@ -159,9 +159,9 @@
         * Reserve the bottom 64K of the I/O space for ISA devices.
         */
        ioext  = extent_create("pciio",  0x00010000, 0x000effff,
-           NULL, 0, EX_NOWAIT);
+           NULL, 0, EX_WAITOK);
        memext = extent_create("pcimem", 0x01000000, 0x07ffffff,
-           NULL, 0, EX_NOWAIT);
+           NULL, 0, EX_WAITOK);
 
        pc = &p4032_configuration.ac_pc;
 #elif defined(ALGOR_P5064)
@@ -171,9 +171,9 @@
         * a bug in the ISA bridge.
         */
        ioext  = extent_create("pciio",  0x00080000, 0x00ffffff,
-           NULL, 0, EX_NOWAIT);
+           NULL, 0, EX_WAITOK);
        memext = extent_create("pcimem", 0x01000000, 0x07ffffff,
-           NULL, 0, EX_NOWAIT);
+           NULL, 0, EX_WAITOK);
 
        pc = &p5064_configuration.ac_pc;
 #if defined(PCI_NETBSD_ENABLE_IDE)
@@ -184,9 +184,9 @@
         * Reserve the bottom 64K of the I/O space for ISA devices.
         */
        ioext  = extent_create("pciio",  0x00010000, 0x000effff,
-           NULL, 0, EX_NOWAIT);
+           NULL, 0, EX_WAITOK);
        memext = extent_create("pcimem", 0x01000000, 0x0affffff,
-           NULL, 0, EX_NOWAIT);
+           NULL, 0, EX_WAITOK);
 
        pc = &p6032_configuration.ac_pc;
 #if defined(PCI_NETBSD_ENABLE_IDE)
diff -r fc74b696e98f -r 4b1773b91c99 sys/arch/amiga/pci/em4k.c
--- a/sys/arch/amiga/pci/em4k.c Sun Jun 14 01:26:46 2020 +0000
+++ b/sys/arch/amiga/pci/em4k.c Sun Jun 14 01:40:02 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: em4k.c,v 1.4 2015/10/02 05:22:49 msaitoh Exp $ */
+/*     $NetBSD: em4k.c,v 1.5 2020/06/14 01:40:02 chs Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -247,7 +247,7 @@
 
        /* I/O addresses are relative to I/O space address. */
        ioext = extent_create("em4kio", 0, EM4K_IO_SIZE, 
-           NULL, 0, EX_NOWAIT);
+           NULL, 0, EX_WAITOK);
 
        /*
         * Memory space addresses are absolute (and keep in mind that
@@ -255,7 +255,7 @@
         */
        memext = extent_create("em4kmem", kvtop((void*) sc->pci_mem_win.base),
            kvtop((void*) sc->pci_mem_win.base) + sc->pci_mem_win_size,
-           NULL, 0, EX_NOWAIT);
+           NULL, 0, EX_WAITOK);
 
        pci_configure_bus(&sc->apc, ioext, memext, NULL, 0, CACHELINE_SIZE);
 
diff -r fc74b696e98f -r 4b1773b91c99 sys/arch/amiga/pci/empb.c
--- a/sys/arch/amiga/pci/empb.c Sun Jun 14 01:26:46 2020 +0000
+++ b/sys/arch/amiga/pci/empb.c Sun Jun 14 01:40:02 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: empb.c,v 1.11 2015/10/02 05:22:49 msaitoh Exp $ */
+/*     $NetBSD: empb.c,v 1.12 2020/06/14 01:40:02 chs Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -234,10 +234,10 @@
 
 #ifdef PCI_NETBSD_CONFIGURE
        ioext = extent_create("empbio", 0, EMPB_BRIDGE_SIZE, 
-           NULL, 0, EX_NOWAIT);
+           NULL, 0, EX_WAITOK);
 
        memext = extent_create("empbmem", EMPB_MEM_BASE, EMPB_MEM_END,
-           NULL, 0, EX_NOWAIT);
+           NULL, 0, EX_WAITOK);
 
        pci_configure_bus(pc, ioext, memext, NULL, 0, CACHELINE_SIZE);
 
diff -r fc74b696e98f -r 4b1773b91c99 sys/arch/amiga/pci/mppb.c
--- a/sys/arch/amiga/pci/mppb.c Sun Jun 14 01:26:46 2020 +0000
+++ b/sys/arch/amiga/pci/mppb.c Sun Jun 14 01:40:02 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mppb.c,v 1.8 2015/10/02 05:22:49 msaitoh Exp $ */
+/*     $NetBSD: mppb.c,v 1.9 2020/06/14 01:40:02 chs Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -167,9 +167,9 @@
 
 #ifdef PCI_NETBSD_CONFIGURE
        ioext = extent_create("mppbio",  MPPB_IO_BASE, 
-           MPPB_IO_BASE + MPPB_IO_SIZE, NULL, 0, EX_NOWAIT);
+           MPPB_IO_BASE + MPPB_IO_SIZE, NULL, 0, EX_WAITOK);
        memext = extent_create("mppbmem",  MPPB_MEM_BASE, 
-           MPPB_MEM_BASE + MPPB_MEM_SIZE, NULL, 0, EX_NOWAIT);
+           MPPB_MEM_BASE + MPPB_MEM_SIZE, NULL, 0, EX_WAITOK);
 
 #ifdef MPPB_DEBUG      
        aprint_normal("mppb: reconfiguring the bus!\n");
diff -r fc74b696e98f -r 4b1773b91c99 sys/arch/amiga/pci/p5pb.c
--- a/sys/arch/amiga/pci/p5pb.c Sun Jun 14 01:26:46 2020 +0000
+++ b/sys/arch/amiga/pci/p5pb.c Sun Jun 14 01:40:02 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: p5pb.c,v 1.15 2015/10/30 12:14:32 phx Exp $ */
+/*     $NetBSD: p5pb.c,v 1.16 2020/06/14 01:40:02 chs Exp $ */
 
 /*-
  * Copyright (c) 2011, 2012 The NetBSD Foundation, Inc.
@@ -495,14 +495,11 @@
        pc = &sc->apc;
 
        ioext = extent_create("p5pbio", 0, P5BUS_PCI_IO_SIZE, NULL, 0,
-           EX_NOWAIT);
+           EX_WAITOK);
 
        memext = extent_create("p5pbmem", sc->pci_mem_lowest, 
-            sc->pci_mem_highest - 1, NULL, 0, EX_NOWAIT);
+            sc->pci_mem_highest - 1, NULL, 0, EX_WAITOK);
        
-       if ( (!ioext) || (!memext) ) 
-               return false;
-
 #ifdef P5PB_DEBUG 
        aprint_normal("p5pb: reconfiguring the bus!\n");
 #endif /* P5PB_DEBUG */
diff -r fc74b696e98f -r 4b1773b91c99 sys/arch/arc/pci/necpb.c
--- a/sys/arch/arc/pci/necpb.c  Sun Jun 14 01:26:46 2020 +0000
+++ b/sys/arch/arc/pci/necpb.c  Sun Jun 14 01:40:02 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: necpb.c,v 1.43 2019/11/10 21:16:23 chs Exp $   */
+/*     $NetBSD: necpb.c,v 1.44 2020/06/14 01:40:02 chs Exp $   */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: necpb.c,v 1.43 2019/11/10 21:16:23 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: necpb.c,v 1.44 2020/06/14 01:40:02 chs Exp $");
 
 #include "opt_pci.h"
 
@@ -244,9 +244,9 @@
        pc = &sc->sc_ncp->nc_pc;
 #ifdef PCI_NETBSD_CONFIGURE
        pc->pc_ioext = extent_create("necpbio", 0x00100000, 0x01ffffff,
-           NULL, 0, EX_NOWAIT);
+           NULL, 0, EX_WAITOK);
        pc->pc_memext = extent_create("necpbmem", 0x08000000, 0x3fffffff,
-           NULL, 0, EX_NOWAIT);
+           NULL, 0, EX_WAITOK);
        pci_configure_bus(pc, pc->pc_ioext, pc->pc_memext, NULL, 0,
            mips_cache_info.mci_dcache_align);
 #endif
diff -r fc74b696e98f -r 4b1773b91c99 sys/arch/arm/broadcom/bcm53xx_pax.c
--- a/sys/arch/arm/broadcom/bcm53xx_pax.c       Sun Jun 14 01:26:46 2020 +0000
+++ b/sys/arch/arm/broadcom/bcm53xx_pax.c       Sun Jun 14 01:40:02 2020 +0000
@@ -34,7 +34,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: bcm53xx_pax.c,v 1.17 2018/11/16 15:06:21 jmcneill Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bcm53xx_pax.c,v 1.18 2020/06/14 01:40:02 chs Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -347,7 +347,7 @@
                }
 
                struct extent *memext = extent_create("pcimem", base,
-                    base + size, NULL, 0, EX_NOWAIT);
+                    base + size, NULL, 0, EX_WAITOK);
 
                error = pci_configure_bus(&sc->sc_pc,
                    NULL, memext, NULL, 0, arm_pcache.dcache_line_size);
diff -r fc74b696e98f -r 4b1773b91c99 sys/arch/arm/fdt/pcihost_fdt.c
--- a/sys/arch/arm/fdt/pcihost_fdt.c    Sun Jun 14 01:26:46 2020 +0000
+++ b/sys/arch/arm/fdt/pcihost_fdt.c    Sun Jun 14 01:40:02 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcihost_fdt.c,v 1.15 2020/01/07 10:20:07 skrll Exp $ */
+/* $NetBSD: pcihost_fdt.c,v 1.16 2020/06/14 01:40:02 chs Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcihost_fdt.c,v 1.15 2020/01/07 10:20:07 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcihost_fdt.c,v 1.16 2020/06/14 01:40:02 chs Exp $");
 
 #include <sys/param.h>
 
@@ -301,7 +301,7 @@
                                aprint_error_dev(sc->sc_dev, "ignoring duplicate IO space range\n");
                                continue;
                        }
-                       ioext = extent_create("pciio", bus_phys, bus_phys + size - 1, NULL, 0, EX_NOWAIT);
+                       ioext = extent_create("pciio", bus_phys, bus_phys + size - 1, NULL, 0, EX_WAITOK);
                        aprint_verbose_dev(sc->sc_dev,
                            "IO: 0x%" PRIx64 "+0x%" PRIx64 "@0x%" PRIx64 "\n",
                            bus_phys, size, cpu_phys);
@@ -328,7 +328,7 @@
                                        aprint_error_dev(sc->sc_dev, "ignoring duplicate mem (prefetchable) range\n");
                                        continue;
                                }
-                               pmemext = extent_create("pcipmem", bus_phys, bus_phys + size - 1, NULL, 0, EX_NOWAIT);
+                               pmemext = extent_create("pcipmem", bus_phys, bus_phys + size - 1, NULL, 0, EX_WAITOK);
                                aprint_verbose_dev(sc->sc_dev,
                                    "MMIO (%d-bit prefetchable): 0x%" PRIx64 "+0x%" PRIx64 "@0x%" PRIx64 "\n",
                                    is64 ? 64 : 32, bus_phys, size, cpu_phys);
@@ -337,7 +337,7 @@
                                        aprint_error_dev(sc->sc_dev, "ignoring duplicate mem (non-prefetchable) range\n");
                                        continue;
                                }
-                               memext = extent_create("pcimem", bus_phys, bus_phys + size - 1, NULL, 0, EX_NOWAIT);
+                               memext = extent_create("pcimem", bus_phys, bus_phys + size - 1, NULL, 0, EX_WAITOK);
                                aprint_verbose_dev(sc->sc_dev,
                                    "MMIO (%d-bit non-prefetchable): 0x%" PRIx64 "+0x%" PRIx64 "@0x%" PRIx64 "\n",
                                    is64 ? 64 : 32, bus_phys, size, cpu_phys);
diff -r fc74b696e98f -r 4b1773b91c99 sys/arch/arm/gemini/gemini_pci.c
--- a/sys/arch/arm/gemini/gemini_pci.c  Sun Jun 14 01:26:46 2020 +0000
+++ b/sys/arch/arm/gemini/gemini_pci.c  Sun Jun 14 01:40:02 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gemini_pci.c,v 1.20 2019/11/10 21:16:23 chs Exp $      */
+/*     $NetBSD: gemini_pci.c,v 1.21 2020/06/14 01:40:03 chs Exp $      */
 
 /* adapted from:
  *     NetBSD: i80312_pci.c,v 1.9 2005/12/11 12:16:51 christos Exp
@@ -44,7 +44,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gemini_pci.c,v 1.20 2019/11/10 21:16:23 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gemini_pci.c,v 1.21 2020/06/14 01:40:03 chs Exp $");
 
 #include "opt_gemini.h"
 #include "opt_pci.h"
@@ -205,7 +205,7 @@
        ioext  = extent_create("pciio",
                GEMINI_PCIIO_BASE,
                GEMINI_PCIIO_BASE + GEMINI_PCIIO_SIZE - 1,
-               NULL, 0, EX_NOWAIT);
+               NULL, 0, EX_WAITOK);
 
        /*
         * XXX PCI mem addr should be inherited ?
@@ -213,7 +213,7 @@
        memext = extent_create("pcimem",
                GEMINI_PCIMEM_BASE,
                GEMINI_PCIMEM_BASE + GEMINI_PCIMEM_SIZE - 1,
-               NULL, 0, EX_NOWAIT);
+               NULL, 0, EX_WAITOK);
 
        pci_configure_bus(pc, ioext, memext, NULL, 0, arm_dcache_align);
 
diff -r fc74b696e98f -r 4b1773b91c99 sys/arch/arm/imx/fdt/imx6_pcie.c
--- a/sys/arch/arm/imx/fdt/imx6_pcie.c  Sun Jun 14 01:26:46 2020 +0000
+++ b/sys/arch/arm/imx/fdt/imx6_pcie.c  Sun Jun 14 01:40:02 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: imx6_pcie.c,v 1.6 2019/12/05 00:31:14 hkenken Exp $    */
+/*     $NetBSD: imx6_pcie.c,v 1.7 2020/06/14 01:40:03 chs Exp $        */
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec Corporation.
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imx6_pcie.c,v 1.6 2019/12/05 00:31:14 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_pcie.c,v 1.7 2020/06/14 01:40:03 chs Exp $");
 
 #include "opt_pci.h"
 #include "opt_fdt.h"



Home | Main Index | Thread Index | Old Index