Deleted Added
full compact
nexus.c (295755) 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

--- 26 unchanged lines hidden (view full) ---

35 * resources which are common to all of them. In particular,
36 * this code implements the core resource managers for interrupt
37 * requests, DMA requests (which rightfully should be a part of the
38 * ISA code but it's easier to do it here for now), I/O port addresses,
39 * and I/O memory address space.
40 */
41
42#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

--- 26 unchanged lines hidden (view full) ---

35 * resources which are common to all of them. In particular,
36 * this code implements the core resource managers for interrupt
37 * requests, DMA requests (which rightfully should be a part of the
38 * ISA code but it's easier to do it here for now), I/O port addresses,
39 * and I/O memory address space.
40 */
41
42#include <sys/cdefs.h>
43__FBSDID("$FreeBSD: head/sys/arm64/arm64/nexus.c 295755 2016-02-18 13:00:04Z zbb $");
43__FBSDID("$FreeBSD: head/sys/arm64/arm64/nexus.c 295832 2016-02-20 01:32:58Z jhibbits $");
44
45#include <sys/param.h>
46#include <sys/systm.h>
47#include <sys/bus.h>
48#include <sys/kernel.h>
49#include <sys/malloc.h>
50#include <sys/module.h>
51#include <machine/bus.h>

--- 166 unchanged lines hidden (view full) ---

218 int needactivate = flags & RF_ACTIVE;
219
220 /*
221 * If this is an allocation of the "default" range for a given
222 * RID, and we know what the resources for this device are
223 * (ie. they aren't maintained by a child bus), then work out
224 * the start/end values.
225 */
44
45#include <sys/param.h>
46#include <sys/systm.h>
47#include <sys/bus.h>
48#include <sys/kernel.h>
49#include <sys/malloc.h>
50#include <sys/module.h>
51#include <machine/bus.h>

--- 166 unchanged lines hidden (view full) ---

218 int needactivate = flags & RF_ACTIVE;
219
220 /*
221 * If this is an allocation of the "default" range for a given
222 * RID, and we know what the resources for this device are
223 * (ie. they aren't maintained by a child bus), then work out
224 * the start/end values.
225 */
226 if ((start == 0UL) && (end == ~0UL) && (count == 1)) {
226 if (RMAN_IS_DEFAULT_RANGE(start, end) && (count == 1)) {
227 if (device_get_parent(child) != bus || ndev == NULL)
228 return(NULL);
229 rle = resource_list_find(&ndev->nx_resources, type, *rid);
230 if (rle == NULL)
231 return(NULL);
232 start = rle->start;
233 end = rle->end;
234 count = rle->count;

--- 246 unchanged lines hidden ---
227 if (device_get_parent(child) != bus || ndev == NULL)
228 return(NULL);
229 rle = resource_list_find(&ndev->nx_resources, type, *rid);
230 if (rle == NULL)
231 return(NULL);
232 start = rle->start;
233 end = rle->end;
234 count = rle->count;

--- 246 unchanged lines hidden ---