nexus.c (294883) | nexus.c (295832) |
---|---|
1/*- 2 * Copyright 1998 Massachusetts Institute of Technology 3 * 4 * Permission to use, copy, modify, and distribute this software and 5 * its documentation for any purpose and without fee is hereby 6 * granted, provided that both the above copyright notice and this 7 * permission notice appear in all copies, that both the above 8 * copyright notice and this permission notice appear in all --- 14 unchanged lines hidden (view full) --- 23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Copyright 1998 Massachusetts Institute of Technology 3 * 4 * Permission to use, copy, modify, and distribute this software and 5 * its documentation for any purpose and without fee is hereby 6 * granted, provided that both the above copyright notice and this 7 * permission notice appear in all copies, that both the above 8 * copyright notice and this permission notice appear in all --- 14 unchanged lines hidden (view full) --- 23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/x86/x86/nexus.c 294883 2016-01-27 02:23:54Z jhibbits $"); | 31__FBSDID("$FreeBSD: head/sys/x86/x86/nexus.c 295832 2016-02-20 01:32:58Z jhibbits $"); |
32 33/* 34 * This code implements a `root nexus' for Intel Architecture 35 * machines. The function of the root nexus is to serve as an 36 * attachment point for both processors and buses, and to manage 37 * resources which are common to all of them. In particular, 38 * this code implements the core resource managers for interrupt 39 * requests, DMA requests (which rightfully should be a part of the --- 332 unchanged lines hidden (view full) --- 372 int needactivate = flags & RF_ACTIVE; 373 374 /* 375 * If this is an allocation of the "default" range for a given 376 * RID, and we know what the resources for this device are 377 * (ie. they aren't maintained by a child bus), then work out 378 * the start/end values. 379 */ | 32 33/* 34 * This code implements a `root nexus' for Intel Architecture 35 * machines. The function of the root nexus is to serve as an 36 * attachment point for both processors and buses, and to manage 37 * resources which are common to all of them. In particular, 38 * this code implements the core resource managers for interrupt 39 * requests, DMA requests (which rightfully should be a part of the --- 332 unchanged lines hidden (view full) --- 372 int needactivate = flags & RF_ACTIVE; 373 374 /* 375 * If this is an allocation of the "default" range for a given 376 * RID, and we know what the resources for this device are 377 * (ie. they aren't maintained by a child bus), then work out 378 * the start/end values. 379 */ |
380 if ((start == 0UL) && (end == ~0UL) && (count == 1)) { | 380 if (RMAN_IS_DEFAULT_RANGE(start, end) && (count == 1)) { |
381 if (device_get_parent(child) != bus || ndev == NULL) 382 return(NULL); 383 rle = resource_list_find(&ndev->nx_resources, type, *rid); 384 if (rle == NULL) 385 return(NULL); 386 start = rle->start; 387 end = rle->end; 388 count = rle->count; --- 442 unchanged lines hidden --- | 381 if (device_get_parent(child) != bus || ndev == NULL) 382 return(NULL); 383 rle = resource_list_find(&ndev->nx_resources, type, *rid); 384 if (rle == NULL) 385 return(NULL); 386 start = rle->start; 387 end = rle->end; 388 count = rle->count; --- 442 unchanged lines hidden --- |