diff --git a/repos/base/src/core/include/irq_root.h b/repos/base/src/core/include/irq_root.h index 573aa77dd0..af6c710e15 100644 --- a/repos/base/src/core/include/irq_root.h +++ b/repos/base/src/core/include/irq_root.h @@ -25,7 +25,17 @@ class Genode::Irq_root : public Root_component private: - Range_allocator *_irq_alloc; /* platform irq allocator */ + /* + * Use a dedicated entrypoint for IRQ session to decouple the interrupt + * handling from other core services. If we used the same entrypoint, a + * long-running operation (like allocating and clearing a dataspace + * from the RAM service) would delay the response to time-critical + * calls of the 'Irq_session::ack_irq' function. + */ + enum { STACK_SIZE = sizeof(long)*1024 }; + Rpc_entrypoint _session_ep; + + Range_allocator *_irq_alloc; /* platform irq allocator */ protected: @@ -37,15 +47,17 @@ class Genode::Irq_root : public Root_component /** * Constructor * - * \param session_ep entry point for managing irq session objects - * \param irq_alloc IRQ range that can be assigned to clients - * \param md_alloc meta-data allocator to be used by root component + * \param cap_session capability allocator + * \param irq_alloc IRQ range that can be assigned to clients + * \param md_alloc meta-data allocator to be used by root component */ - Irq_root(Rpc_entrypoint *session_ep, Range_allocator *irq_alloc, - Allocator *md_alloc) + Irq_root(Cap_session *cap_session, + Range_allocator *irq_alloc, Allocator *md_alloc) : - Root_component(session_ep, md_alloc), - _irq_alloc(irq_alloc) { } + Root_component(&_session_ep, md_alloc), + _session_ep(cap_session, STACK_SIZE, "irq"), + _irq_alloc(irq_alloc) + { } }; #endif /* _CORE__INCLUDE__IRQ_ROOT_H_ */ diff --git a/repos/base/src/core/main.cc b/repos/base/src/core/main.cc index f5d425ea98..7229d6968a 100644 --- a/repos/base/src/core/main.cc +++ b/repos/base/src/core/main.cc @@ -224,7 +224,8 @@ int main() static Log_root log_root (e, &sliced_heap); static Io_mem_root io_mem_root (e, e, platform()->io_mem_alloc(), platform()->ram_alloc(), &sliced_heap); - static Irq_root irq_root (e, platform()->irq_alloc(), &sliced_heap); + static Irq_root irq_root (core_env()->cap_session(), + platform()->irq_alloc(), &sliced_heap); static Trace::Root trace_root (e, &sliced_heap, trace_sources, trace_policies); /*