From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Berg Subject: Re: [RFC v4 23/25] um lkl: add UML network driver for lkl Date: Mon, 30 Mar 2020 23:31:15 +0200 Message-ID: References: <0f087b36ad579eeb8062b12e9e61566d9b5b18ac.1585579244.git.thehajime@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from s3.sipsolutions.net ([144.76.43.62]:43644 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728504AbgC3VbU (ORCPT ); Mon, 30 Mar 2020 17:31:20 -0400 In-Reply-To: <0f087b36ad579eeb8062b12e9e61566d9b5b18ac.1585579244.git.thehajime@gmail.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Hajime Tazaki , linux-um@lists.infradead.org Cc: Octavian Purdila , linux-kernel-library@freelists.org, linux-arch@vger.kernel.org, Akira Moroo > +++ b/arch/um/lkl/include/asm/irq.h > @@ -2,6 +2,9 @@ > #ifndef _ASM_LKL_IRQ_H > #define _ASM_LKL_IRQ_H > > +/* pull UML's definitions */ > +#include "../../../include/asm/irq.h" This is _really_ ugly. > +#if defined(__linux) && (defined(__i386) || defined(__x86_64)) > +#include > +#endif > +void *um_os_signal(int signum, void *handler); and arguably those random declarations you're sprinkling are worse. > @@ -181,6 +196,11 @@ void init_IRQ(void) > for (i = 0; i < NR_IRQS; i++) > irq_set_chip_and_handler(i, &dummy_irq_chip, handle_simple_irq); > > +#if defined(__linux) && (defined(__i386) || defined(__x86_64)) What's with all those ifdefs with this condition? > +++ b/tools/lkl/lib/um/um_glue.c > @@ -0,0 +1,39 @@ > +// SPDX-License-Identifier: GPL-2.0 > +#include > +#include > +#include > +#include > +#include > + > + > + > +char lkl_um_devs[4096]; > + > +/* from sigio.c */ > +void maybe_sigio_broken(int fd, int read) > +{ > +} > + > +/* from process.c */ > +int os_getpid(void) > +{ > + return getpid(); > +} All of this really is quite ugly - are you sure it's needed for just the vector network driver?? johannes