From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1izFH5-0001qw-3d for linux-um@lists.infradead.org; Wed, 05 Feb 2020 07:39:04 +0000 Received: by mail-pf1-x442.google.com with SMTP id p14so758905pfn.4 for ; Tue, 04 Feb 2020 23:39:03 -0800 (PST) Date: Wed, 05 Feb 2020 16:38:58 +0900 Message-ID: From: Hajime Tazaki Subject: Re: [RFC v2 07/37] lkl: interrupt support In-Reply-To: References: <567fd4d5c395e2279e86ca0bfca544ad2773a31d.1573179553.git.thehajime@gmail.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-um" Errors-To: linux-um-bounces+geert=linux-m68k.org@lists.infradead.org To: richard.weinberger@gmail.com Cc: linux-arch@vger.kernel.org, tavi.purdila@gmail.com, linux-um@lists.infradead.org, retrage01@gmail.com, linux-kernel-library@freelists.org, sigmaepsilon92@gmail.com On Tue, 26 Nov 2019 07:13:55 +0900, Richard Weinberger wrote: > > On Fri, Nov 8, 2019 at 6:03 AM Hajime Tazaki wrote: > > > > From: Octavian Purdila > > > > Add APIs that allows the host to reserve and free and interrupt number > > and also to trigger an interrupt. > > > > The trigger operation will simply store the interrupt data in > > queue. The interrupt handler is run later, at the first opportunity it > > has to avoid races with any kernel threads. > > > > Currently, interrupts are run on the first interrupt enable operation > > if interrupts are disabled and if we are not already in interrupt > > context. > > > > When triggering an interrupt, it uses GCC's built-in functions for > > atomic memory access to synchronize and simple boolean flags. > > > > Signed-off-by: Hajime Tazaki > > Signed-off-by: Michael Zimmermann > > Signed-off-by: Octavian Purdila > > --- > > arch/um/lkl/include/asm/irq.h | 13 ++ > > arch/um/lkl/include/uapi/asm/irq.h | 36 ++++ > > arch/um/lkl/include/uapi/asm/sigcontext.h | 16 ++ > > arch/um/lkl/kernel/irq.c | 193 ++++++++++++++++++++++ > > Like I said before, this also something to unify with UML. > I'm aware that this is easily said but we cannot have too much duplication. > > Feel free to ask if UML internals give you headache. :-) Same as nommu implementation, I left this part as-is. Triggering interrupts with fd events (delivered by epoll&co) is a hard part to implement host-independent interrupts of LKL. OTOH, the v3 patchset shows that it is doable to use UML drivers with the LKL interrupt facility. I may also need more time to evaluate/find a right direction, though. Your comments are always welcome. -- Hajime _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um