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

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

34 * attachment point for both processors and buses, and to manage
35 * resources which are common to all of them. In particular,
36 * this code implements the core resource managers for interrupt
37 * requests and memory address space.
38 */
39#include "opt_platform.h"
40
41#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

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

34 * attachment point for both processors and buses, and to manage
35 * resources which are common to all of them. In particular,
36 * this code implements the core resource managers for interrupt
37 * requests and memory address space.
38 */
39#include "opt_platform.h"
40
41#include <sys/cdefs.h>
42__FBSDID("$FreeBSD: head/sys/mips/mips/nexus.c 295527 2016-02-11 16:43:23Z andrew $");
42__FBSDID("$FreeBSD: head/sys/mips/mips/nexus.c 295832 2016-02-20 01:32:58Z jhibbits $");
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/bus.h>
47#include <sys/kernel.h>
48#include <sys/malloc.h>
49#include <sys/module.h>
50#include <sys/rman.h>

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

276 struct rman *rm;
277 int isdefault, needactivate, passthrough;
278
279 dprintf("%s: entry (%p, %p, %d, %p, %p, %p, %ld, %d)\n",
280 __func__, bus, child, type, rid, (void *)(intptr_t)start,
281 (void *)(intptr_t)end, count, flags);
282 dprintf("%s: requested rid is %d\n", __func__, *rid);
283
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/bus.h>
47#include <sys/kernel.h>
48#include <sys/malloc.h>
49#include <sys/module.h>
50#include <sys/rman.h>

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

276 struct rman *rm;
277 int isdefault, needactivate, passthrough;
278
279 dprintf("%s: entry (%p, %p, %d, %p, %p, %p, %ld, %d)\n",
280 __func__, bus, child, type, rid, (void *)(intptr_t)start,
281 (void *)(intptr_t)end, count, flags);
282 dprintf("%s: requested rid is %d\n", __func__, *rid);
283
284 isdefault = (start == 0UL && end == ~0UL && count == 1);
284 isdefault = (RMAN_IS_DEFAULT_RANGE(start, end) && count == 1);
285 needactivate = flags & RF_ACTIVE;
286 passthrough = (device_get_parent(child) != bus);
287 rle = NULL;
288
289 /*
290 * If this is an allocation of the "default" range for a given RID,
291 * and we know what the resources for this device are (ie. they aren't
292 * maintained by a child bus), then work out the start/end values.

--- 296 unchanged lines hidden ---
285 needactivate = flags & RF_ACTIVE;
286 passthrough = (device_get_parent(child) != bus);
287 rle = NULL;
288
289 /*
290 * If this is an allocation of the "default" range for a given RID,
291 * and we know what the resources for this device are (ie. they aren't
292 * maintained by a child bus), then work out the start/end values.

--- 296 unchanged lines hidden ---