Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/subr_rman.c
Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | struct resource_i { | ||||
struct resource r_r; | struct resource r_r; | ||||
TAILQ_ENTRY(resource_i) r_link; | TAILQ_ENTRY(resource_i) r_link; | ||||
LIST_ENTRY(resource_i) r_sharelink; | LIST_ENTRY(resource_i) r_sharelink; | ||||
LIST_HEAD(, resource_i) *r_sharehead; | LIST_HEAD(, resource_i) *r_sharehead; | ||||
rman_res_t r_start; /* index of the first entry in this resource */ | rman_res_t r_start; /* index of the first entry in this resource */ | ||||
rman_res_t r_end; /* index of the last entry (inclusive) */ | rman_res_t r_end; /* index of the last entry (inclusive) */ | ||||
u_int r_flags; | u_int r_flags; | ||||
void *r_virtual; /* virtual address of this resource */ | void *r_virtual; /* virtual address of this resource */ | ||||
void *r_irq_cookie; /* interrupt cookie for this (interrupt) resource */ | |||||
device_t r_dev; /* device which has allocated this resource */ | device_t r_dev; /* device which has allocated this resource */ | ||||
struct rman *r_rm; /* resource manager from whence this came */ | struct rman *r_rm; /* resource manager from whence this came */ | ||||
int r_rid; /* optional rid for this resource. */ | int r_rid; /* optional rid for this resource. */ | ||||
}; | }; | ||||
static int rman_debug = 0; | static int rman_debug = 0; | ||||
SYSCTL_INT(_debug, OID_AUTO, rman_debug, CTLFLAG_RWTUN, | SYSCTL_INT(_debug, OID_AUTO, rman_debug, CTLFLAG_RWTUN, | ||||
&rman_debug, 0, "rman debug"); | &rman_debug, 0, "rman debug"); | ||||
▲ Show 20 Lines • Show All 756 Lines • ▼ Show 20 Lines | rman_set_virtual(struct resource *r, void *v) | ||||
r->__r_i->r_virtual = v; | r->__r_i->r_virtual = v; | ||||
} | } | ||||
void * | void * | ||||
rman_get_virtual(struct resource *r) | rman_get_virtual(struct resource *r) | ||||
{ | { | ||||
return (r->__r_i->r_virtual); | return (r->__r_i->r_virtual); | ||||
} | |||||
void | |||||
rman_set_irq_cookie(struct resource *r, void *c) | |||||
{ | |||||
r->__r_i->r_irq_cookie = c; | |||||
} | |||||
void * | |||||
rman_get_irq_cookie(struct resource *r) | |||||
{ | |||||
return (r->__r_i->r_irq_cookie); | |||||
} | } | ||||
void | void | ||||
rman_set_bustag(struct resource *r, bus_space_tag_t t) | rman_set_bustag(struct resource *r, bus_space_tag_t t) | ||||
{ | { | ||||
r->r_bustag = t; | r->r_bustag = t; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 248 Lines • Show Last 20 Lines |