From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f67.google.com ([209.85.221.67]:33803 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725912AbfKYWOI (ORCPT ); Mon, 25 Nov 2019 17:14:08 -0500 Received: by mail-wr1-f67.google.com with SMTP id t2so20089590wrr.1 for ; Mon, 25 Nov 2019 14:14:06 -0800 (PST) MIME-Version: 1.0 References: <567fd4d5c395e2279e86ca0bfca544ad2773a31d.1573179553.git.thehajime@gmail.com> In-Reply-To: <567fd4d5c395e2279e86ca0bfca544ad2773a31d.1573179553.git.thehajime@gmail.com> From: Richard Weinberger Date: Mon, 25 Nov 2019 23:13:55 +0100 Message-ID: Subject: Re: [RFC v2 07/37] lkl: interrupt support Content-Type: text/plain; charset="UTF-8" Sender: linux-arch-owner@vger.kernel.org List-ID: To: Hajime Tazaki Cc: linux-um@lists.infradead.org, Linux-Arch , Octavian Purdila , Akira Moroo , linux-kernel-library@freelists.org, Michael Zimmermann 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. :-) -- Thanks, //richard From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iZMcR-0002uB-Ms for linux-um@lists.infradead.org; Mon, 25 Nov 2019 22:14:09 +0000 Received: by mail-wr1-x443.google.com with SMTP id z3so20064756wru.3 for ; Mon, 25 Nov 2019 14:14:07 -0800 (PST) MIME-Version: 1.0 References: <567fd4d5c395e2279e86ca0bfca544ad2773a31d.1573179553.git.thehajime@gmail.com> In-Reply-To: <567fd4d5c395e2279e86ca0bfca544ad2773a31d.1573179553.git.thehajime@gmail.com> From: Richard Weinberger Date: Mon, 25 Nov 2019 23:13:55 +0100 Message-ID: Subject: Re: [RFC v2 07/37] lkl: interrupt support 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: Hajime Tazaki Cc: Linux-Arch , Octavian Purdila , linux-um@lists.infradead.org, Akira Moroo , linux-kernel-library@freelists.org, Michael Zimmermann 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. :-) -- Thanks, //richard _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um