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

@@ -105,6 +105,6 @@ int cap_cap_check(struct ktcb *task, unsigned int req, unsigned int flags);
int cap_mutex_check(unsigned long mutex_address, int mutex_op);
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);
#endif /* __GENERIC_CAPABILITY_H__ */

View File

@@ -40,11 +40,17 @@ struct irq_desc {
struct irq_chip *chip;
/* Thread registered for this irq */
struct ktcb *irq_thread;
struct ktcb *task;
/* Notification slot for this irq */
int task_notify_slot;
/* Device virtual address */
unsigned long device_virtual;
/* Device capability */
struct capability *devcap;
/* NOTE: This could be a list for multiple handlers for shared irqs */
irq_handler_t handler;
};
@@ -68,8 +74,8 @@ static inline void irq_disable(int irq_index)
this_chip->ops.ack_and_mask(irq_index - this_chip->start);
}
int irq_register(struct ktcb *task, int notify_slot,
l4id_t irq_index, irq_handler_t handler);
void irq_generic_map_device(struct irq_desc *desc);
int irq_register(struct ktcb *task, int notify_slot, l4id_t irq_index);
void do_irq(void);
void irq_controllers_init(void);