Re: [RFC v2 07/37] lkl: interrupt support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 05/02/2020 07:38, Hajime Tazaki wrote:

On Tue, 26 Nov 2019 07:13:55 +0900,
Richard Weinberger wrote:

On Fri, Nov 8, 2019 at 6:03 AM Hajime Tazaki <thehajime@xxxxxxxxx> wrote:

From: Octavian Purdila <tavi.purdila@xxxxxxxxx>

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 <thehajime@xxxxxxxxx>
Signed-off-by: Michael Zimmermann <sigmaepsilon92@xxxxxxxxx>
Signed-off-by: Octavian Purdila <tavi.purdila@xxxxxxxxx>
---
  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.

Make sure you are testing with the vector network devices, the legacy ones are scheduled to be obsoleted at some point

I know this will cause a headache on non-Linux, I am happy to write wrappers/emulators for recvmms/sendmmsg so these build on the systems which do not support them.

Brgds,



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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/linux-um


--
Anton R. Ivanov
https://www.kot-begemot.co.uk/



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux