ofwbus.c (295754) | ofwbus.c (295832) |
---|---|
1/*- 2 * Copyright 1998 Massachusetts Institute of Technology 3 * Copyright 2001 by Thomas Moestl <tmm@FreeBSD.org>. 4 * Copyright 2006 by Marius Strobl <marius@FreeBSD.org>. 5 * All rights reserved. 6 * 7 * Permission to use, copy, modify, and distribute this software and 8 * its documentation for any purpose and without fee is hereby --- 19 unchanged lines hidden (view full) --- 28 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 29 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * from: FreeBSD: src/sys/i386/i386/nexus.c,v 1.43 2001/02/09 33 */ 34 35#include <sys/cdefs.h> | 1/*- 2 * Copyright 1998 Massachusetts Institute of Technology 3 * Copyright 2001 by Thomas Moestl <tmm@FreeBSD.org>. 4 * Copyright 2006 by Marius Strobl <marius@FreeBSD.org>. 5 * All rights reserved. 6 * 7 * Permission to use, copy, modify, and distribute this software and 8 * its documentation for any purpose and without fee is hereby --- 19 unchanged lines hidden (view full) --- 28 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 29 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * from: FreeBSD: src/sys/i386/i386/nexus.c,v 1.43 2001/02/09 33 */ 34 35#include <sys/cdefs.h> |
36__FBSDID("$FreeBSD: head/sys/dev/ofw/ofwbus.c 295754 2016-02-18 11:53:57Z zbb $"); | 36__FBSDID("$FreeBSD: head/sys/dev/ofw/ofwbus.c 295832 2016-02-20 01:32:58Z jhibbits $"); |
37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/bus.h> 41#include <sys/kernel.h> 42#include <sys/malloc.h> 43#include <sys/module.h> 44#include <sys/pcpu.h> --- 136 unchanged lines hidden (view full) --- 181 rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) 182{ 183 struct ofwbus_softc *sc; 184 struct rman *rm; 185 struct resource *rv; 186 struct resource_list_entry *rle; 187 int isdefault, passthrough; 188 | 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/bus.h> 41#include <sys/kernel.h> 42#include <sys/malloc.h> 43#include <sys/module.h> 44#include <sys/pcpu.h> --- 136 unchanged lines hidden (view full) --- 181 rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) 182{ 183 struct ofwbus_softc *sc; 184 struct rman *rm; 185 struct resource *rv; 186 struct resource_list_entry *rle; 187 int isdefault, passthrough; 188 |
189 isdefault = (start == 0UL && end == ~0UL); | 189 isdefault = RMAN_IS_DEFAULT_RANGE(start, end); |
190 passthrough = (device_get_parent(child) != bus); 191 sc = device_get_softc(bus); 192 rle = NULL; 193 if (!passthrough && isdefault) { 194 rle = resource_list_find(BUS_GET_RESOURCE_LIST(bus, child), 195 type, *rid); 196 if (rle == NULL) { 197 if (bootverbose) --- 95 unchanged lines hidden --- | 190 passthrough = (device_get_parent(child) != bus); 191 sc = device_get_softc(bus); 192 rle = NULL; 193 if (!passthrough && isdefault) { 194 rle = resource_list_find(BUS_GET_RESOURCE_LIST(bus, child), 195 type, *rid); 196 if (rle == NULL) { 197 if (bootverbose) --- 95 unchanged lines hidden --- |