subr_bus.c (295762) | subr_bus.c (295832) |
---|---|
1/*- 2 * Copyright (c) 1997,1998,2003 Doug Rabson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1997,1998,2003 Doug Rabson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/kern/subr_bus.c 295762 2016-02-18 15:44:45Z zbb $"); | 28__FBSDID("$FreeBSD: head/sys/kern/subr_bus.c 295832 2016-02-20 01:32:58Z jhibbits $"); |
29 30#include "opt_bus.h" 31 32#include <sys/param.h> 33#include <sys/conf.h> 34#include <sys/filio.h> 35#include <sys/lock.h> 36#include <sys/kernel.h> --- 3269 unchanged lines hidden (view full) --- 3306 * resource could be allocated 3307 */ 3308struct resource * 3309resource_list_alloc(struct resource_list *rl, device_t bus, device_t child, 3310 int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) 3311{ 3312 struct resource_list_entry *rle = NULL; 3313 int passthrough = (device_get_parent(child) != bus); | 29 30#include "opt_bus.h" 31 32#include <sys/param.h> 33#include <sys/conf.h> 34#include <sys/filio.h> 35#include <sys/lock.h> 36#include <sys/kernel.h> --- 3269 unchanged lines hidden (view full) --- 3306 * resource could be allocated 3307 */ 3308struct resource * 3309resource_list_alloc(struct resource_list *rl, device_t bus, device_t child, 3310 int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) 3311{ 3312 struct resource_list_entry *rle = NULL; 3313 int passthrough = (device_get_parent(child) != bus); |
3314 int isdefault = (start == 0UL && end == ~0UL); | 3314 int isdefault = RMAN_IS_DEFAULT_RANGE(start, end); |
3315 3316 if (passthrough) { 3317 return (BUS_ALLOC_RESOURCE(device_get_parent(bus), child, 3318 type, rid, start, end, count, flags)); 3319 } 3320 3321 rle = resource_list_find(rl, type, *rid); 3322 --- 2022 unchanged lines hidden --- | 3315 3316 if (passthrough) { 3317 return (BUS_ALLOC_RESOURCE(device_get_parent(bus), child, 3318 type, rid, start, end, count, flags)); 3319 } 3320 3321 rle = resource_list_find(rl, type, *rid); 3322 --- 2022 unchanged lines hidden --- |