Made changes to map devices dynamically upon irq registration.

All will be reverted since mapping devices statically is much simpler.
This commit is contained in:
Bahadir Balban
2009-12-11 19:02:10 +02:00
parent 54301e8026
commit 59af5d3794
16 changed files with 248 additions and 64 deletions

View File

@@ -877,7 +877,8 @@ int cap_thread_check(struct ktcb *task,
int cap_irq_check(struct ktcb *registrant, unsigned int req,
unsigned int flags, l4id_t irq)
unsigned int flags, l4id_t irq,
struct capability **device_cap)
{
struct sys_irqctrl_args args = {
.registrant = registrant,
@@ -895,8 +896,8 @@ int cap_irq_check(struct ktcb *registrant, unsigned int req,
* Find the device capability and
* check that it allows irq registration
*/
if (!(cap_find(current, cap_match_devmem,
&args, CAP_TYPE_MAP_PHYSMEM)))
if (!(*device_cap = cap_find(current, cap_match_devmem,
&args, CAP_TYPE_MAP_PHYSMEM)))
return -ENOCAP;
return 0;
@@ -939,7 +940,7 @@ int cap_thread_check(struct ktcb *task,
}
int cap_irq_check(struct ktcb *registrant, unsigned int req,
unsigned int flags, l4id_t irq)
unsigned int flags, l4id_t irq, struct capability **cap)
{
return 0;
}