From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hajime Tazaki Subject: [RFC v5 09/21] um: nommu: host interface Date: Thu, 2 Jul 2020 23:07:03 +0900 Message-ID: References: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729363AbgGBOI6 (ORCPT ); Thu, 2 Jul 2020 10:08:58 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E990C08C5C1 for ; Thu, 2 Jul 2020 07:08:58 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id u8so12198159pje.4 for ; Thu, 02 Jul 2020 07:08:58 -0700 (PDT) In-Reply-To: Sender: linux-arch-owner@vger.kernel.org List-ID: To: linux-um@lists.infradead.org Cc: Octavian Purdila , Akira Moroo , linux-kernel-library@freelists.org, linux-arch@vger.kernel.org, Hajime Tazaki This patch introduces the host operations that define the interface between the LKL and the host. These operations must be provided either by a host library or by the application itself. Signed-off-by: Hajime Tazaki --- arch/um/include/asm/host_ops.h | 9 ++++++++ arch/um/nommu/include/uapi/asm/host_ops.h | 25 +++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 arch/um/include/asm/host_ops.h create mode 100644 arch/um/nommu/include/uapi/asm/host_ops.h diff --git a/arch/um/include/asm/host_ops.h b/arch/um/include/asm/host_ops.h new file mode 100644 index 000000000000..f52423cc4ced --- /dev/null +++ b/arch/um/include/asm/host_ops.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_LKL_HOST_OPS_H +#define _ASM_LKL_HOST_OPS_H + +#include + +extern struct lkl_host_operations *lkl_ops; + +#endif diff --git a/arch/um/nommu/include/uapi/asm/host_ops.h b/arch/um/nommu/include/uapi/asm/host_ops.h new file mode 100644 index 000000000000..d3dad11b459e --- /dev/null +++ b/arch/um/nommu/include/uapi/asm/host_ops.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +#ifndef __UM_NOMMU_UAPI_HOST_OPS_H +#define __UM_NOMMU_UAPI_HOST_OPS_H + +/* Defined in {posix,nt}-host.c */ +struct lkl_mutex; +struct lkl_sem; +typedef unsigned long lkl_thread_t; +struct lkl_jmp_buf { + unsigned long buf[128]; +}; + +/** + * lkl_host_operations - host operations used by the Linux kernel + * + * These operations must be provided by a host library or by the application + * itself. + * + */ +struct lkl_host_operations { +}; + +void lkl_bug(const char *fmt, ...); + +#endif -- 2.21.0 (Apple Git-122.2) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqztc-0005CH-Es for linux-um@lists.infradead.org; Thu, 02 Jul 2020 14:09:01 +0000 Received: by mail-pj1-x1043.google.com with SMTP id k5so3017426pjg.3 for ; Thu, 02 Jul 2020 07:08:59 -0700 (PDT) From: Hajime Tazaki Subject: [RFC v5 09/21] um: nommu: host interface Date: Thu, 2 Jul 2020 23:07:03 +0900 Message-Id: In-Reply-To: References: MIME-Version: 1.0 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: linux-um@lists.infradead.org Cc: Octavian Purdila , linux-kernel-library@freelists.org, linux-arch@vger.kernel.org, Hajime Tazaki , Akira Moroo This patch introduces the host operations that define the interface between the LKL and the host. These operations must be provided either by a host library or by the application itself. Signed-off-by: Hajime Tazaki --- arch/um/include/asm/host_ops.h | 9 ++++++++ arch/um/nommu/include/uapi/asm/host_ops.h | 25 +++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 arch/um/include/asm/host_ops.h create mode 100644 arch/um/nommu/include/uapi/asm/host_ops.h diff --git a/arch/um/include/asm/host_ops.h b/arch/um/include/asm/host_ops.h new file mode 100644 index 000000000000..f52423cc4ced --- /dev/null +++ b/arch/um/include/asm/host_ops.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_LKL_HOST_OPS_H +#define _ASM_LKL_HOST_OPS_H + +#include + +extern struct lkl_host_operations *lkl_ops; + +#endif diff --git a/arch/um/nommu/include/uapi/asm/host_ops.h b/arch/um/nommu/include/uapi/asm/host_ops.h new file mode 100644 index 000000000000..d3dad11b459e --- /dev/null +++ b/arch/um/nommu/include/uapi/asm/host_ops.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +#ifndef __UM_NOMMU_UAPI_HOST_OPS_H +#define __UM_NOMMU_UAPI_HOST_OPS_H + +/* Defined in {posix,nt}-host.c */ +struct lkl_mutex; +struct lkl_sem; +typedef unsigned long lkl_thread_t; +struct lkl_jmp_buf { + unsigned long buf[128]; +}; + +/** + * lkl_host_operations - host operations used by the Linux kernel + * + * These operations must be provided by a host library or by the application + * itself. + * + */ +struct lkl_host_operations { +}; + +void lkl_bug(const char *fmt, ...); + +#endif -- 2.21.0 (Apple Git-122.2) _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um