diff options
-rw-r--r-- | sys/arch/amd64/amd64/rbus_machdep.c | 6 | ||||
-rw-r--r-- | sys/arch/hppa/dev/dino.c | 4 | ||||
-rw-r--r-- | sys/arch/hppa/dev/elroy.c | 4 | ||||
-rw-r--r-- | sys/arch/hppa64/dev/elroy.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/i386/rbus_machdep.c | 6 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/rbus_machdep.c | 6 | ||||
-rw-r--r-- | sys/arch/sgi/pci/macepcibridge.c | 6 | ||||
-rw-r--r-- | sys/arch/sgi/xbow/xbridge.c | 8 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/rbus_machdep.c | 10 | ||||
-rw-r--r-- | sys/dev/cardbus/rbus.c | 24 | ||||
-rw-r--r-- | sys/dev/cardbus/rbus.h | 9 |
11 files changed, 41 insertions, 46 deletions
diff --git a/sys/arch/amd64/amd64/rbus_machdep.c b/sys/arch/amd64/amd64/rbus_machdep.c index 93fe8fda854..db4d27ed5d1 100644 --- a/sys/arch/amd64/amd64/rbus_machdep.c +++ b/sys/arch/amd64/amd64/rbus_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rbus_machdep.c,v 1.11 2010/01/13 09:10:33 jsg Exp $ */ +/* $OpenBSD: rbus_machdep.c,v 1.12 2010/09/22 02:28:37 jsg Exp $ */ /* $NetBSD: rbus_machdep.c,v 1.2 1999/10/15 06:43:06 haya Exp $ */ /* @@ -63,7 +63,7 @@ rbus_pccbb_parent_mem(struct device *self, struct pci_attach_args *pa) start = RBUS_MEM_START; size = ex->ex_end - start; - return (rbus_new_root_share(pa->pa_memt, ex, start, size, 0)); + return (rbus_new_root_share(pa->pa_memt, ex, start, size)); } rbus_tag_t @@ -88,7 +88,7 @@ rbus_pccbb_parent_io(struct device *self, struct pci_attach_args *pa) } size = ex->ex_end - start; - return (rbus_new_root_share(pa->pa_iot, ex, start, size, 0)); + return (rbus_new_root_share(pa->pa_iot, ex, start, size)); } void diff --git a/sys/arch/hppa/dev/dino.c b/sys/arch/hppa/dev/dino.c index 0d88cbce619..780c39c45e9 100644 --- a/sys/arch/hppa/dev/dino.c +++ b/sys/arch/hppa/dev/dino.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dino.c,v 1.27 2010/04/29 13:48:29 jsing Exp $ */ +/* $OpenBSD: dino.c,v 1.28 2010/09/22 02:28:37 jsg Exp $ */ /* * Copyright (c) 2003-2005 Michael Shalayeff @@ -639,7 +639,7 @@ dino_alloc_parent(struct device *self, struct pci_attach_args *pa, int io) return (NULL); extent_free(ex, start, size, EX_NOWAIT); - return rbus_new_root_share(tag, ex, start, size, 0); + return rbus_new_root_share(tag, ex, start, size); } #endif diff --git a/sys/arch/hppa/dev/elroy.c b/sys/arch/hppa/dev/elroy.c index 2d72384e6fc..62cac84df4f 100644 --- a/sys/arch/hppa/dev/elroy.c +++ b/sys/arch/hppa/dev/elroy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: elroy.c,v 1.6 2010/05/24 15:04:53 deraadt Exp $ */ +/* $OpenBSD: elroy.c,v 1.7 2010/09/22 02:28:37 jsg Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -462,7 +462,7 @@ elroy_alloc_parent(struct device *self, struct pci_attach_args *pa, int io) return (NULL); extent_free(ex, start, size, EX_NOWAIT); - return rbus_new_root_share(tag, ex, start, size, 0); + return rbus_new_root_share(tag, ex, start, size); #else return (NULL); #endif diff --git a/sys/arch/hppa64/dev/elroy.c b/sys/arch/hppa64/dev/elroy.c index 9e689a00a95..1f134ebdddb 100644 --- a/sys/arch/hppa64/dev/elroy.c +++ b/sys/arch/hppa64/dev/elroy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: elroy.c,v 1.8 2010/07/24 19:34:54 kettenis Exp $ */ +/* $OpenBSD: elroy.c,v 1.9 2010/09/22 02:28:37 jsg Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -468,7 +468,7 @@ elroy_alloc_parent(struct device *self, struct pci_attach_args *pa, int io) return (NULL); extent_free(ex, start, size, EX_NOWAIT); - return rbus_new_root_share(tag, ex, start, size, 0); + return rbus_new_root_share(tag, ex, start, size); #else return (NULL); #endif diff --git a/sys/arch/i386/i386/rbus_machdep.c b/sys/arch/i386/i386/rbus_machdep.c index 6c50ff43d0b..e123322becf 100644 --- a/sys/arch/i386/i386/rbus_machdep.c +++ b/sys/arch/i386/i386/rbus_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rbus_machdep.c,v 1.26 2010/01/13 09:10:33 jsg Exp $ */ +/* $OpenBSD: rbus_machdep.c,v 1.27 2010/09/22 02:28:37 jsg Exp $ */ /* $NetBSD: rbus_machdep.c,v 1.2 1999/10/15 06:43:06 haya Exp $ */ /* @@ -63,7 +63,7 @@ rbus_pccbb_parent_mem(struct device *self, struct pci_attach_args *pa) start = RBUS_MEM_START; size = ex->ex_end - start; - return (rbus_new_root_share(pa->pa_memt, ex, start, size, 0)); + return (rbus_new_root_share(pa->pa_memt, ex, start, size)); } rbus_tag_t @@ -88,7 +88,7 @@ rbus_pccbb_parent_io(struct device *self, struct pci_attach_args *pa) } size = ex->ex_end - start; - return (rbus_new_root_share(pa->pa_iot, ex, start, size, 0)); + return (rbus_new_root_share(pa->pa_iot, ex, start, size)); } void diff --git a/sys/arch/macppc/macppc/rbus_machdep.c b/sys/arch/macppc/macppc/rbus_machdep.c index 87f5a26fbbb..6a91321b076 100644 --- a/sys/arch/macppc/macppc/rbus_machdep.c +++ b/sys/arch/macppc/macppc/rbus_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rbus_machdep.c,v 1.10 2010/04/21 03:03:26 deraadt Exp $ */ +/* $OpenBSD: rbus_machdep.c,v 1.11 2010/09/22 02:28:37 jsg Exp $ */ /* $NetBSD: rbus_machdep.c,v 1.2 1999/10/15 06:43:06 haya Exp $ */ /* @@ -49,14 +49,14 @@ rbus_pccbb_parent_mem(struct device *self, struct pci_attach_args *pa) macppc_cardbus_init(pa->pa_pc, pa->pa_tag); return (rbus_new_root_share(pa->pa_memt, pa->pa_memex, - 0x00000000, 0xffffffff, 0)); + 0x00000000, 0xffffffff)); } rbus_tag_t rbus_pccbb_parent_io(struct device *self, struct pci_attach_args *pa) { return (rbus_new_root_share(pa->pa_iot, pa->pa_ioex, - 0x0000, 0xffff, 0)); + 0x0000, 0xffff)); } /* diff --git a/sys/arch/sgi/pci/macepcibridge.c b/sys/arch/sgi/pci/macepcibridge.c index 23676894114..1929f2e1149 100644 --- a/sys/arch/sgi/pci/macepcibridge.c +++ b/sys/arch/sgi/pci/macepcibridge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: macepcibridge.c,v 1.39 2010/08/23 16:56:18 miod Exp $ */ +/* $OpenBSD: macepcibridge.c,v 1.40 2010/09/22 02:28:37 jsg Exp $ */ /* * Copyright (c) 2009 Miodrag Vallat. @@ -887,7 +887,7 @@ mace_pcibr_rbus_parent_io(struct pci_attach_args *pa) rbus_tag_t rb; rb = rbus_new_root_share(pa->pa_iot, pa->pa_ioex, - 0x0000, 0xffff, 0); + 0x0000, 0xffff); if (rb != NULL) rb->rb_md = &mace_pcibr_rb_md_fn; @@ -900,7 +900,7 @@ mace_pcibr_rbus_parent_mem(struct pci_attach_args *pa) rbus_tag_t rb; rb = rbus_new_root_share(pa->pa_memt, pa->pa_memex, - 0, 0xffffffff, 0); + 0, 0xffffffff); if (rb != NULL) rb->rb_md = &mace_pcibr_rb_md_fn; diff --git a/sys/arch/sgi/xbow/xbridge.c b/sys/arch/sgi/xbow/xbridge.c index 83292a7420a..b0afad487af 100644 --- a/sys/arch/sgi/xbow/xbridge.c +++ b/sys/arch/sgi/xbow/xbridge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xbridge.c,v 1.75 2010/09/20 06:33:47 matthew Exp $ */ +/* $OpenBSD: xbridge.c,v 1.76 2010/09/22 02:28:37 jsg Exp $ */ /* * Copyright (c) 2008, 2009 Miodrag Vallat. @@ -3586,7 +3586,7 @@ xbridge_rbus_parent_io(struct pci_attach_args *pa) if (start < end) { rb = rbus_new_root_share(pa->pa_iot, ex, - start, end - start, 0); + start, end - start); if (rb != NULL) rb->rb_md = &xbridge_rb_md_fn; } @@ -3597,7 +3597,7 @@ xbridge_rbus_parent_io(struct pci_attach_args *pa) * resources, return a valid body which will fail requests. */ if (rb == NULL) - rb = rbus_new_body(pa->pa_iot, NULL, 0, 0, 0, + rb = rbus_new_body(pa->pa_iot, NULL, 0, 0, RBUS_SPACE_INVALID); return rb; @@ -3623,7 +3623,7 @@ xbridge_rbus_parent_mem(struct pci_attach_args *pa) if (start < ex->ex_end) { rb = rbus_new_root_share(pa->pa_memt, ex, - start, ex->ex_end - start, 0); + start, ex->ex_end - start); if (rb != NULL) rb->rb_md = &xbridge_rb_md_fn; } diff --git a/sys/arch/sparc64/sparc64/rbus_machdep.c b/sys/arch/sparc64/sparc64/rbus_machdep.c index 3a7bbadfd87..e15b21e4efd 100644 --- a/sys/arch/sparc64/sparc64/rbus_machdep.c +++ b/sys/arch/sparc64/sparc64/rbus_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rbus_machdep.c,v 1.4 2008/07/19 10:02:09 kettenis Exp $ */ +/* $OpenBSD: rbus_machdep.c,v 1.5 2010/09/22 02:28:37 jsg Exp $ */ /* * Copyright (c) 2007 Mark Kettenis @@ -64,7 +64,7 @@ rbus_pccbb_parent_mem(struct device *self, struct pci_attach_args *pa) continue; return (rbus_new_root_delegate(pa->pa_memt, - addr[i].phys_lo, addr[i].size_lo, 0)); + addr[i].phys_lo, addr[i].size_lo)); } } @@ -79,7 +79,7 @@ rbus_pccbb_parent_mem(struct device *self, struct pci_attach_args *pa) continue; return (rbus_new_root_delegate(pa->pa_memt, - addr[i].phys_lo, addr[i].size_lo, 0)); + addr[i].phys_lo, addr[i].size_lo)); } return &rbus_null; @@ -110,7 +110,7 @@ rbus_pccbb_parent_io(struct device *self, struct pci_attach_args *pa) continue; return (rbus_new_root_delegate(pa->pa_iot, - addr[i].phys_lo, addr[i].size_lo, 0)); + addr[i].phys_lo, addr[i].size_lo)); } } @@ -125,7 +125,7 @@ rbus_pccbb_parent_io(struct device *self, struct pci_attach_args *pa) continue; return (rbus_new_root_delegate(pa->pa_iot, - addr[i].phys_lo, addr[i].size_lo, 0)); + addr[i].phys_lo, addr[i].size_lo)); } return &rbus_null; diff --git a/sys/dev/cardbus/rbus.c b/sys/dev/cardbus/rbus.c index ee46b145f99..21593185095 100644 --- a/sys/dev/cardbus/rbus.c +++ b/sys/dev/cardbus/rbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rbus.c,v 1.15 2010/04/02 12:11:55 jsg Exp $ */ +/* $OpenBSD: rbus.c,v 1.16 2010/09/22 02:28:37 jsg Exp $ */ /* $NetBSD: rbus.c,v 1.3 1999/11/06 06:20:53 soren Exp $ */ /* * Copyright (c) 1999 @@ -74,8 +74,6 @@ rbus_space_alloc_subregion(rbus_tag_t rbt, bus_addr_t substart, DPRINTF(("rbus_space_alloc: addr %lx, size %lx, mask %lx, align %lx\n", (u_long)addr, (u_long)size, (u_long)mask, (u_long)align)); - addr += rbt->rb_offset; - if (mask == 0) { /* FULL Decode */ decodesize = 0; @@ -140,7 +138,7 @@ rbus_space_alloc_subregion(rbus_tag_t rbt, bus_addr_t substart, } if (addrp != NULL) - *addrp = result + rbt->rb_offset; + *addrp = result; return (0); } else { /* error!! */ @@ -179,12 +177,12 @@ rbus_space_free(rbus_tag_t rbt, bus_space_handle_t bsh, bus_size_t size, * rbus_tag_t * rbus_new_body(bus_space_tag_t bt, * struct extent *ex, bus_addr_t start, bus_size_t end, - * bus_addr_t offset, int flags) + * int flags) * */ rbus_tag_t rbus_new_body(bus_space_tag_t bt, struct extent *ex, - bus_addr_t start, bus_addr_t end, bus_addr_t offset, int flags) + bus_addr_t start, bus_addr_t end, int flags) { rbus_tag_t rb; @@ -196,7 +194,6 @@ rbus_new_body(bus_space_tag_t bt, struct extent *ex, rb->rb_bt = bt; rb->rb_start = start; rb->rb_end = end; - rb->rb_offset = offset; rb->rb_flags = flags; rb->rb_ext = ex; @@ -211,13 +208,12 @@ rbus_new_body(bus_space_tag_t bt, struct extent *ex, /* * rbus_tag_t rbus_new_root_delegate(bus_space_tag, bus_addr_t, - * bus_size_t, bus_addr_t offset) + * bus_size_t) * * This function makes a root rbus instance. */ rbus_tag_t -rbus_new_root_delegate(bus_space_tag_t bt, bus_addr_t start, bus_size_t size, - bus_addr_t offset) +rbus_new_root_delegate(bus_space_tag_t bt, bus_addr_t start, bus_size_t size) { rbus_tag_t rb; struct extent *ex; @@ -226,7 +222,7 @@ rbus_new_root_delegate(bus_space_tag_t bt, bus_addr_t start, bus_size_t size, NULL, 0, EX_NOCOALESCE|EX_NOWAIT)) == NULL) return (NULL); - rb = rbus_new_body(bt, ex, start, start + size, offset, + rb = rbus_new_body(bt, ex, start, start + size, RBUS_SPACE_DEDICATE); if (rb == NULL) @@ -237,13 +233,13 @@ rbus_new_root_delegate(bus_space_tag_t bt, bus_addr_t start, bus_size_t size, /* * rbus_tag_t rbus_new_root_share(bus_space_tag, struct extent *, - * bus_addr_t, bus_size_t, bus_addr_t offset) + * bus_addr_t, bus_size_t) * * This function makes a root rbus instance. */ rbus_tag_t rbus_new_root_share(bus_space_tag_t bt, struct extent *ex, bus_addr_t start, - bus_size_t size, bus_addr_t offset) + bus_size_t size) { /* sanity check */ if (start < ex->ex_start || start + size > ex->ex_end) { @@ -254,6 +250,6 @@ rbus_new_root_share(bus_space_tag_t bt, struct extent *ex, bus_addr_t start, /* Should I invoke panic? */ } - return (rbus_new_body(bt, ex, start, start + size, offset, + return (rbus_new_body(bt, ex, start, start + size, RBUS_SPACE_SHARE)); } diff --git a/sys/dev/cardbus/rbus.h b/sys/dev/cardbus/rbus.h index 5ee159fcc09..f620780bf52 100644 --- a/sys/dev/cardbus/rbus.h +++ b/sys/dev/cardbus/rbus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rbus.h,v 1.9 2010/04/02 12:11:55 jsg Exp $ */ +/* $OpenBSD: rbus.h,v 1.10 2010/09/22 02:28:37 jsg Exp $ */ /* $NetBSD: rbus.h,v 1.3 1999/12/15 12:28:55 kleink Exp $ */ /* * Copyright (c) 1999 @@ -118,12 +118,11 @@ int rbus_space_free(rbus_tag_t, bus_space_handle_t, bus_size_t, */ rbus_tag_t rbus_new_body(bus_space_tag_t, struct extent *, - bus_addr_t, bus_addr_t, bus_addr_t, int); + bus_addr_t, bus_addr_t, int); -rbus_tag_t rbus_new_root_delegate(bus_space_tag_t, bus_addr_t, bus_size_t, - bus_addr_t); +rbus_tag_t rbus_new_root_delegate(bus_space_tag_t, bus_addr_t, bus_size_t); rbus_tag_t rbus_new_root_share(bus_space_tag_t, struct extent *, - bus_addr_t, bus_size_t, bus_addr_t); + bus_addr_t, bus_size_t); /* * Machine-dependent definitions. |