From d210678085f5917da6f4667d8dc8ad311fb8d104 Mon Sep 17 00:00:00 2001 From: Bahadir Balban Date: Wed, 2 Dec 2009 16:03:09 +0200 Subject: [PATCH] Removed irq notification slots. - To be revised with a better implementation --- include/l4/glue/arm/message.h | 6 +----- src/api/irq.c | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/include/l4/glue/arm/message.h b/include/l4/glue/arm/message.h index ab859bb..62d35dd 100644 --- a/include/l4/glue/arm/message.h +++ b/include/l4/glue/arm/message.h @@ -58,7 +58,7 @@ * Complicated for you? Suggest a simpler design and it shall be implemented! */ -#define MR_REST ((UTCB_SIZE >> 2) - MR_TOTAL - 4) /* -4 is for fields on utcb */ +#define MR_REST ((UTCB_SIZE >> 2) - MR_TOTAL - 2) /* -2 is for fields on utcb */ #define MR_TOTAL 6 #define MR_TAG 0 /* Contains the purpose of message */ #define MR_SENDER 1 /* For anythread receivers to discover sender */ @@ -78,15 +78,11 @@ #include INC_GLUE(memlayout.h) -#define TASK_NOTIFY_SLOTS 8 -#define TASK_NOTIFY_MAX 0xFF - #if !defined (__ASSEMBLY__) struct utcb { u32 mr[MR_TOTAL]; /* MRs that are mapped to real registers */ u32 saved_tag; /* Saved tag field for stacked ipcs */ u32 saved_sender; /* Saved sender field for stacked ipcs */ - u8 notify[TASK_NOTIFY_SLOTS]; /* Notification slots */ u32 mr_rest[MR_REST]; /* Complete the utcb for up to 64 words */ }; #endif diff --git a/src/api/irq.c b/src/api/irq.c index b00b417..f79588c 100644 --- a/src/api/irq.c +++ b/src/api/irq.c @@ -13,6 +13,7 @@ #include INC_GLUE(message.h) #include +#if 0 /* * Default function that handles userspace * threaded irqs. Increases notification count and wakes @@ -32,6 +33,8 @@ * * - Recursive irqs are enabled, but we are also protected * from them because the current irq number is masked. + * + * FIXME: Instead of UTCB, do it by incrementing a semaphore. */ int thread_notify_default(struct irq_desc *desc) { @@ -75,9 +78,6 @@ int irq_control_register(struct ktcb *task, int notify_slot, l4id_t irqnum) { int err; - if (notify_slot >= TASK_NOTIFY_SLOTS) - return -EINVAL; - /* * Check that utcb memory accesses won't fault us. * @@ -118,4 +118,14 @@ int sys_irq_control(unsigned int req, int slot, unsigned int flags, l4id_t irqno } return 0; } +#endif + +/* + * Register/deregister device irqs. Optional synchronous and + * asynchronous irq handling. + */ +int sys_irq_control(unsigned int req, int slot, unsigned int flags, l4id_t irqno) +{ + return 0; +}